The development of this simulator has two objectives.
The KUE-CHIP2 educational board is equipped with switches and display LEDs for operation control and observation. In addition to these user interfaces, several functions have been added to this simulator to enable quicker input of programs and data, display and confirmation of processor operation. This makes it possible to proceed computer experiments using KUE-CHIP2 more smoothly.
Furthermore, by developing a simulator using the Java language, computer education via the Internet can be carried out. In other words, the simulator can be used from any computer environment that is connected to the Internet and can use a WWW browser. This suggests the possibility of future network-based information processing education.
The development of this simulator started in April 1996 at the suggestion of Associate Professor Haruo Niimi. The environment used for development, working hours, etc. are shown in the table. Development was carried out mainly on Solaris 2.5. During development, reference books and mailing lists related to the Java language (Java House ML, Java House Brewers ML) were used.
Development environment |
|
Development Software | Java Developers Kit (1.02 release) |
Working Time | 9 months (Approximately 60 days in practice) |
The main window can be broadly divided into two parts: the part that displays the internal status of the processor and the part that controls the operation of the processor.
The display pane shows the phase being executed, each register and the flag values. These can be used to observe the operation of the processor.
On the KUE-CHIP2 educational board, each register and flag is displayed by selecting the target to be observed with a switch and checking it with two types of seven-segment displays. On the other hand, this simulator always displays the values of all registers and flags, so that the user does not need to switch between them using switches.
In addition to the above, this simulator has the following three types of buttons.
In addition to these, the following user interfaces are provided.
The simulator is characterised by the following two points.
The simulator is equipped with a user interface as described above, which facilitates experiments using KUE-CHIP2.
The first step in the experiment is to input the program. The program can be input either by launching the memory editor window described above and directly inputting the program, or by reading the program file from the File menu. The program file must be written in a specified format in text form.
The program is then executed using the SS, SI and SP buttons. During execution, the value of each register and the state of the flags are displayed in the main window, and the internal operation of the processor can be checked at any time by displaying the block diagram window.
While the execution of the program is interrupted, the values of the registers and the state of the flags can be changed freely. To change the value of a register, click with the mouse on the seven segments whose value you want to change and enter the value in hexadecimal. In the case of flags, click with the mouse on the LED to be changed to invert its state.
Furthermore, the user can set breakpoints. When each register reaches the value set by the user, the program execution is stopped. This can be set by clicking on the small seven segments right next to the seven segments where the value of each register is displayed and entering the value.
By opening the aforementioned log window and selecting the Start Log item from the Log menu, it is possible to record the execution history of the programme from that point onwards.
After the program has finished running, the current memory contents and the execution history displayed in the log window can be saved in text format.
As described above, the program is developed as GUI-based software in the window system environment, so it is easy to input programs, execute programs, change register values and flags, and set breakpoints. The memory contents and execution history can be saved, making it easy to evaluate and re-use programs. In addition, the internal operation of the processor can be observed in real time using a block diagram. It is considered difficult to realise these functions in hardware.
The simulator is written in the Java language.
Compiling Java source code produces an intermediate file called byte code. This byte code is the object code of the Java Virtual Machine (hereafter referred to as JVM). The execution of this simulator is on the JVM implemented on each platform. This bytecode can be shared between different platforms.
Furthermore, this object code can be sent over the Internet. Currently, the JVM is implemented in major WWW browsers and can be executed in a form called an applet. In fact, it has been tested on Solaris 2.5, Windows 95(NT), MacOS and IRIX.
Under Construction
The problems encountered in developing this simulator are listed below.