The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 19th, 2024, 12:17am
Pages: 1
Send Topic Print
Parametrized busses in Verilog-A (Read 1514 times)
radius2
New Member
*
Offline



Posts: 9

Parametrized busses in Verilog-A
Oct 04th, 2012, 10:41am
 
Hi

I'm trying to create an instance with a parametrized bus
in Verilog-A i. e. when I instantiate it in a schematic in cadence,
then there should be a parameter to determine the size of
the bus by clicking on the instance and pressing Q. The idea is to avoid creating several instances with the same functionality but with different
bus sizes. However, I'm wondering if this is possible. What would
happend with the bus pin when the symbol is created?

I've come across a few ways that give some clues for example:

module adc(out, in, clk);
.    
.
parameter integer bits = 8;      // resolution (bits)
.
.
output [0:bits-1] out;
electrical [0:bits-1] out;

This however generated the following error:
"Encountered missmatch in size of formal and actual for out,
make sure the size of formal and actual match"

Another example I found, used the line `define bits 8
before the line module adc(out, in, clk);, instead of defining
bits as a parameter. However this doesn't
include the possibility to change the bus size when putting the instance
in the schematic.

So before I discard the idea completely I wanted to ask here if
this is possible to do.
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Parametrized busses in Verilog-A
Reply #1 - Oct 5th, 2012, 5:44am
 
radius2,

Verilog-A should allow parameterized bus widths for ports and signals.

However, the Cadence Verilog-A implementation does not seem to support this: According to Cadence Verilog-A reference v11.1 (Sept 2011), "parameter-sized ports" are not supported by their implementation.

- B O E
Back to top
 
 
View Profile   IP Logged
radius2
New Member
*
Offline



Posts: 9

Re: Parametrized busses in Verilog-A
Reply #2 - Oct 5th, 2012, 7:49am
 
Ok good to know. Thanks for your reply.
I'll go on creating instances with different number
of bits instead.
Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Parametrized busses in Verilog-A
Reply #3 - Oct 8th, 2012, 1:15am
 
You might want to check if you can adapt the approach using symbol and schematic pcells which was used for the bussetp component for your purposes (see http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNu...).
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.