1 2-Hardware Design Basics of Embedded Processors (cont.)

Slides:



Advertisements
Similar presentations
CPE 201 Digital Design Lecture 25: Register Transfer Level Design (2)
Advertisements

Give qualifications of instructors: DAP
Specifies combinational logic (unclocked) always stmt. should use “=“ (called “blocking” assignment) in comb. logic always statements. RHS just takes output.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 2: Custom single-purpose processors.
DATAPATHS 3) Shifters. 4) Comparators 5) Counters.
10/13/2005Comp 120 Fall October Questions? Today Control.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 2: Custom single-purpose processors.
Integer Square Root.
Sequential Logic Design Process A sequential circuit that controls Boolean outputs and a specific time- ordered behavior is called a controller. StepDescription.
L14 – Control & Execution 1 Comp 411 – Fall /04/09 Control & Execution Finite State Machines for Control MIPS Execution.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 2: Custom single-purpose processors.
1 Register-Transfer Level (RTL) Design Recall –Chapter 2: Combinational Logic Design First step: Capture behavior (using equation or truth table) Remaining.
Chapter 7. Register Transfer and Computer Operations
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
From Combinational to Sequential Circuits to Simple Processors
מימוש ובדיקת GCD ב- VHDL. 2 Greatest Common Devisor בהינתן שני מספרים A ו- B: while (A != B){ if (A > B) A = A – B; else B = B – A; } GCD = A;
Chapter 2: Custom single-purpose processors
RT-Level Custom Design. This Week in DIG II  Introduction  Combinational logic  Sequential logic  Custom single-purpose processor design  Review.
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
1 Introduction Chapters 2 & 3: Introduced increasingly complex digital building blocks –Gates, multiplexors, decoders, basic registers, and controllers.
L15 – Control & Execution 1 Comp 411 – Spring /25/08 Control & Execution Finite State Machines for Control MIPS Execution.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
CPEN Digital System Design Chapter 9 – Computer Design
Advanced Verilog EECS 270 v10/23/06.
Register-Transfer Level (RTL) Design The combination of a controller and datapath is known as a processor. The most common method of designing a processor.
Digital Design – Register-Transfer Level (RTL) Design Chapter 5 - Register-Transfer Level (RTL) Design.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
From Combinational to Sequential Circuits to Simple Processors
1 2-Hardware Design Basics of Embedded Processors.
Registers CPE 49 RMUTI KOTAT.
Digital Logic Design Sequential circuits
IKI Register-transfer Design
Hussein Bin Sama && Tareq Alawneh
1 2-Hardware Design Basics of Embedded Processors (cont.)
Introduction to Sequential Logic Design Finite State-Machine Design.
CE1110: Digital Logic Design Sequential Circuits.
Lec 3bSystems Architecture1 Systems Architecture Lecture 3b: Review of Sequential Logic Circuits Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan.
DLD Lecture 26 Finite State Machine Design Procedure.
11/17/2007DSD,USIT,GGSIPU1 RTL Systems References: 1.Introduction to Digital System by Milos Ercegovac,Tomas Lang, Jaime H. Moreno; wiley publisher 2.Digital.
Lecture 21: Registers and Counters (1)
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
VHDL Discussion Finite State Machines
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
1 2-Hardware Design Basics of Embedded Processors.
IAY 0600 Digital Systems Design Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology.
Dr. Turki F. Al-Somani VHDL synthesis and simulation.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
Interacting Finite State Machine Design Shaun Murphy.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
REGISTERS - Introduction to Registers Shift Registers Lecture 1 Gunjeet Kaur Dronacharya Group of Institutions.
REGISTER TRANSFER LANGUAGE (RTL)
Chapter 1: Introduction
Register Transfer Specification And Design
2-Hardware Design Basics of Embedded Processors (cont.)
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Chapter 2: Custom single-purpose processors
IAY 0600 Digital Systems Design
IAY 0600 Digital Systems Design
COE 202 Introduction to Verilog
IAS 0600 Digital Systems Design
Finite State Machines (part 1)
Chapter 2: Custom single-purpose processors
The Verilog Hardware Description Language
Chapter 2: Custom single-purpose processors
RTL Design Methodology Transition from Pseudocode & Interface
Chapter 2: Custom single-purpose processors
EMBEDDED SYSTEMS Prof. Ch.Ramesh Embedded Systems 1.
Presentation transcript:

1 2-Hardware Design Basics of Embedded Processors (cont.)

2 Outline Introduction Combinational logic Sequential logic Custom single-purpose processor design RT-level custom single-purpose processor design

3 Custom single-purpose processor basic model controller and datapath controllerdatapath … … external control inputs external control outputs … external data inputs … external data outputs datapath control inputs datapath control outputs … … a view inside the controller and datapath controllerdatapath … … state register next-state and control logic registers functional units

4 Example: greatest common divisor GCD (a) black-box view x_i y_i d_o go_i 0: int x, y; 1: while (1) { 2: while (!go_i); 3: x = x_i; 4: y = y_i; 5: while (x != y) { 6: if (x < y) 7: y = y - x; else 8: x = x - y; } 9: d_o = x; } (b) desired functionality y = y -x 7: x = x - y 8: 6-J: x!=y 5: !(x!=y) x<y!(x<y) 6: 5-J: 1: 1 !1 x = x_i 3: y = y_i 4: 2: 2-J: !go_i !(!go_i) d_o = x 1-J: 9: (c) state diagram First create algorithm Convert algorithm to “complex” state machine  Known as FSMD: finite-state machine with datapath  Can use templates to perform such conversion

5 State diagram templates Assignment statement a = b next statement a = b next statement Loop statement while (cond) { loop-body- statements } next statement loop-body- statements cond next statement !cond J: C: Branch statement if (c1) c1 stmts else if c2 c2 stmts else other stmts next statement c1 c2 stmts !c1*c2 !c1*!c2 next statement othersc1 stmts J: C:

6 Creating the datapath Create a register for any declared variable Create a functional unit for each arithmetic operation Connect the ports, registers and functional units  Based on reads and writes  Use multiplexors for multiple sources Create unique identifier  for each datapath component control input and output y = y -x 7: x = x - y 8: 6-J: x!=y 5: !(x!=y) x<y!(x<y) 6: 5-J: 1: 1 !1 x = x_i 3: y = y_i 4: 2: 2-J: !go_i !(!go_i) d_o = x 1-J: 9: subtractor 7: y-x8: x-y5: x!=y6: x<y x_iy_i d_o 0: x0: y 9: d n-bit 2x1 x_sel y_sel x_ld y_ld x_neq_y x_lt_y d_ld < 5: x!=y != Datapath

7 Creating the controller’s FSM Same structure as FSMD Replace complex actions/conditions with datapath configurations y = y -x 7: x = x - y 8: 6-J: x!=y 5: !(x!=y) x<y!(x<y) 6: 5-J: 1: 1 !1 x = x_i 3: y = y_i 4: 2: 2-J: !go_i !(!go_i) d_o = x 1-J: 9: y_sel = 1 y_ld = 1 7: x_sel = 1 x_ld = 1 8: 6-J: x_neq_y 5: !x_neq_y x_lt_y!x_lt_y 6: 5-J: d_ld = 1 1-J: 9: x_sel = 0 x_ld = 1 3: y_sel = 0 y_ld = 1 4: 1: 1 !1 2: 2-J: !go_i !(!go_i) go_i Controller subtractor 7: y-x8: x-y5: x!=y6: x<y x_iy_i d_o 0: x0: y 9: d n-bit 2x1 x_sel y_sel x_ld y_ld x_neq_y x_lt_y d_ld < 5: x!=y != Datapath

8 Splitting into a controller and datapath y_sel = 1 y_ld = 1 7: x_sel = 1 x_ld = 1 8: 6-J: x_neq_y=1 5: x_neq_y=0 x_lt_y=1x_lt_y=0 6: 5-J: d_ld = 1 1-J: 9: x_sel = 0 x_ld = 1 3: y_sel = 0 y_ld = 1 4: 1: 1 !1 2: 2-J: !go_i !(!go_i) go_i Controller Controller implementation model y_sel x_sel Combinational logic Q3Q0 State register go_i x_neq_y x_lt_y x_ld y_ld d_ld Q2Q1 I3I0I2I1 subtractor 7: y-x8: x-y5: x!=y6: x<y x_iy_i d_o 0: x0: y 9: d n-bit 2x1 x_sel y_sel x_ld y_ld x_neq_y x_lt_y d_ld < 5: x!=y != (b) Datapath

9 Controller state table for the GCD example InputsOutputs Q3Q2Q1Q0 x_neq_y x_lt_ygo_iI3I2I1I0x_sely_selx_ldy_ldd_ld 0000***0001XX **00010XX **10011XX ***0001XX ***01000X ***0101X **1011XX **0110XX *0*1000XX *1*0111XX ***1001X ***10011X ***1010XX ***0101XX ***1100XX ***0000XX ***0000XX ***0000XX ***0000XX000

10 Completing the GCD custom single- purpose processor design We finished the datapath We have a state table for the next state and control logic  All that’s left is combinational logic design This is not an optimized design, but we see the basic steps … … a view inside the controller and datapath controllerdatapath … … state register next-state and control logic registers functional units

11 We often start with a state machine  Rather than algorithm  Cycle timing often too central to functionality Example  Bus bridge that converts 4-bit bus to 8-bit bus  Start with FSMD  Known as register-transfer (RT) level  Exercise: complete the design RT-level custom single-purpose processor design Problem Specification Bridge A single-purpose processor that converts two 4-bit inputs, arriving one at a time over data_in along with a rdy_in pulse, into one 8-bit output on data_out along with a rdy_out pulse. Sende r data_in(4) rdy_in rdy_out data_out(8) Rece iver clock FSMD WaitFirst4RecFirst4Start data_lo=data_in WaitSecond4 rdy_in=1 rdy_in=0 RecFirst4End rdy_in=1 RecSecond4Start data_hi=data_in RecSecond4End rdy_in=1 rdy_in=0 rdy_in=1 rdy_in=0 Send8Start data_out=data_hi & data_lo rdy_out=1 Send8End rdy_out=0 Bridge rdy_in=0 Inputs rdy_in: bit; data_in: bit[4]; Outputs rdy_out: bit; data_out:bit[8] Variables data_lo, data_hi: bit[4];

12 RT-level custom single-purpose processor design (cont’) WaitFirst4RecFirst4Start data_lo_ld=1 WaitSecond4 rdy_in=1 rdy_in=0 RecFirst4End rdy_in=1 RecSecond4Start data_hi_ld=1 RecSecond4End rdy_in=1 rdy_in=0 rdy_in=1 rdy_in=0 Send8Start data_out_ld=1 rdy_out=1 Send8End rdy_out=0 (a) Controller rdy_inrdy_out data_lodata_hi data_in(4) (b) Datapath data_out data_out_lddata_hi_ld data_lo_ld clk to all registers data_out Bridge