MDPU emulator in a single file of pure C along with the official development repository.
The MDPU (Multi-Dimensional Processing Unit) is a theoretical PU (Processing Unit) that combines the general purpose of the CPU (Central Processing Unit) and the layered system of the TPU (Tensor Processing Unit).
ADD
- Add two valuesSUB
- Subtract two valuesMUL
- Multiply two valuesDIV
- Divide two valuesSTORE
- Store a valueLOAD
- Load a valueLI
- Load an immediate valuePUSH
- Push a value onto the stackPOP
- Pop a value from the stackJMP
- Jump to a locationJZ
- Jump if zeroJNZ
- Jump if not zeroMOV
- Move a valueJE
- Jump if equalJNE
- Jump if not equalAND
- Bitwise ANDOR
- Bitwise ORXOR
- Bitwise XORNOT
- Bitwise NOTSHL
- Bitwise shift leftSHR
- Bitwise shift rightCMP
- Compare two valuesTEST
- Test two valuesB
- Branch to a locationBZ
- Branch if zeroBNZ
- Branch if not zeroNEG
- Negate a valueABS
- Absolute valueMOD
- ModulusINC
- Increment a valueDEC
- Decrement a valueHALT
- Halt the program
The MDPU is a theoretical processor. If it were to be implemented in hardware, it would have many practical use cases. Some use cases are:
- Machine Learning: The MDPU can be used to perform matrix operations for machine learning algorithms.
- Image Processing: The MDPU can be used to perform image processing operations.
- Gaming: The MDPU can be used to play resource intensive games.
- Scientific Computing: The MDPU can be used to perform complex calculations for scientific computing.
- Data Processing: The MDPU can be used to process large amounts of data.
To clone the repository, you can use git:
git clone https://github.com/zanderlewis/mdpu.c
cd mdpu.c
To compile the program, run the following command:
gcc -o mdpu mdpu.c
To run the MDPU emulator, run the following command:
./mdpu 9x2 100 programs/0.instr
This will run the MDPU emulator on the programs/0.instr
file with 9x2 (18) registers and 100 memory cells.
This project is licensed under the MIT License - see the LICENSE file for details.