Merge pull request #66 from olofk/spiflash-plusarg
spiflash: Allow setting firmware from plusarg
This commit is contained in:
commit
3015c18e53
|
@ -98,8 +98,11 @@ module spiflash (
|
||||||
// 16 MB (128Mb) Flash
|
// 16 MB (128Mb) Flash
|
||||||
reg [7:0] memory [0:16*1024*1024-1];
|
reg [7:0] memory [0:16*1024*1024-1];
|
||||||
|
|
||||||
|
reg [1023:0] firmware_file;
|
||||||
initial begin
|
initial begin
|
||||||
$readmemh("firmware.hex", memory);
|
if (!$value$plusargs("firmware=%s", firmware_file))
|
||||||
|
firmware_file = "firmware.hex";
|
||||||
|
$readmemh(firmware_file, memory);
|
||||||
end
|
end
|
||||||
|
|
||||||
task spi_action;
|
task spi_action;
|
||||||
|
|
Loading…
Reference in New Issue