diff options
author | bryan newbold <bnewbold@leaflabs.com> | 2013-10-08 22:05:21 -0400 |
---|---|---|
committer | bryan newbold <bnewbold@leaflabs.com> | 2013-10-08 22:05:21 -0400 |
commit | b31c07157b7b8ca7e8823749e140fcab24b787d2 (patch) | |
tree | f03d74eb53c316d0ef30962c39f447434432ce45 /hdl/main_xula2.vhd | |
parent | 06bb61d1163f3cac14a6a4b26dd64f3cfb105c97 (diff) | |
download | basic-hdl-template-b31c07157b7b8ca7e8823749e140fcab24b787d2.tar.gz basic-hdl-template-b31c07157b7b8ca7e8823749e140fcab24b787d2.zip |
working xula2 sim/syn/prog system
Diffstat (limited to 'hdl/main_xula2.vhd')
-rw-r--r-- | hdl/main_xula2.vhd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/hdl/main_xula2.vhd b/hdl/main_xula2.vhd new file mode 100644 index 0000000..57368f8 --- /dev/null +++ b/hdl/main_xula2.vhd @@ -0,0 +1,33 @@ +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; +use IEEE.STD_LOGIC_UNSIGNED.ALL; + + +-- Uncomment the following library declaration if using +-- arithmetic functions with Signed or Unsigned values +--use IEEE.NUMERIC_STD.ALL; + +-- Uncomment the following library declaration if instantiating +-- any Xilinx primitives in this code. +--library UNISIM; +--use UNISIM.VComponents.all; + +entity blinker is + Port ( clk_i : in STD_LOGIC; + blinker_o : out STD_LOGIC); +end blinker; + +architecture Behavioral of blinker is +signal cnt_r : std_logic_vector(22 downto 0) := (others=>'0'); +begin + +process(clk_i) is +begin + if rising_edge(clk_i) then + cnt_r <= cnt_r + 1; + end if; +end process; + +blinker_o <= cnt_r(22); + +end Behavioral; |