summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/interrupt/bch_conserv1.vhd
diff options
context:
space:
mode:
Diffstat (limited to '2004/n/fpga/src/interrupt/bch_conserv1.vhd')
-rw-r--r--2004/n/fpga/src/interrupt/bch_conserv1.vhd60
1 files changed, 60 insertions, 0 deletions
diff --git a/2004/n/fpga/src/interrupt/bch_conserv1.vhd b/2004/n/fpga/src/interrupt/bch_conserv1.vhd
new file mode 100644
index 0000000..50230f7
--- /dev/null
+++ b/2004/n/fpga/src/interrupt/bch_conserv1.vhd
@@ -0,0 +1,60 @@
+-- bch_conserv1.vhd
+-- Eurobot 2004 : APB Team
+-- Auteur : Pierre-André Galmes
+-- Test de conserv1.
+
+library ieee;
+use ieee.std_logic_1164.all;
+--use ieee.std_logic_arith.all;
+--use ieee.std_logic_unsigned.all;
+
+use work.isa_const.all;
+use work.nono_const.all;
+
+
+entity bch_conserv1 is
+end bch_conserv1;
+
+architecture sim1 of bch_conserv1 is
+
+ component conserv1
+ port (
+ clk : in std_logic;
+ rst : in std_logic;
+ pin_in : in std_logic;
+ pin_out : out std_logic
+ );
+ end component;
+
+ -- définiton des signaux
+ signal clk : std_logic := '0';
+ signal rst : std_logic;
+ signal pin_in : std_logic;
+ signal pin_out : std_logic;
+
+begin
+ U1 : conserv1 port map (
+ clk => clk,
+ rst => rst,
+ pin_in => pin_in,
+ pin_out => pin_out
+ );
+
+ clk <= not clk after CK_PERIOD/2;
+ rst <= '1',
+ '0' after CK_PERIOD,
+ '1' after 7*CK_PERIOD,
+ '0' after 8*CK_PERIOD;
+ pin_in <= '1',
+ '0' after 2*CK_PERIOD,
+ '1' after 5*CK_PERIOD,
+ '0' after 7*CK_PERIOD;
+ --x"03" after 5*CK_PERIOD;
+end sim1;
+
+configuration cf1_bch_conserv1 of bch_conserv1 is
+ for sim1
+ for all : conserv1 use entity work.conserv1(RTL); end for;
+ end for;
+end cf1_bch_conserv1;
+