diff --git a/picorv32_wrapper.v b/picorv32_wrapper.v index ee16a14..92e77aa 100644 --- a/picorv32_wrapper.v +++ b/picorv32_wrapper.v @@ -102,7 +102,12 @@ module picorv32_wrapper #( .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; always @(posedge clk) begin