Verilog で書かれた次の LFSR があります。
module LFSR #(parameter SIZE=1) /*Define a parameter for size of output*/
(
input clk,
input reset,
output [SIZE-1:0] q
);
/*feedback taps for the LFSR*/
parameter shift1=1,shift2=2,shift3=2;
reg [15:0] shift; /*Shift register*/
wire xor_sum1,xor_sum2; /*feedback signals*/
/*Feedback logic*/
assign xor_sum1=shift[shift1] ^ shift[shift2];
assign xor_sum2=xor_sum1 ^ shift[shift3];
/*Shift the registers*/
always @ (posedge clk,posedge reset)
if(reset)
shift<=16'b1111111111111111;
else
shift<={xor_sum2,shift[15:1]};
/*Set the output*/
assign q=shift[SIZE-1:0];
endmodule
次のようにインスタンス化しようとします。
/*Instantiate LFSR for the Random_X_Vel variable*/
LFSR
#(.SIZE(2),
.shift1(3),
.shift2(9),
.shift3(1))
LFSR_Random_X_Vel
(
.clk(clk),
.reset(reset),
.q(Random_X_Vel)
);
ISE14.7 と Modelsim 10.2 でコンパイルに失敗します。
問題の原因と解決方法を教えてください。