Home > Community > Forums > Custom IC Design > Specify a file path as a parameter type in Cadence VerilogAMS

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: *

 Specify a file path as a parameter type in Cadence VerilogAMS 

Last post Tue, Aug 12 2014 2:10 AM by Andrew Beckett. 4 replies.
Started by uzzy 02 Oct 2012 07:52 PM. Topic has 4 replies and 1826 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Oct 2 2012 7:52 PM

    • uzzy
    • Not Ranked
    • Joined on Wed, Apr 20 2011
    • Posts 7
    • Points 110
    Specify a file path as a parameter type in Cadence VerilogAMS Reply

    Hello,

            I am writing a verilogams module to be used in my spectre sims. When this module is instantiated in my schematic, it needs to take in a path to a pwl file as a parameter input to the verilogams instance and then incorporate this filename as the file type for the "vsource" instance defined inside the verilogams module. In short, this is something I want to do(syntax is incorrect) :

     parameter filename = "/projects/test.pwl";

     vsource #(.type("pwl"),.file(filename)) V1(p,n);

     I want to specify the particular pwl file to be used from the schematic and not by changing the verilogams code of the module. Any suggestions/comments will be greatly appreciated ?

    Regards,

    Uzzy 

    • Post Points: 20
  • Tue, Oct 2 2012 10:40 PM

    Re: Specify a file path as a parameter type in Cadence VerilogAMS Reply

     First of all, are you running spectre or AMS as the simulator? If spectre, it will have to be a "veriloga" view, whereas AMS can use both veriloga and verilogams. I'm only asking because there's some differences in the implementation of string parameters between the two (for historical evolution reasons) and want to ensure I give the right answer...

    Andrew.

    • Post Points: 35
  • Wed, Oct 3 2012 7:22 AM

    • uzzy
    • Not Ranked
    • Joined on Wed, Apr 20 2011
    • Posts 7
    • Points 110
    Re: Specify a file path as a parameter type in Cadence VerilogAMS Reply

    I am using the spectre simulator and it is a veriloga view that I am trying to simulate.

     Thanks,

    Uzzy 

    Filed under: ,
    • Post Points: 5
  • Tue, Jul 8 2014 1:19 PM

    • StephenB
    • Not Ranked
    • Joined on Tue, Jul 8 2014
    • Posts 1
    • Points 20
    Re: Specify a file path as a parameter type in Cadence VerilogAMS Reply

    Hi Andrew, I have exactly the same question.  I am simulating with spectre so I'm trying to get this to work in veriloga, although I'd also be interested to know how to do this with verilogams.  Can you please help?  Thanks so much!

     

    Stephen 

    • Post Points: 20
  • Tue, Aug 12 2014 2:10 AM

    Re: Specify a file path as a parameter type in Cadence VerilogAMS Reply

    Stephen,

    This works in both VerilogA and VerilogAMS:

    `include "disciplines.vams"

    module testpwl (plus,minus);

    inout plus,minus;
    electrical plus,minus;

    parameter filename="clock.pwl";

    vsource #(.type("pwl"),.file(filename)) V1(plus,minus);

    endmodule

    Spectre also works with:

     parameter string filename="clock.pwl";

    but this "string" keyword will not work in AMS Designer (Verilog AMS), so best to omit it in both.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by uzzy at 02 Oct 2012 07:52 PM. Topic has 4 replies.