• 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 SKILL
  3. [SOLVED] Verilog-(AMS) PCell with variable bus width

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 5731
  • 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

[SOLVED] Verilog-(AMS) PCell with variable bus width

Stepahn Walter
Stepahn Walter over 10 years ago

Hi,
i tried to build a parameterized Verilog module to work in a mixed Signal environment.
The goal is to simulate a full custom analog block in a top down design flow. Therefore, single parts of the design have to be swappable between verilog, verilog-ams and transistors (schematic).  An important point is, that the resolution of the analog block is not fixed. Therefore, i require for example a binary-to-thermo verilog decoder with a variable width, as well as a verilog-ams current mirror, also with variable width.


I was able to realize some parts as skill pcell schematics&symbols, where i just instantiate the verilog (-ams) symbol inside a new schematic. For the problems mentioned above, this is not possible. Therefore i tried to just build a skill pcell symbol for the verilog(-ams) cells. 


Simplified example of the decoder:

module DECODER #(parameter  BITS=3)(

input wire CLK,

input wire [(BITS-1):0] binary, //variable input vector

output reg [(2**BITS-1):0] thermo_p, //differential output

output reg [(2**BITS-1):0] thermo_n

);

wire [(2**BITS-2):0] select_high = {(2**BITS-1){1'b1}};  //generate a bus with all bits high

wire [(2**BITS-2):0] temp_select_high; //store the new output

assign temp_select_high = select_high >> binary[(MB-1):0];

always @(posedge CLK) begin

       thermo_p <= temp_select_high;

       thermo_n <= ~temp_select_high;

end

endmodule

First i tried to build a pcell symbol through the help of the skill function pcHICompileToSkill() and modifications to the so generated template. The problem is, that the neither the symbol change, nor the verilog seems to change.

My reserach point me to the following postings:

Cannot pass parameters from virtuoso sch. into Verilog module

and

How to pass a value to a pre-processor macro in a VerilogA view from CDF ?

Therefore, i tried the CDF editor example.


I add 2 component parameters to the Base layer.

Name BITS hnlVerilogCDFdefparamList
Prompt BITS hnlVerilogCDFdefparamList
Type string string
Default Value 3 BITS
Display Condition artParameterInToolDisplay('BITS) t
Parse as CEL YES YES
Parse as Number YES NO

There are no Callbacks defined.


As far as i understand the solution, the symbol should now change, and also BITS should be passed to the verilog module, but nothing happen, when i change the value of hnlVerilogCDFdefparamList or BITS. I only recieve the following warning, when i change them

*WARNING* (DB-270000): dbReplaceInstParamList: Datatype for input parameter 'BITS' does not match the definition

I really tried to solve the problem, but i have only found the two above posts, and they are no help for me.

I can't believe, that it is impossible to include a verilog(-ams) file as symbol into a schematic with a variable port width, so that i can have multiple instances with different values.

As far i know, it is no problem in a digital flow to specify just the parameterized modules, and include the analog block as a black box. But i want to use the digital part inside a analog schematic/environment, because nearly everything is analog.

Tank you very much for your help.

  • Cancel
Parents
  • Stepahn Walter
    Stepahn Walter over 10 years ago

    I have also solved the last problem with the wire connection.


    It seems, that the netlister can only map the size of the default port width. So if we specify 4 as default, we can mal 1-4 correct, but noch 5-n


    Therefore, we just have to specify the default parameters so, that the port have maximal width. Then everything runs as it should.

    I hope this will help other people to develop PCells for the siimulation in Mixed Signal environments with BIG analog and only little digital parts, as well as during high level simulations.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Stepahn Walter
    Stepahn Walter over 10 years ago

    I have also solved the last problem with the wire connection.


    It seems, that the netlister can only map the size of the default port width. So if we specify 4 as default, we can mal 1-4 correct, but noch 5-n


    Therefore, we just have to specify the default parameters so, that the port have maximal width. Then everything runs as it should.

    I hope this will help other people to develop PCells for the siimulation in Mixed Signal environments with BIG analog and only little digital parts, as well as during high level simulations.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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