Quantcast
Channel: Cadence RF Design Forum
Viewing all articles
Browse latest Browse all 956

Passing string parameters into Verilog functional view

$
0
0

I want to pass a string parameter to a behavioural description.

In Spectre Veriloga, this works fine as follows:
  * in the veriloga view of 'block1', I include the line: parameter string string123 = "abcd";
  * in the schematic one level higher:  edit properties of 'block1' => set parameter 'string123' to 'StringParameter'
  * in the Spectre ADE viewEdit Variables => define a variable 'StringParameter' and set it to 'TheValueIWant'  (a text string without quotes).
  * As a result, variable 'StringParameter' is set to 'TheValueIWant' and this value is passed to parameter 'string123' of circuit 'block1'

As said, in spectre verilogA, this works fine.

But now, I want to do the same for a functional Verilog view in ams:
  * in the functional view of 'block1', I include line: parameter  string123 = "abcd";
  * in the schematic one level higher:  edit properties of 'block1' => set parameter 'string123' to 'StringParameter'
  * in the spectre ADE view: Edit Variables => define a variable 'StringParameter' and set it to 'TheValueIWant' (a text string without quotes).
 
Result: first, I get an error " undefined variable 'TheValueIWant' "
Then, I place the string 'TheValueIWant' between double quotes ("'TheValueIWant'")
But this does not work:  the parameter 'string123' gets the value 'StringParameter' (litterally, as a string) and not 'TheValueIWant'. 
In other words, the NAME of parameter 'string123' is passed to the Verilog description instead of its VALUE.


How can I solve this?

best regards,

Frank


Viewing all articles
Browse latest Browse all 956

Trending Articles