PoC.arith.counter_free
Implements a free-running counter that generates a strobe signal every DIVIDER-th cycle the increment input was asserted. There is deliberately no output or specification of the counter value so as to allow an implementation to optimize as much as possible.
The implementation guarantees a strobe output directly from a register. It is asserted exactly for one clock after DIVIDER cycles of an asserted increment input have been observed.
Entity Declaration:
1entity arith_counter_free is
2 generic (
3 DIVIDER : positive
4 );
5 port (
6 -- Global Control
7 clk : in std_logic;
8 rst : in std_logic;
9
10 inc : in std_logic;
11 stb : out std_logic -- End-of-Period Strobe
12 );
13end entity arith_counter_free;