Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
2d03240b
Commit
2d03240b
authored
Feb 06, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finalizing initial x393 and dependencies
parent
cd610a00
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
420 additions
and
57 deletions
+420
-57
address_map.txt
address_map.txt
+26
-11
mcntrl393.v
memctrl/mcntrl393.v
+12
-9
mcntrl393_test01.v
memctrl/mcntrl393_test01.v
+258
-0
mcntrl_linear_rw.v
memctrl/mcntrl_linear_rw.v
+1
-1
mcntrl_tiled_rw.v
memctrl/mcntrl_tiled_rw.v
+1
-1
x393.v
x393.v
+122
-35
No files found.
address_map.txt
View file @
2d03240b
...
@@ -57,6 +57,11 @@
...
@@ -57,6 +57,11 @@
parameter MCONTR_TOP_16BIT_REFRESH_ADDRESS= 'h2, // 10 bits refresh address in the sequencer (PL) memory
parameter MCONTR_TOP_16BIT_REFRESH_ADDRESS= 'h2, // 10 bits refresh address in the sequencer (PL) memory
parameter MCONTR_TOP_16BIT_STATUS_CNTRL= 'h3, // 8 bits - write to status control (and debug?)
parameter MCONTR_TOP_16BIT_STATUS_CNTRL= 'h3, // 8 bits - write to status control (and debug?)
----
parameter MCNTRL_TEST01_ADDR= 'h0f0,
parameter MCNTRL_TEST01_MASK= 'h3f0
0x1100..11ff - 32-bit per-channel memory control
0x1100..11ff - 32-bit per-channel memory control
0x1100..110f - control of memory channels 0,1 - PS-controlled sequences
0x1100..110f - control of memory channels 0,1 - PS-controlled sequences
parameter MCNTRL_PS_ADDR= 'h100,
parameter MCNTRL_PS_ADDR= 'h100,
...
@@ -71,12 +76,8 @@
...
@@ -71,12 +76,8 @@
============= Add the following (addresses will vary for individual channels)
============= Add the following (addresses will vary for individual channels)
parameter ADDRESS_NUMBER= 15,
parameter MCNTRL_SCANLINE_CHN2_ADDR= 'h120,
parameter COLADDR_NUMBER= 10,
parameter MCNTRL_SCANLINE_CHN3_ADDR= 'h130,
parameter NUM_XFER_BITS= 6, // number of bits to specify transfer length
parameter FRAME_WIDTH_BITS= 13, // Maximal frame width - 8-word (16 bytes) bursts
parameter FRAME_HEIGHT_BITS= 16, // Maximal frame height
parameter MCNTRL_SCANLINE_ADDR= 'h120,
parameter MCNTRL_SCANLINE_MASK= 'h3f0, // both channels 0 and 1
parameter MCNTRL_SCANLINE_MASK= 'h3f0, // both channels 0 and 1
parameter MCNTRL_SCANLINE_MODE= 'h0, // set mode register: {extra_pages[1:0],write_mode,enable,!reset}
parameter MCNTRL_SCANLINE_MODE= 'h0, // set mode register: {extra_pages[1:0],write_mode,enable,!reset}
parameter MCNTRL_SCANLINE_STATUS_CNTRL= 'h1, // control status reporting
parameter MCNTRL_SCANLINE_STATUS_CNTRL= 'h1, // control status reporting
...
@@ -88,9 +89,20 @@
...
@@ -88,9 +89,20 @@
// Start XY can be used when read command to start from the middle
// Start XY can be used when read command to start from the middle
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// Read back current address (fro debugging)?
// Read back current address (fro debugging)?
parameter MCNTRL_SCANLINE_STATUS_REG_ADDR= 'h4,
============= Tiled read access (CHN4)
parameter MCNTRL_TILED_CHN4_ADDR= 'h140,
parameter MCNTRL_TILED_MASK= 'h3f0, // both channels 0 and 1
parameter MCNTRL_TILED_MODE= 'h0, // set mode register: {extra_pages[1:0],write_mode,enable,!reset}
parameter MCNTRL_TILED_STATUS_CNTRL= 'h1, // control status reporting
parameter MCNTRL_TILED_STARTADDR= 'h2, // 22-bit frame start address (3 CA LSBs==0. BA==0)
parameter MCNTRL_TILED_FRAME_FULL_WIDTH='h3, // Padded line length (8-row increment), in 8-bursts (16 bytes)
parameter MCNTRL_TILED_WINDOW_WH= 'h4, // low word - 13-bit window width (0->'n4000), high word - 16-bit frame height (0->'h10000)
parameter MCNTRL_TILED_WINDOW_X0Y0= 'h5, // low word - 13-bit window left, high word - 16-bit window top
parameter MCNTRL_TILED_WINDOW_STARTXY= 'h6, // low word - 13-bit start X (relative to window), high word - 16-bit start y
// Start XY can be used when read command to start from the middle
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// Read back current address (fro debugging)?
parameter MCNTRL_TILED_TILE_WH= 'h7, // low word - 6-bit tile width in 8-bursts, high - tile height (0 - > 64)
// Status read address
// Status read address
...
@@ -100,6 +112,9 @@
...
@@ -100,6 +112,9 @@
parameter MCONTR_PHY_STATUS_REG_ADDR= 'h0, // 8 or less bits: status register address to use for memory controller phy
parameter MCONTR_PHY_STATUS_REG_ADDR= 'h0, // 8 or less bits: status register address to use for memory controller phy
parameter MCONTR_TOP_STATUS_REG_ADDR= 'h1, // 8 or less bits: status register address to use for memory controller
parameter MCONTR_TOP_STATUS_REG_ADDR= 'h1, // 8 or less bits: status register address to use for memory controller
parameter MCNTRL_PS_STATUS_REG_ADDR= 'h2
parameter MCNTRL_PS_STATUS_REG_ADDR= 'h2
parameter MCNTRL_SCANLINE_STATUS_REG_CHN2_ADDR= 'h4,
parameter MCNTRL_SCANLINE_STATUS_REG_CHN3_ADDR= 'h5,
parameter MCNTRL_TILED_STATUS_REG_CH4_ADDR= 'h5,
================================ OLD =======================================================
================================ OLD =======================================================
Control addresses (in original ddrc_test01)
Control addresses (in original ddrc_test01)
...
...
memctrl/mcntrl393.v
View file @
2d03240b
...
@@ -175,8 +175,11 @@ module mcntrl393 #(
...
@@ -175,8 +175,11 @@ module mcntrl393 #(
parameter
MCNTRL_SCANLINE_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
parameter
MCNTRL_SCANLINE_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
// Start XY can be used when read command to start from the middle
// Start XY can be used when read command to start from the middle
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// Read back current address (fro debugging)?
// Read back current address (for debugging)?
parameter
MCNTRL_SCANLINE_STATUS_REG_ADDR
=
'h4
,
// parameter MCNTRL_SCANLINE_STATUS_REG_ADDR= 'h4,
parameter
MCNTRL_SCANLINE_STATUS_REG_CHN2_ADDR
=
'h4
,
parameter
MCNTRL_SCANLINE_STATUS_REG_CHN3_ADDR
=
'h5
,
parameter
MCNTRL_SCANLINE_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
parameter
MCNTRL_SCANLINE_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
// if memory controller will allow programming several sequences in advance to
// if memory controller will allow programming several sequences in advance to
// spread long-programming (tiled) over fast-programming (linear) requests.
// spread long-programming (tiled) over fast-programming (linear) requests.
...
@@ -184,7 +187,7 @@ module mcntrl393 #(
...
@@ -184,7 +187,7 @@ module mcntrl393 #(
parameter
MAX_TILE_WIDTH
=
6
,
// number of bits to specify maximal tile (width-1) (6 -> 64)
parameter
MAX_TILE_WIDTH
=
6
,
// number of bits to specify maximal tile (width-1) (6 -> 64)
parameter
MAX_TILE_HEIGHT
=
6
,
// number of bits to specify maximal tile (height-1) (6 -> 64)
parameter
MAX_TILE_HEIGHT
=
6
,
// number of bits to specify maximal tile (height-1) (6 -> 64)
parameter
MCNTRL_TILED_
ADDR
=
'h12
0
,
parameter
MCNTRL_TILED_
CHN4_ADDR
=
'h14
0
,
parameter
MCNTRL_TILED_MASK
=
'h3f0
,
// both channels 0 and 1
parameter
MCNTRL_TILED_MASK
=
'h3f0
,
// both channels 0 and 1
parameter
MCNTRL_TILED_MODE
=
'h0
,
// set mode register: {extra_pages[1:0],write_mode,enable,!reset}
parameter
MCNTRL_TILED_MODE
=
'h0
,
// set mode register: {extra_pages[1:0],write_mode,enable,!reset}
parameter
MCNTRL_TILED_STATUS_CNTRL
=
'h1
,
// control status reporting
parameter
MCNTRL_TILED_STATUS_CNTRL
=
'h1
,
// control status reporting
...
@@ -195,9 +198,9 @@ module mcntrl393 #(
...
@@ -195,9 +198,9 @@ module mcntrl393 #(
parameter
MCNTRL_TILED_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
parameter
MCNTRL_TILED_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
// Start XY can be used when read command to start from the middle
// Start XY can be used when read command to start from the middle
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// Read back current address (f
ro
debugging)?
// Read back current address (f
or
debugging)?
parameter
MCNTRL_TILED_TILE_WH
=
'h7
,
// low word - 6-bit tile width in 8-bursts, high - tile height (0 - > 64)
parameter
MCNTRL_TILED_TILE_WH
=
'h7
,
// low word - 6-bit tile width in 8-bursts, high - tile height (0 - > 64)
parameter
MCNTRL_TILED_STATUS_REG_ADDR
=
'h5
,
parameter
MCNTRL_TILED_STATUS_REG_
CHN4_
ADDR
=
'h5
,
parameter
MCNTRL_TILED_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
parameter
MCNTRL_TILED_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
// if memory controller will allow programming several sequences in advance to
// if memory controller will allow programming several sequences in advance to
// spread long-programming (tiled) over fast-programming (linear) requests.
// spread long-programming (tiled) over fast-programming (linear) requests.
...
@@ -620,7 +623,7 @@ module mcntrl393 #(
...
@@ -620,7 +623,7 @@ module mcntrl393 #(
.
FRAME_HEIGHT_BITS
(
FRAME_HEIGHT_BITS
)
,
.
FRAME_HEIGHT_BITS
(
FRAME_HEIGHT_BITS
)
,
.
MAX_TILE_WIDTH
(
MAX_TILE_WIDTH
)
,
.
MAX_TILE_WIDTH
(
MAX_TILE_WIDTH
)
,
.
MAX_TILE_HEIGHT
(
MAX_TILE_HEIGHT
)
,
.
MAX_TILE_HEIGHT
(
MAX_TILE_HEIGHT
)
,
.
MCNTRL_TILED_ADDR
(
MCNTRL_TILED_ADDR
)
,
.
MCNTRL_TILED_ADDR
(
MCNTRL_TILED_
CHN4_
ADDR
)
,
.
MCNTRL_TILED_MASK
(
MCNTRL_TILED_MASK
)
,
.
MCNTRL_TILED_MASK
(
MCNTRL_TILED_MASK
)
,
.
MCNTRL_TILED_MODE
(
MCNTRL_TILED_MODE
)
,
.
MCNTRL_TILED_MODE
(
MCNTRL_TILED_MODE
)
,
.
MCNTRL_TILED_STATUS_CNTRL
(
MCNTRL_TILED_STATUS_CNTRL
)
,
.
MCNTRL_TILED_STATUS_CNTRL
(
MCNTRL_TILED_STATUS_CNTRL
)
,
...
@@ -630,7 +633,7 @@ module mcntrl393 #(
...
@@ -630,7 +633,7 @@ module mcntrl393 #(
.
MCNTRL_TILED_WINDOW_X0Y0
(
MCNTRL_TILED_WINDOW_X0Y0
)
,
.
MCNTRL_TILED_WINDOW_X0Y0
(
MCNTRL_TILED_WINDOW_X0Y0
)
,
.
MCNTRL_TILED_WINDOW_STARTXY
(
MCNTRL_TILED_WINDOW_STARTXY
)
,
.
MCNTRL_TILED_WINDOW_STARTXY
(
MCNTRL_TILED_WINDOW_STARTXY
)
,
.
MCNTRL_TILED_TILE_WH
(
MCNTRL_TILED_TILE_WH
)
,
.
MCNTRL_TILED_TILE_WH
(
MCNTRL_TILED_TILE_WH
)
,
.
MCNTRL_TILED_STATUS_REG_ADDR
(
MCNTRL_TILED_STATUS_REG_ADDR
)
,
.
MCNTRL_TILED_STATUS_REG_ADDR
(
MCNTRL_TILED_STATUS_REG_
CHN4_
ADDR
)
,
.
MCNTRL_TILED_PENDING_CNTR_BITS
(
MCNTRL_TILED_PENDING_CNTR_BITS
)
,
.
MCNTRL_TILED_PENDING_CNTR_BITS
(
MCNTRL_TILED_PENDING_CNTR_BITS
)
,
.
MCNTRL_TILED_FRAME_PAGE_RESET
(
MCNTRL_TILED_FRAME_PAGE_RESET
)
,
.
MCNTRL_TILED_FRAME_PAGE_RESET
(
MCNTRL_TILED_FRAME_PAGE_RESET
)
,
.
MCNTRL_TILED_WRITE_MODE
(
1'b0
)
.
MCNTRL_TILED_WRITE_MODE
(
1'b0
)
...
@@ -788,7 +791,7 @@ module mcntrl393 #(
...
@@ -788,7 +791,7 @@ module mcntrl393 #(
.
MCNTRL_SCANLINE_WINDOW_WH
(
MCNTRL_SCANLINE_WINDOW_WH
)
,
.
MCNTRL_SCANLINE_WINDOW_WH
(
MCNTRL_SCANLINE_WINDOW_WH
)
,
.
MCNTRL_SCANLINE_WINDOW_X0Y0
(
MCNTRL_SCANLINE_WINDOW_X0Y0
)
,
.
MCNTRL_SCANLINE_WINDOW_X0Y0
(
MCNTRL_SCANLINE_WINDOW_X0Y0
)
,
.
MCNTRL_SCANLINE_WINDOW_STARTXY
(
MCNTRL_SCANLINE_WINDOW_STARTXY
)
,
.
MCNTRL_SCANLINE_WINDOW_STARTXY
(
MCNTRL_SCANLINE_WINDOW_STARTXY
)
,
.
MCNTRL_SCANLINE_STATUS_REG_ADDR
(
MCNTRL_SCANLINE_STATUS_REG_ADDR
)
,
.
MCNTRL_SCANLINE_STATUS_REG_ADDR
(
MCNTRL_SCANLINE_STATUS_REG_
CHN2_
ADDR
)
,
.
MCNTRL_SCANLINE_PENDING_CNTR_BITS
(
MCNTRL_SCANLINE_PENDING_CNTR_BITS
)
,
.
MCNTRL_SCANLINE_PENDING_CNTR_BITS
(
MCNTRL_SCANLINE_PENDING_CNTR_BITS
)
,
.
MCNTRL_SCANLINE_WRITE_MODE
(
1'b0
)
.
MCNTRL_SCANLINE_WRITE_MODE
(
1'b0
)
)
mcntrl_linear_rw_chn2_i
(
)
mcntrl_linear_rw_chn2_i
(
...
@@ -832,7 +835,7 @@ module mcntrl393 #(
...
@@ -832,7 +835,7 @@ module mcntrl393 #(
.
MCNTRL_SCANLINE_WINDOW_WH
(
MCNTRL_SCANLINE_WINDOW_WH
)
,
.
MCNTRL_SCANLINE_WINDOW_WH
(
MCNTRL_SCANLINE_WINDOW_WH
)
,
.
MCNTRL_SCANLINE_WINDOW_X0Y0
(
MCNTRL_SCANLINE_WINDOW_X0Y0
)
,
.
MCNTRL_SCANLINE_WINDOW_X0Y0
(
MCNTRL_SCANLINE_WINDOW_X0Y0
)
,
.
MCNTRL_SCANLINE_WINDOW_STARTXY
(
MCNTRL_SCANLINE_WINDOW_STARTXY
)
,
.
MCNTRL_SCANLINE_WINDOW_STARTXY
(
MCNTRL_SCANLINE_WINDOW_STARTXY
)
,
.
MCNTRL_SCANLINE_STATUS_REG_ADDR
(
MCNTRL_SCANLINE_STATUS_REG_ADDR
)
,
.
MCNTRL_SCANLINE_STATUS_REG_ADDR
(
MCNTRL_SCANLINE_STATUS_REG_
CHN3_
ADDR
)
,
.
MCNTRL_SCANLINE_PENDING_CNTR_BITS
(
MCNTRL_SCANLINE_PENDING_CNTR_BITS
)
,
.
MCNTRL_SCANLINE_PENDING_CNTR_BITS
(
MCNTRL_SCANLINE_PENDING_CNTR_BITS
)
,
.
MCNTRL_SCANLINE_WRITE_MODE
(
1'b1
)
.
MCNTRL_SCANLINE_WRITE_MODE
(
1'b1
)
)
mcntrl_linear_rw_chn3_i
(
)
mcntrl_linear_rw_chn3_i
(
...
...
memctrl/mcntrl393_test01.v
0 → 100644
View file @
2d03240b
This diff is collapsed.
Click to expand it.
memctrl/mcntrl_linear_rw.v
View file @
2d03240b
...
@@ -38,7 +38,7 @@ module mcntrl_linear_rw #(
...
@@ -38,7 +38,7 @@ module mcntrl_linear_rw #(
parameter
MCNTRL_SCANLINE_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
parameter
MCNTRL_SCANLINE_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
// Start XY can be used when read command to start from the middle
// Start XY can be used when read command to start from the middle
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// Read back current address (f
ro
debugging)?
// Read back current address (f
or
debugging)?
parameter
MCNTRL_SCANLINE_STATUS_REG_ADDR
=
'h4
,
parameter
MCNTRL_SCANLINE_STATUS_REG_ADDR
=
'h4
,
parameter
MCNTRL_SCANLINE_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
parameter
MCNTRL_SCANLINE_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
// if memory controller will allow programming several sequences in advance to
// if memory controller will allow programming several sequences in advance to
...
...
memctrl/mcntrl_tiled_rw.v
View file @
2d03240b
...
@@ -39,7 +39,7 @@ module mcntrl_tiled_rw#(
...
@@ -39,7 +39,7 @@ module mcntrl_tiled_rw#(
parameter
MCNTRL_TILED_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
parameter
MCNTRL_TILED_WINDOW_STARTXY
=
'h6
,
// low word - 13-bit start X (relative to window), high word - 16-bit start y
// Start XY can be used when read command to start from the middle
// Start XY can be used when read command to start from the middle
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// TODO: Add number of blocks to R/W? (blocks can be different) - total length?
// Read back current address (f
ro
debugging)?
// Read back current address (f
or
debugging)?
parameter
MCNTRL_TILED_TILE_WH
=
'h7
,
// low word - 6-bit tile width in 8-bursts, high - tile height (0 - > 64)
parameter
MCNTRL_TILED_TILE_WH
=
'h7
,
// low word - 6-bit tile width in 8-bursts, high - tile height (0 - > 64)
parameter
MCNTRL_TILED_STATUS_REG_ADDR
=
'h5
,
parameter
MCNTRL_TILED_STATUS_REG_ADDR
=
'h5
,
parameter
MCNTRL_TILED_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
parameter
MCNTRL_TILED_PENDING_CNTR_BITS
=
2
,
// Number of bits to count pending trasfers, currently 2 is enough, but may increase
...
...
x393.v
View file @
2d03240b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment