Skip to content

sync_wedge: Remove deprecated clock gate - #359

Merged
phsauter merged 2 commits into
pulp-platform:masterfrom
phsauter:phsauter/issue353
Aug 21, 2026
Merged

sync_wedge: Remove deprecated clock gate#359
phsauter merged 2 commits into
pulp-platform:masterfrom
phsauter:phsauter/issue353

Conversation

@phsauter

Copy link
Copy Markdown
Collaborator

Addresses #353
The clock gate is not functional since we have a FFLARNC register and it is always gated by the enable there.

@phsauter

Copy link
Copy Markdown
Collaborator Author

@fischeti can you quickly think this through as well? I think it is correct since the gated clock only goes to the register and that one already has an enable.

@fischeti

Copy link
Copy Markdown
Contributor

I am a bit confused about the use of the clock gating cell here. Shouldn't the behaviour be that when en_i is low, both f_edge_o and r_edge_o remain low? Because I think this is currently not given. en_i just gates updates to serial_q so technically, you could have f_edge_o and r_edge_o always high in that case.

@fischeti

Copy link
Copy Markdown
Contributor
sync_wedge

@fischeti

Copy link
Copy Markdown
Contributor

I am not sure but my suspicion is that the previous module was a bit broken. The one in the CLINT makes more sense to me, which does not have a clock gating cell and also no enable. Because I am not sure the sync_wedge needs an enable at all.

@phsauter

Copy link
Copy Markdown
Collaborator Author

We can change the functionality for v2 and I tend to agree that the current implementation is very odd.

@fischeti

Copy link
Copy Markdown
Contributor

Yes, I agree. I would drop the clock gating and enable signal alltogether, now that we have the opportunity to change the behaviour. The clear signal might be a bit tricky, because we cannot clear the tc_sync and if we only clear serial_q, you might cause a pulse in the cycle after you clear, which is probably undesired.

@phsauter

Copy link
Copy Markdown
Collaborator Author

Re clear signal, we already made the decision to exclude it from clock domain crossings and similar things so we can easily also remove it here.
I also had Codex check all other PULP projects as well as OpenHWGroup and all of them tie the enable, so I think its fine to remove it.

Continuously track the synchronized input so edge outputs are single-cycle pulses. Keep the deprecated enable port for source compatibility while delegating behavior to the active cell.

@fischeti fischeti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@phsauter phsauter changed the title sync_wedge: Replace deprecated clock gate sync_wedge: Remove deprecated clock gate Aug 21, 2026
@phsauter
phsauter added this pull request to the merge queue Aug 21, 2026
Merged via the queue into pulp-platform:master with commit 88c8b00 Aug 21, 2026
4 checks passed
@phsauter
phsauter deleted the phsauter/issue353 branch August 21, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants