Professional Documents
Culture Documents
By:- Saurabh Singh Sr.Asst.Prof Sr.Asst.Prof. Dept. Of CSE BIT Durg Saurabh_singh1983@rediffmail.com
VHDL
I/P O/P
VHDL
O/P I/P
Input And Output are Interface of Digital System. IN VHDL it is known as Ports
VHDL
VHDL
Functional Description of SUD is Known as ARCHITECTURE. There are 3 Basic Style for describing the ARCHITECTURE Behavioural Style- Most Abstract,Sequential Data Flow Style- Concurrent Stmt. Structural Style- Most detail Level of Abstraction (ONE CAN MIX ALL OF THEM)
KEY TERMS
Named Identifier:- Object in VHDL, such as entity,architecture,port,signal etc. Reserved Keyword:Keyword: A word that is part of the language and may not be used as a named identifier. Library:- Collection of VHDL design unit that have been previously compiled. Package:- A Group of Uncompiled VHDL Design Element that can be used by more than on VHDL File
Points To Remember
VHDL is Case In Sensitive Comments:--- Decimal Integers:- 1,2 ,3_455 Based Integer :- 2#1001,16#0011_0000 Signal:- An Intenal Connection with in VHDL Architecture that connects parts of design together
Documentation Part
ARCHITECTURE PART
VHDL Operator
Logical Operator Operator:-works boolean,std_logic, vector length.Not on integer. integer on bit, of equal
Relational Operator Operator:-Compare two operands of the same type and produce a boolen(<,>,<=,>=) Arithmatic Operands:Operands Works on ineger ,real,std_logic Concatenation:- '&'(abb (abb &wsx=abbwsx)
To help protect y our priv acy , PowerPoint prev ented this external picture from being automatically downloaded. To download and display this picture, click Options in the Message Bar, and then click Enable external content.
entity encoder is Type of Port port (a,b: in std_logic; enable : in std_logic; y : out std_logic_vector (3 downto 0) ); end encoder;
Defines I/O ONLY
if this is the top level entity for you design, the port lists your pins for a lower level entity, ports are like ports on schematic symbol
Architecture Body
Architecture name_arch OF Entity_name IS
Used for declaration of signal
begin
Used for programming One can Use any Modeling style Data Flow Concurrent Structural Mixed
end name_arch
architecture Behavioral of fa is
begin process (a,b,cin) variable axor,a_and : std_logic; begin axor := a xor b; a_and := a and b; sum <= axor xor cin; carry <= a_and or (cin and axor); end process; end Behavioral;
begin
Sequential Stmt.
end process;
Ex. of IF Stmt.
architecture behv of D_latch is begin process(data_in, enable) begin if (enable='1') then -- no clock signal here data_out <= data_in; end if; end process; end behv;
Concurrent Stmt.
target_signal <= Val WHEN condition ELSE WITH expression SELECT
target_signal <= val1 Val1 WHEN Condition WHEN choices, ELSE val2 WHEN choices, Val2; val3 WHEN OTHERS
Conurrent Stmt.
architecture behv of D_latch is begin data_out <= data_in when (enable ='1') else 'Z';
Vlaue or Expression Key Word
end behv;