LogikSim / LogikSimPython

Python prototype of a digital logic simulator
http://www.logiksim.org/
GNU General Public License v3.0
2 stars 1 forks source link

Simulation backend - Create a basic simulation engine #32

Closed hacst closed 9 years ago

hacst commented 9 years ago

Part of #18 .

hacst commented 9 years ago

@chris- I checked in a possible architecture for the backend:

a606efd Add tests for core and compounds. a940e5a Introduce compound elements. 6155086 Extend and unify element interface. 53eacce Minor fixups. 94578e7 Add coverage for backend.Interconnect e97e915 Add very basic unit test coverage of AND and OR Gates. 4db26b6 Introduce total event ordering to prevent event racing issues. c7b2254 Add sketch for possible backend architecture.

Please take a look and tell me what you think. I find it a bit hard to strike the balance between "this has to run fast so don't create objects or transient data" and "I want to be able to debug this thing, have a nice interface and have rich meta-data around". Also the design has some weak points like the incoming edges scheduled at the same time not being applied as one leading to ambiguous output states that have to be resolved with total event ordering. Ofc. there are solutions to all of this.

In any case we now have something to iterate on or at least a common base to relate future designs to.

hacst commented 9 years ago

I guess we have that now ;)