// Instantiate the Unit Under Test (UUT)
Func uut (
.clk(clk),
.rst(rst),
.n(n),
.sl(sl),
.result(result)
);
initial begin
// Initialize Inputs
clk = 0;
rst = 0;
n = 0;
sl = 0;
//100ns 后初始化
#100;
rst = 1;
clk = 1;
end
always #10 clk = ~clk;
repeat(50)
begin
#10 n = {$random} % 6;
sl = {$random} % 3;
end
endmodule
错误:
ERROR:HDLCompiler:806 - "D:/Xilinx_prj/Demo_v/Func/Func/Func_tb.v" Line 59: Syntax error near "repeat".
ERROR:HDLCompiler:598 - "D:/Xilinx_prj/Demo_v/Func/Func/Func_tb.v" Line 25: Module <Func_tb> ignored due to previous errors.