VHDL VHSIC Hardware Description Language VHSIC

Slides:



Advertisements
Similar presentations
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
Advertisements

History TTL-logic PAL (Programmable Array Logic)
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
EENG 2910 – Digital Systems Design Fall Course Introduction Class Time: M9:30am-12:20pm Location: B239, B236 and B227 Instructor: Yomi Adamo
Introduction to VHDL (part 2)
1 H ardware D escription L anguages Basic Language Concepts.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Data Flow Modeling of Combinational Logic Simple Testbenches
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
System Arch 2008 (Fire Tom Wada) /10/9 Field Programmable Gate Array.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
1 H ardware D escription L anguages Modeling Complex Systems.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
VHDL – Dataflow and Structural Modeling and Testbenches ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
1 component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words  Declarations of Components and Entities are similar  Components are.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VHDL Coding for Synthesis ECE 448 Lecture 12.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
(1) Modeling Structure © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Data Flow and Behavioral Modeling in VHDL 1 MS EMBEDDED SYSTEMS.
An Introduction to V.H.D.L.. Need of a Compiler… main( ) { int x=10,y=20,z; z = x + y ; printf ( “ %d “, z ); getch( ) ; } What’s That ? Give me only.
Combinational logic circuit
Basic Language Concepts
Systems Architecture Lab: Introduction to VHDL
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Behavioral Style Combinational Design with VHDL
IAY 0600 Digital Systems Design
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Behavioral Style Combinational Design with VHDL
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Sequential-Circuit Building Blocks
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
CHAPTER 10 Introduction to VHDL
ELEC 5200/6200 Computer Architecture and Design Review of VHDL
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL (VHSIC Hardware Description Language)
Chapter 5 – Number Representation and Arithmetic Circuits
VHDL Introduction.
Behavioral Modeling of Sequential-Circuit Building Blocks
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Hardware Modeling & Synthesis Using VHDL
Modeling Complex Behavior
CprE / ComS 583 Reconfigurable Computing
Sequntial-Circuit Building Blocks
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

VHDL VHSIC Hardware Description Language VHSIC Very High Speed Integrated Circuits

What is VHDL? A very verbose, complex, and powerful language for design, simulation, verification and synthesis of digital systems Supports many levels of abstraction, ranging from algorithm level to gate level Can model concurrent and sequential behaviors of digital systems Supports design hierarchy as interconnections of components Can explicitly model the timing of digital systems

How is it to be taught? By various examples discussed in class By requiring you to write VHDL descriptions of components Not by describing every possible VHDL statement

Modeling Dataflow - concurrent: gate level representation Structural - concurrent: hierarchically interconnected components Behavioral - sequential: algorithm level representation

A VHDL design is a set of design entities, one of which is the “top level”, which may invoke other design entities as components. The entire design, is based on the ability to utilize “design hierarchy”.

Entities and Architectures Entity - defines the interface (e.g., inputs/outputs) to a ‘black box’ which performs a specific function. Architecture - one possible implementation (or realization) of the “insides” of the “black box”. An architecture may contain: data declarations concurrent signal assignment component instantiations process blocks

Entities Example: ALU entity ALU is port ( arg1, arg2: in bit_vector(3 downto 0); add_or_sub: in bit; result: out bit_vector(3 downto 0); end ALU; “Black Box” Entity - I/O for Box ALU arg1, arg2 result add_or_sub

Architectures ALU Example: architecture ALU_struct of ALU is component add port (arg1,arg2: in bit_vector(3 downto 0); result: out bit_vector(3 downto 0); end component; ... signal diff, sum: bitvec; begin diff <= arg1- arg2; add0: add port map(arg1,arg2,sum); … end ALU_struct; Architecture Inside of Box ALU Add Mux Sub

Data Types Supported bit A: in bit; bit_vector B: in bit_vector(7 downto 1); constants ‘1’, or ‘0’, or “10010” bitvec B: bitvec; integer C: integer; real C: real; std_logic D: std_logic; (IEEE library) User defined

Concurrent Signal Assignment NOT (single input) a <= not(b); AND (multiple input) a <= b and c; OR (multiple input) a <= b or c or d; XOR (multiple input) a <= (b xor c xor d) xor e;

Concurrent Signal Assignment NAND (multiple input) a <= b nand c; NOR (multiple input) a <= b nor c nor d; Bit-wise Concatenation (“&”) a(6 downto 1) <= c & d(3 downto 0) & e; Selector (multiplexor) c <= b when (en = ‘1’) else a;

Examples Dataflow and Structural AND gate Half Adder Full Adder 2 Bit 2 to 1 Multiplexor 4 Bit Ripple Carry Adder

AND Gate entity andf is A port (A, B: in BIT; andf Z: out BIT); Z end andf; architecture andf of andf is begin Z <= (A and B); A andf Z B Z B A

Half Adder entity Half_Adder is port (A, B: in BIT; A SUM, COUT: out BIT); end Half_Adder; architecture Half_Adder of Half_Adder is begin SUM <= A xor B after 6ns; COUT <= A and B after 4ns; A Half_Adder SUM B COUT SUM B A COUT

Full Adder A Full_Adder B A B entity Full_Adder is CIN entity Full_Adder is port (A, B,CIN: in BIT; SUM, COUT: out BIT); end Half_Adder; architecture Full_Adder of Full_Adder is begin SUM <= A xor B xor CIN after 15ns; COUT <= (A and B) or (B and CIN) or (CIN and A) after 10ns; end Full_Adder; A Full_Adder SUM B COUT SUM CIN A COUT B

1-Bit 2 to 1 Multiplexor entity Mux1 is F B A S entity Mux1 is port (A, B, S: in bit; F: out bit); end Mux1; architecture mux1 of mux1 is begin F <= A when (S = ‘0’) else B; S A A S=0 F F B B S=1

2-Bit 2 to 1 Multiplexor entity Mux2 is port (A, B: in bit_vector(1 downto 0); S: in bit; F: out bit_vector(1 downto 0)); end Mux2; architecture Mux2 of Mux2 is component Mux1 port(A,B,S: in bit; F: out bit); end component; begin M0: Mux1 port map(A(0), B(0), S, F(0)); M1: Mux1 port map(A(1), B(1), S, F(1)); S Mux2 A<1:0> S A0 M0 F0 B0 F<1:0> S A1 M1 B<1:0> F1 B1

CIN CIN S<3:0> A(0) S(0) A<3:0> B(0) C(0) SUM CIN Full_Adder A<3:0> B(0) C(0) SUM CIN B<3:0> A(1) S(1) Full_Adder A COUT B(1) C(1) B A(2) S(2) Full_Adder B(2) C(2) A(3) S(3) Full_Adder B(3) COUT COUT

4 Bit Ripple Carry Adder entity Ripple_Adder is port (A, B: in bit_vector(3 downto 0); CIN: in bit; S: out bit_vector(3 downto 0); COUT: out bit); end Ripple_Adder; architecture Ripple_Adder of Ripple_Adder is component Full_Adder port(A,B,CIN: in bit; SUM, COUT: out bit); end component; signal C: bit_vector(2 downto 0); begin FA0: Full_Adder port map(A(0), B(0), CIN, S(0), C(0)); FA1: Full_Adder port map(A(1), B(1), C(0), S(1), C(1)); FA2: Full_Adder port map(A(2), B(2), C(1), S(2), C(2)); FA3: Full_Adder port map(A(3), B(3), C(2), S(3), COUT); Ripple_Adder S<3:0> B<3:0> A<3:0> COUT CIN

Designing with VHDL Design Process: (lab 13) 1. Design entry (VHDL) 2. Testing (VHDL test vector simulation) 3. Synthesis (FPGA, standard cell, full custom) 4. Testing (logic analyzer)

Cutting Edge Technology FPGA (can be found in many systems) VHDL (1998 DoD requires all ASIC suppliers to deliver VHDL description of the ASIC and their sub components at both the behavioral level and structural level) Put FPGA and VHDL in your resume!

Behavioral VHDL Built from “process” blocks Each block is sequential internally Can use variables Can use conditionals, loops, etc. Can maintain state The complete process is like a “big gate” Like gates, blocks operate concurrently

Use VHDL Templates

Example: SR Flip-Flop Dataflow Implementation entity sr_df is port( s, r in bit; q, qbar out bit); end sr_df; architecture sr_df of sr_df is signal p, pbar bit; begin p <= not(s) nand pbar after 1 ns; pbar <= not(r) nand p after 2 ns; q <= p; qbar <= pbar;

Example: SR Flip-Flop Behavioral Implementation entity sr_bhv is port( s, r in bit; q, qbar out bit); end sr_bhv; architecture sr_bhv of sr_bhv is begin flipflop : process (s,r) variable test bit; test := s OR r; if (test = '1') then q <= s; qbar <= r; end if; end process flipflop;

Traffic Light Controller Side Road Car Sensor Main Road Main Road Car Sensor Side Road

State Machine Design Inputs, Outputs, States, Transitions Main Go Main_car = 0 For each state How do the inputs affect the state transition? What outputs are set? Main_car = 1 All Stop Side_car = 0 Side Go Side_car = 1

Traffic Light Controller -- Library Clause (picks a default search library) LIBRARY ieee; -- Use Clause (picks sets of definitions from libraries) USE ieee.std_logic_1164.all; -- Entity Declaration ENTITY test1 is port (clk, Side_Car, Main_Car: IN STD_LOGIC; Main_Green, Main_red, Side_Green, Side_red: OUT STD_LOGIC); END test1;

-- Architecture Body ARCHITECTURE test1 OF test1 IS TYPE STATE_TYPE IS (All_Stop, Main_Go, Side_Go); SIGNAL state: STATE_TYPE; BEGIN PROCESS (clk) IF clk'EVENT AND clk = '1' THEN -- rising edge CASE state IS WHEN All_Stop => IF (Main_Car = '1') THEN state <= Main_Go; ELSIF (Side_Car = '1') THEN state <= Side_Go; END IF;

-- State Transitions con’t WHEN Side_Go => IF not(Side_Car = '1') THEN state <= All_Stop; END IF; WHEN Main_Go => IF not(Main_Car = '1') THEN END CASE; END PROCESS;

-- Output Assignments '0' when Side_Go, '0' when All_Stop; WITH state SELECT Main_Green <= '1' when Main_Go, '0' when Side_Go, '0' when All_Stop; WITH state SELECT Side_Green <= '1' when Side_Go, '0' when Main_Go, WITH state SELECT Main_Red <= '1' when All_Stop, '1' when Side_Go, '0' when Main_Go; WITH state SELECT Side_Red <= '1' when All_Stop, '1' when Main_Go; END test1;

Does it Work?

Multiplier Multiplicand Multiplier X Partial Product Partial Product Shifted Copies of Multiplicand Multiplier X Partial Product Partial Product Partial Product Partial Product Product

Multiplier Multiplicand Product If (Multiplier( i ) = 1) + Product Shifted Copies of Multiplicand + Partial Products

ENTITY mpy IS PORT (op1, op2 : IN STD_LOGIC_VECTOR(3 DOWNTO 0); result : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); clk: in STD_LOGIC); END mpy; ARCHITECTURE test OF mpy IS -- shift and add technique BEGIN Fred: PROCESS(clk) VARIABLE multiplier : STD_LOGIC_VECTOR(3 DOWNTO 0); VARIABLE multiplicand : STD_LOGIC_VECTOR(7 DOWNTO 0); VARIABLE product : STD_LOGIC_VECTOR(7 DOWNTO 0) := "00000000"; VARIABLE i : integer; IF clk'EVENT AND clk = '1' THEN multiplier := op1; multiplicand := "0000" & op2; product := “00000000”; FOR i IN 3 DOWNTO 0 LOOP product(7 downto 0) := product(6 downto 0) & "0"; IF (multiplier(i) = '1') THEN product := product + multiplicand; END IF; END LOOP; result <= product; END PROCESS; END TEST;