• 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. Calculator error on arithmetic operation on the reading...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 8675
  • 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

Calculator error on arithmetic operation on the reading of digital bus

delgsy
delgsy over 3 years ago

I have a digital bus as an output of verilog block.
Then putting these expressions on calculator gives me error.
value(VT("/COUNTER4V_A<31:0>") 1u ) / 9997
EDIT : numConv(value(VT("/COUNTER4V_A<31:0>") 1u ) "dec" t) / 9997

I would like to know as well how to plot it in decimal by default.
The way I do it right now is I need to RMB --> Digital Bus Properties --> Radix.

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    The numConv function will return the number as a string. So you could convert it to an actual integer using:

    atoi(numConv(value(VT("/COUNTER4V_A<31:0>") 1u ) "dec" t))

    and then you could divide that by 9997.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    The numConv function will return the number as a string. So you could convert it to an actual integer using:

    atoi(numConv(value(VT("/COUNTER4V_A<31:0>") 1u ) "dec" t))

    and then you could divide that by 9997.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • ShawnLogan
    ShawnLogan over 3 years ago in reply to Andrew Beckett

    Dear delgsy,

    delgsy said:
    I have a digital bus as an output of verilog block.
    Then putting these expressions on calculator gives me error.
    value(VT("/COUNTER4V_A<31:0>") 1u ) / 9997

    I have an alternative that may satisfy your end needs - which I am assuming is to include an ADE output with the value of your digital bus at one or more times. It can easily be modified to allow you to perform mathematical expressions on the bus value using the atoi() function. The same basic methology may be used to add the bus as a digital waveform to a ViVA plot that can be plotted from ADE following a simulation if you still need or want to plot it as well as procure its value(s) at some time(s).

    I put together a test bench to create an analog waveform bus to both convert to a digital waveform as well as procure its value as a digital bus and have attached my effort. I hope it provides enough detail for it to be understandable!

    I hope this helps delgsy!

    (PS - i did not see Andrew's response!...Oops! I am sure that will be helpful delgsy.

    Shawn

    www.dropbox.com/.../test_3bit_ad_tran_dig_bus_061222v1p0.pdf

    • Cancel
    • Vote Up +1 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