mirror of
https://github.com/sxpert/hp-saturn
synced 2024-11-16 19:50:19 +01:00
fix all bad warnings
This commit is contained in:
parent
b5c3a56273
commit
5a5fc9c775
2 changed files with 42 additions and 21 deletions
|
@ -87,8 +87,12 @@ always @(*)
|
|||
io_ram_active = ((base_addr>=data_ptr)&(data_ptr<base_addr+IO_RAM_LEN))&(configured);
|
||||
end
|
||||
|
||||
always @(posedge clk)
|
||||
always @(negedge clk)
|
||||
case (command)
|
||||
`BUSCMD_PC_READ:
|
||||
begin
|
||||
pc_ptr <= pc_ptr + 1;
|
||||
end
|
||||
`BUSCMD_LOAD_PC:
|
||||
begin
|
||||
`ifdef SIM
|
||||
|
@ -96,8 +100,27 @@ always @(posedge clk)
|
|||
`endif
|
||||
pc_ptr <= address;
|
||||
end
|
||||
`BUSCMD_LOAD_DP:
|
||||
begin
|
||||
`ifdef SIM
|
||||
$display("io_ram: LOAD_DP %5h", address);
|
||||
`endif
|
||||
data_ptr <= address;
|
||||
end
|
||||
`BUSCMD_DP_WRITE:
|
||||
begin
|
||||
data_ptr <= data_ptr + 1;
|
||||
end
|
||||
|
||||
default: begin end
|
||||
endcase
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
always @(negedge clk)
|
||||
if ((~reset)&(~io_ram_error))
|
||||
case (command)
|
||||
|
@ -112,11 +135,6 @@ always @(negedge clk)
|
|||
$display("io_ram: PC_READ %5h %h | OK", data_ptr, nibble_in);
|
||||
`endif
|
||||
end
|
||||
// `ifdef SIM
|
||||
// else
|
||||
// $display("io_ram: PC_READ %5h %h | NOK - IO_RAM not active (conf: %b)", data_ptr, nibble_in, configured);
|
||||
// `endif
|
||||
pc_ptr <= pc_ptr + 1;
|
||||
end
|
||||
`BUSCMD_DP_WRITE:
|
||||
begin
|
||||
|
@ -132,16 +150,10 @@ always @(negedge clk)
|
|||
else
|
||||
$display("io_ram: DP_WRITE %5h %h | NOK - IO_RAM not active (conf: %b)", data_ptr, nibble_in, configured);
|
||||
`endif
|
||||
data_ptr <= data_ptr + 1;
|
||||
// data_ptr <= data_ptr + 1;
|
||||
end
|
||||
`BUSCMD_LOAD_PC: begin end // done on posedge
|
||||
`BUSCMD_LOAD_DP:
|
||||
begin
|
||||
`ifdef SIM
|
||||
//$display("io_ram: LOAD_DP %5h", address);
|
||||
`endif
|
||||
data_ptr <= address;
|
||||
end
|
||||
`BUSCMD_LOAD_DP: begin end
|
||||
`BUSCMD_CONFIGURE:
|
||||
begin
|
||||
`ifdef SIM
|
||||
|
|
23
hp48_rom.v
23
hp48_rom.v
|
@ -45,14 +45,23 @@ end
|
|||
*/
|
||||
|
||||
always @(posedge clk)
|
||||
if (command == `BUSCMD_LOAD_PC)
|
||||
begin
|
||||
case (command)
|
||||
`BUSCMD_LOAD_PC:
|
||||
begin
|
||||
`ifdef SIM
|
||||
$display("rom: LOAD_PC %5h", address);
|
||||
$display("rom: LOAD_PC %5h", address);
|
||||
`endif
|
||||
pc_ptr <= address;
|
||||
end
|
||||
|
||||
pc_ptr <= address;
|
||||
end
|
||||
`BUSCMD_PC_READ:
|
||||
begin
|
||||
`ifdef SIM
|
||||
$display("rom: inc PC");
|
||||
`endif
|
||||
pc_ptr <= pc_ptr + 1;
|
||||
end
|
||||
default: begin end
|
||||
endcase
|
||||
|
||||
/**************************************
|
||||
*
|
||||
|
@ -69,7 +78,7 @@ always @(negedge clk)
|
|||
//$display("rom: PC_READ %5h => %h", address, rom[pc_ptr]);
|
||||
`endif
|
||||
nibble_out <= rom[pc_ptr];
|
||||
pc_ptr <= pc_ptr + 1;
|
||||
// pc_ptr <= pc_ptr + 1;
|
||||
end
|
||||
`BUSCMD_LOAD_PC: begin end // do nothing here, handled on @(posedge clk)
|
||||
`BUSCMD_LOAD_DP:
|
||||
|
|
Loading…
Reference in a new issue