SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7



      Hdl Implementation of Amba-Ahb Compatible Memory Controller
      1,
        S.Ramakrishna , 2,K.Venugopal, 3,B.Vijay Bhasker ,4, R.Surya Prakash Rao
                                            1,2,3,4,
                                                   St Theresa college of Eng ineering



Abstract
         Microprocessor performance has improved rapidly these years. In contrast, memo ry latencies and bandwidths have
improved little. The result is that the memory access time has been a bottleneck which limits the system performance. Memo ry
controller (M C) is designed and built to attacking this problem. The memo ry controller is the part of the system that, well,
controls the memory. The memory controller is normally integrated into the system chipset. This paper shows how to build an
Advanced Microcontroller Bus Architecture (AMBA) co mpliant MC as an Advanced High-performance Bus (AHB) slave.
The MC is designed for system memo ry control with the main memory consisting of SRAM and ROM. Additionally, the
problems met in the design process are discussed and the solutions are given in the paper.

Keywords - ARM; AMBA; Memory Controller; A HB bus

I. Introduction
          With the improvement of Microprocessor these years, the memory access time has been a bottleneck which limits the
system performance. Memory controller (MC) is designed and built to attacking this problem. The memory controller is the
part of the system that, well, controls the memory. It generates the necessary signals to control the reading and writing of
informat ion fro m and to the memory, and interfaces the memory with the other major parts of the system. The memo ry
controller is normally integrated into the system chipset. In this paper, an Advanced Microcontroller Bus Architecture
(AMBA) co mp liant memo ry controller is designed for system
memo ry control with the main memory consisting of SRAM and ROM. The memory controlle r is compatib le with Advanced
High-performance Bus (AHB) which is a new generation of AM BA bus, so we call it “A HB-M C”. The A HB-M C has several

features which are shown as flows
1. Designed with synthesizable HDL for Application Specific Integrated Circu it (ASIC) synthesis
2. 2.Supports mu ltiple memory devices including static random access memory (SRAM), read -only
3. memo ry (ROM)
4. Co mplies with AMBA AHB protocol
5. Supports one to four memory banks for SRAM and ROM
     Programmab le memo ry timing reg ister and configuration registers
     Shared data path between memory devices to reduce pin count
     Asynchronous FIFO to support burst transaction up to 16-beats This paper describes how to build the AHB-M C. And
     combin ing the problem met in the process of designing, the corresponding solutions are presented. Finally, the simu lation
     results are presented.

II. Architecture of Ahb-Mc
The AHB-M C mainly consists of three modules: AHB slave interface, configurat ion interface, and external memory interface
[1]. Figure 1 shows the architecture of AHB-M C.




A. AHB slave interface
The AHB slave interface converts the incoming AHB transfers to the protocol used internally by the AHB-M C. The state


Issn 2250-3005(online)                                           November| 2012                                Page 20
I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7




mach ine is shown in Figure 2.
B. External memory interface
        The external memory issues commands to the memo ry fro m the co mmand FIFO, and controls the cycle timings of
these commands. The state machine is shown in Figure3.




Figure 4 and Figure 5 show the timing of a read fro m memory and a write to memory with two wait states [2]. Figure 4.
Memory read with two wait states Figure 5. Memory write with two wait states
Memory bank select
         Because system will change the memory map after system boot, AHB-M C is designed to support a remap signal
which is used to provide a different memory map. AHB-MC has four memo ry banks, wh ich are selected by XCSN signal. The
XCSN signal is controlled by the address of a valid transfer, and the system memo ry map mode. So before the system memo ry
is remapped, the boot ROM at 0x3000 0000 is also mapped to the base address of 0x0000 0000 as shown in Table 1
TABLE1
1. Memory write control
       To support for writ ing in word (32-bits), half-word (16-b its) and byte (8-bits), the XWEN signal is used in the AHB-
MC. Table 2 shows the relationship between XCSN and the inputs fro m AHB bus.

C. Configurati on i nterface
         The main function of the configuration interface is to change the configuration registers (SETCYCLE and
SETOPMODE register) according to the commands from A HB to APB bridge wh ich converts AHB transfers fro m the
configuration port to the APB transfers that the configuration interface require [3]. Each memo ry chip supported by AHB-MC
has two registers (CYCLE reg ister and OPM ODE reg ister), which contain all the timing parameters that are required for
configuration registers: SETCYCLE and SETOPMODE as shown in fig 5
Fig 6




III. Burst Transfer Support
         With the increasing system frequency, it’s hard to accomplish the address decoding and memory access operations in
one clock cycle. Therefore, wait states are inserted into the data cycle to ensure there is enough time for address decoding and
memo ry accessing. But the method that inserting wait state will cause system performance drop dramatically. Therefore, a
sequential-access (burst) method is presented to resolve this problem in this paper. In this method, all AHB fixed length burst
types are directly translated to fixed length bursts, and all undefined length INCR bursts are converted to INCR4 bursts. Burst
Issn 2250-3005(online)                                          November| 2012                                 Page 21
I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7



operation has performance benefits because when the first beat of a burst is accepted, it contains data about the remaining
beats. For examp le, when AHB-M C got the first beat of a read burst, all the data required to complete the transfer can be read
fro m memory and restored in the read data FIFO. SO this first transfer has some delay before data is returned. But subsequent
beats of the burst can have less delay because the data they require might have already been prepared in the FIFO. To fu rther
improve the system performance, a RETRY response is used that AHB-MC can release the bus when it is preparing the data
[4]. Th is mechanism allows the transfer to finish on the bus and therefore allo ws a higher-priority master to get access to the




 state machine is showed in Fig 7

IV. Memory System
         In the arm arch itecture, instructions are all 32-bits, wh ile instructions are 8-bits in the external ROM and SRAM.
Therefore the lo west two addresses of ROM and SRAM are not connected to the external address bus. Additionally, to support
byte writing, SRAM needs to be separated as four independent banks or has a byte-write enable signal. The basic memory




                                             Fig 8system architecture is shown in

V. Asynchronous Clock
       The AHB-M C has two clock domains: AHB clock domain and external memo ry clock domain as shown in Figure 8.
Asynchronous FIFO is used between two clock do mains as a data buffer.




                                                              Fig 9
         The main benefit of asynchronous clocking is that you can maximize the system performance, while running the
memo ry interface at a fixed system frequency. Additionally, in sleep-mode situations when the system is not required to do
much work, you can lower the frequency to reduce power consumption [5]. However, asynchronous clock will cause the flip-
flop going metastable state and not converging to a legal stable state by the time the output must be sampled again as shown in
Figure 10. To resolve this problem, the most common way is inserting a two-flip-flop synchronizer as shown in Figure

VI. Verification and Simulation Results
Issn 2250-3005(online)                                         November| 2012                                   Page 22
I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7



         The verification method used in this paper, is to put the AHB-MC into a min imu m system wh ich consists of ARM
core, AHB bus, APB bus and AHB-M C The code used for testing is put in ROM, if the system can work correct ly, then we
know the testcase past. The simu lation waveforms of a simp le test code are shown. Figure 13 shows read with zero wait states
form theexternal ROM. The address is registered at rising edge of hclk (AHB bus clock), after which ex_oen (external
memo ry read enable) signal goes high, then read data reach hrdata (AHB read data bus) at falling edge of hclk. Fig 13 Write
with zero states to the external RAM is shownin Figure 14. A write operation is init iated by hwrite going high. Then the
address is send to external memo ry address bus and ex_wen (external memo ry write enalbe) signal goes low to enable the data
fro m h wdata (AHB write data bus) stored in the RAM fig 14


References
[1]   “AMBA Specification (Rev 2.0)”, ARM Inc.
[2]   “PrimeCell A HB SRAM/NOR Memory Controller”, Technical Reference Manual, A RM Inc.
[3]   “AHB Examp le AM BA System”, Technical Reference Manual, A RM Inc.
[4]   Carter, J.; Hsieh,W., “Impulse: building a s marter memory controller”, High -Performance Co mputer Architecture,
      Dept. of Co mput. Sci., Utah Univ., Salt Lake City, UT.
[5]   Clifford E. Cu mmings, “Synthes is and scripting Techniques for Designing Multi-Asynchronous Clock Designs”,
      Sunburst Design, Inc




Issn 2250-3005(online)                                        November| 2012                                 Page 23

Mais conteúdo relacionado

Mais procurados

A Novel Architecture Design & Characterization of CAM Controller IP Core with...
A Novel Architecture Design & Characterization of CAM Controller IP Core with...A Novel Architecture Design & Characterization of CAM Controller IP Core with...
A Novel Architecture Design & Characterization of CAM Controller IP Core with...idescitation
 
Data Manipulation
Data ManipulationData Manipulation
Data ManipulationAsfi Bhai
 
Static-Noise-Margin Analysis of Modified 6T SRAM Cell during Read Operation
Static-Noise-Margin Analysis of Modified 6T SRAM Cell during Read OperationStatic-Noise-Margin Analysis of Modified 6T SRAM Cell during Read Operation
Static-Noise-Margin Analysis of Modified 6T SRAM Cell during Read Operationidescitation
 
250nm Technology Based Low Power SRAM Memory
250nm Technology Based Low Power SRAM Memory250nm Technology Based Low Power SRAM Memory
250nm Technology Based Low Power SRAM Memoryiosrjce
 
VTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer NotesVTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer Notes24x7house
 
Cache Design for an Alpha Microprocessor
Cache Design for an Alpha MicroprocessorCache Design for an Alpha Microprocessor
Cache Design for an Alpha MicroprocessorBharat Biyani
 
Evaluation of Branch Predictors
Evaluation of Branch PredictorsEvaluation of Branch Predictors
Evaluation of Branch PredictorsBharat Biyani
 
Computer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and OrganizationComputer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and OrganizationSmit Luvani
 
301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilogSrinivas Naidu
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESDr.MAYA NAYAK
 
the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1Basel Mansour
 
computer architecture
computer architecture computer architecture
computer architecture Dr.Umadevi V
 
Direct Memory Access(DMA)
Direct Memory Access(DMA)Direct Memory Access(DMA)
Direct Memory Access(DMA)Page Maker
 

Mais procurados (20)

Unit2 arm
Unit2 armUnit2 arm
Unit2 arm
 
RAM Design
RAM DesignRAM Design
RAM Design
 
A Novel Architecture Design & Characterization of CAM Controller IP Core with...
A Novel Architecture Design & Characterization of CAM Controller IP Core with...A Novel Architecture Design & Characterization of CAM Controller IP Core with...
A Novel Architecture Design & Characterization of CAM Controller IP Core with...
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
64 bit sram memory: design paper
64 bit sram memory: design paper64 bit sram memory: design paper
64 bit sram memory: design paper
 
Static-Noise-Margin Analysis of Modified 6T SRAM Cell during Read Operation
Static-Noise-Margin Analysis of Modified 6T SRAM Cell during Read OperationStatic-Noise-Margin Analysis of Modified 6T SRAM Cell during Read Operation
Static-Noise-Margin Analysis of Modified 6T SRAM Cell during Read Operation
 
Pipeline
PipelinePipeline
Pipeline
 
250nm Technology Based Low Power SRAM Memory
250nm Technology Based Low Power SRAM Memory250nm Technology Based Low Power SRAM Memory
250nm Technology Based Low Power SRAM Memory
 
Bc0040
Bc0040Bc0040
Bc0040
 
VTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer NotesVTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer Notes
 
Cache Design for an Alpha Microprocessor
Cache Design for an Alpha MicroprocessorCache Design for an Alpha Microprocessor
Cache Design for an Alpha Microprocessor
 
Evaluation of Branch Predictors
Evaluation of Branch PredictorsEvaluation of Branch Predictors
Evaluation of Branch Predictors
 
Computer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and OrganizationComputer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and Organization
 
Unit 2
Unit 2Unit 2
Unit 2
 
Ec8791 arm 9 processor
Ec8791 arm 9 processorEc8791 arm 9 processor
Ec8791 arm 9 processor
 
301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTES
 
the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1
 
computer architecture
computer architecture computer architecture
computer architecture
 
Direct Memory Access(DMA)
Direct Memory Access(DMA)Direct Memory Access(DMA)
Direct Memory Access(DMA)
 

Destaque

Design of open core protocl ocp abstract
Design of open core protocl ocp abstractDesign of open core protocl ocp abstract
Design of open core protocl ocp abstractZubed Uddin
 
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...IDES Editor
 
Design of open core protocol ocp
Design of open core protocol ocpDesign of open core protocol ocp
Design of open core protocol ocpZubed Uddin
 
Reusability And Reusable Design
Reusability And Reusable DesignReusability And Reusable Design
Reusability And Reusable DesignBen Clark
 
Diagnostic Access of AMBA-AHB Communication Protocols
Diagnostic Access of AMBA-AHB Communication ProtocolsDiagnostic Access of AMBA-AHB Communication Protocols
Diagnostic Access of AMBA-AHB Communication Protocolsidescitation
 
Design and Analysis of Xilinx Verified AMBA Bridge for SoC Systems
Design and Analysis of Xilinx Verified AMBA Bridge for SoC SystemsDesign and Analysis of Xilinx Verified AMBA Bridge for SoC Systems
Design and Analysis of Xilinx Verified AMBA Bridge for SoC Systemsidescitation
 
Usb 3.0 technology mindshare
Usb 3.0 technology mindshareUsb 3.0 technology mindshare
Usb 3.0 technology mindshareNguyen Nhat Han
 
Unit3 pipelining io organization
Unit3 pipelining  io organizationUnit3 pipelining  io organization
Unit3 pipelining io organizationSwathi Veeradhi
 
Ihi0022 d amba_axi_protocol_spec
Ihi0022 d amba_axi_protocol_specIhi0022 d amba_axi_protocol_spec
Ihi0022 d amba_axi_protocol_specharishreddy1990
 

Destaque (20)

Bg36347351
Bg36347351Bg36347351
Bg36347351
 
Gc2411021106
Gc2411021106Gc2411021106
Gc2411021106
 
S emb t8-arch_itfio
S emb t8-arch_itfioS emb t8-arch_itfio
S emb t8-arch_itfio
 
40120130406005
4012013040600540120130406005
40120130406005
 
Design of open core protocl ocp abstract
Design of open core protocl ocp abstractDesign of open core protocl ocp abstract
Design of open core protocl ocp abstract
 
Cd36479483
Cd36479483Cd36479483
Cd36479483
 
Ek31903907
Ek31903907Ek31903907
Ek31903907
 
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
 
Design of open core protocol ocp
Design of open core protocol ocpDesign of open core protocol ocp
Design of open core protocol ocp
 
Wishbone
WishboneWishbone
Wishbone
 
Reusability And Reusable Design
Reusability And Reusable DesignReusability And Reusable Design
Reusability And Reusable Design
 
Diagnostic Access of AMBA-AHB Communication Protocols
Diagnostic Access of AMBA-AHB Communication ProtocolsDiagnostic Access of AMBA-AHB Communication Protocols
Diagnostic Access of AMBA-AHB Communication Protocols
 
Design and Analysis of Xilinx Verified AMBA Bridge for SoC Systems
Design and Analysis of Xilinx Verified AMBA Bridge for SoC SystemsDesign and Analysis of Xilinx Verified AMBA Bridge for SoC Systems
Design and Analysis of Xilinx Verified AMBA Bridge for SoC Systems
 
Cp33551556
Cp33551556Cp33551556
Cp33551556
 
61
6161
61
 
Usb 3.0 technology mindshare
Usb 3.0 technology mindshareUsb 3.0 technology mindshare
Usb 3.0 technology mindshare
 
Unit3 pipelining io organization
Unit3 pipelining  io organizationUnit3 pipelining  io organization
Unit3 pipelining io organization
 
Ey3110051010
Ey3110051010Ey3110051010
Ey3110051010
 
Ihi0022 d amba_axi_protocol_spec
Ihi0022 d amba_axi_protocol_specIhi0022 d amba_axi_protocol_spec
Ihi0022 d amba_axi_protocol_spec
 
AMBA Ahb 2.0
AMBA Ahb 2.0AMBA Ahb 2.0
AMBA Ahb 2.0
 

Semelhante a IJCER (www.ijceronline.com) International Journal of computational Engineering research

Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...
Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...
Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...Editor IJCATR
 
Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...
Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...
Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...ijsrd.com
 
Motorola 68hc11
Motorola 68hc11Motorola 68hc11
Motorola 68hc11gajani121
 
unit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptxunit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptxKandavelEee
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptSaurabhPorwal14
 
AMulti-coreSoftwareHardwareCo-DebugPlatform_Final
AMulti-coreSoftwareHardwareCo-DebugPlatform_FinalAMulti-coreSoftwareHardwareCo-DebugPlatform_Final
AMulti-coreSoftwareHardwareCo-DebugPlatform_FinalAlan Su
 
Design And Verification of AMBA APB Protocol
Design And Verification of AMBA APB ProtocolDesign And Verification of AMBA APB Protocol
Design And Verification of AMBA APB ProtocolIJERA Editor
 
Computer structurepowerpoint
Computer structurepowerpointComputer structurepowerpoint
Computer structurepowerpointhamid ali
 
ARM architcture
ARM architcture ARM architcture
ARM architcture Hossam Adel
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...manishpatel_79
 
Computer Organization & Architecture.ppt
Computer Organization & Architecture.pptComputer Organization & Architecture.ppt
Computer Organization & Architecture.pptGauravSharmaIAHAP
 
ece260project.doc
ece260project.docece260project.doc
ece260project.docFanyu Yang
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
U proc ovw
U proc ovwU proc ovw
U proc ovwBrit4
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data RepresentationNaruin
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2Kyle
 

Semelhante a IJCER (www.ijceronline.com) International Journal of computational Engineering research (20)

Amba ppt
Amba pptAmba ppt
Amba ppt
 
CC61619 (1)
CC61619 (1)CC61619 (1)
CC61619 (1)
 
Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...
Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...
Implementation of FSM-MBIST and Design of Hybrid MBIST for Memory cluster in ...
 
Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...
Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...
Design of AMBA AHB interface around OpenRISC 1200 processor and comparing the...
 
Motorola 68hc11
Motorola 68hc11Motorola 68hc11
Motorola 68hc11
 
J1067783
J1067783J1067783
J1067783
 
unit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptxunit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptx
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 
AMulti-coreSoftwareHardwareCo-DebugPlatform_Final
AMulti-coreSoftwareHardwareCo-DebugPlatform_FinalAMulti-coreSoftwareHardwareCo-DebugPlatform_Final
AMulti-coreSoftwareHardwareCo-DebugPlatform_Final
 
Design And Verification of AMBA APB Protocol
Design And Verification of AMBA APB ProtocolDesign And Verification of AMBA APB Protocol
Design And Verification of AMBA APB Protocol
 
Computer structurepowerpoint
Computer structurepowerpointComputer structurepowerpoint
Computer structurepowerpoint
 
Chap05_1473751047_598103.ppt
Chap05_1473751047_598103.pptChap05_1473751047_598103.ppt
Chap05_1473751047_598103.ppt
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...
 
Computer Organization & Architecture.ppt
Computer Organization & Architecture.pptComputer Organization & Architecture.ppt
Computer Organization & Architecture.ppt
 
ece260project.doc
ece260project.docece260project.doc
ece260project.doc
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
U proc ovw
U proc ovwU proc ovw
U proc ovw
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
 

IJCER (www.ijceronline.com) International Journal of computational Engineering research

  • 1. I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7 Hdl Implementation of Amba-Ahb Compatible Memory Controller 1, S.Ramakrishna , 2,K.Venugopal, 3,B.Vijay Bhasker ,4, R.Surya Prakash Rao 1,2,3,4, St Theresa college of Eng ineering Abstract Microprocessor performance has improved rapidly these years. In contrast, memo ry latencies and bandwidths have improved little. The result is that the memory access time has been a bottleneck which limits the system performance. Memo ry controller (M C) is designed and built to attacking this problem. The memo ry controller is the part of the system that, well, controls the memory. The memory controller is normally integrated into the system chipset. This paper shows how to build an Advanced Microcontroller Bus Architecture (AMBA) co mpliant MC as an Advanced High-performance Bus (AHB) slave. The MC is designed for system memo ry control with the main memory consisting of SRAM and ROM. Additionally, the problems met in the design process are discussed and the solutions are given in the paper. Keywords - ARM; AMBA; Memory Controller; A HB bus I. Introduction With the improvement of Microprocessor these years, the memory access time has been a bottleneck which limits the system performance. Memory controller (MC) is designed and built to attacking this problem. The memory controller is the part of the system that, well, controls the memory. It generates the necessary signals to control the reading and writing of informat ion fro m and to the memory, and interfaces the memory with the other major parts of the system. The memo ry controller is normally integrated into the system chipset. In this paper, an Advanced Microcontroller Bus Architecture (AMBA) co mp liant memo ry controller is designed for system memo ry control with the main memory consisting of SRAM and ROM. The memory controlle r is compatib le with Advanced High-performance Bus (AHB) which is a new generation of AM BA bus, so we call it “A HB-M C”. The A HB-M C has several features which are shown as flows 1. Designed with synthesizable HDL for Application Specific Integrated Circu it (ASIC) synthesis 2. 2.Supports mu ltiple memory devices including static random access memory (SRAM), read -only 3. memo ry (ROM) 4. Co mplies with AMBA AHB protocol 5. Supports one to four memory banks for SRAM and ROM Programmab le memo ry timing reg ister and configuration registers Shared data path between memory devices to reduce pin count Asynchronous FIFO to support burst transaction up to 16-beats This paper describes how to build the AHB-M C. And combin ing the problem met in the process of designing, the corresponding solutions are presented. Finally, the simu lation results are presented. II. Architecture of Ahb-Mc The AHB-M C mainly consists of three modules: AHB slave interface, configurat ion interface, and external memory interface [1]. Figure 1 shows the architecture of AHB-M C. A. AHB slave interface The AHB slave interface converts the incoming AHB transfers to the protocol used internally by the AHB-M C. The state Issn 2250-3005(online) November| 2012 Page 20
  • 2. I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7 mach ine is shown in Figure 2. B. External memory interface The external memory issues commands to the memo ry fro m the co mmand FIFO, and controls the cycle timings of these commands. The state machine is shown in Figure3. Figure 4 and Figure 5 show the timing of a read fro m memory and a write to memory with two wait states [2]. Figure 4. Memory read with two wait states Figure 5. Memory write with two wait states Memory bank select Because system will change the memory map after system boot, AHB-M C is designed to support a remap signal which is used to provide a different memory map. AHB-MC has four memo ry banks, wh ich are selected by XCSN signal. The XCSN signal is controlled by the address of a valid transfer, and the system memo ry map mode. So before the system memo ry is remapped, the boot ROM at 0x3000 0000 is also mapped to the base address of 0x0000 0000 as shown in Table 1 TABLE1 1. Memory write control To support for writ ing in word (32-bits), half-word (16-b its) and byte (8-bits), the XWEN signal is used in the AHB- MC. Table 2 shows the relationship between XCSN and the inputs fro m AHB bus. C. Configurati on i nterface The main function of the configuration interface is to change the configuration registers (SETCYCLE and SETOPMODE register) according to the commands from A HB to APB bridge wh ich converts AHB transfers fro m the configuration port to the APB transfers that the configuration interface require [3]. Each memo ry chip supported by AHB-MC has two registers (CYCLE reg ister and OPM ODE reg ister), which contain all the timing parameters that are required for configuration registers: SETCYCLE and SETOPMODE as shown in fig 5 Fig 6 III. Burst Transfer Support With the increasing system frequency, it’s hard to accomplish the address decoding and memory access operations in one clock cycle. Therefore, wait states are inserted into the data cycle to ensure there is enough time for address decoding and memo ry accessing. But the method that inserting wait state will cause system performance drop dramatically. Therefore, a sequential-access (burst) method is presented to resolve this problem in this paper. In this method, all AHB fixed length burst types are directly translated to fixed length bursts, and all undefined length INCR bursts are converted to INCR4 bursts. Burst Issn 2250-3005(online) November| 2012 Page 21
  • 3. I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7 operation has performance benefits because when the first beat of a burst is accepted, it contains data about the remaining beats. For examp le, when AHB-M C got the first beat of a read burst, all the data required to complete the transfer can be read fro m memory and restored in the read data FIFO. SO this first transfer has some delay before data is returned. But subsequent beats of the burst can have less delay because the data they require might have already been prepared in the FIFO. To fu rther improve the system performance, a RETRY response is used that AHB-MC can release the bus when it is preparing the data [4]. Th is mechanism allows the transfer to finish on the bus and therefore allo ws a higher-priority master to get access to the state machine is showed in Fig 7 IV. Memory System In the arm arch itecture, instructions are all 32-bits, wh ile instructions are 8-bits in the external ROM and SRAM. Therefore the lo west two addresses of ROM and SRAM are not connected to the external address bus. Additionally, to support byte writing, SRAM needs to be separated as four independent banks or has a byte-write enable signal. The basic memory Fig 8system architecture is shown in V. Asynchronous Clock The AHB-M C has two clock domains: AHB clock domain and external memo ry clock domain as shown in Figure 8. Asynchronous FIFO is used between two clock do mains as a data buffer. Fig 9 The main benefit of asynchronous clocking is that you can maximize the system performance, while running the memo ry interface at a fixed system frequency. Additionally, in sleep-mode situations when the system is not required to do much work, you can lower the frequency to reduce power consumption [5]. However, asynchronous clock will cause the flip- flop going metastable state and not converging to a legal stable state by the time the output must be sampled again as shown in Figure 10. To resolve this problem, the most common way is inserting a two-flip-flop synchronizer as shown in Figure VI. Verification and Simulation Results Issn 2250-3005(online) November| 2012 Page 22
  • 4. I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 2 Issue. 7 The verification method used in this paper, is to put the AHB-MC into a min imu m system wh ich consists of ARM core, AHB bus, APB bus and AHB-M C The code used for testing is put in ROM, if the system can work correct ly, then we know the testcase past. The simu lation waveforms of a simp le test code are shown. Figure 13 shows read with zero wait states form theexternal ROM. The address is registered at rising edge of hclk (AHB bus clock), after which ex_oen (external memo ry read enable) signal goes high, then read data reach hrdata (AHB read data bus) at falling edge of hclk. Fig 13 Write with zero states to the external RAM is shownin Figure 14. A write operation is init iated by hwrite going high. Then the address is send to external memo ry address bus and ex_wen (external memo ry write enalbe) signal goes low to enable the data fro m h wdata (AHB write data bus) stored in the RAM fig 14 References [1] “AMBA Specification (Rev 2.0)”, ARM Inc. [2] “PrimeCell A HB SRAM/NOR Memory Controller”, Technical Reference Manual, A RM Inc. [3] “AHB Examp le AM BA System”, Technical Reference Manual, A RM Inc. [4] Carter, J.; Hsieh,W., “Impulse: building a s marter memory controller”, High -Performance Co mputer Architecture, Dept. of Co mput. Sci., Utah Univ., Salt Lake City, UT. [5] Clifford E. Cu mmings, “Synthes is and scripting Techniques for Designing Multi-Asynchronous Clock Designs”, Sunburst Design, Inc Issn 2250-3005(online) November| 2012 Page 23