Design of a Register File and Datapath

Size: px
Start display at page:

Download "Design of a Register File and Datapath"

Transcription

1 Lab #5 Design of a Register File and Datapath Objectives: to gain insight into the internal logic for data movement between registers in a computer to introduce the concept of a control word for implementing an elementary set of microoperations. to gain experience with the use of VHDL constructs to gain experience with incremental, modular design Preparation: Read the following experiment and study the circuits as shown. Study the ALU (example 6.24, p.360) and D flipflop (examples 7.2 and 7.3, p423) described in the textbook. Familiarize yourself with the VHDL code at the end of the lab that contains examples of the VHDL constructs: "SELECT", "PROCESS", "WHEN-ELSE" and "CASE". There are also several examples of the use of "STD_LOGIC_VECTOR" for defining a multi-bit input or output. Bring your textbook to the lab! Devices used: MAX7000 EPM7128SLC84-7 CPLD Introduction: The internal registers of a microprocessor characterize its architecture. For example, a 32 bit microprocessor has (mostly) 32 bit registers internally. Moving data among these registers is the single most frequent operation that takes place in a computer. In this session, we will construct a 4x4 "register file" comprising registers R0, R1, R2 and R3 (as shown in the figure of Step 4) to demonstrate the concept of register transfer logic. We will also implement a simple arithmetic and logic unit (ALU) and then combine the ALU and the register file to construct a simple computer datapath. Moving data from one register to another may be more accurately described as a "copy" operation. The destination register takes on the value of the source register which itself remains unchanged after the operation. The source and destination registers may be the same register. These register transfers are designated using register transfer notation. For example, copying the contents of a register Rs into another register Rd would be written as: Rd Rs where Rs is the source register (and remains unchanged) and Rd is the destination register.

2 A register file comprises a decoder which chooses a destination register and a multiplexer to direct the outputs of any register through to the data output lines. The decoder select lines may then be viewed as the destination "address" and the multiplexer select lines as the source "address".

3 Experiment: This datapath circuit to be built requires several components that we will design and implement and test individually. To facilitate successful implementation, verification and documentation of complex designs, one should proceed in an incremental, modular fashion whereby each component of a circuit is built and verified independently. The components are then put together and may form another, larger component at the next level of the design hierarchy. These combined components may then be combined to from even larger components and so on. This continues to the top level of the design. This practice applies to the design of hardware, software or any other system for that matter! Our final goal here is to design and implement the logic for a hardware datapath that contains a simple arithmetic and logic unit (ALU) that can perform low level processing. Proceed methodically and slowly and be mindful of bit ordering for the 4 bit bus connections. Use neatly arranged, colour coded wiring to aid in debugging and masking tape to affix temporary labels for the toggle switches on the breadboards. We start by designing the register file. Step 1 Decoder The register file requires a 2 line to 4 line decoder with HI true outputs and one HI true enable input as shown in the circuit of Step 4. This is similar to the decoder you designed in a previous lab. Implement this component using the graphic design editor and test it in the MAX7000 device. Generate a symbol for this decoder which you will use later. See appendix B.5, page 851. Step 2 Quad 4:1 MUX The register file also requires a Quad 4:1 multiplexer. A Quad 4:1 MUX has four 4 bit data

4 inputs, a 4 bit data output and two select lines as shown below. Study the VHDL source code given at the end of this lab that implements a Quad 4:1 multiplexer. Be sure you understand the logic of the VHDL code. Compile this program, implement and test using the MAX7000 device. Generate a symbol for this MUX which you will use later. What would an Octal 4:1 MUX look like? a Quad 2:1 MUX? Draw a block diagram.

5 Step 3 Registers The four registers R0, R1, R2 and R3 in the diagram below are to be implemented using the VHDL code at the end of this lab (similar to Figure 7.46, p. 429 of the textbook). Each register comprises 4 positive edge triggered D flipflops. Each register has a 4 bit input data and a 4 bit output data. The clock input to all flipflops in the register is defined as Clk. Compile this code and make a symbol for the register. Step 4 Register File

6 Now we will design the register file using the graphic design editor by connecting the multiplexer, decoder and four registers as shown below. Compile and test the register file circuit in the MAX7000 chip to ensure that all four registers can be loaded using toggle switches on the Data In lines, and read using LEDs connected at the Data Out lines. Be sure that you understand the timing of the "load enable" input relative to all the other inputs and outputs. Make a symbol for this circuit for use later. Show this working circuit to a Lab Demonstrator before proceeding. Step 5 Datapath

7 The register file forms the basis of a "datapath" which is a fundamental building block of a computer. See the diagram below. Data is selected from any register then stored back into any other register in the register file, all in a single clock cycle ( a lo hi lo pulse applied to the load enable LE input). A Quad 2:1 MUX included as shown below allows external data to be inserted into the datapath. Data can thus be transferred between any two registers of our register file or any register can be loaded with external data. This datapath can execute the following operations: (a) any register can be loaded with external data from switches Rd data (4 bits) (where d=0,1,2 or 3) (b) any register can be loaded with the data contained in any one of the other registers, including itself (register to register transfer) Rd Rs (where d, s = 0, 1, 2 or 3) The implementation is shown below. The inputs [ D1, D0, S1, S0, DS ] form a 5 bit "control" word which specifies the source (S1, S0) and destination (D1, D0) registers of the register file and an operation (DS) that is to take place. For DS=0, external data from switches is loaded into the destination register; for DS=1, data is transferred from the source register to the destination register. Once the control word and data input (if appropriate) are set on the level switches, execution is achieved by applying a load enable (LE) input to the register file. This LE input may be considered as the clock to the entire system. You can view the results of each operation using four LEDs connected to the output of the register file as shown. Design this data path using the graphic design editor. VHDL code for the Quad 2:1 MUX design is given at the end of this lab. Test the circuit for various combinations of the register transfers summarized in the following table.

8 Summary of register transfer operations Data Sourc e DS Source Register S1 S0 Destination Register D1 D0 data input Register Transfer Operation 0 X X 0 0 a b c d R0 abcd 0 X X 0 1 a b c d R1 abcd 0 X X 1 0 a b c d R2 abcd 0 X X 1 1 a b c d R3 abcd XXXX R0 R XXXX R1 R XXXX R2 R XXXX R3 R XXXX R0 R XXXX R1 R XXXX R2 R XXXX R3 R XXXX R0 R XXXX R1 R XXXX R2 R XXXX R3 R XXXX R0 R XXXX R1 R XXXX R2 R XXXX R3 R3 Step 6 ALU An ALU is a combinational logic circuit that performs various arithmetic and logic operations on n-bit data (operands). A simple 8-function ALU that operates on 4-bit inputs A and B is specified in the following table. The block symbol for an ALU is also given below. The number of bits on the "function select" input determines how many operations may be performed on the operands (in this example there are 2 3 = 8 functions). Its definition in VHDL code is given at the end of this lab (see Figure 6.48, p.360 of the textbook). Compile this code, then implement and test this function in the MAX7000 device using several values of A and B. Verify the function table: Function Outpu Operatio Select t n

9 s 2 s 1 s 0 F clear B - A subtract A - B subtract A + B add A XOR B exclusive OR A OR B logical OR A AND B logical AND preset Step 7 Modify the Register File To be able to include an ALU in our datapath, we must first modify our register file design so that it has the capability to select two registers as outputs (Source Register A and Source Register B). This will allow the contents of any two registers to be applied to the A and B inputs of the ALU. This is easily achieved by adding a second Quad 4:1 MUX to the design of the register file as shown below:

10 The inputs to this register file are now: destination register select (2 bits), source register A select (2 bits), source register B select (2 bits) and load enable (1 bit). The outputs are Data Out A and Data Out B (each 4 bits) as shown. Compile this design and create a symbol for this register file.

11 Step 8 Datapath with ALU Now, the datapath design can be extended by including the ALU from Step 6 and the register file from Step 7 as shown in the next figure: Using the graphic design editor, build this circuit using the previous components and compile, implement and test. This datapath has much more capability than our first design in Step 5: (a) (b) as before, any register can be loaded with external data from switches: Rd data (4 bits) (where d = 0, 1,2 or 3) any register can be loaded with the result of any of the eight functions supported by our ALU whose input is the data contained in any two of the registers. For example:

12 Rd RA + RB (where d, A, B = 0, 1, 2 or 3) would allow us to load any register with the sum of any two registers.

13 The inputs [ D1, D0, SA1, SA0, SB1, SB0, s 2, s 1, s 0, DS ] comprise a 10 bit control word which specifies a destination register (D1, D0), the two source registers (SA1, SA0) and (SB1, SB0), and the ALU function (s 2, s 1, s 0 ) that operates on the source registers. The DS input allows loading of the registers with external data via the Quad 2:1 MUX. For DS=0, external data from switches is loaded into the destination register; for DS=1, data is transferred from the ALU output to the destination register. As in Step 5, once the control word and data input (if appropriate) are set on the level switches, execution is achieved by applying a load enable (LE) input (pulse lo hi lo) to the register file. This LE input may be considered as the clock to the entire system. You can view the results of each operation using four LEDs connected to the output of the ALU as shown. The function that is executed in response to a control word and a LE clock input is called a microoperation. A series of microoperations applied to a datapath is called a microprogram. Try the following examples of microoperations in your implementation: Destination Register D1 D0 Source Register A SA1 SA0 Source Register B SB1 SB0 ALU function select s 2 s 1 s 0 Data Source DS data input Operation 0 0 X X X X X X X 0 a b c d R0 abcd 0 1 X X X X X X X 0 a b c d R1 abcd 1 0 X X X X X X X 0 a b c d R2 abcd 1 1 X X X X X X X 0 a b c d R3 abcd XXXX R0 R0 + R XXXX R1 R0 R2 1 0 X X X X XXXX R X X X X XXXX R XXXX R0 R2 AND R XXXX R1 R1 OR R XXXX R2 R1 XOR R XXXX R3 R3 XOR R3 Note: (1) the first four lines of this table allow for initializing the register contents ( DS = 0 ). (2) this is not a complete table of all possible microoperations that can execute What microoperation is implemented with the control word: ? What is the effect of the last microoperation in this table? What microoperation is implemented with the control word: ? Can you think of yet another way to implement this same operation?

14 If you want to experiment further, try changing the ALU functions. For example, replace the "preset" function with an "increment" (A+1) operation. Add status bits for Zero (Z) and Sign (S) as outputs from the ALU. Changes can be done very quickly in our modular design!

15 The VHDL source code for Quad 4:1 MUX LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY quad4to1mux IS PORT ( a, b, c, d : IN STD_LOGIC_VECTOR(3 DOWNTO 0) ; s : IN STD_LOGIC_VECTOR(1 DOWNTO 0) ; f : OUT STD_LOGIC_VECTOR(3 DOWNTO 0) ); END quad4to1mux ; ARCHITECTURE Behavior OF quad4to1mux IS BEGIN WITH s SELECT f <= a WHEN "00", b WHEN "01", c WHEN "10", d WHEN OTHERS ; END Behavior ; The VHDL source code for 4-bit Register LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY reg4 IS PORT ( D : IN STD_LOGIC_VECTOR(3 DOWNTO 0) ; Clk : IN STD_LOGIC ; Q : OUT STD_LOGIC_VECTOR(3 DOWNTO 0) ); END reg4 ; ARCHITECTURE Behavior OF reg4 IS BEGIN PROCESS (Clk) BEGIN IF Clk'EVENT AND Clk = '1' THEN Q <= D; END IF; END PROCESS ; END Behavior ;

16 The VHDL source code for Quad 2:1 MUX LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY quad2to1mux IS PORT ( a, b : IN STD_LOGIC_VECTOR(3 DOWNTO 0) ; s : IN STD_LOGIC ; f : OUT STD_LOGIC_VECTOR(3 DOWNTO 0) ); END quad2to1mux ; ARCHITECTURE Behavior OF quad2to1mux IS BEGIN f <= a WHEN s='0' ELSE b ; END Behavior ; The VHDL source code for 8-function, 4-bit ALU LIBRARY ieee ; USE ieee.std_logic_1164.all ; USE ieee.std_logic_signed.all ; ENTITY alu IS PORT ( s : IN STD_LOGIC_VECTOR(2 DOWNTO 0) ; A, B : IN STD_LOGIC_VECTOR(3 DOWNTO 0) ; F : OUT STD_LOGIC_VECTOR(3 DOWNTO 0) ) ; END alu ; ARCHITECTURE Behavior OF alu IS BEGIN PROCESS ( s, A, B ) BEGIN CASE s IS WHEN "000" => F <= "0000" ; WHEN "001" => F <= B - A ; WHEN "010" => F <= A - B ; WHEN "011" => F <= A + B ; WHEN "100" => F <= A XOR B ; WHEN "101" => F <= A OR B ; WHEN "110" => F <= A AND B ; WHEN OTHERS => F <= "1111" ; END CASE ; END PROCESS ; END Behavior ;

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

Digital Design with VHDL

Digital Design with VHDL Digital Design with VHDL CSE 560M Lecture 5 Shakir James Shakir James 1 Plan for Today Announcement Commentary due Wednesday HW1 assigned today. Begin immediately! Questions VHDL help session Assignment

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Chapter 2 Logic Gates and Introduction to Computer Architecture

Chapter 2 Logic Gates and Introduction to Computer Architecture Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are

More information

Computer organization

Computer organization Computer organization Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 9 - Register Transfer and Microoperations Microoperations Digital systems are modular in nature, with modules containing registers, decoders, arithmetic

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots Registers As you probably know (if you don t then you should consider changing your course), data processing is usually

More information

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process) ECE 3401 Lecture 7 Concurrent Statements & Sequential Statements (Process) Concurrent Statements VHDL provides four different types of concurrent statements namely: Signal Assignment Statement Simple Assignment

More information

150127-Microprocessor & Assembly Language

150127-Microprocessor & Assembly Language Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an

More information

ELEC 2210 - EXPERIMENT 1 Basic Digital Logic Circuits

ELEC 2210 - EXPERIMENT 1 Basic Digital Logic Circuits Objectives ELEC - EXPERIMENT Basic Digital Logic Circuits The experiments in this laboratory exercise will provide an introduction to digital electronic circuits. You will learn how to use the IDL-00 Bit

More information

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

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path Project Summary This project involves the schematic and layout design of an 8-bit microprocessor data

More information

16-bit ALU, Register File and Memory Write Interface

16-bit ALU, Register File and Memory Write Interface CS M152B Fall 2002 Project 2 16-bit ALU, Register File and Memory Write Interface Suggested Due Date: Monday, October 21, 2002 Actual Due Date determined by your Lab TA This project will take much longer

More information

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.1 Objectives To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.2 Introduction Circuits for counting events are frequently used in computers and other digital

More information

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation

More information

Quartus II Introduction for VHDL Users

Quartus II Introduction for VHDL Users Quartus II Introduction for VHDL Users This tutorial presents an introduction to the Quartus II software. It gives a general overview of a typical CAD flow for designing circuits that are implemented by

More information

DEPARTMENT OF INFORMATION TECHNLOGY

DEPARTMENT OF INFORMATION TECHNLOGY DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453

More information

The 104 Duke_ACC Machine

The 104 Duke_ACC Machine The 104 Duke_ACC Machine The goal of the next two lessons is to design and simulate a simple accumulator-based processor. The specifications for this processor and some of the QuartusII design components

More information

12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr

12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr 2..,.,.. Flip-Flops :, Flip-Flops, Flip Flop. ( MOD)... -8 8, 7 ( ).. n Flip-Flops. n Flip-Flops : 2 n. 2 n, Modulo. (-5) -4 ( -), (-) - ( -).. / A A A 2 3 4 5 MOD-5 6 MOD-6 7 MOD-7 8 9 / A A A 2 3 4 5

More information

CHAPTER 3 Boolean Algebra and Digital Logic

CHAPTER 3 Boolean Algebra and Digital Logic CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4

More information

VHDL GUIDELINES FOR SYNTHESIS

VHDL GUIDELINES FOR SYNTHESIS VHDL GUIDELINES FOR SYNTHESIS Claudio Talarico For internal use only 1/19 BASICS VHDL VHDL (Very high speed integrated circuit Hardware Description Language) is a hardware description language that allows

More information

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

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization David Sullins, Dr. Hardy Pottinger, Dr. Daryl Beetner University of Missouri Rolla Session I.

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design PH-315 COMINATIONAL and SEUENTIAL LOGIC CIRCUITS Hardware implementation and software design A La Rosa I PURPOSE: To familiarize with combinational and sequential logic circuits Combinational circuits

More information

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential Logic (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential vs. Combinational Circuits Combinatorial circuits: their outputs are computed entirely from their present

More information

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

Flip-Flops, Registers, Counters, and a Simple Processor

Flip-Flops, Registers, Counters, and a Simple Processor June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number

More information

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER OBJECTIVES 1. Learn the basic elements of VHDL that are implemented in Warp. 2. Build a simple application using VHDL and

More information

Gates, Circuits, and Boolean Algebra

Gates, Circuits, and Boolean Algebra Gates, Circuits, and Boolean Algebra Computers and Electricity A gate is a device that performs a basic operation on electrical signals Gates are combined into circuits to perform more complicated tasks

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

Lecture-3 MEMORY: Development of Memory:

Lecture-3 MEMORY: Development of Memory: Lecture-3 MEMORY: It is a storage device. It stores program data and the results. There are two kind of memories; semiconductor memories & magnetic memories. Semiconductor memories are faster, smaller,

More information

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE Ioan Lemeni Computer and Communication Engineering Department Faculty of Automation, Computers and Electronics University of Craiova 13, A.I. Cuza, Craiova,

More information

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

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Dr. Greg Tumbush, gtumbush@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement

More information

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition A Tutorial Approach James O. Hamblen Georgia Institute of Technology Michael D. Furman Georgia Institute of Technology KLUWER ACADEMIC PUBLISHERS Boston

More information

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1 MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable

More information

Lab 7: VHDL 16-Bit Shifter

Lab 7: VHDL 16-Bit Shifter Lab 7: VHDL 16-Bit Shifter Objectives : Design a 16-bit shifter which need implement eight shift operations: logic shift right, logic shift left, arithmetic shift right, arithmetic shift left, rotate right,

More information

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

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB OBJECTIVES 1. Introduction to latches and the D type flip-flop 2. Use of actual flip-flops to help you understand sequential

More information

The components. E3: Digital electronics. Goals:

The components. E3: Digital electronics. Goals: E3: Digital electronics Goals: Basic understanding of logic circuits. Become familiar with the most common digital components and their use. Equipment: 1 st. LED bridge 1 st. 7-segment display. 2 st. IC

More information

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa Experiment # 9 Clock generator circuits & Counters Eng. Waleed Y. Mousa 1. Objectives: 1. Understanding the principles and construction of Clock generator. 2. To be familiar with clock pulse generation

More information

Digital Systems Design. VGA Video Display Generation

Digital Systems Design. VGA Video Display Generation Digital Systems Design Video Signal Generation for the Altera DE Board Dr. D. J. Jackson Lecture 12-1 VGA Video Display Generation A VGA signal contains 5 active signals Two TTL compatible signals for

More information

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction

More information

Lesson 12 Sequential Circuits: Flip-Flops

Lesson 12 Sequential Circuits: Flip-Flops Lesson 12 Sequential Circuits: Flip-Flops 1. Overview of a Synchronous Sequential Circuit We saw from last lesson that the level sensitive latches could cause instability in a sequential system. This instability

More information

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

A s we saw in Chapter 4, a CPU contains three main sections: the register section, 6 CPU Design A s we saw in Chapter 4, a CPU contains three main sections: the register section, the arithmetic/logic unit (ALU), and the control unit. These sections work together to perform the sequences

More information

Counters and Decoders

Counters and Decoders Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter

More information

7. Latches and Flip-Flops

7. Latches and Flip-Flops Chapter 7 Latches and Flip-Flops Page 1 of 18 7. Latches and Flip-Flops Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. The

More information

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas Take-Home Exercise Assume you want the counter below to count mod-6 backward. That is, it would count 0-5-4-3-2-1-0, etc. Assume it is reset on startup, and design the wiring to make the counter count

More information

ECE380 Digital Logic

ECE380 Digital Logic ECE38 igital Logic Flip-Flops, Registers and Counters: Flip-Flops r.. J. Jackson Lecture 25- Flip-flops The gated latch circuits presented are level sensitive and can change states more than once during

More information

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu. Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.tw Review Computers in mid 50 s Hardware was expensive

More information

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann Chapter 7 Registers & Register Transfers J. J. Shann J.J. Shann Chapter Overview 7- Registers and Load Enable 7-2 Register Transfers 7-3 Register Transfer Operations 7-4 A Note for VHDL and Verilog Users

More information

CPE 462 VHDL: Simulation and Synthesis

CPE 462 VHDL: Simulation and Synthesis CPE 462 VHDL: Simulation and Synthesis Topic #09 - a) Introduction to random numbers in hardware Fortuna was the goddess of fortune and personification of luck in Roman religion. She might bring good luck

More information

Two's Complement Adder/Subtractor Lab L03

Two's Complement Adder/Subtractor Lab L03 Two's Complement Adder/Subtractor Lab L03 Introduction Computers are usually designed to perform indirect subtraction instead of direct subtraction. Adding -B to A is equivalent to subtracting B from A,

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

Modeling Latches and Flip-flops

Modeling Latches and Flip-flops Lab Workbook Introduction Sequential circuits are digital circuits in which the output depends not only on the present input (like combinatorial circuits), but also on the past sequence of inputs. In effect,

More information

Module 3: Floyd, Digital Fundamental

Module 3: Floyd, Digital Fundamental Module 3: Lecturer : Yongsheng Gao Room : Tech - 3.25 Email : yongsheng.gao@griffith.edu.au Structure : 6 lectures 1 Tutorial Assessment: 1 Laboratory (5%) 1 Test (20%) Textbook : Floyd, Digital Fundamental

More information

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

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995 UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering EEC180B Lab 7: MISP Processor Design Spring 1995 Objective: In this lab, you will complete the design of the MISP processor,

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions.

More information

Hardware Implementation of the Stone Metamorphic Cipher

Hardware Implementation of the Stone Metamorphic Cipher International Journal of Computer Science & Network Security VOL.10 No.8, 2010 Hardware Implementation of the Stone Metamorphic Cipher Rabie A. Mahmoud 1, Magdy Saeb 2 1. Department of Mathematics, Faculty

More information

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division Introduction to Programmable Logic Devices John Coughlan RAL Technology Department Detector & Electronics Division PPD Lectures Programmable Logic is Key Underlying Technology. First-Level and High-Level

More information

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit Modeling Sequential Elements with Verilog Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw 4-1 Sequential Circuit Outputs are functions of inputs and present states of storage elements

More information

DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs

DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs August 1986 Revised March 2000 DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary General Description This device contains two independent negative-edge-triggered

More information

Chapter 9 Computer Design Basics!

Chapter 9 Computer Design Basics! Logic and Computer Design Fundamentals Chapter 9 Computer Design Basics! Part 2 A Simple Computer! Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

More information

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.

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. The circuit created is an 8-bit adder. The 8-bit adder adds two 8-bit binary inputs and the result is produced in the output. In order to create a Full 8-bit adder, I could use eight Full -bit adders and

More information

Lecture 8: Synchronous Digital Systems

Lecture 8: Synchronous Digital Systems Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered

More information

Lenguaje VHDL. Diseño de sistemas digitales secuenciales

Lenguaje VHDL. Diseño de sistemas digitales secuenciales Lenguaje VHDL Diseño de sistemas digitales secuenciales Flip-Flop D 1 entity d_ff is clk: in std_logic; d: in std_logic; q: out std_logic 2 end d_ff; P3 P1 5 Q D Q Q(t+1) 0 0 0 0 1 0 1 0 1 1 1 1 architecture

More information

İSTANBUL AYDIN UNIVERSITY

İSTANBUL AYDIN UNIVERSITY İSTANBUL AYDIN UNIVERSITY FACULTY OF ENGİNEERİNG SOFTWARE ENGINEERING THE PROJECT OF THE INSTRUCTION SET COMPUTER ORGANIZATION GÖZDE ARAS B1205.090015 Instructor: Prof. Dr. HASAN HÜSEYİN BALIK DECEMBER

More information

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 195 4.2 CPU Basics and Organization 195 4.2.1 The Registers 196 4.2.2 The ALU 197 4.2.3 The Control Unit 197 4.3 The Bus 197 4.4 Clocks

More information

Design: a mod-8 Counter

Design: a mod-8 Counter Design: a mod-8 Counter A mod-8 counter stores a integer value, and increments that value (say) on each clock tick, and wraps around to 0 if the previous stored value was 7. So, the stored value follows

More information

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage

More information

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2 CSE 141L Computer Architecture Lab Fall 2003 Lecture 2 Pramod V. Argade CSE141L: Computer Architecture Lab Instructor: TA: Readers: Pramod V. Argade (p2argade@cs.ucsd.edu) Office Hour: Tue./Thu. 9:30-10:30

More information

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors I. Introduction I.a. Objectives In this experiment, parallel adders, subtractors and complementors will be designed and investigated. In the

More information

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

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Objectives: Analyze the operation of sequential logic circuits. Understand the operation of digital counters.

More information

Registers & Counters

Registers & Counters Objectives This section deals with some simple and useful sequential circuits. Its objectives are to: Introduce registers as multi-bit storage devices. Introduce counters by adding logic to registers implementing

More information

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

Introducción. Diseño de sistemas digitales.1 Introducción Adapted from: Mary Jane Irwin ( www.cse.psu.edu/~mji ) www.cse.psu.edu/~cg431 [Original from Computer Organization and Design, Patterson & Hennessy, 2005, UCB] Diseño de sistemas digitales.1

More information

Digital Electronics Detailed Outline

Digital Electronics Detailed Outline Digital Electronics Detailed Outline Unit 1: Fundamentals of Analog and Digital Electronics (32 Total Days) Lesson 1.1: Foundations and the Board Game Counter (9 days) 1. Safety is an important concept

More information

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit 1 Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT OF FOR THE DEGREE IN Bachelor of Technology In Electronics and Communication

More information

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

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the

More information

Memory Elements. Combinational logic cannot remember

Memory Elements. Combinational logic cannot remember Memory Elements Combinational logic cannot remember Output logic values are function of inputs only Feedback is needed to be able to remember a logic value Memory elements are needed in most digital logic

More information

An Example VHDL Application for the TM-4

An Example VHDL Application for the TM-4 An Example VHDL Application for the TM-4 Dave Galloway Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto March 2005 Introduction This document describes a simple

More information

PART B QUESTIONS AND ANSWERS UNIT I

PART B QUESTIONS AND ANSWERS UNIT I PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional

More information

Figure 8-1 Four Possible Results of Adding Two Bits

Figure 8-1 Four Possible Results of Adding Two Bits CHPTER EIGHT Combinational Logic pplications Thus far, our discussion has focused on the theoretical design issues of computer systems. We have not yet addressed any of the actual hardware you might find

More information

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse. DIGITAL COUNTERS http://www.tutorialspoint.com/computer_logical_organization/digital_counters.htm Copyright tutorialspoint.com Counter is a sequential circuit. A digital circuit which is used for a counting

More information

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

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on CS 61C: Great Ideas in Computer Architecture Finite State Machines Instructors: Krste Asanovic & Vladimir Stojanovic hbp://inst.eecs.berkeley.edu/~cs61c/sp15 1 Levels of RepresentaKon/ InterpretaKon High

More information

Using Altera MAX Series as Microcontroller I/O Expanders

Using Altera MAX Series as Microcontroller I/O Expanders 2014.09.22 Using Altera MAX Series as Microcontroller I/O Expanders AN-265 Subscribe Many microcontroller and microprocessor chips limit the available I/O ports and pins to conserve pin counts and reduce

More information

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator A tutorial prepared for IE 575 by Dr. T.C. Chang 1 Use On-Line Help Use on-line help for program editing and TBasic function definitions. 2 Open

More information

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

Solutions. Solution 4.1. 4.1.1 The values of the signals are as follows: 4 Solutions Solution 4.1 4.1.1 The values of the signals are as follows: RegWrite MemRead ALUMux MemWrite ALUOp RegMux Branch a. 1 0 0 (Reg) 0 Add 1 (ALU) 0 b. 1 1 1 (Imm) 0 Add 1 (Mem) 0 ALUMux is the

More information

A New Paradigm for Synchronous State Machine Design in Verilog

A New Paradigm for Synchronous State Machine Design in Verilog A New Paradigm for Synchronous State Machine Design in Verilog Randy Nuss Copyright 1999 Idea Consulting Introduction Synchronous State Machines are one of the most common building blocks in modern digital

More information

CHAPTER 11: Flip Flops

CHAPTER 11: Flip Flops CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach

More information

VGA video signal generation

VGA video signal generation A VGA display controller VGA video signal generation A VGA video signal contains 5 active signals: horizontal sync: digital signal, used for synchronisation of the video vertical sync: digital signal,

More information

Decimal Number (base 10) Binary Number (base 2)

Decimal Number (base 10) Binary Number (base 2) LECTURE 5. BINARY COUNTER Before starting with counters there is some vital information that needs to be understood. The most important is the fact that since the outputs of a digital chip can only be

More information

PURDUE UNIVERSITY NORTH CENTRAL

PURDUE UNIVERSITY NORTH CENTRAL ECET 109/159 PURDUE UNIVERSITY NORTH CENTRAL Electrical and Computer Engineering Technology Department All Semesters ECET Lab Report Format and Guidelines I. Introduction. Part of being technically educated

More information

CS311 Lecture: Sequential Circuits

CS311 Lecture: Sequential Circuits CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 9 Latches, Flip-Flops, and Timers ETEC 23 Programmable Logic Devices Chapter 9 Latches, Flip-Flops, and Timers Shawnee State University Department of Industrial and Engineering Technologies Copyright 27 by Janna B. Gallaher Latches A temporary

More information

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary RTL Design RTL Overview Gate-level design is now rare! design automation is necessary to manage the complexity of modern circuits only library designers use gates automated RTL synthesis is now almost

More information

Assembly Language Programming

Assembly Language Programming Assembly Language Programming Assemblers were the first programs to assist in programming. The idea of the assembler is simple: represent each computer instruction with an acronym (group of letters). Eg:

More information

State Machines in VHDL

State Machines in VHDL State Machines in VHDL Implementing state machines in VHDL is fun and easy provided you stick to some fairly well established forms. These styles for state machine coding given here is not intended to

More information

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Asynchronous & Synchronous Reset Design Techniques - Part Deux Clifford E. Cummings Don Mills Steve Golson Sunburst Design, Inc. LCDM Engineering Trilobyte Systems cliffc@sunburst-design.com mills@lcdm-eng.com sgolson@trilobyte.com ABSTRACT This paper will investigate

More information

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

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands Ben Bruidegom, benb@science.uva.nl AMSTEL Instituut Universiteit van Amsterdam Kruislaan 404 NL-1098 SM Amsterdam

More information

Sistemas Digitais I LESI - 2º ano

Sistemas Digitais I LESI - 2º ano Sistemas Digitais I LESI - 2º ano Lesson 6 - Combinational Design Practices Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA - PLDs (1) - The

More information