Home > Community > Forums > Custom IC SKILL > How to pass a value to a pre-processor macro in a VerilogA view from CDF ?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to pass a value to a pre-processor macro in a VerilogA view from CDF ? 

Last post Wed, Jun 12 2013 2:09 AM by Herge. 7 replies.
Started by Herge 18 Jun 2012 07:03 AM. Topic has 7 replies and 1248 views
Page 1 of 1 (8 items)
Sort Posts:
  • Mon, Jun 18 2012 7:03 AM

    • Herge
    • Top 500 Contributor
    • Joined on Fri, May 8 2009
    • Oudenaarde, Belgium
    • Posts 17
    • Points 235
    How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    Hello,

    I've written a nicely scaleable VerilogA module using multi-line busses for the ports and internal 'FOR' loops all parameterized with a pre-processor macro to set the number of ports. The code works nicely, I can set the macro to arbitrary positive values and the module compiles and runs fine.

     However, at the moment, I can only set the macro by edding some VerilogA code. Ideally, I would like to define the number of ports as a CDF parameter and pass it down to my module. But as a pre-processor variable is not a standard module parameter, I was not able to find instructions on how to set it from the CDF... Can this be done ?

    I have the impression that a good way would be to create a PCell that generates VerilogA views on the fly. Is that possible ? I have already played extensively with PCells generating schematics and symbols -- what about text views or VerilogA ? It seems it is not a support view type in the pcDefinePCell() arguments list...
    In this fashion each submaster would define a unique module (the nbr of ports would be in the list of formal parameters) which would come in very handy to manage varoius instances of my module with different port numbers...

    I did not try this out yet -- would like to understand if that is feasible...

     Thanks.

    • Post Points: 20
  • Mon, Jun 18 2012 7:15 AM

    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    This is really not that straightforward. There are some components in rfLib that do this (e.g. butterworth_lp) - they work by having a custom spectre netlist procedure, which writes out a verilogA model into the netlist directory, using `define to define the parameters, and then includes the common body. They then use a private SKILL function to add this newly generated file to the files which are ahdlInclude'd at the end of the netlist.

    Another way is to subclass the formatter, and then define a method for nlPrintFooter to print out the  generated verilogA models. But that's not going to be that straightforward either because you need to collect the information in such a way that it works with incremental netlisting.

    The best thing is to contact customer support on this one. Then we can give more detailed advice - I'm reluctant to advertise a private SKILL function in a public forum - if you log a service request, we can assess if you need it, and file an enhancement request to ask for that function to be made public in the future.

    Andrew.

    • Post Points: 35
  • Mon, Jun 18 2012 7:19 AM

    • Herge
    • Top 500 Contributor
    • Joined on Fri, May 8 2009
    • Oudenaarde, Belgium
    • Posts 17
    • Points 235
    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    Ok, thanks for the hint. I've already played with custom netlisting to include RLCG files for example. I'll have a look at the filter case. And go to the support line.

    • Post Points: 5
  • Mon, Jun 18 2012 8:20 AM

    • Herge
    • Top 500 Contributor
    • Joined on Fri, May 8 2009
    • Oudenaarde, Belgium
    • Posts 17
    • Points 235
    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    OK, I've looked at the filters in the rfLib, and run a testcase. I understand the flow. I have put a support request, describing what I want to do.

    • Post Points: 20
  • Tue, Jun 11 2013 7:42 AM

    • KoVe
    • Not Ranked
    • Joined on Tue, Jun 11 2013
    • Posts 4
    • Points 65
    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    Could you provide the Solution ID? 

    Thanks!

    • Post Points: 20
  • Tue, Jun 11 2013 8:11 AM

    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    What solution? There's no solution mentioned as far as I could see...

    Andrew.

    • Post Points: 35
  • Tue, Jun 11 2013 9:31 AM

    • KoVe
    • Not Ranked
    • Joined on Tue, Jun 11 2013
    • Posts 4
    • Points 65
    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    Herge entered a support request, I (wrongfully) presumed this would results in a solution.

    I have a similar problem: I want to make a binary to thermometer decoder and I want the number of outputs ports to be a CDF parameter. This presents two problems.

    1. In verilog-A the number of output ports must be set by 'define statement.
    2. I have to regenerate the symbol everytime I change the number of ports. This can be solved by using a pcell symbol.
    Would it be possible to add a callback function to the CDF parameter (number of ports), and let the callback edit the define statement in the verilog.va file? (I think this solution does not require a private SKILL function.)
    • Post Points: 5
  • Wed, Jun 12 2013 2:09 AM

    • Herge
    • Top 500 Contributor
    • Joined on Fri, May 8 2009
    • Oudenaarde, Belgium
    • Posts 17
    • Points 235
    Re: How to pass a value to a pre-processor macro in a VerilogA view from CDF ? Reply

    Indeed, I am not yet aware of a solution allowing to have a PCell that netlists to an underlying scaleable VerilogA module.

    What was solved in the above conversation was the question on how to pass a CDF parameter value to a VerilogA pre-processor macro. The method applied in rfLib allows indeed to set pre-processor macro's from CDF parameters, but this is not sufficient to enable a variable number of ports on the VerilogA module during netlisting. 

    The netlister checks the terminals on the VerilogA view which was set when the view was checked & saved (so using the default number of ports, not the actual one set in CDF).  Despite the fact that I have a schematic PCell implementing the correct (dynamic) number of ports, I can not prevent at the moment the netlister to query the (frozen) verilogA view data. I have put a support request (Case# 45438804) on that.

     

     

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by Herge at 18 Jun 2012 07:03 AM. Topic has 7 replies.