• 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. Functional Verification
  3. Query regarding the usage of analog assertions in systemverilog...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 65
  • Views 16110
  • 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

Query regarding the usage of analog assertions in systemverilog file

susanta
susanta over 9 years ago

Hi Team,

Presently I am developing a test-bench that include assertion checks for some analog signals. But facing some issues as described below.

1. I used the $cds_get_analog_value(hierarchy,"type") to get the value of an object in my design. The syntax I used is

someVar =  $cds_get_analog_value(hierarchy,"type");

But getting compilation error saying "Missing Right parentheses" and the = sign is highlighted in red.

I am not sure if some kind of special license is required to run simulation with the system tasks like $cds_get_analog_valure()/$cds_analog_is_valid() etc. Would someone please give me some clue on this? 

2. I used these system tasks in .sv file. Is it fine? Do I have to use file with extension .va/.vams? But the assert command is not being recognised  in .va/.vams file.

Thanks and Regards

Susanta

  • Cancel
  • tpylant
    tpylant over 9 years ago
    Is "somevar" defined as a real variable?

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • susanta
    susanta over 9 years ago
    Hi Tim, Thanks for your reply. Yes, someVar is defined as real. Susanta
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 9 years ago

    I cannot reproduce your problem. Here is a very simple test:

    test.sv
    module test;
      real somevar;

      top top();

      initial begin
        #1 somevar = $cgav("top.othervar");
        $display("somevar = %2.2f", somevar);
      end
    endmodule

    top.vams
    `include "disciplines.vams"
    module top;
      electrical othervar;
      analog begin
        V(othervar) <+ 2.2;
      end
    endmodule

    amscf.scs
    simulator lang=spectre
    timeDom tran stop= 30us

    amsd {
    ie vsup=5.0
    }

    % irun test.sv top.vams amscf.scs

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • susanta
    susanta over 9 years ago
    Hi Tim, I tried your code and it worked perfectly fine. But when I changed the electrical branch to wreal variable it's not running. So is there any way to get the $cds_get_analog_value() working with wreal variable? Or it works only with branch and node?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • susanta
    susanta over 9 years ago
    I would like to elaborate my previous query. I created a design which has 2 wreal type input ports of the few. Now I created a top level testbench in sv where I tried to get the two wreal type ports values using $cgav() to measure the difference. But I got error. Then I took a real variable in the design file say diff = var1-var2 and tried to get this diff from the sv top using $cgav() and it worked. Is it possible to get some use cases of these system functions along with their limitations? Thanks.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 9 years ago

    From my understanding, the $cgav system task is only available when the analog solver is invoked. Therefore, you wouldn't be able to use it with wreal variables in a non-analog simulation.

    Tim

    • 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