Constructor
new ALU(DBIn1, DBIn2, signal_lines)
Create a new ALU
Parameters:
Name | Type | Description |
---|---|---|
DBIn1 |
IOBus | the first input data bus |
DBIn2 |
IOBus | the second input data bus |
signal_lines |
Array.<Tri> | the control signals from the CPU control unit |
Properties:
Name | Type | Description |
---|---|---|
signal_lines |
Array.<Tri> | the control signals from the CPU control unit |
addsub |
AddSub | the adder/subtractor block |
fblock |
FBlock | the fblock |
shiftRot |
ShiftRotate | the shifter/rotater block |
mux |
ThreeOne | the mux which selects the output of the ALU |
- Source:
Extends
Classes
Methods
compute()
Compute the output of the ALU
- Source:
writeInstruction(instruction)
Set the control signals for the ALU to the values in the given instruction
Parameters:
Name | Type | Description |
---|---|---|
instruction |
Array.<Tri> | the control signals from the CPU control unit |
- Source: