aboutsummaryrefslogtreecommitdiff
path: root/examples/example_toplevel.v
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-12-29 19:56:04 +0100
committerWojciech Kosior <kwojtus@protonmail.com>2020-12-29 19:56:04 +0100
commit68c80359ba0983bc21a18c0270025be9b441c0bb (patch)
treea06a04eb8756f96d05c55768bd356917847cdc95 /examples/example_toplevel.v
parent5b6a3f3b216939a11ed1978d7da4dd6bbe4edc2a (diff)
downloadAGH-engineering-thesis-68c80359ba0983bc21a18c0270025be9b441c0bb.tar.gz
AGH-engineering-thesis-68c80359ba0983bc21a18c0270025be9b441c0bb.zip
add the ability to include additional data at the end of bitstream image and prepare an example, that reads thic data through SPI and displays it
Diffstat (limited to 'examples/example_toplevel.v')
-rw-r--r--examples/example_toplevel.v14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/example_toplevel.v b/examples/example_toplevel.v
index f6cdf69..f1501e3 100644
--- a/examples/example_toplevel.v
+++ b/examples/example_toplevel.v
@@ -23,6 +23,16 @@
; /* Cause syntax error */
`endif
+`ifndef SPI_ROM_FILE
+ `define SPI_ROM_FILE "/dev/null"
+ `define SPI_ROM_WORDS_COUNT 0
+`else
+ `ifndef SPI_ROM_WORDS_COUNT
+ `error_SPI_ROM_WORDS_COUNT_not_defined
+; /* Cause syntax error */
+ `endif
+`endif
+
`ifndef FINISH_ON_IMAGE_WRITES
`define FINISH_ON_IMAGE_WRITES 0
`else
@@ -67,7 +77,9 @@ module example();
#(
.FONT_FILE(`FONT_FILE),
.EMBEDDED_ROM_WORDS_COUNT(`ROM_WORDS_COUNT),
- .EMBEDDED_ROM_FILE(`EMBEDDED_ROM_FILE)
+ .EMBEDDED_ROM_FILE(`EMBEDDED_ROM_FILE),
+ .SPI_ROM_WORDS_COUNT(`SPI_ROM_WORDS_COUNT),
+ .SPI_ROM_FILE(`SPI_ROM_FILE)
) soc
(
.clock_100mhz(clock_100mhz),