On 13 Oct 2006 04:15:35 -0700,
wrote:
>Where Modelsim can happily resolve the difference between "+" based on
>whether the argument is "signed" or "sfixed,"
yes
> these are actually
>subtypes based on the same "array of std_ulogic" type.
urrm, I don't think so... they are completely different named types;
they are, indeed, both arrays of std_logic (not std_ulogic, I think)
but because they have different *type* names, the overloads
are resolvable. That's the reason why, for example, you can
have different ">" operators for numeric_std.signed and
numeric_std.unsigned, both of which are arrays of std_logic.
> The standard
>doesn't allow resolution based on subtypes
This is true, but as I hope I've explained above, it's not the
problem here.
I'm not sure what the situation is right now, but I'm fairly sure you
will find that the problem relates to the negative subscripts that the
IEEE fixed-point packages permit. Simulators are fine with negative
subscripts, but I don't think ISE accepts them yet - although, of
course, the VHDL-2006 people are working hard to get synthesis
tool vendors to accept them. When I did my own effort at
fixed-point (now completely superseded by the VHDL-2006 version)
I used a subscript offset scheme so that I didn't need to use
negative subscripts - I chose subscript=100 for the units bit,
so subscript 99 was the "half" bit and so on.
Another issue is that the packages can occasionally create
objects with a null range, such as sfixed(0 downto 1). Again
this is perfectly legal VHDL, but synthesis tools tend to object.
It would be great if someone could do a definitive survey
of which synthesis tools are currently OK with negative
subscripts and null ranges.
--
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.