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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [sparc/] [lconf.vhd] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tarookumic
 
2
 
3
 
4
 
5
----------------------------------------------------------------------------
6
--  This file is a part of the LEON VHDL model
7
--  Copyright (C) 1999  European Space Agency (ESA)
8
--
9
--  This library is free software; you can redistribute it and/or
10
--  modify it under the terms of the GNU Lesser General Public
11
--  License as published by the Free Software Foundation; either
12
--  version 2 of the License, or (at your option) any later version.
13
--
14
--  See the file COPYING.LGPL for the full details of the license.
15
 
16
 
17
-----------------------------------------------------------------------------
18
-- Entity:      lconf
19
-- File:        lconf.vhd
20
-- Author:      Jiri Gaisler - ESA/ESTEC
21
-- Description: LEON configuration register. Returns the configuration
22
--              of the processor.
23
------------------------------------------------------------------------------
24
 
25
library IEEE;
26
use IEEE.std_logic_1164.all;
27
use IEEE.std_logic_arith.all;
28
use work.leon_target.all;
29
use work.leon_config.all;
30
use work.mmuconfig.all;
31
use work.leon_iface.all;
32
use work.amba.all;
33
entity lconf is
34
  port (
35
    rst    : std_logic;
36
    apbo   : out apb_slv_out_type
37
  );
38
end;
39
 
40
architecture rtl of lconf is
41
 
42
begin
43
 
44
  beh : process(rst)
45
  variable regsd : std_logic_vector(31 downto 0);
46
  begin
47
    regsd := (others => '0');
48
    if WPROTEN then regsd(1 downto 0) := "01"; end if;
49
    case PCICORE is
50
    when none      =>  regsd(3 downto 2) := "00";
51
    when insilicon =>  regsd(3 downto 2) := "01";
52
    when opencores =>  regsd(3 downto 2) := "10";
53
    when others    =>  regsd(3 downto 2) := "11";
54
    end case;
55
    if FPEN then
56
      if (FPCORE = meiko) then regsd(5 downto 4) := "01";
57
      else regsd(5 downto 4) := "10"; end if;
58
    end if;
59
    if AHBSTATEN then regsd(6) := '1'; end if;
60
    if WDOGEN then regsd(7) := '1'; end if;
61
    if MULTIPLIER /= none  then regsd(8) := '1'; end if;
62
    if DIVIDER /= none  then regsd(9) := '1'; end if;
63
    regsd(11 downto 10) := std_logic_vector(conv_unsigned(DLINE_BITS, 2));
64
    regsd(14 downto 12) := std_logic_vector(conv_unsigned(DLINE_BITS+DOFFSET_BITS-8, 3));
65
    regsd(16 downto 15) := std_logic_vector(conv_unsigned(ILINE_BITS, 2));
66
    regsd(19 downto 17) := std_logic_vector(conv_unsigned(ILINE_BITS+IOFFSET_BITS-8, 3));
67
    regsd(24 downto 20) := std_logic_vector(conv_unsigned(NWINDOWS-1,5));
68
    if MACEN  then regsd(25) := '1'; end if;
69
    regsd(28 downto 26) := std_logic_vector(conv_unsigned(WATCHPOINTS,3));
70
    if SDRAMEN then regsd(29) := '1'; end if;
71
    if DEBUG_UNIT then regsd(30) := '1'; end if;
72
    if M_EN then regsd(31) := '1'; end if;
73
 
74
    apbo.prdata <= regsd;
75
 
76
  end process;
77
 
78
 
79
end;
80
 
81
 

powered by: WebSVN 2.1.0

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