A Look at the WOMBAT Architecture
Because I can't resist, here is an image of a Wombat from JJ Harrison (jjharrison89@facebook.com) as posted on Wikipedia.
- WOMBAT is based on an architecture proposed by Dale Skrien.
- I have my own personal simulation environment for this architecture.
- It is written in C++
- Uses FLTK
- Uses flex and bison compiler tools.
- If these tools are installed in a linux environment, you should be able to build it.
- I have no idea about windows.
- I would love to have this moved to javascript available on line, if interested see me. (There is a student working on this)
- I would love to have a circuit level implementation of this machine, if interested see me.
- There are three components currently.
- An assembler (was)
- A gui simulator (guiSim)
- A text based simulator (sim)
- Documentation is available here as are example programs, source code, ...
- The machine has a very simple instruction set
- All basic instructions operate on
- The data at the address in memory
- You may assume memory is a large array of integers.
- Index from 0 to MEMORY_SIZE
- Memory is byte addressable
- The smallest amount of memory you can access is a byte
- But for all practical purposes, all data and instructions must be word aligned.
- A word, in this machine, is 16 bits.
- The last bit in a legal address is a 0.
- Bytes 0 and 1 constitute a word
- Bytes 2 and 3 constitute a word
- The single general purpose register, the accumulator (ACC).
- ADD 100
- Fetches the 16 bit word at memory location 100 (this is hex)
- Adds this to the value currently stored in the accumulator
- Stores the result in the accumulator.
- The same is true for Subtract, Multiply, Divide
- LOAD will load a value from memory and store it in the accumulator.
- STORE will store the value of the accumulator into the location in memory.
- ADDI does not use memory, instead the value listed in the instruction is added to the accumulator and stored in the accumulator.
- LOADI and STOREI allow for indirect indexing.
- Think pointer.
- The pointer is stored in memory.
- READ and WRITE are instructions that perform input and output
- Data is either read from or written to the accumulator.
- Output is presented to the user.
- The inREG is a special purpose input register.
- The outREG is a special purpose output register.
- JMP, JMPN and JMPZ are used for flow control.
- JMP changes the program counter (PC), a special purpose register, to the value stored in the instruction.
- Both JMPN and JMPZ examine the program counter.
- If it is negative (JMPN)
- Or if it is zero (JMPZ)
- The value of the PC is changed the value encoded in the instruction.
- STOP is fairly self explanatory.
- Other hardware components.
- Instructions are stored in a special purpose register called the instruction register (IR)
- Memory is accessed through a special interface called the memory management unit (MMU)
- The MMU contains two special purpose registers.
- The Memory Address Register (MAR) stores the address of memory we wish to interact with.
- The Memory Data Register (MDR) is a place to hold data transferred to or from memory.
- Math is performed in the arithmetic logic unit (ALU)
- The entire process is controlled by the control unit (CU)
- All data is transferred between these using a common bus
- A simplified form of Register Transfer Notation (RTN) is used to describe the actions of the instructions.
- Registers are referred to by their symbolic names (ACC, IR, PC, MAR, MDR)
- M is an array modeling memory.
- address represents the address encoded in the instruction.
- An arrow (←) indicates the direction data moves.
- ACC ← PC means transfer the contents of the program
- M[address] ← PC means transfer the PC to the memory address location specified.