mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Added comments in fcvt
This commit is contained in:
parent
d71940d96d
commit
6769f0cb43
@ -30,11 +30,17 @@ module cvtfp (
|
|||||||
logic [31:0] DSRes; // double to single precision result
|
logic [31:0] DSRes; // double to single precision result
|
||||||
|
|
||||||
|
|
||||||
|
// add support for all formats
|
||||||
|
// consider reordering code blocks so upconverting is in one region of the file
|
||||||
|
// and downconverting is in the other region.
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// LZC
|
// LZC: Leading Zero Counter
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// *** consider sharing this with fcvtint
|
||||||
|
// *** emphasize parallel structure between the two
|
||||||
|
// *** add a priorityencoder module to generic (similar to priorityonehot) and use it
|
||||||
|
|
||||||
// LZC - find the first 1 in the input's mantissa
|
// LZC - find the first 1 in the input's mantissa
|
||||||
logic [8:0] i,NormCnt;
|
logic [8:0] i,NormCnt;
|
||||||
|
@ -62,6 +62,10 @@ module fcvt (
|
|||||||
// fcvt.d.lu = 110
|
// fcvt.d.lu = 110
|
||||||
// {long, unsigned, to int}
|
// {long, unsigned, to int}
|
||||||
|
|
||||||
|
// *** revisit this module, explain in more depth
|
||||||
|
// should the int to fp and fp to int paths be separated?
|
||||||
|
// add support for all formats
|
||||||
|
|
||||||
// calculate signals based off the input and output's size
|
// calculate signals based off the input and output's size
|
||||||
assign Res64 = (FOpCtrlE[0]&FOpCtrlE[2]) | (FmtE&~FOpCtrlE[0]);
|
assign Res64 = (FOpCtrlE[0]&FOpCtrlE[2]) | (FmtE&~FOpCtrlE[0]);
|
||||||
assign In64 = (~FOpCtrlE[0]&FOpCtrlE[2]) | (FmtE&FOpCtrlE[0]);
|
assign In64 = (~FOpCtrlE[0]&FOpCtrlE[2]) | (FmtE&FOpCtrlE[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user