[source]

Entity arith_counter_ring

BITSINVERT_FEEDBACKClockstd_logicResetstd_logicseed[BITS - 1 downto 0]std_logic_vectorincstd_logicdecstd_logicvaluestd_logic_vector[BITS - 1 downto 0]

Block Diagram of arith_counter_ring

This module implements an up/down ring-counter with loadable initial value (seed) on reset. The counter can be configured to a Johnson counter by enabling INVERT_FEEDBACK. The number of counter bits is configurable with BITS.

Generics

Name

Type

Default

Description

BITS

positive

INVERT_FEEDBACK

boolean

FALSE

FALSE -> ring counter; TRUE -> johnson counter

Ports

Name

Type

Direction

Description

Clock

std_logic

in

Clock

Reset

std_logic

in

Reset

seed

std_logic_vector

in

initial counter vector / load value

inc

std_logic

in

increment counter

dec

std_logic

in

decrement counter

value

std_logic_vector

out

counter value