on-internet
← Community

Non-constant loop condition not supported for while

Stack Overflow ·

This is my Verilog code for CRC correction: module cor(m,err); input m; output err; reg [10:0]data; // message and zeros concatenated reg [7:0]poly; // polynomial equivalent reg [15:0]err; //xor output reg [3:0]cnt; // counter reg [2:0]n; // zeros wire [7:0]m; reg [7:0]poly1; // copy of polynomial equivalent reg [15:0]f; //shifted polynomial //wire a; reg [2:0]a; initial a <= 3'b000; initial cnt = 4'b1000; //initial data <= {m,n}; initial poly1<= poly; //always_comb always @ (m or poly) begin data <= {m,n}; poly1 <= poly; //data <= {m,n}; err <= data[7:0]^poly1; while(!cnt[2:0] == 0) begin if(

Comments

Sign in or sign up to comment and upvote.

No comments yet.