2
romContent
Width
5
Add
Label
PLUS
Bits
16
Tunnel
rotation
NetName
A
Tunnel
rotation
NetName
B
Ground
Tunnel
NetName
Y
Tunnel
NetName
FC
Driver
Bits
16
Tunnel
rotation
NetName
S0
Driver
Tunnel
rotation
NetName
S0
atk16_alu_fo.dig
Label
Overflow flag
Tunnel
rotation
NetName
A
Tunnel
rotation
NetName
B
Ground
Tunnel
NetName
Y
Tunnel
NetName
FC
Driver
Bits
16
Tunnel
rotation
NetName
S1
Driver
Tunnel
rotation
NetName
S1
Sub
Label
MINUS
Bits
16
And
Bits
16
Text
Description
AND
Tunnel
rotation
NetName
A
Tunnel
rotation
NetName
B
Driver
Bits
16
Tunnel
rotation
NetName
S2
Tunnel
NetName
Y
Or
Bits
16
Text
Description
OR
Tunnel
rotation
NetName
A
Tunnel
rotation
NetName
B
Driver
Bits
16
Tunnel
rotation
NetName
S3
Tunnel
NetName
Y
XOr
Bits
16
Text
Description
XOR
Tunnel
rotation
NetName
A
Tunnel
rotation
NetName
B
Driver
Bits
16
Tunnel
rotation
NetName
S4
Tunnel
NetName
Y
BarrelShifter
Label
LOG SHIFT RIGHT
Bits
16
direction
right
Tunnel
rotation
NetName
A
Tunnel
rotation
NetName
B_L5
Driver
Bits
16
Tunnel
rotation
NetName
S5
Tunnel
NetName
Y
BarrelShifter
Label
ARI SHIFT RIGHT
Bits
16
barrelShifterMode
arithmetic
direction
right
Tunnel
rotation
NetName
A
Driver
Bits
16
Tunnel
rotation
NetName
S6
Tunnel
NetName
Y
BarrelShifter
Label
LOG SHIFT LEFT
Bits
16
Tunnel
rotation
NetName
A
Driver
Bits
16
Tunnel
rotation
NetName
S7
Tunnel
NetName
Y
Tunnel
rotation
NetName
B_L5
Tunnel
rotation
NetName
B_L5
Tunnel
rotation
NetName
B15
Tunnel
rotation
NetName
Y15
Tunnel
rotation
NetName
A15
Tunnel
NetName
FO
Text
Description
Sign flag
Tunnel
rotation
NetName
Y15
Tunnel
NetName
FS
atk16_alu_fz.dig
Label
Zero flag
Tunnel
rotation
NetName
Y
Tunnel
NetName
FZ
Tunnel
rotation
NetName
S1
Testcase
Label
PLUS test
Testdata
A B S FLAGS Y
0x1 0x2 0 0b0000 0x3
0xff 0x1 0 0b0000 0x100
0x1 0xffff 0 0b0101 0x0
0x4000 0x4000 0 0b1010 0x8000
Testcase
Label
MINUS test
Testdata
A B S FLAGS Y
0x10 0x1 1 0b0000 0xF
0x1 0x0 1 0b0000 0x1
0x0 0x1 1 0b1001 0xFFFF
0x8000 0x1 1 0b0010 0x7FFF
In
Description
LHS of binary ALU operation
Label
A
Bits
16
In
Description
RHS of binary ALU operation
Label
B
Bits
16
In
Description
ALU operation code
Label
S
Bits
3
Text
Description
S Y
0 A + B
1 A - B
2 A and B
3 A or B
4 A xor B
5 A >> B # logical
6 A >>> B # arithmetic
7 A << B
Decoder
Selector Bits
3
flipSelPos
true
Tunnel
NetName
S0
Tunnel
NetName
S1
Tunnel
NetName
S2
Tunnel
NetName
S3
Tunnel
NetName
S4
Tunnel
NetName
S5
Tunnel
NetName
S6
Tunnel
NetName
S7
Tunnel
rotation
NetName
A
Splitter
Input Splitting
16
Output Splitting
15,1
Tunnel
rotation
NetName
B
Splitter
Input Splitting
16
Output Splitting
15,1
Splitter
Input Splitting
16
Output Splitting
5
Tunnel
NetName
B_L5
Tunnel
NetName
A15
Tunnel
NetName
B15
Splitter
Input Splitting
16
Output Splitting
15,1
Tunnel
rotation
NetName
Y
Tunnel
NetName
Y15
Out
Description
Output
Label
Y
Bits
16
Splitter
Input Splitting
1*4
Output Splitting
4
Out
Label
FLAGS
Bits
4
Tunnel
rotation
NetName
FO
Tunnel
rotation
NetName
FZ
Tunnel
rotation
NetName
FS
Tunnel
rotation
NetName
FC
PullDown
rotation