Feed

Enter your email address:

Delivered by FeedBurner

Saturday, March 23, 2013

synchronous up down counter vhdl code and test bench

library ieee; use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity up_down_counter is    port(clk, rst_a, mode : in std_logic;  --mode=1 up counting, mode=0 down counting        q : out std_logic_vector(3 downto 0)); end up_down_counter; architecture archi of up_down_counter is   signal tmp: std_logic_vector(3 downto 0);   begin      process (clk, rst_a)       begin        ...

up counter with preload vhdl code and test bench

library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity up_counter_sync_preload is    port(clk, rst_a,load : in std_logic;        ip: in std_logic_vector(3 downto 0);        q : out std_logic_vector(3 downto 0)); end up_counter_sync_preload; architecture archi of up_counter_sync_preload is   signal tmp: std_logic_vector(3 downto 0);   begin      process (clk, rst_a)      ...

d flipflop with setup/hold violation, reset recovery, clock width violation and output transition vhdl code

library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;    entity d_flipflop is        generic (          constant t_setup       : time := 5 ns;      -- setup time          constant t_hold        : time := 5 ns;      -- hold time          constant...

d flipflop with asynchronous reset enable and load vhdl code and test bench

library ieee;use ieee.std_logic_1164.all;    entity dff_async_reset is      port (          data    :in  std_logic;  -- Data input          clk     :in  std_logic;  -- Clock input          reset_a :in  std_logic;  -- Reset input          q      ...

4 bit adder/substractor using full adder

library ieee;use ieee.std_logic_1164.all;entity add_sub_4b_using_fa is    port (    a, b : in  std_logic_vector(3 downto 0);   -- input bits    enb  : in  std_logic;               -- en=0=>addition  ,  en=1 =>subtract    c    : inout std_logic_vector(3 downto 0);   -- carry    sd    : out std_logic_vector(3 downto 0));  --...

4 bit magnitude comparator vhdl code

library ieee;use ieee.std_logic_1164.all;entity mag_comp_4b is    port (    a, b       : in  std_logic_vector(3 downto 0);       -- inputs    ag, bg, eq : out std_logic);                         -- ag if a > b, bg if b > a, eq if a=bend mag_comp_4b;architecture beh of mag_comp_4b issignal s : std_logic_vector(3 downto...

Tuesday, March 12, 2013

Introduction to VHDL

Requirement of VHDL Normal 0 false false false EN-US ZH-CN OR ...