VHDL Project I: Serial Adder Matthew Murach Slides Available at: www.pages.drexel.edu/~mjm46.

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 2 October 4, 2006.
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
COE 405 VHDL Basics Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh Computer Engineering.
LECTURE 4: The VHDL N-bit Adder
1 EE24C Digital Electronics Project Theory: Sequential Logic (part 2)
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
VHDL revision 15a1 VHDL revision. VHDL revision 15a2 Q1 A clocked 4-to-2-bit encoder circuit (with synchronous reset) has the following interfaces: RESET:
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #12) The slides included herein were taken from the materials.
DIGITAL DESIGN WITH VHDL Exercise 1 1Muhammad Amir Yousaf.
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
Lecture #5 In this lecture we will introduce the sequential circuits.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Introduction to Design Tools COE Review: Tools, functions, design flow Four tools we will use in this course – HDL Designer Suite FPGA Advantage.
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,
ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 6: Configurations.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
Tutorial 1 Combinational Logic Synthesis. Introduction to VHDL VHDL = Very high speed Hardware Description Language VHDL and Verilog are the industry.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
VHDL Project I: Introduction to Testbench Design Matthew Murach Slides Available at:
1 Sequential Logic Lecture #7. 모바일컴퓨팅특강 2 강의순서 Latch FlipFlop Shift Register Counter.
CprE / ComS 583 Reconfigurable Computing
ENG241 Digital Design Week #4 Combinational Logic Design.
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
L26 – Datapath ALU implementation
A full die photograph of the MIPS R2000 RISC Microprocessor is shown above. The 1986 MIPS R2000 with five pipeline stages and 450,000 transistors was the.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
1 ECE 545—Digital System Design with VHDL Lecture 6 Behavioral VHDL Coding (for Synthesis): Finite State Machines and ASMs 9/30/08.
ENG241 Digital Design Week #8 Registers and Counters.
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)
Basic Overview of VHDL Matthew Murach Slides Available at:
BR 1/991 Dice Game Implementation Why was dice game implemented in three 22V10 PLDs? What are the resources needed by the Dice Game? –Outputs: 6 for dice.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
1 component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words  Declarations of Components and Entities are similar  Components are.
ECE 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
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.
VHDL Project II: Bubble Sorter Matthew Murach Slides Available at:
L19 – Resolved Signals. Resolved Signals  What are resolved signals In systems In VHDL Resolution – Isn’t that for resolving conflicts?  Ref: text Unit.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
Reconfigurable Computing - Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Digital System Design using VHDL
L20 – Register Set. The 430 Register Set  Not exactly a dual ported register set, but a dual drive register set.  Ref: text Unit 10, 17, 20 9/2/2012.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Explain Half Adder and Full Adder with Truth Table.
SERIAL MULTIPLIER Part 1
Combinational logic circuit
Registers and Counters
Module Goals Introduce structural VHDL constructs Use of components
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Revision Name __________ Student number______
ENG6530 Reconfigurable Computing Systems
IAY 0600 Digital Systems Design
VHDL (VHSIC Hardware Description Language)
VHDL Structural Architecture
Copyright Joanne DeGroat, ECE, OSU
Lecture #5 In this lecture we will introduce the sequential circuits.
Figure 8.1. The general form of a sequential circuit.
Copyright Joanne DeGroat, ECE, OSU
ECE 352 Digital System Fundamentals
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
System Controller Approach
Digital Logic with VHDL
Presentation transcript:

VHDL Project I: Serial Adder Matthew Murach Slides Available at:

Serial Adder Description Adds up values given over a length of time and computes the sum given. Adds up values given over a length of time and computes the sum given. This device is comprised of 4 components namely the adder itself, two shift registers for A and B, and a controller. This device is comprised of 4 components namely the adder itself, two shift registers for A and B, and a controller. You have designed the adder component as previously given in the tutorial. You have designed the adder component as previously given in the tutorial.

Shift Register Description A shift register takes a std_logic_vector and outputs the bits serially each clock cycle. A shift register takes a std_logic_vector and outputs the bits serially each clock cycle. Both A and B operand values should have an associated shift register. Both A and B operand values should have an associated shift register. Note that the contents of the shift register will be slowly feed to the adder one bit at a time. This is necessary since our adder can only take one bit at a time. Note that the contents of the shift register will be slowly feed to the adder one bit at a time. This is necessary since our adder can only take one bit at a time.

Controller Description The controller component of the design simply acts as a logic diagram controlling which state the machine is in. The controller component of the design simply acts as a logic diagram controlling which state the machine is in. In the serial adder case there are three states In the serial adder case there are three states Idle – Machine is waiting Idle – Machine is waiting Loading – Machine is loading the shift registers Loading – Machine is loading the shift registers Shifting – The machine is dumping information from the shifters to the adder component Shifting – The machine is dumping information from the shifters to the adder component

Putting it Together Given the description above our design looks like this. Note that all devices are clocked (Not shown) Given the description above our design looks like this. Note that all devices are clocked (Not shown) Shift register A Shift register B A B Controller Sel A-bit B-bit Full Adder En Reset Done Sum Carry Out Go

Putting it all Together Previous wiring diagram is difficult to simulate since there are so many components and internal signals. Previous wiring diagram is difficult to simulate since there are so many components and internal signals. Notice that there are only 6 ports that connect with outside devices. Notice that there are only 6 ports that connect with outside devices. Wouldn’t it be nice if we could package these components into a single black box for testing….. Wouldn’t it be nice if we could package these components into a single black box for testing…..

Component Declarations Instance components into a master VHDL file. Instance components into a master VHDL file. Saves time and is very straight forward. Format for this file is given below. Saves time and is very straight forward. Format for this file is given below. Entity Declaration – similar as before Architecture Declaration -- Define components here -- Define internal wirings Begin -- instance components in design with port map End Architecture Declaration;

Component Declarations Component declaration is nearly same as the device’s entity declaration. Component declaration is nearly same as the device’s entity declaration. Simply Copy and Paste in the component descriptions and add the key word component. Simply Copy and Paste in the component descriptions and add the key word component. Component serial_adder generic(N : natural := 8); port (a,b,clk,en : IN std_logic ; s : OUT std_logic_vector (N-1 DOWNTO 0); cout, done : OUT std_logic ); end component; Entity serial_adder is generic(N : natural := 8); port (a,b,clk,en : IN std_logic ; s : OUT std_logic_vector (N-1 DOWNTO 0); cout, done : OUT std_logic ); end serial_adder;

Internal Signals and Port Mappings Internal wiring is done with signals. Simply declare these signals like you have done in previous exercises. Internal wiring is done with signals. Simply declare these signals like you have done in previous exercises. Port mapping is the where the actual components are instantiated and mapped to their respective signals. Port mapping is the where the actual components are instantiated and mapped to their respective signals. Note that you can instantiate more then one instance of each component. Note that you can instantiate more then one instance of each component.

Example of Port Mapping Let’s say you want to make a master VHDL design from the two components on the right. Let’s say you want to make a master VHDL design from the two components on the right. -- Signal Declarations Signal N : std_logic; Signal M : std_logic; Begin -- Port Map Declarations My_A : Acomp generic map(N) port map(N,M,ck); My_B : Bcomp generic map(N) port map(M,N,ck); A Component B Component C Component M N Ck