[Japanese]

About KUE-CHIP2 Simulator JAVA

Objectives

The development of this simulator has two objectives.

  1. Improved user interface for the KUE-CHIP2 education board.
  2. Development of network-based software for information processing education.

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.

Development Chronology

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 and working time
Development environment
  • Solaris 2.5
  • Windows 95
  • MacOS
Development Software Java Developers Kit (1.02 release)
Working Time9 months (Approximately 60 days in practice)

Simulator Configuration

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.

Display pane

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.

Control pane
The control pane has SS, SI, SP and RESET buttons, which provide the same functions as on the KUE-CHIP2 educational board. These four buttons are mainly used to execute, stop and restart the program.

In addition to the above, this simulator has the following three types of buttons.

MEMORY
By pressing this button, the memory editor window appears. Use this window to input programs and data. The contents of the memory can be changed by highlighting the data of one byte to be changed and entering the value in hexadecimal.
BLOCK
By pressing this button the block diagram of the KUE-CHIP2 is displayed. When the processor is running, the enabled control lines are shown in red.
LOG
By pressing this button a log window is displayed. If necessary, you can record the execution history during the execution of the program.

In addition to these, the following user interfaces are provided.

Normal
The program execution speed can be adjusted in five steps.
Instruction:
Displays the instruction being executed in mnemonic form.
Total Phases
Displays the total number of phases since the start of the program execution.
Total Instructions:
Displays the total number of instructions executed since the start of the program execution.
State:
The current operating state of the simulator (STOP, RUNNING, BREAK or RESET) is displayed.

Notable Advantages of the Simulator

The simulator is characterised by the following two points.

  1. It has functions that are difficult to implement in hardware, such as the display of block diagrams and the recording of execution histories, and is easy to operate because it is GUI-based software.
  2. Written in the Java language, it can be executed on multiple platforms and used over the Internet.

Advantages of Software Simulators

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.

Running in Multi-platform Environments

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.


Class Hierarchy

Under Construction


Issues encountered during development

The problems encountered in developing this simulator are listed below.

  1. Difficulty of implementation on different platforms (JVM)
  2. Some functions restricted for security reasons.
  3. Relatively slow execution speed of Java programs.

Back to the KUE-CHIP2 Simulator JAVA page