The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 12:39pm
Pages: 1
Send Topic Print
strobing data to a file using Verilog-A (parameterizing the file) (Read 4007 times)
vivkr
Community Fellow
*****
Offline



Posts: 780

strobing data to a file using Verilog-A (parameterizing the file)
Jan 20th, 2009, 3:48am
 
Hi All,

I see the forum is for Verilog-AMS but I hope that Verilog-A questions are also relevant here.

I am trying to use a Verilog-A block to strobe out some signals to a file. I would like to be able to define the destination file when I instantiate the Verilog-A strobe block, and not have it hard-coded. How can I do this?

I tried to define the filename as a string parameter

parameter string myoutfile

But this gives me a syntax error. The compiler says that this is not allowed without specifying why. With spectreHDL, this was never an issue, but the simulator I am using does not support it and I need to write the function in Verilog-A.

I would be glad to have any tips.

Thanks,

Vivek
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: strobing data to a file using Verilog-A (parameterizing the file)
Reply #1 - Jan 20th, 2009, 7:37am
 
string parameters were added in LRM2.2, and some simulators haven't fully implemented that LRM, never mind that it was approved in 2004 and LRM 2.3 is now available.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: strobing data to a file using Verilog-A (parameterizing the file)
Reply #2 - Jan 20th, 2009, 7:48am
 
With VerilogA in spectre, this is supported - although  you have to miss out the keyword "string":

Code:
 parameter data_file = "random_static"; 



There's a CCR 352942 asking for full support based on the LRM. Please contact Cadence customer support and ask them to file a CCR as a duplicate of this - the more this gets asked for, the higher priority it will get.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: strobing data to a file using Verilog-A (parameterizing the file)
Reply #3 - Jan 22nd, 2009, 1:05am
 
Dear Andrew,

Thanks a lot. That solves my problem nicely.

Regards,

Vivek
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.