VHDL Packages for Synthesis Base Types Standard bit types may be used Typically IEEE 1164 Std. types are used. CPE 528: Session #9

Size: px
Start display at page:

Download "VHDL Packages for Synthesis Base Types Standard bit types may be used Typically IEEE 1164 Std. types are used. CPE 528: Session #9"

Transcription

1 CPE 528: Session #9 Department of Electrical and Computer Engineering University of Alabama in Huntsville VHDL Packages for Synthesis Base Types Standard bit types may be used Typically IEEE 1164 Std. types are used std_ulogic type USE USE IEEE.std_logic_1164.ALL; Values U, X, W, and - are called metalogical values for synthesis TYPE std_ulogic IS IS ( 'U', -- Uninitialized 'X', -- --Forcing Unknown '0', -- --Forcing 0 '1', -- --Forcing 1 'Z', -- --High Impedance 'W', -- --Weak Unknown 'L', -- --Weak 0 'H', -- --Weak 1 '-' '-' -- --Don't care ); ); std_logic type - resolved std_ulogic type Outline Review: VHDL Packages for Synthesis Review: VHDL for Combinational Logic Synthesis VHDL for Sequential Logic Synthesis VHDL for RTL Level Synthesis Structural VHDL Implementation Technology Considerations Summary VHDL Packages for Synthesis Base Types (cont.) The std_logic_1164 package also contains: Vectors of std_ulogic and std_logic Subtypes of std_logic - X01, X01Z, UX01, UX10Z Logic functions with various arguments - std_ulogic, std_logic, std_logic_vector FUNCTION and (l,r : std_ulogic;) RETURN UX01; FUNCTION nand (l,r : std_ulogic;) RETURN UX01; FUNCTION or (l,r : std_ulogic;) RETURN UX01; FUNCTION nor (l,r : std_ulogic;) RETURN UX01; FUNCTION xor (l,r : std_ulogic;) RETURN UX01; FUNCTION xnor (l,r : std_ulogic;) return ux01; FUNCTION "not" (l,r : std_ulogic) RETURN UX01; Conversion functions FUNCTION To_bit(s:std_ulogic) RETURN bit; FUNCTION To_bitvector(s:std_ulogic_vector) RETURN bit_vector; FUNCTION To_StdULogic(b:bit) RETURN std_ulogic; 1

2 VHDL Packages for Synthesis Base Types (cont.) Clock edge functions FUNCTION rising_edge (SIGNAL s:std_ulogic) RETURN boolean; FUNCTION falling_edge (SIGNAL s:std_ulogic) RETURN boolean; Unknown functions FUNCTION Is_X (s:std_ulogic_vector) RETURN boolean; FUNCTION Is_X (s:std_logic_vector) RETURN boolean; FUNCTION Is_X (s:std_ulogic) RETURN boolean; IEEE Std Packages Numeric_Bit Type declarations for signed and unsigned numbers USE USE IEEE.numeric_bit.ALL; TYPE unsigned IS IS ARRAY (natural RANGE <> <> ) OF OF bit; TYPE signed IS IS ARRAY (natural RANGE <> <> ) OF OF bit; Arithmetic operators - various combinations of signed and unsigned arguments FUNCTION abs (arg:unsigned) RETURN unsigned; FUNCTION - - (arg:unsigned) RETURN unsigned; FUNCTION + + (l,r:unsigned) RETURN unsigned; FUNCTION - - (l,r:unsigned) RETURN unsigned; FUNCTION * * (l,r:unsigned) RETURN unsigned; FUNCTION / / (l,r:unsigned) RETURN unsigned; FUNCTION rem (l,r:unsigned) RETURN unsigned; FUNCTION mod (l,r:unsigned) RETURN unsigned; 04/02/2003 UAH-CPE528 7 VHDL Packages for Synthesis Arithmetic Packages All synthesis tools support some type of arithmetic packages Synopsis developed packages based on std_logic_1164 package - supported by many other synthesis tools std_logic_arith std_logic_signed std_logic_unsigned Actel synthesis tools support their own package asyl.arith IEEE has developed standard packages for synthesis IEEE Std Numeric_Bit Numeric_Std IEEE Std Packages Numeric_Bit Comparison operators - various combinations of signed and unsigned arguments FUNCTION > > (l,r:unsigned) RETURN boolean; FUNCTION < < (l,r:unsigned) RETURN boolean; FUNCTION <= (l,r:unsigned) RETURN boolean; FUNCTION >= (l,r:unsigned) RETURN boolean; FUNCTION = = (l,r:unsigned) RETURN boolean; FUNCTION /= (l,r:unsigned) RETURN boolean; Shift and rotate functions FUNCTION shift_left (arg:unsigned; count:natural) RETURN unsigned; FUNCTION shift_right (arg:unsigned; count:natural) RETURN unsigned; FUNCTION rotate_left (arg:unsigned; count:natural) RETURN unsigned; FUNCTION rotate_right (arg:unsigned; count:natural) RETURN unsigned; FUNCTION sll sll (arg:unsigned; count:natural) RETURN unsigned; FUNCTION slr slr (arg:unsigned; count:natural) RETURN unsigned; FUNCTION rol rol (arg:unsigned; count:natural) RETURN unsigned; FUNCTION ror ror (arg:unsigned; count:natural) RETURN unsigned; 04/02/2003 UAH-CPE /02/2003 UAH-CPE

3 IEEE Std Packages Numeric_Bit Resize functions FUNCTION resize (arg:unsigned;new_size:natural) RETURN unsigned; FUNCTION resize (arg:signed;new_size:natural) RETURN signed; Conversion functions FUNCTION to_integer (arg:unsigned) RETURN natural; FUNCTION to_unsigned (arg,size:natural) RETURN unsigned; Logical operators FUNCTION not (l:unsigned) RETURN unsigned; FUNCTION and (l,r:unsigned) RETURN unsigned; FUNCTION or (l,r:unsigned) RETURN unsigned; FUNCTION nand (l,r:unsigned) RETURN unsigned; FUNCTION nor (l,r:unsigned) RETURN unsigned; FUNCTION xnor (l,r:unsigned) RETURN unsigned; Edge detection functions FUNCTION rising_edge(signal s:bit) RETURN boolean; FUNCTION falling_edge(signal s:bit) RETURN boolean; 04/02/2003 UAH-CPE528 9 Outline VHDL Packages for Synthesis VHDL for Combinational Logic Synthesis Types Attributes Concurrent signal assignment statements Operators Processes If statements Case statements Loops Procedures and functions Tri state logic Use of don t cares After clauses Inferring latches Problems to avoid VHDL for Sequential Logic Synthesis VHDL for RTL Level Synthesis IEEE Std Packages Numeric_Std Similar to Numeric_Bit package using std_logic_1164 types Signed and unsigned type declarations Aritmetic operators Comparison operators Shift and rotate functions Resize functions Conversion functions Logical operators Match functions FUNCTION std_match (l,r:std_ulogic) RETURN boolean; FUNCTION std_match (l,r:unsigned) RETURN boolean; Translation functions USE USE IEEE.numeric_std.ALL; FUNCTION to_01 (s:unsigned; xmap:std_logic := := 0 ) RETURN unsigned; 04/02/2003 UAH-CPE Types Scalar types Enumeration types are supported Bit, Boolean, and Std_Ulogic map to single bits Mapping of other types will be made by the tool unless the ENUM_ENCODING attribute is used Character type is suppored Severity_level type is ignored Integer type, Natural, and Positive are supported A subtype with a descrete range should be used or the default 32 bit length will be synthesized Physical types (e.g., time) are ignored Floating point type is ignored - references to floating point objects can occur only within ignored constructs, e.g., After clauses, etc. 04/02/2003 UAH-CPE

4 Types (cont.) Array types are supported Bounds must be specified directly or indirectly as static values of an integer type Element subtype must denote a scalar type or a one dimensional vector of an enumerated type that denotes single bits TYPE TYPE integer_array IS IS ARRAY(natural RANGE RANGE 7 DOWNTO 0) 0) OF OF integer; TYPE TYPE boolean_array IS IS ARRAY(integer RANGE RANGE <>) <>) OF OF boolean; SIGNAL bool_sig : boolean_array(-1 to to 1); 1); Record types are supported Access types are ignored File types are ignored File objects and file operations are not supported Concurrent Signal Assignment Statements Simple concurrent signal assignment statements are supported ENTITY csa csais is END END csa; csa; ARCHITECTURE behavior OF OF csais y <= <= a NOR NOR b; b; ENTITY aoi_csa is is END END aoi_csa; ARCHITECTURE behavior OF OF aoi_csais SIGNAL sig1,sig2 : std_logic; sig1 sig1 <= <= a AND AND b; b; sig2 sig2 <= <= c OR OR sig1; sig1; y <= <= NOT NOT sig2; sig2; 04/02/2003 UAH-CPE /02/2003 UAH-CPE Attributes The following predefined attributes for types are supported: t BASE t LEFT t RIGHT t HIGH t LOW The following predefined attributes for array objects are supported: a LEFT a RIGHT a HIGH a LOW a RANGE a REVERSE_RANGE a LENGTH The following predefined attributes for signals are supported s STABLE s EVENT User defined attributes other than ENUM_ENCODING are NOT supported Conditional Signal Assignment Statements Concurrent conditional signal assignment statements are supported - must end in else library clause IEEE; IEEE; ENTITY mux2 mux2 is is sel sel : IN IN std_logic; END END mux2; mux2; ARCHITECTURE behavior OF OF mux2 mux2 IS IS y <= <= a WHEN WHEN (sel (sel = '0') '0') ELSE ELSE b WHEN WHEN (sel (sel = '1') '1') ELSE ELSE 'X'; 'X'; 04/02/2003 UAH-CPE /02/2003 UAH-CPE

5 Selected Signal Assignment Statements Concurrent selected signal assignment statements are supported ENTITY mux4 mux4 is is d : IN IN std_logic; sel sel : IN IN std_logic_vector(1 DOWNTO 0); 0); END END mux4; mux4; ARCHITECTURE behavior OF OF mux4 mux4 IS IS WITH WITH sel selselect y <= <= a WHEN WHEN "00", "00", b WHEN WHEN "01", "01", c WHEN WHEN "10", "10", d WHEN WHEN "11", "11", 'X' 'X' WHEN WHEN OTHERS; 04/02/2003 UAH-CPE Operators (cont.) Comparison operators - >, <, <=, >=, =, /= use use IEEE.numeric_std.all; ENTITY compare is is PORT(a : IN IN unsigned(3 DOWNTO 0); 0); b : IN IN unsigned(3 DOWNTO 0); 0); aleb aleb : OUT OUT boolean); END END compare; ARCHITECTURE behavior OF OF compare IS IS aleb aleb <= <= (a (a <= <= b); b); 04/02/2003 UAH-CPE Operators Generally, if the numeric_bit and numeric_std packages are supported, the operators within them are supported Arithmetic operators - abs, +, -, *, /, rem, mod use use IEEE.numeric_std.all; ENTITY divider is is PORT(divisor : IN IN unsigned(1 DOWNTO 0); 0); dividend : IN IN unsigned(1 DOWNTO 0); 0); quotient : OUT OUT unsigned(1 DOWNTO 0)); 0)); END END divider; ARCHITECTURE behavior OF OF divider IS IS quotient <= <= dividend / divisor; Operators (cont.) Shift and conversion operators - shift_left, shift_right, rotate_left, rotate_right, resize, to_integer, library to_unsigned IEEE; library IEEE; use use IEEE.numeric_std.all; ENTITY shift_4 is is PORT(a : IN IN unsigned(3 DOWNTO 0); 0); b : IN IN unsigned(1 DOWNTO 0); 0); y : OUT OUT unsigned(3 DOWNTO 0)); 0)); END END shift_4; ARCHITECTURE behavior OF OF shift_4 IS IS y <= <= shift_left(a,to_integer(b)); 04/02/2003 UAH-CPE /02/2003 UAH-CPE

6 Process Statements Process statements are supported Postponed processes (or postponed concurrent signal assignment statements) are NOT supported Process statement can have either a sensitivity list or a WAIT statement Sensitivity list is ignored for synthesis (by most tools) - thus, to avoid simulation mismatches, all signals which appear on the RHS should be in the sensitivity list Only one WAIT statement per process is allowed and it must be the first statement in the process after BEGIN Only the WAIT UNTIL syntax of the WAIT statement is supported WAIT UNTIL input1 = 1 ; WAIT UNTIL clock EVENT and and clock = 1 ; 04/02/2003 UAH-CPE Process Statements Incomplete Sensitivity List ENTITY aoi_process is is END END aoi_process; ARCHITECTURE behavior OF OF aoi_process IS IS SIGNAL sig1 sig1 : std_logic; comb comb : PROCESS(a,b,c) c sig1 0 sig1 sig1 <= <= a AND AND b; y U b; y <= <= not(sig1 or or c); c); /02/2003 UAH-CPE a b Process Statements Example ENTITY aoi_process is is END END aoi_process; ARCHITECTURE behavior OF OF aoi_process IS IS SIGNAL sig1 sig1 : std_logic; comb comb : PROCESS(a,b,c,sig1) sig1 sig1 <= <= a AND AND b; b; y <= <= not(sig1 or or c); c); Sequential Signal Assignment Statements Various types of signal assignment statements inside a process statement (sequential signal assignment statements) are supported IF statements Case statements Loop statement Only For loops supported Bounds must be specified as static values of an integer type Exit and Next statements supported (without lables) 04/02/2003 UAH-CPE /02/2003 UAH-CPE

7 Sequential IF Statements IF statements are supported ENTITY xor_process is is END END xor_process; ARCHITECTURE behavior OF OF xor_process IS IS comb comb : PROCESS(a,b) IF((a IF((a = '1' '1' and and b = '0') '0') OR OR (a (a = '0' '0' and and b = '1')) '1')) THEN THEN y <= <= '1'; '1'; ELSE ELSE y <= <= '0'; '0'; 04/02/2003 UAH-CPE Sequential Loop Statements Only For loops with integer range are library supported IEEE; library IEEE; IEEE.std_logic_1164.all; ENTITY shift4 is ENTITY shift4 is PORT(mode : IN std_logic; PORT(mode IN std_logic; shift_in : IN std_logic; shift_in IN std_logic; a : IN std_logic_vector(4 DOWNTO 1); IN std_logic_vector(4 DOWNTO ARCHITECTURE 1); behavior OF shift4 IS DOWNTO ARCHITECTURE 1); behavior OF shift4 IS y : OUT std_logic_vector(4 DOWNTO SIGNAL 1); in_temp : std_logic_vector(5 OUT std_logic_vector(4 DOWNTO 0); shift_out : OUT std_logic); SIGNAL in_temp std_logic_vector(5 DOWNTO 0); shift_out OUT std_logic); SIGNAL out_temp : std_logic_vector(5 DOWNTO 1); END shift4; SIGNAL out_temp std_logic_vector(5 DOWNTO 1); END shift4; in_temp(0) <= shift_in; in_temp(0) <= shift_in; in_temp(4 DOWNTO 1) <= a; in_temp(4 DOWNTO 1) <= a; in_temp(5) <= '0'; in_temp(5) <= '0'; comb : PROCESS(mode,in_temp,a) comb PROCESS(mode,in_temp,a) FOR i IN 1 TO 5 LOOP FOR IN TO LOOP IF(mode = '0') THEN IF(mode '0') THEN out_temp(i) <= in_temp(i-1); out_temp(i) <= in_temp(i-1); ELSE ELSE out_temp(i) <= in_temp(i); out_temp(i) <= in_temp(i); END IF; END IF; END LOOP; END LOOP; END PROCESS comb; END PROCESS comb; y <= out_temp(4 DOWNTO 1); <= out_temp(4 DOWNTO 1); shift_out <= out_temp(5); shift_out <= out_temp(5); END behavior; END behavior; 04/02/2003 UAH-CPE Sequential Case Statements ENTITY mux4_process is is d : IN IN std_logic; sel sel : IN IN std_logic_vector(1 DOWNTO 0); 0); END END mux4_process; ARCHITECTURE behavior OF OF mux4_process IS IS Case statements are supported Choices which include metalogical values are never taken comb comb : PROCESS(a,b,c,d,sel) CASE CASE sel selis IS WHEN WHEN "00" "00" => => y <= <= a; a; WHEN WHEN "01" "01" => => y <= <= b; b; WHEN WHEN "10" "10" => => y <= <= c; c; WHEN WHEN "11" "11" => => y <= <= d; d; WHEN WHEN OTHERS => => y <= <= 'X'; 'X'; END END CASE; CASE; 04/02/2003 UAH-CPE Procedures and Functions Procedures and Functions are supported - with limitations to allowed statement types Procedures and functions may be in a package or in the declarative part of the architecture LIBRARY ieee; ieee; USE USE ieee.std_logic_1164.all; USE USE ieee.numeric_std.all; PACKAGE logic_package IS IS FUNCTION majority(in1, in2, in2, in3 in3 : std_logic) RETURN std_logic; PROCEDURE decode(signal input input : IN IN std_logic_vector(1 DOWNTO 0); 0); SIGNAL output : OUT OUT std_logic_vector(3 DOWNTO 0)); 0)); END END logic_package; 04/02/2003 UAH-CPE

8 Procedures and Functions (cont.) Using Procedures and Functions PACKAGE BODY BODY logic_package IS IS FUNCTION majority(in1, in2, in2, in3 in3 : std_logic) RETURN std_logic IS IS VARIABLE result : std_logic; IF((in1 = '1' '1' and and in2 in2 = '1') '1') or or (in2 (in2 = '1' '1' and and in3 in3 = '1') '1') or or (in1 (in1 = '1' '1' and and in3 in3 = '1')) '1')) THEN THEN result := :='1'; ELSIF((in1 = '0' '0' and and in2 in2 = '0') '0') or or (in2 (in2 = '0' '0' and and in3 in3 = '0') '0') or or (in1 (in1 = '0' '0' and and in3 in3 = '0')) '0')) THEN THEN result := :='0'; ELSE ELSE result := :='X'; RETURN result; END END majority; LIBRARY ieee; ieee; USE USE ieee.std_logic_1164.all; USE USE ieee.numeric_std.all; USE USE work.logic_package.all; ENTITY voter voter IS IS END END voter; ARCHITECTURE maj majof OF voter voter IS IS y <= <= majority(a,b,c); END END maj; maj; 04/02/2003 UAH-CPE /02/2003 UAH-CPE Procedures and Functions (cont.) Using Procedures and Functions (cont.) PROCEDURE decode(signal input input : IN IN std_logic_vector(1 DOWNTO 0); 0); SIGNAL output : OUT OUT std_logic_vector(3 DOWNTO 0)) 0)) IS IS CASE CASE input input IS IS WHEN WHEN "00" "00" => => output <= <= "0001"; WHEN WHEN "01" "01" => => output <= <= "0010"; WHEN WHEN "10" "10" => => output <= <= "0100"; WHEN WHEN "11" "11" => => output <= <= "1000"; WHEN WHEN OTHERS => => output <= <= "XXXX"; END END CASE; CASE; END END decode; END END logic_package; LIBRARY ieee; ieee; USE USE ieee.std_logic_1164.all; USE USE ieee.numeric_std.all; USE USE work.logic_package.all; ENTITY decoder IS IS PORT(y : IN IN std_logic_vector(1 DOWNTO 0); 0); g : OUT OUT std_logic_vector(3 DOWNTO 0)); 0)); END END decoder; ARCHITECTURE dec decof OF decoder IS IS comb comb : PROCESS(y) decode(y,g); END END dec; dec; 04/02/2003 UAH-CPE /02/2003 UAH-CPE

9 Tri-State Logic Tri-state logic is infered when an object is assigned an IEEE Std value Z ENTITY tri_state4 is is PORT(enable : IN IN std_logic; a : IN IN std_logic_vector(3 DOWNTO 0); 0); y : OUT OUT std_logic_vector(3 DOWNTO 0)); 0)); END END tri_state4; ARCHITECTURE behavior OF OF tri_state4 IS IS y <= <= a WHEN WHEN (enable = '1') '1') ELSE ELSE "ZZZZ"; 04/02/2003 UAH-CPE After Clauses Although not defined by the language, most simulator s waveform windows do not show VHDL delta cycles adequately, if at all Debugging large behavioral simulations before synthesis can be difficult if no delays are used - everything appears to happen simultaneously List windows typically show delta cycles, but can be difficult to interpret The solution is to put dummy delays in the behavioral descriptions using After clauses to spread out the events After clauses are ignored for synhtesis CONSTANT delay : TIME := := 5 ns; ns; output <= <= input + 1 AFTER delay; 04/02/2003 UAH-CPE Use of Don t Cares ( X s) IEEE Std values of X or - can be used to specify don t care conditions ENTITY not_xor is is END END not_xor; ARCHITECTURE behavior OF OF not_xor IS IS comb comb : PROCESS(a,b) IF((a IF((a = '1' '1' and and b = '0') '0') OR OR (a (a = '0' '0' and and b = '1')) '1')) THEN THEN y <= <= '1'; '1'; ELSE ELSE y <= <= 'X'; 'X';-- --could also also be be /02/2003 UAH-CPE Inferring Latches If signals or variables are not assigned values in some conditional expressions of IF or Case statements, level-sensitive sequential logic might result ARCHITECTURE behavior OF OF mux3_seq IS IS comb comb : PROCESS(a,b,c,sel) ENTITY mux3_seq is is CASE CASE sel selis IS WHEN WHEN "00" "00" => => y <= <= a; a; WHEN WHEN "01" "01" => => y <= <= b; b; WHEN WHEN "10" "10" => => y <= <= c; c; sel sel : IN IN std_logic_vector(1 DOWNTO 0); 0); WHEN WHEN OTHERS => => --empty END END CASE; CASE; END END mux3_seq; 04/02/2003 UAH-CPE

10 Avioding Latches ENTITY mux3 mux3 is is sel sel : IN IN std_logic_vector(1 DOWNTO 0); 0); END END mux3; mux3; ARCHITECTURE behavior OF OF mux3 mux3 IS IS comb comb : PROCESS(a,b,c,sel) CASE CASE sel selis IS WHEN WHEN "00" "00" => => y <= <= a; a; WHEN WHEN "01" "01" => => y <= <= b; b; WHEN WHEN "10" "10" => => y <= <= c; c; WHEN WHEN OTHERS => => y <= <= 'X'; 'X'; END END CASE; CASE; Assigning values of don t care ( X or - ) in these cases can avoid this 04/02/2003 UAH-CPE Problems to Avoid Synthesizing Asynchronous State Machines! ARCHITECTURE rtlof pc_comb2 IS IS SIGNAL pc pc : unsigned(3 DOWNTO 0); 0); use use IEEE.numeric_std.all; one one : PROCESS(data_in, cntrl, pc) pc) ENTITY pc_comb2 is is PORT(dat_in : IN IN unsigned(3 DOWNTO 0); 0); CASE CASE cntrl cntrlis IS cntrl cntrl : IN IN std_logic; WHEN data_out : OUT OUT unsigned(3 DOWNTO 0)); WHEN '1' '1' => => pc pc <= <= (pc (pc + "0001"); 0)); WHEN WHEN '0' '0' => => pc pc <= <= data_in; END END pc_comb2; WHEN WHEN OTHERS => => pc pc <= <= "XXXX"; END END CASE; CASE; END END PROCESS one; one; dat_out <= <= pc; pc; END END rtl; rtl; 04/02/2003 UAH-CPE Problems to Avoid Inferring Latches in Complex Behaviors ARCHITECTURE rtl rtlof OF pc_comb IS IS use use IEEE.std_logic_1164.ALL; SIGNAL pc pc : unsigned(3 DOWNTO 0); 0); use use IEEE.numeric_std.ALL; one one : PROCESS(dat_in, cntrl, pc) pc) ENTITY pc_comb IS IS PORT(data_in : IN IN unsigned(3 DOWNTO 0); 0); CASE CASE cntrl cntrlis IS cntrl cntrl : IN IN unsigned(1 DOWNTO 0); 0); WHEN WHEN "01" "01" => => pc pc <= <= (pc (pc + "0001"); data_out : OUT OUT unsigned(3 DOWNTO 0)); 0)); WHEN WHEN "10" "10" => => pc pc <= <= pc; pc; END END pc_comb; WHEN WHEN OTHERS => => pc pc <= <= data_in; END END CASE; CASE; END END PROCESS one; one; DATA_OUT <= <= PC; PC; END END rtl; rtl; Level Sensitive D Latch Use IF statement without Else clause ENTITY d_latch is is PORT(d : IN IN std_logic; clk clk : IN IN std_logic; q : INOUT INOUT std_logic; qn qn : OUT OUT std_logic); END END d_latch; ARCHITECTURE behavior OF OF d_latch IS IS seq seq : PROCESS(d,clk) IF(clk = '1') '1') THEN THEN q <= <= d; d; END END PROCESS seq; seq; qn qn <= <= not not q; q; 04/02/2003 UAH-CPE /02/2003 UAH-CPE

11 Master-Slave D Latch (D Flip-Flop) ENTITY ms_latch is is PORT(d : IN IN std_logic; clk clk : IN IN std_logic; q : INOUT INOUT std_logic; qn qn : OUT OUT std_logic); END END ms_latch; ARCHITECTURE behavior OF OF ms_latch IS IS SIGNAL q_int q_int : std_logic; seq1 seq1 : PROCESS(d,clk) Optimize IF(clk = '1') '1') THEN THEN q_int q_int <= <= d; d; END END PROCESS seq1; seq1; seq2 seq2 : PROCESS(q_int,clk) IF(clk = '0') '0') THEN THEN q <= <= q_int; END END PROCESS seq2; seq2; qn qn <= <= not not q; q; 04/02/2003 UAH-CPE Edge Sensitive D Flip-Flop (cont.) Wait statement can be used ARCHITECTURE behavior OF OF d_ff_w IS IS seq ENTITY d_ff_w is seq : PROCESS is PORT(d : IN IN std_logic; WAIT WAIT UNTIL UNTIL clk clk = 1 ; 1 ; clk clk : IN IN std_logic; q <= <= d; d; q : INOUT INOUT std_logic; END qn qn : OUT OUT std_logic); END PROCESS seq; seq; qn END END d_ff_w; qn <= <= not not q; q; ARCHITECTURE behavior OF OF d_ff_w IS IS seq seq : PROCESS WAIT WAIT UNTIL UNTIL rising_edge(clk); q <= <= d; d; END END PROCESS seq; seq; qn qn <= <= not not q; q; 04/02/2003 UAH-CPE Edge Sensitive D Flip-Flop Clocks must be of BIT or STD_LOGIC type - metalogic values not allowed Rising_edge() and Falling_edge() functions can be used to specify clock edge ENTITY d_ff d_ff is is PORT(d : IN IN std_logic; clk clk : IN IN std_logic; q : INOUT INOUT std_logic; qn qn : OUT OUT std_logic); END END d_ff; d_ff; ARCHITECTURE behavior OF OF d_ff d_ff IS IS seq seq : PROCESS(clk) IF(rising_edge(clk)) THEN THEN q <= <= d; d; END END PROCESS seq; seq; qn qn <= <= not not q; q; 04/02/2003 UAH-CPE Edge Sensitive Flip-Flops ENTITY d_ff_pc is is PORT(d : IN IN std_logic; clk clk : IN IN std_logic; pre pre : IN IN std_logic; clr clr : IN IN std_logic; q : INOUT INOUT std_logic; qn qn : OUT OUT std_logic); END END d_ff_pc; Preset and clear functions can be added Asynchronous with respect to the clock ARCHITECTURE behavior OF OF d_ff_pc IS IS seq seq : PROCESS(clk,pre,clr) IF(pre = '0') '0') THEN THEN q <= <= '1'; '1'; ELSIF(clr = '0') '0') THEN THEN q <= <= '0'; '0'; ELSIF(rising_edge(clk)) THEN THEN q <= <= d; d; END END PROCESS seq; seq; qn qn <= <= not not q; q; 04/02/2003 UAH-CPE

12 Edge Sensitive Flip-Flops ENTITY d_ff_spc is is PORT(d : IN IN std_logic; clk clk : IN IN std_logic; pre pre : IN IN std_logic; clr clr : IN IN std_logic; q : INOUT INOUT std_logic; qn qn : OUT OUT std_logic); END END d_ff_spc; Preset and clear functions can be added Synchronous with respect to the clock ARCHITECTURE behavior OF OF d_ff_spc IS IS seq seq : PROCESS(clk) IF(rising_edge(clk)) THEN THEN IF(pre = '0') '0') THEN THEN q <= <= '1'; '1'; ELSIF(clr = '0') '0') THEN THEN q <= <= '0'; '0'; ELSE ELSE q <= <= d; d; END END PROCESS seq; seq; qn qn <= <= not not q; q; 04/02/2003 UAH-CPE Mealy and Moore State Machine Models A state machine has three basic parts Next State Logic Output Logic Memory The most straight-forward way to code a synthesizable state machine is to use one process per function Primary Inputs Present State Mealy Machine Model Output Combinational Logic Next State Combinational Logic Memory Primary Outputs Next State Primary Inputs Present State Moore Machine Model Output Combinational Logic Next State Combinational Logic 04/02/2003 UAH-CPE Memory Primary Outputs Next State Finite State Machine Synthesis State machines can be modeled as a combinational portion and a sequential portion Both Mealy and Moore type state machines can be described Most synthesis tools employ special algorithms to minimize state machines - thus standard procedures must be used to enable the tool to recognize the state machine Huffman FSM Model Primary Inputs Combinational Logic Primary Outputs Present State Memory Next State 04/02/2003 UAH-CPE

Files Notes on VHDL Synthesis. File input/output in VHDL Used in test benches. VHDL provides a standard TEXTIO package

Files Notes on VHDL Synthesis. File input/output in VHDL Used in test benches. VHDL provides a standard TEXTIO package Outline Files Notes on VHDL Synthesis CPE 528: Session #8 Department of Electrical and Computer Engineering University of Alabama in Huntsville 30/01/2003 UAH -CPE528 2 Files File input/output in VHDL

More information

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden Synthesis from VHDL Krzysztof Kuchcinski Krzysztof.Kuchcinski@cs.lth.se Department of Computer Science Lund Institute of Technology Sweden March 23, 2006 Kris Kuchcinski (LTH) Synthesis from VHDL March

More information

CPE/EE 422/522. Chapter 8 - Additional Topics in VHDL. Dr. Rhonda Kay Gaede UAH. 8.1 Attributes - Signal Attributes that return a value

CPE/EE 422/522. Chapter 8 - Additional Topics in VHDL. Dr. Rhonda Kay Gaede UAH. 8.1 Attributes - Signal Attributes that return a value CPE/EE 422/522 Chapter 8 - Additional Topics in VHDL Dr. Rhonda Kay Gaede UAH 1 8.1 Attributes - Signal Attributes that return a value A event true if a has just occurred A active true if A has, even if

More information

VHDL And Synthesis Review

VHDL And Synthesis Review VHDL And Synthesis Review VHDL In Detail Things that we will look at: Port and Types Arithmetic Operators Design styles for Synthesis VHDL Ports Four Different Types of Ports in: signal values are read-only

More information

BASIC VHDL LANGUAGE ELEMENTS AND SEMANTICS. Lecture 7 & 8 Dr. Tayab Din Memon

BASIC VHDL LANGUAGE ELEMENTS AND SEMANTICS. Lecture 7 & 8 Dr. Tayab Din Memon BASIC VHDL LANGUAGE ELEMENTS AND SEMANTICS Lecture 7 & 8 Dr. Tayab Din Memon Outline Data Objects Data Types Operators Attributes VHDL Data Types VHDL Data Objects Signal Constant Variable File VHDL Data

More information

COVER SHEET: Total: Regrade Info: 1 (8 points) 2 ( 8 points) 3 (16 points) 4 (16 points) 5 (16 points) 6 (16 points) 7 (16 points) 8 (8 points)

COVER SHEET: Total: Regrade Info: 1 (8 points) 2 ( 8 points) 3 (16 points) 4 (16 points) 5 (16 points) 6 (16 points) 7 (16 points) 8 (8 points) EEL 4712 Midterm 1 Spring 2010 VERSION 1 Name: UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer

More information

Summary of basic structures

Summary of basic structures VHDL Summary of basic structures René Beuchat rene.beuchat@epfl.ch rene.beuchat@hesge.ch 1 Resume Lexical elements Reserved words Declarations Type declaration Subtype declaration Constant declaration

More information

Outline CPE 626. Advanced VLSI Design. Lecture 4: VHDL Recapitulation (Part 2) Signals. Variables. Constants. Variables vs.

Outline CPE 626. Advanced VLSI Design. Lecture 4: VHDL Recapitulation (Part 2) Signals. Variables. Constants. Variables vs. CPE 626 Lecture 4: VHDL Recapitulation (Part 2) Aleksandar Milenkovic http://www.ece.uah.edu/~milenka http://www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Assistant Professor Electrical and

More information

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

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ CSCI 250 - Lab 3 VHDL Syntax Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ Objectives 1. Learn VHDL Valid Names 2. Learn the presentation of Assignment and Comments 3. Learn Modes, Types, Array,

More information

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

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009 2065-15 Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis 26 October - 20 November, 2009 FPGA Architectures & VHDL Introduction to Synthesis Nizar Abdallah ACTEL Corp.2061

More information

Introduction to VHDL. Main language concepts

Introduction to VHDL. Main language concepts Introduction to VHDL VHSIC (Very High Speed Integrated Circuit) Hardware Description Language Current standard is IEEE 1076-1993 (VHDL-93). Some tools still only support VHDL-87. Tools used in the lab

More information

Hardware Description Language VHDL (1) Introduction

Hardware Description Language VHDL (1) Introduction Hardware Description Language VHDL (1) Introduction Digital Radiation Measurement and Spectroscopy NE/RHP 537 Introduction Hardware description language (HDL) Intended to describe circuits textually, for

More information

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

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006 310/1780-10 ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006 VHDL & FPGA - Session 2 Nizar ABDALLH ACTEL Corp. 2061 Stierlin Court

More information

VHDL for FPGA Design. by : Mohamed Samy

VHDL for FPGA Design. by : Mohamed Samy VHDL for FPGA Design by : Mohamed Samy VHDL Vhdl is Case insensitive myvar = myvar = MYVAR IF = if = if Comments start with -- Comments can exist anywhere in the line Semi colon indicates the end of statements

More information

Outline CPE 626. Advanced VLSI Design. Lecture 3: VHDL Recapitulation. Intro to VHDL. Intro to VHDL. Entity-Architecture Pair

Outline CPE 626. Advanced VLSI Design. Lecture 3: VHDL Recapitulation. Intro to VHDL. Intro to VHDL. Entity-Architecture Pair Outline CPE 626 Lecture 3: VHDL Recapitulation Aleksandar Milenkovic http://www.ece.uah.edu/~milenka http://www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Assistant Professor Electrical and Computer

More information

Introduction to VHDL

Introduction to VHDL Introduction to VHDL Agenda Introduce VHDL Basic VHDL constructs Implementing circuit functions Logic, Muxes Clocked Circuits Counters, Shifters State Machines FPGA design and implementation issues FPGA

More information

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group Hardware Modeling VHDL Syntax Vienna University of Technology Department of Computer Engineering ECS Group Contents Identifiers Types & Attributes Operators Sequential Statements Subroutines 2 Identifiers

More information

VHDL Part 2. What is on the agenda? Basic VHDL Constructs. Examples. Data types Objects Packages and libraries Attributes Predefined operators

VHDL Part 2. What is on the agenda? Basic VHDL Constructs. Examples. Data types Objects Packages and libraries Attributes Predefined operators VHDL Part 2 Some of the slides are taken from http://www.ece.uah.edu/~milenka/cpe428-02s/ What is on the agenda? Basic VHDL Constructs Data types Objects Packages and libraries Attributes Predefined operators

More information

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013 MARIE CURIE IAPP: FAST TRACKER FOR HADRON COLLIDER EXPERIMENTS 1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013 Introduction to VHDL Calliope-Louisa Sotiropoulou PhD Candidate/Researcher Aristotle University

More information

Basic Language Constructs of VHDL

Basic Language Constructs of VHDL Basic Language Constructs of VHDL Chapter 3 1 Outline 1. Basic VHDL program 2. Lexical elements and program format 3. Objects 4. Data type and operators Chapter 3 2 1. Basic VHDL program Chapter 3 3 Design

More information

Design units can NOT be split across different files

Design units can NOT be split across different files Skeleton of a Basic VHDL Program This slide set covers the components to a basic VHDL program, including lexical elements, program format, data types and operators A VHDL program consists of a collection

More information

Outline. CPE/EE 422/522 Advanced Logic Design L07. Review: JK Flip-Flop Model. Review: VHDL Program Structure. Review: VHDL Models for a MUX

Outline. CPE/EE 422/522 Advanced Logic Design L07. Review: JK Flip-Flop Model. Review: VHDL Program Structure. Review: VHDL Models for a MUX Outline CPE/EE 422/522 Advanced Logic Design L07 Electrical and Computer Engineering University of Alabama in Huntsville What we know How to model Combinational Networks in VHDL Structural, Dataflow, Behavioral

More information

Very High Speed Integrated Circuit Har dware Description Language

Very High Speed Integrated Circuit Har dware Description Language Very High Speed Integrated Circuit Har dware Description Language Industry standard language to describe hardware Originated from work in 70 s & 80 s by the U.S. Departm ent of Defence Root : ADA Language

More information

VHDL: RTL Synthesis Basics. 1 of 59

VHDL: RTL Synthesis Basics. 1 of 59 VHDL: RTL Synthesis Basics 1 of 59 Goals To learn the basics of RTL synthesis. To be able to synthesize a digital system, given its VHDL model. To be able to relate VHDL code to its synthesized output.

More information

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential

More information

Contents. Appendix D VHDL Summary Page 1 of 23

Contents. Appendix D VHDL Summary Page 1 of 23 Appendix D VHDL Summary Page 1 of 23 Contents Appendix D VHDL Summary...2 D.1 Basic Language Elements...2 D.1.1 Comments...2 D.1.2 Identifiers...2 D.1.3 Data Objects...2 D.1.4 Data Types...2 D.1.5 Data

More information

Building Blocks. Entity Declaration. Entity Declaration with Generics. Architecture Body. entity entity_name is. entity register8 is

Building Blocks. Entity Declaration. Entity Declaration with Generics. Architecture Body. entity entity_name is. entity register8 is Building Blocks Entity Declaration entity entity_name is [signal] identifier {, identifier}: [mode] signal_type {; [signal] identifier {, identifier}: [mode] signal_type}); end [entity ] [entity_name];

More information

Lecture 12 VHDL Synthesis

Lecture 12 VHDL Synthesis CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?

More information

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

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University Hardware description language (HDL) Intended to describe circuits textually, for a computer to read Evolved starting in the 1970s and 1980s Popular languages today include: VHDL Defined in 1980s by U.S.

More information

Inthis lecture we will cover the following material:

Inthis lecture we will cover the following material: Lecture #8 Inthis lecture we will cover the following material: The standard package, The std_logic_1164 Concordia Objects & data Types (Signals, Variables, Constants, Literals, Character) Types and Subtypes

More information

Declarations. Lexical elements. Type declaration Subtype declaration Constant declaration Signal declaration Variable declaration.

Declarations. Lexical elements. Type declaration Subtype declaration Constant declaration Signal declaration Variable declaration. Lexical elements Declarations Reserved words Type declaration Subtype declaration Constant declaration Signal declaration Variable declaration page 1 page 3 Type declaration Reserved words architecture

More information

Computer-Aided Digital System Design VHDL

Computer-Aided Digital System Design VHDL بس م اهلل الر حم ن الر حی م Iran University of Science and Technology Department of Computer Engineering Computer-Aided Digital System Design VHDL Ramin Rajaei ramin_rajaei@ee.sharif.edu Modeling Styles

More information

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing Recap Moore FSM Example CprE / ComS 583 Reconfigurable Computing Moore FSM that recognizes sequence 10 0 1 0 1 S0 / 0 S1 / 0 1 S2 / 1 Prof. Joseph Zambreno Department of Electrical and Computer Engineering

More information

EEL 4783: Hardware/Software Co-design with FPGAs

EEL 4783: Hardware/Software Co-design with FPGAs EEL 4783: Hardware/Software Co-design with FPGAs Lecture 9: Short Introduction to VHDL* Prof. Mingjie Lin * Beased on notes of Turfts lecture 1 What does HDL stand for? HDL is short for Hardware Description

More information

VHDL simulation and synthesis

VHDL simulation and synthesis VHDL simulation and synthesis How we treat VHDL in this course You will not become an expert in VHDL after taking this course The goal is that you should learn how VHDL can be used for simulation and synthesis

More information

Subprograms, Packages, and Libraries

Subprograms, Packages, and Libraries Subprograms, Packages, and Libraries Sudhakar Yalamanchili, Georgia Institute of Technology ECE 4170 (1) function rising_edge (signal clock: std_logic) return boolean is declarative region: declare variables

More information

Sequential Logic - Module 5

Sequential Logic - Module 5 Sequential Logic Module 5 Jim Duckworth, WPI 1 Latches and Flip-Flops Implemented by using signals in IF statements that are not completely specified Necessary latches or registers are inferred by the

More information

5. 0 VHDL OPERATORS. The above classes are arranged in increasing priority when parentheses are not used.

5. 0 VHDL OPERATORS. The above classes are arranged in increasing priority when parentheses are not used. Filename= ch5.doc 5. 0 VHDL OPERATORS There are seven groups of predefined VHDL operators: 1. Binary logical operators: and or nand nor xor xnor 2. Relational operators: = /= < >= 3. Shifts operators:

More information

VHDL: Code Structure. 1

VHDL: Code Structure. 1 VHDL: Code Structure talarico@gonzaga.edu 1 Mo:va:on for HDL- based design Standard Technology/vendor independent Portable and Reusable talarico@gonzaga.edu 2 Altera s Design Flow (RTL) RTL Generic Boolean

More information

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks. Outline CPE/EE 422/522 Advanced Logic Design L05 Electrical and Computer Engineering University of Alabama in Huntsville What we know Combinational Networks Sequential Networks: Basic Building Blocks,

More information

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

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Cengage Learning Design Flow 418_02 2 VHDL Modules 418_02 3 VHDL Libraries library IEEE; use IEEE.std_logic_1164.all; std_logic Single-bit

More information

Hardware Modeling. VHDL Basics. ECS Group, TU Wien

Hardware Modeling. VHDL Basics. ECS Group, TU Wien Hardware Modeling VHDL Basics ECS Group, TU Wien VHDL Basics 2 Parts of a Design Unit Entity Architecture Configuration Package Package Package Body Library How to create a Design Unit? Interface to environment

More information

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu Sept 13, 2006 Lecture 3: Basic VHDL constructs Signals, Variables, Constants VHDL Simulator and Test benches Types Reading: Ashenden

More information

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL VHDL Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL Alternative (Student Generated) Definition Very Hard Digital Logic language VHDL Design

More information

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit.

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit. VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit. Its main applications include synthesis of digital circuits onto CPLD/FPGA (Complex Programmable

More information

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

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized Multi-valued Logic Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized X, unknown 0, logic 0 1, logic 1 Z, high impedance W, unknown L, logic 0 weak H, logic 1 weak - ); don t care Standard

More information

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003 The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam February 26, 2003 1. (20 points) Describe the following logic expression (A B D) + (A B C) + (B C ) with a structural VHDL

More information

Basic Language Concepts

Basic Language Concepts Basic Language Concepts Sudhakar Yalamanchili, Georgia Institute of Technology ECE 4170 (1) Describing Design Entities a sum b carry Primary programming abstraction is a design entity Register, logic block,

More information

VHDL BASIC ELEMENTS INTRODUCTION

VHDL BASIC ELEMENTS INTRODUCTION VHDL BASIC ELEMENTS INTRODUCTION VHDL Basic elements Identifiers Basic identifiers Extended identifiers Data Objects Constant Variable Signal File Data Types Scalar Composite Access File type Identifiers

More information

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

!#$%&&'(')*+%,%-.#'/'.001$$ !"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"!!"#$%&'#()#*+"+#,-."/0110#230#4."50",+"+#)6# 6+-+#(.6+-0#)4475.8)60#0/#.65-0#230#9+**+"+# 2.48).-0#(.6+-0#! 2+"*5."5*:#,."/0110#;)**0! *),".6*:#-.99-0*0"5."+#2+660,.40"5)#;)*)2)#

More information

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

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1 Lecture 1: VHDL Quick Start Digital Systems Design Fall 10, Dec 17 Lecture 1 1 Objective Quick introduction to VHDL basic language concepts basic design methodology Use The Student s Guide to VHDL or The

More information

ECOM4311 Digital Systems Design

ECOM4311 Digital Systems Design ECOM 4311 Digital Systems Design Eng. Monther Abusultan Computer Engineering Dept. Islamic University of Gaza Page 1 Agenda 1. VHDL : Data Types Cont d 2. VHDL : Operators 3. VHDL : Signal Assignments

More information

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

IT T35 Digital system desigm y - ii /s - iii UNIT - V Introduction to Verilog Hardware Description Language Introduction HDL for combinational circuits Sequential circuits Registers and counters HDL description for binary multiplier. 5.1 INTRODUCTION

More information

Lattice VHDL Training

Lattice VHDL Training Lattice Part I February 2000 1 VHDL Basic Modeling Structure February 2000 2 VHDL Design Description VHDL language describes a digital system as a set of modular blocks. Each modular block is described

More information

ELCT 501: Digital System Design

ELCT 501: Digital System Design ELCT 501: Digital System Lecture 4: CAD tools (Continued) Dr. Mohamed Abd El Ghany, Basic VHDL Concept Via an Example Problem: write VHDL code for 1-bit adder 4-bit adder 2 1-bit adder Inputs: A (1 bit)

More information

VHDL Synthesis Reference

VHDL Synthesis Reference VHDL Synthesis Reference Old Content - visit altium.com/documentation Mod ifi ed by on 6- Nov -20 13 The following content has been imported from Legacy Help systems and is in the process of being checked

More information

Getting Started with VHDL

Getting Started with VHDL Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component Entities can be primitive objects or complex objects Architectures are associated

More information

VHDL: skaitmeninių įtaisų projektavimo kalba. 2 paskaita Pradmenys

VHDL: skaitmeninių įtaisų projektavimo kalba. 2 paskaita Pradmenys VHDL: skaitmeninių įtaisų projektavimo kalba 2 paskaita Pradmenys Skeleton of a Basic VHDL Program This slide set covers the components to a basic VHDL program, including lexical elements, program format,

More information

Lecture 4. VHDL Fundamentals. George Mason University

Lecture 4. VHDL Fundamentals. George Mason University Lecture 4 VHDL Fundamentals George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 3, Basic Language Constructs of VHDL 2 Design Entity ECE 448 FPGA and ASIC Design with

More information

Sequential Statement

Sequential Statement Sequential Statement Sequential Logic Output depends not only on current input values but also on previous input values. Are building blocks of; Counters Shift registers Memories Flip flops are basic sequential

More information

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University 1 The Wait Statement Syntax wait until condition; Different forms wait until(clk event and clk = 1 ); wait

More information

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library :

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library : UNIT I Introduction to VHDL VHDL stands for very high-speed integrated circuit hardware description language. Which is one of the programming languages used to model a digital system by dataflow, behavioral

More information

Lab # 5. Subprograms. Introduction

Lab # 5. Subprograms. Introduction Lab # 5 Subprograms Introduction Subprograms consist of procedures and functions. A procedure can return more than one argument; a function always returns just one. In a function, all parameters are input

More information

A bird s eye view on VHDL!

A bird s eye view on VHDL! Advanced Topics on Heterogeneous System Architectures A bird s eye view on VHDL Politecnico di Milano Conference Room, Bld 20 19 November, 2015 Antonio R. Miele Marco D. Santambrogio Politecnico di Milano

More information

COE 405 Design Methodology Based on VHDL

COE 405 Design Methodology Based on VHDL COE 405 Design Methodology Based on VHDL Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Outline Elements of VHDL Top-Down Design Top-Down Design with

More information

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006 The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam Solution March 2, 2006 1. (15 points) A barrel shifter is a shift register in which the data can be shifted either by one

More information

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits M1 Informatique / MOSIG Introduction to Modeling and erification of Digital Systems Part 4: HDL for sequential circuits Laurence PIERRE http://users-tima.imag.fr/amfors/lpierre/m1arc 2017/2018 81 Sequential

More information

C-Based Hardware Design

C-Based Hardware Design LECTURE 6 In this lecture we will introduce: The VHDL Language and its benefits. The VHDL entity Concurrent and Sequential constructs Structural design. Hierarchy Packages Various architectures Examples

More information

Introduction to VHDL #1

Introduction to VHDL #1 ECE 3220 Digital Design with VHDL Introduction to VHDL #1 Lecture 3 Introduction to VHDL The two Hardware Description Languages that are most often used in industry are: n VHDL n Verilog you will learn

More information

HDL. Hardware Description Languages extensively used for:

HDL. Hardware Description Languages extensively used for: HDL Hardware Description Languages extensively used for: Describing (digital) hardware (formal documentation) Simulating it Verifying it Synthesizing it (first step of modern design flow) 2 main options:

More information

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

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2 VHDL 2 Combinational Logic Circuits Reference: Roth/John Text: Chapter 2 Combinational logic -- Behavior can be specified as concurrent signal assignments -- These model concurrent operation of hardware

More information

ECE 3401 Lecture 10. More on VHDL

ECE 3401 Lecture 10. More on VHDL ECE 3401 Lecture 10 More on VHDL Outline More on VHDL Some VHDL Basics Data Types Operators Delay Models VHDL for Simulation VHDL for Synthesis 1 Data Types Every signal has a type, type specifies possible

More information

Hardware Description Languages. Modeling Complex Systems

Hardware Description Languages. Modeling Complex Systems Hardware Description Languages Modeling Complex Systems 1 Outline (Raising the Abstraction Level) The Process Statement if-then, if-then-else, if-then-elsif, case, while, for Sensitivity list Signals vs.

More information

ECOM 4311 Digital System Design using VHDL. Chapter 7

ECOM 4311 Digital System Design using VHDL. Chapter 7 ECOM 4311 Digital System Design using VHDL Chapter 7 Introduction A design s functionality should be verified before its description is synthesized. A testbench is a program used to verify a design s functionality

More information

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

Lecture 4. VHDL Fundamentals. Required reading. Example: NAND Gate. Design Entity. Example VHDL Code. Design Entity Required reading Lecture 4 VHDL Fundamentals P. Chu, RTL Hardware Design using VHDL Chapter 3, Basic Language Constructs of VHDL George Mason University 2 Example: NAND Gate Design Entity a b z a b z 0

More information

! Initially developed under DOD auspices, later standardized as IEEE standards , , & (standard logic data type)

! Initially developed under DOD auspices, later standardized as IEEE standards , , & (standard logic data type) VHDL Introduction, Part I Figures in this lecture are from: Rapid Prototyping of Digital Systems, Second Edition James O. Hamblen & Michael D. Furman, Kluwer cademic Publishers, 2001, ISN 0-7923-7439-8

More information

VHDL for Complex Designs

VHDL for Complex Designs ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 VHDL for Complex Designs This lecture covers VHDL features that are useful when designing complex logic circuits. After

More information

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture Assignment Last time Project 4: Using synthesis tools Synplify Pro and Webpack Due 11/11 ning of class Generics Used to parameterize models E.g., Delay, bit width Configurations Configuration specification

More information

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

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University ECE 545 Lecture 8 Data Flow Description of Combinational-Circuit Building Blocks George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 7, Combinational Circuit Design:

More information

Digitaalsüsteemide disain

Digitaalsüsteemide disain IAY 0600 Digitaalsüsteemide disain VHDL discussion Verification: Testbenches Design verification We want to verify that our design is correct before the target PLD is programmed. The process performed

More information

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

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory CS211 Digital Systems/Lab Introduction to VHDL Hyotaek Shim, Computer Architecture Laboratory Programmable Logic Device (PLD) 2/32 An electronic component used to build reconfigurable digital circuits

More information

Chapter 2 Basic Logic Circuits and VHDL Description

Chapter 2 Basic Logic Circuits and VHDL Description Chapter 2 Basic Logic Circuits and VHDL Description We cannot solve our problems with the same thinking we used when we created them. ----- Albert Einstein Like a C or C++ programmer don t apply the logic.

More information

Digital Systems Design

Digital Systems Design IAY 0600 Example: HalfAdder Behavior Structure Digital Systems Design a b Sum Carry 0 0 0 0 0 1 1 0 a b HalfAdder Sum Carry 1 0 1 0 VHDL discussion Dataflow Style Combinational Design 1 1 0 1 a Sum Sum

More information

Timing in synchronous systems

Timing in synchronous systems BO 1 esign of sequential logic Outline Timing in synchronous networks Synchronous processes in VHL VHL-code that introduces latches andf flip-flops Initialization of registers Mealy- and Moore machines

More information

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

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs Logic and Computer Design Fundamentals VHDL Part Chapter 4 Basics and Constructs Charles Kime & Thomas Kaminski 24 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Overview

More information

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

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab Department of Electronics & Communication Engineering Lab Manual E-CAD Lab Prasad V. Potluri Siddhartha Institute of Technology (Sponsored by: Siddhartha Academy of General & Technical Education) Affiliated

More information

Performance Engineering of Real-Time and Embedded Systems. Introduction to VHDL

Performance Engineering of Real-Time and Embedded Systems. Introduction to VHDL Performance Engineering of Real-Time and Embedded Systems Introduction to VHDL VHDL designs are decomposed into blocks. A block has an entity/architecture pair. Entity describes the interface Architecture

More information

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 4 Introduction to VHDL

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 4 Introduction to VHDL EE 459/500 HDL Based Digital Design with Programmable Logic Lecture 4 Introduction to VHDL Read before class: Chapter 2 from textbook (first part) Outline VHDL Overview VHDL Characteristics and Concepts

More information

Lecture 10 Subprograms & Overloading

Lecture 10 Subprograms & Overloading CPE 487: Digital System Design Spring 2018 Lecture 10 Subprograms & Overloading Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 Subprograms

More information

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

EECE-4740/5740 Advanced VHDL and FPGA Design. Lecture 3 Concurrent and sequential statements EECE-4740/5740 Advanced VHDL and FPGA Design Lecture 3 Concurrent and sequential statements Cristinel Ababei Marquette University Department of Electrical and Computer Engineering Overview Components hierarchy

More information

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory Instructor John Chandy Office: ITEB 437 Office Hours: W10-12 Tel: (860) 486-5047 Email: john.chandy@uconn chandy@uconn.edu Class home page: HuskyCT

More information

[1] Douglas L. Perry, VHDL, third edition, ISBN , McRaw- Hill Series on Computer Engineering.

[1] Douglas L. Perry, VHDL, third edition, ISBN , McRaw- Hill Series on Computer Engineering. Lecture 12 1 Reference list [1] Douglas L. Perry, VHDL, third edition, ISBN 0-07-049436-3, McRaw- Hill Series on Computer Engineering. [2] Kevin Skahil, VHDL for programmable logic, ISBN 0-201-89586-2

More information

IEEE VHDL-200X

IEEE VHDL-200X IEEE 1076-2008 VHDL-200X By Jim Lewis, VHDL Training jim@synthworks.com IEEE 1076-2008 IEEE VASG - VHDL-200X effort Started in 2003 and made good technical progress However, no $$$ for LRM editing Accellera

More information

ENGIN 241 Digital Systems with Lab

ENGIN 241 Digital Systems with Lab ENGIN 241 Digital Systems with Lab (4) Dr. Honggang Zhang Engineering Department University of Massachusetts Boston 1 Introduction Hardware description language (HDL): Specifies logic function only Computer-aided

More information

Digital Design with SystemVerilog

Digital Design with SystemVerilog Digital Design with SystemVerilog Prof. Stephen A. Edwards Columbia University Spring 25 Synchronous Digital Design Combinational Logic Sequential Logic Summary of Modeling Styles Testbenches Why HDLs?

More information

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN Lecture 9 VHDL, part IV Hierarchical and parameterized design Section 1 HIERARCHICAL DESIGN 2 1 Dealing with Large Digital System Design 1. Apply hierarchy to the design At the highest level use larger

More information

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design Two HDLs used today Introduction to Structured VLSI Design VHDL I VHDL and Verilog Syntax and ``appearance'' of the two languages are very different Capabilities and scopes are quite similar Both are industrial

More information

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language VHDL Introduction to Structured VLSI Design VHDL I Very High Speed Integrated Circuit (VHSIC) Hardware Description Language Joachim Rodrigues A Technology Independent, Standard Hardware description Language

More information

ECEU530. Homework 4 due Wednesday Oct 25. ECE U530 Digital Hardware Synthesis. VHDL for Synthesis with Xilinx. Schedule

ECEU530. Homework 4 due Wednesday Oct 25. ECE U530 Digital Hardware Synthesis. VHDL for Synthesis with Xilinx. Schedule EEU530 EE U530 igital Hardware Synthesis Lecture 11: Prof. Miriam Leeser mel@coe.neu.edu October 18, 2005 Sequential Logic in VHL Finite State Machines in VHL Project proposals due now HW 4 due Wednesday,

More information

VHDL 200X: The Future of VHDL

VHDL 200X: The Future of VHDL VHDL 200X: The Future of VHDL By Jim Lewis VHDL Training Team Leader VHDL-200X Fast Track jim@synthworks.com Lewis 1 MAPLD 2005 / P255 VHDL-200X: The Future of VHDL Currently the work is being funded through

More information