mirror of
https://github.com/sxpert/hp-saturn
synced 2025-01-31 19:57:50 +01:00
reading and writing to the blockram should be in separate always blocks
This commit is contained in:
parent
dfc315937a
commit
da4299fd19
1 changed files with 5 additions and 1 deletions
|
@ -131,12 +131,16 @@ always @(posedge strobe) begin
|
|||
|
||||
if (configured & cmd_read)
|
||||
nibble_out <= sys_ram[(cmd_bus_dp?dp_ptr:pc_ptr) - base_addr];
|
||||
end
|
||||
|
||||
always @(posedge strobe) begin
|
||||
// write to ram
|
||||
|
||||
if (configured & cmd_write)
|
||||
sys_ram[(cmd_bus_dp?dp_ptr:pc_ptr) - base_addr] <= nibble_in;
|
||||
end
|
||||
|
||||
always @(posedge strobe) begin
|
||||
|
||||
case (command)
|
||||
`BUSCMD_PC_READ, `BUSCMD_PC_WRITE: begin
|
||||
|
|
Loading…
Add table
Reference in a new issue