siva_7517
Full Member level 2
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.
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.