• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. AMS Simulator support for SystemVerilog Math Functions

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 15258
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AMS Simulator support for SystemVerilog Math Functions

gintel
gintel over 12 years ago

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.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • gintel
    gintel over 12 years ago

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information