• 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. How to write a calculator function working in Assembler...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 7808
  • 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

How to write a calculator function working in Assembler that will operate on all bits of a bus

alexstepanov75
alexstepanov75 over 2 years ago

I already tried to ask this question without success here

I will try my luck once more Slight smile

The problem is as follows:
After the transient simulation, I have a bus signal like VT("/a<4:0>").
For simplicity let's say I want to get sum of waveforms of all bits of the bus VT("/a<0>")+VT("/a<1>")... and add some offset
So I want to write a calculator function that takes the bus as an argument and returns a waveform that is a sum of bits plus offset (for example)
sum=mybussumwith offset(VT("/a<4:0>") offset)

The problem is that data structure of second argument and first as passed to the function in Assembler (when I do RMB click and plot) not the same

For example

First argument (bus):

"bit" "/sine<0>"
"modelFiles" "mos_moscap.scs:ss,mom.scs:tt,bip_dio.scs:tt,res_disres.scs:tt,r_metal.scs:tt,pre_simu.scs,pdkplus.scs,extraction_corners.scs:cdl"
"temperature" 0.0
"vdda" 0.79
wave
"modelFiles" "mos_moscap.scs:tt,mom.scs:tt,bip_dio.scs:tt,res_disres.scs:tt,r_metal.scs:tt,pre_simu.scs,pdkplus.scs,extraction_corners.scs:cdl"
"temperature" 60.0
"vdda" 0.75
wave


Second argument:

"modelFiles" "mos_moscap.scs:ss,mom.scs:tt,bip_dio.scs:tt,res_disres.scs:tt,r_metal.scs:tt,pre_simu.scs,pdkplus.scs,extraction_corners.scs:cdl"
"temperature" 0.0
wave
"modelFiles" "mos_moscap.scs:tt,mom.scs:tt,bip_dio.scs:tt,res_disres.scs:tt,r_metal.scs:tt,pre_simu.scs,pdkplus.scs,extraction_corners.scs:cdl"
"temperature" 60.0
wave

I would expect same structure with bus bit sweep at the bottom. In this case it would be possible to use famMap. But for bus, the bit sweep is at the top, so famMap will not work (or I can't see how to use it properly).

I would like very much to see an example of code that can do what I explained above.

Thank you in advance.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    The code in article 20503621 may help you. Not necessarily the code itself, but you can see a strategy I used to deal with doing something over the bit dimension; in that article I needed to change the index to be.a number so that you could do some operation on waveforms with two different but equally sized buses; you could potentially do something else as you iterate across the bus members.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • alexstepanov75
    alexstepanov75 over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks for replay. Unfortunately the article you pointed to not really helps, or I can't see how to use this in my case.

    I understand how to go over bits of the bus and I can create measurement that works just fine in calculator, but not in Assembler

    In Assembler (after PVT simulation) bus is multilevel sweep structure with bit sweep on the top. For each bit I need to traverse all sweeps. This is also not a problem using famMap  or recursive function. The problem is that I need to get waveforms of all bits at the same level of recursion, and then return same multilevel sweep, and I am currently don't see how to achieve this. Not sure I explained this good :(

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to alexstepanov75

    Alex,

    I'll aim to put together an example of (say) summing the bits. You may need to give me a few days though (I'm catching up after vacation).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • alexstepanov75
    alexstepanov75 over 2 years ago in reply to Andrew Beckett

    Would be excellent! Thank you.

    • 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