2
Tunnel
NetName
PCLK
Clock
Frequency
20
runRealTime
true
In
Label
PCLK
Rectangle
Label
Stage 1 Secondary Clear
RectHeight
15
RectWidth
35
Tunnel
NetName
NPCLK
Not
Break
Break
Text
Description
State machine & sequencer:
SQ0 transition current state if conditions match
SQ1 read from memory A
SQ2 read from memory B
SQ3 write to memory
SQ4 counter inc
Sequencer clocked by falling edge (NPCLK)
Everything else clocked by rising edge (PCLK)
And
Tunnel
rotation
NetName
ST_SECCLR
Tunnel
rotation
NetName
OVF_SECCLR
And
Tunnel
rotation
NetName
ST_EVAL
Or
Inputs
3
And
Inputs
3
Tunnel
NetName
CLK_STAGE
Tunnel
rotation
NetName
PCLK
Tunnel
rotation
NetName
SQ_TRANS
Counter
Label
STAGE
Bits
2
Decoder
Selector Bits
2
flipSelPos
true
Tunnel
NetName
ST_SECCLR
VDD
Tunnel
NetName
ST_EVAL
Tunnel
NetName
ST_RENDER
Or
Tunnel
rotation
NetName
CLK_STAGE
Tunnel
rotation
NetName
RST
Or
Tunnel
rotation
NetName
OVF_EVAL
Tunnel
rotation
NetName
OVF_SMN
Tunnel
NetName
STAGE
Multiplexer
Selector Bits
2
Tunnel
NetName
SEC_C
Ground
rotation
Tunnel
rotation
NetName
STAGE
Tunnel
rotation
NetName
CLK_WRITE
Tunnel
rotation
NetName
CLK_READA
Multiplexer
Selector Bits
2
Tunnel
NetName
SEC_str
VDD
rotation
Ground
rotation
Multiplexer
Selector Bits
2
Tunnel
NetName
SEC_ld
VDD
rotation
Multiplexer
Selector Bits
2
Tunnel
NetName
SB_C
Ground
rotation
Ground
rotation
Tunnel
rotation
NetName
STAGE
Multiplexer
Selector Bits
2
Tunnel
NetName
SB_str
Multiplexer
Selector Bits
2
Tunnel
NetName
SB_ld
VDD
rotation
Counter
Label
SEC CLR ADDR
Bits
4
Or
Tunnel
rotation
NetName
RST
Tunnel
rotation
NetName
CLK_WRITE
Driver
Bits
3
Tunnel
NetName
SEC_A
Tunnel
NetName
ST_SECCLR
Driver
Bits
32
Tunnel
NetName
ST_SECCLR
Tunnel
NetName
SEC_Din
Ground
Bits
32
Probe
Tunnel
rotation
NetName
ST_SECCLR
VDD
rotation
Ground
rotation
Ground
rotation
RAMDualPort
AddrBits
3
Label
SECONDARY
Bits
32
Probe
Label
SEC_D
Tunnel
rotation
NetName
SEC_ld
Tunnel
rotation
NetName
SEC_str
Tunnel
rotation
NetName
SEC_A
Tunnel
rotation
NetName
SEC_Din
Tunnel
rotation
NetName
SEC_C
RAMDualPort
AddrBits
7
Label
SCAN BUFFER
Bits
16
Probe
Label
SB_D
Tunnel
rotation
NetName
SB_A
Tunnel
rotation
NetName
SB_Din
Tunnel
rotation
NetName
SB_str
Tunnel
rotation
NetName
SB_C
Tunnel
rotation
NetName
SB_ld
Tunnel
rotation
NetName
SB_A
Tunnel
rotation
NetName
SB_Din
Ground
rotation
Bits
7
Ground
rotation
Bits
16
Out
Description
Scanline buffer data
Label
SB_D
Bits
9
Ground
Bits
9
Multiplexer
Selector Bits
2
Tunnel
NetName
SM_C
Ground
rotation
Tunnel
rotation
NetName
STAGE
Multiplexer
Selector Bits
2
Tunnel
NetName
SM_str
Multiplexer
Selector Bits
2
Tunnel
NetName
SM_ld
VDD
rotation
Tunnel
NetName
ST_IDLE
Ground
rotation
Ground
rotation
Tunnel
rotation
NetName
CLK_READA
Rectangle
RectHeight
40
Label
Stage 2 Evaluate sprites
RectWidth
35
Counter
Label
SMN
Bits
7
Probe
Or
Tunnel
rotation
NetName
RST
Tunnel
rotation
NetName
CLK_WRITE
Tunnel
rotation
NetName
SM_D
Splitter
Input Splitting
32
Output Splitting
8,10,10,1,1,1,1
Sub
Bits
10
Ground
Tunnel
rotation
NetName
SCY
Comparator
Bits
10
Const
Value
8
Bits
10
Tunnel
NetName
YMATCH
Tunnel
NetName
OVF_SMN
Tunnel
rotation
NetName
ST_EVAL
Splitter
Input Splitting
7
Output Splitting
6,1
Tunnel
NetName
SM_A
Tunnel
NetName
ST_SECCLR
LED
rotation
Tunnel
NetName
ST_EVAL
LED
rotation
Multiplexer
Selector Bits
2
Tunnel
NetName
TM_C
Ground
rotation
Ground
rotation
Tunnel
rotation
NetName
STAGE
Multiplexer
Selector Bits
2
Tunnel
NetName
TM_str
Multiplexer
Selector Bits
2
Tunnel
NetName
TM_ld
VDD
rotation
Ground
rotation
RAMDualPort
AddrBits
11
Label
TILE MEM
Bits
32
Tunnel
rotation
NetName
TM_C
Tunnel
rotation
NetName
TM_str
Tunnel
rotation
NetName
TM_ld
Text
Description
Tile mem addr:
8 bits select tile
3 bits select row in tile
= 11 bits total
Tunnel
rotation
NetName
TM_Din
Ground
rotation
Bits
32
Probe
Label
TM_D
Tunnel
rotation
NetName
TM_A
Tunnel
rotation
NetName
TM_Din
Text
Description
8 bits tile pattern index
10 bits Y position
10 bits X position
1 bit H flip
1 bit V flip
1 bit behind background? (priority)
1 bit palette select
= total 4 bytes per sprite
x 64 sprites
= 128 words
RAMDualPort
AddrBits
6
Label
SPRITE MEM H
Bits
16
Tunnel
NetName
SM_D
Tunnel
rotation
NetName
DBUS
Tunnel
rotation
NetName
SM_A
Tunnel
rotation
NetName
SM_C
Tunnel
rotation
NetName
SM_ld
Tunnel
rotation
NetName
SM_str
RAMDualPort
AddrBits
6
Label
SPRITE MEM L
Bits
16
Tunnel
rotation
NetName
DBUS
Tunnel
rotation
NetName
SM_A
Tunnel
rotation
NetName
SM_C
Tunnel
rotation
NetName
SM_ld
Tunnel
rotation
NetName
SM_str
Splitter
Input Splitting
16,16
Output Splitting
32
Probe
Counter
Label
Sequencer
Bits
3
Decoder
Selector Bits
3
flipSelPos
true
Tunnel
NetName
SQ_TRANS
Tunnel
NetName
SQ_READA
Tunnel
NetName
SQ_READB
VDD
rotation
Tunnel
NetName
SQ_WRITE
Or
Tunnel
rotation
NetName
NPCLK
Tunnel
rotation
NetName
RST
And
Tunnel
rotation
NetName
SQ_READA
Tunnel
rotation
NetName
PCLK
Tunnel
NetName
CLK_READA
And
Tunnel
rotation
NetName
ST_RENDER
Tunnel
rotation
NetName
OVF_RENDER
Tunnel
NetName
SEC_D
Splitter
Input Splitting
4
Output Splitting
3,1
Tunnel
NetName
OVF_SECCLR
Tunnel
NetName
SQ_CLR
Or
Tunnel
rotation
NetName
SQ_CLR
And
Tunnel
rotation
NetName
SQ_READB
Tunnel
rotation
NetName
PCLK
Tunnel
NetName
CLK_READB
And
Tunnel
rotation
NetName
SQ_WRITE
Tunnel
rotation
NetName
PCLK
Tunnel
NetName
CLK_WRITE
Splitter
Input Splitting
8,10,10,1,1,1,1
Output Splitting
32
Driver
Bits
32
Tunnel
NetName
ST_EVAL
Tunnel
NetName
SEC_Din
In
Description
Scanline Y (0..524)
Label
SCY
Bits
10
Tunnel
NetName
SCY
In
Label
DBUS
Bits
16
Tunnel
NetName
DBUS
In
Description
Reset sprite evaluator
Label
RST
Tunnel
NetName
RST
And
Inputs
3
Tunnel
rotation
NetName
YMATCH
Tunnel
rotation
NetName
SQ_WRITE
Tunnel
rotation
NetName
PCLK
Counter
Label
SEC ADDR
Bits
4
Or
Tunnel
rotation
NetName
RST
Probe
Tunnel
NetName
OVF_EVAL
Tunnel
rotation
NetName
ST_EVAL
Splitter
Input Splitting
4
Output Splitting
3,1
Driver
Bits
3
Tunnel
NetName
SEC_A
Tunnel
NetName
ST_EVAL
Rectangle
RectHeight
30
Label
Stage 3 Render line to scanbuf
RectWidth
35
Tunnel
NetName
ST_RENDER
LED
rotation
Counter
Label
SEC ADDR
Bits
4
Probe
Tunnel
NetName
OVF_RENDER
Tunnel
rotation
NetName
ST_RENDER
Or
Tunnel
rotation
NetName
RST
And
Tunnel
rotation
NetName
SQ_READA
Tunnel
rotation
NetName
PCLK
Splitter
Input Splitting
4
Output Splitting
3,1
Driver
Bits
3
Tunnel
NetName
SEC_A
Tunnel
NetName
ST_RENDER
Tunnel
rotation
NetName
SEC_D
Splitter
Input Splitting
32
Output Splitting
8,10,10,1,1,1,1
Tunnel
NetName
ST_IDLE
LED
rotation
Text
Description
Stage 4 Idle
Tunnel
NetName
TM_A
Driver
Bits
11
Tunnel
NetName
ST_RENDER
Splitter
Input Splitting
3,8
Output Splitting
11
Splitter
Input Splitting
10
Output Splitting
3,7
Tunnel
NetName
TM_D
Tunnel
rotation
NetName
CLK_READB
Or
Tunnel
rotation
NetName
CLK_WRITE
Tunnel
rotation
NetName
CLK_READB
Tunnel
rotation
NetName
SM_A
Probe