• 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 Design
  3. passing a string type parameter to veriloga through schematic...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 7855
  • 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

passing a string type parameter to veriloga through schematic based design

ZJWDJ
ZJWDJ over 2 years ago

hello experts, 

please share some clue:

I would like to pass a file name to my veriloga code so it can dump to different log files as needed. but somehow the cdf parameter taking the intended variable itself as the string name instead parsing it as an variable. here's how I did:

1) declare string parameter in veriloga model and use it : 

    parameter string CALDAC1_LOG="CALDAC1.dat";

    ....

    fd1 = $fopen(CALDAC1_LOG  , "a");

2) instantiate that veriloga block and put variable name there. 

    

3) from ocean, define this variable by desVar:

       desVar(  "CALDAC1_LOG"  "XXX.dat") 

BUT, instead an "XXX.dat" file being written, it gets a file called "CALDAC1_LOG". 

how can I make it right?

P.S. I have no problem passing integar or real numbers through by this way. Also I've tried this CALDAC1_LOG parameter " parse As CEL" true or false in CDF editor too.  

thanks a lot,

David

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    David,

    It might not be obvious, but also setting parseAsNumber=yes should solve this (as well as parseAsCEL=yes). See How to use VerilogA string parameter as a design variable in ADE

    Regards,

    Andrew

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

    indeed, didn't think about that, thanks 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