ASIC = Application specific integrated circuit

Similar documents
EECS150 - Digital Design Lecture 9 - CPU Microarchitecture. CMOS Devices

Slide Set 6. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

Digital Design and Computer Architecture

Pipeline design. Mehran Rezaei

06 1 MIPS Implementation Pipelined DLX and MIPS Implementations: Hardware, notation, hazards.

CMOS VLSI Design. Lab 3: Datapath and Zipper Assembly

CS 152 Midterm 2 May 2, 2002 Bob Brodersen

First Name Last Name November 10, 2009 CS-343 Exam 2

Register Transfer Level (RTL) Design Cont.

Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

Sequential Logic Design CS 64: Computer Organization and Design Logic Lecture #14

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

A few questions to test your familiarity of Lab7 at the end of finishing all assigned parts of Lab 7

CS/ECE 250: Computer Architecture. Basics of Logic Design: ALU, Storage, Tristate. Benjamin Lee

Go BEARS~ What are Machine Structures? Lecture #15 Intro to Synchronous Digital Systems, State Elements I C

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design ALU and Storage Elements

More Digital Circuits

Introduction to CMOS VLSI Design (E158) Lab 3: Datapath and Zipper Assembly

Ryerson University Department of Electrical and Computer Engineering COE/BME 328 Digital Systems

Chapter 4 (Part I) The Processor. Baback Izadi Division of Engineering Programs

6.3 Sequential Circuits (plus a few Combinational)

PIPELINING: BRANCH AND MULTICYCLE INSTRUCTIONS

CS61C : Machine Structures

Digital Design and Computer Architecture

CPE300: Digital System Architecture and Design

Review C program: foo.c Compiler Assembly program: foo.s Assembler Object(mach lang module): foo.o. Lecture #14

CS61C : Machine Structures

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Fundamentals of Computer Systems

CS 61C: Great Ideas in Computer Architecture

Multiplexor (aka MUX) An example, yet VERY useful circuit!

Sequential Elements con t Synchronous Digital Systems

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Pipelining. Improve performance by increasing instruction throughput Program execution order. Data access. Instruction. fetch. Data access.

Computer Systems Architecture

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

CSE 352 Laboratory Assignment 3

CS3350B Computer Architecture Winter 2015

Slide Set 9. for ENCM 501 in Winter Steve Norman, PhD, PEng

Chapter 05: Basic Processing Units Control Unit Design Organization. Lesson 11: Multiple Bus Organisation

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

CS61C : Machine Structures

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

Instruction Level Parallelism

EE 209 Lab 7 A Walk-Off

EE 447/547 VLSI Design. Lecture 9: Sequential Circuits. VLSI Design EE 447/547 Sequential circuits 1

Sequential Logic. Introduction to Computer Yung-Yu Chuang

Lab #12: 4-Bit Arithmetic Logic Unit (ALU)

Digital Design Datapath Components: Parallel Load Register

Lab Assignment 5 I. THE 4-BIT CPU AND CONTROL

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Lecture 10: Sequential Circuits

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Review: What is it? What does it do? slti $4, $5, 6

An Overview of FLEET CS-152

Spiral Content Mapping. Spiral 2 1. Learning Outcomes DATAPATH COMPONENTS. Datapath Components: Counters Adders Design Example: Crosswalk Controller

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Computer Architecture and Organization

COMP sequential logic 1 Jan. 25, 2016

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

North Shore Community College

CSE140L: Components and Design Techniques for Digital Systems Lab. CPU design and PLDs. Tajana Simunic Rosing. Source: Vahid, Katz

On the Rules of Low-Power Design

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

Chapter Contents. Appendix A: Digital Logic. Some Definitions

COE328 Course Outline. Fall 2007

Computer Graphics NV1 (1DT383) Computer Graphics (1TT180) Cary Laxer, Ph.D. Visiting Lecturer

CPS311 Lecture: Sequential Circuits

Low Power VLSI Circuits and Systems Prof. Ajit Pal Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

WINTER 15 EXAMINATION Model Answer

CprE 281: Digital Logic

VLSI Design: 3) Explain the various MOSFET Capacitances & their significance. 4) Draw a CMOS Inverter. Explain its transfer characteristics

PROCESSOR BASED TIMING SIGNAL GENERATOR FOR RADAR AND SENSOR APPLICATIONS

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

11. Sequential Elements

ELEN Electronique numérique

AN ABSTRACT OF THE THESIS OF

Principles of Computer Architecture. Appendix A: Digital Logic

UNIVERSITY OF MASSACHUSSETS LOWELL Department of Electrical & Computer Engineering Course Syllabus for Logic Design Fall 2013

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Counters

Microprocessor Design

Contents Circuits... 1

Designing for High Speed-Performance in CPLDs and FPGAs

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature

CSC258: Computer Organization. Combinational Logic

UC Berkeley CS61C : Machine Structures

MODULE 3. Combinational & Sequential logic

Laboratory Exercise 7

Lab 2: Hardware/Software Co-design with the Wimp51

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

CS8803: Advanced Digital Design for Embedded Hardware

Transcription:

ASIC = Application specific integrated circuit

CS 2630 Computer Organization Meeting 19: Building a MIPS processor Brandon Myers University of Iowa

The goal: implement most of MIPS

So far

Implementing the addu instruction register file

still need to: support more than 1 kind of arithmetic operation feed the CPU with a program support branches and load/store

Next: we ve discussed what is in this box, but we need to learn about the rest of what is needed for a MIPS processor Project 2-1: the stuff in this box Project 2-2: everything else

Implementing the addu instruction register file How do we program the addu machine?

Peer instruction Give the sequence of addu machine inputs to perform $t0 = $t1 + $t2 + $t3 a) 1 st clock cycle: rd=8, rs=9, rt=10 2 nd clock cycle: rd=8, rs=8, rt=11 b) 1 st clock cycle: rd=0, rs=9, rt=10 2 nd clock cycle: rd=8, rs=0, rt=0 3 rd clock cycle: rd=0, rs=8, rt=11 4 th clock cycle: rd=8, rs=0, rt=0 c) 1 st clock cycle: rd=0, rs=10, rt=11 2 nd clock cycle: rd=8, rs=0, rt=0 3 rd clock cycle: rd=0, rs=8, rt=9 4 th clock cycle: rd=8, rs=0, rt=0 d) 1 st clock cycle: rd=9, rs=10, rt=11 2 nd clock cycle: rd=8, rs=0, rt=0

Administrivia Reminder: HW4 due March 30 (Thursday) Project 2 out later this week; you will complete it in phases brief break now for project groups On ICON by April 3, one group member submit to assignment Project 2 Groups add self to a Project 2 group in the People tab

How do we program the addu machine? Example: 8 8 14 On each clock cycle, we are allowed to change the inputs rd, rs, and rt to perform another addition.

But, where do those inputs come from?

mining difficulty http://cseweb.ucsd.edu/~mbtaylor/papers/bitcoin_taylor_cases_2013.pdf year the difficulty target is adjusted based on the network's recent performance, with the aim of keeping the average time between new blocks at ten minutes. In this way the system automatically adapts to the total amount of mining power on the network wikipedia.org/wiki/bitcoin citing Andreas M. Antonopoulos (April 2014). Mastering Bitcoin. Unlocking Digital Crypto-Currencies. O'Reilly Media. ISBN 978-1-4493-7404-4. https://en.wikipedia.org/wiki/bitcoin

CS 2630 Computer Organization Meeting 20: Building a MIPS processor Brandon Myers University of Iowa

But, where do those inputs come from? the instruction memory recall the layout of bits in R-type instructions

How do we know which instruction we are on?

How do we know which instruction we are on? Store the current address in a 32-bit register called the program counter (PC) Add 4 each cycle to go to the next word (next instruction)

The complete addu machine

Architecture and microarchitecture Architecture also known as ISA, the programmer s interface it includes the things on the MIPS reference sheet: 32 registers, PC, instructions and their behavior (RTL) Microarchitecture an implementation of the ISA we ll examine at least two kinds of microarchitectures for MIPS right now: a single-cycle design where an instruction executes in one clock period later: a pipelined design where an instruction takes multiple clock periods

The complete addu machine But, how do we get data into the addu machine? All registers start with the value 0. Let s modify the circuit to include addiu

Peer instruction Modify the processor so it also knows how to execute both addiu and addu Assume you have a component called control that takes a MIPS opcode as input and provides a 1-bit signal isaddiu as output. isaddiu = 0 if the opcode is 0x0 (the opcode for addu) isaddiu = 1 if the opcode is 0x9 (the opcode for addiu) opcode control isaddiu bonus: implement the inside of control

Addu/addiu machine 1. Look at RTL of addu and addiu. What are the differences? 2. Where do we get the immediate from? 3. Each difference in the RTL can be handled with a MUX Interesting points: there was a 2- cycle solution, too lookup microcode for more information about that kind of design

Project 2: MIPS processor Project 2-1 is assigned later today one submission per team team check ins weekly Project 2-1: ALU and register file and tests Project 2-2: datapath and control path of pipelined MIPS processor, tests, and test programs

Project 2-1: ALU ALU stands for arithmetic logic unit Notice that the output Equal is different from the Zero? signal from the textbook and lecture examples

Project 2-1: ALU Switch plays the same role as the signal ALU control in the textbook. However, mind the differences! Do not bother building your own adder/shifter/comparator! You can use any built-in Logisim component.

Project 2-1: testing the ALU You must use a Linux environment to run the tests. Many options for students using Windows computers: a) connect to instructional machines through ssh (using WinSCP) or through fastx.divms.uiowa.edu b) Use the lab machines directly c) Use a Virtual machine d) Use cygwin e) if Windows 10, then enable Ubuntu console For students using Linux or MacOSX computers: use the terminal Ask for help early! There is no excuse to not run the tests.

Administrivia The next three weeks including this week will have lab space for you to work on Project2 with your group! All three sessions are still Wednesday (4/5, 4/12, 4/19) 6pm-7pm but in a different room: 474 VAN (van allen hall). This classroom is "TILE" so you can work at circular tables and there is plenty of room.

Logisim hack! Converting truth tables to boolean logic to circuits getting you down? Use Logisim s logic analysis tools! Steps: 1. create a new circuit with just the inputs and outputs (only 1-bit signals are allowed) 2. Project > Analyze Circuit > enter your circuit as a truth table or as a boolean expression 3. Click build circuit, then look at the different representations (truth table, expression, circuit,...)

Next steps Add more instructions to our processor: other R and I types (or, ori, subu) load and store (lw, sw) branches (beq/bne) jumps (j, jr, jal) How do we implement the control logic?

Addu/addiu machine sign extend

How to control the ALU s operation Control unit outputs a control signal ALUOp to tell ALU controller what operation to compute on inputs A and B ALUOp encoding ALUOp Means pick a unique encoding for each operation 00 add 01 subtract 1x R-type, so look at funct to get the operation This ALUOp has 2 bits but you would need more to support all the operations done by I-type instructions Create an ALU decoder unit that uses the ALUOp and the Funct to produce the Switch signal Switch (aka ALUControl) ALUOp A ALUResult ALU ==Zero? B DDCA, 2 nd Ed

How to control the ALU s operation Control unit outputs a control signal ALUOp to tell ALU controller what operation to compute on inputs A and B ALUOp encoding ALUOp Means pick a unique encoding for each operation 00 add 01 subtract 1x R-type, so look at funct to get the operation This ALUOp has 2 bits but you would need more to support all the operations done by I-type instructions Create an ALU decoder unit that uses the ALUOp and the Funct to produce the Switch signal ALUControl truth table ALUOp Switch (aka ALUControl) ALUOp Funct Switch (aka ALUControl) 00 x add 01 x sub 1x 0 shift left 1x 1 shift right logical 1x 2 shift right arithmetic 1x...... A B ALU ALUResult ==Zero?

When you just don t care A don t care is where you put an X in the truth table to indicate that it doesn t matter if the bit is a 0 or a 1. X s can drastically simplify the truth table and the resulting combinational logic circuit. Why? The person/tool simplifying the circuit can pick whether a 1 or 0 for the X makes the circuit simpler. Example from your recent experience... What should happen to the Soda Machine FSM when Dime and Nickel inputs are both 1 in the same clock period? If our circuit s behavior is unspecified for a certain input case then we can put X s into the truth table. You can also put X s in the output column an X in the output means that you don t care what the output is for a certain input case if you use Logisim s logic analyzer, be aware that it allows for X s in the output bits but not the input bits Do not confuse don t cares (X s in the truth table) with Logisim s RED wires (i.e., wires where the value has X s in it). Red wires are always bad.

Using memory for data Load word 32 32 DataIn ReadAddr DataOut 32 Store word 32 Data memory WriteAddr WrEnable 1. Draw the Data Memory on the right side of your processor 2. Using the RTL above, add circuitry that is sufficient for executing load word (lw). Assume that you have a 1-bit control signal islw (1 when instruction is a lw, 0 otherwise) 3. Using the RTL above, add circuitry that is sufficient for executing load word (sw). If you need a control signal, just pick a descriptive name. Assume that you have a 1-bit control signal issw (1 when instruction is a sw, 0 otherwise)

Control unit truth table Instruction Opcode Regwrite RegDst ALUSrc Branch MemWrite MemToReg ALUOp R-type 000000 1 0 0 0 0 0 10 addiu lw sw beq Here is our ALUOp encoding for reference ALUOp Means 00 add 01 subtract 1x R-type, so look at funct to get the operation