mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2025-01-07 10:18:13 +01:00
fw irq improvements (force high state for one clock when de-asserting irq)
This commit is contained in:
parent
7a19097a40
commit
31ea6e6016
@ -138,7 +138,12 @@ module n64_cfg (
|
||||
lock_sequence_counter <= 1'd0;
|
||||
end
|
||||
if (lock_sequence_counter == 1'd1) begin
|
||||
n64_scb.cfg_unlock <= (reg_bus.wdata != 16'hFFFF);
|
||||
if (reg_bus.wdata == 16'hFFFF) begin
|
||||
n64_scb.cfg_unlock <= 1'b0;
|
||||
cmd_irq_request <= 1'b0;
|
||||
cmd_irq <= 1'b0;
|
||||
mcu_irq <= 1'b0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,13 +26,19 @@ module n64_top (
|
||||
|
||||
logic n64_dd_irq;
|
||||
logic n64_cfg_irq;
|
||||
logic n64_irq_oe;
|
||||
|
||||
logic irq_data;
|
||||
logic irq_dq;
|
||||
logic [1:0] irq_oe;
|
||||
|
||||
assign irq_data = (n64_dd_irq || n64_cfg_irq);
|
||||
|
||||
always @(posedge clk) begin
|
||||
n64_irq_oe <= (n64_dd_irq || n64_cfg_irq);
|
||||
irq_dq <= (~irq_data);
|
||||
irq_oe <= {irq_oe[0], irq_data};
|
||||
end
|
||||
|
||||
assign n64_irq = n64_irq_oe ? 1'b0 : 1'bZ;
|
||||
assign n64_irq = irq_oe[1] ? irq_dq : 1'bZ;
|
||||
|
||||
n64_reg_bus reg_bus ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user