<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2020.87002</article-id><article-id pub-id-type="publisher-id">JCC-101322</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Design and Verification of SDRAM Controller Based on FPGA
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Song</surname><given-names>Won Kil</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Dong</surname><given-names>Ho Kim</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Hyo</surname><given-names>Il Ri</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Computer Science, University of Science, Pyongyang, D. P. R. Korea</addr-line></aff><pub-date pub-type="epub"><day>29</day><month>06</month><year>2020</year></pub-date><volume>08</volume><issue>07</issue><fpage>14</fpage><lpage>22</lpage><history><date date-type="received"><day>12,</day>	<month>May</month>	<year>2020</year></date><date date-type="rev-recd"><day>3,</day>	<month>July</month>	<year>2020</year>	</date><date date-type="accepted"><day>6,</day>	<month>July</month>	<year>2020</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  SDRAM (Synchronous DRAM) has become the memory standard in many digital system designs, because of low price and high read/write speed. In this paper, Based on the analysis of the working principle and characteristics of SDRAM, an SDRAM controller design method is proposed based on field programmable logic gate array FPGA. In order to reduce resource consumption and increase the read and write speed of SDRAM, the performance control of SDRAM is further optimized. We designed SDRAM controller by using Verilog HDL and Altera Quartus II 14.1 software, and simulated about this design with Model Sim-Altera 10.3c software. Then we verified this design by using Cyclone V 5CSEMA5F31C6 FPGA in DE1-SoC development board. The verification results show that the SDRAM is initialized successfully, the input and output data are completely consistent, and it has stable refresh and read and write functions. The SDRAM controller design meets the requirements.
 
</p></abstract><kwd-group><kwd>SDRAM Controller</kwd><kwd> Verilog HDL</kwd><kwd> DE1-SoC</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>SDRAM is a memory chip to use widely for embedded real-time systems and high-speed data transmission [<xref ref-type="bibr" rid="scirp.101322-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.101322-ref2">2</xref>].</p><p>In the development of computer systems, in order to give full play to the processor's ability to process data at high speed and improve the efficiency of the entire computer system, it is necessary to use cache technology to store input and output data, intermediate calculation results and temporary data exchanged with external memory Final Results. Most CPUs integrate a cache internally as a matching buffer between the processor and main memory. Cache generally uses SRAM, but although SRAM is high speed, but its capacity is small, so to complete a large amount of data cache generally uses DRAM as the main memory. The core of modern computer technology is an integrated circuit with transistors as the basic unit. For a long time, in the process manufacturing of computers, processors and main memories were manufactured using different production technology lines, so that they can meet the design to the maximum Demand [<xref ref-type="bibr" rid="scirp.101322-ref3">3</xref>].</p><p>The processor process line is manufactured on the basis of logic technology, using high-speed transistors and multilayer metals to achieve high system performance and operating frequency; and the main memory production line is manufactured on the basis of DRAM technology, using units as much as possible Small area capacitors, low leakage current transistors and multilayer polysilicon interconnects to achieve large capacity, low cost and low refresh intervals. With the gradual progress of integrated circuit technology, the average annual growth rate of processor performance from 1986 to 2004 is about 52%, and the average annual growth rate after 2004 is about 20% [<xref ref-type="bibr" rid="scirp.101322-ref4">4</xref>], but the average of main memory. The growth rate is only about 7% per year [<xref ref-type="bibr" rid="scirp.101322-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.101322-ref6">6</xref>], the performance difference between the processor and the main memory is increasing, and the performance of the main memory has become an important factor restricting the performance of the processor [<xref ref-type="bibr" rid="scirp.101322-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.101322-ref8">8</xref>], which is the famous “Memory Wall” problem [<xref ref-type="bibr" rid="scirp.101322-ref9">9</xref>].</p><p>In designing the SDRAM controller, Seiji Miura and Satoru Akiyamma focused on solving the latency problem in order to improve data transmission efficiency. Finally, two solutions, address queue and virtual cache, were proposed to reduce latency [<xref ref-type="bibr" rid="scirp.101322-ref10">10</xref>]. Bonatto, Soates, et al. in order to generate a smaller delay in the encoding of the management macro definition module based on the H.264/AVC video decoder, use a four-layer module structure to implement a multi-channel SDRAM controller [<xref ref-type="bibr" rid="scirp.101322-ref11">11</xref>].</p></sec><sec id="s2"><title>2. Design of SDRAM Controller</title><p>This SDRAM Controller is designed to interface to standard microprocessors. The controller is independent of processor type. This design supports two 16 MB memory regions configured as 4 M &#215; 32 bits. Changing byte enable inputs and address inputs will change the width and size of this design. For example, if a 64 bit wide data bus is desired, increase the byte enable signals from 4 to 8. If a larger memory space is required, add address inputs and reconfigure the row and column address appropriately or add more chip selects. An overview of the state machine of the SDRAM is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>The output signals of SDRAM controller depend on the kind of SDRAM command to perform. <xref ref-type="table" rid="table1"><xref ref-type="table" rid="table">Table </xref>1</xref> lists all SDRAM commands and output signals ( CS &#175; : Chip Select, RAS &#175; : Row Address Strobe, CAS &#175; : Column Address Strobe, WE &#175; : Write Enable, DQM: Data Qualifier Mask, ADD: Address).</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1"><xref ref-type="table" rid="table">Table </xref>1</xref></label><caption><title> <xref ref-type="table" rid="table">Table </xref>type styles</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Command</th><th align="center" valign="middle" >CS &#175;</th><th align="center" valign="middle" >RAS &#175;</th><th align="center" valign="middle" >CAS &#175;</th><th align="center" valign="middle" >WE &#175;</th><th align="center" valign="middle" >DQM</th><th align="center" valign="middle" >ADD</th></tr></thead><tr><td align="center" valign="middle" >Command Inhibit</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td></tr><tr><td align="center" valign="middle" >No Operation</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td></tr><tr><td align="center" valign="middle" >Activate</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >Bank/Row</td></tr><tr><td align="center" valign="middle" >Read</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >Bank/Col</td></tr><tr><td align="center" valign="middle" >Write</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >Bank/Col</td></tr><tr><td align="center" valign="middle" >Burst Terminate</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td></tr><tr><td align="center" valign="middle" >Precharge</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >code</td></tr><tr><td align="center" valign="middle" >Refresh</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >X</td></tr><tr><td align="center" valign="middle" >Load Mode Register</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >X</td><td align="center" valign="middle" >Opcode</td></tr><tr><td align="center" valign="middle" >Write Enable/Output Enable</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >L</td><td align="center" valign="middle" >-</td></tr><tr><td align="center" valign="middle" >Write Inhibit/Output High-Z</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >-</td><td align="center" valign="middle" >H</td><td align="center" valign="middle" >-</td></tr></tbody></table></table-wrap><sec id="s2_1"><title>2.1. Design of Top Level Module</title><p><xref ref-type="table" rid="table">Table </xref>2 shows the input/output signals of the SDRAM Controller. Signals ending with “_L” indicate an active low signal. This convention is used throughout the design. All input signals except SDRAM_EN must be synchronous to the clock. SDRAM_EN is synchronized internally. The name of top level module is SD_TOP.</p></sec><sec id="s2_2"><title>2.2. Design of Sub-Modules</title><p>The SDRAM Controller is comprised of a top-level module called SD_TOP as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>. This top-level module instantiates the four sub-modules: SD_CONFIG, SD_REFRESH, SD_STATE, SD_SIGNAL.</p><sec id="s2_2_1"><title>2.2.1. SD_CONFIG Module</title><p>The SD_CONFIG module performs the conﬁguration and initialization of the SDRAMs. When the reset signal becomes inactive, and if the SDRAM_EN signal</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table">Table </xref>2</label><caption><title> SDRAM signals</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Signal</th><th align="center" valign="middle" >Type</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >SDRAM_CS_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >SDRAM Chip Select from processor.</td></tr><tr><td align="center" valign="middle" >WR_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Write pulse from processor.</td></tr><tr><td align="center" valign="middle" >SDRAM_EN</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >SDRAM Enable signal—may be tied high.</td></tr><tr><td align="center" valign="middle" >TERM_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Terminates burst cycles.</td></tr><tr><td align="center" valign="middle" >CLK</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Input clock signal.</td></tr><tr><td align="center" valign="middle" >RST_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Reset signal.</td></tr><tr><td align="center" valign="middle" >BYTE_EN [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Byte enable signals.</td></tr><tr><td align="center" valign="middle" >ADD [24:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Processor Address bus. Used to address SDRAM.</td></tr><tr><td align="center" valign="middle" >SD_CKE</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Clock Enable signal.</td></tr><tr><td align="center" valign="middle" >SD_BA [1:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Bank Address signals.</td></tr><tr><td align="center" valign="middle" >SD_CS0_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Chip Select signal for lower 16 MB region.</td></tr><tr><td align="center" valign="middle" >SD_CS1_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Chip Select signal for upper 16 MB region.</td></tr><tr><td align="center" valign="middle" >SD_RAS_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Row Address Strobe.</td></tr><tr><td align="center" valign="middle" >SD_CAS_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Column Address Strobe.</td></tr><tr><td align="center" valign="middle" >SD_WE_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Write Enable Strobe.</td></tr><tr><td align="center" valign="middle" >SD_ADD [11:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Address Signals.</td></tr><tr><td align="center" valign="middle" >SD_DQM [3:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Data Qualiﬁer Mask.</td></tr><tr><td align="center" valign="middle" >ACK_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >Acknowledge—Indicates when data cycles are active.</td></tr><tr><td align="center" valign="middle" >SDRAM_SETUP</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Setup indicates that the SDRAM has been initialized.</td></tr></tbody></table></table-wrap><p>is active, this module sends requests to the state machine module to initialize the SDRAM. The SDRAM_EN signal could be removed from the design or can be tied high if this feature is not needed. If tied high, the controller will initialize the SDRAM sub-system when the reset signal becomes false.</p><p>The parameters for the mode register are stored in this module. These can be modiﬁed to suit the user’s speciﬁc needs. Some of the bits are reserved and must be kept as “0”. The parameters CAS LATENCY, BURST MODE, BURST LENGTH and BURST TYPE can be changed in this module.</p><p><xref ref-type="table" rid="table">Table </xref>3 describes the input and output signals of this module.</p></sec><sec id="s2_2_2"><title>2.2.2. SD_REFRESH Module</title><p>The SD_REFRESH module provides a refresh request signal to the state machine module. The refresh module has a 12 bit counter that is clocked by the system clock. The output of the counter is set so that a request occurs every 15.6 &#181;sec. The parameter value “count” can be changed depending on the clock frequency. The counter doesn’t start counting until after the SDRAM has been initialized.</p><p><xref ref-type="table" rid="table">Table </xref>4 describes the input and output signals of this module.</p></sec><sec id="s2_2_3"><title>2.2.3. SD_STATE Module</title><p>The SD_STATE module takes requests from:</p><p>• The processor to perform data cycles.</p><p>• The SD_CONFIG module to perform command cycles.</p><p>• The SD_REFRESH module to perform refresh cycles.</p><table-wrap id="table3" ><label><xref ref-type="table" rid="table">Table </xref>3</label><caption><title> SD_CONFIG signals</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Signal</th><th align="center" valign="middle" >Type</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >SDRAM_EN</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >SDRAM Enable signal.</td></tr><tr><td align="center" valign="middle" >CLK</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Clock signal.</td></tr><tr><td align="center" valign="middle" >RST_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Reset signal.</td></tr><tr><td align="center" valign="middle" >SDRAM_CYCLE [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >State machine bits: indicates the type of cycle: 00 = idle, 01 = command, 10 = data, 11 = refresh.</td></tr><tr><td align="center" valign="middle" >STATE_CNTR [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >State machine bits—indicates state of cycle.</td></tr><tr><td align="center" valign="middle" >SDRAM_MODE_REG [11:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >Mode Register Value.</td></tr><tr><td align="center" valign="middle" >SDRAM_CMND [1:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM command desired: 00 = nop, 01 = precharge, 10 = autorefresh, 11 = load mode register.</td></tr><tr><td align="center" valign="middle" >CMND_CYCLE_REQ</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >Command Cycle Request to state machine.</td></tr><tr><td align="center" valign="middle" >SDRAM_SETUP</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >Indicates SDRAM setup is complete.</td></tr></tbody></table></table-wrap><table-wrap id="table4" ><label><xref ref-type="table" rid="table">Table </xref>4</label><caption><title> SD_REFRESH signals</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Signal</th><th align="center" valign="middle" >Type</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >CLK</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Clock signal.</td></tr><tr><td align="center" valign="middle" >RST_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Reset signal.</td></tr><tr><td align="center" valign="middle" >SDRAM_SETUP</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Indicates SDRAM setup is complete.</td></tr><tr><td align="center" valign="middle" >SDRAM_CYCLE [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >State machine bits—indicates the type of cycle: 00 = idle, 01 = command, 10 = data, 11 = refresh.</td></tr><tr><td align="center" valign="middle" >RFRSH_REQ</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >Refresh cycle request to state machine.</td></tr></tbody></table></table-wrap><p>It outputs a state type vector as well as a state bit vector. The type vector indicates what type of cycle is being performed. The bit vector indicates the state cycle. <xref ref-type="table" rid="table">Table </xref>5 describes the input/output signals for this module.</p></sec><sec id="s2_2_4"><title>2.2.4. SD_SIGNAL Signals</title><p>The SD_SIGNAL module outputs the appropriate SDRAM signals depending on what type of cycle is occurring and where the state machine is at in the cycle. <xref ref-type="table" rid="table">Table </xref>6 describes the input and output signals for this module.</p></sec></sec></sec><sec id="s3"><title>3. Synthesis of SDRAM Controller</title><p>This design was synthesized by using Altera Quartus II 14.1 and Altera’s Cyclone V 5CSEMA5F31C6 FPGA. The results of systhesis about each module of SDRAM controller shown below in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p><p><xref ref-type="table" rid="table">Table </xref>7 lists all resource consumption used to synthesis of SDRAM controller.</p><table-wrap id="table5" ><label><xref ref-type="table" rid="table">Table </xref>5</label><caption><title> SD_STATE signals</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Signal</th><th align="center" valign="middle" >Type</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >SDRAM_CS_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Chip select signal from processor.</td></tr><tr><td align="center" valign="middle" >CMND_CYCL_REQ</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Command cycle request from SD_CONFIG module.</td></tr><tr><td align="center" valign="middle" >RFRSH_REQ</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Refresh request from SD_REFRESH module.</td></tr><tr><td align="center" valign="middle" >CLK</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Clock signal.</td></tr><tr><td align="center" valign="middle" >RST_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Reset signal.</td></tr><tr><td align="center" valign="middle" >SDRAM_CYCLE</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >State machine bits: indicates the type of cycle: 00 = idle, 01 = command, 10 = data, 11 = refresh.</td></tr><tr><td align="center" valign="middle" >STATE_CNTR [3:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >State machine bits: indicates state of cycle.</td></tr></tbody></table></table-wrap><table-wrap id="table6" ><label><xref ref-type="table" rid="table">Table </xref>6</label><caption><title> SD_SGINAL signals</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Signal</th><th align="center" valign="middle" >Type</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >ADD [24:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Address bus from processor.</td></tr><tr><td align="center" valign="middle" >WR_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Write strobe from processor.</td></tr><tr><td align="center" valign="middle" >BYTE_EN [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Byte enable signals from processor.</td></tr><tr><td align="center" valign="middle" >TERM_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Terminate signal from processor.</td></tr><tr><td align="center" valign="middle" >SDRAM_CYCLE [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >State machine bits—indicates the type of cycle: 00 = idle, 01 = command, 10 = data, 11 = refresh.</td></tr><tr><td align="center" valign="middle" >STATE_CNTR [3:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >State machine bits—indicates state of cycle.</td></tr><tr><td align="center" valign="middle" >SDRAM_MODE_REG [11:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Mode Register Value.</td></tr><tr><td align="center" valign="middle" >SDRAM_CMND [1:0]</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >SDRAM command desired: 00 = nop, 01 = precharge, 10 = autorefresh, 11 = load mode register.</td></tr><tr><td align="center" valign="middle" >CLK</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Clock signal.</td></tr><tr><td align="center" valign="middle" >RST_L</td><td align="center" valign="middle" >Input</td><td align="center" valign="middle" >Reset signal.</td></tr><tr><td align="center" valign="middle" >SD_CKE</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Clock Enable signal.</td></tr><tr><td align="center" valign="middle" >SD_BA [1:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Bank Address signals.</td></tr><tr><td align="center" valign="middle" >SD_CS0_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Chip Select signal for lower 16 MB region.</td></tr><tr><td align="center" valign="middle" >SD_CS1_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Chip Select signal for upper 16 MB region.</td></tr><tr><td align="center" valign="middle" >SD_RAS_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Row Address Strobe.</td></tr><tr><td align="center" valign="middle" >SD_CAS_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Column Address Strobe.</td></tr><tr><td align="center" valign="middle" >SD_WE_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Write Enable Strobe.</td></tr><tr><td align="center" valign="middle" >SD_ADD [11:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Address Signals.</td></tr><tr><td align="center" valign="middle" >SD_DQM [3:0]</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >SDRAM Data Qualiﬁer Mask.</td></tr><tr><td align="center" valign="middle" >ACK_L</td><td align="center" valign="middle" >Output</td><td align="center" valign="middle" >Acknowledge—indicates when data cycles are active.</td></tr></tbody></table></table-wrap><table-wrap id="table7" ><label><xref ref-type="table" rid="table">Table </xref>7</label><caption><title> The resource consumption of SDRAM controller</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >FPGA device</th><th align="center" valign="middle" >Cyclone V 5CSEMA5F31C6</th></tr></thead><tr><td align="center" valign="middle" >Logical utilization</td><td align="center" valign="middle" >46/32,070 (&lt;1%)</td></tr><tr><td align="center" valign="middle" >Total registers</td><td align="center" valign="middle" >75</td></tr><tr><td align="center" valign="middle" >Total pins</td><td align="center" valign="middle" >61/457 (13%)</td></tr><tr><td align="center" valign="middle" >Total block memory bits</td><td align="center" valign="middle" >0/4,065,280 (0%)</td></tr><tr><td align="center" valign="middle" >Total DSP Blocks</td><td align="center" valign="middle" >0/87 (0%)</td></tr></tbody></table></table-wrap></sec><sec id="s4"><title>4. Simulation and Verification of SDRAM Controller</title><p>This design was simulated by using Model Sim-Altera 10.3c software. For simulation, it used 100 MHz clock frequency to be provided by PLL (Phase Locked Loop). The results of simulation about read and write cycle of SDRAM controller shown below in <xref ref-type="fig" rid="fig4">Figure 4</xref> and <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p></sec><sec id="s5"><title>5. Conclusion</title><p>We verified accuracy of design through the simulation and downloaded code at Cyclone V 5CSEMA5F31C6 FPGA in DE1-SoC development board. Then we linked with display unit by VGA bus and showed image stored to SDRAM at scene. The result shows that the SDRAM controller designed in this paper satisfy requirement of design.</p></sec><sec id="s6"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s7"><title>Cite this paper</title><p>Kil, S.W., Kim, D.H. and Ri, H.I. (2020) Design and Verification of SDRAM Controller Based on FPGA. Journal of Computer and Communications, 8, 14-22. https://doi.org/10.4236/jcc.2020.87002</p></sec></body><back><ref-list><title>References</title><ref id="scirp.101322-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Anup, P. and Ramana Reddy, R. (2012) A Low Power DDR SDRAM Controller Design. International Journal of Computer Science and Information Technologies, 3, 4270-4274.</mixed-citation></ref><ref id="scirp.101322-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Sharma, D. and Bhargava, S. (2011) Design and VLSI Implementation of DDR SDRAM Controller for High Speed Applications. International Journal of Computer Science and Information Technologies, 2, 1625-1632.</mixed-citation></ref><ref id="scirp.101322-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Upadhyay, P., Kar, R., et al. (2019) A Design of Highly Stable and Low-Power SRAM Cell. Advances in Computer Communication and Computational Sciences, 759, 281-289. https://doi.org/10.1007/978-981-13-0341-8_26</mixed-citation></ref><ref id="scirp.101322-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Wulf, W.A. and McKee, S.A. (1995) Hitting the Memory Wall: Implications of the Obvious. Computer Architecture News, 23, 20-24. https://doi.org/10.1145/216585.216588</mixed-citation></ref><ref id="scirp.101322-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Wilkes, M.V. (1995) The Memory Wall and the CMOS End-Point. Computer Architecture News, 23, 4-6. https://doi.org/10.1145/218864.218865</mixed-citation></ref><ref id="scirp.101322-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Burger, D.C., Goodman, J.R. and Kagi, A. (1995) The Declining Effectiveness of Dynamic Caching for General-Purpose Microprocessors. Technical Report 1261, Computer Sciences Department, University of Wisconsin, Madison, WI.</mixed-citation></ref><ref id="scirp.101322-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Kagi, A., Goodman, J.R. and Burger, D. (1996) Memory Bandwidth Limitations of Future Microprocessors. 23rd Annual International Symposium on Computer Architecture (ISCA 1996), Philadelphia, PA, 24 May 1996, 78-89.</mixed-citation></ref><ref id="scirp.101322-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Huh, J., Burger, D. and Keckler, S.W. (2001) Exploring the Design Space of Future CMPs. International Conference on Parallel Architectures and Compilation Techniques (PACT 2001), Barcelona, Spain, 8-12 September 2001, 199-210.</mixed-citation></ref><ref id="scirp.101322-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Rogers, B., Krishna, A., Bell, G., et al. (2009) Scaling the Bandwidth Wall: Challenges in and Avenues for CMP Scaling. 36th Annual International Symposium on Computer Architecture (ISCA 2009), Austin, TX, 20-24 June 2009, 371-382. https://doi.org/10.1145/1555754.1555801</mixed-citation></ref><ref id="scirp.101322-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Miura, S. and Akiyama, S. (2005) A Memory Controller That Reduces Latency of Cached SDRAM. 2005 IEEE International Symposium on Circuits and Systems, Kobe, Japan, 23-26 May 2005, 5250-5253. https://doi.org/10.1109/ISCAS.2005.1465819</mixed-citation></ref><ref id="scirp.101322-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Bonatto, A.C., Soares, A.B. and Susin, A.A. (2011) Multichannel SDRAM Controller Design for H.264/AVC Video Decoder. 2011 VII Southern Conference on Programmable Logic (SPL), Cordoba, Argentina, 137-142. https://doi.org/10.1109/SPL.2011.5782638</mixed-citation></ref></ref-list></back></article>