• 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. How do I port a signal (reference data) from testbench to...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 13945
  • 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 do I port a signal (reference data) from testbench to RTL module?

Ncsim User 1
Ncsim User 1 over 7 years ago

I run some encryption logic and wish to mirror some reference data from testbench to RTL module, 

exactly the opposite compared to what one would normally do to mirror existing singals from RTL to TB. 

The signal doesn't exist in RTL, I want to use TB to generate a singal in RTL and mirror values to it. 

Can that be done in ncsim or irun? 

  • Cancel
  • StephenH
    StephenH over 7 years ago

    I don't really understand the intention here; if the signal doesn't already exist in the design, what's the point of creating a new signal with no connections inside the RTL?

    If you really want to do this, perhaps the easiest way is to use a PSL vunit declaration, which in effect adds code in-line to the target module. Assuming that the module you want to add the signal to is called "target_mod", and the signal you want to create is "tb_data" (replace with your own names)... Create a file called target_mod.psl with the following content:

    vunit (target_mod) {
      logic [31:0] tb_data;
    }

    Now, pass this to the compile + elab irun command using the option "-propfile_vlog target_mod.psl".

    You can then use a traditional Verilog OOMR (out of module reference) or $nc_mirror() to reflect the TB signal into the RTL.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ncsim User 1
    Ncsim User 1 over 7 years ago in reply to StephenH

    Thank you that seems working. 

    • 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