truncate 20 bits to 10 bits

M

mmt1

Guest
Hi.
I have a multiplier that multiplies 2 floating point numbers with 7
bits exponent and 10 bits mantissa.so its output has 7 bits exponent
and 20 bits mantissa.
now its output must return to its input in order to compute another
multiplication.on the other hand its output must be truncated to 10
bits. how can I do this? please help me.
thanks.
 
mmt1 wrote:

Hi.
I have a multiplier that multiplies 2 floating point numbers with 7
bits exponent and 10 bits mantissa.so its output has 7 bits exponent
and 20 bits mantissa.
now its output must return to its input in order to compute another
multiplication.on the other hand its output must be truncated to 10
bits. how can I do this? please help me.
thanks.
wire [9:0] newIn;
wire [19:0] oldOut;
assign new_in[9:0] = oldOut[19:10];

Is this all you need or is there some other confusion not communicated?
 

Welcome to EDABoard.com

Sponsor

Back
Top