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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [sw/] [zipos/] [zipsys.h] - Blame information for rev 31

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

Line No. Rev Author Line
1 22 dgisselq
////////////////////////////////////////////////////////////////////////////////
2
//
3
// Filename:    zipsys.h
4
//
5
// Project:     CMod S6 System on a Chip, ZipCPU demonstration project
6
//
7
// Purpose:     Defines particular definitions specific to the ZipCPU. 
8
//              Originally designed to be specific to the ZipSystem, this has
9
//      been adjusted to just the CPU, since the CMod S6 doesn't have the full
10
//      ZipSystem implemented.
11
//
12
// Creator:     Dan Gisselquist, Ph.D.
13
//              Gisselquist Technology, LLC
14
//
15
////////////////////////////////////////////////////////////////////////////////
16
//
17
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
18
//
19
// This program is free software (firmware): you can redistribute it and/or
20
// modify it under the terms of  the GNU General Public License as published
21
// by the Free Software Foundation, either version 3 of the License, or (at
22
// your option) any later version.
23
//
24
// This program is distributed in the hope that it will be useful, but WITHOUT
25
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
26
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
27
// for more details.
28
//
29
// You should have received a copy of the GNU General Public License along
30
// with this program.  (It's in the $(ROOT)/doc directory, run make with no
31
// target there if the PDF file isn't present.)  If not, see
32
// <http://www.gnu.org/licenses/> for a copy.
33
//
34
// License:     GPL, v3, as defined and found on www.gnu.org,
35
//              http://www.gnu.org/licenses/gpl.html
36
//
37
//
38
////////////////////////////////////////////////////////////////////////////////
39
//
40
//
41
#ifndef ZIPSYS_H
42
#define ZIPSYS_H
43
 
44
#include "board.h"
45
 
46
#define CC_Z            0x0001
47
#define CC_C            0x0002
48
#define CC_N            0x0004
49
#define CC_V            0x0008
50
#define CC_SLEEP        0x0010
51
#define CC_GIE          0x0020
52
#define CC_STEP         0x0040
53
#define CC_BREAK        0x0080
54
#define CC_ILL          0x0100
55
#define CC_TRAPBIT      0x0200
56
#define CC_BUSERR       0x0400
57
#define CC_DIVERR       0x0800
58
#define CC_FPUERR       0x1000
59
#define CC_IPHASE       0x2000
60
 
61
extern void     zip_rtu(void);
62
extern void     zip_halt(void);
63
extern void     zip_idle(void);
64
extern void     zip_syscall(void);
65
extern void     zip_restore_context(int *);
66
extern void     zip_save_context(int *);
67
extern int      zip_bitrev(int v);
68
extern unsigned zip_cc(void);
69
extern unsigned zip_ucc(void);
70
 
71
extern  int     _top_of_heap[1];
72
 
73
extern  void    save_context(int *);
74
extern  void    restore_context(int *);
75
extern  int     syscall(const int,int,int,int);
76
 
77
#ifndef NULL
78
#define NULL    ((void *)0)
79
#endif
80
 
81
static inline void      DISABLE_INTS(void) {
82
        IOSPACE *sys = (IOSPACE *)IOADDR;
83
        sys->io_pic = 0;
84
}
85
 
86
static inline void      ENABLE_INTS(void) {
87
        IOSPACE *sys = (IOSPACE *)IOADDR;
88 27 dgisselq
        sys->io_pic = INT_ENABLE;
89 22 dgisselq
}
90
 
91
#endif

powered by: WebSVN 2.1.0

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