always @(posedge clk)
begin
if (bus_wr && decode)
- data[ramaddr[13:2]] = bus_wdata;
+ data[ramaddr[13:2]] <= bus_wdata;
/* This is not allowed to be conditional -- stupid Xilinx
* blockram. */
- temprdata <= data[ramaddr[13:2]];
+ temprdata <= (bus_wr && decode) ? bus_wdata : data[ramaddr[13:2]];
lastread <= ramaddr;
end
endmodule