XiPU uROM Generator
|
This class contains a whole generated microcode for all instructions. More...
#include <uromdata.h>
Public Member Functions | |
URomData () | |
Default constructor for creating an empty uROM opcode table. More... | |
void | addInstruction (const Instruction &instruction) |
bool | saveFiles (const QString &urom0Path, const QString &urom1Path) |
Static Public Attributes | |
static const int | INSTRUCTION_QUANTITY = 256 |
Support only for 256 opcodes. More... | |
static const int | INSTRUCTION_CYCLE_QUANTITY = 16 |
Every instruction can get only 16 steps. More... | |
static const int | ADDRESS_FLAG_C_POSITION = 12 |
Position of the carry bit received from ALU to the control unit. More... | |
static const int | ADDRESS_FLAG_Z_POSITION = 13 |
Position of the zero bit received from ALU to the control unit. More... | |
static const int | UROM_SIZE = 32768 |
uROM size for low and high banks More... | |
Private Attributes | |
QVector< QVector< unsigned char > > | data = { QVector<unsigned char>(UROM_SIZE), QVector<unsigned char>(UROM_SIZE) } |
Data container for low and high banks. More... | |
This class contains a whole generated microcode for all instructions.
Definition at line 22 of file uromdata.h.
URomData::URomData | ( | ) |
Default constructor for creating an empty uROM opcode table.
Definition at line 15 of file uromdata.cpp.
References data.
void URomData::addInstruction | ( | const Instruction & | instruction | ) |
Add an instruction to the uROM opcode table
instruction | Instruction to add |
Definition at line 26 of file uromdata.cpp.
References Instruction::AB, Instruction::ABXY, ADDRESS_FLAG_C_POSITION, ADDRESS_FLAG_Z_POSITION, Instruction::Any, data, Instruction::getArg0(), Instruction::getArg1(), Instruction::getC(), UCode::getCode0(), UCode::getCode1(), Instruction::getOpcode(), Instruction::getStepList(), Step::getUCode(), Instruction::getZ(), INSTRUCTION_CYCLE_QUANTITY, and INSTRUCTION_QUANTITY.
Referenced by URom::URom().
bool URomData::saveFiles | ( | const QString & | urom0Path, |
const QString & | urom1Path | ||
) |
Save a binary microcode to files
urom0Path | Path to the first output file |
urom1Path | Path to the second output file |
Definition at line 82 of file uromdata.cpp.
References data, and UROM_SIZE.
Referenced by URom::saveFiles().
|
static |
Position of the carry bit received from ALU to the control unit.
Definition at line 28 of file uromdata.h.
Referenced by addInstruction().
|
static |
Position of the zero bit received from ALU to the control unit.
Definition at line 29 of file uromdata.h.
Referenced by addInstruction().
|
private |
Data container for low and high banks.
Definition at line 40 of file uromdata.h.
Referenced by addInstruction(), saveFiles(), and URomData().
|
static |
Every instruction can get only 16 steps.
Definition at line 26 of file uromdata.h.
Referenced by addInstruction().
|
static |
Support only for 256 opcodes.
Definition at line 25 of file uromdata.h.
Referenced by addInstruction(), and URom::URom().
|
static |
uROM size for low and high banks
Definition at line 31 of file uromdata.h.
Referenced by saveFiles().