Skip to content

Commit

Permalink
fix reset on prev pr (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtaylormb authored Jun 9, 2024
1 parent 97051b4 commit ad3153f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions fpga/modules/channels/src/channels.sv
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module channels
logic cnt; // operator connection
logic [REG_FB_WIDTH-1:0] fb_dummy;

always_ff @(posedge clk)
always_ff @(posedge clk) begin
if (opl3_reg_wr.valid) begin
if (opl3_reg_wr.bank_num == 1 && opl3_reg_wr.address == 4)
connection_sel <= opl3_reg_wr.data[REG_CONNECTION_SEL_WIDTH-1:0];
Expand All @@ -84,13 +84,14 @@ module channels

if (opl3_reg_wr.bank_num == 0 && opl3_reg_wr.address == 'hBD)
ryt <= opl3_reg_wr.data[5];
end

if (reset) begin
// these should be reset as next game after reset may be OPL2 and not clear bank 1
connection_sel <= 0;
is_new <= 0;
end
if (reset) begin
// these should be reset as next game after reset may be OPL2 and not clear bank 1
connection_sel <= 0;
is_new <= 0;
end
end

mem_multi_bank #(
.DATA_WIDTH(REG_FILE_DATA_WIDTH),
Expand Down

0 comments on commit ad3153f

Please sign in to comment.