Counter testΒΆ

This example design features a simple 4-bit counter driving LEDs. To build the counter example, depending on your hardware, run:

TARGET="arty_35" make -C counter_test

At completion, the bitstreams are located in the build directory:

counter_test/build/<board>

Now, for Arty and Basys3, you can upload the design with:

TARGET="<board type>" make download -C counter_test

The result should be as follows:

../_images/counter-example-arty.gif

For Zybo, please follow the guide on how to load a bitstream from U-boot.

Once the bitstream is loaded, the result should be as follows:

../_images/counter-example-zyboz7.gif

On the picocom terminal, you can control the counter behaviour to stop it, or let it count backwards, by toggling values of the EMIO pins of the ARM Processing System (PS).

You can control the counter enable signal with:

gpio set 54
gpio clear 54

If GPIO 54 is set, the counter is disabled. It is enabled if the GPIO 54 is cleared. The result should be as follows:

../_images/counter-example-zyboz7-clken.gif

You can control the counter direction with:

gpio set 55
gpio clear 55

If GPIO 55 is set, the counter goes backwards. It goes forwared if the GPIO 54 is cleared. The result should be as follows:

../_images/counter-example-zyboz7-reverse.gif