Espeer5 / Trinary

A ternary ALU simulation
https://espeer5.github.io/Trinary/
MIT License
2 stars 0 forks source link

Clean up circuit I/O streams in CPU #5

Closed Espeer5 closed 1 year ago

Espeer5 commented 1 year ago

Right now, every submodule of the CPU is communicating by sharing arrays of Tri objects which can be written to by the sending module and read from by the receiving module. However, there is nothing enforcing this relationship and the code is a little confusing as a result. This should be standardized into an object interface so that the syntax becomes simpler and more concise and there is less code duplication.

One complication will be the adder, which interacts differently with its input bus than other circuits, since it has its own independent sub-circuits which interact with each I/O line on the bus.