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.

multiply -ve number and a fraction in verilog

Status
Not open for further replies.

Chinmaye

Full Member level 3
Joined
Jan 18, 2016
Messages
164
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
3,145
Is it possible to multiply a negative number with a fraction in verilog? Eg :- -1*0.1;
If yes how can it be done? What is the format in which the result is stored?
TIA
 

You can do everything in verilog! Everything! But you could check out myhdl, which should be able to do what you want. Myhdl generates a verilog file which you could use to learn how to do this in verilog. Also, check out migen.

Johannes
 

There's no generic format for fractional numbers in Verilog. You have to specify a suitable format according to your requirements. Binary fixed point is the usual choice. It involves a rounding error when representing decimal fixed point numbers, but it's effective and fully compatible with signed and unsigned binary integer format.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top