The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Modeling >> Behavioral Models >> how to create an n-stage RC filter in Verilog-A https://designers-guide.org/forum/YaBB.pl?num=1328123432 Message started by sorgin1 on Feb 1st, 2012, 11:10am |
Title: how to create an n-stage RC filter in Verilog-A Post by sorgin1 on Feb 1st, 2012, 11:10am Hi, The following code for a 2-stage RC filter in the following code works ok. Code:
The next step would be use a for loop to create as many stages as I want. I tried using the following code, but fails at compile. Code:
Any suggestions on how to fix this? The next step would be to pass the number of stages as a parameter. Would that be possible? and how? Thanks in advance. Regards, sorgin |
Title: Re: how to create an n-stage RC filter in Verilog-A Post by boe on Feb 2nd, 2012, 3:30am Sorgin1, try the generate statement or a genvar declaration. You may want to check in your tool vendor's documentation to what extent that is supported, especially with parametrization. - B O E |
Title: [SOLVED] Re: how to create an n-stage RC filter in Verilog-A Post by sorgin1 on Feb 2nd, 2012, 5:53am Thanks BOE, I was already using the genvar method, but missed a couple of other things. I managed to get it working even including the parameterized number of stages. The following code shows the working model, at least for smartspice. Code:
and the netlist should be as follows: Code:
|
Title: Re: [SOLVED] how to create an n-stage RC filter in Verilog-A Post by boe on Feb 3rd, 2012, 6:28am sorgin1 wrote on Feb 2nd, 2012, 5:53am:
- B O E |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |