sx0  

sx0 is a minimum sx simulator.  It separates the task of converting microprogram (from mgen) to event-list suitable for sx sim, and initrom, to another program "sxgen". It executes in batch mode only, so "mon" can be eliminated.  It aims to achieve a simple sx simulator which students can read and understand the "core" easily.

sxgen does conversion of "mpgm.txt" (bit 0/1 format) to event-list and it generates the binding of opcode to microaddress, "initrom", as uop rom image.

microprogramming 

It starts with "mspec.txt", a microprogram.  "/mpgm/mgen" reads this file and generates "mspec.h", the signal definition file and the bit of microprogram at stdout. The microprogram bit should be stored in the file "mpgm.txt".

The files "mspec.h" and "mpgm.txt" are the input of the "sxgen".  sxgen generates one output file "sxbit.h" which includes "mspec.h" and four data:

udop[]	rom address of each opcode
mw[]	start of each event-list
mx[]	event-list of all microwords
nxt[]	next microword address

"sxbit.h" must be included to be compiled with sx simulator.

Conclusion

sx0 achieved the size reduction of 50% (from ~800 lines downto ~400 lines) with the "core" only 150 lines.  sxgen handles all the microprogram generation and conversion.  The executable "sx" does not required any outside file to run, no "mpgm.txt" and "mspec.h" need to be presented at run-time.

11 July 2006
Start of Monk Lent (Kao Pun Sa)

