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

Subversion Repositories xucpu

[/] [xucpu/] [trunk/] [VHDL/] [decoder/] [decoder.vhdl] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 lcdsgmtr
-- Copyright 2015, Jürgen Defurne
2
--
3
-- This file is part of the Experimental Unstable CPU System.
4
--
5
-- The Experimental Unstable CPU System Is free software: you can redistribute
6
-- it and/or modify it under the terms of the GNU Lesser General Public License
7
-- as published by the Free Software Foundation, either version 3 of the
8
-- License, or (at your option) any later version.
9
--
10
-- The Experimental Unstable CPU System is distributed in the hope that it will
11
-- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
13
-- General Public License for more details.
14
--
15
-- You should have received a copy of the GNU Lesser General Public License
16
-- along with Experimental Unstable CPU System. If not, see
17
-- http://www.gnu.org/licenses/lgpl.txt.
18
 
19
 
20
LIBRARY IEEE;
21
USE IEEE.STD_LOGIC_1164.ALL;
22
 
23
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
--use IEEE.NUMERIC_STD.ALL;
26
 
27
-- Uncomment the following library declaration if instantiating
28
-- any Xilinx primitives in this code.
29
--library UNISIM;
30
--use UNISIM.VComponents.all;
31
 
32
ENTITY decoder IS
33
  PORT (address : IN  STD_LOGIC_VECTOR (14 DOWNTO 0);
34
        device  : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
35
        bussel  : OUT STD_LOGIC_VECTOR(7 DOWNTO 0));
36
END decoder;
37
 
38
ARCHITECTURE Behavioral OF decoder IS
39
 
40
BEGIN
41
 
42
  -- purpose: Decode the address to control devices
43
  -- type   : combinational
44
  -- inputs : address
45
  -- outputs: 
46
  decode : PROCESS (address)
47
  BEGIN  -- PROCESS decode
48
 
49
    CASE address IS
50
      WHEN "111111111110000" =>
51
        device <= "00000001";
52
        bussel <= "00000001";
53
      WHEN "111111111110001" =>
54
        device <= "00000010";
55
        bussel <= "00000010";
56
      WHEN "111111111110010" =>
57
        device <= "00000100";
58
        bussel <= "00000100";
59
      WHEN "111111111110011" =>
60
        device <= "00001000";
61
        bussel <= "00001000";
62
      WHEN OTHERS =>
63
        device <= "00000000";
64
        bussel <= "00010000";
65
    END CASE;
66
  END PROCESS decode;
67
 
68
END Behavioral;
69
 

powered by: WebSVN 2.1.0

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