404 - Exercises

Exercise 401

Try to get the example to work.

Exercise 402

Determine how much time it takes for handling a single interrupt.

Exercise 403

Start from the example of the counter in 302. Have the peripheral trigger an interrupt when the count reaches 100'000'000. Given that a clock cycle takes 10 ns. an interrupt should be triggered every (10 ns/CC x 100'000'000 CC) second. Meanwhile the processor is in an endless loop that prints something. When the interrupt comes, handle it accordingly and reset the counter.


Handing in exercises

When you upload your assigments, check the following:

          • all your files are archived in one single file (.zip, .tar, …)
          • structurise your files in subfolders
              • firmware/ containing all the software: build files, binaries, …
                  • firmware/src/ containing all the source files (.c, .S, …)
              • hdl/ containing all the hardware descriptions (.vhd, .v, .sv, …)
                  • hdl/tb/ containing all the simulation files (.vhd)
              • files like a README.md, vivado_script.tcl, …
                  • README.md: if you want to add some additional info
                  • vivado.tcl: script to automate project creation in Vivado

Tree

If you look at the structure of how you need to hand in assignments, you might spot something. These are all plain text files and there are not many of them. However, this will enable you to generate all data you need: binaries, hex-files, vivado projects, bitstreams, …
In case you want to use some version control (like GitHub), it would make sense to track only these files.