RTEMS 6.1-rc4
Loading...
Searching...
No Matches
reg_vim.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/* The header file is generated by make_header.py from VIM.json */
12/* Current script's version can be found at: */
13/* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
14
15/*
16 * Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com>
17 *
18 * Czech Technical University in Prague
19 * Zikova 1903/4
20 * 166 36 Praha 6
21 * Czech Republic
22 *
23 * All rights reserved.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions are met:
27 *
28 * 1. Redistributions of source code must retain the above copyright notice, this
29 * list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright notice,
31 * this list of conditions and the following disclaimer in the documentation
32 * and/or other materials provided with the distribution.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *
45 * The views and conclusions contained in the software and documentation are those
46 * of the authors and should not be interpreted as representing official policies,
47 * either expressed or implied, of the FreeBSD Project.
48*/
49#ifndef LIBBSP_ARM_TMS570_VIM
50#define LIBBSP_ARM_TMS570_VIM
51
52#include <bsp/utility.h>
53
54typedef struct{
55 uint32_t PARFLG; /*Interrupt Vector Table Parity Flag Register*/
56 uint32_t PARCTL; /*Interrupt Vector Table Parity Control Register*/
57 uint32_t ADDERR; /*Address Parity Error Register*/
58 uint32_t FBPARERR; /*Fall-Back Address Parity Error Register*/
59 uint8_t reserved1 [4];
60 uint32_t IRQINDEX; /*IRQ Index Offset Vector Register*/
61 uint32_t FIQINDEX; /*FIQ Index Offset Vector Register*/
62 uint8_t reserved2 [8];
63 uint32_t FIRQPR[3]; /*FIQ/IRQ Program Control Register*/
64 uint8_t reserved3 [4];
65 uint32_t INTREQ[3]; /*Pending Interrupt Read Location Register*/
66 uint8_t reserved4 [4];
67 uint32_t REQENASET[3]; /*Interrupt Enable Set Register */
68 uint8_t reserved5 [4];
69 uint32_t REQENACLR[3]; /*Interrupt Enable Clear Register */
70 uint8_t reserved6 [4];
71 uint32_t WAKEENASET[3]; /*Wake-Up Enable Set Register*/
72 uint8_t reserved7 [4];
73 uint32_t WAKEENACLR[3]; /*Wake-Up Enable Clear Registers*/
74 uint8_t reserved8 [4];
75 uint32_t IRQVECREG; /*IRQ Interrupt Vector Register*/
76 uint32_t FIQVECREG; /*FIQ Interrupt Vector Register*/
77 uint32_t CAPEVT; /*Capture Event Register*/
78 uint8_t reserved9 [4];
79 uint32_t CHANCTRL[24]; /*VIM Interrupt Control Register*/
81
82
83/*---------------------TMS570_VIM_PARFLG---------------------*/
84/* field: PARFLG - The PARFLG indicates that a parity error has been found and that theInterrupt Vector Table is */
85#define TMS570_VIM_PARFLG_PARFLG BSP_BIT32(0)
86
87
88/*---------------------TMS570_VIM_PARCTL---------------------*/
89/* field: TEST - This bit maps the parity bits into the Interrupt Vector Table frame to make them accessible by the */
90#define TMS570_VIM_PARCTL_TEST BSP_BIT32(8)
91
92/* field: PARENA - VIM parity enable. */
93#define TMS570_VIM_PARCTL_PARENA(val) BSP_FLD32(val,0, 3)
94#define TMS570_VIM_PARCTL_PARENA_GET(reg) BSP_FLD32GET(reg,0, 3)
95#define TMS570_VIM_PARCTL_PARENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
96
97
98/*---------------------TMS570_VIM_ADDERR---------------------*/
99/* field: Interrupt_Vector_Table - Interrupt Vector Table offset. */
100#define TMS570_VIM_ADDERR_Interrupt_Vector_Table(val) BSP_FLD32(val,9, 31)
101#define TMS570_VIM_ADDERR_Interrupt_Vector_Table_GET(reg) BSP_FLD32GET(reg,9, 31)
102#define TMS570_VIM_ADDERR_Interrupt_Vector_Table_SET(reg,val) BSP_FLD32SET(reg, val,9, 31)
103
104/* field: ADDERR - Address parity error register. */
105#define TMS570_VIM_ADDERR_ADDERR(val) BSP_FLD32(val,2, 8)
106#define TMS570_VIM_ADDERR_ADDERR_GET(reg) BSP_FLD32GET(reg,2, 8)
107#define TMS570_VIM_ADDERR_ADDERR_SET(reg,val) BSP_FLD32SET(reg, val,2, 8)
108
109/* field: Word_offset - Word offset. Reads are always 0; writes have no effect. */
110#define TMS570_VIM_ADDERR_Word_offset(val) BSP_FLD32(val,0, 1)
111#define TMS570_VIM_ADDERR_Word_offset_GET(reg) BSP_FLD32GET(reg,0, 1)
112#define TMS570_VIM_ADDERR_Word_offset_SET(reg,val) BSP_FLD32SET(reg, val,0, 1)
113
114
115/*--------------------TMS570_VIM_FBPARERR--------------------*/
116/* field: FBPARERR - Fall back address parity error. */
117/* Whole 32 bits */
118
119/*--------------------TMS570_VIM_IRQINDEX--------------------*/
120/* field: IRQINDEX - IRQ index vector. */
121#define TMS570_VIM_IRQINDEX_IRQINDEX(val) BSP_FLD32(val,0, 7)
122#define TMS570_VIM_IRQINDEX_IRQINDEX_GET(reg) BSP_FLD32GET(reg,0, 7)
123#define TMS570_VIM_IRQINDEX_IRQINDEX_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
124
125
126/*--------------------TMS570_VIM_FIQINDEX--------------------*/
127/* field: FIQINDEX - FIQ index offset vector. */
128#define TMS570_VIM_FIQINDEX_FIQINDEX(val) BSP_FLD32(val,0, 7)
129#define TMS570_VIM_FIQINDEX_FIQINDEX_GET(reg) BSP_FLD32GET(reg,0, 7)
130#define TMS570_VIM_FIQINDEX_FIQINDEX_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
131
132
133/*---------------------TMS570_VIM_FIRQPR---------------------*/
134/* field: FIRQPRx - FIQ/IRQ program control bits. 96 bit register. 0-1 bits reserved. */
135/* Whole 32 bits */
136
137/*---------------------TMS570_VIM_INTREQ---------------------*/
138/* field: INTREQx - Pending interrupt bits. 96 bit register. */
139/* Whole 32 bits */
140
141/*--------------------TMS570_VIM_REQENASET--------------------*/
142/* field: REQENASETx - Request enable set bits. 96 bit register. 0-1 bits reserved. */
143/* Whole 32 bits */
144
145/*--------------------TMS570_VIM_REQENACLR--------------------*/
146/* field: REQENACLRx - Request enable clear bits. 96 bit register. 0-1 bits reserved. */
147/* Whole 32 bits */
148
149/*-------------------TMS570_VIM_WAKEENASET-------------------*/
150/* field: WAKEENASETx - Wake-up enable set bits. This vector determines whether the wake-up interrupt line is enabled. */
151/* Whole 32 bits */
152
153/*-------------------TMS570_VIM_WAKEENACLR-------------------*/
154/* field: WAKEENACLRx - Wake-up enable clear bits. This vector determines whether the wake-up interrupt line is enabled. */
155/* Whole 32 bits */
156
157/*--------------------TMS570_VIM_IRQVECREG--------------------*/
158/* field: IRQVECREG - IRQ interrupt vector register. */
159/* Whole 32 bits */
160
161/*--------------------TMS570_VIM_FIQVECREG--------------------*/
162/* field: FIQVECREG - FIQ interrupt vector register. */
163/* Whole 32 bits */
164
165/*---------------------TMS570_VIM_CAPEVT---------------------*/
166/* field: CAPEVTSRC1 - Capture event source 1 mapping control. */
167#define TMS570_VIM_CAPEVT_CAPEVTSRC1(val) BSP_FLD32(val,16, 22)
168#define TMS570_VIM_CAPEVT_CAPEVTSRC1_GET(reg) BSP_FLD32GET(reg,16, 22)
169#define TMS570_VIM_CAPEVT_CAPEVTSRC1_SET(reg,val) BSP_FLD32SET(reg, val,16, 22)
170
171/* field: CAPEVTSRC0 - the capture event source 0 of the RTI: */
172#define TMS570_VIM_CAPEVT_CAPEVTSRC0(val) BSP_FLD32(val,0, 6)
173#define TMS570_VIM_CAPEVT_CAPEVTSRC0_GET(reg) BSP_FLD32GET(reg,0, 6)
174#define TMS570_VIM_CAPEVT_CAPEVTSRC0_SET(reg,val) BSP_FLD32SET(reg, val,0, 6)
175
176
177/*--------------------TMS570_VIM_CHANCTRL--------------------*/
178/* field: CHANMAPx0 - CHANMAPx 0(6-0). Interrupt CHANx 0 mapping control. */
179#define TMS570_VIM_CHANCTRL_CHANMAPx0(val) BSP_FLD32(val,24, 30)
180#define TMS570_VIM_CHANCTRL_CHANMAPx0_GET(reg) BSP_FLD32GET(reg,24, 30)
181#define TMS570_VIM_CHANCTRL_CHANMAPx0_SET(reg,val) BSP_FLD32SET(reg, val,24, 30)
182
183/* field: CHANMAPx1 - CHANMAPx 1(6-0). Interrupt CHANx 1 mapping control. */
184#define TMS570_VIM_CHANCTRL_CHANMAPx1(val) BSP_FLD32(val,16, 22)
185#define TMS570_VIM_CHANCTRL_CHANMAPx1_GET(reg) BSP_FLD32GET(reg,16, 22)
186#define TMS570_VIM_CHANCTRL_CHANMAPx1_SET(reg,val) BSP_FLD32SET(reg, val,16, 22)
187
188/* field: CHANMAPx2 - CHANMAPx 2(6-0). Interrupt CHANx 2 mapping control. */
189#define TMS570_VIM_CHANCTRL_CHANMAPx2(val) BSP_FLD32(val,8, 14)
190#define TMS570_VIM_CHANCTRL_CHANMAPx2_GET(reg) BSP_FLD32GET(reg,8, 14)
191#define TMS570_VIM_CHANCTRL_CHANMAPx2_SET(reg,val) BSP_FLD32SET(reg, val,8, 14)
192
193/* field: CHANMAPx3 - CHANMAPx 3(6-0). Interrupt CHANx 3 mapping control. */
194#define TMS570_VIM_CHANCTRL_CHANMAPx3(val) BSP_FLD32(val,0, 6)
195#define TMS570_VIM_CHANCTRL_CHANMAPx3_GET(reg) BSP_FLD32GET(reg,0, 6)
196#define TMS570_VIM_CHANCTRL_CHANMAPx3_SET(reg,val) BSP_FLD32SET(reg, val,0, 6)
197
198
199
200#endif /* LIBBSP_ARM_TMS570_VIM */
This header file provides utility macros for BSPs.
Definition: reg_vim.h:54