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.

Negative and floating point numbers in verilog

Status
Not open for further replies.

saima_a

Newbie level 4
Joined
Sep 19, 2008
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,332
verilog negative numbers

Hi all
i want to implement the following mathematical equation in verilog:

slopeup=(y2-y1)/(x2-x1)

slopeup after calculations will be like 0.01456... or -0.013478......... etc.
Plz can anybody tell me how to accomodate numbers like this in verilog???? Plz reply soon. Waiting
 

verilog negative

Negative numbers are generally represented as 2's compliment in hardware.
While fractional numbers, may be represented by 'fixed point' or floating point.
Fixed point is simpler form, but may not have a vast 'range'.
If you see some of the c progrmas on the following site, you will get an idea how to represent fractional/decimal numbers using fixed point binary.
http://www.vlsiip.com/cindex.html
Kr,
Avi
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top