NP 14-15 Flashcards
What is cache memory?
Cache memory is RAM which is used as a temporary store for data and instructions. It is faster than main memory and is located on the CPU chip itself.
Direct Mapping
Each block in main memory is mapped to a single fixed location in the cache memory
Fully Associative Mapping
A block in main memory may be mapped to any cache location
Set Associative Mapping
The cache memory is divided into a number of SETS. a block in main memory A is mapped to a single unique SET, the mapping of the block is associative.
Explain how a 16 bit address bus with a 16 bit data register in an intel 8086 processor can still address 1Mb of memory
1Mb of memory requires 20 address bits.
The 8086 has four 16 bit segment registers which can address a 64K block of memory. To form an address, a segment address is combined with an offset address. The segment is shifted 4 bits to the left and added to the offset address.
For n-bit wide multiplicands and multipliers what determines the maximum speed of operation of the serial multiplication circuit as n becomes moderate to large
As n becomes moderate to large the speed of the operation of the circuit will be dictated by the propagation delay through the adder.
Describe the implementation of a stack in a microprocessor, in particular how this stack is managed and implemented
A stack is generally implemented in a special reserved block of main memory, typically at the very top. Stack grows down in memory. The processor maintains the address of the top of the stack in a stack pointer register.
Two operations are defined on a stack, PUSH and POP. The PUSH operation decrements the value in SP and then transfers a value to the address pointed to by SP. The POP operation copies the data pointed to by SP and then increments the value i SP. In this way the processor is able to store data in a last-in-first-out manner.
How can stack be used for passing parameters to a function or procedure?
Typically a procedure would have a list of parameters. When the procedure is called the current state of the CPU is saved by being pushed onto the stack. Similarly parameters are pushed onto the stack from where they can be accessed by addressing relative to the current SP value.
Explain the function of a barrel shifter
A barrel shifter performs a rotate in which the bits shifted out are inserted into the positions vacated
What are the advantages of implementing a shift register in a microprocessor CPU with combinational logic as opposed to sequential logic based upon D-Type flip-flops?
With a combinational shifter, any shift amount can be carried out on a single clock cycle by storing the data in appropriate registers between the shifter.
With a flip flop based solution, the shifter must be first loaded and then n clock cycles applied for an n place shift