The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> instantiation of cells doesn't work
https://designers-guide.org/forum/YaBB.pl?num=1469019065

Message started by Sherif on Jul 20th, 2016, 5:51am

Title: instantiation of cells doesn't work
Post by Sherif on Jul 20th, 2016, 5:51am

Hey everyone,

Does anyone have a good experience with the instantiation of different cells in the same verilogams file?

I'm building a testbench and want to instantiate two instances that have the same name but exist in different libraries, one is schematic and the other one is veriloga.

What I did is the following:
     cell1
     (*
     integer library_binding = "Lib1";
     integer view_binding = "veriloga";
     *) dutvams (
           .x(dutvams_x),
           .y(dutvams_y),
           .z(dutvams_z)
     );
     cell2
     (*
     integer library_binding = "Lib2";
     integer view_binding = "schematic";
     *) dutsch (
           .x(dutsch _x),
           .y(dutsch _y),
           .z(dutsch _z)
     );
I'm also including the path to the veriloga model at the beginning of the verilogams file.

What happens is that when it compiles, it ignores the attributes in between the asterisks completely no matter what I'm tossing in, would only generate syntax errors if it's wrong and generates two schematic instances for Lib2.

When I change the name of the veriloga cell to a different name than the one for the schematic, it works properly.

I don't know what I'm missing here! Any help would be appreciated, thanks :)

Title: Re: instantiation of cells doesn't work
Post by Geoffrey_Coram on Jul 20th, 2016, 6:22am

It seems what you're really objecting to is that your simulator is ignoring the attributes (* ... *) during elaboration -- not that "instantiation doesn't work."

The latest VAMS LRM 2.4 has a different syntax than what you used; it would be

Code:
cell1
(*
library_binding = "Lib1",
view_binding = "veriloga"
*)


But, in any case, support for attributes is tool-specific, and not really part of the language itself.

Title: Re: instantiation of cells doesn't work
Post by Sherif on Jul 20th, 2016, 6:34am

Thanks Geo for your reply!
I'm using virtuoso IC6.1.6 and I think the syntax that I used is the one supported in the simulator. Could there be a check box or something to enable to get this attributes working?

Title: Re: instantiation of cells doesn't work
Post by Ken Kundert on Jul 24th, 2016, 12:52am

Normally you select between views of the same cell. I think it is possible that what you are trying to do is not supported in the simulator.

-Ken

Title: Re: instantiation of cells doesn't work
Post by Sherif on Jul 29th, 2016, 6:20am

I solved the problem, it needed a config file to go through the elaboration phase. I was working on the VerilogAMS Editor and the Extract button on it seems to only compile the code without elaborating it. The update button on the hierarchy editor does it properly. Thanks everyone!

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.