17 this->
data[0].fill(0);
18 this->
data[1].fill(0);
41 for(
int i = 0; i < opcodeWidth; i++)
43 for(
int s = 0; s < stepQuantity; s++)
50 for(
int c = 0; c < 2; c++)
52 for(
int z = 0; z < 2; z++)
84 QFile urom0File(urom0Path);
87 if(urom0File.open(QIODevice::WriteOnly))
89 urom0File.write(
reinterpret_cast<const char *
>(this->
data[0].constData()),
UROM_SIZE);
97 QFile urom1File(urom1Path);
100 if(urom1File.open(QIODevice::WriteOnly))
102 urom1File.write(
reinterpret_cast<const char *
>(this->
data[1].constData()),
UROM_SIZE);
This class contains atomic steps for the control unit of defined instruction.
@ ABXY
Main and auxiliary registers.
unsigned char getOpcode() const
const QList< Step > & getStepList() const
const UCode & getUCode() const
unsigned char getCode0() const
unsigned char getCode1() const
static const int INSTRUCTION_CYCLE_QUANTITY
Every instruction can get only 16 steps.
URomData()
Default constructor for creating an empty uROM opcode table.
static const int ADDRESS_FLAG_Z_POSITION
Position of the zero bit received from ALU to the control unit.
static const int INSTRUCTION_QUANTITY
Support only for 256 opcodes.
bool saveFiles(const QString &urom0Path, const QString &urom1Path)
static const int UROM_SIZE
uROM size for low and high banks
void addInstruction(const Instruction &instruction)
static const int ADDRESS_FLAG_C_POSITION
Position of the carry bit received from ALU to the control unit.
QVector< QVector< unsigned char > > data
Data container for low and high banks.