Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is wxPython good for a Hardware Simulator?

For a computer architecture assignment, I am trying to replace a C++ library called "Sim" with something in Python.

I am already using MyHDL for the simulator, but the C++ program has a nice interactive feature that lets students see the components connected together (gates, inputs, outputs, flip flops, etc.) and toggle any signal.

I am attempting to create that interactive aspect and I just need to pick the library to use. I was wondering if wxPython would be a good choice in this case. The GUI mainly needs to draw gates or devices like flip flops and counters, use lines to connect them, and have some representation of signals (0 and 1 for instance or black and white).

Is wxPython a good idea, or are there better libraries for this application?

like image 353
Matt Avatar asked Sep 12 '26 20:09

Matt


1 Answers

It sounds like you're simulating logic circuits? Depending on the kind of UI you are looking for, I'd say that wxPython could definitely do the job. You may not even need that, however.

Most python distributions include Tkinter, a fairly simple GUI library. There is an example here of an existing (albeit fairly old) Digital Circuit Simulator written in python using Tkinter and PMW:

http://cvs.savannah.gnu.org/viewvc/pydcs/?root=pydcs

I would also suggest taking a look at PyGame. Although it's billed as a game development library, it's actually quite fantastic for creating simulations of all kinds.

like image 122
apiguy Avatar answered Sep 15 '26 08:09

apiguy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!