⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bootcoder.v

📁 这是我用verilog hdl语言写的浮点乘法器,用的是基4的booth算法,对于部分积使用了5-2压缩和3-2压缩,欢迎大家指点,也欢迎大家把它改成流水线以提高速度.
💻 V
字号:
module bootcoder(b_i,as_o,ov_o,te_o,sub_valid);
parameter length=8;
input[2:0] b_i;// bh is the high bit, br is the current bit,bl is the low bit
output as_o,ov_o,te_o,sub_valid;
reg as_o,ov_o,te_o;  //as=0 add, as=1 sub ;ov =0 0, ov=1 a; te=0 0,te=1 2a;

always @(b_i)
begin
//get control signal
    as_o<=b_i[2];
    ov_o<=b_i[1]^b_i[0];
    te_o<=((~b_i[2])&b_i[1]&b_i[0])|(b_i[2]&(~b_i[0]|b_i[1]));   
end
assign sub_valid= as_o &(ov_o|te_o);
endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -