• 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. Defining Verilog-A vector in the maestro view

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 8053
  • 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

Defining Verilog-A vector in the maestro view

TomVilla
TomVilla over 2 years ago

Hi all, 

I've been assigned the task of replacing vectors defined in Verilog-A code with parameters. The aim is for these vectors to be used as inputs in the Maestro. To give you some context, here's the current method the vectors are defined:
integer name_vac1[1:1024]={99,101......,}
integer name_vac2[1:1024]={2,23,44......,}

I've considered two potential solutions:
 Using Parameter Arrays: I thought about defining the array as parameter real name_vac1[1:1024] and equating it to a parameter that I'd override in the Maestro:
parameter override_param1 = 1
parameter real  name_vac1[1:1024]=override_param1

parameter override_param2 = 1
parameter real  name_vac2[1:1024]=override_param2  

However, I found that while defining the array, I need to use {} or else I face a syntax error. Another challenge I encountered is that Maestro's design variable seems to accept only scalars and not vectors. Even when I tried bringing these variables into Maestro, it doesn't recognize the vector parameters. I've discovered a workaround by inputting the vectors outside the Verilog-A code within my Testbench, but this doesn't align with my assignment's objective.

Using Strings: Another approach I considered was accepting the input vector as a string and converting it to integers within my Verilog-A code. However, this method seems more complex, and I'd require access to specific string functions or libraries that have functions like strget, strsearch, strtoreal, etc.

I'd truly appreciate any guidance or insights you can provide. Thank you in advance for your time and consideration.

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    First of all, you asked this originally in the Feedback, Suggestions and Questions forum which is for issues with the forums, not for technical topics. So I moved this to an appropriate forum.

    Please see this article: How to convert design variables which are spectre vectors to work with Explorer/Assembler

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    First of all, you asked this originally in the Feedback, Suggestions and Questions forum which is for issues with the forums, not for technical topics. So I moved this to an appropriate forum.

    Please see this article: How to convert design variables which are spectre vectors to work with Explorer/Assembler

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • TomVilla
    TomVilla over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your prompt response. I'd like to clarify my query further. I need to input the specter vectors into the maestro simulation. Can you guide me on where exactly I should enter these vectors? Should they be placed in the design variables or in the parameter section? Additionally, do the three functions suggested in the article allow me the option to input the vector/string vector into maestro? If there's a way to override this in the maestro, that would be an ideal solution. If you could provide an example, it would be even more helpful. I appreciate your assistance.

    Kind Regards,
    Tom.

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

    Hi Tom,

    The code mentioned in that article was primarily to deal with the fact that in ADE L you could just enter the design variable value as [1 2 3 4] for example, but that doesn't work in ADE Explorer - the code would convert them into a syntax that works in ADE L. I pointed you to the article as it explained the workaround of using strcat - more detail below.

    If (for example) you have a Verilog-A module that looks like this:

    // VerilogA for mylib, vectorBlock, veriloga
    
    `include "constants.vams"
    `include "disciplines.vams"
    
    module vectorBlock(op,ip);
    output op;
    input ip;
    electrical op,ip;
    parameter real num[3:0]={1,0,0,0};
    parameter real den[3:0]={1,0,0,1};
    
    analog begin
      $strobe("num: ",num[3],num[2],num[1],num[0]);
      $strobe("den: ",den[3],den[2],den[1],den[0]);
      V(op) <+ laplace_nd(V(ip),num,den);
    end
    
    endmodule
    

    Then I might place an instance of this and set (on the instance):

    num: mynum
    den: myden

    Then create two design variables in ADE Explorer:

    mynum: strcat("[1 2 3 4]")
    myden: strcat("[5 6 7 8]")

    The strcat stuff is just a SKILL function to eventually produce [1 2 3 4] for the netlist. You might think "why can't I just put [1 2 3 4] - well, ADE Explorer doesn't see this as Spectre syntax and so it tries to evaluate it as SKILL (which is illegal). Surrounding with quotes alone isn't enough as otherwise ADE will just pass it as a string parameter to spectre (rather than a vector).

    The resulting spectre netlist when you simulate it would be:

    // Point Netlist Generated on: Sep 10 16:23:10 2023
    // Generated for: spectre
    // Design Netlist Generated on: Sep 10 16:23:10 2023
    // Design library name: mylib
    // Design cell name: testit
    // Design view name: schematic
    simulator lang=spectre
    global 0
    parameters temperature=27 mynum=[1 2 3 4] myden=[5 6 7 8]
    
    // Library name: mylib
    // Cell name: testit
    // View name: schematic
    R1 (b 0) resistor r=1K
    R0 (a 0) resistor r=1K
    V0 (a 0) vsource dc=1 type=dc
    I1 (b a) vectorBlock num=mynum den=myden
    simulatorOptions options psfversion="1.4.0" reltol=1e-3 vabstol=1e-6 \
        iabstol=1e-12 temp=27 tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 \
        maxnotes=5 maxwarns=5 digits=5 cols=80 pivrel=1e-3 \
        sensfile="../psf/sens.output" checklimitdest=psf 
    dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
    dcOpInfo info what=oppoint where=rawfile
    saveOptions options save=allpub
    ahdl_include "/export/home/forumuser/mylib/vectorBlock/veriloga/veriloga.va"

    This will pass through the vectors to the Verilog-A model. The numbers themselves are nonsense in this case, but it's to show the principle.

    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