-`define EXEC_WRITE(ad, da) begin address <= (ad); wdata <= (da); wr <= 1; end end
-`define EXEC_READ(ad) begin address <= (ad); rd <= 1; end end
+`ifdef verilator
+ `define EXEC_WRITE(ad, da) begin address <= (ad); wdata <= (da); wr <= 1; end
+ `define EXEC_READ(ad) begin address <= (ad); rd <= 1; end
+`else
+ `ifdef isim
+ `define EXEC_WRITE(ad, da) begin address <= (ad); wdata <= (da); wr <= 1; end
+ `define EXEC_READ(ad) begin address <= (ad); rd <= 1; end
+ `else
+/* Work around XST's retarded bugs :\ */
+ `define EXEC_WRITE(ad, da) begin address <= (ad); wdata <= (da); wr <= 1; end end
+ `define EXEC_READ(ad) begin address <= (ad); rd <= 1; end end
+ `endif
+`endif