use IEEE.STD_LOGIC_UNSIGNED.ALL;...

  • Thread starter gnuarm.del...@gmail.com
  • Start date
G

gnuarm.del...@gmail.com

Guest
I was reading a vendor\'s code for simulation of their DSP blocks and found this...

use IEEE.STD_LOGIC_UNSIGNED.ALL;

The horror!

I really don\'t think I\'ve ever tried to use this library. I assume it actually has to work though, right? The problem is mixing signed and unsigned I believe.

Browsing through the library I noticed what appears to be a unary +. Looking it up I see a web page that says it has no effect. What is this for?

More importantly, should I worry about any issues with the vendor using such an out of date, deprecated library?

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
 
On Sunday, December 13, 2020 at 7:52:44 PM UTC-5, gnuarm.del...@gmail.com wrote:
I was reading a vendor\'s code for simulation of their DSP blocks and found this...

use IEEE.STD_LOGIC_UNSIGNED.ALL;

OK, but that is in the vendor\'s code, not yours.

I really don\'t think I\'ve ever tried to use this library. I assume it actually has to work though, right? The problem is mixing signed and unsigned I believe.

It could be a possible problem for the vendor. Do they mix signed and unsigned? If there simulation models work, do you care?

Browsing through the library I noticed what appears to be a unary +. Looking it up I see a web page that says it has no effect. What is this for?

Dunno.

More importantly, should I worry about any issues with the vendor using such an out of date, deprecated library?

Does your testing show a functional problem? Just because the code may be old and not state of the art, doesn\'t mean that it doesn\'t work correctly. Even if it is new code, it\'s still up to the vendor and if it is functionally correct, what exactly would you complain about to the vendor?

Kevin Jennings
 
On Tuesday, December 15, 2020 at 1:12:28 PM UTC-5, KJ wrote:
On Sunday, December 13, 2020 at 7:52:44 PM UTC-5, gnuarm.del...@gmail.com wrote:
I was reading a vendor\'s code for simulation of their DSP blocks and found this...

use IEEE.STD_LOGIC_UNSIGNED.ALL;

OK, but that is in the vendor\'s code, not yours.

I really don\'t think I\'ve ever tried to use this library. I assume it actually has to work though, right? The problem is mixing signed and unsigned I believe.

It could be a possible problem for the vendor. Do they mix signed and unsigned? If there simulation models work, do you care?

Of course I care, I have to use their models to simulate. Now that I see the code details, I suppose I could try inferring the code. My initial attempt using a multiplier and adder produced two DSP units, one for the multiplier and one for the adder, not so good. I expect that had to do with data widths or something.


Browsing through the library I noticed what appears to be a unary +. Looking it up I see a web page that says it has no effect. What is this for?

Dunno.
More importantly, should I worry about any issues with the vendor using such an out of date, deprecated library?

Does your testing show a functional problem? Just because the code may be old and not state of the art, doesn\'t mean that it doesn\'t work correctly. Even if it is new code, it\'s still up to the vendor and if it is functionally correct, what exactly would you complain about to the vendor?

The vendor did not exist four years ago, so the code can\'t be too old. I\'m using the code to find out exactly how their parts work. The documentation leaves a lot to the imagination which is not so good when designing with things. I won\'t know if the code doesn\'t work until I run it on a chip. Since I have no hardware that\'s not so easy as yet.

The up side is I haven\'t found too many surprises. Some things I expected would be controls are actually configuration details, such as Add/Sub selection. Their block diagrams show control signals that are registered (implying real time controls) but never show up in the simulation code. They call the adder an ALU and even talk about it doing arithmetic and *logic* functions, but it does nothing other than add or subtract as far as I can tell, it\'s an accumulator with a real time enable for the output feedback. Is that what anyone would think was logic?

They have inputs ASIGN and BSIGN which rather than acting as sign inputs for subtraction, are controls for sign extension vs. zero fill. At least that\'s something.

I\'ve always thought it odd that the libraries needed to be added with every module. Now I\'m glad so this library doesn\'t muck up my code. But then I tend to not use std_logic_vector mostly because I don\'t like all the typing. lol

--

Rick C.

+ Get 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209
 

Welcome to EDABoard.com

Sponsor

Back
Top