• 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 SKILL
  3. calculator numconv function

Stats

  • Locked Locked
  • Replies 50
  • Subscribers 143
  • Views 26237
  • 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 numconv function

abdurrahman0234
abdurrahman0234 over 4 years ago

When ı plot to calculator, I get error as below. I want to convert binary signal to decimal.Please can help me. 

ERROR (VIVA-3002):expression evaluation failed: val is not legal.
ERROR (VIVA-3002):expression evaluation failed: numConv(VT("/out<0:2>") "dec" t)

  • Cancel
Parents
  • abdurrahman0234
    abdurrahman0234 over 4 years ago

    sorry, when ı send my plot to calculator

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to abdurrahman0234

    I think you should use the analog to digital functions that were referenced in the other thread you posted in after this. The numConv is really for single valued text numbers and will convert them into a different number base. I don't think it's the right solution here.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to Andrew Beckett

    Numconv is for the single digitbase? My output is digital 3 bit.İ want to convert it to decimal. I think that verilogA model but since i i do not know verilogA, i can use calculator. Which function should İ use

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to abdurrahman0234

    But I want convert it to signed number

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to abdurrahman0234

    VT() will return a waveform of the bus values versus time - and these are voltages (which are floating point, unless this is some digital bus from a mixed-signal simulation?). You probably first need to convert that bus of analog voltages into a bus - which you can do via the Measurements->Analog to Digital in ViVA (you can choose whether signed or unsigned, and the radix) and then having plotted that, you can take the resulting bus and do Right Mouse->Send to Calculator or Send to ADE to add into your output measurements.

    numConv is for dealing with a single text value (not a single digit) and I don't think that's what you want here. It's useful if you've (for example) taken the value of a digital bus at a specific time, and want to convert the base then - but not so useful for waveform data

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to abdurrahman0234

    VT() will return a waveform of the bus values versus time - and these are voltages (which are floating point, unless this is some digital bus from a mixed-signal simulation?). You probably first need to convert that bus of analog voltages into a bus - which you can do via the Measurements->Analog to Digital in ViVA (you can choose whether signed or unsigned, and the radix) and then having plotted that, you can take the resulting bus and do Right Mouse->Send to Calculator or Send to ADE to add into your output measurements.

    numConv is for dealing with a single text value (not a single digit) and I don't think that's what you want here. It's useful if you've (for example) taken the value of a digital bus at a specific time, and want to convert the base then - but not so useful for waveform data

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to Andrew Beckett

    But i take digital output from the bus. İt does not analog signal.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to abdurrahman0234

    Because l look the power spectral density at the output of the digital bus. İ think that can not look sperately them it will not correct result i should look the bus

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to abdurrahman0234

    It would seriously help if you actually wrote clear questions (and I recognise that English is probably not your first language). I cannot understand what you're asking here.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to Andrew Beckett

    Thank much sir.My output 3 bit digital output which is the error correction network at the same. İt is a bus. İ must look at the power spectral density of my output. When i look pad of my output, it shows sperately graphic since 3 bit. But i want to look at the single plot so i want to convert it to decimal. At the same time, i will check my output because my output must be between -3 and 4 so i want convert my 3 bit digital output to decimal.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to abdurrahman0234

    My circuit is digital

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to abdurrahman0234

    It's still rather unclear. Please show a plot of what the bus looks like when you plot it in ViVA. I assume you're running a simulation with the simulator being "ams"?

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to Andrew Beckett

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to abdurrahman0234

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • abdurrahman0234
    abdurrahman0234 over 4 years ago in reply to abdurrahman0234

    it is my 3 bit output. I convert it to signed decimal.I will check them and look them of psd in a single psd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to abdurrahman0234

    OK, so the bus output are analog, not digital - the y-axis is in volts. So the approach you need to take is exactly as I described before - use Measurements->Analog to Digital to convert the analog bits into a digital bus (with your chosen radix). Then you probably want to convert that back into a voltage so that you can perform a PSD on it.

    Here's an example of an A2D converter output which has been driven with a sine wave input.

    I took the 8 digital bus signals shown at the top, and converted them to a bus using the form like this:

    This gave the bus in the middle (below it is the expansion into the individual logic bits). If you zoom in, you'll see the numbers on the bus (note I picked. Unsigned Decimal because that's what my ADC would have produced, but the Radix can be signed Decimal too).

    The bottom curve (in both plots) was the result of selecting "mybus" and using Measurements->Digital to Analog and converting it back into an analog waveform. That means you've now got an analog-like signal from your original digital bus (which was in volts rather than logic) and you can then do whatever signal processing you like on that.

    Regards,

    Andrew.

    • 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