From 68c80359ba0983bc21a18c0270025be9b441c0bb Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Tue, 29 Dec 2020 19:56:04 +0100 Subject: 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 --- examples/example_toplevel.v | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'examples/example_toplevel.v') 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), -- cgit v1.2.3