• 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. how to pass array of parameters through CDF down to a verilogA...

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 127
  • Views 22720
  • 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 to pass array of parameters through CDF down to a verilogA code?

naderi
naderi over 13 years ago

 Hello all,

 Is there any way to pass an array of parameters down to a verilogA code?

if I put following statement in a verilogA sub-circuit.

parameter real vdc[3:0] ={0,0,1,0};

Then {0, 0, 1, 0} appears in CDF parameters for vdc. However, spectre complains later during circuit read-in.The error message is :

 Error found by spectre during circuit read-in.
    ERROR (SFE-874): "input.scs" 1087: Unexpected block statement "{".

I realized if I enter the parameters within double-qoute as "{0, 0, 1, 0}" at CDF, then spectre will be happy and goes for simulation, but the results are incorrect.

 

I wonder if there is any solution?

Thanks,

Ali

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Ali,

    Make the value in the CDF "[0 0 1 0]". It needs to be netlisted with spectre's vector syntax, rather than the VerilogA vector syntax.

    I just tried this, and it works fine.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • naderi
    naderi over 13 years ago

     Hi Andrew,

    Thanks for reply.

    Here is my verilogA code. When I enter "[0 0 1 0]" (as you sugessted) spectre complains about the missing comma between values.

    Giving  "[0, 0, 1, 0]" passes the compiler and then transient simulation shows wrong values for the output voltages as [ 589.3E6,  9.223E-297, 0.0, 0.0] .

    I tried it on IC6.1.4-64b.500.9 ,"v2009.4_23.21"

    Regards,

    Ali

    `include "constants.vams"
    `include "disciplines.vams"
    `define LENGTH 4

    module vbus(A);
    output [`LENGTH-1:0] A;
    voltage [`LENGTH-1:0] A;

    parameter real vdc[`LENGTH-1:0] =[0, 0, 0, 0];

    analog
    begin
            generate i (`LENGTH-1,0)
            begin
                    V(A[i]) <+ vdc[i] ;
            end
    end

    endmodule

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Ali,

    You misunderstood. The VerilogA code needs to use {0,0,1,0} syntax, but in the CDF you'll need to define the default as [0 0 1 0] (no commas, although commas are tolerated at the moment - but you get a warning about them not being supported in the future). Also, when you instantiate the block, with a different value, you'd need to specify it with square brackets. To illustrate what I mean, here's some VerilogA:

     `include "disciplines.vams"

    module blah (op,ip);

    output op;
    input ip;
    electrical op,ip;

    parameter real vdc[3:0]={0,0,1,0};

    analog begin

       V(op) <+ vdc[2]*V(ip);

    end

    endmodule

    and here's the corresponding spectre netlist:

     //

    I1 (o1 i1) blah vdc=[2 2 2 2]

    v1 (i1 0) vsource type=sine freq=1M ampl=1

    ahdl_include "blah.va"
    tran tran stop=2u

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • naderi
    naderi over 13 years ago

     Awesome, Worked just fine.

    Thanks,

    Ali

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kawan
    kawan over 11 years ago

     Andrew,

    I ran into the same problem and I tried out your solution. It did not work and I wonder if the solution is now different with cadence 6.1.5 ?

     // VerilogA for zakir_sim1, bb_prereg_ldo, veriloga

    `include "constants.vams"
    `include "disciplines.vams"

    module trim3bits(sel);
    output [2:0] sel;
    electrical [2:0] sel;

    parameter real trim[2:0] ={0,0,0};

    analog begin

    V(sel[2]) <+ trim[2]*1.1;
    V(sel[1]) <+ trim[1]*1.1;
    V(sel[0]) <+ trim[0]*1.1;

    end

    endmodule p, li { white-space: pre-wrap; }

    Begin Incremental Netlisting Oct 8 16:44:23 2013

    "ERROR (OSSHNL-524): Netlisting failed as function hnlNetNameOnTerm was called with a non-existent terminal name on current instance 'I6' in design 'zakir_sim1/test1/schematic'. Ensure that argument to this function is a valid terminal name and netlist again.\n\n"

    "ERROR (OSSHNL-524): Netlisting failed as function hnlNetNameOnTerm was called with a non-existent terminal name on current instance 'I6' in design 'zakir_sim1/test1/schematic'. Ensure that argument to this function is a valid terminal name and netlist again.\n\n"

    "ERROR (OSSHNL-524): Netlisting failed as function hnlNetNameOnTerm was called with a non-existent terminal name on current instance 'I6' in design 'zakir_sim1/test1/schematic'. Ensure that argument to this function is a valid terminal name and netlist again.\n\n"

    "ERROR (OSSHNL-524): Netlisting failed as function hnlNetNameOnTerm was called with a non-existent terminal name on current instance 'I6' in design 'zakir_sim1/test1/schematic'. Ensure that argument to this function is a valid terminal name and netlist again.\n\n"

    "ERROR (OSSHNL-524): Netlisting failed as function hnlNetNameOnTerm was called with a non-existent terminal name on current instance 'I6' in design 'zakir_sim1/test1/schematic'. Ensure that argument to this function is a valid terminal name and netlist again.\n\n"

    End netlisting Oct 8 16:44:23 2013

    ERROR (OSSHNL-514): Netlisting failed due to errors reported before. Netlist may be corrupt or may not be produced at all. Fix reported errors and netlist again.

    ...unsuccessful.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    That looks as if there's a mismatch between the pins on the symbol and the pins on the veriloga view. Or there's something wrong with the CDF.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Narasimhan90
    Narasimhan90 over 10 years ago

    The above solution works when we actually pass parameters since the default parameters {1,2,3,4} are overridden by the passed parameters [1 2 3 4]. Generally I do not override parameters if I want to use the defaults. But due to this syntax problem I have to always pass parameters for the simulation to work.

    Is there a fix planed(to sync syntax of veriloga with spectre or viceversa)?

    Thanks and have a Wonderful day,

    Narasimhan Rajagopal

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Narasimhan,

    There's not a need for spectre and veriloga to be aligned in terms of syntax, but there is a CCR for this to be handled correctly in the CDF - CCR 1094193. However, there is no plan to fix this - maybe that would change if more people asked for this via customer support.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SimhanAnalog
    SimhanAnalog over 9 years ago

    Thanks Andrew. I will notify this to our EDA team. They will take it up with Cadence support on a priority basis.

    Narasimhan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • nouning
    nouning over 6 years ago in reply to Andrew Beckett

    hi Andrew, I am facing the same issue: "ERROR (SFE-874): "input.scs" 1087: Unexpected block statement "{"." Has this issue been resolved yet? Can Spectre now handle VerilogA arrays such as {1,2,3,4}. Thank you.

    • 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