Hardware Libraries  20.1
Arria 10 SoC Hardware Manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
alt_ecc.h
1 /******************************************************************************
2  *
3  * Copyright 2015 Altera Corporation. All Rights Reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its contributors
16  * may be used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  *
31  ******************************************************************************/
32 
33 /*
34  * $Id: //acds/rel/20.1/embedded/ip/hps/altera_hps/hwlib/include/soc_a10/alt_ecc.h#1 $
35  */
36 
37 #ifndef __ALT_ECC_H__
38 #define __ALT_ECC_H__
39 
40 #include "hwlib.h"
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif /* __cplusplus */
46 
89 typedef enum ALT_ECC_RAM_ENUM_e
90 {
103 
123 typedef enum ALT_ECC_STATUS_e
124 {
247 
248 /*****/
249 
257 ALT_STATUS_CODE alt_ecc_init(void);
258 
266 ALT_STATUS_CODE alt_ecc_uninit(void);
267 
303 ALT_STATUS_CODE alt_ecc_start(ALT_ECC_RAM_ENUM_t ram_block);
304 
315 ALT_STATUS_CODE alt_ecc_stop(ALT_ECC_RAM_ENUM_t ram_block);
316 
328 ALT_STATUS_CODE alt_ecc_is_enabled(ALT_ECC_RAM_ENUM_t ram_block);
329 
330 /*****/
331 
352 ALT_STATUS_CODE alt_ecc_status_get(ALT_ECC_RAM_ENUM_t ram_block,
353  uint32_t * status);
354 
374 ALT_STATUS_CODE alt_ecc_status_get_next(ALT_ECC_RAM_ENUM_t * ram_block,
375  uint32_t * status);
376 
397 ALT_STATUS_CODE alt_ecc_status_clear(ALT_ECC_RAM_ENUM_t ram_block,
398  uint32_t ecc_mask);
399 
412 ALT_STATUS_CODE alt_ecc_status_int_enable(ALT_ECC_RAM_ENUM_t ram_block);
413 
426 ALT_STATUS_CODE alt_ecc_status_int_disable(ALT_ECC_RAM_ENUM_t ram_block);
427 
461 ALT_STATUS_CODE alt_ecc_serr_inject(ALT_ECC_RAM_ENUM_t ram_block,
462  uintptr_t location, uint32_t mem_size);
463 
497 ALT_STATUS_CODE alt_ecc_derr_inject(ALT_ECC_RAM_ENUM_t ram_block,
498  uintptr_t location, uint32_t mem_size);
499 
504 #ifdef __cplusplus
505 }
506 #endif /* __cplusplus */
507 
508 #endif /* __ALT_ECC_H__ */