瀏覽代碼

projects/riscv_usb: Fix bus access to WARMBOOT

Make sure to gate on write enable or any read access will reboot ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut 5 年之前
父節點
當前提交
a63af0df5f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      projects/riscv_usb/rtl/top.v

+ 1 - 1
projects/riscv_usb/rtl/top.v

@@ -485,7 +485,7 @@ module top (
 		if (rst) begin
 			boot_now <= 1'b0;
 			boot_sel <= 2'b00;
-		end else if (wb_cyc[0] & (wb_addr[2:0] == 3'b000)) begin
+		end else if (wb_cyc[0] & wb_we & (wb_addr[2:0] == 3'b000)) begin
 			boot_now <= wb_wdata[2];
 			boot_sel <= wb_wdata[1:0];
 		end