CCE 3202 Advanced Digital System Design

Similar documents
CCE 3202 Advanced Digital System Design

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Experiment 8 Introduction to VHDL

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

Lecture 5: Aldec Active-HDL Simulator

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Tutorial on VHDL Compilation, Simulation, and Synthesis

ELEC 204 Digital System Design LABORATORY MANUAL

Hardware Description Language VHDL (1) Introduction

Getting Started with Xilinx WebPack 13.1

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Field Programmable Gate Array

Chip Design with FPGA Design Tools

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

EE261: Intro to Digital Design

Board-Data Processing. VHDL Exercises. Exercise 1: Basics of VHDL Programming. Stages of the Development process using FPGA s in Xilinx ISE.

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation)

Lab 3: Standard Combinational Components

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

Concurrent Signal Assignment Statements (CSAs)

PALMiCE FPGA Probing Function User's Manual

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Digital Systems Design

TLL5000 Electronic System Design Base Module. Getting Started Guide, Ver 3.4

TLL5000 Electronic System Design Base Module

ELCT 501: Digital System Design

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

Hardware Synthesis. References

TUTORIAL On USING XILINX ISE FOUNDATION DESIGN TOOLS: Mixing VHDL and Schematics

The board is powered by the USB connection, so to turn it on or off you plug it in or unplug it, respectively.

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

VHDL Examples Mohamed Zaky

FPGA Design Flow 1. All About FPGA

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

Chapter 6 Combinational-Circuit Building Blocks

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

ENGIN 241 Digital Systems with Lab

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.5

Digital Systems Design

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2

Control and Datapath 8

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Tutorial on FPGA Design Flow based on Xilinx ISE WebPack and ModelSim. ver. 2.0

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

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

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

Exercise Sheet 3 (10 Points)

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

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

Timing Analysis in Xilinx ISE

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

Xilinx ISE/WebPack: Introduction to Schematic Capture and Simulation

Digital Systems Design

ECE 545 Lecture 12. FPGA Resources. George Mason University

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL)

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

[VARIABLE declaration] BEGIN. sequential statements

CprE 583 Reconfigurable Computing

Digital Design Laboratory Lecture 2

ANADOLU UNIVERSITY. EEM Digital Systems II

Inferring Storage Elements

Advanced module: Video en/decoder on Virtex 5

Tutorial: Working with Verilog and the Xilinx FPGA in ISE 9.2i

Lab 3. Advanced VHDL

Xilinx Tutorial Basic Walk-through

Department of Electrical and Computer Engineering Xilinx ISIM <Release Version: 14.1i> Simulation Tutorial Using Verilog

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

ENGN3213. Digital Systems & Microprocessors. CLAB 1: ICARUS Verilog and ISE WebPACK

Using XILINX WebPACK Software to Create CPLD Designs

Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Output Sum(4 bits) Adder. Output carry(1 bit)

VHDL simulation and synthesis

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

PINE TRAINING ACADEMY

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below:

Chapter 2 Basic Logic Circuits and VHDL Description

LABORATORY # 6 * L A B M A N U A L. Datapath Components - Adders

6.111 Lecture # 5. Entity section describes input and output. VHDL: Very High speed integrated circuit Description Language:

Lecture 38 VHDL Description: Addition of Two [5 5] Matrices

SRI SUKHMANI INSTITUTE OF ENGINEERING AND TECHNOLOGY, DERA BASSI (MOHALI)

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

Laboratory of Digital Circuits Design: Design, Implementation and Simulation of Digital Circuits Using Programmable Devices

Introduction to VHDL Design on Quartus II and DE2 Board

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

Computer-Aided Digital System Design VHDL

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

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

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack andisim. ver. 1.0

A Brief Introduction to Verilog Hardware Definition Language (HDL)

Senior Project Design Review: Internal Hardware Design of a Microcontroller in VLSI

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

COE 405 Design Methodology Based on VHDL

Verilog Design Entry, Synthesis, and Behavioral Simulation

FPGA Design Flow. - from HDL to physical implementation - Victor Andrei. Kirchhoff-Institut für Physik (KIP) Ruprecht-Karls-Universität Heidelberg

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

Transcription:

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 to synthesize, download, and test a 1-bit, two function ALU, with the following schematic and truth table: Truth Table: F0 Function 0 Q0 = A0 OR B0 1 Q0, COUT = A + B Deliverables for Lab Exercise #2 When completed, you will hand in the following deliverables for Lab Exercise #2, in this order: 1. Title Page 2. Commented VHDL sourcecode 3. Simulation waveforms verifying your ALU's operation 4. Summary report of your results, problems encountered, etc.

All synthesis tools use files called "netlists." Netlists are simply text descriptions of how various circuit components are connected. The HDL design flow is similar to Schematic Capture, except that it deals with VHDL code instead of schematic drawings. Xilinx ISE can take VHDL and create a netlist based on your code. Here is the VHDL code that we will use to implement this circuit: library IEEE; use IEEE.std_logic_1164.all; -- A 1-bit, two function ALU -- alu_test.vhd entity alu_test is A0: in STD_LOGIC; B0: in STD_LOGIC; F0: in STD_LOGIC; Q0: out STD_LOGIC; COUT: out STD_LOGIC end alu_test; architecture alu_test of alu_test is signal CIN: STD_LOGIC; CIN <= '0'; process (A0, B0, F0) if F0 = '1' then Q0 <= A0 xor B0 xor Cin; COUT <= (A0 and B0) or (A0 and Cin) or (B0 and Cin elsif F0 = '0' then Q0 <= A0 or B0; COUT <= '0'; end if; end process; end alu_test; As you can see, this code uses a single process to implement the circuit. You may be wondering why we used a process instead of structural VHDL statements. Well, there are two reasons. First, when you want to use "if" statements in VHDL code, it is generally best to use such statements inside a process. This is because "if" statements

used outside of processes infer the use "generate" statements, and this is something we want to avoid because they unnecessarily complicate the code. In addition, one of the purposes of this assignment is to use behavioral VHDL code instead of structural VHDL. When we use such "if" statements, that is, "if this input satisfies this condition, then do this," we are actually writing a behavioral description of how the circuit should operate as opposed to a "connect A to B"-type description. Notice that the sensitivity list contains all of our inputs. When any one of our inputs change, we want this process to execute because it will have an affect on our outputs. The compiler will look at this code and automatically realize that we aren't using any clock-based logic, and will implement this code as a simple combinatorial circuit (no flip flops). Finally, notice how the code implements the ADD function. We simply take the equations for an adder and implement them in a single statement. A full adder's "SUM" output is simply "A xor B xor Carry_In", and a full adder's "Carry_Out" output is simply "(A and B) or (A and Carry_In) or (B and Carry_In)." We take these equations and set the outputs accordingly. We created a signal called "Carry_In" and set it to zero for convenience. The output of the ALU will be output on the 7 segment display. The VHDL code for the 3 7 decoder circuit is written according to the following truth table. Q0 COUT F0 Display 0 0 0 0 0 0 1 2 0 1 1 3 1 0 0 1 1 0 1 4 1 1 1 5

library IEEE; use IEEE.std_logic_1164.all; entity DEC_7seg is Din: in STD_LOGIC_VECTOR (2 downto 0 Segments: out STD_LOGIC_VECTOR (6 downto 0) end DEC_7seg; architecture DEC_7seg_arch of DEC_7seg is -- -- ------(6)------ -- (1) (5) -- ------(0)------- -- (2) (4) -- -------(3)------ process(din) case Din is when "000" => Segments <= "0000001"; when "001" => Segments <= "0010010"; when "011" => Segments <= "0000110"; when "100" => Segments <= "1001111"; when "101" => Segments <= "1001100"; when "111" => Segments <= "0100100"; when others => Segments <= "1111111"; end case; end process; end DEC_7seg_arch;

The top level Code is: library IEEE; use IEEE.std_logic_1164.all; -- An ALU entity alu_top is INA: in STD_LOGIC; INB: in STD_LOGIC; INF: in STD_LOGIC; Q: out STD_LOGIC_VECTOR (6 downto 0) end alu_top; architecture alu_top of alu_top is component alu_test -- component declaration for the T-Flip Flop A0: in STD_LOGIC; B0: in STD_LOGIC; F0: in STD_LOGIC; Q0: out STD_LOGIC; COUT: out STD_LOGIC end component; component DEC_7seg -- component declaration for 7 segment decoder Din: in STD_LOGIC_VECTOR (2 downto 0 Segments: out STD_LOGIC_VECTOR (6 downto 0) end component; signal S0, S1: STD_LOGIC; -- various intermediate signals signal G: STD_LOGIC_VECTOR (2 downto 0 ALU1: alu_test port map (INA,INB,INF,S0,S1 G(0) <= INF; G(1) <= S1; G(2) <= S0; --Now initiate the 7-segment display DISPLAY: DEC_7seg port map (G, Q end alu_top;

Simulation You can now simulate the circuit in the same way that we have done last time. Synthesizing the VHDL with Xilinx ISE You are now ready to check the syntax of the code and to synthesize it as well. Open the Synthesize XST tree within the process dialog box and run "Check Syntax". Notice the output of this operation in the window at the bottom of the HDL editor. If for some reason your file has an error in it, a red x would appear next to file in place of the green check. If this happens, right click on the filename and click on "Edit" to fix the problem. Now we have to synthesise the circuit. First we need to define the pins that will be used. In the sources dialog box select Synthesis/Implementation. In the process dialog box open the tree of the Implement Design and then Translate. Select the Assign Package Pins Post-Translate, right click and Run. This will open the PACE utility. Enter the locations of the pins: NET INA LOC P6; NET INB LOC P10; NET INF LOC P12; NET Q(0) LOC P83; NET Q(1) LOC P17; NET Q(2) LOC P20; NET Q(3) LOC P21; NET Q(4) LOC P23; NET Q(5) LOC P16; NET Q(6) LOC P25; These statements mean are telling the synthesizer where to place the inputs and outputs. Save your work. You can now run the Synthesis and Implementation. Select Synthesize in the process dialog box, click the right mouse button and select Run. Then select Implement Design in the process dialog box, click the right mouse button and select Run. This will translate the design, map it on to the FPGA, select the slices to be used and do the routing. Finally select the Generate Programming File in the process dialog box, click the right mouse button and select Run. This will generate the.bit file required by the FPGA. Downloading and Testing Now all that's left is to find the alu_top.bit file that was generated, and download it to the BASYS board (using the same procedure as in last lab).