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

Subversion Repositories marca

[/] [marca/] [tags/] [INITIAL/] [vhdl/] [sc_pkg.vhd] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jeunes2
--  This file is part of the marca processor.
2
--  Copyright (C) 2007 Wolfgang Puffitsch
3
 
4
--  This program is free software; you can redistribute it and/or modify it
5
--  under the terms of the GNU Library General Public License as published
6
--  by the Free Software Foundation; either version 2, or (at your option)
7
--  any later version.
8
 
9
--  This program is distributed in the hope that it will be useful,
10
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
--  Library General Public License for more details.
13
 
14
--  You should have received a copy of the GNU Library General Public
15
--  License along with this program; if not, write to the Free Software
16
--  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
17
 
18
-------------------------------------------------------------------------------
19
-- Package SC
20
-------------------------------------------------------------------------------
21
-- definitions for the SimpCon interface
22
-------------------------------------------------------------------------------
23
 
24
-------------------------------------------------------------------------------
25
-- Wolfgang Puffitsch
26
-- Computer Architecture Lab, Group 3
27
-------------------------------------------------------------------------------
28
 
29
library IEEE;
30
use IEEE.std_logic_1164.all;
31
use IEEE.numeric_std.all;
32
 
33
use work.marca_pkg.all;
34
 
35
package sc_pkg is
36
 
37
  -----------------------------------------------------------------------------
38
  -- general configuration
39
  -----------------------------------------------------------------------------
40
  constant SC_ADDR_WIDTH : integer := 2;
41
  constant SC_REG_WIDTH  : integer := 16;
42
 
43
  -----------------------------------------------------------------------------
44
  -- where to access SimCon modules
45
  -----------------------------------------------------------------------------
46
  constant SC_MIN_ADDR   : std_logic_vector := "1111111111111000";
47
  constant SC_MAX_ADDR   : std_logic_vector := "1111111111111111";
48
 
49
  -----------------------------------------------------------------------------
50
  -- records for simpler interfacing
51
  -----------------------------------------------------------------------------
52
  type SC_IN is record
53
                  address : std_logic_vector(SC_ADDR_WIDTH-1 downto 0);
54
                  wr      : std_logic;
55
                  wr_data : std_logic_vector(SC_REG_WIDTH-1 downto 0);
56
                  rd      : std_logic;
57
                end record;
58
 
59
  constant SC_IN_NULL : SC_IN := ((others => '0'), '0', (others => '0'), '0');
60
 
61
  type SC_OUT is record
62
                   rd_data : std_logic_vector(SC_REG_WIDTH-1 downto 0);
63
                   rdy_cnt : unsigned(1 downto 0);
64
                 end record;
65
 
66
  constant SC_OUT_NULL : SC_OUT := ((others => '0'), "00");
67
 
68
  -----------------------------------------------------------------------------
69
  -- output bits
70
  -----------------------------------------------------------------------------
71
  constant UART_TXD  : integer := 0;
72
  constant UART_NRTS : integer := 1;
73
 
74
  -----------------------------------------------------------------------------
75
  -- input bits
76
  -----------------------------------------------------------------------------
77
  constant UART_RXD  : integer := 0;
78
  constant UART_NCTS : integer := 1;
79
 
80
  -----------------------------------------------------------------------------
81
  -- interrupt numbers, >= 3
82
  -----------------------------------------------------------------------------
83
  constant UART_INTR : integer := 3;
84
 
85
  -----------------------------------------------------------------------------
86
  -- UART configuration
87
  -----------------------------------------------------------------------------
88
  constant UART_BASE_ADDR : std_logic_vector(REG_WIDTH-1 downto SC_ADDR_WIDTH+1) := "1111111111111";
89
  constant UART_BAUD_RATE : integer := 115200;
90
 
91
end sc_pkg;

powered by: WebSVN 2.1.0

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