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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc3/] [or1ksim/] [peripheral/] [generic.h] - Blame information for rev 1745

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

Line No. Rev Author Line
1 1745 jeremybenn
/* generic.h -- Generic external peripheral
2
 
3
   Copyright (C) 2008 Embecosm Limited
4
 
5
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
6
 
7
   This file is part of OpenRISC 1000 Architectural Simulator.
8
 
9
   This program is free software; you can redistribute it and/or modify it
10
   under the terms of the GNU General Public License as published by the Free
11
   Software Foundation; either version 3 of the License, or (at your option)
12
   any later version.
13
 
14
   This program is distributed in the hope that it will be useful, but WITHOUT
15
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
   more details.
18
 
19
   You should have received a copy of the GNU General Public License along
20
   with this program.  If not, see <http://www.gnu.org/licenses/>. */
21
 
22
 
23
/* State associated with the generic device. */
24
 
25
struct dev_generic {
26
 
27
  /* Info about a particular transaction */
28
 
29
  enum {                                /* Direction of the access */
30
    GENERIC_READ,
31
    GENERIC_WRITE
32
  } trans_direction;
33
 
34
  enum {                                /* Size of the access */
35
    GENERIC_BYTE,
36
    GENERIC_HW,
37
    GENERIC_WORD
38
  } trans_size;
39
 
40
  uint32_t  value;                      /* The value to read/write */
41
 
42
  /* Configuration */
43
 
44
  int       enabled;                    /* Device enabled */
45
  int       byte_enabled;               /* Byte R/W allowed */
46
  int       hw_enabled;                 /* Half word R/W allowed */
47
  int       word_enabled;               /* Full word R/W allowed */
48
  char     *name;                       /* Name of the device */
49
  oraddr_t  baseaddr;                   /* Base address of device */
50
  uint32_t  size;                       /* Address space size (bytes) */
51
 
52
};

powered by: WebSVN 2.1.0

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