Dataflow Style Combinational Design with VHDL

Slides:



Advertisements
Similar presentations
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
Advertisements

1 H ardware D escription L anguages Basic Language Concepts.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 4: Modeling Dataflow.
IAY 0600 Digital Systems Design
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.
7/10/2007DSD,USIT,GGSIPU1 Basic concept of Sequential Design.
ECE Advanced Digital Systems Design Lecture 4 – Combinational Circuits in VHDL Capt Michael Tanner Room 2F46A HQ U.S. Air Force Academy.
RTL Hardware Design by P. Chu Chapter Basic VHDL program 2. Lexical elements and program format 3. Objects 4. Data type and operators RTL Hardware.
IAY 0600 Digital Systems Design VHDL discussion Dataflow&Behavioral Styles Combinational Design Alexander Sudnitson Tallinn University of Technology.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
IAY 0600 Digital Systems Design VHDL discussion Dataflow Style Combinational Design Alexander Sudnitson Tallinn University of Technology.
George Mason University Data Flow Modeling in VHDL ECE 545 Lecture 7.
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
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)
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
ECOM 4311—Digital System Design with VHDL
Data Flow Modeling in VHDL
ECOM 4311—Digital System Design with VHDL
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
RTL Hardware Design Chapter Combinational versus sequential circuit 2. Simple signal assignment statement 3. Conditional signal assignment statement.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
George Mason University Data Flow Modeling of Combinational Logic ECE 545 Lecture 5.
IAY 0600 Digital Systems Design VHDL discussion Structural style Modular design and hierarchy Part 1 Alexander Sudnitson Tallinn University of Technology.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
IAY 0600 Digital Systems Design
IAY 0600 Digital Systems Design
Combinational logic circuit
Structural style Modular design and hierarchy Part 1
Basic Language Concepts
Systems Architecture Lab: Introduction to VHDL
Describing Combinational Logic Using Processes
Behavioral Style Combinational Design with VHDL
IAY 0600 Digital Systems Design
Verification: Testbenches in Combinational Design
Structural style Modular design and hierarchy Part 1
Behavioral Style Combinational Design with VHDL
Combinational Circuits Using VHDL
IAY 0600 Digital Systems Design
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
IAS 0600 Digital Systems Design
UNIT 2: Data Flow description
ECE 434 Advanced Digital System L08
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
IAS 0600 Digital Systems Design
Structural style Modular design and hierarchy Part 1
IAY 0600 Digital Systems Design
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Modeling of Combinational Logic
VHDL Discussion Subprograms
Concurrent vs Sequential
IAS 0600 Digital Systems Design
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL Discussion Subprograms
Data Flow Description of Combinational-Circuit Building Blocks
IAS 0600 Digital Systems Design
IAS 0600 Digital Systems Design
IAS 0600 Digital Systems Design
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
Digital Logic with VHDL
Presentation transcript:

Dataflow Style Combinational Design with VHDL IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology

Combinational systems Combinational systems have no memory. A combinational system's outputs are a function of only its present input values. No latches/FFs or closed feedback loop Combinational system description can be in dataflow, behavioral, or structioral styles. Concurrent signal assignment signal is basic for dataflow style combinational design.

More about architecture body. Coding styles An architecture body defines either the behavior or structure of a design entity—how it accomplishes its function or how it is constructed. As such, it provides the internal view of a design entity. We can have different architectures associated with the same entity declaration, creating different design entities. An architecture can be written in one of three basic coding styles: dataflow, behavioral, or structural. The distinction between these styles is based on the type of concurrent statements used: • A dataflow architecture uses only concurrent signal assignment statements. • A behavioral architecture uses only process statements. • A structural architecture uses only component instantiation statements.

BIT versus STD_LOGIC BIT type can only have a value of ‘0’ or ‘1’ STD_LOGIC can have nine values 'U',‘0’,’1’,’X’,’Z’,’W’,’L’,’H’,’-’ Useful mainly for simulation ‘0’,’1’, and ‘Z’ are synthesizable

Dataflow style half-adder description library ieee; use ieee.std_logic_1164. all; entity half_adder is port (a, b : in std_logic; sum, carry_out : out std_logic); end half_adder; architecture data_flow of half_adder is begin sum <= a xor b ; -- concurrent signal assignment carry_out <= a and b ; -- concurrent signal assignment end data_flow; Signal assignment statement placed in the statement part of an architecture is a concurrent statement.

Behavioral style half-adder coding entity half_adder is port (a, b : in std_logic; sum, carry: out std_logic); end half_adder; architecture behavior of half_adder is begin ha: process (a, b) if a = ‘1’ then sum <= not b ; carry <= b ; --sequential signal assignments else sum <= b ; carry <= ‘0’ ; end if; end process ha ; end behavior ; We can have different architectures associated with the same entity declaration, creating different design entities.

Signal assignment statement Signal assignment statement placed in the statement part of an architecture is a concurrent statement. Concurrent signal assignment statements assigns a new value to the signal on the left-hand side of the signal assignment symbol (<=) whenever there is an event on one of the signals on the right-hand side of the assignment symbol. The signal assignment statement is said to be sensitive to the signals on the right-hand side of the statement. The symbol <= is read as “gets.” We consider three kinds of concurrent signal assignment: Concurrent signal assignment statement using a Boolean expression Selected signal assignment statement Conditional signal assignment statement

Concurrent signal assignment with a closed feedback loop Signal assignment statement with a closed feedback loop: a signal appears in both sides of a concurrent assignment statement For example, q <= ((not q) and (not en)) or (d and en); Syntactically correct But form a closed feedback loop Should be avoided

Concurrent signal assignment using a Boolean expression (4 bit equality comparator example)

Concurrent signal assignment using a Boolean expression (4 bit equality comparator example)

Concurrent signal assignment using a Boolean expression (4 bit equality comparator example)

type boolean is (false, true) ; The result from evaluating a condition is type boolean. type boolean is (false, true) ; The leftmost literal in an enumeration listing is in position 0. Each enumeration type definition defines an ascending range of position numbers. Example: type std_ulogic is ('U', 'X', '0', '1', 'Z', 'W', 'L', 'H', '-') ; ' Z ' (with position number 4) iz greater than ' 1 ' (with position number 3

Conditional signal assignment statement (4 bit equality comparator example)

4-to-1 multiplexer using a Boolean expression library ieee; use ieee.std_logic_1164.all entity mux4to1 is port (c3, c2, c1, co: in std_logic; g_bar, b, a: in std_logic; y: out std_logic); end mux4to1; architecture dataflow of mux4to1 is begin y <= not g_bar and ( (not b and a and c0) or (not b and a and c1) or (b and not a and c2) or (b and a and c3)); end dataflow; What is STD_LOGIC?

Selected signal assignment statement with select_expression select signal_name <= value_expr_1 when choice_1, value_expr_2 when choice_2, value_expr_3 when choice_3, . . . value_expr_n when choice_n; The value of one and only one choice must equal the value of the select expression.

Selected signal assignment statement. Example mux4to1 library ieee; use ieee.std_logic_1164.all entity mux4to1 is port (c3, c2, c1, c0: in std_logic; g_bar, b, a: in std_logic; y: out std_logic); end mux4to1; architecture selected of mux4to1 is begin with std_logic_vector' (g_bar, b, a) select y <= c0 when "000", c1 when "001", c2 when "010", c3 when "011" '0' when others; -- default end selected; Here we use an aggregate (g_bar, b, a) in a select expression

Type qualification. Choices’ completeness We must explicitly specify the aggregat's (g_bar, b, a) type. This is accomplished using a type qualification ('): std_logic_vector' (g_bar, b, a). If we use this aggregate alone, the compiler cannot tell the aggregate’s type from the context. The compiler does not simply assume that an aggregate of std_logic elements is type std_logic_vector, since there are other array types, such as unsigned, that have std_logic elements (lect. 7)

Type qualification. Choices’ completeness To describe combinational logic, the choices listed in a selected signal assignment must be all inclusive. That is, they must include every possible value of the select expression. The last clause (default assignment) uses the keyword others to assign the value of 0 to y for the 725 values of the select expression not explicitly listed. 9**3=729, 729-4=725 y <= c0 when "000", c1 when "001", c2 when "010", c3 when "011" '0' when others;

Example mux4to1 library ieee ; use ieee.std_logic_1164.all ; entity mux4to1 is port (c3, c2, c1, co: in std_logic; g_bar, b, a: in std_logic; y: out std_logic); end mux4to1; architecture conditional of mux4to1 is signal tmp : std_logic_vector (2 downto o); begin tmp <= (g_bar, b, a); y <= c0 when tmp = "000" else c1 when tmp = "001" else c2 when tmp = "010" else c3 when tmp = "011" else '0' ; -- default assignment end conditional;

Avoiding implied latches The last value_expression must not have an associated when condition clause (default assignment). For example, let’s take previous description. If the conditional signal is written as: y <= c0 when tmp = "000" else c1 when tmp = "001" else c2 when tmp = "010" else c3 when tmp = "011" ; the VHDL interpretation of this construct is that, for the 4 specified values of tmp, a new value should be assigned to y. This implies that for all other values of tmp the y should retain its previous value. As a result, the synthesizer generates a latch at the output of the combinational logic to store the value of y.

Synthesised mux logic with undesired latch