?? signext.v
字號:
module signExt ( input [15:0] a, input signExt, //signal, whether to sign-extend output reg [31:0] y); always @ (*) begin //Switching of ALU operations $display("signExt<<<<<<<<<<<<a=%b,signExt=%b>>>>>>>",a,signExt); case (signExt) 1'b0: y = {{16{1'b0}}, a}; 1'b1: y = {{16{a[15]}}, a}; endcase $display("signExt<<<<<<<<<<<<y=%b>>>>>>>",y); end endmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -