Professional Documents
Culture Documents
UNIT III
Algorithmic State Machine
Syllabus
Algorithmic State Machines: Finite State Machines (FSM) and ASM, ASM
charts, notations, construction of ASM chart and realization for sequential
circuits, Examples: Sequence Generator, Types of Counter.
VHDL: Introduction to HDL, Data Objects & Data Types, Attributes., VHDL-
Library, Design Entity, Architecture, Modeling Styles, Concurrent and
Sequential Statements,
library IEEE;
use IEEE.STD_LOGIC_1164.ALL; if a > b then G <= '1';
use IEEE.STD_LOGIC_ARITH.ALL; else G <= 'Z';
use IEEE.STD_LOGIC_UNSIGNED.ALL; end if;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL; architecture Behavioral of comp_2b is
begin
entity comp_2b is G <= '1' when a > b else 'Z';
Port ( a, b : in std_logic_vector(1 downto 0); E <= '1' when a = b else 'Z';
G : out std_logic; -- a > b L <= '1' when a < b else 'Z';
E : out std_logic; -- a = b end Behavioral;
L : out std_logic); -- a < b
end comp_2b;
library IEEE;
architecture Behavioral of D_FF is
use IEEE.STD_LOGIC_1164.ALL;
begin
use IEEE.STD_LOGIC_ARITH.ALL;
process (CLK, Preset, Clear)
use IEEE.STD_LOGIC_UNSIGNED.ALL;
begin
if Clear = '1' then
entity D_FF is
Q <= '0';
Port ( D : in std_logic;
elsif Preset = '1' then
CLK : in std_logic;
Q <= '1';
Preset : in std_logic;
elsif clk'event and clk = '1' then
Clear : in std_logic;
Q <= D;
Q : out std_logic);
end if;
end D_FF;
end process;
end Behavioral;