Browse Source

fpga/abcbus.sv: more paranoia in XINPSTB# and XOUTPSTB# decode

Even if we are in ABC800 mode (which could have been forced by RV32),
if XINPSTB# and XOUTPSTB# are both low, disregard them.
H. Peter Anvin 1 year ago
parent
commit
5d42a9a139
1 changed files with 5 additions and 3 deletions
  1. 5 3
      fpga/abcbus.sv

+ 5 - 3
fpga/abcbus.sv

@@ -103,11 +103,13 @@ module abcbus (
 
 
    reg	     abc_clk_active;
    reg	     abc_clk_active;
 
 
-   reg	     abc80;
+   reg	     abc80 = 1'b1;
    wire      abc800 = ~abc80;
    wire      abc800 = ~abc80;
 
 
-   wire	     xinpstb_s  = (abc800 & abc_xinpstb_s)  | (|abc_inp_s);
-   wire	     xoutpstb_s = (abc800 & abc_xoutpstb_s) | (|abc_out_s);
+   wire	     xinpstb_s  = (abc800 & abc_xinpstb_s & ~abc_xoutpstb_s)
+	     | (|abc_inp_s);
+   wire	     xoutpstb_s = (abc800 & abc_xoutpstb_s & ~abc_xinpstb_s)
+	     | (|abc_out_s);
    // Memory and I/O read/write strobes for ABC-bus
    // Memory and I/O read/write strobes for ABC-bus
    reg	     abc_xmemrd;
    reg	     abc_xmemrd;
    reg       abc_xmemwr;
    reg       abc_xmemwr;