OpenCores
URL https://opencores.org/ocsvn/gecko4/gecko4/trunk

Subversion Repositories gecko4

[/] [gecko4/] [trunk/] [GECKO4com/] [spartan200_an/] [vhdl/] [cmd_09_if/] [cmd_09-behavior.vhdl] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 ktt1
--------------------------------------------------------------------------------
2
--            _   _            __   ____                                      --
3
--           / / | |          / _| |  __|                                     --
4
--           | |_| |  _   _  / /   | |_                                       --
5
--           |  _  | | | | | | |   |  _|                                      --
6
--           | | | | | |_| | \ \_  | |__                                      --
7
--           |_| |_| \_____|  \__| |____| microLab                            --
8
--                                                                            --
9
--           Bern University of Applied Sciences (BFH)                        --
10
--           Quellgasse 21                                                    --
11
--           Room HG 4.33                                                     --
12
--           2501 Biel/Bienne                                                 --
13
--           Switzerland                                                      --
14
--                                                                            --
15
--           http://www.microlab.ch                                           --
16
--------------------------------------------------------------------------------
17
--   GECKO4com
18
--  
19
--   2010/2011 Dr. Theo Kluter
20
--  
21
--   This VHDL code is free code: you can redistribute it and/or modify
22
--   it under the terms of the GNU General Public License as published by
23
--   the Free Software Foundation, either version 3 of the License, or
24
--   (at your option) any later version.
25
--  
26
--   This VHDL code is distributed in the hope that it will be useful,
27
--   but WITHOUT ANY WARRANTY; without even the implied warranty of
28
--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
--   GNU General Public License for more details. 
30
--   You should have received a copy of the GNU General Public License
31
--   along with these sources.  If not, see <http://www.gnu.org/licenses/>.
32
--
33
 
34
ARCHITECTURE no_target_specific OF IDN_handler IS
35
 
36
   SIGNAL s_rom_index : std_logic_vector( 5 DOWNTO 0 );
37
   SIGNAL s_done      : std_logic;
38
   SIGNAL s_push      : std_logic;
39
   SIGNAL s_start     : std_logic;
40
 
41
BEGIN
42
   done     <= s_done;
43
   push     <= s_push;
44
   size_bit <= '1' WHEN s_rom_index = "000000" ELSE '0';
45
 
46
   s_done  <= '1' WHEN s_rom_index = "011110" AND fifo_full = '0' ELSE '0';
47
   s_push  <= '1' WHEN s_rom_index(5) = '0' AND fifo_full = '0' ELSE '0';
48
   s_start <= '1' WHEN command = "0001001" AND
49
                       start = '1' ELSE '0';
50
 
51
   make_rom_index : PROCESS( clock , s_start , reset , s_done ,
52
                             s_push )
53
   BEGIN
54
      IF (clock'event AND (clock = '1')) THEN
55
         IF (reset = '1' OR s_done = '1') THEN
56
            s_rom_index <= (OTHERS => '1');
57
         ELSIF (s_start = '1') THEN
58
            s_rom_index <= (OTHERS => '0');
59
         ELSIF (s_rom_index(5) = '0' AND
60
                 s_push = '1') THEN
61
            s_rom_index <= unsigned(s_rom_index) + 1;
62
         END IF;
63
      END IF;
64
   END PROCESS make_rom_index;
65
 
66
   make_rom_data : PROCESS( s_rom_index )
67
   BEGIN
68
      CASE (s_rom_index) IS
69
         WHEN "011110" => push_data <= X"0A";
70
         WHEN "011101" => push_data <= X"39";
71
         WHEN "011100" => push_data <= X"2E";
72
         WHEN "011011" => push_data <= X"30";
73
         WHEN "011010" => push_data <= X"2C";
74
         WHEN "011001" => push_data <= X"30";
75
         WHEN "011000" => push_data <= X"2C";
76
         WHEN "010111" => push_data <= X"4D";
77
         WHEN "010110" => push_data <= X"4F";
78
         WHEN "010101" => push_data <= X"43";
79
         WHEN "010100" => push_data <= X"34";
80
         WHEN "010011" => push_data <= X"4F";
81
         WHEN "010010" => push_data <= X"4B";
82
         WHEN "010001" => push_data <= X"43";
83
         WHEN "010000" => push_data <= X"45";
84
         WHEN "001111" => push_data <= X"47";
85
         WHEN "001110" => push_data <= X"2C";
86
         WHEN "001101" => push_data <= X"62";
87
         WHEN "001100" => push_data <= X"61";
88
         WHEN "001011" => push_data <= X"4C";
89
         WHEN "001010" => push_data <= X"6F";
90
         WHEN "001001" => push_data <= X"72";
91
         WHEN "001000" => push_data <= X"63";
92
         WHEN "000111" => push_data <= X"69";
93
         WHEN "000110" => push_data <= X"6D";
94
         WHEN "000101" => push_data <= X"2D";
95
         WHEN "000100" => push_data <= X"45";
96
         WHEN "000011" => push_data <= X"43";
97
         WHEN "000010" => push_data <= X"55";
98
         WHEN "000001" => push_data <= X"48";
99
         WHEN "000000" => push_data <= X"1E";
100
         WHEN OTHERS   => push_data <= X"00";
101
      END CASE;
102
   END PROCESS make_rom_data;
103
END no_target_specific;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.