Q&A about Mythsim Usage
The program for mythsim is in the directory /home4/instruct/i366/MYTHSIM/myth8/. To save you from typing the whole directory to run the software every time, add the following line into your .tcshrc file:
set path =
(/home4/instruct/i366/MYTHSIM/myth8/
$path)
Two files. One is your opcode file whose extension
is ucode (see part0.ucode for the example posted on the web). The other
one is your memory file whose extension is mem (see part0.mem and
part0add.mem).
3. What
does the opcode file do?
The opcode file (XX.ucode) contains the four fetch statements and all your opcodes (for an example, see part0.ucode).
4. What
does the memory file do (XX.mem)?
The memory file can be used to
test your opcode (for an example, see part0add.mem).
5. How can
I add comments to the memory file and the opcode file?
Use “// put your
comments here” in the opcode file (for example, see part0.ucode).
Use “put your comments here %”
in the memory file. Comments in the
memory file have to be in the top of the file.
Memory file is composed of instructions. There are two types of instruction
format. The type one instruction format
is:
opcode |
ri |
rj |
rk |
constant_4 |
The second format is:
opcode |
ri |
constant_8 |
For both formats, the opcode field will be 6-bits, and the register field, ri, rj, or rk, requires 2-bits each. The field opcode is specified by the number in the opcode[number]. For example, opcode[7]’s corresponding opcode field is 000111. In the memory file (XX.mem), the lower 8-bits comes first. For example, the instruction 000010 00 00000000 corresponds to
n: 00000000
n+1:000010 00
in the memory file, where n
and n+1 is the memory address. NOTE: In your opcode file, opcode number has to be written
continuously for readability and easy test.