From 4fdacebca0f622a591e7d333c968fe5ae9380a54 Mon Sep 17 00:00:00 2001 From: Michael Norris <108370498+Nitsirks@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:10:24 -0800 Subject: [PATCH] flopping mode decode in ntt to help timing/fanout issues (#44) * flopping mode decode in ntt to help timing/fanout issues * fixing reset copy paste issue due to rushed changes * MICROSOFT AUTOMATED PIPELINE: Stamp 'user/dev/michnorris/ntt_timing' with updated timestamp and hash after successful run --- .github/workflow_metadata/pr_hash | 2 +- .github/workflow_metadata/pr_timestamp | 2 +- src/ntt_top/rtl/ntt_top.sv | 28 +++++++++++++++++++------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflow_metadata/pr_hash b/.github/workflow_metadata/pr_hash index a73bc0b..345ef82 100644 --- a/.github/workflow_metadata/pr_hash +++ b/.github/workflow_metadata/pr_hash @@ -1 +1 @@ -33d06fbea7186dcc35701c7246494b5dc37c2ced6c160c81495915e8364ce6817152174a1048eba8618a889e68f0e06d \ No newline at end of file +111d16ee2f110fee7f711f78fd5440db8226f6ca262388d96e92fe0a3ce18a51c81b3ceb16a6524be00cd21c4680a85a \ No newline at end of file diff --git a/.github/workflow_metadata/pr_timestamp b/.github/workflow_metadata/pr_timestamp index 3dbb6c5..b627b51 100644 --- a/.github/workflow_metadata/pr_timestamp +++ b/.github/workflow_metadata/pr_timestamp @@ -1 +1 @@ -1732146153 \ No newline at end of file +1732302200 \ No newline at end of file diff --git a/src/ntt_top/rtl/ntt_top.sv b/src/ntt_top/rtl/ntt_top.sv index 1a5c848..9580e30 100644 --- a/src/ntt_top/rtl/ntt_top.sv +++ b/src/ntt_top/rtl/ntt_top.sv @@ -148,13 +148,27 @@ module ntt_top logic pwm_mode, pwa_mode, pws_mode; logic pwm_intt_mode; - assign ct_mode = (mode == ct); - assign gs_mode = (mode == gs); - assign pwo_mode = (mode inside {pwm, pwa, pws}); - assign pwm_mode = (mode == pwm); - assign pwa_mode = (mode == pwa); - assign pws_mode = (mode == pws); - assign pwm_intt_mode = (mode == pwm_intt); + always_ff @(posedge clk or negedge reset_n) begin + if (!reset_n) begin + ct_mode <= 0; + gs_mode <= 0; + pwo_mode <= 0; + pwm_mode <= 0; + pwa_mode <= 0; + pws_mode <= 0; + pwm_intt_mode <= 0; + end + else begin + ct_mode <= (mode == ct); + gs_mode <= (mode == gs); + pwo_mode <= (mode inside {pwm, pwa, pws}); + pwm_mode <= (mode == pwm); + pwa_mode <= (mode == pwa); + pws_mode <= (mode == pws); + pwm_intt_mode <= (mode == pwm_intt); + end + end + assign pw_rden_dest_mem = accumulate ? pw_rden : 1'b0; //Mem IF assignments: