[Tutor] Processor Simulator
Timothy M. Brauch
tbaruch@mindless.com
Wed, 02 May 2001 21:30:08 -0400
I have a project for my comp-sci class. I have to design a simulator
for a processor, and I've decided to use Python. So, my question is,
does anyone have any suggestions as to how to go about doing this?
Also, I have to write simple files and load them into my simulator.
My initial thoughts are to create a class with a bunch of function
definitions for different processes. Such as add() and sub() and mul(),
etc.
I also have to have a display window showing register enteries, which
that I think I can do fairly easily. I was thinking of using the latest
VPython which has a text function (I am doing this mostly because I have
no experience with TK, otherwise I would use it, but right now I don't
have the time to learn it).
As for the files, I would use something like readlines and string.split
to break up my commands kept in the external file. I think I can handle
that as well.
If anyone has any suggestions or can offer any help, let me know. I
feel like this might be one of the biggest projects I have undertaken so
far.
- Tim