Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

error on VHDL program....please help me...=)

Status
Not open for further replies.

energy_baz

Junior Member level 1
Joined
Nov 24, 2010
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,413
hi...

I need a help to fix this error....the error states

Line 25: Found 0 definitions for operator "-".

and this is my program code and I had highlight the error in pink color....thanks..
 
Last edited:

You have to observe VHDL syntax rules. To assign an integer quantity to an unsigned signal, it has to be converted to unsigned before. IEEE numeric_std library has the TO_UNSIGNED() function for this purpose. Consult a VHDL text book or the library definition.
 

You need to add unsigned library for using signed/unsigned numbers to be used in your code.
Also try to use '(' brackets to complete any expression bonding.

~Sachin
 

You need to add unsigned library for using signed/unsigned numbers to be used in your code.
Also try to use '(' brackets to complete any expression bonding.

~Sachin

The IEEE.NUMERIC_STD library already covers signed & unsigned.

Alex
 

"IEEE".STD_LOGIC_UNSIGNED is a non-standard Synopsys library, used by lazy VHDL programmers to save a few lines of code. It introduces a behaviour similar to Verilog, where bit vectors (std_logic_vector) are treated as unsigned numbers by default. It thwarts the clear VHDL type concept and causes confusion, if both signed and unsigned are used in a VHDL design.

The code has already more brackets than needed by the VHDL standard. But it's O.K. to use them in case of doubt about operator precendence, I think.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top