DDR3介紹
DDR3芯片以 鎂光(Micron) 的 MT41J256M16為例:
MT41J256M16 – 32 Meg x 16 x 8 banks:在我看來,一共能存盤256M的16位數,一共4G,
地址:

命名規則
要注意的在Configuration和Speed Grade兩項,規定了存盤配置和時鐘速度,

內部結構:

管腳資訊:



The differential data strobe (DQS, DQS#) is transmitted externally, along with data, for use in data capture at the DDR3 SDRAM input receiver. DQS is center-aligned with data for WRITEs. The read data is transmitted by the DDR3 SDRAM and edge-aligned to the data strobes.
DQS信號在寫時,是與data中心對齊的;在讀時,是邊緣對齊的(也就是一起開始傳輸),
The DDR3 SDRAM operates from a differential clock (CK and CK#). The crossing of CK going HIGH and CK# going LOW is referred to as the positive edge of CK. Control, command, and address signals are registered at every positive edge of CK. Input data is registered on the first rising edge of DQS after the WRITE preamble, and output data is referenced on the first rising edge of DQS after the READ preamble.
Read and write accesses to the DDR3 SDRAM are burst-oriented. Accesses start at a selected location and continue for a programmed number of locations in a programmed sequence. Accesses begin with the registration of an ACTIVATE command, which is then followed by a READ or WRITE command. The address bits registered coincident with the ACTIVATE command are used to select the bank and row to be accessed. The address bits registered coincident with the READ or WRITE commands are used to select the bank and the starting column location for the burst access.
The device uses a READ and WRITE BL8 and BC4. An auto precharge function may be enabled to provide a self-timed row precharge that is initiated at the end of the burst access.
寫和讀都是突發傳輸的,突發長度可以是BL8和BC4,在發送讀命令和寫命令時,可以通過A12/BC#引腳進行切換,
芯片資料中還有一堆引數,電路的,用于時序分析的,還有命令和讀寫時序等,如果使用xilinx IP核mig進行開發,如果有這種芯片型號,這些都會自動配置好;沒有的話,就得自己根據引數進行配置,
芯片資料暫時就了解到這里,,,
開發板原理圖:
采用兩片DDR3將資料位寬變成32位,地址和控制管腳共用,DQ、DQS、DM信號分開,

MIG IP配置:


兼容性選擇:

芯片型別:


這里注意時鐘頻率(Clock Period)是所給時鐘的兩倍,即CLK是200M的,但是這里選擇400M,
此速度也是會受到FPGA和器件速度等級等因素的限制,
PHY to Controller Clock Ratio自動生成,這里顯示為4:1,那么,用戶時鐘就是100M的(IP例化時的ui_clk信號),

可以看到輸入時鐘為200M,
Memory Address Mapping Selection:BANK、ROW、COLUMN.

System Reset Polarity:選擇的是低有效,例化時要注意,





配置詳情要參考手冊UG586,
Block Diagram:

利用MIG IP核,我們只需要關注用戶側,User Interface,與DDR芯片連接的物理管腳,我們只需要知道約束就行,
用戶介面信號:


注意地址信號:

在我的設計中,地址信號如下所示,
wire [28:0] app_addr; //([0:0]Rank, [2:0]bank, [14:0]row, [9:0]colum)
Command Path:

Write Path:

Read Path:

在DDR中寫數,然后讀出,效果不錯,隨著狀態機的優化,讀出的時序好了很多,基本上連續,

讀出時,要等待一段時間,會延后較多,感覺是FIFO的原因,可以加一個等待讀完成的狀態,便于控制,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/237155.html
標籤:其他
上一篇:專案實戰:Qt+Arm+Fpga醫療腎鏡(又名內窺鏡)(實時影像、凍結、拍照、白平衡、九宮格、錄像、背光調整、硬體光源調整、光源手動自動調整、物理按鍵)
