Behavioral Model of A DDR Memory Controller in A DFi - Frequency Ratio System
Behavioral Model of A DDR Memory Controller in A DFi - Frequency Ratio System
Company
|
D&R China
|
dr-embedded.com
|
Wiki
|
Login
|
Subscribe to D&R SoC News Alert
SEARCH IP NEWS INDUSTRY ARTICLES BLOGS VIDEOS SLIDES EVENTS Search Industry Articles
Abstract
The design of a Memory Controller (MC) and its integration to a system has
long posed difficult challenges to engineers and system architects.
SEARCH SILICON IP
Interoperability between a Memory Controller and a PHY is one such 16,000 IP Cores from 450 Vendors
challenge. DFi™ is a standard that ensures the compatibility of DDR MC and
DDR PHY at target matched frequencies and frequency ratios. Enter Keywords....
In a frequency ratio system, the MC operates at half rate or quarter rate of
the PHY frequency. Hence, the timing relationship between DFi™ signals can
only be expressed in 2x or 4x of the PHY clock for a non-phased operation.
For phased operation, dedicated buses allow the establishment of timing
MINDTREE HOT IP
relationship other than 2x or 4x PHY clocks.
v5.2 Dual Mode Software Stack and
The phase information is encoded by the MC and issued as the ‘Phase N’ Profiles for Classic Bluetooth and
signals. The PHY decodes the ‘Phase N’ signals to generate the required Bluetooth l ...
timing signal and uses it for further operation.
v5.2 Link Layer, Physical Layer,
Software Stack and Profiles for Bluetooth
The DFi™ specification does not specify any format for phase encoding and
low e ...
exchange. This is left to the implementation. This paper presents a phase
encoding algorithm for the MC to establish a desired timing relationship with
PHY in a DFi™ frequency ratio system. The distinction of this approach is See MindTree IP >>
that the entire implementation of the phase relationship between MC and
PHY is reduced to a simple mathematical equation.
INTRODUCTION
RELATED ARTICLES
The paper details the DDR MC Phase encoding algorithm in a DFi™ frequency Which DDR SDRAM Memory to Use and
ratio system. It is intended for a technical audience interested in learning When
about how the DDR MC encodes the PHY timing information in the Phase- High Bandwidth Memory (HBM) Model &
Specific bus. Please refer to the DFi™ 3.1 specification for complete details Verification IP Implementation -
Beginner's guide
on frequency ratio systems.
Design Considerations for High Bandwidth
DFi™ is pervasive industry specification that defines an interface protocol Memory Controller
between DDR memory controllers and PHYs [2]. It enables the development System Security: A Model from Medieval
of systems-on-chip (SoCs) that support the latest DRAM standards.[1] History
Understanding the DFi™ from a MC perspective across all frequency-ratio Smart way to memory controller
systems can simplify the developments of the verification components for verification: Synopsys Memory VIP
the the protocol.
See MindTree Latest Articles >>
In DFi™ frequency-ratio system, Phasing is an important concept that helps
the DDR-MC to communicate timing parameters to the DDR-PHY. However,
DDR MC Phase encoding algorithm for a frequency ratio system is not in the
specification. Although, this algorithm is implementation specific, knowledge
of the MC phase encoding algorithm is important to effectively understand NEW ARTICLES
the control structure of the MC.
The Elements of Traceability
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 1/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
below mentioned aspects. 1. Implementing Parallel Processing and
Fine Control in Design Verification
Frequency Ratio Across the DFI 2. Dynamic Memory Allocation and
Fragmentation in C and C++
Frequency Ratio Clock Definition 3. System Verilog Macro: A Powerful
Write and Read Data Interface in Frequency Ratio Systems Feature for Design Verification
Projects
Encoding Timing Relationship Parameters
4. System Verilog Assertions Simplified
Conclusions and Related work.
5. Using SystemVerilog Assertions in RTL
Code
THE BODY
See the Top 20 >>
A. Frequency Ratio Across the DFi [2]
The DFI is defined at the MC to PHY boundary and therefore operates in the
clock frequency domain of the MC. The MC clock is always the DFI clock and E-mail This Article Printer-Friendly Page
all DFI signals are referenced from the MC clock. In a DDR memory
subsystem, it may be advantageous to operate the PHY at a higher
frequency than the MC. If the PHY operates at a multiple of the MC
frequency, the PHY transfers data at a higher data rate relative to the DFI
clock and the MC has the option to execute multiple commands in a single
DFI clock cycle.
DFI signals may be sent or received on the DFI PHY clock, provided the
signals reference the rising edge of the DFI clock and the clock is phase
aligned. The MC communicates frequency ratio settings to the PHY on the
dfi_freq_ratio signal. This signal is only required for devices using this
frequency ratio protocol.
The DFI clock and the DFI PHY clock must be phase-aligned and at a 1:2 or
1:4 frequency ratio relative to one another. Some DFI signals from the MC to
the PHY must communicate information about the signal in reference to the
DFI PHY clock to maintain the correct timing information. Therefore, the DFI
PHY clock is described in terms of phases, where the number of clock phases
for a system is the ratio of the DFI PHY clock to the DFI clock.
Write data and read data signals are defined on a per-phase basis and all
signal timing is in reference to the DFI clock. The PHY must account for any
assertions based on the DFI clock. Any signals driven by the PHY must only
change during phase 0 of the DFI PHY clock to allow the MC the full DFI clock
to capture the signal change.
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 2/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
The DFI specification supports the ability to send a unique command on each
phase of the DFI PHY clock. To communicate this information to the PHY, the
DFI specification defines commands for a frequency ratio system in a
vectored format. The PHY must maintain this information to preserve the
timing relationships between commands and data. Therefore, for frequency
ratio systems, the control signal interface, the write data interface and the
read data enable signal are all suffixed with a “_pN” where N is the phase
number. As an example, for a 1:2 frequency ratio system, instead of a single
dfi_address signal, there are 2 signals: dfi_address_p0 and dfi_address_p1.
The read data signal, read data valid and read data not valid signals are
suffixed with a “_wN” where N is the DFI data word.
The write data enable signal (dfi_wrdata_en_pN) indicates to the PHY that
valid dfi_wrdata will be transmitted in Tphy_wrdata cycles and its width
defines the number of data phases of the write. In order to communicate this
information to the PHY, the phase information must be encoded within the
signal. Therefore, this signal is also vectored into multiple signals based on
the frequency ratio. Similar to the DFI command, each signal is associated
with a phase of the DFI PHY clock.
Similar to the write data enable signal, the read data enable signal
(dfi_rddata_en_pN) defines the number of clocks between the read
command and the read data, and its width defines the number of data
phases of the read. The PHY sends read data to the MC on the
dfi_rddata_wN buses whenever read data is available, asserting the
associated dfi_rddata_valid_wN signals to inform the MC which buses contain
valid data. Unlike the read data enable signal which correlates to the phase
of the DFI PHY clock, the read data, read data valid and read data not valid
signals are all vectored with the DFI data word suffix.
i.e.,
In Table 2, Q1 and Q2 indicate the quotients when the PHY latency is divided
by 2 and 4 in a 1:2 and 1:4 frequency ratio system respectively.
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 3/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
(R2! =0)? (T=1) :( T=0) (2)
Fig. 3 represents the phase encoding algorithm for a 1:2 frequency ratio
system. It explains how the dfi_wrdata_en_pN and dfi_rddata_en_pN signals
are asserted based on the latency supported by the PHY for commands
arriving on various phase. It also explains how the timing relationship
between various data words is encoded within the phase specific data bus
adhering to the rotational order rule.
Table 3 shows the DFI clock at which the enable is asserted after the
command is issued in a phase specific bus .
S T T_en
0 0 Q1
0 1 Q1
1 0 Q1+S
1 1 Q1+S
Table 4 shows the DFI clock at which the data words are driven after the
enable is asserted in a phase specific bus based on the values of S and T .
S T T_data
0 0 Q2+T
0 1 Q2+T
1 0 Q2+¯T
1 1 Q2+T
Fig. 3 Phase encoding algorithm flowchart for 1:2 frequency ratio system
Table 6 shows the result generalized for a 1:4 and 1:2 frequency ratio
system by incorporating “(R1-S)” and “(R2-T)” factors. These factors do not
impact the phase encoding in the 1:2 frequency domain .
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 4/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
dfi_wrdata_en/dfi_rddata_en dfi_wrdata/dfi_rddata_valid/dfi_rddata
_pN to _p[N+S*T] asserted @T_data DFi
_pN asserted @T_en DFi clock
clock cycles from assertion of the first
cycles after command.
enable.
Remaining _pN asserted @Q1 Remaining _pN (if any) asserted @ Q2 after
DFi clock cycles after command. assertion of first enable.
dfi_wrdata_en/dfi_rddata_en dfi_wrdata/dfi_rddata_valid/dfi_rddata
_pN to _p[N+(R1 - S)] asserted _pN to _p[N+(R2-T)+S*T] asserted
@T_en DFi clock cycles after @T_data DFi clock cycles from assertion of
command. the first enable.
Remaining _pN asserted @Q1 Remaining _pN (if any) asserted @Q2 DFi
DFi clock cycles after command. after assertion of first enable.
Table 7 shows the minimum number of DFI clocks for which the dfi_*_en_pN
must be asserted for various burst lengths on the DDR-MC side.
Table 7: High time for enable signals for various burst lengths
III EXAMPLES
The following examples explain the various combination of PHY latencies and
the MC phase encoding algorithm for these latency.
a. Tphy_wrlat = 2; Tphy_wrdata = 2
Fig. 4 shows a 1:2 Frequency ratio Single Write command with data word of
burst length 16
b. Tphy_wrlat = 2; Tphy_wrdata = 1
Fig. 5 shows a 1:2 Frequency ratio Single Write command with data word of
burst length 16 ..
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 5/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
asserted. The subsequent data words (D2, D3, D4, D5, D6, and D7) are
driven incrementally in the subsequent phases (p0, p1, p0... etc.) in the
following clock edges.
c. Tphy_wrlat = 3; Tphy_wrdata = 2
Fig. 6 shows a 1:2 Frequency ration Single Write command with data word of
burst length 16
d. Tphy_wrlat = 3; Tphy_wrdata = 3
Fig. 7 shows a 1:2 Frequency ration Single Write command with data word of
burst length 16 .
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 6/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
Fig.4 1:2 Frequency Ratio Single Read with even Tphy_wrlat and even
Tphy_wrdata
Fig.5 1:2 Frequency Ratio Single Read with even Tphy_wrlat and odd
Tphy_wrdata
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 7/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
Fig.6 1:2 Frequency Ratio Single Read with odd Tphy_wrlat and even
Tphy_wrdata
Fig.7 1:2 Frequency Ratio Single Read with odd Tphy_wrlat and odd
Tphy_wrdata
IV. LIMITATIONS
This algorithm cannot be applied to a system that does not fall in the
category shown in Table 8. Many DFI systems do not require support for
burst transfers that are not a multiple of the frequency ratio. For example,
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 8/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
with a 4:1 frequency system, a burst of 4 DRAM words of data is transferred
on 2 DFI data words.
However, if a system does support these burst transfers, the PHY must
transfer the read data in a rotational order. Creating a system supporting
this combination, i.e., when the DFI read data for a single read does not use
the entire DFI read data interface, involves additional complexity that needs
to be accounted.
CONCLUSIONS
FUTURE WORK
We are currently extending the algorithm to 1:2N (N>2) frequency ratio, and
preliminary results are encouraging. Although there is no discussion
regarding a frequency ratio greater that 1:4. The algorithm can be extended
to a future memory type supporting higher frequency ratios.
ACKNOWLEDGEMENTS
The authors would like to thank Santosh Shivadatta (Director & Head – VLSI
,Engineering R&D Service Line , Mindtree Ltd) and Kumar S ( Project
Manager , VLSI ,Engineering R&D Service Line , Mindtree Ltd) for their
valuable comments and suggestions to improve the quality of the paper.
They are also grateful to Vinod Vishwa Gadde ( Senior Engineer , Mindtree
Ltd) for content review of this paper . The paper benifited greately from
comments by John MacLaren (Committee Chair, DFi) . This work was
supported in part by Mindtree VLSI-CoE.
REFERENCES
[1] https://www.ddr-phy.org
[3] Eilam, Eldad & Chikofsky, Elliot J. (2007). Reversing: secrets of reverse
engineering. John Wiley & Sons. p. 3. ISBN 978-0-7645-7481-8.
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 9/10
8/12/2021 Behavioral Model of a DDR Memory Controller in a DFi - Frequency Ratio System
Contact MindTree
Your Name:
Your E-mail
address:
Your Company
address:
Your Phone Number:
Write your message:
send
Partner with us List your Products Design-Reuse.com © 2021 Design And Reuse
Suppliers, list
your IPs for free.
Contact Us All Rights Reserved.
About us
D&R Partner Program No portion of this site may be copied, retransmitted,
Advertise with Us reposted, duplicated or otherwise used without the
Partner with us List your Products Privacy Policy express written permission of Design And Reuse.
https://www.design-reuse.com/articles/34410/behavioral-model-of-a-ddr-memory-controller-in-a-dfi-frequency-ratio-system.html 10/10