instructor: oluwayomi adamo digital systems design

15
Instructor: Oluwayomi Adamo Digital Systems Design

Upload: lambert-edwards

Post on 21-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Instructor: Oluwayomi Adamo Digital Systems Design

Instructor: Oluwayomi AdamoDigital Systems Design

Page 2: Instructor: Oluwayomi Adamo Digital Systems Design

Design a simple processor , capable of picking up data from a switch register, Operate the switch register using manually, Display output using LEDs or seven segment display, Perform basic operations such as add, subtract,

multiply and divide as well as data movement. Implement the processor in hardware, Test your implementation using basic set of

instruction you designed.

Page 3: Instructor: Oluwayomi Adamo Digital Systems Design

What is the System Requirement? What are functional blocks required? What is the size of your instructions? Types of Instructions to design:

1. Data handling and manipulation (add, sub, increment, and clear etc.)

2. Branch instructions3. Input and Output

Page 4: Instructor: Oluwayomi Adamo Digital Systems Design

Draw a block diagram of your simple processor,

The block diagram should show the interconnection of different registers, modules and control unit.

Sample instructions for testing, Control signal needed for your processor,

inputs and outputs needed. Inputs and outputs with respect to the FPGA

used for implementation.

Page 5: Instructor: Oluwayomi Adamo Digital Systems Design

Design a control unit for picking up instructions from memory address given by the program counter (PC).

Interpret the instruction, Fetch the operands and feed them to the

ALU, Store the result in destination registers Load the pc with destination address in case

of branch instruction, Contents of destination will be forwarded to

the LED or 7 segment display for display.

Page 6: Instructor: Oluwayomi Adamo Digital Systems Design

Op CC SRC DST

Register Instruction

01001011

Branch Instruction

11 CC ADDRESS

Halt and I/O Instruction

1100 L H DST

1100101111000110

11100011

Page 7: Instructor: Oluwayomi Adamo Digital Systems Design

◦ To be drawn in class

Page 8: Instructor: Oluwayomi Adamo Digital Systems Design

The control unit is like computer’s traffic cop. It coordinates and controls all operations occurring within

the processor. The control unit does not input, output, process, or store

data, it initiates and controls the sequence of these operations. Controls Data Movements in an Operational Circuit by

Switching Multiplexers and Enabling or Disabling Resources Follows Some ‘Program’ or Schedule Often Implemented as Finite State Machine or collection of

Finite State Machines

Page 9: Instructor: Oluwayomi Adamo Digital Systems Design

Any Circuit with Memory could be called a Finite State Machine◦ Even computers can be viewed as huge FSMs

Design of FSMs Involves◦ Defining states◦ Defining transitions between states◦ Optimization / minimization

Above Approach Is Practical for Small FSMs Only

Page 10: Instructor: Oluwayomi Adamo Digital Systems Design

Output Is a Function of a Present State Only TYPE state IS (S0, S1, S2); SIGNAL Moore_state: state;

U_Moore: PROCESS (clock, reset) BEGIN IF(reset = ‘1’) THEN Moore_state <= S0; ELSIF (clock = ‘1’ AND clock’event) THEN CASE Moore_state IS WHEN S0 => IF input = ‘1’ THEN Moore_state <= S1; ELSE Moore_state <= S0;

END IF;

reset

Page 11: Instructor: Oluwayomi Adamo Digital Systems Design

WHEN S1 =>

IF input = ‘0’ THEN Moore_state <= S2; ELSE Moore_state <= S1; END IF; WHEN S2 => IF input = ‘0’ THEN Moore_state <= S0; ELSE Moore_state <= S1; END IF; END CASE; END IF; END PROCESS;

Output <= ‘1’ WHEN Moore_state = S2 ELSE ‘0’;

Page 12: Instructor: Oluwayomi Adamo Digital Systems Design

Output Is a Function of a Present State and Inputs

TYPE state IS (S0, S1); SIGNAL Mealy_state: state;

U_Mealy: PROCESS(clock, reset) BEGIN IF(reset = ‘1’) THEN Mealy_state <= S0; ELSIF (clock = ‘1’ AND clock’event) THEN CASE Mealy_state IS WHEN S0 => IF input = ‘1’ THEN Mealy_state <= S1; ELSE Mealy_state <= S0; END IF;

Page 13: Instructor: Oluwayomi Adamo Digital Systems Design

WHEN S1 => IF input = ‘0’ THEN Mealy_state <= S0; ELSE Mealy_state <= S1; END IF; END CASE; END IF; END PROCESS;

Output <= ‘1’ WHEN (Mealy_state = S1 AND input = ‘0’) ELSE ‘0’;

Page 14: Instructor: Oluwayomi Adamo Digital Systems Design

Fetch -> Decode -> Execute

Fetch Sequence t1: MAR <- (PC) t2: MBR <- (memory) PC <- (PC) +1 t3: IR <- (MBR) (tx = time unit/clock cycle)

Page 15: Instructor: Oluwayomi Adamo Digital Systems Design

Good Luck!!!