私はいくつかのサードパーティの Verilog を読んでいて、これを見つけました:
function [31:0] factorial;
input [3:0] operand;
reg [3:0] index;
begin
factorial = operand ? 1 : 0;
for(index = 2; index <= operand; index = index + 1)
factorial = index * factorial;
end
endfunction
ここではbegin
andend
キーワードが冗長なようです。彼らは?それらの用途は何ですか?