• 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. RF Design
  3. Hidden States and SpectreRF: Is there a safe way to read...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 63
  • Views 15983
  • 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

Hidden States and SpectreRF: Is there a safe way to read DC values from file?

bmar
bmar over 9 years ago


Beating my head with this problem for some time now.  Any help would be appreciated.

In our top-level test bench we have 84 8-bit registers that we need to set to get the whole thing to start up in a defined state.  These are mostly just trim settings, etc (so they don't change during the simulation).  Originally we used 84 ADE variables and multibits, but these are a huge pain to set (especially because they have to be in base-10 inside ADE).

We already have a text file with all the register settings as hex values.  It would really be best if we could just read this text file in at simulation time.  Ok, here is the catch....I want to use SpectreRF in this simulation.

Here is what I tried:  I don't need AMS (these are just DC values).  So I wrote a verilog-a model instead.  I used $fscanf to read the value into an integer at in @(initial_step).  I then use integer division and modulus to decompose it into a bunch of bits (each bit is of type integer).  I then just assign these with a contribution operator to each of the electrical outputs.  (1 = 1V, 0=0V)  The solution worked great....but...

The problem with this implementation is that there are hidden states.  Clearly I read the file only once at initial_step and so the variables hold this state (=hidden state).  Perhaps I could call $fscanf every time step, but that sounds like a bad solution (slow?).

Any ideas anyone?

Thanks in advance!

  • Cancel
Parents
  • bmar
    bmar over 9 years ago

    Thanks Tawna,


    The article 11187476 had the solution, as also mentioned by Andrew (using * instrument_module *) .  I appreciate the quick reply.

    Ben

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • bmar
    bmar over 9 years ago

    Thanks Tawna,


    The article 11187476 had the solution, as also mentioned by Andrew (using * instrument_module *) .  I appreciate the quick reply.

    Ben

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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