Info
This question is closed. Reopen it to edit or answer.
what's the theory of convertion between different forms of fixed point, like converting a[40 37] to a[32 29]?
1 view (last 30 days)
Show older comments
in the verilog code generated by fdatool, it is like
assign result = ((original[33] == 1'b0 & original[32:29] != 4'b0000) || (original[33] == 1'b0 && original[29:6] == 24'b011111111111111111111111) ) ? 24'b011111111111111111111111 :
(original[33] == 1'b1 && original[32:29] != 4'b1111) ? 24'b100000000000000000000000 : ({original[33],original[29:0] + {original[6], {5{~original[6]}}}})>>>6;
convert original[40 37] to result[32 29],and they represent the same value. I wonder that how does the core of this arithmetic, result = ({original[33],original[29:0] + {original[6], {5{~original[6]}}}})>>>6 , work? thanks for your attention.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!