所以我正在为我的数字系统课程做一个实验前作业,在这个课程中我们应该测试某些组件并最终从它们创建一个计数器。我遇到的问题是教授给我们的代码不会编译。这个特定的测试夹具(ISE Design Suite 14.7)描述了一个移位寄存器。
module kg4014TB;
// Inputs
reg Clock;
reg Ser_In;
reg [7:0] P;
reg ParLoadCTRL;
// Outputs
wire Q7;
wire Q6;
wire Q5;
// Instantiate the Unit Under Test (UUT)
kg4014 uut (
.Clock(Clock),
.Ser_In(Ser_In),
.P(P),
.ParLoadCTRL(ParLoadCTRL),
.Q7(Q7),
.Q6(Q6),
.Q5(Q5)
);
initial begin
// Initialize Inputs
Clock = 0;
Ser_In = 0;
P = 8'b11011111
#100;
ParLoadCTRL = 1;
// Wait 100 ns for global reset to finish
#700;
ParLoadCTRL = 0; //shift mode
#15000;
// Add stimulus here
end
always begin
#500 Clock = ~Clock;
end
endmodule
以下是错误消息:
ERROR:HDLCompiler:806 - "C:/Xilinx/14.7/.v" Line 54: Syntax error near "#".
ERROR:HDLCompiler:598 - "C:/Xilinx/14.7/.v" Line 25: Module <kg4014TB> ignored due to previous errors.
虽然我认为它没有任何区别,但我只是指出我删除了一些文件路径和文件名,没有明显的理由。
答案 0 :(得分:0)
此行最后缺少分号:
P = 8'b11011111;