RTEMS 6.1-rc4
Loading...
Searching...
No Matches
reg_tcram.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 TCRAM.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_TCRAM
50#define LIBBSP_ARM_TMS570_TCRAM
51
52#include <bsp/utility.h>
53
54typedef struct{
55 uint32_t RAMCTRL; /*TCRAM Module Control Register*/
56 uint32_t RAMTHRESHOLD; /*TCRAM Module Single-Bit Error Correction Threshold Register*/
57 uint32_t RAMOCCUR; /*TCRAM Module Single-Bit Error Occurrences Control Register*/
58 uint32_t RAMINTCTRL; /*TCRAM Module Interrupt Control Register*/
59 uint32_t RAMERRSTATUS; /*TCRAM Module Error Status Register*/
60 uint32_t RAMSERRADDR; /*TCRAM Module Single-Bit Error Address Register*/
61 uint8_t reserved1 [4];
62 uint32_t RAMUERRADDR; /*TCRAM Module Uncorrectable Error Address Register*/
63 uint8_t reserved2 [16];
64 uint32_t RAMTEST; /*TCRAM Module Test Mode Control Register*/
65 uint8_t reserved3 [4];
66 uint32_t RAMADDRDECVECT; /*TCRAM Module Test Mode Vector Register*/
67 uint32_t RAMPERADDR; /*TCRAM Module Parity Error Address Register*/
69
70
71/*--------------------TMS570_TCRAM_RAMCTRL--------------------*/
72/* field: EMU_TRACE_DIS - Emulation Mode Trace Disable. */
73#define TMS570_TCRAM_RAMCTRL_EMU_TRACE_DIS BSP_BIT32(30)
74
75/* field: ADDR_PARITY_OVERRIDE - Address Parity Override. */
76#define TMS570_TCRAM_RAMCTRL_ADDR_PARITY_OVERRIDE(val) BSP_FLD32(val,24, 27)
77#define TMS570_TCRAM_RAMCTRL_ADDR_PARITY_OVERRIDE_GET(reg) BSP_FLD32GET(reg,24, 27)
78#define TMS570_TCRAM_RAMCTRL_ADDR_PARITY_OVERRIDE_SET(reg,val) BSP_FLD32SET(reg, val,24, 27)
79
80/* field: ADDR_PARITY_DISABLE - Address Parity Detect Disable. */
81#define TMS570_TCRAM_RAMCTRL_ADDR_PARITY_DISABLE(val) BSP_FLD32(val,16, 19)
82#define TMS570_TCRAM_RAMCTRL_ADDR_PARITY_DISABLE_GET(reg) BSP_FLD32GET(reg,16, 19)
83#define TMS570_TCRAM_RAMCTRL_ADDR_PARITY_DISABLE_SET(reg,val) BSP_FLD32SET(reg, val,16, 19)
84
85/* field: ECC_WR_EN - ECC Memory Write Enable. */
86#define TMS570_TCRAM_RAMCTRL_ECC_WR_EN BSP_BIT32(8)
87
88/* field: ECC_DETECT_EN - ECC Detect Enable. */
89#define TMS570_TCRAM_RAMCTRL_ECC_DETECT_EN(val) BSP_FLD32(val,0, 3)
90#define TMS570_TCRAM_RAMCTRL_ECC_DETECT_EN_GET(reg) BSP_FLD32GET(reg,0, 3)
91#define TMS570_TCRAM_RAMCTRL_ECC_DETECT_EN_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
92
93
94/*-----------------TMS570_TCRAM_RAMTHRESHOLD-----------------*/
95/* field: THRESHOLD - Single-bit Error Threshold Count. */
96#define TMS570_TCRAM_RAMTHRESHOLD_THRESHOLD(val) BSP_FLD32(val,0, 15)
97#define TMS570_TCRAM_RAMTHRESHOLD_THRESHOLD_GET(reg) BSP_FLD32GET(reg,0, 15)
98#define TMS570_TCRAM_RAMTHRESHOLD_THRESHOLD_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
99
100
101/*-------------------TMS570_TCRAM_RAMOCCUR-------------------*/
102/* field: SINGLE_ERROR - Single-bit Error Correction Occurrences. */
103#define TMS570_TCRAM_RAMOCCUR_SINGLE_ERROR(val) BSP_FLD32(val,0, 15)
104#define TMS570_TCRAM_RAMOCCUR_SINGLE_ERROR_GET(reg) BSP_FLD32GET(reg,0, 15)
105#define TMS570_TCRAM_RAMOCCUR_SINGLE_ERROR_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
106
107
108/*------------------TMS570_TCRAM_RAMINTCTRL------------------*/
109/* field: SERR_EN - Single-bit Error Correction Interrupt Enable. */
110#define TMS570_TCRAM_RAMINTCTRL_SERR_EN BSP_BIT32(0)
111
112
113/*-----------------TMS570_TCRAM_RAMERRSTATUS-----------------*/
114/* field: WADDR_PAR_FAIL - This bit indicates a Write Address Parity Failure. */
115#define TMS570_TCRAM_RAMERRSTATUS_WADDR_PAR_FAIL BSP_BIT32(9)
116
117/* field: RADDR_PAR_FAIL - This bit indicates a Read Address Parity Failure. */
118#define TMS570_TCRAM_RAMERRSTATUS_RADDR_PAR_FAIL BSP_BIT32(8)
119
120/* field: DERR - This bit indicates a multi-bit error detected by the Cortex-R4F SECDED logic. */
121#define TMS570_TCRAM_RAMERRSTATUS_DERR BSP_BIT32(5)
122
123/* field: ADDR_COMP_LOGIC_FAIL - Address decode logic element failed. */
124#define TMS570_TCRAM_RAMERRSTATUS_ADDR_COMP_LOGIC_FAIL BSP_BIT32(4)
125
126/* field: ADDR_DEC_FAIL - Address decode failed. */
127#define TMS570_TCRAM_RAMERRSTATUS_ADDR_DEC_FAIL BSP_BIT32(2)
128
129/* field: SERR - Single Error Status. */
130#define TMS570_TCRAM_RAMERRSTATUS_SERR BSP_BIT32(0)
131
132
133/*------------------TMS570_TCRAM_RAMSERRADDR------------------*/
134/* field: SINGLE_ERROR_ADDRESS - This register captures the bits 17-3 of the address for which the Cortex-R4F CPU */
135#define TMS570_TCRAM_RAMSERRADDR_SINGLE_ERROR_ADDRESS(val) BSP_FLD32(val,3, 17)
136#define TMS570_TCRAM_RAMSERRADDR_SINGLE_ERROR_ADDRESS_GET(reg) BSP_FLD32GET(reg,3, 17)
137#define TMS570_TCRAM_RAMSERRADDR_SINGLE_ERROR_ADDRESS_SET(reg,val) BSP_FLD32SET(reg, val,3, 17)
138
139
140/*------------------TMS570_TCRAM_RAMUERRADDR------------------*/
141/* field: UNCORRECTABLE - address parity error. */
142#define TMS570_TCRAM_RAMUERRADDR_UNCORRECTABLE(val) BSP_FLD32(val,3, 22)
143#define TMS570_TCRAM_RAMUERRADDR_UNCORRECTABLE_GET(reg) BSP_FLD32GET(reg,3, 22)
144#define TMS570_TCRAM_RAMUERRADDR_UNCORRECTABLE_SET(reg,val) BSP_FLD32SET(reg, val,3, 22)
145
146
147/*--------------------TMS570_TCRAM_RAMTEST--------------------*/
148/* field: TRIGGER - Test Trigger. */
149#define TMS570_TCRAM_RAMTEST_TRIGGER BSP_BIT32(8)
150
151/* field: TEST_MODE - Test Mode. This field selects either equality of inequality testing schemes. */
152#define TMS570_TCRAM_RAMTEST_TEST_MODE(val) BSP_FLD32(val,6, 7)
153#define TMS570_TCRAM_RAMTEST_TEST_MODE_GET(reg) BSP_FLD32GET(reg,6, 7)
154#define TMS570_TCRAM_RAMTEST_TEST_MODE_SET(reg,val) BSP_FLD32SET(reg, val,6, 7)
155
156/* field: TEST_ENABLE - Test Enable. */
157#define TMS570_TCRAM_RAMTEST_TEST_ENABLE(val) BSP_FLD32(val,0, 3)
158#define TMS570_TCRAM_RAMTEST_TEST_ENABLE_GET(reg) BSP_FLD32GET(reg,0, 3)
159#define TMS570_TCRAM_RAMTEST_TEST_ENABLE_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
160
161
162/*----------------TMS570_TCRAM_RAMADDRDECVECT----------------*/
163/* field: ECC_SELECT - ECC Select. */
164#define TMS570_TCRAM_RAMADDRDECVECT_ECC_SELECT BSP_BIT32(26)
165
166/* field: RAM_CHIP_SELECT - RAM Chip Select. */
167#define TMS570_TCRAM_RAMADDRDECVECT_RAM_CHIP_SELECT(val) BSP_FLD32(val,0, 15)
168#define TMS570_TCRAM_RAMADDRDECVECT_RAM_CHIP_SELECT_GET(reg) BSP_FLD32GET(reg,0, 15)
169#define TMS570_TCRAM_RAMADDRDECVECT_RAM_CHIP_SELECT_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
170
171
172/*------------------TMS570_TCRAM_RAMPERADDR------------------*/
173/* field: ADDRESS_PARITY - Parity Error Address. */
174#define TMS570_TCRAM_RAMPERADDR_ADDRESS_PARITY(val) BSP_FLD32(val,3, 22)
175#define TMS570_TCRAM_RAMPERADDR_ADDRESS_PARITY_GET(reg) BSP_FLD32GET(reg,3, 22)
176#define TMS570_TCRAM_RAMPERADDR_ADDRESS_PARITY_SET(reg,val) BSP_FLD32SET(reg, val,3, 22)
177
178
179
180#endif /* LIBBSP_ARM_TMS570_TCRAM */
This header file provides utility macros for BSPs.
Definition: reg_tcram.h:54