ftp.nice.ch/pub/next/developer/resources/classes/CompSim.README

This is the README for CompSim.s.tar.gz [Download] [Browse] [Up]

				CompSim
				
			by Gregor N. Purdy, 1991
			
	 A set of classes for simulating Digital Logic (especially
			     for computers)
			     
	    Copyright 1991, 1992 by Contemporary Design Studios.


0.0	Warning!

	This software is not even Alpha software, since I had to write it
	so quickly. You may be sure that there will be bugs, but I hope
	you find it useful. In fact, I'd like to hear about bugs so that
	I can fix them and make this package more useful.
	
	I will not be held responsible for any damages, whether direct or
	indirect as a result of your using this software.


1.0	General Info

	CompSim is a set of classes I wrote for simulating a
	computer for a class (EECS 370 at The University of Michigan).
	I cannot guarantee they function correctly, but most of them
	seemed to work.
	
	
	However, you are hereby granted permission to use and abuse this
	code, whether for commercial or non-commercial use, provided you
	credit me in your documentation and info panel, and you must also
	put in my copyright line above. Note, however, that future, more
	useful, versions *may* not be so relaxed in distribution rules,
	depending on how much more time I put into it.


2.0	Purpose In Life

	CompSim exists to make life easier (hopefully) for people who wish
	to simulate digital logic systems. I wrote it because I had to do just
	that for a class I was taking (see 1.0, General Info, above). It is my
	hope that someone else out there who does such things will find this
	software useful.
	
	CompSim simulates things at a fairly low level. For instance, some of
	the classes here use instances of the other classes to accomplish
	their tasks, even though it would have been more efficient to do
	otherwise. The reason for this (See Timer, for an example) is that I
	wanted the higher-level functions to be fairly true to an actual
	circuit.
	
	Some high-level classes, like Memory, simulate the subsystem instead of
	the circuitry because it would be altogether too slow otherwise.
	
	
3.0	Using CompSim

	Read the descriptions in the header files!

	To use CompSim in a program, you should create a class which will model
	your device. Have it instantiate whatever Nodes are needed to connect
	the devices it contains, then instantiate the devices, connecting them
	to the nodes. The cycle method of your new object should send cycle
	messages to all the devices necessary to accomplish the circuits function,
	in an appropriate order, considering signal propagation.
	
	Now, in your main program, simply instantiate one of your circuit objects,
	and send it cycle messages. Provide yourself methods and such for whatever
	sorts of intermediate output you'll need, and away you go!
	
	Be sure to free everything when you're done, like a good programmer :-).
	
	That's it! Good luck, and let me know if you find this useful, or
	whatever.


4.0	Other Information Available

	When I developed CompSim, I drew diagrams on my Macintosh (yech!) of the
	higher  level devices (like Timer and IndexRegister). These will be
	available later, when I have time to get them into a NeXT-friendly
	format. Let me know if you want them...


--Gregor N. Purdy
gregor@oit.itd.umich.edu

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.