Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)

Slides:



Advertisements
Similar presentations
DISEÑO LÓGICO (DLO) Ejemplos de VHDL.
Advertisements

HDL Programming Fundamentals
arquitectura – implementação
VHDL Introdução Paulo C. Centoducatte fevereiro de 2005
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
Modelagem Básica Entity –Exemplos: entity identifier is [ port (port_interface_list);] {entity_declarative_item} end [entity] [identifier]; Interface_list.
Shift-Registers and Push Button Debounce
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 2 October 4, 2006.
Adders and Subtractors
©2004 Brooks/Cole FIGURES FOR CHAPTER 20 VHDL FOR DIGITAL SYSTEM DESIGN Click the mouse to move to the next page. Use the ESC key to exit this chapter.
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
Sequential Design ELEC 311 Digital Logic and Circuits Dr. Ron Hayne
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
OBJECTIVES Learn the history of HDL Development. Learn how the HDL module is structured. Learn the use of operators in HDL module. Learn the different.
VHDL Programming in CprE 381 Zhao Zhang CprE 381, Fall 2013 Iowa State University Last update: 9/15/2013.
Introduction To VHDL for Combinational Logic
INTRO TO VHDL Appendix A: page page VHDL is an IEEE and ANSI standard. VHDL stands for Very High Speed IC hardware description language.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 15 Bus Interface Barry B. Brey.
VHDL範例 真值表 LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.all; ENTITY true IS
Lecture #28 Page 1 ECE 4110– Sequential Logic Design Lecture #28 Agenda 1.Counters Announcements 1.HW #13 assigned 2.Next: Test #2 Review.
Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.
LECTURE 4: The VHDL N-bit Adder
1 EE24C Digital Electronics Project Theory: Sequential Logic (part 2)
Floating-Point Arithmetic ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
VHDL Structural Architecture ENG241 Week #5 1. Fall 2012ENG241/Digital Design2 VHDL Design Styles Components and interconnects structural VHDL Design.
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
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.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Adder Discussion D6.2 Example 17. s i = c i ^ (a i ^ b i ) c i+1 = a i * b i + c i * (a i ^ b i ) Full Adder (Appendix I)
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Digilent Spartan 3 Board Discussion D3.3
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.
4-Bit Binary-to-BCD Converter: case Statement
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
ENG2410 Digital Design LAB #8 LAB #8 Data Path Design.
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)
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
Digital Systems Design VHDL simulation of a 3 – Bit Binary Decoder with Enable by Marc A. Mackey.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
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.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
Digital System Projects
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Combinational logic circuit
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Systems Architecture Lab: Introduction to VHDL
Describing Combinational Logic Using Processes
Registers and Counters
Combinational Circuits Using VHDL
ECE 331 – Digital System Design
VHDL Structural Architecture
Chapter 5 – Number Representation and Arithmetic Circuits
ECE 331 – Digital System Design
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
4-Input Gates VHDL for Loops
Digital Logic with VHDL
Presentation transcript:

Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)

A Simple Logic Function f x 3 x 1 x 2 ENTITY myfunctionf IS PORT ( x1, x2, x3 : IN STD_LOGIC ; f : OUT STD_LOGIC ) ; END myfunctionf ; ARCHITECTURE Behavioral OF myfunctionf IS BEGIN f <= (x1 AND x2) OR (NOT x2 AND x3) ; END Behavioral ;

ISE VHDL Project Setup

VHDL New Source

Define Input/Output

Simulation Results X 3 X 2 X 1 =010, f=0 X 3 X 2 X 1 =100, f=1

Combine Signals for Readability

More… LIBRARY ieee ; USE ieee.std logic_1164.all ; ENTITY func1 IS PORT ( x1, x2, x3 : IN STD_LOGIC ; f : OUT STD_ LOGIC ) ; END func1 ; ARCHITECTURE LogicFunc OF func1 IS BEGIN f <= (NOT x1 AND NOT x2 AND NOT x3) OR (NOT x1 AND x2 AND NOT x3) OR (x1 AND NOT x2 AND NOT x3) OR (x1 AND NOT x2 AND x3) OR (x1 AND x2 AND NOT x3) ; END LogicFunc ;

Hierarchy/Modularize Design LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY myfulladder IS PORT ( Cin, x, y : IN STD_LOGIC ; s, Cout : OUT STD_LOGIC ) ; END myfulladder ; ARCHITECTURE Behavioral OF myfulladder IS BEGIN s <= x XOR y XOR Cin ; Cout <= (x AND y) OR (Cin AND x) OR (Cin AND y) ; END Behavioral;

LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY adder4 IS PORT ( Cin : IN STD_LOGIC ; x3, x2, x1, x0 : IN STD_LOGIC ; y3, y2, y1, y0 : IN STD_LOGIC ; s3, s2, s1, s0 : OUT STD_LOGIC ; Cout : OUT STD_LOGIC ) ; END adder4 ; ARCHITECTURE Structure OF adder4 IS SIGNAL c1, c2, c3 : STD_LOGIC ; COMPONENT myfulladder PORT ( Cin, x, y : IN STD_LOGIC ; s, Cout : OUT STD_LOGIC ) ; END COMPONENT; BEGIN stage0: myfulladder PORT MAP ( Cin, x0, y0, s0, c1 ) ; stage1: myfulladder PORT MAP ( c1, x1, y1, s1, c2 ) ; stage2: myfulladder PORT MAP ( c2, x2, y2, s2, c3 ) ; stage3: myfulladder PORT MAP ( Cin => c3, Cout => Cout, x => x3, y => y3, s => s3 ) ; END Structure ; 4-bit Adder

16-bit Adder LIBRARY ieee ; USE ieee.std_logic_1164.all ; USE ieee.std_logic_signed.all ; ENTITY adder16 IS PORT ( X, Y: IN STD_LOGIC_VECTOR(15 DOWNTO 0) ; S : OUT STD_LOGIC_VECTOR(15 DOWNTO 0) ) ; END adder16 ; ARCHITECTURE Behavior OF adder16 IS BEGIN S <= X + Y ; END Behavior ;

2-to-1 Mux LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY mux2to1 IS PORT (w0, w1, s: IN STD_LOGIC ; f: OUT STD_LOGIC ) ; END mux2to1 ; ARCHITECTURE Behavior OF mux2to1 IS BEGIN WITH s SELECT f <=w0 WHEN '0', w1 WHEN OTHERS ; END Behavior ;

4-to-1 Mux LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY mux4to1 IS PORT (w0, w1, w2, w3: IN STD_LOGIC ; s: IN STD_LOGIC_VECTOR(1 DOWNTO 0) ; f: OUT STD_LOGIC ) ; END mux4to1 ; ARCHITECTURE Behavior OF mux4to1 IS BEGIN WITH s SELECT f <= w0 WHEN "00", w1 WHEN "01", w2 WHEN "10", w3 WHEN OTHERS ; END Behavior ;