Engineering 303 Digital Logic Design Fall 2018

Size: px
Start display at page:

Download "Engineering 303 Digital Logic Design Fall 2018"

Transcription

1 Engineering 303 Digital Logic Design Fall 2018 LAB 4: Seven Seg, Full Adder, Ripple Adder, Heirarchical Design Build the following designs and verify correct operation. This lab uses hierarchical design. Review Part 2 - Qartus II Tutorial: Hierarchical Diagram Design Simulation from lab 1 before you do section 3 of this lab. Deliverables: 0) Seven Segment Decoder 1) Full Adder 2) 8-bit Ripple Carrry Adder 3) 8-bit Ripple Carrry Adder with Hexadecimal Display Demonstration Requirement: Demonstrate Part 3 RippleAdder with seven segment display on the DE2 board from the last part of this lab. Part 0 A Verilog Binary to Hexadecimal Seven-Segment Decoder This is an important design that you will be using the rest of the semester. Make sure it works!! Using Verilog, design and implement a circuit that will receive a 4-bit value from switches, and output a 7- bit code to drive a seven-segment display. The display will output a hexadecimal value between 0 (decimal 0) and F (decimal 15). Here is the diagram for the 7-segment decoder, and the segment numbers. B 4 Just combo logic in here 7 S SSdecode For example, 0000 (hex 0), should turn on all segments except segment 6. Another example, 0011 (hex 3), should turn on segments 0, 1, 2, 3, and 6. Another example, 1010 (hex A), should turn on all segments except 3. The signals to activate (turn on) individual segments on the DE2 board are "active low". This means that a logic level 0 turns a segment ON. For example if "S0" through "S6" are all logic 0, the display will show an 8. Engineering 303 Lab 4 Folsom Lake College Page 1 of 9

2 Your truth table will look like this, the first row is done for you. It is important that you number the signals left-to-right from "most significant bit" (msb) to "least significant bit" (lsb), as shown here. For example B3 thru BO, left to right. Inputs Outputs Hex B3 B2 B1 B0 S6 S5 S4 S3 S2 S1 S A B C d E F Makes the seven seg display 0 Use Verilog design entry. Method 1 - Write the Boolean equations from the truth table and enter the equations into Quartus using Verilog. Use the project name SevenSeg. Note that it is not necessary to simplify the equations using K-maps. You can essentially just enter the unsimplified minterms. Use the following Verilog template as your guide. Note that for convenience we can declare all 4 bits of B as a group using the syntax [3:0] B. In your equations, reference individual bits using B[0] and so forth. Below is a partial solution. // A 4-Bit Binary to Seven-Segment Decoder module SevenSeg (B, S); input [3:0] B; output [6:0] S; // declare a set of 4 inputs wires // SOP equations from the truth table // First one is done for you, you determine the rest assign S[0] = ~B[3] & ~B[2] & ~B[1] & B[0] ~B[3] & B[2] & ~B[1] & ~B[0] B[3] & ~B[2] & B[1] & B[0] B[3] & B[2] & ~B[1] & B[0]; // etc... all the way to S[6] endmodule Engineering 303 Lab 4 Folsom Lake College Page 2 of 9

3 Another method that we will learn about latter in the class is to use a case statement. Below is another parial solution. The case statement checks the value of B and ouputs the binary value specified in the list. In Verilog case statements must appear inside always statements which we will study latter in the class. Make sure to include the endcase clause before endmodule. Method 2 Use a Case statement to create a Verilog design // A 4-Bit Binary to Seven-Segment Decoder module SevenSeg (B, S); input [3:0] B; output [6:0] S; // declare a set of 4 inputs wires // Binary output from the truth table // First two are done for you, you determine the rest always@(*) case(b) 0: S=7 b100_0000; 1: S=7 b111_1001; //etc.. complete the rest through F F: S=7 000_1110; endcase endmodule Use either method to create a Verilog design for the seven segment decoder. Simulate your design. When simulating, be sure to group your inputs in descending order from "most significant bit" (msb) to "least significant bit" (lsb), as shown. Drag and drop signals to arrange them. You will need to use 16 x 0.1us = 1.6 us end time to test all sixteen of your inputs. Verify that your waveform matches your truth table. In your report, include the Verilog design and simulation waveforms. Engineering 303 Lab 4 Folsom Lake College Page 3 of 9

4 Part 1 A Full Adder Block Diagram Simulation Use a block diagram design to implement the full adder circuit shown below. Use the project name FullAdder. This circuit adds 3 bits to produce a 2-bit binary sum. For example, the last row shows 1+1+1=11, binary 3. Inputs A B Carry In Outputs Carry- Out Sum ENGR303 Simulate your design and verify that the waveform matches the truth table. Include the design and your results in the lab report. Engineering 303 Lab 4 Folsom Lake College Page 4 of 9

5 Part 2 Heirarchical Design Alpha - A Ripple Carry Adder Implement an 8-bit serial adder composed of full-adder modules, from Part 1 of this lab, chained together. This circuit will add 2 numbers A and B, where each number is an 8-bit value between (decimal 0, hex 00) and (decimal 255, hex FF). Below is a simplified degram for a 4-bit version. Implement the 8-bit version, given in the detailed Quartus block diagram at the end of this document. 4-bit Ripple Carry Adder The RippleAdder adder module uses the FullAdder module from Part 1 of this lab. This technique is known as "instantiation". Instantiation is how we implement complex heirachical design. Helpful Hint: Review Part 2-Qartus II Tutorial: Hierarchical Diagram Design Simulation from lab 1 before you continue. Create the symbol files from the FullAdder project you made in the previous part. Then create a new Quartus project for the RippleAdder, named RippleAdder8bit, and reference the Full Adder project in the Project Library. Then you will be able to insert the FullAdder into your RippleCarry adder project file. Another Helpful Hint: Insert an initial single instance of the FullAdder then add the input and outputs and label s0, a0, b0. Select all and copy (CNTL-C) and paste (CNTL-V) and Quartus will auto increment the I/O names to s1, a1, b1. Repeat and place one a top the other until you have a total of eight instances. Now connect cout to cin as shown and complete the cin and cout. When testing the waveform, make sure A and B bits are arranged from msb to lsb (top to bottom). Drag and drop to arrange them. Arrange and group and subgroup the signals as shown. Change the radix from Binary to unsigned decimal to simplify reading. Set a count on the Inputs signal, then expand to show A and B values. Here is a section of the waveform showing = 39. Seems to work, but you should also examine your waveform carefully for several other values. Include the diagram and sample waveform segment in the lab report. ENGR303 Engineering 303 Lab 4 Folsom Lake College Page 5 of 9

6 Part 3 Heirarchical Design - Ripple Carry Adder with Hex Display Hexadecimal display is useful when testing larger designs on the DE2 board. Use a block diagram design to combine the seven segment decoder and the ripple carry adder. The final circuit will display the hexadecimal equivalent of the binary adder output. You will create a new RippleCarry8bitDecode project, and reference the subprojects (and the subsubproject) using the Project Library. Remember to export the symbol files from the subprojects first. The design shown below uses a bus to group wires together. A bus is just a set of wires. Use the Orthogonal Bus Tool to draw buses to connect things. Use the Orthogonal Node Tool to draw single wires to connect to the bus. Single wires are connected to a bus by name matching (see Hint). Be sure to ground the carryin (cin) input using the GND symbol. Helpful Hint: Select the wire to be named then right click and select properties then enter the name (eg A[0]) and then select OK. To name a bus do the same although use a bus naming (eg Sum[7..0]). Name buses and individual wires as shown below so that things are hooked up correctly. For testing on hardware, it is often usefull to run some internal signals out of the design so that we can look at their values on the hardware. These extra output signals are sometimes called hooks. For this design the adder outputs S[7..0] have been run out as hooks. Connect all the module outputs including the S hooks to DE2 pins. Enter, compile, simulate, verify the design given below. Fully document all this in your report. ENGR303 The waveform would look something like shown below. You should check the output of a few sample input sequences on the waveform before you download to DE2 hardware. But, it is actually much easier to test this design on the DE2 device than it is with the waveform. Engineering 303 Lab 4 Folsom Lake College Page 6 of 9

7 ENGR303 You must demo this part so you will need to assign pins and download to DE2 hardware. Page 31 of the DE2 user manual has pin numbers for the seven segment displays. For your convenience, here are the pins for the 0 th and 1 st hex displays: Signal Name HEX0[0] HEX0[1] HEX0[2] HEX0[3] HEX0[4] HEX0[5] HEX0[6] DE2 Pin PIN_AF10 PIN_AB12 PIN_AC12 PIN_AD11 PIN_AE11 PIN_V14 PIN_V13 HEX1[0] HEX1[1] HEX1[2] HEX1[3] HEX1[4] HEX1[5] HEX1[6] PIN_V20 PIN_V21 PIN_W21 PIN_Y22 PIN_AA24 PIN_AA23 PIN_AB24 Engineering 303 Lab 4 Folsom Lake College Page 7 of 9

8 For debugging, it is useful to also hookup the binary Sum output value. Multibit values must be displayed left-to-right, from most-significant-bit (msb) to least-significant-bit (lsb). Use the following pins for the OUTPUT Sum[7..0] LAB 4 SIGNAL DE2 Name DE2 Pin Sum[0] LEDR[0] PIN_AE23 Sum[1] LEDR[1] PIN_AF23 Sum[2] LEDR[2] PIN_AB21 Sum[3] LEDR[3] PIN_AC22 Sum[4] LEDR[4] PIN_AD22 Sum[5] LEDR[5] PIN_AD23 Sum[6] LEDR[6] PIN_AD21 Sum[7] LEDR[7] PIN_AC21 Use the following pins for INPUTS A and B LAB 4 SIGNAL DE2 Name DE2 Pin A[0] SW[0] PIN_N25 A[1] SW[1] PIN_N26 A[2] SW[2] PIN_P25 A[3] SW[3] PIN_AE14 A[4] SW[4] PIN_AF14 A[5] SW[5] PIN_AD13 A[6] SW[6] PIN_AC13 A[7] SW[7] PIN_C13 B[0] SW[8] PIN_B13 B[1] SW[9] PIN_A13 B[2] SW[10] PIN_N1 B[3] SW[11] PIN_P1 B[4] SW[12] PIN_P2 B[5] SW[13] PIN_T7 B[6] SW[14] PIN_U3 B[7] SW[15] PIN_U4 Demonstrate your RippleAdder with seven segment display to the instructor. Engineering 303 Lab 4 Folsom Lake College Page 8 of 9

9 ENGR303 Ripple Carry 8-Bit Adder Design Engineering 303 Lab 4 Folsom Lake College Page 9 of 9

LAB 4: Seven Seg, Full Adder, Ripple Adder, Heirarchical Design

LAB 4: Seven Seg, Full Adder, Ripple Adder, Heirarchical Design Engineering 303 Digital Logic Design LAB 4: Seven Seg, Full Adder, Ripple Adder, Heirarchical Design Build the following designs and verify correct operation. This lab uses hierarchical design. Review

More information

TESTING ON THE DE2 BOARD

TESTING ON THE DE2 BOARD TESTING ON THE DE2 BOARD September 18 th, 2007 CSC343 Fall 2007 Prepared by: Steven Medina PURPOSE The DE2 board is a programmable board with an FPGA chip attached. FPGA stands for Field Programmable Gate

More information

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 10: Implementing Binary Adders. Name: Date:

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 10: Implementing Binary Adders. Name: Date: EXPERIMENT # 10: Implementing Binary Adders Name: Date: Equipment/Parts Needed: PC (Altera Quartus II V9.1 installed) DE-2 board Objective: Design a half adder by extracting the Boolean equation from a

More information

Appendix C: DE2 Pin Assignments

Appendix C: DE2 Pin Assignments Appendix C: DE2 Pin Assignments The most commonly used DE2 pin assignments are given in tables that follow, both for the standard DE2 board (with the EP2C35 FPGA) and the DE2-70 (with the EP2C70 FPGA).

More information

Datasheet for Nios II Processor (nios2_r1c) v.3, July Processor Details GENERATION SYSID

Datasheet for Nios II Processor (nios2_r1c) v.3, July Processor Details GENERATION SYSID Processor Details NAME "cpu_r1" FREQ 50000000 RESET_ADDR 0x0 EXCEPTION_ADDR 0x20 IMPLEMENTATION "small" ARCHITECTURE "altera_nios2" Instruction cache Data cache Little Endian HARDWARE_DIVIDE_PRESENT HARDWARE_MULTIPLY_PRESENT

More information

Advanced Electronics Lab.

Advanced Electronics Lab. College of Engineering Course Book of 2010-2011 Advanced Electronics Lab. Mr. Araz Sabir Ameen M.Sc. in Electronics & Communications ALTERA DE2 Development and Education Board DE2 Package: The DE2 package

More information

Engr 303 Digital Logic Design Fall 2018

Engr 303 Digital Logic Design Fall 2018 Engr 303 Digital Logic Design Fall 2018 LAB 14 Single Cycle Computer You will implement the single cycle computer given in Figure 8-15 of the Chapter 8 handout. Implement these designs, compile, simulate,

More information

Laboratory Exercise 1

Laboratory Exercise 1 Laboratory Exercise 1 Switches, Lights, and Multiplexers The purpose of this exercise is to learn how to connect simple input and output devices to an FPGA chip and implement a circuit that uses these

More information

Labsheet6: Arithmetic Circuits Simulation

Labsheet6: Arithmetic Circuits Simulation University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Digital Logic Laboratory 0907234 Labsheet6: Arithmetic Circuits Simulation Name: Student ID: Section: Figure1.

More information

Lab 3: Standard Combinational Components

Lab 3: Standard Combinational Components Lab 3: Standard Combinational Components Purpose In this lab you will implement several combinational circuits on the DE1 development board to test and verify their operations. Introduction Using a high-level

More information

Experiment 7 Arithmetic Circuits Design and Implementation

Experiment 7 Arithmetic Circuits Design and Implementation Experiment 7 Arithmetic Circuits Design and Implementation Introduction: Addition is just what you would expect in computers. Digits are added bit by bit from right to left, with carries passed to the

More information

Tutorial 3. Appendix D. D.1 Design Using Verilog Code. The Ripple-Carry Adder Code. Functional Simulation

Tutorial 3. Appendix D. D.1 Design Using Verilog Code. The Ripple-Carry Adder Code. Functional Simulation Appendix D Tutorial 3 This tutorial introduces more advanced capabilities of the Quartus II system. We show how Verilog code is organized and compiled and illustrate how multibit signals are represented

More information

Engineering 303 Digital Logic Design Spring 2017

Engineering 303 Digital Logic Design Spring 2017 Engineering 303 Digital Logic Design Spring 2017 LAB 1 Introduction to Combo Logic and Quartus Deliverables: 0) A Simple Verilog Combinatorial Circuit 1) A Simple Block Diagram Combinatorial Circuit 2)

More information

EXPERIMENT NUMBER 7 HIERARCHICAL DESIGN OF A FOUR BIT ADDER (EDA-2)

EXPERIMENT NUMBER 7 HIERARCHICAL DESIGN OF A FOUR BIT ADDER (EDA-2) 7-1 EXPERIMENT NUMBER 7 HIERARCHICAL DESIGN OF A FOUR BIT ADDER (EDA-2) Purpose The purpose of this exercise is to explore more advanced features of schematic based design. In particular you will go through

More information

ECE 152A LABORATORY 2

ECE 152A LABORATORY 2 ECE 152A LABORATORY 2 Objectives : 1. Understand the trade-off between time- and space-efficiency in the design of adders. In this lab, adders operate on unsigned numbers. 2. Learn how to write Verilog

More information

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design Objective The purpose of this lab is to learn to use Field Programmable Gate Array (FPGA) tools to simulate

More information

Digital Electronics & Computer Engineering (E85)

Digital Electronics & Computer Engineering (E85) Digital Electronics & Computer Engineering (E85) Lab 5: 32-bit ALU Introduction In this lab, you will build the 32-bit Arithmetic Logic Unit (ALU) that is described in your book in Section 4.5. Your ALU

More information

ENEE245 Digital Circuits and Systems Lab Manual

ENEE245 Digital Circuits and Systems Lab Manual ENEE245 Digital Circuits and Systems Lab Manual Department of Engineering, Physical & Computer Sciences Montgomery College Modified Fall 2017 Copyright Prof. Lan Xiang (Do not distribute without permission)

More information

EET 1131 Lab #7 Arithmetic Circuits

EET 1131 Lab #7 Arithmetic Circuits Name Equipment and Components Safety glasses ETS-7000 Digital-Analog Training System Integrated Circuits: 7483, 74181 Quartus II software and Altera DE2-115 board Multisim simulation software EET 1131

More information

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points)

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points) ELEC 2010 Laboratory Manual Experiment 9 In-Lab Procedure Page 1 of 7 Experiment 9: Binary Arithmetic Circuits In-Lab Procedure and Report (30 points) Before starting the procedure, record the table number

More information

Tutorial on Quartus II Introduction Using Verilog Code

Tutorial on Quartus II Introduction Using Verilog Code Tutorial on Quartus II Introduction Using Verilog Code (Version 15) 1 Introduction This tutorial presents an introduction to the Quartus II CAD system. It gives a general overview of a typical CAD flow

More information

ENEE245 Digital Circuits and Systems Lab Manual

ENEE245 Digital Circuits and Systems Lab Manual ENEE245 Digital Circuits and Systems Lab Manual Department of Engineering, Physical & Computer Sciences Montgomery College Version 1.1 Copyright Prof. Lan Xiang (Do not distribute without permission) 1

More information

DIGITAL SYSTEM DESIGN

DIGITAL SYSTEM DESIGN DIGITAL SYSTEM DESIGN Prepared By: Engr. Yousaf Hameed Lab Engineer BASIC ELECTRICAL & DIGITAL SYSTEMS LAB DEPARTMENT OF ELECTRICAL ENGINEERING Digital System Design 1 Name: Registration No: Roll No: Semester:

More information

Tutorial 2 Implementing Circuits in Altera Devices

Tutorial 2 Implementing Circuits in Altera Devices Appendix C Tutorial 2 Implementing Circuits in Altera Devices In this tutorial we describe how to use the physical design tools in Quartus II. In addition to the modules used in Tutorial 1, the following

More information

University of California, Davis Department of Electrical and Computer Engineering. Lab 1: Implementing Combinational Logic in the MAX10 FPGA

University of California, Davis Department of Electrical and Computer Engineering. Lab 1: Implementing Combinational Logic in the MAX10 FPGA 1 University of California, Davis Department of Electrical and Computer Engineering EEC180B DIGITAL SYSTEMS II Winter Quarter 2018 Lab 1: Implementing Combinational Logic in the MAX10 FPGA Objective: This

More information

MPLEMENTATION. Part 1: Implementation of the TOC on the DE2 Board using Verilog - Performed in Lab #1

MPLEMENTATION. Part 1: Implementation of the TOC on the DE2 Board using Verilog - Performed in Lab #1 ERILOG ESCRIPTION AND MPLEMENTATION OF THE ASIC Part 1: Implementation of the TOC on the DE2 Board using Verilog - Performed in Lab #1 Part 2: Extend the TOC to Achieve a 4-Bit Processor - Done in Other

More information

Chapter 6 Combinational-Circuit Building Blocks

Chapter 6 Combinational-Circuit Building Blocks Chapter 6 Combinational-Circuit Building Blocks Commonly used combinational building blocks in design of large circuits: Multiplexers Decoders Encoders Comparators Arithmetic circuits Multiplexers A multiplexer

More information

Experiment 18 Full Adder and Parallel Binary Adder

Experiment 18 Full Adder and Parallel Binary Adder Objectives Experiment 18 Full Adder and Parallel Binary Adder Upon completion of this laboratory exercise, you should be able to: Create and simulate a full adder in VHDL, assign pins to the design, and

More information

Combinational Verilog Intro. EECS 270 Labs

Combinational Verilog Intro. EECS 270 Labs Combinational Verilog Intro EECS 270 Labs From Schematics to Verilog https://www.engineersgarage.com/articles/field-programmabl e-gate-arrays-fpga https://www.altera.com/content/dam/altera-www/global/en

More information

1 Introduction 2. 2 Background 3. 3 Getting Started 4. 4 Starting a New Project 6. 5 Design Entry Using VHDL Code 13

1 Introduction 2. 2 Background 3. 3 Getting Started 4. 4 Starting a New Project 6. 5 Design Entry Using VHDL Code 13 Quartus Prime Introduction Using VHDL Designs For Quartus Prime 17.0 Contents 1 Introduction 2 2 Background 3 3 Getting Started 4 3.1 Quartus Prime Online Help................................................................................................

More information

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits Equipment and Components Quartus software and Altera DE2-115 board PART 1: Number Representation in Microsoft Calculator. First, let s

More information

CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim

CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim Purpose Define logic expressions in Verilog using register transfer level (RTL) and structural models. Use Quartus II to

More information

Numbering Systems. Number Representations Part 1

Numbering Systems. Number Representations Part 1 Introduction Verilog HDL modeling language allows numbers being represented in several radix systems. The underlying circuit processes the number in binary, however, input into and output from such circuits

More information

Chapter Three. Digital Components

Chapter Three. Digital Components Chapter Three 3.1. Combinational Circuit A combinational circuit is a connected arrangement of logic gates with a set of inputs and outputs. The binary values of the outputs are a function of the binary

More information

ECE2029: Introduction to Digital Circuit Design. Lab 2 Implementing Combinational Functional Blocks

ECE2029: Introduction to Digital Circuit Design. Lab 2 Implementing Combinational Functional Blocks ECE2029: Introduction to Digital Circuit Design Lab 2 Implementing Combinational Functional Blocks Objective: In this lab exercise you will simulate, test, and download various digital circuits which implement

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Spring 2012 Lab #2: Hierarchical Design & Verilog Practice Issued Fri. 1/27/12; Due Wed 2/1/12 (beginning of class)

More information

EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25

EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25 EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25 Introduction This Xilinx project introduces the characteristics of the ripple carry adder. From the last project, you learned that

More information

CPE 200L LABORATORY 4: INTRODUCTION TO DE2 BOARD UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND:

CPE 200L LABORATORY 4: INTRODUCTION TO DE2 BOARD UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: CPE 200L LABORATORY 4: INTRODUCTION TO DE2 BOARD DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOALS: Getting familiar with DE2 board installation, properties, usage.

More information

ECSE-323 Digital System Design. Lab #1 Using the Altera Quartus II Software Fall 2008

ECSE-323 Digital System Design. Lab #1 Using the Altera Quartus II Software Fall 2008 1 ECSE-323 Digital System Design Lab #1 Using the Altera Quartus II Software Fall 2008 2 Introduction. In this lab you will learn the basics of the Altera Quartus II FPGA design software through following

More information

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1] FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language Reference: [] FIELD PROGRAMMABLE GATE ARRAY FPGA is a hardware logic device that is programmable Logic functions may be programmed

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Prof. Montek Singh Spring 2018 Lab #2A: Hierarchical Design & Verilog Practice Issued Wed 1/17/18; Due Wed 1/24/18

More information

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

More information

Introduction to Verilog

Introduction to Verilog Introduction to Verilog Structure of a Verilog Program A Verilog program is structured as a set of modules, which may represent anything from a collection of logic gates to a complete system. A module

More information

Tutorial: Pattern Wizard

Tutorial: Pattern Wizard University of Pennsylvania Department of Electrical and Systems Engineering Digital Design Laboratory Tutorial: Pattern Wizard When assigning values to a bus in Xilinx during the behavioral simulation,

More information

Chapter 1 DE2-115 Package Package Contents The DE2-115 Board Assembly Getting Help... 6

Chapter 1 DE2-115 Package Package Contents The DE2-115 Board Assembly Getting Help... 6 1 CONTENTS Chapter 1 DE2-115 Package... 4 1.1 Package Contents... 4 1.2 The DE2-115 Board Assembly... 5 1.3 Getting Help... 6 Chapter 2 Introduction of the Altera DE2-115 Board... 7 2.1 Layout and Components...

More information

To design a 4-bit ALU To experimentally check the operation of the ALU

To design a 4-bit ALU To experimentally check the operation of the ALU 1 Experiment # 11 Design and Implementation of a 4 - bit ALU Objectives: The objectives of this lab are: To design a 4-bit ALU To experimentally check the operation of the ALU Overview An Arithmetic Logic

More information

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS Name: Instructor: Engr. Date Performed: Marks Obtained: /10 Group Members (ID):. Checked By: Date: Experiment # 09 MULTIPLEXERS OBJECTIVES: To experimentally verify the proper operation of a multiplexer.

More information

ENEE 245 Lab 1 Report Rubrics

ENEE 245 Lab 1 Report Rubrics ENEE 4 Lab 1 Report Rubrics Design Clearly state the design requirements Derive the minimum SOP Show the circuit implementation. Draw logic diagram and wiring diagram neatly Label all the diagrams/tables

More information

ECE2029: Introduction to Digital Circuit Design Lab 3 Implementing a 4-bit Four Function ALU

ECE2029: Introduction to Digital Circuit Design Lab 3 Implementing a 4-bit Four Function ALU ECE2029: Introduction to Digital Circuit Design Lab 3 Implementing a 4-bit Four Function ALU Objective: Inside a computer's central processing unit (CPU) there is a sub-block called the arithmetic logic

More information

Quartus II Introduction Using Verilog Designs. 1 Introduction. For Quartus II 12.0

Quartus II Introduction Using Verilog Designs. 1 Introduction. For Quartus II 12.0 Quartus II Introduction Using Verilog Designs For Quartus II 12.0 1 Introduction This tutorial presents an introduction to the Quartus II CAD system. It gives a general overview of a typical CAD flow for

More information

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator Richland College Engineering Technology Rev. 0. Donham Rev. 1 (7/2003) J. Horne Rev. 2 (1/2008) J. radbury Digital Fundamentals CETT 1425 Lab 6 2 s Complement / Digital Calculator Name: Date: Objectives:

More information

SCHEMATIC DESIGN IN QUARTUS

SCHEMATIC DESIGN IN QUARTUS SCHEMATIC DESIGN IN QUARTUS Consider the design of a three-bit prime number detector. Figure 1 shows the block diagram and truth table. The inputs are binary signals A, B, and C while the output is binary

More information

VeriLogger Tutorial: Basic Verilog Simulation

VeriLogger Tutorial: Basic Verilog Simulation VeriLogger Tutorial: Basic Verilog Simulation This tutorial demonstrates the basic simulation features of VeriLogger Pro. It teaches you how to create and manage a project and how to build, simulate, and

More information

Tutorial on Quartus II Introduction Using Schematic Designs

Tutorial on Quartus II Introduction Using Schematic Designs Tutorial on Quartus II Introduction Using Schematic Designs (Version 15) 1 Introduction This tutorial presents an introduction to the Quartus II CAD system. It gives a general overview of a typical CAD

More information

Experiment 8 Introduction to VHDL

Experiment 8 Introduction to VHDL Experiment 8 Introduction to VHDL Objectives: Upon completion of this laboratory exercise, you should be able to: Enter a simple combinational logic circuit in VHDL using the Quartus II Text Editor. Assign

More information

Altera DE1 Board DE1. Development and Education Board. User Manual. Copyright 2006 Altera Corporation

Altera DE1 Board DE1. Development and Education Board. User Manual. Copyright 2006 Altera Corporation Altera DE1 Board DE1 Development and Education Board User Manual Version 1.1 Copyright 2006 Altera Corporation Chapter 2 Altera DE1 Board This chapter presents the features and design characteristics of

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Spring 2015 Lab #2: Hierarchical Design & Verilog Practice Issued Wed. 1/14/15; Due Wed. 1/21/15 (11:59pm) This

More information

Chapter 1 Overview General Description Key Features Block Diagram... 6

Chapter 1 Overview General Description Key Features Block Diagram... 6 1 CONTENTS Chapter 1 Overview... 4 1.1 General Description... 4 1.2 Key Features... 5 1.3 Block Diagram... 6 Chapter 2 Board Components... 9 2.1 Board Overview... 9 2.2 Configuration, Status and Setup...

More information

PRELAB! Read the entire lab, and complete the prelab questions (Q1-Q3) on the answer sheet before coming to the laboratory.

PRELAB! Read the entire lab, and complete the prelab questions (Q1-Q3) on the answer sheet before coming to the laboratory. PRELAB! Read the entire lab, and complete the prelab questions (Q1-Q3) on the answer sheet before coming to the laboratory. 1.0 Objectives In the last lab we learned that Verilog is a fast and easy way

More information

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE 1 Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates, and output

More information

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Design with FPGAs. By Neeraj Kulkarni Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic

More information

structure syntax different levels of abstraction

structure syntax different levels of abstraction This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

More information

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

More information

Week 4 Tutorial: Verilog Primer Part 2. By Steve Engels

Week 4 Tutorial: Verilog Primer Part 2. By Steve Engels Week 4 Tutorial: Verilog Primer Part 2 By Steve Engels Reflections on Verilog By now, you ve seen several elements of the Verilog language, but it s good to put them into perspective again. Verilog is

More information

Experiment # 5 Debugging via Simulation using epd

Experiment # 5 Debugging via Simulation using epd 1. Synopsis: Experiment # 5 Debugging via Simulation using epd In this lab you will be debugging an arbitrary design. We have introduced different kinds of errors in the design purposefully to demonstrate

More information

Combinational Logic Circuits

Combinational Logic Circuits Combinational Logic Circuits By Dr. M. Hebaishy Digital Logic Design Ch- Rem.!) Types of Logic Circuits Combinational Logic Memoryless Outputs determined by current values of inputs Sequential Logic Has

More information

Programmable Logic Design Techniques I

Programmable Logic Design Techniques I PHY 440 Lab14: Programmable Logic Design Techniques I The design of digital circuits is a multi-step process. It starts with specifications describing what the circuit must do. Defining what a circuit

More information

Good Evening! Welcome!

Good Evening! Welcome! University of Florida EEL 3701 Fall 2011 Dr Eric M Schwartz Page 1/11 Exam 2 Instructions: Turn off all cell phones, beepers and other noise making devices Show all work on the front of the test papers

More information

Chapter Chapter Chapter General Description Key Features Block Diagram... 7

Chapter Chapter Chapter General Description Key Features Block Diagram... 7 1 Chapter 1... 5 1.1 General Description... 5 1.2 Key Features... 6 1.3 Block Diagram... 7 Chapter 2... 10 Board Components... 10 2.1 Board Overview... 10 2.2 Configuration, Status and Setup... 11 2.3

More information

2 nd Year Laboratory. Experiment: FPGA Design with Verilog. Department of Electrical & Electronic Engineering. Imperial College London.

2 nd Year Laboratory. Experiment: FPGA Design with Verilog. Department of Electrical & Electronic Engineering. Imperial College London. Department of Electrical & Electronic Engineering 2 nd Year Laboratory Experiment: FPGA Design with Verilog Objectives By the end of this experiment, you should know: How to design digital circuits using

More information

EXPERIMENT 1. INTRODUCTION TO ALTERA

EXPERIMENT 1. INTRODUCTION TO ALTERA EXPERIMENT 1. INTRODUCTION TO ALTERA I. Introduction I.I Objectives In this experiment, you will learn computer aided digital design and verification of it using Field Programmable Gate Arrays (FPGA).

More information

CSEE W4840 Embedded System Design Lab 1

CSEE W4840 Embedded System Design Lab 1 CSEE W4840 Embedded System Design Lab 1 Stephen A. Edwards Due January 31, 2008 Abstract Learn to use the Altera Quartus development envrionment and the DE2 boards by implementing a small hardware design

More information

Chapter 3 Part 2 Combinational Logic Design

Chapter 3 Part 2 Combinational Logic Design University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 3 Part 2 Combinational Logic Design Originals by: Charles R. Kime and Tom

More information

Introduction to Verilog and XILINX

Introduction to Verilog and XILINX DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA INFORMÁTICA Introduction to Verilog and XILINX Lab Session Computer Structure WARNING: A written solution of the preliminary

More information

Lab 2 EECE473 Computer Organization & Architecture University of Maine

Lab 2 EECE473 Computer Organization & Architecture University of Maine Lab 2: Verilog Programming Instructor: Yifeng Zhu 50 Points Objectives: 1. Quatus II Programming assignment: PIN assignments, LEDs, switches; 2. Download and test the design on Altera DE2 board 3. Create

More information

CPEN 230L: Introduction to Digital Logic Laboratory Lab 7: Multiplexers, Decoders, and Seven Segment Displays

CPEN 230L: Introduction to Digital Logic Laboratory Lab 7: Multiplexers, Decoders, and Seven Segment Displays CPEN 230L: Introduction to Digital Logic Laboratory Lab 7: Multiplexers, Decoders, and Seven Segment Displays Purpose Learn about multiplexers (MUXs), decoders and seven segment displays. Learn about hierarchical

More information

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS EE 2 Lab Manual, EE Department, KFUPM EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS OBJECTIVES: Design and implement a circuit that performs basic binary arithmetic operations such as addition, subtraction,

More information

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8 CSCB58 - Lab 3 Latches, Flip-flops, and Registers Learning Objectives The purpose of this exercise is to investigate the fundamental synchronous logic elements: latches, flip-flops, and registers. Prelab

More information

EE 109 Unit 6 Binary Arithmetic

EE 109 Unit 6 Binary Arithmetic EE 109 Unit 6 Binary Arithmetic 1 2 Semester Transition Point At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is

More information

VHDL Structural Modeling II

VHDL Structural Modeling II VHDL Structural Modeling II ECE-331, Digital Design Prof. Hintz Electrical and Computer Engineering 5/7/2001 331_13 1 Ports and Their Usage Port Modes in reads a signal out writes a signal inout reads

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Fall 2014 Lab #3: Designing an ALU Issued Thu 9/4/14; Due Wed 9/10/14 (11:59pm) This lab assignment consists of

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Finite State Machines This is an exercise in using finite state machines. Part I We wish to implement a finite state machine (FSM) that recognizes two specific sequences of applied

More information

CSE140 L. Instructor: Thomas Y. P. Lee January 18,2006. CSE140L Course Info

CSE140 L. Instructor: Thomas Y. P. Lee January 18,2006. CSE140L Course Info CSE4 L Instructor: Thomas Y. P. Lee January 8,26 CSE4L Course Info Lectures Wedesday :-:2AM, HSS33 Lab Assignment egins TA s JinHua Liu (jhliu@cs.ucsd.edu) Contact TAs if you re still looking for a lab

More information

Software Engineering 2DA4. Slides 2: Introduction to Logic Circuits

Software Engineering 2DA4. Slides 2: Introduction to Logic Circuits Software Engineering 2DA4 Slides 2: Introduction to Logic Circuits Dr. Ryan Leduc Department of Computing and Software McMaster University Material based on S. Brown and Z. Vranesic, Fundamentals of Digital

More information

CCE 3202 Advanced Digital System Design

CCE 3202 Advanced Digital System Design CCE 3202 Advanced Digital System Design Lab Exercise #2 Introduction You will use Xilinx Webpack v9.1 to allow the synthesis and creation of VHDLbased designs. This lab will outline the steps necessary

More information

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston Introduction This lab introduces the concept of modular design by guiding you through

More information

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder Overview The objective of this lab is to understand two basic combinational circuits the multiplexor and

More information

EEC 116 Fall 2011 Lab #3: Digital Simulation Tutorial

EEC 116 Fall 2011 Lab #3: Digital Simulation Tutorial EEC 116 Fall 2011 Lab #3: Digital Simulation Tutorial Dept. of Electrical and Computer Engineering University of California, Davis Issued: October 10, 2011 Due: October 19, 2011, 4PM Reading: Rabaey Insert

More information

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation A Verilog Primer An Overview of Verilog for Digital Design and Simulation John Wright Vighnesh Iyer Department of Electrical Engineering and Computer Sciences College of Engineering, University of California,

More information

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog Verilog Radek Pelánek and Šimon Řeřucha Contents 1 Computer Aided Design 2 Basic Syntax 3 Gate Level Modeling 4 Behavioral Modeling Computer Aided Design Hardware Description Languages (HDL) Verilog C

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Spring 2015 Lab #3: Designing an ALU Issued Wed 1/21/15; Due Wed 1/28/15 (11:59pm) This lab assignment consists

More information

Instructions on creating CTL files for PAL pin placement

Instructions on creating CTL files for PAL pin placement Instructions on creating CTL files for PAL pin placement We use CTL files to control how Active-HDL assigns inputs and outputs to pins. This will make it easier for you to re-synthesize a file since Active-HDL

More information

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering Final Examination ECE 241F - Digital Systems Examiners: S. Brown,

More information

Lab Manual for COE 203: Digital Design Lab

Lab Manual for COE 203: Digital Design Lab Lab Manual for COE 203: Digital Design Lab 1 Table of Contents 1. Prototyping of Logic Circuits using Discrete Components...3 2. Prototyping of Logic Circuits using EEPROMs...9 3. Introduction to FPGA

More information

VERILOG 2: LANGUAGE BASICS

VERILOG 2: LANGUAGE BASICS VERILOG 2: LANGUAGE BASICS Verilog module Modules are basic building blocks. These are two example module definitions which you should use: // Safer traditional method module abc (in1, in2, out); input

More information

A B A+B

A B A+B ECE 25 Lab 2 One-bit adder Design Introduction The goal of this lab is to design a one-bit adder using programmable logic on the BASYS board. Due to the limitations of the chips we have in stock, we need

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems

More information

Experiment VERI: FPGA Design with Verilog (Part 1)

Experiment VERI: FPGA Design with Verilog (Part 1) Experiment VERI: Department of Electrical & Electronic Engineering 2nd Year Laboratory Experiment VERI: FPGA Design with Verilog (Part 1) (webpage: www.ee.ic.ac.uk/pcheung/teaching/e2_experiment /) Objectives

More information

A3 A2 A1 A0 Sum4 Sum3 Sum2 Sum1 Sum

A3 A2 A1 A0 Sum4 Sum3 Sum2 Sum1 Sum LAB #3: ADDERS and COMPARATORS using 3 types of Verilog Modeling LAB OBJECTIVES 1. Practice designing more combinational logic circuits 2. More experience with equations and the use of K-maps and Boolean

More information