T
Tim Hubberstey
Guest
Andy Peters wrote:
code *is* correct, just outdated.
You should forward your post to Xilinx; maybe something will happen.
I don't know if we'll ever get rid of std_logic_unsigned and
std_logic_signed. There are too many designers around that prefer the
convenience of not having to deal with type conversions (BTW: I'm not
one of them).
What _might_ speed the demise of these libraries would be a utility to
automatically convert std_logic_arith, std_logic_unsigned, or
std_logic_signed code into numeric_std code. Without having done an in
depth analysis, I think it should be fairly simple. Then all that legacy
code using the old libraries could be (relatively) painlessly recovered.
(clk'event and clk=1) for non-synthesized code. Changing over without
careful checking could result in "interesting" behavior in test benches.
--
Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com
They won't do anything unless they hear the complaints. After all, thecharles.el...@wpafb.af.mil wrote:
Below is my version of your code. I don't use IEEE.STD_LOGIC_ARITH
because it is not really an ieee standard. Instead I have used
ieee.numeric_std and used the type unsigned for count_up.
Ya know, it's funny. I just installed Xilinx' ISE 7.1 and I was
"thumbing" through the XST manual looking to see how certain things are
inferred.
The example code to infer an "Unsigned 8-bit Adder" (page 105) uses the
old Synopsys std_logic_arith and std_logic_unsigned libraries. In
fact, all of the examples use these libraries!
Maybe these libraries would shrivel up and die if the tools vendors
stopped using them in examples.
code *is* correct, just outdated.
You should forward your post to Xilinx; maybe something will happen.
I don't know if we'll ever get rid of std_logic_unsigned and
std_logic_signed. There are too many designers around that prefer the
convenience of not having to deal with type conversions (BTW: I'm not
one of them).
What _might_ speed the demise of these libraries would be a utility to
automatically convert std_logic_arith, std_logic_unsigned, or
std_logic_signed code into numeric_std code. Without having done an in
depth analysis, I think it should be fairly simple. Then all that legacy
code using the old libraries could be (relatively) painlessly recovered.
This is a different issue. rising_edge(clk) is _not_ the same asThen again, the examples still use
VHDL'87 syntax (hello! rising_edge(clk), anyone?) in a document
copyrighted 2005.
(clk'event and clk=1) for non-synthesized code. Changing over without
careful checking could result in "interesting" behavior in test benches.
--
Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com