https://libre-soc.org/irclog/%23libre-soc.2021-12-23.log.html#t2021-12-23T18:22:12 if you just have a single combinatorial circuit without feedback loops, you should be able to calculate a topological ordering of the signals, such that you don't need a simulate loop cuz it can always calculate all signal values in a single step by calculating them in that specific ordering. this should greatly simplify the produced c code and make it run faster cuz you don't need the whole signal change tracking system. https://en.wikipedia.org/wiki/Topological_sort that would also help locate combinatorial loops (which is something not done at the moment, at all, in nmigen Simulation, and it's a pain) the only thing being a pain in the neck, that sort takes place across an entire swathe of modules/fragments/processes
nice idea, bear in mind it is an optimisation (priority set to low) even detecting feedback loops is slightly problematic when SR latches are involved.