On Sun, 10 Aug 2008 13:42:55 +0100, "Symon" wrote:
>KJ,
>You miss the point.
Betcha he didn't *really* miss the point :-)
> How do I tell the synthesiser to ignore registers I'm
> not going to use?
even when you *do* use them, because all your writeable
registers are also readable? Well, I'd be tempted to
try to build a table of constants, indexed by register
address, specifying various interesting details of
each register. Better still, a table indexed by an
enum containing register *names*, so that each named
register's address can be specified separately.
A register's record in the table might contain, for example:
- a boolean to say whether it's implemented;
- is it writeable;
- which bits of it are populated.
Given such a table it's probably not too hard to write
a loop or maybe a generate-loop that creates the various
registers the way you want them (or, in sid's case,
don't want them).
I have always found the whole business of register-maps
a bit vexatious. Do you chuck all the registers into
one big 'orrible module, so that you can specify their
characteristics neatly in one place? That sounds nice,
until you realise that this module now has a bazillion
ports on it to carry the registers' contents to/from the
rest of the design. Or do you sprinkle the registers
around the design, so that you need only send the
common databus to each part of the design and the
physical I/O wiring is then localised to the place
where you need it? That sounds nice, until you note
that register addressing and configuration information
is then distributed across a slew of different design
files, and getting register readback organised nicely
is pretty tiresome too. Given that most
FPGA-sized
designs only have one set of registers for the whole
thing, a centralised package for the config information
and distributed registers all of which access that
package's (constant) data seems like a reasonable
compromise. But I've never sorted out a solution
that I really like and is truly general.
cheers
--
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
[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.