+ All Categories
Home > Documents > An Introduction to VHDL

An Introduction to VHDL

Date post: 14-Jan-2016
Category:
Upload: deidra
View: 95 times
Download: 3 times
Share this document with a friend
Description:
An Introduction to VHDL. Satnam Singh Xilinx. FPGAs. FPGAs. Design Flow. Schematics (Xlib). VHDL History. United States Department of “Defence” Specification and modelling language. VHDL. 1983: Intermetrics, IBM and Texas Instruments awarded design contract for VHDL. - PowerPoint PPT Presentation
Popular Tags:
26
An Introduction to VHDL Satnam Singh Xilinx FPGA
Transcript
Page 1: An Introduction to VHDL

An Introduction to VHDL

Satnam Singh

Xilinx

FPGA

Page 2: An Introduction to VHDL

FPGAs

Page 3: An Introduction to VHDL

FPGAs

Page 4: An Introduction to VHDL
Page 5: An Introduction to VHDL

Design Flow

Page 6: An Introduction to VHDL

Schematics (Xlib)

Page 7: An Introduction to VHDL
Page 8: An Introduction to VHDL

VHDL History

United States Department of “Defence”

Specification and modelling language

Page 9: An Introduction to VHDL

VHDL

1983: Intermetrics, IBM and Texas Instruments awarded design contract for VHDL.

1985: Final language version produced for DOD

1987: IEEE Standard 1076-1987

1988 ANSI Standard

“VHSIC Hardware Description Language”

VHSIC = Very High Speed Integrated Circuit

Page 10: An Introduction to VHDL

How is VHDL Used?

System simulation (modelling)

Test benches

Synthesis

Page 11: An Introduction to VHDL

Why not use normal languages?

Programming languages like C and Java are sequential: one thing happens at a time.

Hardware is totally concurrent: every gate is running at the same time as every other gate.

Communication occurs over wire connections.

Page 12: An Introduction to VHDL

Concurrency Models

Cycle based simulation: every n-nanoseconds update the state of the circuit.

Event based: only update the system when certain events occur.

VHDL uses even based simulation.

Page 13: An Introduction to VHDL

std_ulogic and std_logic

type std_ulogic = (‘U’, -- unitialised ‘X’ , -- forcing unknown ‘0’, -- forcing zero ‘1’, -- forcing one ‘Z’, -- high impedance ‘W’, -- weak unknown ‘L’, -- weak zero ‘H’, -- weak one ‘-’) -- don’t know

Page 14: An Introduction to VHDL

nandgate

Page 15: An Introduction to VHDL

event based

event based

event based fixed

chain

krav

Page 16: An Introduction to VHDL

Simulations

Page 17: An Introduction to VHDL

counters

counter

resetable counter

Page 18: An Introduction to VHDL

Synchronization

process (a, b, c)

wait until clk’event and clk=‘1’ ;

wait for 50 ns ;

Page 19: An Introduction to VHDL

variables

multi_adder

Page 20: An Introduction to VHDL

Quiz 1architecture question of quiz1 is signal y : integer := 0 ;begin

process is variable p : integer ; begin y <= 2 ; p := 2 ; y <= y + 3 ; p := p + 3 ;

wait for 10 ns ; -- What are the values of y and p? end process ;

end architecture question ;

Page 21: An Introduction to VHDL

-- onecounter_package.vhdpackage onecounter_package is

constant output_size : positive := 4 ; constant input_size : positive := 2**(output_size-1) ;

subtype count_type is natural range 0 to 2**output_size ;

component onecounter is port (signal input : in bit_vector (1 to input_size) ; signal count : out count_type) ; end component onecounter ;

end package onecounter_package ;

use work.onecounter_package.all ; entity onecounter is port (signal input : in bit_vector (1 to input_size) ; signal count : out count_type) ; end entity onecounter ;

Page 22: An Introduction to VHDL

-- onecounter_behav.vhduse work.onecounter_package.all ;architecture behav of onecounter isbegin

counting : process (input) variable total : count_type ; begin -- Calculate the total using variables. total := 0 ; for i in input'range loop if input(i) = '1' then total := total + 1 ; end if ; end loop ; -- Assign the calculated total to the output signal. count <= total ; end process counting ; end behav ;

Page 23: An Introduction to VHDL

Quiz 2entity quiz2 isend entity quiz2 ;

architecture behav of quiz2 is type num_array is array (1 to 4) of integer ; signal nums : num_array := (2,4,3,1) ; signal total : integer ;begin

add : process (nums) begin total <= 0 ; for i in nums'range loop total <= total + nums(i) ; end loop ; end process add ; end behav ;

Page 24: An Introduction to VHDL

-- toggle_package.vhdpackage toggle_package is

component toggle is port (signal clk : in bit ; signal t : out bit) ; end component ;

end toggle_package ;

entity toggle is port (signal clk : in bit ; signal t : out bit) ; end entity toggle ;

Page 25: An Introduction to VHDL

-- toggle_behav.vhdarchitecture behav of toggle isbegin

toggling : process variable toggleValue : bit := '0' ; begin wait until clk'event and clk='0' ; toggleValue := not toggleValue ; t <= toggleValue ; end process toggling ;end behav ;

Page 26: An Introduction to VHDL

Synthesis

toggle


Recommended