Simulation

First of all was the simulation, everything was done primary on Logisim to fully understand how Gigatron works, and to test if it is possible to implement the different modifications. 3 different simulations were done on Logisim that can be downloaded below or on Github:

  • first is Gigatron.circ used primarely for acadimic and teaching purposes, it is a simplified logic version of Gigatron, in whitch the 74 series were not used, but a simplified logical equivalents were utilized instead. This version is stuffed with debugging and monitoring mechanisms.
  • second is GigatronTTL.circ is a more accurate simulation were the same 74 series logic chips were used, nevertheless some parts in Gigatron can not be simulated under Logisim due to their analogic nature, like resistrors/diods grid used in the Control Unit (UC), they were replaced by some logic ccircuits equivalent. Also, in some situations Gigatron mixed up the bits order in some registers, for clarity the simulation holds the natural order of bits.
  • third MegatronTTL.circ, an accurate simulation of Megatron using 74 series chips.

For the simulation to work properly, GigatronTTL.circ and MegatronTTL.circ needs in the same directory 74xx Library.circ file to work. Also MegatronTTL.circ needs that the 3 ROMs (27c512) under CU circuit must be loaded consecutively from up to down with CU-datapath.ROM, CU-registers.ROM, CU-ALU.ROM in the case where that was not done automatically.

Two proof-of-concept programs can be executed on both Gigatron and Megatron, Fibonacci and Factorial programs. To execute them, the binary machine code of one of them must be loaded in the ROM of the machine, the binary machine code for Fibonacci is saved in Fibonnaci.ROM file and Factorial is saved in Factorial.ROM file. Two other files, Fibonnaci.txt and Factorial.txt are used to contain the assembly language for the two programs, mainly for explaining them.

Both programs have input values for execution, the input value (example 3) has to be put inside the register BUS-IN in Gigatron, and KEYBOARD-IN in Megatron, IOC register also in Megatron must contain 0x11 (or 00010001b) to choose the keyboard to be the primary input device. The result of the programs is shown in output register at the end of the execution. Step-by-step execution can also be done by using the mode "manual" of the clock, all the componants informations can be monitored by the associated 7 display segments, plus the contents of the RAM by show it's appropriate window.


Modifications

The modifications done upon Megatron in comparison to Gigatron are mainly intended to reduce the number of components for the ease of use and implementation, and secondly to enhance some hardware aspects, like to bring more flexibility  for adding and managing more devices.

The list of all the modifications done to Megatron is as below :

  • Removing the VGA and replacing it by small more intelligent handheld screens, with higher resolution and higher color depth. In fact the VGA imposes some heavy constraints to the architecture, like most of the time spent by Gigatron is for rendering VGA signals, and the constraint to use 6.25 MHz clock, which (i guess) leaded to apply a non desirable pipeline, and some additional hardware non trivial manipulation to comply timing constraints.
  • Removing the pipeline.
  • Doubling the RAM capacity from 32 KB to 64 KB.
  • Using 74181 ALU to have faster arithmetic/logic calculation and to reduce the number of chips.
  • Replacing the CU (Control Unit) complex logic by 3 ROMs (used like look-up tables), which leads to a smaller simpler circuit and more flexible programmable Control Unit.
  • Adding a proper Input/Output Unit implementing a real device manager allowing the addition of more input and output devices.
  • Adding a native keyboard to Megatron and potentially other devices.

Software

Some additions are made to the Instructions Set, especially the instructions responsible for the Input/Output Unit, more details...

Read more »