LAB #5 Modular Design and Hierarchy using VHDL

Slides:



Advertisements
Similar presentations
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
Advertisements

1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Top-level VHDL Designs
Digilent Spartan 3 Board Lecture L2.2
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Lab 2 4-Bit Adder Digilent Spartan 3 Board Lecture L2.3.
Digilab 7-Segment Displays Lab 4. selyInstruction name “000”true if b = a false otherwise = “001”true if b /= a false otherwise “010”true if b < a.
Digilent Spartan 3 Board Discussion D3.3
7-Segment Displays Digilent Spartan 3 Board Discussion DS-4.2.
Introduction to VHDL Multiplexers Discussion D1.1.
ECE 331 – Digital System Design
7-Segment Displays VHDL Tutorial R. E. Haskell and D. M. Hanna T4: Xilinx LogiBLOX.
DIGITAL DESIGN WITH VHDL Exercise 1 1Muhammad Amir Yousaf.
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
LAB 9 Finite State Machine (FSM) Ui Luu Glendale Community College Bassam Matar Chandler-Gilbert Community College.
ENG241/ Lab #41 ENG2410 Digital Design LAB #4 Design of Combinational Logic “The Trip Genie”
Digital Arithmetic and Arithmetic Circuits
DSD,USIT,GGSIPU1 Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in std_logic; q0, q1,
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
ENG241 Digital Design Week #4 Combinational Logic Design.
ENG2410 Digital Design LAB #8 LAB #8 Data Path Design.
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 1 September 27, 2006.
LAB #2 Xilinix ISE Foundation Tools Schematic Capture “A Tutorial”
ENG2410 Digital Design LAB #6 LAB #6 Sequential Logic Design (Flip Flops)
Carry look ahead adder P (I) = a(I) xor b(I); G(I) = a(I) and b(I); S(I) = p(I) xor c(I); Carry(I+1) = c(I)p(I) + g(I)
ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #11) The slides included herein were taken from the materials.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
Digital System Projects
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
CS/EE 3700 : Fundamentals of Digital System Design
ECE 320 Homework #4 1. Using 8 data input selector logic (MUX), implement the following two functions: a) F(A,B,C)=S 0 S 2 S 3 S 5 b) F(A,B,C,D)=P 0 +P.
Introduction to VHDL Coding Wenchao Cao, Teaching Assistant Department of EECS University of Tennessee.
ENG2410 Digital Design LAB #7 LAB #7 Sequential Logic Design “Sequence Recognizer” Using both Schematic Capture and VHDL.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Explain Half Adder and Full Adder with Truth Table.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
Combinational logic circuit
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
LAB #3 Design of Combinational Logic “The Trip Genie”
LAB #4 Xilinix ISE Foundation Tools VHDL Design Entry “A Tutorial”
Describing Combinational Logic Using Processes
ENG2410 Digital Design “Combinational Logic Design”
LAB #1 Introduction Combinational Logic Design
ENG6530 Reconfigurable Computing Systems
Combinational Circuits Using VHDL
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
ECE 331 – Digital System Design
VHDL VHSIC Hardware Description Language VHSIC
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL (VHSIC Hardware Description Language)
VHDL Structural Architecture
Chapter 5 – Number Representation and Arithmetic Circuits
LAB #2 Xilinix ISE Foundation Tools Schematic Capture “A Tutorial”
ECE 331 – Digital System Design
Modeling of Circuits with a Regular Structure
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
Digital Logic with VHDL
Presentation transcript:

LAB #5 Modular Design and Hierarchy using VHDL ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL

Lab Objectives Understand the concept of modular design. Study the modular design flow using VHDL. Design adder/subtractor using modular design. Design a 7-segments decoder to activate the 7-segment displays available on the FPGA. Integrate the adder/subtractor and the 7-segment in one unit. ENG241/ Lab #5

Adder/Subtractor Design 4 bit adder/subtractor. Design 1-bit Full Adder The Full Adder is used to design 1-bit adder/subtractor. Using four 1-bit adder/subtractor to build the 4-bit adder/subtractor. ENG241/ Lab #5

4 Bit Adder/Subtractor ENG241/ Lab #5

7-Segments Display 7 LEDs form the display. Used to display numerical values. Some 7-Seg. Include extra LED for dots. ENG241/ Lab #5

7-Segment Decoder Take Binary number as Inputs. Generate the required bit string that display the numerical value on a 7-Seg Display. ENG241/ Lab #5

7-Segments on NEXYS 3 Board Four 7-Segments Displays Exist. The have common input. Transistors are connected to the Anode to select the required display. It is Active Low. ENG241/ Lab #5

Complete System Integrate the Adder/Subtractor and 7-Segments Decoder to form the complete system. Use the slide switches for data input. ENG241/ Lab #5

Sample Modular Design in VHDL library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- This Code define XOR module entity xor_2 is port ( a,b : in std_logic; f : out std_logic); end xor_2; architecture dataflow of xor_2 is begin f <= a xor b; end dataflow; ENG241/ Lab #5

Sample Modular Design in VHDL Cont. library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity parity_4 is port ( data : in std_logic_vector (3 downto 0); p : out std_logic); end parity_4; architecture structured of parity_4 is signal p_i : std_logic_vector (2 downto 0); --Signal Declaration component xor_2 --Component Declaration port ( a,b : in std_logic; f : out std_logic); end component; begin u1: xor_2 port map (data(0), data(1),p_i(0)); u2: xor_2 port map (p_i(0),data(2),p_i(1)); u3: xor_2 port map (f=>p_i(2),a=>data(3),b=>p_i(1)); p <= p_i(2); end structured; ENG241/ Lab #5

UCF File //Slide switches NET SW0 LOC = T10; NET SW1 LOC = T9; NET SW2 LOC = V9; NET SW3 LOC = M8; NET SW4 LOC = N8; NET SW5 LOC = U8; NET SW6 LOC = V8; NET SW7 LOC = T5; // Pushbutton switches NET BTNS LOC = B9; NET BTNU LOC =A8; NET BTNL LOC = C4; NET BTND LOC = C9; NET BTNR LOC = D9; // 7seg digit segments NET CA LOC = T17; NET CB LOC = T18; NET CC LOC = U17; NET CD LOC = U18; NET CE LOC = M14; NET CF LOC = N14; NET CG LOC = L14; NET DP LOC = M13; // 7seg selector transistors NET AN0 LOC = N16; //(LSD) NET AN1 LOC = N15; NET AN2 LOC = P18; NET AN3 LOC = P17; //(MSD) ENG241/ Lab #5

Academic Misconduct Reports and demos are submitted as a group, but it is a SINGLE group effort You may talk with other groups but sharing codes or reports is NOT ALLOWED Copying reports from previous years is also NOT ALLOWED If we find copying we are REQUIRED to report it

Guidelines: Steps Build 7-seg decoder using VHDL (sample VHDL code is available) Create a symbol for the 7-seg decoder X3 X2 X1 X0 7-Seg Decoder a b c d e f g ENG241/ Lab #5

Guidelines: Steps Build (1-bit) HA using VHDL (code available) Build (1-bit) FA using VHDL, utilize the implemented HA (code available) Test the (1-bit) FA. ENG241/ Lab #5

VHDL CODE for 1-bit FA ENG241/ Lab #5

Guidelines: Steps Use 1-bit FA to build 4-bit adder using VHDL. Create a symbol for the 4-bit adder A3 A2 A1 A0 B3 B2 B1 B0 Cin 4-bit Adder Cout S3 S2 S1 S0 ENG241/ Lab #5

Guidelines: Steps Use Schematic capture to add XORs to change the adder to adder-subtractor. Interface the output of the 4-bit to the 7-Seg decoder. This should be done in one schematic file. ENG241/ Lab #5

Schematic ENG241/ Lab #5

Project Files HA – VHDL FA – VHDL 7-Seg Decoder – VHDL 4-bit Adder – VHDL 4-bit adder-subtractor – Schematic TOP Level is Schematic ENG241/ Lab #5