On Thu, 18 Jun 2009 07:14:58 -0700 (PDT), gabor wrote:
>I think the point is that his memory arrays cannot be
>directly used as module ports.
True; Verilog ports must be simple vectors.
>For simulation you could
>use direct hierarchy access to the memory, but for
>synthesis the only reasonable approach is to put all
>access to the memory array in the module where it is
>defined. Address and data bus ports to the memory
>can certainly be routed via module ports without any
>additional "resources and clock cycles" but the
>memories themselves cannot be directly accessed for
>synthesis from another module, since the RAM elements
>inferred would not allow this.
I agree with all of this, but I still don't get it.
If you have a memory block, then it can only be
accessed through its address and data signals,
whether or not it's in the same module. Passing
those address and data signals through ports of
the enclosing module costs nothing.
If a given module can access any and all locations
of a memory simultaneously, then that isn't a
memory (except in the Verilog LRM-jargon sense);
it's just a large collection of flip-flops. You
can easily gain access to that from another module,
simply by flattening the memory's contents to a
single big vector and passing said vector through
the module port. That's tiresome, but not difficult.
In summary, I agree with Gabor but I still don't
understand what the OP was asking.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
j[email protected]
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.