ECE3073 Midsemester Test Flashcards
What is the difference between von Neumann and Harvard architecture?
von Neumann: Address and data bus is shared between memory and instructions.
Harvard: Separate data bus for memory and instructions. More advanced and can read data while executing instructions. It has higher memory bandwidth.
What is the difference between the CISC and RISC architecture?
Complex Instruction Set Computing: CISC supports hundreds to thousands of assembly instructions. Provides a wide range of powerful instructions, and is easy for a human programmer. The hardware to support such a wide range of instructions is slow and complex.
Reduced Instruction Set Computing: Complex instructions are slower than a sequence of simpler operations doing the same thing. Simple, fast computers with many registers and few instructions were developed. High level programming languages can convert complex instructions into smaller assembly instructions for the RISC processor. However, the program size is longer.
What is I/O space and its advantages/disadvantages?
Advantages: Requires less address decoding logic. There is more space for instructions and data in memory space.
Disadvantages: Requires it’s own read and write instructions.
What are the different control and general registers in the NIOS system? What is the program counter and OP-code?
6 control registers (ctl0 to ctl5) &ctl0 is for status. ctl13 is to enable interrupts for certain interrupt levels.
32 general purpose registers (r0 to r31). & r0 is zero register. r1 is the assembler temporary used for pseudo operations. r32 is return address for function calls.
Program counter: 32 bit register containing the address of the next instruction.
Each instruction has an OP-code which is contained in bits 0 to 5.
Name different types of NIOS instructions.
Data transfers, arithmetic, logical and shift/rotate, comparison, branch and jump, subroutine linkage and control instructions.
What are the steps when there is an exception?
Save processor status. Enable supervisor mode. Disable any other external processor inputs. Write address of instruction after exception to r29. Determine the cause of exception.
What is a software trap and what is it used for?
Trap instruction is inside of program. Transfers control to a different program.
What is a hardware interrupt? What are the requirements for a hardware interrupt to occur?
Raised by an external source. Assert irq0 to irq31. Interrupt is generated if ctl0: status bit(0)=1 (PIE bit must be active), interrupt request irqk is asserted, corresponding ienable in ctl3 is enabled.
The exception routine will determine which interrupt has the highest interrupt (by reading the pending interrupts).
What is an unimplemented instruction?
Exception occurs when processor encounters valid instruction that is not implemented in hardware.
What are the encoding types for an I-type and J-type instruction?
I-type: IMM16 is a signed number of bytes offset relative to the current instruction.
J-type: IMM26 is treated as an absolute word address. To convert to 32 bits, two zeros are attached to LSB and 28-31 are copied from current PC.
For a jump to a memory located in memory (jmp rA) then the full 32 bit address in rA is used.
What is synchronisation and when can synchronisation errors occur?
The sender/receiver is fast enough to accept the data as fast as it is required/sent or a clock signal is available to pace the transfer.
Synchronisation is required when data is transferred betwen two systems at different speeds. If a fast computer sends characters to a slow printer, it may send new characters before previous ones have been read.
How does an asynchronous handshake input work?
Provides synchronisation by passing handshake signals between computer and peripheral device.
Input: Computer has a data input and a control bus. Computer and input device signal to each other.
Idle: Interface says “no data available”
Data ready: Interface says “data now available”
Data taken: Computer says “data has been taken”
How does an asynchronous handshake output work?
Output: Computer has data output and control bus. Computer and output device signal to each other in a similar fashion to input.
Idle: Interface says “ready to receive data”
Data ready: Computer says “data now available”
Data taken: Interface says “data has been taken”
What is a polling loop? What is latency?
Processor checks over data from different devices. If data is present, then execute service for that device.
Latency is an important consideration. The time taken between changing the input and the processor responding to it (including the service routine).
To find the maximum latency, make sure to include the first “in” instruction assuming that the sample of the I/O port misses the bit change.
What are the advantages and disadvantages of polling?
Advantages: Responds very quickly for small number of devices. Any amount of devices can be supported. Flexible, I/O can be added/deleted by adjusting the list.
Disadvantages: Consumes computer time when no I/O operations are occurring. Response time is slow for large number of I/O devices. Difficult to do other things whilst polling. Urgent I/O request cannot suspend the servicing of low priority tasks.