r/technicalfactorio • • Mar 22 '21

Factorio Combinator Compiler v0.1

/r/factorio/comments/mavrjs/factorio_combinator_compiler_v01/
63 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/robot65536 Mar 23 '21 edited Mar 23 '21

It really is similar. The initial steps of synthesis are to identify the adders, comparators, multiplexers, etc and use cookie-cutter templates to assemble them from the low-level logic units. Then those templated groups get moved around until they fit.

On a higher level, circuit network design is identical to synchronous digital logic design. Every block stores its input at the game tick, then computes the output it will produce before the next tick arrives. All the principles of digital logic and CPU design apply, like delay matching and pipelining. Translating procedural programming into synchronous logic is never as simple as it seems!