Lab 2 Verilog Synthesis & Logic Optimization

Similar documents
Lab 2 Designing with Verilog

Lab 1 FPGA CAD Tools

Verilog Simulation Mapping

Lab 3 Verilog Simulation Mapping

Don t expect to be able to write and debug your code during the lab session.

EECS150: Lab 3, Verilog Synthesis & FSMs

Using ChipScope. Overview. Detailed Instructions: Step 1 Creating a new Project

Lab 4 Debugging & Verification

ChipScope Demo Instructions

EECS150: Lab 3, Verilog Synthesis & FSMs

Using Project Navigator

EECS150: Lab 1, FPGA CAD Tools

structure syntax different levels of abstraction

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

Lab 6 Debugging. Objective. Introduction. Prelab

Checkpoint 3 SDRAM. 1.0 Motivation This checkpoint serves two purposes: 1. Familiarize you with SDRAM 2. Provides an easy way to buffer outgoing video

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

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

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Lab 1: Verilog Synthesis and FSMs

The Alarm System: The alarm system to be designed has the following inputs.

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

DESIGN STRATEGIES & TOOLS UTILIZED

The QR code here provides a shortcut to go to the course webpage.

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

Lab 1: FPGA Physical Layout

Tutorial: Working with the Xilinx tools 14.4

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

CSE P567 - Winter 2010 Lab 1 Introduction to FGPA CAD Tools

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

University of California, Davis Department of Electrical and Computer Engineering. EEC180B DIGITAL SYSTEMS Spring Quarter 2018

Hardware/Software Codesign for Wireless Systems (E168b) Lab 2: GPS Correlator

EECS150: Lab 2, Mapping Circuit Elements to FPGAs

Introduction to Computer Engineering (E114)

ENEE 245 Lab 1 Report Rubrics

EE 101 Lab 5 Fast Adders

Introduction. About this tutorial. How to use this tutorial

PINE TRAINING ACADEMY

ENEE245 Digital Circuits and Systems Lab Manual

Xilinx Tutorial Basic Walk-through

Lab 3 Sequential Logic for Synthesis. FPGA Design Flow.

Experiment VERI: FPGA Design with Verilog (Part 1)

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Laboratory Exercise #1 Using the Vivado

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

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

Lecture #1: Introduction

ESE 150 Lab 07: Digital Logic

LAB 9 The Performance of MIPS

ENEE245 Digital Circuits and Systems Lab Manual

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

Circuit Design and Simulation with VHDL 2nd edition Volnei A. Pedroni MIT Press, 2010 Book web:

Step 1: Downloading the source files

Chapter 2 Getting Hands on Altera Quartus II Software

EE 231 Fall Lab 1: Introduction to Verilog HDL and Altera IDE

Hardware Description Languages (HDLs) Verilog

Tutorial on FPGA Design Flow based on Aldec Active HDL. Ver 1.5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Xilinx ChipScope ICON/VIO/ILA Tutorial

Digital Systems Laboratory

ELEC 4200 Lab#0 Tutorial

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

: : (91-44) (Office) (91-44) (Residence)

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

Physics 364, Fall 2012, reading due your answers to before the end of Wednesday s lab.

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

Introduction to WebPACK 3.1. Using XILINX WebPACK Software to Create CPLD Designs

a, b sum module add32 sum vector bus sum[31:0] sum[0] sum[31]. sum[7:0] sum sum overflow module add32_carry assign

Physics 364, Fall 2014, reading due your answers to by 11pm on Sunday

A B A+B

CS152 FPGA CAD Tool Flow University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

Verilog Module 1 Introduction and Combinational Logic

Experiment VERI: FPGA Design with Verilog (Part 2) (webpage: /)

CSC 258 lab notes, Fall 2003

Digital Logic Design Lab

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Laboratory Exercise #1 Using the Vivado

EECS150 Lab Lecture 2 Design Verification

Hardware describing languages, high level tools and Synthesis

CS/EE 3710 Computer Architecture Lab Checkpoint #2 Datapath Infrastructure

Lab 2: Introduction to Verilog HDL and Quartus

2015 Paper E2.1: Digital Electronics II

LAB 5 Implementing an ALU

Laboratory Experiment Mastering Digital Design

High Speed SPI Slave Implementation in FPGA using Verilog HDL

EE178 Spring 2018 Lecture Module 1. Eric Crabill

ECE 152A LABORATORY 2

EECS150 Lab Lecture 0

LAB 9 The Performance of MIPS

EE 231 Fall EE 231 Lab 2

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

Hardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University

Lab 0: Introduction to the FPGA Development Board

SCHEMATIC DESIGN IN QUARTUS

A3 A2 A1 A0 Sum4 Sum3 Sum2 Sum1 Sum

Lab 0: Introduction to the FPGA Development Board

University of Hawaii EE 361L. Getting Started with Spartan 3E Digilent Basys2 Board. Lab 4.1

Lecture 1: Introduction Course arrangements Recap of basic digital design concepts EDA tool demonstration

C-Based Hardware Design

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

Introduction to VHDL Design on Quartus II and DE2 Board

Transcription:

UNIVERSITY OF CALIFORNIA AT BERKELEY COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE Lab 2 Verilog Synthesis & Logic Optimization 1.0 Motivation The goals of this lab are listed below: Provide a gentle introduction to writing Verilog Acquaint you with the Synthesis tool: Synplify Pro Show you professional logic optimization tools in action 2.0 Introduction In order to make circuit design faster circuits are not designed as hand-drawn or even computer based schematics. Instead, modern digital circuits are specified using Hardware Description Languages such as Verilog, which we will use extensively in this class. Though Verilog was originally designed to support simulating large circuits, synthesis tools such as Xilinx s XST and Synplicity s Synplify Pro now allow us to design a large, complicated digital system exclusively in Verilog and use automated CAD tools to implement it, either in an FPGA or even in an ASIC (Application Specific Integrated Circuit, a custom chip). The motivation behind the widespread adoption of Verilog as a method of hardware specification stems from the fact that a very complicated circuit can be described very succinctly in Verilog. For example, an adder can be expressed as assign sum = A + B; thereby hiding all of the complicated bit-width and gate details, in order to free the designer from having to worry about them. In this lab you will use what is referred to as dataflow style Verilog to capture the Boolean equations for a simple circuit. You will then synthesize this circuit to verify its functionality and look at how the tools have optimized your original design. 2.1 Circuit Overview Shown in figure 1, below is the basic block diagram for the test circuit you will be using in this lab. The first stage is simply a 25bit counter, which is used to divide the clock by 2 25 = 32Million reducing it from 27MHz to approximately 1Hz. Notice that we do not use this 1Hz signal as the clock, but merely as an enable. In this course, we will always have clearly defined clock signals, which are considered special. The basic reason for this is that clocks are given special resources and priority on the Xilinx chips, greatly improving our FPGA based designs. In an ASIC you might not always adhere to this. UCB 1 2005

Figure 1: Lab #2 Circuit Block Diagram The second stage is a 4-bit counter, which simply counts 4 h0 to 4 hf and then recycles. This counter is enables approximately once per second using the 25bit counter. The ideas is to create an output that will change at a human visible rate, since your eye is nowhere near fast enough to see something flashing past at 1 / 27MHz = 37ns. The final stage is, of course, your binary to hexadecimal 7-segment LED output module. This module will simply translate the incoming 4-bit number into the 7 correct output signals required to drive the LEDs on the CaLinx2 boards. 3.0 Prelab Please make sure to complete the prelab before you attend your lab section. 1. Read this handout thoroughly. Pay particular attention to section 4.0 Lab Procedure as it describes what you will be doing in detail. 2. Examine the Verilog provided for this weeks lab. a. You should understand the FPGA_TOP2.v file. Reading Verilog is an excellent way to learn it. 3. Write your logic equations ahead of time. a. Refer to section 4.0 Lab Procedure for more information. 4.0 Lab Procedure Remember to manage your Verilog, projects and folders well. Doing a poor job of managing your files can cost you hours of rewriting code, if you accidentally delete your files. 4.1 Bin2HexLED.v Note that while we have given you an implementation of this module in Lab #1, it is in the wrong form: behavioral. You need to rewrite it using dataflow by generating a set of logic equations and then entering them using assign statements. Signal Width Dir Description Bin 4 I A 4-bit input representing a single hexadecimal digit SegLED 7 O The concatenation of the 7 wires required to drive a 7- segment LED. Table 1: Port Specification for Bin2HexLED.v UCB 2 2005

As you can see from the above port list, this is a very simple module. It merely decodes its input to generate the correct patterns of lit and un-lit LEDs. Figure 2: 7-segment LED Shown in Figure 2, above, are the 7 segments of the LEDs. The SegLED output bus is the concatenation of active HIGH wires which will drive those 7 LEDs in the order {g,f,e,d,c,b,a}. For example the pattern for the digit 0, shown in Figure 3 below, would be 7 b0111111. Figure 3: The number 0 on a 7-segment LED You job is to write out logic equations of the form: a = func(bin[0], Bin[1], Bin[2], Bin[3]) for each LED a-g on the Checkoff Sheet and then enter these equations into your Bin2HexLED.v file. Be sure to take into account all sixteen digits: 0-9 and a-f as you are working with a binary/hexadecimal input. After you have finished your equations, you may need to synthesize and debug them. Figure 4: The 7-segment LED Patterns UCB 3 2005

4.2 Synthesis & Logic Optimization Once you have a working design, you will need to go back and examine the Technology Schematic generated by Synplify Pro. This step will acquaint you with Synplify Pro, including its ability to generate schematics from your Verilog. 1. In Project Navigator select FPGA_TOP2 from the Sources in Project box a. This will cause a long list of implementation steps to appear in the Processes for Source box. 2. Double-Click the Synthesize Synplify Pro step to start the synthesis a. If there is an X or a! next to the Synthesize Synplify Pro step, this means that there has been an error or warning. b. To see the errors and warnings from Synplify Pro, double-click the Synthesize Synplify Pro -> View Synthesis Report step. 3. To view a schematic of the circuit double-click on the Synthesize Synplify Pro -> View Technology Schematic step a. This will launch Synplify Pro and automatically open the Technology Schematic b. Navigate through the schematic, look inside the Bin2HexLED module. Figure 5: The Synplify RTL Navigation Toolbar c. Since the wires will often have modified names you may need to trace them as explained in the Lab Lecture. d. You must write out the complete logic equations on the checkoff sheet. i. Remember that a 2-to-1 multiplexer where the inputs are a x = s a + s b and b and the select is s can be written: ( ) ( ) UCB 4 2005

5.0 Checkoff Name: Section: SID: I Boolean Logic Equations (20%) 1 Write out your logic equations here: II Dataflow Verilog (Bin2HexLED.v) (20%) III Working synthesized design (20%) IV Optimized Logic Equations (40%) 1 Write out the logic equations based on the Synplify Pro Technology Schematic: V Hours Spent: VI Total: VII TA: RevA 1/17/2005 Greg Gibeling Created a new lab Designed to introduce students to writing Verilog gently while asking them to work with the synthesis tools to optimize a simple piece of logic UCB 5 2005