• 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. Mixed-Signal Design
  3. How to instantiate module ports by name when port bus defined...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 64
  • Views 3012
  • 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 instantiate module ports by name when port bus defined individually - VerilogAMS

SimhanAnalog
SimhanAnalog over 9 years ago

We are trying to instantiate a schematic in a top level verilogams test bench. The netlist of the schematic that ADE generates using AMS-UNL netlister looks slightly weird as given below

module abc(a,b,{c[2],c[1]},d);

input [2:1] a;

input [1:2] b;

input [1:2] c;

output d;

I am not sure why port c alone is defined as {c[2],c[1]} instead of simply c. What could be the reason?

When I try to instantiate this module in a top level ams testbench I am not sure how to pass values to port c by name.

I tried

abc    I_abc (.a(x1), .b(x1), .c(x3), .d(y)); and

abc    I_abc (.a(x1), .b(x1), .{c[2],c[1]}(x3), .d(y));

Is there a way to make this work?

We copied the netlist and manually replaced {c[2],c[1]} with c and saved it as a verilogams and used it instead of schematic and it works.

Also I observed that the netlister issues several warnings of the kind "port uses both ascending and descending ranges.

The bus will be declared with a 'ascending' range as specified by the skill

flag 'hnlSetBusDirectionDescending'."

I used to get these warnings in previous designs as well but the netlist never had this issue.

In the .simrc file I added the line  hnlSetBusDirectionDescending = t

Now the netlist comes out correctly as c instead of {c[2],c[1]} and the instantiation works. But I am not sure if this flag will break something else.


So here are my questions summarized.

1. How to pass ports when the port in the module is defined as {c[2],c[1]} ?

2. Why does the port gets defined as {c[2],c[1]} when other ports are correct ?

3. What are the potential side effects of the flag hnlSetBusDirectionDescending = t ?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago
    I think I'd need to see the schematic.
    • 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