XiPU uROM Generator
|
#include <step.h>
Public Types | |
enum class | BusAR { ABXY = 0 , D , IN , T , Ram , Flash , PCL , PCH , Default = 0 } |
Line select defines for the main reading data bus. More... | |
enum class | BusAW { None = 0 , ABXY , D , OUT , ALU_T , RPC , I , Ram , PCL , PCH , MAL , MAH , PC_PLUS , SP_PLUS , SP_MINUS , RPC_PLUS } |
Line select defines for the main writing data bus. More... | |
enum class | BusB { AB = 0 , D , Default = 0 } |
Line select defines for the secondary reading data bus. More... | |
enum class | BusC { PC = 0 , MA , SP , XY , Default = 0 } |
Line select defines for the addressing data bus. More... | |
Public Member Functions | |
Step (BusAR busAR, BusAW busAW, BusB busB=BusB::Default, BusC busC=BusC::Default, unsigned char aluS=0, bool aluM=false, bool aluC=false) | |
const UCode & | getUCode () const |
Static Public Attributes | |
static const int | CODE_0_BUS_AR_POSITION = 0 |
Position of bits for the main reading data bus. More... | |
static const int | CODE_0_BUS_AW_POSITION = 3 |
Position of bits for the main writing data bus. More... | |
static const int | CODE_0_BUS_B_POSITION = 7 |
Position of bits for the secondary reading data bus. More... | |
static const int | CODE_1_BUS_C_POSITION = 0 |
Position of bits for the addressing data bus. More... | |
static const int | CODE_1_FLAG_S_POSITION = 2 |
Position of bits for the ALU_S flags. More... | |
static const int | CODE_1_FLAG_M_POSITION = 6 |
Position of bit for the ALU_M flag. More... | |
static const int | CODE_1_FLAG_C_POSITION = 7 |
Position of bit for the ALU_C flag. More... | |
static const int | CODE_FLAG_S_MASK = 0x0f |
Mask for ALU_S flags. More... | |
Private Attributes | |
UCode | uCode |
Parsed microcode for the current step. More... | |
This class contains a single step of the instruction. It is a raw describe how to set control lines for the step.
|
strong |
|
strong |
Line select defines for the main writing data bus.
Enumerator | |
---|---|
None | Not selected. |
ABXY | Main and auxiliary registers. |
D | Hidden data register. |
OUT | Output register. |
ALU_T | ALU operation. |
RPC | Reset Program Counter. |
I | Instruction register. |
Ram | RAM access. |
PCL | Program Counter Low register. |
PCH | Program Counter High register. |
MAL | Memory Address Low register. |
MAH | Memory Address High register. |
PC_PLUS | Increse Program Counter. |
SP_PLUS | Increse Stack Pointer. |
SP_MINUS | Decrese Stack Pointer. |
RPC_PLUS | Reset the step counter and increse Program Counter. |
Definition at line 52 of file step.h.
|
strong |
|
strong |
Step::Step | ( | BusAR | busAR, |
BusAW | busAW, | ||
BusB | busB = BusB::Default , |
||
BusC | busC = BusC::Default , |
||
unsigned char | aluS = 0 , |
||
bool | aluM = false , |
||
bool | aluC = false |
||
) |
Step constructor
busAR | Which line of the main reading data bus is selected |
busAW | Which line of the main writing data bus is selected |
busB | Which line of the secondary reading data bus is selected |
busC | Which line of the addressing data bus is selected |
aluS | Seleted bits for ALU_S flags |
aluM | Seleted bit for ALU_M flag |
aluC | Seleted bit for ALU_C flag |
Definition at line 25 of file step.cpp.
References CODE_0_BUS_AR_POSITION, CODE_0_BUS_AW_POSITION, CODE_0_BUS_B_POSITION, CODE_1_BUS_C_POSITION, CODE_1_FLAG_C_POSITION, CODE_1_FLAG_M_POSITION, CODE_1_FLAG_S_POSITION, CODE_FLAG_S_MASK, and uCode.
const UCode & Step::getUCode | ( | ) | const |
Get a parsed microcode for the current step
Definition at line 46 of file step.cpp.
References uCode.
Referenced by URomData::addInstruction().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
Parsed microcode for the current step.
Definition at line 95 of file step.h.
Referenced by getUCode(), and Step().