mirror of
https://github.com/supleed2/ELEC60011-DSD-CW.git
synced 2024-11-10 02:05:49 +00:00
8 lines
194 B
Verilog
8 lines
194 B
Verilog
module fp_div2 (
|
|
input [31:0] dataa,
|
|
output [31:0] result
|
|
);
|
|
wire [7:0] NewExp;
|
|
assign NewExp = dataa[30:23]-1;
|
|
assign result = (dataa[30:23]==0) ? 0 : {dataa[31],NewExp,dataa[22:0]};
|
|
endmodule |