Home > Community > Forums > Custom IC Design > AMS Simulator support for SystemVerilog Math Functions

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

 AMS Simulator support for SystemVerilog Math Functions 

Last post Tue, Feb 5 2013 11:35 AM by gintel. 2 replies.
Started by gintel 04 Feb 2013 09:32 AM. Topic has 2 replies and 1312 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Feb 4 2013 9:32 AM

    • gintel
    • Not Ranked
    • Joined on Mon, Feb 4 2013
    • Posts 4
    • Points 65
    AMS Simulator support for SystemVerilog Math Functions Reply

    Hi,

     I was wondering if it is possible to enable support for the math functions in SystemVerilog (such as $sin) in the AMS simulator. When I try to run a systemverilog file including $sin built-in function in IEEE 1800-2009, I get the following error:

    sjit = AMP_NOISE*($sin($realtime*2*PI/TNOISE));

     Unrecognized system task or function (did not match built-in or user-defined names) [2.7.4(IEEE Std 1364-2001)].

     The file runs without a problem in another system verilog simulator (Questa). Is there any option that I should use in the AMS simulator? Or does it simply not support the basic math functions?

    I am using IC6.1.5.

    Thanks.

    • Post Points: 20
  • Tue, Feb 5 2013 1:43 AM

    Re: AMS Simulator support for SystemVerilog Math Functions Reply

    Are you putting this code in a SystemVerilog view? Or in a VerilogAMS or Verilog view? It has to be in a SystemVerilog view.

    I tried (from the command line, since it was quick to test) putting this in a file called "forum.sv":

    module forum;

    parameter real AMP_NOISE=1.0;
    parameter real PI=3.1415926;
    parameter real TNOISE=1e-6;

    real sjit;

    always #10 begin
        sjit = AMP_NOISE*($sin($realtime*2*PI/TNOISE));
        $strobe(sjit);
        end

    always #1000 $finish;

    endmodule

    And then ran "irun forum.sv" - and it worked fine. The ".sv" suffix told irun that this is SystemVerilog.

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Feb 5 2013 11:35 AM

    • gintel
    • Not Ranked
    • Joined on Mon, Feb 4 2013
    • Posts 4
    • Points 65
    Re: AMS Simulator support for SystemVerilog Math Functions Reply

    I am running from systemverilog view. Below is the irun arguments I got from the output log file (I redacted some of the company specific arguments). The line in bold italic is where the systemverilog view is defined.

     irun
     -f irunArgs
      -clean
      -UNBUFFERED
      -noupdate
      -errormax 50
      -status
      -nowarn DLNOHV
      -v93
      -timescale 1ns/1ns
      -vtimescale 1ns/1ns
      -discipline logic
      -delay_mode None
      -novitalaccl
      -access r
      -iereport
      -amspartinfo ../psf/partition.info
       -analogcontrol ./amsControlSpectre.scs
      -input ./probe.tcl
      -run
      -exit
      -ncsimargs "+amsrawdir ../psf"
      -simcompatible_ams spectre
      -name test:config_AMS
      -allowredefinition
      -amsbind
      -top test
      -top cds_globals
      ./netlist.vams
      -f ./textInputs
       -amscompilefile "***/clockgen/systemverilog/verilog.sv lib:***_lib cell:clockgen view:systemverilog"
      ./cds_globals.vams
      -l ../psf/irun.log
      -spectre_args +aps
      -spectre_args -mt

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by gintel at 04 Feb 2013 09:32 AM. Topic has 2 replies.