Re: Verilog: ROMRAM Revision 2


Subject: Re: Verilog: ROMRAM Revision 2
From: VhdlCohen@aol.com
Date: Sat Oct 06 2001 - 10:14:40 PDT


You'll notice that I added the satement:
"Constant register assignments shall be allowedin procedural blocks (e.g,
always, initial) and variable declarationswithin tasks and functions". This
is because I see no reason why ROMs could not be inferred in functions or in
always blocks, not just initial blocks. For example, I could write a
sin_of_x function where within the function, I could define a ROM or a set of
constants. I could also have regs initialized at declaration within those
procedural blocks. I am not sure how to handle the $readmemb or $readmemh.
I required that it has to be within an INITIAL block. But I am having second
thought on that. For exmaple, it would be nice if the $readmemXX be
supported in functions (e.g., function log_of_x). But having the declaration
with an always block sensitive to a clock is awkward.
Opinions?
Ben

----------------------------------------------------------------------------
Ben Cohen Publisher, Trainer, Consultant (310) 721-4830
<A HREF="http://www.vhdlcohen.com/">http://www.vhdlcohen.com/> vhdlcohen@aol.com
Author of following textbooks:
* Component Design by Example ", 2001 isbn 0-9705394-0-1
* VHDL Coding Styles and Methodologies, 2nd Edition, 1999 isbn 0-7923-8474-1
* VHDL Answers to Frequently Asked Questions, 2nd Edition, isbn 0-7923-8115
------------------------------------------------------------------------------



This archive was generated by hypermail 2b28 : Sat Oct 06 2001 - 10:20:03 PDT