ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

Similar documents
ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

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

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

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1

ELE432. ADVANCED DIGITAL DESIGN HACETTEPE UNIVERSITY Designing with VHDL

Digital Systems Design

Chapter 6 Combinational-Circuit Building Blocks

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

ECE 545 Lecture 12. FPGA Resources. George Mason University

Lecture 12 VHDL Synthesis

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. Behavioral Design Style: Registers & Counters.

ELCT 501: Digital System Design

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

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

Hardware Description Language VHDL (1) Introduction

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

Lecture 4. VHDL Fundamentals. George Mason University

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 6 Combinational and sequential circuits

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

CprE 583 Reconfigurable Computing

ECE 545 Lecture 7. VHDL Description of Basic Combinational & Sequential Circuit Building Blocks. Required reading. Fixed Shifters & Rotators

Concurrent Signal Assignment Statements (CSAs)

Lecture 4. VHDL Fundamentals. Required reading. Example: NAND Gate. Design Entity. Example VHDL Code. Design Entity

Introduction to VHDL #1

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

VHDL for FPGA Design. by : Mohamed Samy

Contents. Appendix D VHDL Summary Page 1 of 23

!"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"

FPGA BASED SYSTEM DESIGN. Dr. Tayab Din Memon Lecture 9 & 10 : Combinational and Sequential Logic

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs

ECE 545 Lecture 12. Datapath vs. Controller. Structure of a Typical Digital System Data Inputs. Required reading. Design of Controllers

Digital Design with FPGAs. By Neeraj Kulkarni

Very High Speed Integrated Circuit Har dware Description Language

ECE 545 Lecture 4. Simple Testbenches. George Mason University

Basic Language Concepts

Chapter 2 Basic Logic Circuits and VHDL Description

ENGIN 241 Digital Systems with Lab

Introduction to VHDL

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006

ECE 545 Lecture 7. Modeling of Circuits with a Regular Structure. Aliases, Attributes, Packages. Mixing Design Styles. George Mason University

Lecture 3 Introduction to VHDL

CDA 4253 FPGA System Design Introduction to VHDL. Hao Zheng Dept of Comp Sci & Eng USF

Introduction to VHDL #3

C-Based Hardware Design

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

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning

Design Using Verilog

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Review of Digital Design with VHDL

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 3

Introduction to VHDL. Main language concepts

COE 405 Design Methodology Based on VHDL

Writing VHDL for RTL Synthesis

IT T35 Digital system desigm y - ii /s - iii

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 2

Control and Datapath 8

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

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 3

ECE 545 Lecture 9. Modeling of Circuits with a Regular Structure. Aliases, Attributes, Packages. George Mason University

Topics. Midterm Finish Chapter 7

Lattice VHDL Training

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;

The VHDL Hardware Description Language

Verilog Module 1 Introduction and Combinational Logic

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

Digital Design with SystemVerilog

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

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

Introduction to synthesis. Logic Synthesis

CprE 583 Reconfigurable Computing

structure syntax different levels of abstraction

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

2/14/2016. Hardware Synthesis. Midia Reshadi. CE Department. Entities, Architectures, and Coding.

VHDL in 1h. Martin Schöberl

VHDL Basics. Mehdi Modarressi. Department of Electrical and Computer Engineering, University of Tehran. ECE381(CAD), Lecture 4:

Solutions - Homework 2 (Due date: October 9:30 am) Presentation and clarity are very important!

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

JUNE, JULY 2013 Fundamentals of HDL (10EC45) PART A

VHDL 3 BASIC OPERATORS AND ARCHITECTURE BODY. Design descriptions & design constructions examples are taken from foundation series examples

VHDL Examples Mohamed Zaky

EEL 4783: Hardware/Software Co-design with FPGAs

Digital Systems Design

Experiment 8 Introduction to VHDL

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

EECE-4740/5740 Advanced VHDL and FPGA Design. Lecture 3 Concurrent and sequential statements

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

VHDL: A Crash Course

VHDL Structural Modeling II

VHDL for Complex Designs

Microcomputers. Outline. Number Systems and Digital Logic Review

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

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab

Computer-Aided Digital System Design VHDL

EE261: Intro to Digital Design

Modeling Complex Behavior

VHDL: RTL Synthesis Basics. 1 of 59

Transcription:

ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University

Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level combinational circuit Sections 3., 3.2, 3.3, 3.6, 3.7., 3.7.3. Recommended S. Brown and Z. Vranesic, Fundamentals of Digital Logic with VHDL Design Chapter 6, Combinational-Circuit Building Blocks Chapter 5.5, Design of Arithmetic Circuits Using CAD Tools 2

Types of VHDL Description (Modeling Styles) 3

Types of VHDL Description VHDL Descriptions dataflow structural Testbenches behavioral Concurrent statements Components and interconnects Sequential statements Registers State machines Instruction decoders Subset most suitable for synthesis 4

Synthesizable VHDL Dataflow VHDL VHDL code synthesizable Dataflow VHDL VHDL code synthesizable 5

Data-Flow VHDL Concurrent Statements concurrent signal assignment ( ) conditional concurrent signal assignment (when-else) selected concurrent signal assignment (with-select-when) generate scheme for equations (for-generate) 6

Modeling Wires and Buses 7

Signals SIGNAL a : STD_LOGIC; a wire SIGNAL b : STD_LOGIC_VECTOR(7 DOWNTO ); b 8 bus 8

Merging wires and buses a b 5 4 d c SIGNAL a: STD_LOGIC_VECTOR(3 DOWNTO ); SIGNAL b: STD_LOGIC_VECTOR(4 DOWNTO ); SIGNAL c: STD_LOGIC; SIGNAL d: STD_LOGIC_VECTOR(9 DOWNTO ); d <= a & b & c; 9

Splitting buses d 4 5 a b c SIGNAL a: STD_LOGIC_VECTOR(3 DOWNTO ); SIGNAL b: STD_LOGIC_VECTOR(4 DOWNTO ); SIGNAL c: STD_LOGIC; SIGNAL d: STD_LOGIC_VECTOR(9 DOWNTO ); a <= d(9 downto 6); b <= d(5 downto ); c <= d();

Combinational-Circuit Building Blocks

Fixed Shifters & Rotators 2

Fixed Logical Shift Right in VHDL SIGNAL A : STD_LOGIC_VECTOR(3 DOWNTO ); SIGNAL C: STD_LOGIC_VECTOR(3 DOWNTO ); 4 A >> C 4 L A(3) A(2) A() A() A(3) A(2) A() A C C = 3

Fixed Arithmetic Shift Right in VHDL SIGNAL A : STD_LOGIC_VECTOR(3 DOWNTO ); SIGNAL C: STD_LOGIC_VECTOR(3 DOWNTO ); 4 A >> C 4 A A(3) A(2) A() A() A C A(3) A(3) A(2) A() C = 4

Fixed Rotation in VHDL SIGNAL A : STD_LOGIC_VECTOR(3 DOWNTO ); SIGNAL C: STD_LOGIC_VECTOR(3 DOWNTO ); 4 A <<< C 4 A(3) A(2) A() A() A(2) A() A() A(3) A C 5

Gates 6

Basic Gates AND, OR, NOT x x x x 2 2 x x 2 x n x x 2 x n (a) AND gates x x x + x 2 2 x x 2 x n x + x 2 + + x n (b) OR gates x x (c) NOT gate 7

Basic Gates NAND, NOR x x 2 x x x x 2 2 x x 2 x n x n (a) NAND gates x x x x + x 2 2 x 2 x + x 2 + + x n x n (b) NOR gates 8

DeMorgan s Theorem and other symbols for NAND, NOR x x 2 x x 2 x x 2 (a) x x 2 = x + x 2 x x 2 x x 2 x x 2 (b) x + x 2 = x x 2 9

Basic Gates XOR x x 2 f = x x 2 x x 2 f = x x 2 (a) Truth table (b) Graphical symbol x x 2 f = x x 2 (c) Sum-of-products implementation 2

Basic Gates XNOR x x 2 f = x x 2 x x 2 f = x x 2 = x. x 2 (a) Truth table (b) Graphical symbol x x 2 f = x x 2 (c) Sum-of-products implementation 2

Data-flow VHDL: Example x y cin s cout 22

Data-flow VHDL: Example () LIBRARY ieee ; USE ieee.std_logic_64.all ; ENTITY fulladd IS PORT ( x : IN STD_LOGIC ; y : IN STD_LOGIC ; cin : IN STD_LOGIC ; s : OUT STD_LOGIC ; cout : OUT STD_LOGIC ) ; END fulladd ; 23

Data-flow VHDL: Example (2) ARCHITECTURE dataflow OF fulladd IS BEGIN s <= x XOR y XOR cin ; cout <= (x AND y) OR (cin AND x) OR (cin AND y) ; END dataflow ; 24

Logic Operators Logic operators and or nand nor xor not xnor Logic operators precedence only in VHDL-93 Highest Lowest not and or nand nor xor xnor 25

No Implied Precedence Wanted: y = ab + cd Incorrect y <= a and b or c and d ; equivalent to y <= ((a and b) or c) and d ; equivalent to y = (ab + c)d Correct y <= (a and b) or (c and d) ; 26

Multiplexers 27

2-to- Multiplexer s s f w f w w w (a) Graphical symbol (b) Truth table 28

VHDL code for a 2-to- Multiplexer LIBRARY ieee ; USE ieee.std_logic_64.all ; ENTITY mux2to IS PORT ( w, w, s : IN STD_LOGIC ; f : OUT STD_LOGIC ) ; END mux2to ; ARCHITECTURE dataflow OF mux2to IS BEGIN f <= w WHEN s = '' ELSE w ; END dataflow ; 29

Cascade of two multiplexers w 3 w 2 y w s2 s 3

VHDL code for a cascade of two multiplexers LIBRARY ieee ; USE ieee.std_logic_64.all ; ENTITY mux_cascade IS PORT ( w, w2, w3: IN STD_LOGIC ; s, s2 : IN STD_LOGIC ; f : OUT STD_LOGIC ) ; END mux_cascade ; ARCHITECTURE dataflow OF mux2to IS BEGIN f <= w WHEN s = ' ELSE w2 WHEN s2 = ELSE w3 ; END dataflow ; 3

Operators Relational operators = /= < <= > >= Logic and relational operators precedence Highest Lowest not = /= < <= > >= and or nand nor xor xnor 32

Priority of logic and relational operators compare a = bc Incorrect when a = b and c else equivalent to when (a = b) and c else Correct when a = (b and c) else 33

4-to- Multiplexer s s s s f w w w 2 w 3 f w w w 2 w 3 (a) Graphic symbol (b) Truth table 34

VHDL code for a 4-to- Multiplexer LIBRARY ieee ; USE ieee.std_logic_64.all ; ENTITY mux4to IS PORT ( w, w, w2, w3 : IN STD_LOGIC ; s : IN STD_LOGIC_VECTOR( DOWNTO ) ; f : OUT STD_LOGIC ) ; END mux4to ; ARCHITECTURE dataflow OF mux4to IS BEGIN WITH s SELECT f <= w WHEN "", w WHEN "", w2 WHEN "", w3 WHEN OTHERS ; END dataflow ; 35

Decoders 36

2-to-4 Decoder En w w y 3 y 2 y y w y 3 w y 2 y En y x x (a) Truth table (b) Graphical symbol 37

VHDL code for a 2-to-4 Decoder LIBRARY ieee ; USE ieee.std_logic_64.all ; ENTITY dec2to4 IS PORT ( w : IN STD_LOGIC_VECTOR( DOWNTO ) ; En : IN STD_LOGIC ; y : OUT STD_LOGIC_VECTOR(3 DOWNTO ) ) ; END dec2to4 ; ARCHITECTURE dataflow OF dec2to4 IS SIGNAL Enw : STD_LOGIC_VECTOR(2 DOWNTO ) ; BEGIN Enw <= En & w ; WITH Enw SELECT y <= " WHEN "", "" WHEN "", "" WHEN "", " WHEN "", "" WHEN OTHERS ; END dataflow ; 38

Adders 39

6-bit Unsigned Adder 6 6 Cout X + S Y Cin 6 4

Operations on Unsigned Numbers For operations on unsigned numbers USE ieee.numeric_std.all and signals of the type UNSIGNED and conversion functions: std_logic_vector(), unsigned() OR USE ieee.std_logic_unsigned.all and signals of the type STD_LOGIC_VECTOR 4

VHDL code for a 6-bit Unsigned Adder LIBRARY ieee ; USE ieee.std_logic_64.all ; USE ieee.std_logic_unsigned.all ; ENTITY adder6 IS PORT ( Cin : IN STD_LOGIC ; X : IN STD_LOGIC_VECTOR(5 DOWNTO ) ; Y : IN STD_LOGIC_VECTOR(5 DOWNTO ) ; S : OUT STD_LOGIC_VECTOR(5 DOWNTO ) ; Cout : OUT STD_LOGIC ) ; END adder6 ; ARCHITECTURE dataflow OF adder6 IS SIGNAL Sum : STD_LOGIC_VECTOR(6 DOWNTO ) ; BEGIN Sum <= ('' & X) + Y + Cin ; S <= Sum(5 DOWNTO ) ; Cout <= Sum(6) ; END dataflow ; 42

Addition of Unsigned Numbers () LIBRARY ieee ; USE ieee.std_logic_64.all ; USE ieee.numeric_std.all ; ENTITY adder6 IS PORT ( Cin : IN STD_LOGIC ; X : IN STD_LOGIC_VECTOR(5 DOWNTO ) ; Y : IN STD_LOGIC_VECTOR(5 DOWNTO ) ; S : OUT STD_LOGIC_VECTOR(5 DOWNTO ) ; Cout : OUT STD_LOGIC ) ; END adder6 ; 43

Addition of Unsigned Numbers (2) ARCHITECTURE dataflow OF adder6 IS SIGNAL Xu : UNSIGNED(5 DOWNTO ); SIGNAL Yu: UNSIGNED(5 DOWNTO ); SIGNAL Su : UNSIGNED(6 DOWNTO ) ; BEGIN Xu <= unsigned(x); Yu <= unsigned(y); Su <= ('' & Xu) + Yu + unsigned( & Cin) ; S <= std_logic_vector(su(5 DOWNTO )) ; Cout <= Su(6) ; END dataflow ; 44

Operations on Signed Numbers For operations on signed numbers USE ieee.numeric_std.all, signals of the type SIGNED, and conversion functions: std_logic_vector(), signed() OR USE ieee.std_logic_signed.all and signals of the type STD_LOGIC_VECTOR 45

Signed and Unsigned Types Behave exactly like STD_LOGIC_VECTOR plus, they determine whether a given vector should be treated as a signed or unsigned number. Require USE ieee.numeric_std.all; 46

Multipliers 47

Unsigned vs. Signed Multiplication Unsigned Signed 5 - x x 5 x x - 225 48

8x8-bit Unsigned Multiplier 8 8 a b * c U 6 49

Multiplication of unsigned numbers LIBRARY ieee; USE ieee.std_logic_64.all; USE ieee.std_logic_unsigned.all ; entity multiply is port( a : in STD_LOGIC_VECTOR(7 downto ); b : in STD_LOGIC_VECTOR(7 downto ); c : out STD_LOGIC_VECTOR(5 downto ) ); end multiply; architecture dataflow of multiply is begin c <= a * b; end dataflow; 5

8x8-bit Signed Multiplier 8 8 a b * c S 6 5

Multiplication of signed numbers LIBRARY ieee; USE ieee.std_logic_64.all; USE ieee.std_logic_signed.all ; entity multiply is port( a : in STD_LOGIC_VECTOR(7 downto ); b : in STD_LOGIC_VECTOR(7 downto ); c : out STD_LOGIC_VECTOR(5 downto ) ); end multiply; architecture dataflow of multiply is begin c <= a * b; end dataflow; 52

8x8-bit Unsigned and Signed Multiplier 8 8 a cu * b cs 6 6 53

Multiplication of signed and unsigned LIBRARY ieee; USE ieee.std_logic_64.all; USE ieee.numeric_std.all ; numbers entity multiply is port( a : in STD_LOGIC_VECTOR(7 downto ); b : in STD_LOGIC_VECTOR(7 downto ); cu : out STD_LOGIC_VECTOR(5 downto ); cs : out STD_LOGIC_VECTOR(5 downto ) ); end multiply; architecture dataflow of multiply is begin -- signed multiplication cs <= STD_LOGIC_VECTOR(SIGNED(a)*SIGNED(b)); -- unsigned multiplication cu <= STD_LOGIC_VECTOR(UNSIGNED(a)*UNSIGNED(b)); end dataflow; 54

Comparators 55

4-bit Number Comparator 4 4 A B A > B AgtB 56

VHDL code for a 4-bit Unsigned Number Comparator LIBRARY ieee ; USE ieee.std_logic_64.all ; USE ieee.std_logic_unsigned.all ; ENTITY compare IS PORT ( A, B : IN STD_LOGIC_VECTOR(3 DOWNTO ) ; AgtB : OUT STD_LOGIC ) ; END compare ; ARCHITECTURE dataflow OF compare IS BEGIN AgtB <= '' WHEN A > B ELSE '' ; END dataflow ; 57

VHDL code for a 4-bit Signed Number Comparator LIBRARY ieee ; USE ieee.std_logic_64.all ; USE ieee.std_logic_signed.all ; ENTITY compare IS PORT ( A, B : IN STD_LOGIC_VECTOR(3 DOWNTO ) ; AgtB : OUT STD_LOGIC ) ; END compare ; ARCHITECTURE dataflow OF compare IS BEGIN AgtB <= '' WHEN A > B ELSE '' ; END dataflow ; 58

Buffers 59

Tri-state Buffer e x f e = (a) A tri-state buffer x f e x f Z Z x e = (b) Equivalent circuit f (c) Truth table 6

Four types of Tri-state Buffers e e x f x f (a) (b) e e x f x f (c) (d) 6

Tri-state Buffer example () LIBRARY ieee; USE ieee.std_logic_64.all; ENTITY tri_state IS PORT ( ena: IN STD_LOGIC; input: IN STD_LOGIC; output: OUT STD_LOGIC ); END tri_state; 62

Tri-state Buffer example (2) ARCHITECTURE dataflow OF tri_state IS BEGIN output <= input WHEN (ena = ) ELSE Z ; END dataflow; 63

Encoders 64

Priority Encoder w w w 2 w 3 y y z w 3 w 2 w w y y z x x x x x x d d 65

VHDL code for a Priority Encoder LIBRARY ieee ; USE ieee.std_logic_64.all ; ENTITY priority IS PORT ( w : IN STD_LOGIC_VECTOR(3 DOWNTO ) ; y : OUT STD_LOGIC_VECTOR( DOWNTO ) ; z : OUT STD_LOGIC ) ; END priority ; ARCHITECTURE dataflow OF priority IS BEGIN y <= "" WHEN w(3) = '' ELSE "" WHEN w(2) = '' ELSE "" WHEN w() = '' ELSE "" ; z <= '' WHEN w = "" ELSE '' ; END dataflow ; 66

ROM 67

ROM 8x6 example () Addr 3 8x6 ROM Dout 6 C 68

ROM 8x6 example (2) LIBRARY ieee; USE ieee.std_logic_64.all; USE ieee.numeric_std.all; ENTITY rom IS PORT ( ); Addr : IN STD_LOGIC_VECTOR(2 DOWNTO ); Dout : OUT STD_LOGIC_VECTOR(5 DOWNTO ) END rom; 69

ROM 8x6 example (3) ARCHITECTURE dataflow OF rom IS SIGNAL temp: INTEGER RANGE TO 7; TYPE vector_array IS ARRAY ( to 7) OF STD_LOGIC_VECTOR(5 DOWNTO ); CONSTANT memory : vector_array := ( X 8A", X"D459", X"A87", X"7853", X"65D", X"642F", X"F742", X"F548"); BEGIN temp <= to_integer(unsigned(addr)); Dout <= memory(temp); END dataflow; 7

Variable Rotators 7

8-bit Variable Rotator Left A 8 3 B A <<< B C 8 72

Describing Combinational Logic Using Dataflow Design Style 73

MLU Example 74

MLU Block Diagram A A MUX_ MUX_4_ NEG_A MUX_ MUX_2 IN IN IN2 OUTPUT IN3 SEL SEL Y Y NEG_Y B B L L NEG_B MUX_3

MLU: Entity Declaration LIBRARY ieee; USE ieee.std_logic_64.all; ENTITY mlu IS PORT( NEG_A : IN STD_LOGIC; NEG_B : IN STD_LOGIC; NEG_Y : IN STD_LOGIC; A : IN STD_LOGIC; B : IN STD_LOGIC; L : IN STD_LOGIC; L : IN STD_LOGIC; ); END mlu; Y : OUT STD_LOGIC 76

MLU: Architecture Declarative Section ARCHITECTURE mlu_dataflow OF mlu IS SIGNAL A : STD_LOGIC; SIGNAL B : STD_LOGIC; SIGNAL Y : STD_LOGIC; SIGNAL MUX_ : STD_LOGIC; SIGNAL MUX_ : STD_LOGIC; SIGNAL MUX_2 : STD_LOGIC; SIGNAL MUX_3 : STD_LOGIC; SIGNAL L: STD_LOGIC_VECTOR( DOWNTO ); 77

MLU - Architecture Body BEGIN A<= NOT A WHEN (NEG_A='') ELSE A; B<= NOT B WHEN (NEG_B='') ELSE B; Y <= NOT Y WHEN (NEG_Y='') ELSE Y; MUX_ <= A AND B; MUX_ <= A OR B; MUX_2 <= A XOR B; MUX_3 <= A XNOR B; L <= L & L; with (L) select Y <= MUX_ WHEN "", MUX_ WHEN "", MUX_2 WHEN "", MUX_3 WHEN OTHERS; END mlu_dataflow; 78

Logic Implied Most Often by Conditional and Selected Concurrent Signal Assignments 79

Data-flow VHDL Major instructions Concurrent statements concurrent signal assignment ( ) conditional concurrent signal assignment (when-else) selected concurrent signal assignment (with-select-when) generate scheme for equations (for-generate) 8

Conditional concurrent signal assignment When - Else target_signal <= value when condition else value2 when condition2 else... valuen- when conditionn- else valuen; 8

Most often implied structure When - Else target_signal <= value when condition else value2 when condition2 else... valuen- when conditionn- else valuen; Value N Value N- Condition N-. Value 2 Value Target Signal Condition 2 Condition 82

Data-flow VHDL Major instructions Concurrent statements concurrent signal assignment ( ) conditional concurrent signal assignment (when-else) selected concurrent signal assignment (with-select-when) generate scheme for equations (for-generate) 83

Selected concurrent signal assignment With Select-When with choice_expression select target_signal <= expression when choices_, expression2 when choices_2,... expressionn when choices_n; 84

Most Often Implied Structure With Select-When with choice_expression select target_signal <= expression when choices_, expression2 when choices_2,... expressionn when choices_n; expression expression2 choices_ choices_2 target_signal expressionn choices_n choice expression 85

Allowed formats of choices_k WHEN value WHEN value_ value_2... value N WHEN OTHERS 86

Allowed formats of choice_k - example WITH sel SELECT y <= a WHEN "", c WHEN "" "", d WHEN OTHERS; 87

when-else vs. with-select-when () "when-else" should be used when: ) there is only one condition (and thus, only one else), as in the 2-to- MUX 2) conditions are independent of each other (e.g., they test values of different signals) 3) conditions reflect priority (as in priority encoder); one with the highest priority need to be tested first. 88

when-else vs. with-select-when (2) "with-select-when" should be used when there is ) more than one condition 2) conditions are closely related to each other (e.g., represent different ranges of values of the same signal) 3) all conditions have the same priority (as in the 4-to- MUX). 89