Sha256: 7cf52d9f7227e485aa686549499f0caddbf27c97a69d06b988b0758c88677e9c
Contents?: true
Size: 551 Bytes
Versions: 8
Compression:
Stored size: 551 Bytes
Contents
/** A simple up-counter with synchronous reset. @param Size Number of bits used to represent the counter's value. @param clock Increments the counter's value upon each positive edge. @param reset Zeroes the counter's value when asserted. @param count The counter's value. */ module counter #(parameter Size = 5) ( input clock, input reset, output reg [Size-1 : 0] count ); always @(posedge clock) begin if (reset) count <= 0; else count <= count + 1; end endmodule
Version data entries
8 entries across 8 versions & 1 rubygems