Altera_Forum
Honored Contributor
8 years agoset design clock
Hi All,
I have hard time trying to create clock based process in Verilog. I am using mini board with EP2C5T144C8 chip. I rote a simple code ad checking output signals with scope. I assign clock pin to pin 17 according to schematic this is where 50 Mhz osc connected to. But I don't see any signals on scope. What I am doing wrong? module encoder (CLK,enc_out); input CLK; output enc_out; reg enc_out; integer cnt = 0; always @(posedge CLK) begin cnt = cnt+1; if(cnt<25000) enc_out = 1; else enc_out = 0; if(cnt==50000) cnt = 0; end endmodule