JulianKemmerer / PipelineC

A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.
https://github.com/JulianKemmerer/PipelineC/wiki
GNU General Public License v3.0
569 stars 46 forks source link

Derived FSM style functions have lots of room for optimizations #163

Open JulianKemmerer opened 1 year ago

JulianKemmerer commented 1 year ago

Want a pass that can combine sequential-looking FSM states that occur in the same cycle into one/as few combintatorial state transitions as possible (watching out for states that can't be jumped to / combined to others)

Then the parallel state grouping in C_AST_FSM_FUNDEF_BODY_TO_LOGIC and GET_GROUPED_STATE_TRANSITIONS seems like it has room for improvement, especially regarding ordering of inlined subroutine states vs single instance fsm module connection entry+FSM+exit triple state sequence.

JulianKemmerer commented 1 year ago

Gah, made this issue thinking it shouldnt block whats in #86

But in testing it seems the rework that makes #86 almost done does need some ~optimization (not funcitonal) changes to meet timing in some of the old tests... so I guess addressing this issue too maybe...

JulianKemmerer commented 1 year ago

Actually will probably not require this change right away with #86 and can instead do at leisure when using results of combined #86 and instance array wires branch to do cool things