The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> Parent Child Instantiation https://designers-guide.org/forum/YaBB.pl?num=1395417921 Message started by Davivilla on Mar 21st, 2014, 9:05am |
Title: Parent Child Instantiation Post by Davivilla on Mar 21st, 2014, 9:05am Hi I am working in cadence IC 5.1 and i need to do a module with submodules, but in the language reference manual the example is not clear. can you help me? This is the example of LRM of verilog-a. module comparator(cout, inp, inm); output cout; input inp, inm; ground gnd; electrical cout, inp, inm; parameter real td = 1n, tr = 1n, tf = 1n; real vcout; analog begin @(cross(V(inp) - V(inm), 0)) vcout = ((V(inp) > V(inm)) ? 1 : 0); V(vcout) <+ transition(vcout, td, tr, tf); end endmodule module integrator(out, in); output out; input in; electrical in, out; parameter real gain = 1.0; parameter real ic = 0.0; analog begin V(out) <+ gain*idt(V(in), ic); end endmodule module sigmadelta(out, ref, in); output out; input ref, in; comparator C1(.cout(aa0), .inp(in), .inm(aa2)); integrator #(1.0) I1(.out(aa1), .in(aa0)); comparator C2(out, aa1, gnd); d2a #(.width(1)) D1(aa2, ref, out);// A D/A converter endmodule Why the parent module is instiantiated at the end? If i create this example cadence only recognize the fisrt module as parent. Does parent module need to have a symbol? Does All the modules needs to be created with symbol? Does the modules need to be in any special place?, like the same library. Can the parent module contain some description or only the instantiation? |
Title: Re: Parent Child Instantiation Post by boe on Mar 21st, 2014, 10:06am Davivilla wrote on Mar 21st, 2014, 9:05am:
Quote:
Quote:
Quote:
Quote:
Quote:
- B O E |
Title: Re: Parent Child Instantiation Post by Davivilla on Mar 21st, 2014, 10:26am Hi B O E, Thank you, The problem is when i save the model, cadence recognize the first module instantiation as a parent. But obviosly the parent is at the end. Then the symbol of the model has the imputs and outputs of the first module instatntion. Best regards |
Title: Re: Parent Child Instantiation Post by Geoffrey_Coram on Mar 24th, 2014, 12:26pm I think BOE was suggesting that each module definition should be placed in a separate file, then it won't be a problem that only the first module in the file is recognized. It's a little more work to create the files, but shouldn't be too onerous. |
Title: Re: Parent Child Instantiation Post by Davivilla on Mar 25th, 2014, 6:29am Thank you Geoffrey_Coram. I want to take a look at this code. This is the parent: Code:
This is the child1: Code:
And this is the child2: Code:
All modules are created in the same library. Everyone has an associated symbol. The final code is the union of all in that order ie. Code:
finally when i simulate, i do not get results. Thank you and Best regards |
Title: Re: Parent Child Instantiation Post by Davivilla on Mar 27th, 2014, 8:46am Hi Look guys I found the solution for those who may be of interest. The solution is create a unique the module for parent. This module should contain only the mapping of ports and parameters of the child. Th The syntax for this issue is: Code:
Thank you all for the help. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |