Altera_Forum
Honored Contributor
17 years agoapplied counter at use verilog hdl in quartus II on board Cyclon II
I use Cyclon II board to applied Counter program by verilog hdl code in quartus II when compiler program successful ok
Now My problem I want start counter up when Press push button from 0 untel 15 binary display on board but my problem why neccessary press push button to increase cunter I want Generate Clock by itself. I believe My problem in Assinment clock in Quartus II. Please anyone clear My problem tell me. my code is module counter ( clk, reset, result, ena ); input clk; input reset; input ena; output [3:0] result; reg [3:0] result; always @(posedge clk or posedge reset) begin if (reset) result = 0; else if (ena) result = result + 1; end endmodule