hey, guys! can you help me with part of veilog code? always@(posedge clk) begin if(counter<=width) out <=1'b1; else out <=1'b0; counter<=counter+1'd1; if(counter>=18'd195312) counter=18'b0; $display("%d",counter[17:0]); end when COUNTER equals 195312 I want set to null it. it nulled, but the next clock CLK continues to count COUNTER to 195313... why is this happening???
you could have used correct indentation (with the [ code ] [ /code ] tags to make clear what happens in your code... And, is this to complete code?
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.