How to see the fractional part of division simulation

Status
Not open for further replies.

sameem_shabbir

Advanced Member level 4
Joined
Jan 5, 2008
Messages
104
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
Pakistan
Activity points
1,946
Hi all
I am doing simulation of my code.
I want to divide two 32 bits no and want to see its output (c=a/b)
But the problem is that i am more intrested in fractional part.
The simulator gives the answer of 3/2 =1 Where as i also want to see1.5

How should i do that.
 

Division Simulation

Hi
Are you using coregen instantion module for division . Try it as floating point format
 

Re: Division Simulation

Are you using verilog or VHDL ?
As far as i know, There is no division operator in VHDL... The '/' operator is used for comparison. eg : if (A /= B) -- means if A NOT EQUAL B

Plz correct me if im wrong.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…