Skip to content

Instantly share code, notes, and snippets.

@ruediger
Created May 23, 2012 19:52
Show Gist options
  • Save ruediger/2777375 to your computer and use it in GitHub Desktop.
Save ruediger/2777375 to your computer and use it in GitHub Desktop.
simple vhdl example
library ieee;
use ieee.std_logic_1164.all;
entity counter is
port (
clk : in std_logic;
o : out std_logic);
end entity counter;
architecture sim of counter is
begin -- architecture sim
o <= not clk;
end architecture sim;
library ieee;
use ieee.std_logic_1164.all;
entity test is
end entity test;
architecture t of test is
component counter is
port (
clk : in std_logic;
o : out std_logic);
end component counter;
signal clk : std_logic := '0';
signal o : std_logic;
begin -- architecture t
c : counter
port map (
clk => clk,
o => o);
x: process is
begin -- process x
clk <= not clk;
wait for 200 ms;
end process x;
end architecture t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment