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:

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 :

Software

Some additions are made to the Instructions Set, especially the instructions responsible for the Input/Output Unit, more details about those instructions and how to use them can be found in the PDF Instructions Set.

The code should be compatible with the two machines Megatron and Gigatron, except for the input/output instructions, they should be removed for Gigatron and added for Magatron. The NOP instruction after every jump instruction is no more mandatory in Megatron, cause the pipeline has been removed.

It is not the case for now, but in the future the use of an assembler and a different software stack would be envisageable.


Links