📄 bootcoder.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 + -