• 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. IEEE float radix in Simvision

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 65
  • Views 20004
  • 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

IEEE float radix in Simvision

yavuzselim
yavuzselim over 4 years ago

I want to view some signal values in floating-point format in the waveform window. I can easily change the radix to hex, decimal, binary or octal; but there is no option to change to float. How can I achieve this?

  • Cancel
Parents
  • StephenH
    StephenH over 4 years ago

    From the same context menu, you need to use the "Trace Type" option to set the signal as Analog Linear, or Analog Sample + Hold.

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

    You can see the original signal above. I can change the trace type to Analog Sample + Hold, Analog Linear gives an error. However, even if I change it to analog sample + hold, I still cannot view the signal value in floating-point format. What I see is below,

    What am I missing here? 

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

    Are you trying to view an element of an array? "mem[504]" suggests that's the case.

    I suspect SimVision can only convert simple vectors to analogue, and not arrays or array elements.

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

    That's right. "mem" is actually a 512 by 32-bit array. Thus, "mem[504]" is a 32-bit element. It's strange that SimVision cannot convert this directly to analogue. Is there a possible workaround for this?  

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

    Actually, I see that Analog Sample + Hold works for arrays of int and bit[31:0], at least for my setup.

    You might need to share some more details of your code to help us understand why it's not working for you.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • StephenH
    StephenH over 4 years ago in reply to yavuzselim

    Actually, I see that Analog Sample + Hold works for arrays of int and bit[31:0], at least for my setup.

    You might need to share some more details of your code to help us understand why it's not working for you.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • yavuzselim
    yavuzselim over 4 years ago in reply to StephenH

    Interesting... In my case, "mem" is defined as "reg [31:0] mem [0:511]". 

    "mem" is just the storage variable of an SRAM model. I do not know what else I should share, honestly. The image above shows the waveform to a greater extent. Analog sample + hold shows nothing useful. The value we see in the waveform is not even the correct floating-point value of the hex representation. I'm not sure if I should point out that I'm using Verilog, not SystemVerilog.

    Also, I see that in your waveform, the value of the signals are in decimal format, not floating-point format, even though your trace type is analog sample + hold.

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

    Ah, so what you missed is that you have an array of 32 words, each word is 512 bits. SimVision is still able to show a 512 bit word as an analogue value (I'm surprised but credit where credit is due).

    However there is no obvious conversion from a 512 bit integral value into a IEEE floating point number. If you know which of the 512 bits are the mantissa and which are the exponent, you could use the expression calculator to write a conversion function and see the results in the waveform...

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

    Oops, I just noticed that I mixed the order of the numbers in my previous comment. It should be correct now. In other words, word length is 32 bits, and there are 512 words. So it still makes no sense why SimVision cannot show the floating-point representation of a 32-bit value.

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

    How should a 32-bit int be represented as a 64-bit IEEE float? Slight smile I don't think there is a built-in definition for that so you would need to create a conversion expression for it.

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

    There is also a 32-bit IEEE float definition, i.e. the single precision floating-point, which is what I'm trying to get. I do not know why you assumed I wanted a 64-bit IEEE float. It's strange how difficult it is to do such a simple task in SimVision. I just want the waveform window to show me the floating-point value of a 32-bit signal. For instance, instead of " 'h479710af ", I want it to show " 77345.3671875 ". It shouldn't convert an integer to float, just show the floating-point representation of a 32-bit signal.

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

    I assumed 64 bit because "real" is 64 bit in SV and you're the first person to ask about 32 bit fp in the 16 years I've been supporting SimVision Smiley

    • 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