Development of a data reading device for a CD-ROM drive with FPGA technology



Similar documents
9/14/ :38

Chapter 2 Logic Gates and Introduction to Computer Architecture

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

USB - FPGA MODULE (PRELIMINARY)

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Central Processing Unit (CPU)

Microprocessor & Assembly Language

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 7: The CPU and Memory

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

SDLC Controller. Documentation. Design File Formats. Verification

CSE2102 Digital Design II - Topics CSE Digital Design II

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

Chapter 1 Computer System Overview

MICROPROCESSOR AND MICROCOMPUTER BASICS

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

VHDL DESIGN OF EDUCATIONAL, MODERN AND OPEN- ARCHITECTURE CPU

A New Paradigm for Synchronous State Machine Design in Verilog

Chapter 7 Memory and Programmable Logic

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

JTAG-HS2 Programming Cable for Xilinx FPGAs. Overview. Revised January 22, 2015 This manual applies to the HTAG-HS2 rev. A

Design and Implementation of Vending Machine using Verilog HDL

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

PART B QUESTIONS AND ANSWERS UNIT I

(Refer Slide Time: 00:01:16 min)

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

System on Chip Platform Based on OpenCores for Telecommunication Applications

1. Computer System Structure and Components

The 104 Duke_ACC Machine

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Computer Systems Design and Architecture by V. Heuring and H. Jordan

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

Computer Organization & Architecture Lecture #19

7a. System-on-chip design and prototyping platforms

Architectures and Platforms

MACHINE ARCHITECTURE & LANGUAGE

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Computer Organization. and Instruction Execution. August 22

Computer organization

EMBEDDED SYSTEM BASICS AND APPLICATION

SYSTEM-ON-PROGRAMMABLE-CHIP DESIGN USING A UNIFIED DEVELOPMENT ENVIRONMENT. Nicholas Wieder

Design and FPGA Implementation of a Novel Square Root Evaluator based on Vedic Mathematics

NIOS II Based Embedded Web Server Development for Networking Applications

Memory Basics. SRAM/DRAM Basics

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Central Processing Unit

The Advanced JTAG Bridge. Nathan Yawn 05/12/09

A First Course in Digital Design Using VHDL and Programmable Logic

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

Introduction to Digital System Design

Computer Systems Structure Main Memory Organization

Low Cost System on Chip Design for Audio Processing

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Have both hardware and software. Want to hide the details from the programmer (user).

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Design and Verification of Nine port Network Router

Chapter 13. PIC Family Microcontroller

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Microtronics technologies Mobile:

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

Using Altera MAX Series as Microcontroller I/O Expanders

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

8051 hardware summary

TIMING DIAGRAM O 8085

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

OpenSPARC T1 Processor

LogiCORE IP AXI Performance Monitor v2.00.a

Hardware Implementation of Improved Adaptive NoC Router with Flit Flow History based Load Balancing Selection Strategy

21152 PCI-to-PCI Bridge

KEEP IT SYNPLE STUPID

Computer Organization and Components

TIP-VBY1HS Data Sheet

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

The Central Processing Unit:

IDE/ATA Interface. Objectives. IDE Interface. IDE Interface

International Journal of Advancements in Research & Technology, Volume 2, Issue3, March ISSN

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

Pre-tested System-on-Chip Design. Accelerates PLD Development

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

REC FPGA Seminar IAP Seminar Format

Seeking Opportunities for Hardware Acceleration in Big Data Analytics

ELEC 5260/6260/6266 Embedded Computing Systems

Design and Implementation of an On-Chip timing based Permutation Network for Multiprocessor system on Chip

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Transcription:

Development of a data reading device for a CD-ROM drive with FPGA technology P. Nanthanavoot and P. Chongstitvatana Department of Computer Engineering, Faculty of Engineering, Chulalongkorn University, Bangkok 10330, Thailand. Phone (66-) 18-6956, Fax 0-18-6955 E-mail: prabhas@chula.ac.th ABSTRACT This paper presents a design of a device that can access a CD-ROM drive in the IDE standard. The device is implemented with Verilog HDL (Hardware Description Language) and FPGA (Field Programmable Gate Array) technology. The system consists of three components: (i) Processing Unit that controls all system operations, (ii) Decoder for managing the address space of data, stack and input/output ports and (iii) IDE Host Adapter for interfacing with a CD-ROM drive. The development begins with designing and coding the system in Verilog HDL. The simulation is performed to test that it can access data from the CD-ROM drive. Finally, the system is synthesized targeting a FPGA chip and the amount of resources is reported. KEYWORDS: CD-ROM, IDE interface, ATA/ATAPI, Verilog HDL, FPGA. 1. INTRODUCTION Presently, the world has fully acknowledged the importance of information and the requirement for data storage has grown exponentially. One of the widely used media is CD-ROM due to its many advantages, for instance, its large capacity at a lower cost and its more compact size compared to other media. Moreover the CD-ROM can be used with many types of platforms. For many systems, which interface to a IDE device [1,,3,4], most developers use software-programmable microcontrollers for accessing the devices in the IDE standard. For example, [1,,3] use PIC F877 0 MHz clock as the processor to drive an IDE connector directly from its ports. These devices are software driven. Although it is easy to develop and modify, it has a high overhead execution in each IDE device accessing operation. To reduce the execution overhead, this research focuses on designing a system which has a special hardware for interfacing between the processing unit and a IDE CD-ROM drive. The system is implemented with FPGA (Field-Programmable Gate Array) technology. It is designed in RTL (Register-Transfer Level) model and coded in Verilog HDL [5]. Because of these reasons, all system s component can be modified easily and can be implemented in one chip.. CD-ROM DRIVE AND IDE INTERFACE The IDE interface is used in secondary storage, e.g. a hard disk, a CD-ROM drive and a tape drive. The IDE interface has a protocol called ATA/ATAPI (AT Attachment/ ATA Packet Interface) [6,7,8,9]. This protocol declares the characteristics and commands to access IDE device. CD-ROM drive uses the commands, which are defined in ATAPI protocol. To use a CD-ROM drive, such as requesting an identical information, reading raw data or resetting the drive, the access is through specific internal registers in the CD-ROM drive. Four signals to access these registers are: CS[1:0]-, DA[:0], DIOR- and DIOW-. The requested data is transferred by -bit data bus: DD[15:0]. The internal registers in a CD-ROM drive consist of two blocks: Command Block Register and Control Block Register, which are selected by CS[1:0]- signal. The DA[:0] signal is used to choose a register in that block. Reading and writing registers may perform different functions. The details are defined in ATA/ATAPI protocol. The timing constraint, timing diagram and minimum period of accessing registers, in PIO mode 4 (Programmable Input/Output) of ATA/ATAPI protocol are shown in Figure 1 and Table 1. valid DIOR-/DIOW- Write DD[7:0] Read DD[7:0] t1 t t0 t3 t4 Write valid t5 Read valid Figure 1. Timing diagram in accessing registers. Register transfer timing parameters t6 ti Time t 0 Cycle time (min) 10 ns t 1 valid to read/write setup (min) 5 ns t DIOR-/DIOW pulse width (min) 70 ns t i DIOR-/DIOW recovery time (min) 5 ns t 3 DIOW- data setup (min) 0 ns t 4 DIOW- data hold (min) 10 ns t 5 DIOR- data setup (min) 0 ns t 6 DIOR- data hold (min) 5 ns Table 1. Minimum period of accessing registers.

3. SYSTEM DESIGN The system is designed in RTL (Register Transfer Level). It is synthesized and implemented with FPGA. The system is separated into 3 parts: Processing Unit, Decoder and IDE Host Adapter. The system block diagram is shown in Figure 5, which is at the end of this article. 3.1 PROCESSING UNIT The processing unit in this system is developed for an embedded web server [10]. It is expected to replace the MCS-51 microcontroller in that work. The processing unit is a -bit processor, it has no pipeline and no interrupt. There are two -bit buses for data and instructions. The memory is divided into two parts: instruction memory and data memory. This processing unit has four -bit registers and two flags. A block diagram of the processing unit is shown in Figure 6. The processing unit has twenty-seven -bit instructions. The instructions are divided into three groups: (i) Arithmetic and Logic instructions, (ii) Jump instructions and (iii) Load/Store instructions. Because the processing unit is designed to be used in embedded systems, the architecture of the processing unit is simple and compact. The whole system is small enough to be implemented on a FPGA with spare resources for I/O interface. 3. ADDRESS DECODER AND ADDRESS SPACE MANAGEMENT The processing unit has no specific I/O instructions. Memory-mapped I/O [11] is used to interface between the processing unit and I/O devices. The processing unit accesses I/O devices through Load/Store instructions for reading or writing data to I/O registers. The system address space is separated into three portions: (i) address FFF0-FFFF is assigned for I/O access, (ii) address FF00- FFEF is assigned for stack and (iii) address 0000-FEFF is data memory allocation. The address space is shown in Figure. FFFF Memory-mapped I/O FFF0 Stack General Memory FF00 0000 Figure. The address space definition. The module, which manages the system address space, is Decoder. It decodes a data address of Load/Store instruction and sends the requested signals to data memory or I/O devices. 3.3 IDE HOST ADAPTER The CD-ROM drive is accessed through its internal registers. The IDE Host Adapter is a special purpose hardware, its function is to handle accessing internal registers in the CD-ROM drive. The processing unit controls the IDE Host Adapter through 3 registers in the IDE Host Adapter. The adapter block diagram and its register are shown in Figure 3 and Table. Data Path Status Register Data Register Command Register 3 DA CS command data out data select data bus load sta_load device bus load command load status Device Controller dior-diow- drst- Figure 3. IDE Host Adapter block diagram. Register Name Read/Write Host Status FF08 Read Only Data Buffer FF09 Read/Write Command Buffer FF0A Write Only Table. Registers in IDE Host Adapter. iow- ior- Bus Host Status Register is a register, representing the status of the adapter. It is a -bit register. The first bit (bit 0) is a status of data that is kept in Data Buffer Register and the second bit (bit 1) is IDE Host Adapter working status. Data Buffer Register is a -bit register that stores data while reading or writing from/to internal registers in the drive. Command Buffer Register is a 6-bit register that stores a command, which specifies an address for accessing an internal register in the drive. The IDE Host Adapter supports the CD-ROM drive in PIO mode 4 (Programmable Input/Output). The access method begins with the processing unit checking the status of the IDE Host Adapter by polling data from Host Status Register until it indicates that the adapter is not busy (BSY bit in Host Status = 0). When it is ready, the processing unit sends a Store instruction to write a command, which defines the register access parameter (Read/Write- access, CS[1:0]- and DA[:0]), to Command Buffer Register in the adapter. If the command in Command Buffer Register is a read request, the IDE Host Adapter will request data. The processing unit must poll data from Host Status Register until it indicates that data is ready in Data Buffer Register and then the processing unit can read the data from Data Buffer Register using Load instruction. If the command is a write command, the processing unit must store a

data, which is required to be transmitted, to Data Buffer Register. After the adapter received the data, it will request and send the data to an internal register in the drive. 4. SYSTEM SIMULATION AND SYNTHESIS After designing and coding, the system is simulated to test its functionality. The simulation is running on an artificial environment that is similar to the system working in the real world. This environment is separated into hardware modules and the program. The hardware modules are such as CD-ROM drive, ROM and RAM. They are implemented with behavioral models, which describe their timing. The program has all basic functionality for interfacing with a CD-ROM drive such as accessing the internal registers in the drive. Figure 4 is a part of simulation result. The task is to read data from internal registers at CS[1:0]- = 10 and DA[:0] = 101. From Figure 4, there are three steps in reading data: (i) The processing unit writes a command 110101 to Command Buffer in IDE Host Adapter. (ii) when the IDE Host Adapter receives a command, it requests data by sending signal CS[1:0]- = 10 and DA[:0]- = 101. (iii) The processing unit polls data status until Host Status register is set to indicate the data is ready to be read, then the processing unit reads that data and keeps it in its general register. Finally, the system is synthesized with Xilinx Foundation.1i Series tool, the synthesized result is shown in Table 3. From the synthesized result in Table 3, the total resource is 3614 equivalent gates. It must be realized with a FPGA that has enough resource such as SPARTAN S0VQ100. CPU Synthesis. ============== Number of CLBs: 170 out of 400 4% CLB Flip Flops: 19 4 input LUTs: 9 3 input LUTs: 45 Number of bonded IOBs: 69 out of 77 89% IOB Flops: Number of clock IOB pads: 1 out of 8 1% Number of primary CLKs: 1 out of 4 5% Number of secondary CLKs: 3 out of 4 75% Total equivalent gate count for design: 486 Additional JTAG gate count for IOBs: 331 ing Decoder. =================== Number of CLBs: 7 out of 400 1% CLB Flip Flops: 0 4 input LUTs: 14 3 input LUTs: 0 Number of bonded IOBs: 18 out of 77 3% IOB Flops: 0 Total equivalent gate count for design: 84 Additional JTAG gate count for IOBs: 864 IDE Host Adapter. ================= Number of CLBs: 58 out of 400 14% CLB Flip Flops: 39 4 input LUTs: 105 3 input LUTs: 10 Number of bonded IOBs: 46 out of 77 59% IOB Flops: 5 Number of clock IOB pads: 1 out of 8 1% Number of primary CLKs: 1 out of 4 5% Number of secondary CLKs: 1 out of 4 5% Total equivalent gate count for design: 1044 Additional JTAG gate count for IOBs: 08 Table 3. Synthesized result. Figure 4. Simulation result.

5. CONCLUSION This work presents a design and simulation of a system, which interface with a IDE CD-ROM drive. The advantage of using Verilog HDL in design is that the system can be modified easily. Because of FPGA technology, all system components can be synthesized into one chip. The system has a special purpose hardware interface to the IDE CD-ROM drive so it has an advantage over the other design that use software-programmable microcontroller to access a CD-ROM drive directly. It reduce the execution overhead of microcontroller operations. Moreover it facilitates the development because programmers do not have to concern about timing constraints in the IDE standard. 6. REFERENCES [1] M.Samuels, PIC a CompactFlash Card, Circuit Cellar online, February 001. [] J.Margolin, Standalone Controller for an IDE CD- ROM Drive, http://www.jmargolin.com/project/ cdrom.htm, 000. [3] A. Pierre, S. Alexander, ASPAMP3 Dedicated MP3-CD Player, Fellenberg Training Center for Industrial Electronic, 001. [4] ARMA Design, CompactFlash Development Kit, http://www.armanet.com/pages/engineeringright.ht ml [5] D.Thomas, P.Moorby, The Verilog Hardware Description Language Second Edition, Kluwer Academic Publishers, 1975. [6] T13 Technical Committee, Information Technology AT Attachment with Packet Interface-5 (ATA/ATAPI-6) reversion 3, April 000. [7] T13 Technical Committee, Information Technology AT Attachment with Packet Interface-6 (ATA/ATAPI-6) reversion a, April 000. [8] Small Form Factor Committee, ATA Packet Interface for CD-ROMs: SFF-800I, 1996. [9] F.Schemidt, The SCSI Bus and IDE Interface: Protocol, Application and Programming, Addison- Wesley Publishing, 1995. [10] K. Piromsopa, Development of A Reconfigurable Embedded Web Server, Master Thesis, Chulalongkorn University, Thailand, 000. [11] D.Patterson, J.Henessy, Computer Organization and Design: The Hardware/Software Interface, Morgan Kaufmann Publishers, 1997. ABOUT THE AUTHORS Phanupan Nanthanavoot graduated in Bachelor degree of Computer Engineering, Chulalongkorn University, Thailand, 001. He is studying Master degree of Computer Engineering, Chulalongkorn University, Thailand. Prabhas Chongstitvatana earned BEng (EE) from Kasetsart University 1980 and PhD from the department of artificial intelligence, Edinburgh University, UK 199. Presently, he is with the department of computer engineering, Chulalongkorn University. His research included robotics, evolutionary computation and computer architecture.

Bus ram enable CS RAM Processing Unit data access Decoder ram rd/wrior- iow- IDE Host Adapter DA 3 dior- diow- rd/wr- rom enable Instruction Instruction Code ROM Device Figure 5. System block diagram. Instruction Code ir_load Instruction PC PC Decoder IR opcode offset immediate 11 pc_load pc_sel pc_sel1 mem_sel reg_sel ld_sel opcode reg_load Register File a_out 8 Data Bus b_out ALU Sign Extension C Z Bus mem_sel1 d_data_out op_sel Figure 6. Processing Unit block diagram