On Thu, 27 Dec 2007 09:19:22 -0800 (PST),
Ann <> wrote:
>Could you please explain what the following code does
[...]
>I dont understand the "Fetch Read Value" and the
> "HOST Register Write Process".
As Mike Shepherd said, it's Verilog so it will attract
better answers on comp.lang.verilog - but some of us
inhabit both, so here goes.
First, what part of it don't you understand? It looks
like pretty standard Verilog to me.
Secondly, the original author has gotten pretty confused
about parameterization and a few other things. In
particular:
(1) Why, in the middle of code that otherwise has been
carefully parameterized, do we find this condition as
the memory space selector?
(memRA[7] == HI)?
Maybe the number 7 has mystical significance in some
cultures; in mine, it doesn't. Give it a name.
(2) The write process is enabled by some complicated
condition; if that condition is false, we execute the
following code...
> else
> HOSTmemory[memWA[(REGLOG2DEPTH-1):0]] <=
> HOSTmemory[memWA[(REGLOG2DEPTH-1):0]];
Eh? Why is it *ever* a good idea to write "A <= A" ?
(3) Comments. The comments claim ...
>// HOST Memory Array (written via serial interface)
but it's fibbing, isn't it? Unless "memWD" is derived
from the serial interface somehow.
~~~~~~~~~~~~~
So, in summary:
a) take it to comp.lang.verilog;
b) be clearer about what you don't understand, please;
c) go back to the author and sanity-check the questions
I posed above.
thanks
--
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
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.