mirror of
https://github.com/ParkerTenBroeck/hdl_sim.git
synced 2026-06-06 21:24:06 -04:00
switched away from active low, moved examples to example dir
This commit is contained in:
parent
04c3d69cbf
commit
b4841e6f40
4 changed files with 142 additions and 133 deletions
25
examples/example.vhdl
Normal file
25
examples/example.vhdl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
-- Do not modify the following entity block
|
||||
entity circuit is
|
||||
port (
|
||||
clk: in std_logic; -- 500 Hz, period 2 ms
|
||||
key: in std_logic_vector(31 downto 0); -- active high
|
||||
sw: in std_logic_vector(31 downto 0); -- active high
|
||||
led: out std_logic_vector(31 downto 0) := (others => '0'); -- active high
|
||||
hex: out std_logic_vector(31 downto 0) := (others => '0') -- active high
|
||||
);
|
||||
end circuit;
|
||||
|
||||
|
||||
architecture description of circuit is
|
||||
signal counter: unsigned(31 downto 0) := x"00000000";
|
||||
begin
|
||||
led <= std_logic_vector(counter);
|
||||
process(clk)
|
||||
begin
|
||||
counter <= counter+1;
|
||||
end process;
|
||||
end description;
|
||||
Loading…
Add table
Add a link
Reference in a new issue