?? booth_code.v
字號:
module booth_code(b,x,out);input[2:0] b;input[8:0] x;output[9:0] out; reg[9:0] out;wire[8:0] temp;wire[8:0] x_fan;assign x_fan=~x;wire co;add_8b add8_1(x_fan[7:0],1,0,temp,co);always @(b or x or temp) begin case(b) 3'b000:out=0; 3'b001:begin out[8:0]=x; out[9]=x[8]; end 3'b010:out=x<<1; 3'b111:begin out[7:0]=temp[7:0]; out[8]=co^x_fan[8]; out[9]=co^x_fan[8]; end 3'b110:begin out[9]=co^x_fan[8]; out[0]=0; end endcase end endmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -