Re: Why is type for string parameters mandatory?

From: Dave Miller <David.L.Miller_at_.....>
Date: Wed Nov 15 2006 - 06:00:30 PST
Okay so Shalom's comment that parameter myParam = "abc" declares a 24bit 
vector makes sense as to why it works in digital. I just looked at it as 
they have allowed string parameters without declaring the type which was 
not quite right.

Digital explicitly disallows me to declare a string parameter as:
parameter string myParam = "abc";

Analog currently explicitly disallows me to declare a string parameter as:
parameter myParam = "abc";

Because parameters are at module scope and hence domain less (well thats 
how I look at them) this creates some conflict if I happen to want to 
use the same parameter in both domains.
The biggest use I am seeing for string parameters today in my work is in 
test benches where they are being used for error messages and to store 
the filename of a file to be used in a $fopen() statement.

Dave

Marq Kole wrote:
>
> Dave,
>
> Do these digital simulators use these string parameters as we do, or 
> can they assign these string parameters as default values to string 
> registers?
>
> As far as I can tell in AMS you can only compare string parameters 
> against string constants or other string parameters, or use them as a 
> string argument in display tasks. No connection is made between the 
> string parameters in AMS and the string registers in 1364-2005.
>
> Does SystemVerilog have (extended) support for string parameters?
>
> Cheers,
> Marq
>
>
> Marq Kole
> Competence Leader Robust Design
>
> Research
> NXP Semiconductors
>
>
>
>
>
>
>
>
> *Dave Miller <David.L.Miller@freescale.com>*
>
> Sent by:
> owner-verilog-ams@server.eda.org
>
> 14-11-2006 18:22
>
> 	
> To
> 	Verilog-AMS LRM Committee <verilog-ams@server.eda.org>
> cc
> 	
> Subject
> 	Why is type for string parameters mandatory?
> Classification
> 	
>
>
>
> 	
>
>
>
>
>
> Hi all,
> I am just wondering why do we explicitly say that the type specification
> for a string parameter is mandatory?
> Why can't we allow the type to be derived based upon the default
> expression.
> Do you think we could remove this restriction in 3.2.1 and just mention
> that if no type is specified and the parameter is assigned a default
> value of a string, then the type of the parameter will be string and it
> will be an error if the parameter is overridden with any numerical value.
> This is causing me some problems at the moment as some digital
> simulators that I am using allow string parameters to be defined without
> the type. In fact if I understand digital correctly (2005) you can't
> actually have a string parameter (only string registers) but that is a
> separate issue.
>
> Dave
>
> -- 
> =====================================
> -- David Miller
> -- Design Technology (Austin)
> -- Freescale Semiconductor
> -- Ph : 512 996-7377 Fax: x7755
> =====================================
>
>


-- 
=====================================
-- David Miller
-- Design Technology (Austin)
-- Freescale Semiconductor
-- Ph : 512 996-7377 Fax: x7755
=====================================
Received on Wed Nov 15 06:00:35 2006

This archive was generated by hypermail 2.1.8 : Wed Nov 15 2006 - 06:00:37 PST