4-Input Gates VHDL for Loops

Slides:



Advertisements
Similar presentations
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
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.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Arbitrary Waveform Discussion 5.5 Example 34.
Arithmetic Logic Unit (ALU)
Edge-Triggered D Flip-Flops Discussion D4.2 Example 26.
Multiplexer as a Universal Element Discussion D2.6 Example 9.
Shifters Discussion D7.1 Example Bit Shifter.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
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)
Top-level VHDL Designs
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Decoders and Encoders Lecture L4.2. Decoders and Encoders Binary Decoders Binary Encoders Priority Encoders.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
1 Comparators Discussion D A 1-Bit Comparator The variable Gout is 1 if x > y or if x = y and Gin = 1. The variable Eout is 1 if x = y and Gin =
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 2 Microcomputer Systems Design (Embedded Systems)
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Decoders and Encoders Sections 3-5, 3-6 Mano & Kime.
Introduction to VHDL Multiplexers Discussion D1.1.
4-Bit Binary-to-BCD Converter: case Statement
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
1 Comparators: Procedures Discussion D9.2 Example 22.
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
Sequential Statements
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
Digital System Projects
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
CS/EE 3700 : Fundamentals of Digital System Design
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
EGRE 6311 LHO 04 - Subprograms, Packages, and Libraries EGRE 631 1/26/09.
1 - CPRE 583 (Reconfigurable Computing): VHDL overview 1 Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 2: 8/26/2011 (VHDL Overview.
Combinational logic circuit
Describing Combinational Logic Using Processes
Behavioral Style Combinational Design with VHDL
IAY 0600 Digital Systems Design
UNIT 8: Synthesis Basics
Dataflow Style Combinational Design with VHDL
Comparators Discussion DS-3.1.
Behavioral Style Combinational Design with VHDL
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.
IAS 0600 Digital Systems Design
Getting Started with Vivado
VHDL Discussion Subprograms
VHDL Structural Architecture
VHDL Introduction.
VHDL Discussion Subprograms
IAS 0600 Digital Systems Design
Digital Logic with VHDL
(Simple Testbenches & Arithmetic Operations)
Presentation transcript:

4-Input Gates VHDL for Loops Discussion D1.3 Example 3

4-Input AND Gate Behavior: zv := '1'; for i in 1 to 4 loop 3-Level Behavior: zv := '1'; for i in 1 to 4 loop zv := zv and x(i); end loop; 2-Level

-- Example 3: 4-input AND gate - VHDL for loop library IEEE; use IEEE.STD_LOGIC_1164.all; entity and4 is port( x : in STD_LOGIC_VECTOR(4 downto 1); z : out STD_LOGIC ); end and4; architecture and4 of and4 is begin and4_1: process(x) variable zv: STD_LOGIC; zv := x(1); for i in 2 to 4 loop zv := zv and x(i); end loop; z <= zv; end process and4_1;

architecture and4 of and4 is begin and4_1: process(x) variable zv: STD_LOGIC; zv := x(1); for i in 2 to 4 loop zv := zv and x(i); end loop; z <= zv; end process and4_1; end and4; process sensitivity list Sequential statements (for…end loop) must be in a process Note begin…end in process

variables declared before begin architecture and4 of and4 is begin and4_1: process(x) variable zv: STD_LOGIC; zv := x(1); for i in 2 to 4 loop zv := zv and x(i); end loop; z <= zv; end process and4_1; end and4; variable assignment operator := executed immediately signal assignment operator <= updated at end of process

Aldec Active-HDL Simulation

4-Input OR Gate Behavior: zv := '0'; for i in 1 to 4 loop 3-Level Behavior: zv := '0'; for i in 1 to 4 loop zv := zv or x(i); end loop; 2-Level

4-Input XOR Gate Behavior: zv := '0'; for i in 1 to 4 loop 3-Level Behavior: zv := '0'; for i in 1 to 4 loop zv := zv xor x(i); end loop; 2-Level Note: zv = 1 if the number of 1 inputs in ODD