summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/interrupt/bch_conserv8.vhd
diff options
context:
space:
mode:
Diffstat (limited to '2004/n/fpga/src/interrupt/bch_conserv8.vhd')
-rw-r--r--2004/n/fpga/src/interrupt/bch_conserv8.vhd60
1 files changed, 60 insertions, 0 deletions
diff --git a/2004/n/fpga/src/interrupt/bch_conserv8.vhd b/2004/n/fpga/src/interrupt/bch_conserv8.vhd
new file mode 100644
index 0000000..8ad7a3e
--- /dev/null
+++ b/2004/n/fpga/src/interrupt/bch_conserv8.vhd
@@ -0,0 +1,60 @@
+-- bch_conserv8.vhd
+-- Eurobot 2004 : APB Team
+-- Auteur : Pierre-André Galmes
+-- Test de conserv8.
+
+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_conserv8 is
+end bch_conserv8;
+
+architecture sim1 of bch_conserv8 is
+
+ component conserv8
+ port (
+ clk : in std_logic;
+ rst : in std_logic;
+ data_in : in T_DATA;
+ data_out : out T_DATA
+ );
+ end component;
+
+ -- définiton des signaux
+ signal clk : std_logic := '0';
+ signal rst : std_logic;
+ signal data_in : T_DATA;
+ signal data_out : T_DATA;
+
+begin
+ U1 : conserv8 port map (
+ clk => clk,
+ rst => rst,
+ data_in => data_in,
+ data_out => data_out
+ );
+
+ clk <= not clk after CK_PERIOD/2;
+ rst <= '1',
+ '0' after CK_PERIOD;
+ data_in <= x"01",
+ x"00" after 2*CK_PERIOD,
+ x"08" after 5*CK_PERIOD,
+ x"00" after 10*CK_PERIOD,
+ x"09" after 11*CK_PERIOD,
+ x"00" after 12*CK_PERIOD;
+ --x"03" after 5*CK_PERIOD;
+end sim1;
+
+configuration cf1_bch_conserv8 of bch_conserv8 is
+ for sim1
+ for all : conserv8 use entity work.conserv8(RTL); end for;
+ end for;
+end cf1_bch_conserv8;
+