CALIFORNIA STATE UNIVERSITY, NORTHRIDGE RAM-DISK a Thesis
Total Page:16
File Type:pdf, Size:1020Kb
CALIFORNIA STATE UNIVERSITY, NORTHRIDGE RAM-DISK A thesis submitted in partial satisfaction of the requirements for the degree of Master of Science in Engineering by Chung Ting Ho May, 1984 The Thesis of Chung Ting Ho is approved : Pr . John T. Jo , Cha1r California State University, Northridge ii TABLE OF CONTENTS Page Abstract : vi Chapter 1 DESIGN PHILOSOPHY AND THEORY 1 1.1 Overview l 1.2 : Design Background 4 1.3 Design Goal and Theory 7 Chapter 2 THEORY OF OPERATION 10 2.1 : System Monitor 10 2.2 : Operating System 12 2.3 : Custom Basic I/0 System for RAM-Disk 18 2.4 Description of The Block Diagram 22 Chapter 3 CIRCUIT DESCRIPTION 27 3.1 4146 Memory Chip 27 3.2 Z80A CPU 30 3.3 Detailed Circuit Description 34 3.4 Power Supply 41 Chapter 4 SOFTWARE DESCRIPTION 43 4.1 Self-Test Program 43 4.2 : Forrnating The RAM-Disk 44 4.3 : Custom Basic Input/Output System 45 Chapter 5 EVALUATION AND CONCLUSION 48 5.1 User Interface 48 5.2 : Performance Evaluation 49 5.3 : Conclusion and Comment 51 iii References 53 Appendix A CIRCUIT SCHEMATICS 54 Appendix B IC LISTING AND POWER REQUIREMENTS 58 Appendix c : SELF-TEST PROGRAM LISTING 59 Appendix D FORMATING PROGRAM LISTING 65 Appendix E MOVE PROGRAM LISTING 66 Appendix F CUSTOM BIOS DRIVE A PROGRAM LISTING 67 Appendix G CUSTOM BIOS DRIVE E PROGRAM LISTING 78 Figure 1 A MICRO-COMPUTER SYSTEM 1 Figure 2 A MOTHER-DAUGHTER RAM-DISK BOARD 8 Figure 3 : RAM-DISK BLOCK DIAGRAM 23 Figure 4 RAM-DISK INTERFACE FUNCTIONAL BLOCK DIAGRAM 26 Figure 5 4164 DYNAMIC RAM READ CYCLE TIMING 28 Figure 6 : 4164 DYNAMIC RAM WRITE CYCLE TIMING 29 Figure 7 4164 DYNAMIC RAM REFRESH CYCLE TIMING 30 Figure 8 ~ Z80 INSTRUCTION OPCODE FETCH TIMING 31 Figure 9 Z80 256-CYCLE REFRESH CONVERSION DIAGRAM 32 Figure 10 Z80 INPUT AND OUTPUT CYCLES TIMING 34 Figure 11 RAM-DISK COMPOSITE TIMING 39 Figure 12 MOVE PROGRAM FUNCTIONAL DIAGRAM 47 Table 1 RELATIONSHIP BETWEEN BLS, BSH AND BLM 16 Table 2 RELATIONSHIP BETWEEN BLS, MAXIMUM DISK SIZE AND EXTEND MASK 16 Table 3 RELATIONSHIP BETWEEN BLS, DIRECTORY ENTRY AND ALO, ALl 17 iv " ' Table 4 : RAM-DISK PARAMETER HEADER 20 Table 5 : RAM-DISK PARAMETER BLOCK 21 Table 6 : RAM-DISK BENCH MARK TEST so v ABSTRACT RAM-DISK by CHUNG T. HO Master of Science in Engineering Microcomputers are found in all areas of modern society. They have become the basic tools for word processing and data file management. A floppy disk drive is necessary for both long term file storage and on-line data support. Since the floppy disk drive is mainly a mechanical device, it is inherently slow. To improve the microcomputer's run-time efficiency, an alternate form of on-line data support is proposed. A RAM-disk is a block of solid state memory. When integrated into the microcomputer system, it functions just like a floppy disk. THE RAM-disk is completely transparent to the user. It is accessed in the same manner as a floppy disk, but its response speed is ten to twenty vi times faster than a floppy disk drive. The RAM-disk has 256K bytes of storage capacity. To simplify the hardware design, it is subdivided into eight tracks with 256 sectors per track and 128 bytes per sector. Several programs were created to integrate the RAM disk with computer. A format program is to initialize the RAM-disk. Two custom BIOS programs are to integrate the RAM-disk into either drive 'A' or drive 'E' of the computer system. Once the RAM-disk is formated and integrated into the system it is accessed as either drive 'A' or drive 'E' of the system. vii CHAPTER 1 DESIGN PHILOSOPHY AND THEORY 1.1 OVERVIEW In today's business and hobby world the micro-computer has become increasingly popular. The usual time consuming and laborious chores such as personal financing, inventory control and accounting can be taken over by a micro- computer which performs with much higher precision and greater speed. There are hundreds of different micro- computers on the market now, and there are just as many application software packages available. A micro-computer system generally consists of a CPU unit, a display such as TV screen or CRT monitor, a keyboard, a printer and at least one 5-1/4 or 8 inch floppy disk drive. : CRT . : PRINTER . ----------: CPU :---------- ----------: UNIT :----------. : 'KEYBOARD . : DIS'K DRIVES : FIGURE 1 A MICRO-COMPUTER SYSTEM The CPU unit includes the micro processor, timing circuitry, I/O control and on-line memory. For most 8-bit micro-processors such as the Z80, I8080 and M6502, there 1 2 are only 16 memory address bits available, which limits the maximum addressable on-line memory to 64k bytes. After the memory space reserved for the system monitor and the operating system software is subtracted, there are less than 60K bytes of memory available for the application program and data. In the early days of micro-computer history, very rarely would a program exceed 16K bytes in length, but as more software development tools became available, many complicated programs were developed. Application programs such as high level language compilers, spread sheet programs and word processor programs are extremely large and can not fit into the available memory space in its entirety. Therefore, they are broken down into smaller pieces as overlays. These overlays are stored in an off line mass storage device such as a floppy disk. As the program is being executed, each overlay is swapped in and out of the on-line memory as they are needed. It is the same with the data base programs. It is not unusual to have inventory data, accounting data or graphic data which are too large for the on-line memory space. They are broken down into smaller pieces so they can be loaded into the memory as they are processed by the computer. As the program becomes more complicated the more overlays it must create. For example, 'QUAD' a sophisticated business software which can perform inventory control, customer mailing list, payroll and many 3 other accounting functions has 17 overlays and the whole program takes 242K bytes of memory. To run such a program the overlays are swapped in and out of memory constantly, and the disk drive is being accessed almost continuously. In the past few years the floppy disk drive has became a vital part of any computer system for both long term program storage or run time program support such as over lays or library funtions storage. The floppy disk drive is interfaced to the CPU through a disk controller chip. The disk controller takes the CPU's parallel data bits and shifts them out serially to the disk drive during a disk write operation. Likewise, it shifts in the serial disk data bits and passes them to the CPU as 8-bit parallel data during a read operation. Due to this serial data link, the floppy disk data transfer rate is inherently slow and is limited to about 30 kilo-bytes per second. When the disk files are accessed randomly, there is an additional delay associated with the movement of the read/write arm, load/unload of the head and settling time. For a typical disk drive, the average random access time is 91 milli-seconds plus the head loading time of 35 milli-seconds. It takes 1.126 seconds to read a 30 kilo- byte long file from the disk if the file occupied one contiguous block on the disk. If the same file is broken up into 30 blocks of one kilo-bytes each, then the transfer time increases to 4.78 seconds. 4 A disk drive requires three levels of power supplies, a plus five volts for the TTL circuitry, a plus 24 volts for the stepping motor and 120 volts AC for the rotation motor. 1.2 DESIGN BACKGROUND In the past two to three years, several alternate forms of data storage methods have been developed to overcome the micro-computer's limitation of on-line memory space and slow floppy disk interface. One is the hard disk drive system such as Winchester disk drive. The hard disk technology has just been introduced into micro computer systems in the past two years. A typical Winchester hard disk drive has between one and twenty mega-bytes of storage capacity. It is generally used as an off-line storage device. Its data transmission rate is several times faster than a floppy disk drive, but the cost of a hard disk drive system and its controller electronics is usually higher than most people care to pay for it. Another method to increase on-line storage is done with the bank-switching memory. Bank switching is to have two or more banks of solid state memory. Each bank has the same storage capacity and can be switched in or out of the computer address range by some predetermined bits of a dedicated I/O port. A long program can be loaded into several consecutive banks of memory. During execution, the appropriate program segment is accessed by 5 the computer as each memory bank is addressed. The bank switching method has all the advantages of a solid state memory such as speed and reliability, and it can be expanded to more than two thousand banks of 64K bytes each. The disadvantages of the bank switching are that it requires special software to operate and it is difficult to implement as an add on feature.