More thinking and experimenting happened, as I faced a growing complexity with the decoding logic. There is the "fast" equation, then the "set" and "reset" ones, all must be written, checked, translated, mapped. And these equations are not compatible because there is no way to dynamically change from "turbo" to "eco" mode. The "eco" equations are too large and might still glitch a bit during decoding.
The conclusion is to simply drop the "set" and "reset" equations. I keep the "fast" equations and add a transparent latch ("T-latch") that gets selectively enabled by a new (single) equation (that indicates the "don't care"s). I see several advantages:
- Fewer equations to care about and optimise, fewer gates.
- 3 configurations are possible, where the "fast" equation is used all the time, while the "enable" gates can be discarded if only a "fast" version is implemented. A compromise is also possible, when the "enable" equation is forced to true in "turbo" mode.
- The "enable" equation can be a bit slower than the "fast" equations, which further reduces the chances of glitches.
- The T-latch adds little latency when data pass through.
- T-latches are quite easy to implement, using a multiplexer for example.
- You can get the VHDL code for the dual-mode version and let the synthesizer trim/prune the gates when you force/stick the "turbo" and/or "phase" signals to 1 (this is easier to configure, test, compare...).
It looks simpler and more flexible than the previous S/R scheme...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.