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.

Getting a negative output when doing VHDL subtraction

Status
Not open for further replies.

venkyatit

Newbie level 3
Joined
Oct 1, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
UK
Activity points
1,306
Hi. I am new to VHDL. My code appears to be working fine if two variables (defined as integers) are added. It is even working when subtracting (C<=A-B), only if variable A is greater than B.
However, when B is greater than A then the output is incorrect (normally zero), whereas I am looking for a negative output. I tried using signed variables but could n't get my head around it.

Can someone help me?
 

Re: VHDL subtraction

Hi,

Can you post your VHDL code? This makes it easier for us to help you.

Devas
 

Re: VHDL subtraction

Thanks. I have posted it with a different subject. ( Issue with VHDL subtraction).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top