1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

35 lines
472 B
Coq
Raw Normal View History

2008-11-22 22:40:25 +01:00
// File: Inc.v
2008-11-23 11:36:16 +01:00
// Generated by MyHDL 0.6
// Date: Sun Nov 23 11:34:35 2008
2008-11-22 22:40:25 +01:00
`timescale 1ns/10ps
module Inc (
count,
enable,
clock,
reset
);
output [7:0] count;
reg [7:0] count;
input enable;
input clock;
input reset;
always @(posedge clock, negedge reset) begin: INC_INCLOGIC
if ((reset == 0)) begin
count <= 0;
end
else begin
if (enable) begin
count <= ((count + 1) % 256);
end
end
end
endmodule