Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
litedram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel LiteX
litedram
Commits
11170685
Commit
11170685
authored
Nov 12, 2020
by
Florent Kermarrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
phy/s7ddrphy: make pads.dm optional (some boards have dm forced to ground).
parent
431e563a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
38 deletions
+39
-38
litedram/phy/s7ddrphy.py
litedram/phy/s7ddrphy.py
+39
-38
No files found.
litedram/phy/s7ddrphy.py
View file @
11170685
...
...
@@ -271,45 +271,46 @@ class S7DDRPHY(Module, AutoCSR):
)
# DM ---------------------------------------------------------------------------------------
for
i
in
range
(
databits
//
8
):
dm_o_nodelay
=
Signal
()
dm_o_bitslip
=
BitSlip
(
8
,
i
=
Cat
(
*
[
dfi
.
phases
[
n
//
2
].
wrdata_mask
[
n
%
2
*
databits
//
8
+
i
]
for
n
in
range
(
8
)]),
rst
=
(
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_bitslip_rst
.
re
)
|
self
.
_rst
.
storage
,
slp
=
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_bitslip
.
re
,
cycles
=
1
)
self
.
submodules
+=
dm_o_bitslip
self
.
specials
+=
Instance
(
"OSERDESE2"
,
p_SERDES_MODE
=
"MASTER"
,
p_DATA_WIDTH
=
2
*
nphases
,
p_TRISTATE_WIDTH
=
1
,
p_DATA_RATE_OQ
=
"DDR"
,
p_DATA_RATE_TQ
=
"BUF"
,
i_RST
=
ResetSignal
()
|
self
.
_rst
.
storage
,
i_CLK
=
ClockSignal
(
ddr_clk
),
i_CLKDIV
=
ClockSignal
(),
**
{
f"i_D
{
n
+
1
}
"
:
dm_o_bitslip
.
o
[
n
]
for
n
in
range
(
8
)},
i_OCE
=
1
,
o_OQ
=
dm_o_nodelay
if
with_odelay
else
pads
.
dm
[
i
],
)
if
with_odelay
:
self
.
specials
+=
Instance
(
"ODELAYE2"
,
p_SIGNAL_PATTERN
=
"DATA"
,
p_DELAY_SRC
=
"ODATAIN"
,
p_CINVCTRL_SEL
=
"FALSE"
,
p_HIGH_PERFORMANCE_MODE
=
"TRUE"
,
p_PIPE_SEL
=
"FALSE"
,
p_REFCLK_FREQUENCY
=
iodelay_clk_freq
/
1e6
,
p_ODELAY_TYPE
=
"VARIABLE"
,
p_ODELAY_VALUE
=
0
,
i_C
=
ClockSignal
(),
i_LD
=
(
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_rst
.
re
)
|
self
.
_rst
.
storage
,
i_LDPIPEEN
=
0
,
i_CE
=
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_inc
.
re
,
i_INC
=
1
,
o_ODATAIN
=
dm_o_nodelay
,
o_DATAOUT
=
pads
.
dm
[
i
],
if
hasattr
(
pads
,
"dm"
):
for
i
in
range
(
databits
//
8
):
dm_o_nodelay
=
Signal
()
dm_o_bitslip
=
BitSlip
(
8
,
i
=
Cat
(
*
[
dfi
.
phases
[
n
//
2
].
wrdata_mask
[
n
%
2
*
databits
//
8
+
i
]
for
n
in
range
(
8
)]),
rst
=
(
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_bitslip_rst
.
re
)
|
self
.
_rst
.
storage
,
slp
=
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_bitslip
.
re
,
cycles
=
1
)
self
.
submodules
+=
dm_o_bitslip
self
.
specials
+=
Instance
(
"OSERDESE2"
,
p_SERDES_MODE
=
"MASTER"
,
p_DATA_WIDTH
=
2
*
nphases
,
p_TRISTATE_WIDTH
=
1
,
p_DATA_RATE_OQ
=
"DDR"
,
p_DATA_RATE_TQ
=
"BUF"
,
i_RST
=
ResetSignal
()
|
self
.
_rst
.
storage
,
i_CLK
=
ClockSignal
(
ddr_clk
),
i_CLKDIV
=
ClockSignal
(),
**
{
f"i_D
{
n
+
1
}
"
:
dm_o_bitslip
.
o
[
n
]
for
n
in
range
(
8
)},
i_OCE
=
1
,
o_OQ
=
dm_o_nodelay
if
with_odelay
else
pads
.
dm
[
i
],
)
if
with_odelay
:
self
.
specials
+=
Instance
(
"ODELAYE2"
,
p_SIGNAL_PATTERN
=
"DATA"
,
p_DELAY_SRC
=
"ODATAIN"
,
p_CINVCTRL_SEL
=
"FALSE"
,
p_HIGH_PERFORMANCE_MODE
=
"TRUE"
,
p_PIPE_SEL
=
"FALSE"
,
p_REFCLK_FREQUENCY
=
iodelay_clk_freq
/
1e6
,
p_ODELAY_TYPE
=
"VARIABLE"
,
p_ODELAY_VALUE
=
0
,
i_C
=
ClockSignal
(),
i_LD
=
(
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_rst
.
re
)
|
self
.
_rst
.
storage
,
i_LDPIPEEN
=
0
,
i_CE
=
self
.
_dly_sel
.
storage
[
i
]
&
self
.
_wdly_dq_inc
.
re
,
i_INC
=
1
,
o_ODATAIN
=
dm_o_nodelay
,
o_DATAOUT
=
pads
.
dm
[
i
],
)
# DQ ---------------------------------------------------------------------------------------
dq_oe
=
Signal
()
...
...
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