Add option to load alternative firmware with plusarg
This commit is contained in:
parent
9591ae9f7d
commit
cd5d341e89
|
@ -102,7 +102,12 @@ module picorv32_wrapper #(
|
||||||
.irq (irq )
|
.irq (irq )
|
||||||
);
|
);
|
||||||
|
|
||||||
initial $readmemh("firmware/firmware.hex", mem.memory);
|
reg [1023:0] firmware_file;
|
||||||
|
initial begin
|
||||||
|
if(!$value$plusargs("firmware=%s", firmware_file))
|
||||||
|
firmware_file = "firmware/firmware.hex";
|
||||||
|
$readmemh(firmware_file, mem.memory);
|
||||||
|
end
|
||||||
|
|
||||||
integer cycle_counter;
|
integer cycle_counter;
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
|
|
Loading…
Reference in New Issue