From 3b13d21e63b9e61c001029dcad78d37d5e30da6d Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 3 May 2024 17:51:20 +0200 Subject: [PATCH] [SC64][FW] CIC: use output enable register in PIO --- fw/rtl/n64/n64_cic.sv | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fw/rtl/n64/n64_cic.sv b/fw/rtl/n64/n64_cic.sv index 8452553..f0dd4ec 100644 --- a/fw/rtl/n64/n64_cic.sv +++ b/fw/rtl/n64/n64_cic.sv @@ -37,8 +37,13 @@ module n64_cic ( end logic cic_dq_out; + logic cic_dq_oe; - assign n64_cic_dq = cic_dq_out ? 1'bZ : 1'b0; + always_ff @(posedge clk) begin + cic_dq_oe <= ~cic_dq_out; + end + + assign n64_cic_dq = cic_dq_oe ? 1'b0 : 1'bZ; // Timer (divider and counter)