.. _IP/arith_Counter_BCD: PoC.arith.Counter_BCD ##################### .. only:: html .. |gh-src| image:: /_static/logos/GitHub-Mark-32px.png :scale: 40 :target: https://github.com/VHDL/PoC/blob/main/src/arith/arith_Counter_BCD.vhdl :alt: Source Code on GitHub .. |gh-tb| image:: /_static/logos/GitHub-Mark-32px.png :scale: 40 :target: https://github.com/VHDL/PoC/blob/main/tb/arith/arith_Counter_BCD_tb.vhdl :alt: Source Code on GitHub .. sidebar:: GitHub Links * |gh-src| :pocsrc:`Sourcecode ` * |gh-tb| :poctb:`Testbench ` Counter with output in binary coded decimal (BCD). The number of BCD digits is configurable by ``DIGITS``. All control signals (reset ``rst``, increment ``inc``) are high-active and synchronous to clock ``clk``. The output ``val`` is the current counter state. Groups of 4 bit represent one BCD digit. The lowest significant digit is specified by ``val(3 downto 0)``. .. TODO:: * implement a ``dec`` input for decrementing * implement a ``load`` input to load a value .. rubric:: Entity Declaration: .. literalinclude:: ../../../src/arith/arith_Counter_BCD.vhdl :language: vhdl :tab-width: 2 :linenos: :lines: 51-61 .. only:: latex Source file: :pocsrc:`arith/arith_Counter_BCD.vhdl `