Asynchronous Sram

Posted by: repair  :  Category: Memory
Static RAM, or SRAM, is the most basic and easy to use type of volatile memoryand is found in almost every computer in one form or another. An SRAM deviceis conceptually easy to understand, consisting of an array of latches along withcontrol and decode logic to resolve the address that is being read or written atany given time. Each latch is a feedback circuit that traps and maintains aparticular logic state. A typical SRAM bit implementation is shown in Fig. 4.7.

FIGURE 4.7 SRAM bit feedback latch.

Kuvassa 4.7 SRAM bit feedback latch.
An SRAM latch is created by connecting two inverters in a loop. One side of theloop remains sta- ble at the desired logic state, and the other remains stable at theopposite state. Inverters are used rather than noninverting buffers, because aninverter is the simplest logic element to construct. The two pass transistors oneither side of the latch enable both writing and reading. When writing, the transistorsturn on and force each half of the loop to whatever state is driven on the verticalbit lines. When reading, the transistors also turn on, but the bit lines are sensedrather than driven. Typical SRAM implementations require six transistors per bitof memory: two transistors for each inverter and the two pass transistors. Someimplementations use only a single transistor per inverter, requiring only fourtransistors per bit.
Discrete asynchronous SRAM devices have been around for decades. In the 1980s,the 6264 and 62256 were manufactured by multiple vendors and used in applicationsthat required simple RAM architectures with relatively quick access times and lowpower consumption. The 62xxx family is numbered according to its density inkilobits. Hence, the 6264 provides 65,536 bits of RAM ar- ranged as 8k ? 8.The 62256 provides 262,144 bits of RAM arranged as 32k ? 8. Beingmanufactured in CMOS technology and not using a clock, these devicesconsume very little power and draw only microamps when not being accessed.
The 62xxx family pin assignment is virtually identical to that of the 27xxx EPROMfamily, enabling system designs where either EPROM or SRAM can be substitutedinto the same location with only a couple of jumpers to set for unique signals suchas the program-enable on an EPROM or write-enable on an SRAM. Like anEPROM or basic ?ash device, asynchronous SRAMs have a simple interfaceconsisting of address, data, chip select, output enable, and write enable. Thisinterface is shown in Fig. 4.8.
Writes are performed whenever the WE* signal is held low. Therefore, one mustensure that the desired address and data are stable before asserting WE* andthat WE* is removed while address and data remain stable. Otherwise, thewrite may corrupt an undesired memory location. Unlike an EPROM, but like?ash, the data bus is bidirectional during normal operation. The ?rst twotransactions shown are writes as evidenced by the separate assertions ofWE* for the duration of address and data stability. As soon as the writesare completed, the microprocessor should release the data bus to thehigh-impedance state. When OE* is asserted, the SRAM begins driving thedata bus and the output re?ects the data contents at the locations speci?edon the address bus.
Asynchronous SRAMs are available with access times of less than 100 ns forinexpensive parts and down to 10 ns for more expensive devices. Access timemeasures both the maximum delay between a stable read address and itscorresponding data and the minimum duration of a write cycle. Their ease ofuse makes them suitable for small systems where megabytes of memory arenot re-quired and where reduced complexity and power consumption arekey requirements. Volatile memory doesnt get any simpler than asynchronousSRAM.
Prior to the widespread availability of ?ash, many computer designs in the 1980sutilized asyn- chronous SRAM with a battery backup as a means of implementingnonvolatile memory for storing con?guration information. Because an idle SRAMdraws only microamps of current, a small battery can maintain an SRAMscontents for several years while the main power is turned off. Using SRAM inthis manner has two distinct advantages over other technologies: writes arequick and easy, because there are no complex EEPROM or ?ash programmingalgorithms, and there is no limit to the number of write cycles performed overthe life of the product. The downsides to this approach are a lack of securityfor protecting valuable con?guration information and the need for a battery tomaintain the memory contents. Requiring a battery increases the complexity ofthe system and also begs the question of what happens when the battery wearsout. In the 1980s, it was common for a PCs BIOS con?guration to be storedin battery-backed CMOS SRAM. This is how terms like the CMOS andCMOS setup entered the lexicon of PC administration.

FIGURE 4.8 62xxx SRAM interface.

Kuvassa 4.8 62xxx SRAM interface.
SRAM is implemented not only as discrete memory chips but is commonly foundintegrated within other types of chips, including microprocessors. Smallermicroprocessors or microcontrollers (microprocessors integrated with memoryand peripherals on a single chip) often contain a quantity of on-board SRAM.More complex microprocessors may contain on-chip data caches implementedwith SRAM.
By : E-book Complete_Digital_Design

Intel 8086 16-Bit Microprocessor Family

Posted by: repair  :  Category: Instructive Microprocessors and Microcomputer
Intel moved up to a 16-bit microprocessor, the 8086, in 1978 just two years afterintroducing the 8085 as an enhancement to the 8080. The x86 family is famousfor being chosen by IBM for their original PC. As PCs developed during thepast 20 years, the x86 family grew with the industry ?rst to 32 bits (80386,Pentium) and more recently to 64 bits (Itanium). While the 8086 was a newarchitecture, it retained certain architectural characteristics of the 8080/8085such that assembly language programs written for its predecessors could beconverted over to the 8086 with little or no modi?cation. This is one of thekey reasons for its initial success.
The 8086 contains various 16-bit registers as shown in Fig. 6.9, some of whichcan be manipu- lated one byte at a time. AX, BX, CX, and DX aregeneral-purpose registers that have alternate functions and that can be treatedas single 16-bit registers or as individual 8-bit registers. The accumulator,AX, and the ?ags register serve their familiar functions. BX can serve as ageneral pointer. CX is a loop iteration count register that is used inherentlyby certain instructions. DX is used as a companion register to AX whenperforming certain arithmetic operations such as integer division or handlinglong integers (32 bits).
The remaining registers are pointers of various types that index into the 8086ssomewhat awk- ward segmented memory structure. Despite being a 16-bitmicroprocessor with no register exceeding 16 bits in size, Intel recognized theneed for more than 64 kB of addressable memory in more advanced computers.One megabyte of memory space was decided upon as a suf?ciently largeaddress space in the late 1970s, but the question remained of how to accessthat memory with 16-bit pointers. Intels solution was to have programmersarbitrarily break the 1 MB address space into multiple 64-kB special-purposesegments one for instructions (code segment), two for data (primary data andextra data), and one for the stack. Memory operations must reference oneof these de?ned segments, requiring only a 16-bit pointer to address anylocation within a given segment. Segments can be located anywhere in memory,as shown in Fig. 6.10, and can be moved at will to provide ?exibility fordifferent applications. Additionally, there is no restriction on overlapping ofsegments.
Each segment register represents the upper 16 bits of a 20-bit pointer(220 = 1 MB) where the lower 4 bits are ?xed at 0. Therefore, a segment registerdirectly points to an arbitrary location in 1 MB of memory on a 16-byte boundary.A pointer register is then added to the 20-bit segment address to yield a ?nal20-bit address, the effective address, with which to fetch or store data.Algebraically, this relationship is expressed as: effective address =(segment pointer ? 16) + offset pointer.

FIGURE 6.9 8086 register set.

Kuvassa 6.9 8086 register set.

FIGURE 6.10 8086 segments.

Kuvassa 6.10 8086 segments.

Inside the microprocessor, this math is performed by shifting the segment pointer(0×135F) left by four bits and then adding the offset pointer (0×0102) asshown below.

This segmented addressing scheme has some awkward characteristics. First,programs must orga- nize their instructions and data into 64-kB chunks andproperly keep track of which portions are be- ing accessed. If data outsideof the current segments is desired, the appropriate segment register must beupdated. Second, the same memory location can be represented by multiplecombinations of segment and offset values, which can cause confusion in sortingout which instruction is accessing which location in memory. Nonetheless,programmers and the manufacturers of their development tools have ?guredout ways to avoid these traps and others like them.
Instructions that reference memory implicitly or explicitly determine whichoffset pointer is added to which segment register to yield the desired effectiveaddress. For example, a push or pop instruction inherently uses the stackpointer in combination with the stack segment register. However, an instructionto move data from memory to the accumulator can use one of multiple pointerregisters relative to any of the segment registers.
The 8086s reset and interrupt vectors are located at opposite ends of thememory space. On reset, the instruction pointer is set to 0xFFFF0, and themicroprocessor begins executing instructions from this address. Therefore,rather than being a true vector, the 16-byte reset region contains normalexecutable instructions. The interrupt vectors are located at the bottom ofthe memory space starting from address 0, and there are 256 vectors, onefor each of the 256 interrupt types. Each interrupt vector is composed of a2-byte segment address and a 2-byte offset address, from which a 20-biteffective address is calculated. When the 8086s INTR pin is driven high,an interrupt acknowledge process begins via the INTA* output pin. The8086 pulses INTA* low twice and, on the second pulse, the interruptingperipheral drives an interrupt type, or vector number, onto the eight lowerbits of the data bus. The vector number is used to index into the interruptvector table by multiplying it by 4 (shifting left by two bits), because each vectorconsists of four bytes. For example, interrupt type 0×03 would cause themicroprocessor to fetch four bytes from addresses 0×0C through 0×0F.Interrupts triggered by the INTR pin are all maskable via an internal control bit.Software can also trigger interrupts of various types via the INT instruction.A nonmaskable interrupt can be triggered by external hardware via the NMIpin. NMI initiates the type-2 interrupt service routine at the address indicatedby the vector at 0×08-0×0B.
Locating the reset boot code at the top of memory and the interrupt vectors atthe bottom often leads to an 8086 computer architecture with ROM at the topand some RAM at the bottom. ROM must be at the top, for obvious reasons.Placing the interrupt vector table in RAM enables a ?exible system in whichsoftware applications can install their own ISRs to perform various tasks. Onthe original IBM PC platform, it was not uncommon for programs to insert theirown ISR addresses into certain interrupt vectors located in RAM. The systemtimer and keyboard interrupts were common objects of this activity. Becausethe PCs operating system already implemented ISRs for these interrupts, theprogram could redirect the interrupt vector to its own ISR and then call thesystems default ISR when its own ISR completed execution. If properly done,this interrupt chaining process could add new features to a PC without harmingthe existing housekeeping chores performed by the standard ISRs. Chainingthe keyboard interrupt could enable a program that is normally dormant topop up each time a particular key sequence is pressed.
Despite its complexity and 16-bit processing capability, the 8086 was original lyhoused in a 40-pin DIP the same package used for most 8-bit processors of the time. Intel chose to use a multiplexed address/data scheme similar to that usedon the 8051 microcontroller, thereby saving 16 pins. The 8086s 20-bit addressbus is shared by the data bus on the lower 16 bits and by status ?ags on the upper 4 bits. Combined with additional signals, these status ?ags control the microprocessors bus interface. As with Intels other microprocessors, the 8086contains separate address spaces for memory and I/O devices. A control pinon the chip indicates whether a transaction is memory or I/O.
While the memory space is 1 MB in size, the I/O space is only 64 kB. The8086 bus interface oper- ates in one of two modes, minimum and maximum,determined by a control pin tied either high or low, respectively. In each ofthese two modes, many of the control and status pins take on different functions.In minimum mode, the control signals directly drive a standard Intel-style bussimilar to that of the 8080 and 8051, with read and write strobes and addresslatch enable. Other signals include a READY signal for inserting wait states forslow peripherals and a bus grant/acknowledge mechanism for supporting DMAor similar bus-sharing peripherals. Minimum mode is designed for smallersystems in which little address decoding logic is necessary to interface the 8086to memory and peripherals devices. Maximum mode is designed for largersystems where an Intel companion chip, the 8288 bus controller, integratesmore complex bus control logic onto an off-the-shelf IC. In maximum mode,certain status and control pins communicate more information about what typeof transaction is being performed at any given time, enabling the 8288 to takeappropriate action.
The 8086s 16-bit data bus is capable of transacting a single byte at a time forpurposes of access- ing byte-wide peripherals. One early advantage of the 8086was its backward bus compatibility with the 8080/8085. In the 1970s, Intelmanufactured a variety of I/O peripherals such as timers and parallel I/Odevices for their eight-bit microprocessors. The 8086s ability to performbyte-wide trans- actions enabled easy reuse of existing eight-bit peripheralproducts. Two signals, byte high enable (BHE*) and address bit zero (A[0]),communicate the width and active byte of each bus transaction as shown inTable 6.3.

Intels microprocessors follow the little-endian byte ordering convention.Little-endian refers to the practice of locating the LSB of a multibyte quantity ina lower address and the MSB in a higher address. In a little-endian 16-bitmicroprocessor, the value 0×1234 would be stored in memory by locating 0×12into address 1 and 0×34 into address 0. Big-endian is the opposite: locating theLSB in the higher address and the MSB in the lower address. Therefore, abig-endian 16-bit microprocessor would store 0×12 into address 0 and 0×34into address 1. To clarify the difference, Table 6.4 shows little-endian versusbig-endian for 16- and 32-bit quantities as viewed from a memory chipsperspective. Here, ADDR represents the base address of a multibyte dataelement.
Proponents of little-endian argue that it makes better sense, because the lowbyte goes into the low address. Proponents of big-endian argue that it makes better sense, because data is stored in memory as you would read and interpret it. Thechoice of endianness is rather religious and comes down to personal preference.Of course, if you are designing with a little-endian microprocessor, life will bemade simpler to maintain the endianness consistently throughout the system.

At the time of the 8086s introduction, 16-bit desktop computer systems werealmost unheard of and could be substantially more expensive than 8-bit systemsas a result of the increased memory size required to support the larger bus. Toalleviate this problem and speed market acceptance of its architecture, Intelintroduced the 8088 microprocessor in 1979, which was essentially an 8086with an eight-bit data bus. A lower-cost computer system could be built with the8088, because fewer EPROM and RAM chips were necessary, system logicdid not have to deal with two bytes at a time, and less circuit board wiring wasrequired. A tremendous bene?t to Intel in designing the 8088 was the factthat it was chosen by IBM as the low-cost 16-bit heart of the original PC/XTdesktop computer, thereby locking the x86 microprocessor family into theIBM PC architecture for decades to come.
A variety of companion chips were developed by Intel to supplement the8086/8088. Among these was the 8087 math coprocessor that enhanced the 8086scomputational capabilities with ?oating-point arithmetic operations. Floating-pointarithmetic refers to a computers handling of real numbers as compared to integers.The task of adding or multiplying two real numbers of arbitrary magnitude is farmore complex than similar integer operations. Certain applications such as scienti?csimulations and realistic games that construct a virtual reality world make signi?cantuse of ?oating-point operations. The 8087 is a coprocessor rather than a peripheral,because it sits on the microprocessor bus in parallel with the 8086 and watches forspecial ?oating-point instructions.
These instructions are then executed automatically by the 8087 rather than havingto wait for the 8086 to request an operation. The 8086 was designed with the 8087sexistence in mind and ignores instructions destined for the 8087. Therefore, softwaremust speci?cally know if a math coprocessor is installed to run correctly. Manyprograms that ran on older systems with or without a coprocessor would ?rst testto see if the coprocessor was installed and then execute either an optimized set ofroutines for the 8087 or a slower set of routines that emulated the ?oating-pointoperations via conventional 8086 instructions.
As the x86 family developed, the optional math coprocessor was eventuallyintegrated alongside the integer processor on the same silicon chip. The 8087 gaveway to the 80287 and 80387 when the 80286 and 80386 microprocessors wereproduced. When Intel introduced the 80486, the coprocessor, or ?oating-pointunit (FPU), was integrated on chip. This integration resulted in a somewhat moreexpensive product, so Intel released a lower-cost 80486SX microprocessorwithout the coprocessor. An 80487SX was made available to upgrade systemsoriginally sold with the 80486SX chips, but the overall situation provedsomewhat chaotic with various permutations of microprocessors and systemswith and without coprocessors. Starting with the Pentium, all of Intels high-endmicroprocessors contain integrated FPUs. This trend is not unique to Intel.High-performance microprocessors in general began integrating the FPU atroughly the same time because of the performance bene?ts and the overallsimplicity of placing the microprocessor and FPU onto the same chip.
By : E-book Complete_Digital_Design

Motorola 6800 Eight -Bit Microprocessor Family

Posted by: repair  :  Category: Instructive Microprocessors and Microcomputer
As the microprocessor market began to take off, Motorola jumped into the frayand introduced its eight-bit 6800 in 1974, shortly after the 8080 ?rst appeared.While no longer available as a discrete microprocessor, the 6800 is signi?cant,because it remains in Motorolas successful 68HC05/68HC08 and 68HC11microcontroller families and also serves as a vehicle with which to learn thebasics of computer architecture. Like the 8080, the 6800 is housed in a 40-pinDIP and features a 16-bit address bus and an 8-bit data bus. All of the basicregister types of a modern microprocessor are implemented in the 6800, asshown in Fig. 6.1: a program counter (PC), stack pointer (SP), index register(X), two general-purpose accumulators (ACCA and ACCB), and status?ags set by the ALU in the condition code register (CCR). ACCA is theprimary accumulator, and some instructions oper- ate only on this registerand not ACCB. A half-carry ?ag is included to enable ef?cient binary codeddecimal (BCD) operations. After adding two BCD values with normal binaryarithmetic, the half- carry is used to convert illegal results back to BCD. The6800 provides a special instruction, decimal adjust ACCA (DAA), for thisspeci?c purpose. A somewhat out-of-place interrupt mask bit is alsoimplemented in the CCR, because this was an architecturally convenient placeto locate it. Bits in the CCR are modi?ed through either ALU operations ordirectly by transferring the value in ACCA to the CCR.
The 6800 supports three interrupts: one nonmaskable, one maskable, andone software interrupt. More recent variants of the 6800 support additionalinterrupt sources. A software interrupt can be used by any program runningon the microprocessor to immediately jump to some type of maintenanceroutine whose address does not have to be known by the calling program.When the software interrupt instruction is executed, the 6800 reads theappropriate interrupt vector from memory and jumps to the indicated address.The 6800s reset and interrupt vectors are located at the top of memory, aslisted in Table 6.1, which generally dictates that the boot ROM be locatedthere as well. For example, an 8-kB 27C64 EPROM(8,192 bytes = 0×2000 bytes) would occupy the address range 0xE000through 0xFFFF. Each vector is 16 bits wide, enough to specify the fulladdress of the associated routine. The MSB of the address, A[15:8], islocated in the low, or even, byte address, and the LSB, A[7:0] is locatedin the high, or odd, byte address.

FIGURE 6.1 6800 registers.

Kuvassa 6.1 6800 registers.

An external clock driver circuit that provides a two-phase clock (two clocksignals 180? out of phase with respect to each other) is required for the original6800. Motorola simpli?ed the design of 6800-based computer systems byintroducing two variants, the 6802 and 6808. The 6802 includes an on-boardclock driver circuit of the type that is now standard on many microprocessorsavailable today. Such clock drivers require only an external crystal to createa stable, reliable oscillator with which to clock the microprocessor. A crystalis a two-leaded component that contains a specially cut quartz crystal.The quartz can be made to resonate at its natural frequency by electricalstimulus cre- ated within the microprocessors on-board clock driver circuitry.A crystal is necessary for this pur- pose, because its oscillation frequency ispredictable and stable. The 6802 also includes 128 bytes of on-board RAMto further simplify certain systems that have small volatile memory requirements.For customers who wanted the simpli?ed clocking scheme of the 6802without paying for the on-board RAM, Motorolas 6808 kept the clockingand removed the RAM.
Using a 6802 with its internal RAM, a functional computer could be constructedwith only two chips: the 6802 and an EPROM. Unfortunately, such a computerwould not be very useful, because it would have no I/O with which to interactwith the outside world. Motorola manufactured a variety of peripheral chipsintended for direct connection to the 6800 bus. Among these were the 6821peripheral interface adapter (PIA) and the 6850 asynchronous communicationsinterface adapter (ACIA), a type of UART. The PIA provides 20 I/O signalsarranged as two 8-bit parallel ports, each with two control signals. Applicationsincluding basic pushbutton sensing and LED driving are easy with the 6821.The 6800 bus uses asynchronous control signals, meaning that memory andI/O devices do not explicitly require access to the microprocessor clock tocommunicate on the bus. However, many of the 6800 peripherals requiretheir own copy of the clock to run internal logic.
As with all synchronous logic, the 6800s bus is internally controlled by themicroprocessor clock, but the nature of the control signals enables asynchronousread and write transactions without referencing that clock, as shown in Fig. 6.2.An address is placed onto the bus along with the proper state of the R/Wselect signal (read = 1, write = 0) and a valid memory address (VMA) enablethat indicates an active bus cycle. In the case of a write, the write data isdriven out some time later. For reads, the data must be returned fast enoughto meet the microprocessors timing speci?cations. The 6802/6808 weremanufactured in 1-, 1.5-, and 2-MHz speed grades. At 2 MHz, a peripheraldevice has to respond to a read request with valid data within 210 ns afterthe assertion of address, R/W, and VMA. A peripheral has up to 290 nsfrom the assertion of these signals to complete a write transaction.
*In a real system, VMA, combined with address decoding logic, would drivethe individual chip select signals to each peripheral.
In some situations, slow peripherals may be used that cannot execute a bustransaction in the time allowed by the microprocessor. The 6800 architecturedeals with this by stretching the clock during a slow bus cycle. A clockcycle can be stretched as long as 10 ?s, enabling extremely slow peripheralsby delaying the next clock edge that will advance the microprocessorsinternal state and termi- nate a pending bus cycle. This stretching isperformed by an external clock circuit for a 6800, or by the internal clockof the 6802/6808. As with many modern microprocessors, the 6802/6808provides a pin that delays the end of the current bus cycle. This memoryready (MR) signal is normally high, signaling that the addressed device isready. When brought low, the clock is internally stretched until MR goeshigh again. Early microprocessors such as the 6800 used clock stretchingto delay bus cy- cles. Most modern microprocessors maintain a constantclock frequency and, instead, insert discrete wait states, or extra clockcycles, into a bus transaction when a similar type of signal is asserted.This latter method is usually preferable in a synchronous system becauseof the desire to maintain a simple clock circuit and to not disrupt otherlogic that may be running on the microprocessor clock.

FIGURE 6.2 6802/6808 basic bus timing.

Kuvassa 6.2 6802/6808 basic bus timing.

Motorolas success with the 6800 motivated it to introduce the upgraded 6809in 1978. The 6809 is instruction set compatible with the 6800 but includesseveral new registers that enable more ?exi- ble access to memory. Two stackpointers are present: the existing hardware controlled register for subroutinecalls and interrupts, and another for user control. The user stack pointer canbe used to ef?ciently pass parameters to subroutines as they are called withoutcon?icting with the microprocessors push/pop operations involving theprogram counter and other registers. A second index register and the abilityto use any of the four 16-bit pointer registers as index registers were addedto enable the simultaneous handling of multiple data structure pointers withouthaving to continually save and recall index register values. The 6809s twoaccumulators can be concatenated to form a 16-bit accumulator that enables16-bit arithmetic with an enhanced ALU. This ALU is also capable of eight-bitunsigned multiplication, which made the 6809 one of the ?rst integratedmicroprocessors with multiplication capability.
Other improvements in the 6809 included a direct page register (DPR) for amore ?exible eight- bit direct addressing mode. The 8-bit DPR, representingA[15:8], is combined with an 8-bit direct address, representing A[7:0], toform a 16-bit direct address, thereby enabling an 8-bit direct address toreference any location in the complete 64-kB address space. The 6809 alsoincluded a more advanced bus interface with direct support for an externalDMA controller. Several desktop computers, including the Tandy/RadioShack TRS-80 Color Computer, and various platforms, including arcadegames, utilized the 6809.
While still available from odd-lot retail outlets, the original 6800 family membersare no longer practical to use in many computing applications. Their capabilities,once leading edge, are now available in smaller, more integrated ICs at lowercost and with lower power consumption. However, the 6800 architecture isalive and well in the 68HC05/68HC08 and 68HC11 microcontroller familiesthat are based on the 6800/6802/6808 and 6809 architectures, respectively.These microcontrollers are available with a wide range of integrated featureswith on-board RAM, ROM (mask ROM, EE-PROM, or EPROM), serialports, timers, and analog-to-digital converters.

By : E-book Complete_Digital_Design