paramsets and module terminals

From: Marq Kole <marq.kole_at_.....>
Date: Mon Dec 04 2006 - 03:59:16 PST

All,

With respect to the very open relation between a paramset and the module it is associated with: can I use parameter overloading for different modules that also have different numbers of terminals:

paramset nmos nmos_with_bulk
parameter integer has_bulk_node = 1 from [0:1] exclude [0:1);
parameter real l;
parameter real w;
.l = l;
.w = w;
endparamset

paramset nmos nmos_without_bulk

parameter integer has_bulk_node = 0 from [0:1] exclude (0:1];
parameter real l;
parameter real w;
.l = l;
.w = w;
endparamset

module nmos_with_bulk (d, g, s, b);
...
endmodule

module nmos_without_bulk (d, g, s);

...
endmodule

Unfortunately, I cannot initialize the value has_bulk_node with the $port_connected() hierarchy detection function, as the paramset does not know about the terminals of the associated module. But the has_bulk_node can be initialized from the netlister so that shouldn't be a showstopper.
The advantage of the paramset over a selecting module is that it does not add a level of hierarchy, whereas a conditional generate block inside a selecting module does (it adds 2!)

Marq Kole
Competence Leader Robust Design

Research
NXP Semiconductors
Tel: +31 40 27 49051, Fax: +31 40 27 44700, Mobile: +31 6 387 48 389
High Tech Campus 48 p.2.039, 5656 AE Eindhoven, The Netherlands
marq.kole@nxp.com, www.nxp.com
Received on Mon Dec 4 04:03:30 2006

This archive was generated by hypermail 2.1.8 : Mon Dec 04 2006 - 04:03:34 PST