To my understanding, H.R.'s are a synthesis off construct, and
are simply ignored by DC. Really, H.R.'s are like the little red
wires you see on the prototype board: extremely useful for bringing up
a new system, but not intended for use in production.
One can use a reserve_name argument for a signal in a block to
be synthesized, so that you have a prayer of referencing that same net
from your test bench after synthesis.
>
> On the other hand, it would be a step forward, in my opinion, to support
> hierarchical names for parameters, tasks and functions, so that one
> could use the Verilog module in the same way as a VHDL package, i.e. to
> structure the global name space. This would allow a more structured way
> of sharing common declarations than either of the two commonly used
> alternatives: `define or `include.
I disagree. For parameters, one should use the defparam, or
even better, the module instantce parameter define:
dff #(8) dff_1 (Q, Q_, D, CLK);
This puts the knowledge of the size of the instanced flip flop
right where is belongs; also, this is already supported by synthesis
tools.
For tasks and fuctions, I agree the H.R.'s would be useful,
but I would restrict the usage to a particular paradigm:
Note, of course, that you can already use them quite nicely to
structure the global name space. Put the task or function that you
want to share in a module by itself. Then instance that module where
you'd like a copy. Refer to the task or function using a downward
hierarchal reference when you want to execute the code.
This lets you have one source of the task or function
definition, (as is the case with `include) for good software
engineering, and also control exactly how many times the logic is
implemented: You want three ohysical copies, and have five users, you
can build that, by instantiating the module three times, and coding
each place of use to refere to the correct copy. (and do any resource
sharing logic, if needed)
>
> --
> John Aynsley
> DOULOS
> Church Hatch, 22 Market Place, Ringwood, Hampshire BH24 1AW, United Kingdom
> Tel: +44 1425 471223 Email: john@doulos.com
> Fax: +44 1425 471573 Web: http://www.doulos.com