f4pga-examples/xc7/additional_examples/button_controller
Unai Martinez-Corral bfdeafec7a xc7: use openFPGALoader instead of openocd
Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
2022-07-05 10:00:08 +02:00
..
Makefile fixed documentation and makefiles. Renamed common makefile. 2021-11-11 13:47:47 -07:00
README.rst xc7: use openFPGALoader instead of openocd 2022-07-05 10:00:08 +02:00
basys3.xdc seperated pwm and timer from other designs 2021-07-23 17:35:41 -06:00
button_controller.sv Ran debouncer through verible linter and formater and fixed issues 2021-08-11 21:03:09 -06:00
debounce.sv Ran debouncer through verible linter and formater and fixed issues 2021-08-11 21:03:09 -06:00
display_control.sv rebased onto main 2021-08-20 14:05:28 -06:00
timer.sv Ran debouncer through verible linter and formater and fixed issues 2021-08-11 21:03:09 -06:00

README.rst

Button Controller
~~~~~~~~~~~~~~~~~

This example demonstrates using a button debouncer state machine to count the number of presses on the
center button of the basys3 board. The number of presses counted by the debouncer state machine will
be given on the two right most digits of the display. The two left most digits record the number of
presses counted without the debouncer. You can reset the button counter by pressing the up button on
the board. To build the design first navigate to the additional examples directory:

.. code-block:: bash
   :name: additional-examples

   cd additional_examples

Then run make to compile the design:

.. code-block:: bash
   :name: example-debouncer-basys3

   make -C button_controller


At completion, the bitstream is located in the build directory:

.. code-block:: bash

   cd button_controller/build/basys3

Now, you can upload the design with:

.. code-block:: bash

   openFPGALoader -b basys3 top.bit

The following is an example of the debouncer in action:

.. image:: ../images/debounce.gif
   :align: center
   :width: 50%