?? arithmetic_unit.v
字號(hào):
module arithmetic_unit (result_1, result_2, operand_1, operand_2,);
output [4: 0] result_1;
output [3: 0] result_2;
input [3: 0] operand_1, operand_2;
assign result_1 = sum_of_operands (operand_1, operand_2);
assign result_2 = largest_operand (operand_1, operand_2);
function [4: 0] sum_of_operands;
input [3: 0] operand_1, operand_2;
sum_of_operands = operand_1 + operand_2;
endfunction
function [3: 0] largest_operand;
input [3: 0] operand_1, operand_2;
largest_operand = (operand_1 >= operand_2) ? operand_1 : operand_2;
endfunction
endmodule
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -