Design of Digital Circuits (SS16)



Similar documents
Computer Organization and Components

Solutions. Solution The values of the signals are as follows:

Computer organization

Introducción. Diseño de sistemas digitales.1

Computer Organization and Components

Chapter 5 :: Memory and Logic Arrays

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

EE361: Digital Computer Organization Course Syllabus

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

Review: MIPS Addressing Modes/Instruction Formats

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic

Digital Systems Design! Lecture 1 - Introduction!!

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Introduction to Microprocessors

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

A FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2016

Let s put together a Manual Processor

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

CSE 141 Introduction to Computer Architecture Summer Session I, Lecture 1 Introduction. Pramod V. Argade June 27, 2005

Chapter 2 Logic Gates and Introduction to Computer Architecture

Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

AC : A PROCESSOR DESIGN PROJECT FOR A FIRST COURSE IN COMPUTER ORGANIZATION

COMPUTER ORGANIZATION ARCHITECTURES FOR EMBEDDED COMPUTING

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

A SystemC Transaction Level Model for the MIPS R3000 Processor

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands

Introduction to Cloud Computing

Modeling Registers and Counters

Generating MIF files

Lecture N -1- PHYS Microcontrollers

Embedded System Design. Disclaimer

Understanding Verilog Blocking and Non-blocking Assignments

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Design Cycle for Microprocessors

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Using Xilinx ISE for VHDL Based Design

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

Computer Systems Design and Architecture by V. Heuring and H. Jordan

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

CISC, RISC, and DSP Microprocessors

Chapter 13: Verification

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

EXPERIMENT 8. Flip-Flops and Sequential Circuits

PROGRAMMABLE ANALOG INTEGRATED CIRCUIT FOR USE IN REMOTELY OPERATED LABORATORIES

Instruction Set Architecture

ELEC2141 DIGITAL CIRCUIT DESIGN

EE360: Digital Design I Course Syllabus

路 論 Chapter 15 System-Level Physical Design

IA-64 Application Developer s Architecture Guide

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

THREE YEAR DEGREE (HONS.) COURSE BACHELOR OF COMPUTER APPLICATION (BCA) First Year Paper I Computer Fundamentals

Lab 1: Full Adder 0.0

CSE 141L Computer Architecture Lab Fall Lecture 2

Reduced Instruction Set Computer (RISC)

Hardware and Software

Memory Systems. Static Random Access Memory (SRAM) Cell

CHAPTER 7: The CPU and Memory

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches:

A Verilog HDL Test Bench Primer Application Note

Digital Systems. Role of the Digital Engineer

Intel 8086 architecture

Digital Systems. Syllabus 8/18/2010 1

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Winter 2002 MID-SESSION TEST Friday, March 1 6:30 to 8:00pm

ECE 451 Verilog Exercises. Sept 14, James Barnes

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

CS352H: Computer Systems Architecture

Compiling PCRE to FPGA for Accelerating SNORT IDS

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Guru Ghasidas Vishwavidyalaya, Bilaspur (C.G.) Institute of Technology. Electronics & Communication Engineering. B.

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

Multiplexers Two Types + Verilog

FINAL SCHEDULE YEAR 1 AUGUST WEEK 1

Curriculum for a Master s Degree in ECE with focus on Mixed Signal SOC Design

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

Master s degree programme in Electrical Engineering and Information Technology

AC : PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD)

Finite State Machine Design and VHDL Coding Techniques

Transcription:

Design of Digital Circuits (SS16) 252-0014-00L (6 ECTS), BSc in CS, ETH Zurich Lecturers: Srdjan Capkun, D-INFK, ETH Zurich Frank K. Gürkaynak, D-ITET, ETH Zurich Labs: Der-Yeuan Yu dyu@inf.ethz.ch Website: http://www.syssec.ethz.ch/education/digitaltechnik_16 1

In This Lecture Motivation for the lecture series Why should you care about Digital Circuits? The Art of Managing Complexity How can extremely complex systems be designed? Organization of the Course Information on the lectures Laboratory Exercises Exam How to get help when you are stuck 2

Introduction Design of Digital Circuits 2016 Srdjan Capkun Frank K. Gürkaynak http://www.syssec.ethz.ch/education/digitaltechnik_16 Adapted from Digital Design and Computer Architecture, David Money Harris & Sarah L. Harris 2007 Elsevier 3

Background Microprocessors have revolutionized our world Cell phones, Internet, rapid advances in medicine, etc. The semiconductor industry has grown from $21 billion in 1985 to $345 billion in 2016 4 source: http://www.sia-online.org (semiconductor industry association)

The Purpose of This Course Is That You: Learn what s under the hood of a computer Learn the principles of digital design Learn to systematically debug increasingly complex systems Design and build a microprocessor 5

Goal Be able to understand a statement such as: The microarchitecture is a three-way superscalar, pipelined architecture. Three-way superscalar means that by using parallel processing techniques, the processor is able on average to decode, dispatch, and complete execution of (retire) three instructions per clock cycle. To handle this level of instruction throughput, the P6 processor family uses a decoupled, 12-stage superpipeline that supports out-of-order instruction execution. Taken from: http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64- ia-32-architectures-software-developer-manual-325462.pdf 6

What Is This Lecture About? Computers 7

What Is This Lecture About? What s inside? 8

What Is This Lecture About? 9

What Is This Lecture About? How can we build them? 10 Intel Westmere: http://www.intel.com/pressroom/archive/releases/2010/20100316comp_sm.htm

The Art of Managing Complexity Abstraction Discipline The Three -Y s Hierarchy Modularity Regularity 11

Abstraction Hiding details when they are not important Abstraction Levels Application Software Operating Systems Architecture Micro architecture Logic Digital Circuits Analog Circuits Devices Physics Examples Programs Device drivers Instructions, Registers Datapath, Controllers Adders, Memories AND gates, NOT gates Amplifiers Transistors, Diodes Electrons 12

This Course Carnegie Mellon Abstraction Hiding details when they are not important Abstraction Levels Application Software Operating Systems Architecture Micro architecture Logic Digital Circuits Analog Circuits Devices Physics Examples Programs Device drivers Instructions, Registers Datapath, Controllers Adders, Memories AND gates, NOT gates Amplifiers Transistors, Diodes Electrons 13

Discipline Intentionally restricting your design choices to that you can work more productively at higher abstraction levels 14

The Three -Y s Hierarchy A system is divided into modules of smaller complexity Modularity Having well defined functions and interfaces Regularity Encouraging uniformity, so modules can be easily re-used 15

The Digital Abstraction Most physical variables are continuous, for example: Voltage on a wire Frequency of an oscillation Position of a mass Instead of considering all values, the digital abstraction considers only a discrete subset of values 16

Digital Discipline: Binary Values Typically consider only two discrete values: 1 s and 0 s 1 = TRUE = HIGH 0 = FALSE = LOW 1 and 0 can be represented by specific voltage levels, rotating gears, fluid levels, etc. Digital circuits usually depend on specific voltage levels to represent 1 and 0 Bit: Binary digit 17

How Much Can We Do with 1s and 0s? How do you write 2016 if you only had 1s and 0s to write with? 18

How Much Can We Do with 1s and 0s? How do you write 2016 if you only had 1s and 0s to write with? How about: -4.7913 10-12 x 8.1653 10-3 We will learn how to calculate with only 1s and 0s. 19

From Real Problems to 1s and 0s Example Problem: You are going to the cafeteria for lunch You won t eat lunch (E) If it is not open (O) or If they only serve cabbage (C) 20

From Real Problems to 1s and 0s Example Problem: You are going to the cafeteria for lunch You won t eat lunch (E) If it is not open (O) or If they only serve cabbage (C) O C E 0 0 0 1 1 0 1 1 We will learn how to formulate problems in truth tables 0 0 1 0 21

From Logic to Circuits Example: Alyssa P. Hacker has a snail that crawls down a paper tape with 1 s and 0 s on it. The snail smiles whenever the last four digits it has crawled over are 1101. 22

From Logic to Circuits Example: Alyssa P. Hacker has a snail that crawls down a paper tape with 1 s and 0 s on it. The snail smiles whenever the last four digits it has crawled over are 1101. A CLK S' 1 S 1 Y S' 0 Reset S 0 S 0 S 1 23

Verilog Will Help us Describe Circuits module divideby3fsm (input clk, input reset, output q); reg [1:0] state, nextstate; parameter S0 = 2'b00; parameter S1 = 2'b01; parameter S2 = 2'b10; always @ (posedge clk, posedge reset) // state register if (reset) state <= S0; else state <= nextstate; always @ (*) // next state logic case (state) S0: nextstate = S1; S1: nextstate = S2; S2: nextstate = S0; default: nextstate = S0; endcase assign q = (state == S0); // output logic endmodule 24

How Can We Add/Multiply Binary Numbers? A N B N ALU Y N 3 F 25

3 Zero Extend 2 1 0 1 0 Carnegie Mellon How Can We Add/Multiply Binary Numbers? A N B N A N B N N N F 2 ALU N 3 F C out + [N-1] S Y N N N N 2 F 1:0 Y N 26

27 The Single-Cycle MIPS Architecture SignImm CLK A RD Instruction Memory + 4 A1 A3 WD3 RD2 RD1 WE3 A2 CLK Sign Extend Register File 0 1 0 1 A RD Data Memory WD WE 0 1 PC 0 1 PC' Instr 25:21 20:16 15:0 5:0 SrcB 20:16 15:11 <<2 + ALUResult ReadData WriteData SrcA PCPlus4 PCBranch WriteReg 4:0 Result 31:26 RegDst Branch MemWrite MemtoReg ALUSrc RegWrite Op Funct Control Unit Zero PCSrc CLK ALUControl 2:0 ALU

Program Running on MIPS # MIPS assembly code # $s0 = array base address, $s1 = i # initialization code lui $s0, 0x23B8 # $s0 = 0x23B80000 ori $s0, $s0, 0xF000 # $s0 = 0x23B8F000 addi $s1, $0, 0 # i = 0 addi $t2, $0, 1000 # $t2 = 1000 loop: slt $t0, $s1, $t2 # i < 1000? beq $t0, $0, done # if not then done sll $t0, $s1, 2 # $t0 = i * 4 (byte offset) add $t0, $t0, $s0 # address of array[i] lw $t1, 0($t0) # $t1 = array[i] sll $t1, $t1, 3 # $t1 = array[i] * 8 sw $t1, 0($t0) # array[i] = array[i] * 8 addi $s1, $s1, 1 # i = i + 1 j loop # repeat done: 28

C to Machine Code Start writing program in a high-level language Compiler translates this into simple instructions that the processor will understand Assembler translates this into 1s and 0s that will control the processor 29

This Course Carnegie Mellon Abstraction Hiding details when they are not important Abstraction Levels Application Software Operating Systems Architecture Micro architecture Logic Digital Circuits Analog Circuits Devices Physics Examples Programs Device drivers Instructions, Registers Datapath, Controllers Adders, Memories AND gates, NOT gates Amplifiers Transistors, Diodes Electrons 30

In This Lecture Motivation for the lecture series Why should you care about Digital Circuits? The Art of Managing Complexity How can extremely complex systems be designed? Organization of the Course Information on the lectures Laboratory Exercises Exam How to get help when you are stuck 31

Schedule Lectures: Thursday, Friday, 10:00-12:00, ETH HG E7 09:00-10:00, ETH ML D28 No lectures on: 25 th, 31 st of March, 1 st of April (Easter) 5 th of May (Ascension) 3 rd of June (Last Day of School) Lab exercises: Will start in the third week of the semester (8 th of March) 10 lab sessions 2 hours each Lab sessions on Tuesday, Wednesday, Thursday and Friday In HG E 26.1 and HG E 26.3 32

Changes to the Lecture This Year Record number of students, changes to labs: In previous years all groups had one board. This year, we may not have enough boards, we will make them available for exercises. We will have some boards available for interested students Even more assistants for the laboratory exercises 6 assistants for every lab session One more session (Tuesday) Lectures (mostly) in German Email for technical problems Read by all TAs and the lecturers Quick help at all (well, almost all) times 33

Course Book Literature: Digital Design and Computer Architecture, David Harris and Sarah Harris ISBN-10: 0123704979 The course closely follows this book: http://www.sciencedirect.com/science/book/ 978-0-12-370497 (first edition) http://www.sciencedirect.com/science/book/ 9780123944245 (second edition) PDFs for download from ETH or with ETH VPN from home 34

Content The story of 1s/0s (ch1) Logic Design (ch2-3) Verilog (ch4) Digital Building Blocks (ch5) Assembly (ch6) Microarchitecture (ch7) Memory Systems (ch8) The older (2007) edition of the book is more aligned to the lecture 35

Laboratory Exercises Goal: By the end of the lecture (with a little help) design your own processor and make it work! Understand how processors are built Get an insight of how everything comes together This is an ambitious goal, so some of the exercises will be challenging 36

Laboratory Exercises Every group will work using an FPGA* board We will have some boards available to take home and experiment on your own if you want We will work in groups of two You will be able to enroll yourself electronically Four sessions per week Tuesday 08:15-10:00 Wednesday 13:15-15:00 Thursday 15:15-17:00 Friday 13:15-15:00 37 * Field Programmable Gate Array: a generic system that can be programmed to perform any digital function

Laboratory Exercise Topics Drawing Schematics Programming FPGAs Using Verilog Understanding Finite State Machines Developing your Arithmetic Logic Unit Writing MIPS assembly programs Implementing a single-cycle MIPS architecture 38

Laboratory Exercises will be Graded Laboratory exercises will account for 25 out of 100 points of your final grade You will be required to demonstrate your implementation Hand in a short report within 1 week of finishing every lab Only one report per group The report will be graded within the following week Each lab is 2.5 points Repeating students can choose: Take last years lab grade and not follow them this year Follow the lab exercises and get a new grade Decision must be made during enrolling in lab groups. No change afterwards! 39

Laboratory Exercises are Supervised There will be 2 hour supervised laboratory sessions Assistants will be there to answer your questions, and evaluate your results You can also work on your own, and come to present your results during the lab sessions You just need to show your results to an assistant during lab hours 40

Alternatives for Using the Software Come during laboratory hours and use the labs no need for setup, the computers are already pre-installed with what you need Install the software on your computer manually (approx. 10GB) Installation instructions: http://www.syssec.ethz.ch/education/digitaltechnik_16 41

About the Software Xilinx ISE Synthesis tool and environment (Verilog circuits) Professional software used in industry Not designed for education Can be a bit tough in the beginning But you learn the real thing So: Attend the lab sessions 42

Examination 90 minute exam within the exam period Scheduled by the school, we have no influence on the exam time. 6 to 8 questions, related to the lectures and labs Everything covered in the lectures can be part of the exam Six pages of hand-written notes allowed Accounts for 75 out 100 points of the final grade 25 points will come from the exercises Previous exams available through VIS https://www.vis.ethz.ch/de/services/examcollection/digitaltechnik/ 43

If You Need Help Write an e-mail to: digitaltechnik@lists.inf.ethz.ch All lecturers and assistants will receive this e-mail Write directly to: Frank Gürkaynak: kgf@ee.ethz.ch Srdjan Capkun: capkuns@inf.ethz.ch 44

Further Information Lecture web page http://www.syssec.ethz.ch/education/digitaltechnik_16 Any questions? 45