Week 2 Flashcards

1
Q

n-bit processors?

A

n-bit processor indicates it has an n-bit ALU. The ALU decides how much data can be processed at a time. A 16-bit ALU can process 16 bits of data at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Data Bus

A

-Transfers data
-Width determines how much data can be transferred at a time in one cycle
-The wider the data bus, the more data can be transferred in one cycle so less number of cycles required and a faster processor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Control Bus

A

-Carries control signals
-Control signals include:
-Selection of memory or I/O devices
-Direction of data transfer
-Synchronisation of data transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Address Bus

A

Address bus transfers data .
1 wire can address 2 locations.
Intel 8086 has a 20-bit address bus so can address 2^20 locations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many bits in one byte

A

8 bits in one byte
One memory location stores on byte of data
2^N locations can store 2^N bytes of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is data “2023H” stored in memory?

A

Its stored as 2 bytes. Instead of one 2023H being stored as one, a 20H and a 23H is stored separately. One memory cell can store 8 bits maximum.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Whats the little endian rule?

A

Its a type of addressing that refers to the order of data stored in memory.
The LSB is first stored and subsequent bits are stored incrementally.
In other words, the lower byte of data are stored at the lower byte of memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

To transfer the data 2023H to memory using 16 bit data bus…?

A

2 memory locations need to be accessed. In one cycle, 2 addresses can be transferred by the address bus. Therefore we need 2 cycles to transfer 2023H

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is memory banking? (16 bit 8086)

A

Goal is to access two consecutive memory locations in one cycle (16 bits). The memory chip is equally divided into banks. Minimum byte operation needs 1 byte so 8 bits so 2 are needed for 16 bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Transferring data using even bank and odd bank

A

The two banks are even and odd. The even bank is the lower bank and the odd bank is the higher bank. Now 2 memory locations can be accessed at the same time. Each bank is connected to the processor using a tablet, using 8 wires tied together and 16 bit database. So 16 bits of data can be transferred at the same time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Memory Banking? (32 bit 8086)

A

For 32 bit, four addresses need to be accessed simultaneously to obtain 32 bits of data at a time. So we need to divide the memory physically to four chip and then 32 bits can be accessed at the same time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is aligned/misaligned memory access?

A

A memory access is said to be aligned when the data being accessed is n-byte long and the datum address is n-byte aligned.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are registers?

A

A temporary storage locations inside the CPU to store data/instructions/address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Status/Flag registers

A
  • Contains the current state of a CPU
  • Checked by CPU before execution of every instruction
  • Updated after every execution
  • 8086 has a 16-bit flag register
  • 1 bit per flag
  • 7 bits unused
  • 9 bit used: 6 status flags and 3 control flags
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Flag purposes

A
  • CF: carry flag is set to 1 if there is an unsigned overflow or if there is a borrow during subtraction out of the MSB
  • PF: parity flag is set to 1 if result from ALU has even number of 1s
  • AF: auxiliary flag is similar to CF but watches over the lower 4-bit
  • ZF: zero flag is set to 1 if the result from the ALU is zero
  • SF: signal flag copies to the MSB of the result from the ALU
  • OF: overflow flag is set to 1 when the result is out of range/of signed operation
  • TF: trap flag set to 1 to get into single step mode for debugging
  • IF: interrupt flag set to 1/0 to enable/mask interrupts
  • DF: flag set to 1/0 to set direction to decrementing/incrementing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is pipelining?

A

Pipelining is a technique for implementing instruction-level parallelism within a single processor. Pipelining attempts to keep every part of the processor busy with some instruction by dividing incoming instructions into a series of sequential steps performed by different processor units with different parts of instructions processed in parallel.

17
Q

What are the types of interrupt:

A

Hardware interrupts:
- Asynchronous: not related to what code the processor is currently executing

Software interrupts:
- Synchronous: the result of specific instructions executing

18
Q

8086 Interrupt service routine (ISR)

A

ISR is a subroutine which processor is forced to execute to respond to a specific event

  1. An interrupt signal is emitted
  2. CPU suspends its current work if interrupt is accepted and saves its status:
    -It saves the instruction address for the processor to return later
    - saves the flag registers
    - resets two flags which are IF and TF
    - loads the ISR address
  3. CPU executes ISR:
    - An ISR is a specifically written program to service an interrupt
    - For each interrupt INTn, there’s an interrupt service routine ISRn
    - In 8086, there’s 256 interrupt. The addresses are stored in the IVT
  4. After the CPU returns to the main program and continue what it was doing
    - IRET instruction
    - Restores instruction address
    - Restores flag register values
19
Q

8086 Interrupt vector table (IVT)

A
  • IVT stores the address of the ISRs
  • They’re stored at fixed addresses of the memory
  • For example for intel 8086 the first 1kb of memory is reserved for the IVT
  • There’s max 256 interrupts
  • Each interrupt requires 4 memory locations to store the ISR address
20
Q

8086 Interrupt sources

A
  • Hardware interrupts
  • Software interrupts
  • Internally generated interrupts
21
Q

Interrupt - Masking

A

We can enable and disable most hardware interrupts as needed. Non-maskable hardware interrupt has priority over maskeable interrupts

22
Q

Interrupt - Vectored/Non-vectored

A

If a hardware interrupt has a fixed vector address, its a vectored interrupt otherwise its a non vectored interrupt

23
Q

Interrupt - controller

A

Multiplexes has a number of possible interrupt sources on the platform for presentation to the processor. Can be integrated part in microcontrollers

24
Q

Interrupt - Priority

A

Exceptions and software interrupts have higher priority
Adjustable hardware interrupt priorities in modern processors
Always consider priority and check processor manuals

25
Q

Interrupts - Nested system

A

These are interrupts allowed at anytime and anywhere even when an ISR is being executed
Interrupts are served according to priority
Opposite to nested interrupts: sequential interrupts