Question about fixed-point Verilog coding

Status
Not open for further replies.

siva_7517

Full Member level 2
Joined
Jan 16, 2006
Messages
138
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,401
verilog code :

assign A = B*C
assign D = A + E

the example of calculation is shown below:

given ,

-0.25 = B =>1.110
0.75 = C => 0.110
0.5 = E => 0.100


-----------------1.110 ____________ -0.25 B
---------------x 0.110 ____________ 0.75 C
-----------------------
---------------- 0000
------------111110------------------->extended sign bit
------------11110--------------------->extended sign bit
----------+0000
-----------------------------
----------11.110100 _______________-0.1875 A




After multiply this value, the results of A fixed-point has changed. How can i add A value to E value in verilog because both has different fixed-point value.
 

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