This is default featured post 1 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 2 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 3 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 4 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 5 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Tuesday, November 20, 2012
OPERATING MODES OF 8259A
CISC AND RISC
- Acronym for Complex Instruction Set Computer.
- They are chips that are easy to program and which makes efficient use of m/y.
- “High level” instruction set
- Executes several “low level operations”
- Ex: load, arithmetic operation,m/y store.
- Used in most common Intel 80x86 and Motorola 68k series.
- Extensive instructions.
- Complex and efficient machine instructions.
- Extensive addressing capabilities for m/y operations.
- Microending of the machine instructions.
- Relatively few registers.
- Instruction can operate directly on m/y.
- Small number of general purpose registers.
- Instructions take multiple clock to execute.
- Few lines of code per operation.
- A 2-operand format,where instruction have a source and a destination.
- Register to register,register to m/y,and m/y to register commands.
- Multiple addressing modes for m/y,including specialized modes for indexing through arrays.
- Variable length instructions where length often varies according to the addressing mode.
- Instructions which require multiple clock cycles to execute.
- Instruction set and chip hardware become more complex with each generation of computers,
- as many instructions could be stored in m/y with least possible wasted space,individual instructions could be of alost any length-this means that
- Only 20% of the available instructions are used ina typical pgm.
- Reduced Instruction Set Computer
- It is a type of microprocessor architectrure that utilizes a small,highly –optimized set of insrtructions,rather than a more specialized set of instructions often found in other types of architectures.
- Executes a series of simple instructions instead of a complex instruction.
- Incorporates a large number of general registers for arithmetic operations to avoid storing variables on a stack in m/y.
- Only the load and store instructions operate directly onto m/y.
- Pipelining=speed.
- EVOLUTION/HISTORY:-
- The first RISC projects came from IBM,Stanford,and UC-Berkeley in the late 70s.
- Ex:IBM 801,Stanford MIPS, and Berkrts,oreley RISC 1 and 2.
- DESIGN FEATURES:-
- ONE CYCLE EXECUTION TIME:-RISC processors have a CPI(clock per execution)of one cycle.this is due to the optimization of each instruction on the CPU and a technique called pipelining.
- PIPELINING:-A technique that allows for simultaneous execution of parts,or stages,of instructions to more efficiently process instructions.
- Large number of registers:-the RISC design incorporates a larger number of registers to prevent in large amounts of intertactions with m/y.
- ADVANTAGES OF RISC:-
- Being simple,can be hardwired while cisc have to use micro-programming yo implement complex instructions
- Set of simple instrns result in reduced complexity of the cu and datapath,so high clock frequency and high speed.
- m/y management units or floating point arithematic units can be plced in same chip.
- Smaller chips,lowers per-chip cost .
- High- level language compilers produce more efficient codes in a RISCprocessor than CISC.
- Shorter design cycle-RISC processors can be designed,developed and tested more easily than CISC.
- Application programmers find more easy,due to simple instrn set.
loading and decoding of instrn is simple and fast.decoding is simplified since opcode & adrs fields are located in same position for all instructions.
- RISC ATTRIBUTES:-
- Reduced instruction set.
- Less complex,simple instructions.
- Hardwired control unit and machine instructions.
- Few addressing schemes for m/y operands with only two basic instructions-LOAD and STRORE.
- Many symmetric registers which are organized into a register file.
- BASIC FEATURES OF RISC PROCESSORS:-
- SIMPLE INSTRUCTION SET
- Same length instruction:each instrn is of same length,so can be fetched in single operation.
- Single machine –cycle instrns:so it allows processor to handle many instrns at a time.RISC processors have unity CPI(clk per instrn).
- Pipelining:usually massive pipelining is embedded in RISC processor.pipelining is a key to speed.
- Very few addressing modes and formats.
- Large no of registers:it prevents large amt of interactions withj m/y.
- Microending not required:bcoz simple instrns can be easily built into hardware.
- Load and store architecture:implies that all m/y accesses take place using Load or Store type operations.
- DESIGN ISSUES OF RISC PROCESSORS:-
- Concept involves a mechanism where chips expose 32 registers to the programmer at any one time,but these registers is a window into larger set of physical registers.
- Additional registers are hidden from view until a subroutine is called.
- SPARC processors use this technique.
- DISADVANTAGES:-
- NO OF PHYSICAL REGISTERS is finite,so runs out.
- Unable to predict whether stack will overflow or under flow ,so performance unpredictable.
- Processor generates asoftware faults,consuming more cycles.
- Enormous demands on mux and register ports.
- Impossible to add multithreading
- Difficult to keep clock cycles.
- Five steps:-
- CAUTIONS ON THE USE OF RISC:
- Code quality should be maintained.
- Scheduling :choose compilers carefully based on quality.
- Debugging:instruction scheduling can make debugging difficult.
- Code expansion
- On chip cache required to feed large instructions.
DESIGN OF A PC BASED MULTIMICROPROCESSOR SYTEM
Introduction
- Gives an overview of a PC based multimicroprocessor system.
- Designed two subprocessing cards with an 8088 based system &64 memory each.
- These IBM PC compatible cards along with switching logic can be inserted in a PC simultaneously.
- Contain 3 8088 processors with one operating as a master processor while the other two operating in the slave mode.
- Master CPU means the main CPU &slave CPU referred to a subprocessors.
- The job is communicated with the system using the master processor of PC in the form of filenames.
- Master processor checks, if there is any invalid filename in the sequence, if found it accepts the next filename & display the invalid filename
- Both slave processors start executing the program one by one & each slave processor interrupts the main processor to ask for a new job.
- After the execution of each program is over, slave processors store result in respective result memory buffers and master processor store the result in hard disk.
- Hardware design structure describes the design procedure of the module& the details of the subprocessing cards.
- System is built around a PC that has the main processor 8088, acts as a root node/master.
- The main processor & both slave processors address a memory externally interfaced to PC.
- Transreceivers are required to derive the data lines from multiplexed address/data bus the latches are enabled by the ALE signal and the data will be enabled by the DEN signal.DEN signal, combination with DT/R signal decides the direction of data flow.
- ALE, DEN and DT/R are derived by separate 8288 bus controller chip. Since 8088 is used in maximum mode, all control signals are derived by 8288.
- Subprocessors will be able to run only .EXE files. Each subprocessor supports 64K byte memory. There is a constraint that EXE files should not be more than 60K bytes in size. The remaining 4K is reserved for the result buffer of the subprocessor.
- The same 64K memory supported by a slave is interfaced with the CPU of the PC.
- A clock is available at the IO channel of the PC may be used for driving the slave CPUs .There will be the constraint on the slave processors that the maximum speed of their operation can never be more than that of the main CPU.A separate clock generator will add some flexibility of operation and development.
- 64K byte local memory of a subprocessor is to be interfaced such that the subprocessor and the main processor identify a particular location by the same physical address.
- Bus window is a part of memory which can be addressed by more than one processor for communication.
- Two slave processors & so there will be two bus windows, one for each. Both windows are addressable by the master processor of PC which is the main processor, but each slave processor can address only one of them.
- The main processor has 64K byte personal memory under 00000 to 9FFFF.The two slots, each of 64K, starting from D0000H to DFFFFH and E0000H to EFFFFH are free. These 64K memory slots can be used as the bus window as well as the local memories for the individual slave CPUs.
- Main and sub processors able to identify particular location by a single physical address.
Control signals for bus windows
- Here derive read & write control signals for the bus windows.
- As a window is to be written or read by both processors, the MEMR and MEMWR signals of both processors are to be connected to WR and RD pins of memory. A buffer is used for isolating read/write operations of CPU.
- When both the processors i.e., slave and master address a common memory, all of their data lines and some of their address lines may be required to be connect with each other.
- When both the CPUs desire to access the common memory concurrently, a conflict may arise due to bus contention among the CPUs .To resolve this conflict, additional hardware is needed which will prevent one processor from referring to the bus window when other processor is using it.
- When one processor is using the bus window, the other one should not be allowed to access the bus, ie. The other processor should not place the address/data on the bus.
- This operation suggests the use of solid state switches .To derive these switches external hardware like address decoders and 8259 I/O cards will be required .The address, data and control lines should be buffered.
- 74245 chips are selected for isolation
- All the 74245s are enabled if the main processor wants to communicate with the bus window
- Signal flow through 74245 is unidirectional
- Enabling or disabling of isolation chips is controlled by isolation driver
- Control line is the RESETIN pin of each 8284A clock generator
- This pin resets when LOGIC 0 is applied to this pin, and the sub processor remains in that state when LOGIC1 is applied to it
- DT/R of PC is not available on the IO channel , it is derived from MEMR and MEMWR signals
- For MEMR operation , the data flows from memory to the CPU, so the isolation buffer is in receiver mode
- For MEMWR operation , data flows from CPU to memory, so the isolation buffer is in transmit mode
- In the diagram of data bus isolation, if DIR pin is high , it enters transmit mode; if it is 0 it enters receive mode
- If the data buffers are enabled at wrong moment then all irrelevant, erratic data present on data bus of the sub processing unit will be placed over the data bus of PC
- Data buffers should be enabled only if any bus window chip is selected
- Main processor sends the isolation control signal through isolation drivers
- Main control program-: controls the total operation of the system
- Two parts are the small local initialisation programs for each sub processors
- The software for a multiprocessor system should be defined as modular as possible
- Software modules must be used only by a particular processor in its local memory
- The total system is interrupt driven
- MAIN program
- Interrupt routine IRT2 for first sub processing unit
- Interrupt routine IRT3 for second sub processing unit
- The main program accepts the filename inputs at its prompt
- Looks for invalid filename to discard and accepts the next file name
- When sub processer starts execution , the main program makes the master processer to wait for the completion of execution
- Two slave processer use two interrupt inputs of the master to inform it that the previously allotted task is over and the master may read the results and allot them the next task
- Main program consists of two interrupt service routines for the two slaves.
- The functions of them are:
- Store the result of the previous program run by the sub processer
- Select the next program from EXE filename sequence
- Load it to the bus window of that particular sub processer
- Issue run message to the sub processer
- For each of these functions a separate routine is written
- All the routines are linked together to form a complete program
- Each program is checked independently for the passed input parameters
- List of the required inputs to each routine is prepared and checks whether a particular routine prepares the expected output parameters
- This is checked till the complete program run successfully
- Last step is to run the complete program and search for bugs if any and to remove them
- It contains initialisation routines which initialises the internal registers of the slave processer
- This is for the execution of the allotted task in the local memory
- These programs are available in the local memory and are not accessible to the master
- When a program is loaded in the bus window of a particular slave processer, the segment registers of that processers should be initialised according to the available local memory
- This routine contains the initialisation of all the segment registers and stack pointers
- After the initialisation of the processer the execution starts from 0200H. This is fixed by the local monitor as the program entry point
- Users program must contain ORG 200H statement at the start of the code segment
- Mov AX,0D000H
- Mov DS,AX
- Mov SS,AX
- Mov ES,AX
- Mov SP,0F7FFH
- JMP 0D000:0200H
- For the other sub processer , the same program is used but the segment address of the code and the data segment is 0E000H instead of 0D000H
INTERFACING I/O PORTS
- I/O ports are devices through which the microprocessor (µP) communicates with other devices or external data sources /destination
- That is for MP system i/p activity is similar to read operation & o/p activity is similar to write operations
- In programmable devices, the control word & status word can be written & read using i/p & o/p devices.
- After executing OUT operation, the data appears on the data bus at the same time a device signal is generated using address & control signals.
- If the data is to be there, at the o/p of the device till the next change , it must be latched.
- If the o/p port is to be source large currents the port lines must be buffered.
- So the latch acts as a good o/p port Chip 74LS373 contains 8 buffered latches & can be used as an 8 bit o/p port.
- While reading, one should take care that much current should not be sourced or sunk from the data lines to avoid loading.
- To avoid this problem, can use a tristate buffer as an i/p device.
- An i/p port may not be a latch as it reads the status of a signal at a particular instant.
- The chip 74LS245 contains 8 buffers & may be used as an 8 bit i/p port.
- 74LS245: A bidirectional buffer. But using it as an i/p device, only one direction is useful. This direction is selected using DIR pin.
- The OE & CS are the chip selects of 74LS373 & 74LS245 respectively.
- DS & QS are corresponding latch i/ps & o/ps.
- CLK is the clock i/p for D Flip Flop.
- If DIR=1, then direction is from A(i/p) to B(o/p) otherwise the data direction is from B(i/p) to A(o/p)
STEPS IN INTERFACING AN I/O DEVICE
INSTRUCTION EXECUTION TIMING
8086 Instruction Set Summary
- Data copy/transfer Instructions
- Arithmetic & Logical Instructions
- Branch Instructions
- Loop Instructions
- Machine Control Instructions
- Flag Manipulation Instructions
- Shift & Rotate Instructions
- String Instructions
The 8086 Addressing Modes