Hardware Libraries
20.1
Arria 10 SoC Hardware Manager
Main Page
Address Space
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
alt_cache.h
1
/******************************************************************************
2
*
3
* Copyright 2013 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/alt_cache.h#1 $
35
*/
36
37
#ifndef __ALT_CACHE_H__
38
#define __ALT_CACHE_H__
39
40
#include "hwlib.h"
41
42
#ifdef __cplusplus
43
extern
"C"
44
{
45
#endif
46
115
#ifndef ALT_CACHE_SUPPORT_NON_FLAT_VIRTUAL_MEMORY
116
#define ALT_CACHE_SUPPORT_NON_FLAT_VIRTUAL_MEMORY (0)
117
#endif
118
122
#define ALT_CACHE_LINE_SIZE 32
123
134
ALT_STATUS_CODE
alt_cache_system_enable
(
void
);
135
145
ALT_STATUS_CODE
alt_cache_system_disable
(
void
);
146
179
ALT_STATUS_CODE
alt_cache_system_invalidate
(
void
* vaddress,
size_t
length);
180
213
ALT_STATUS_CODE
alt_cache_system_clean
(
void
* vaddress,
size_t
length);
214
249
ALT_STATUS_CODE
alt_cache_system_purge
(
void
* vaddress,
size_t
length);
250
291
ALT_STATUS_CODE
alt_cache_l1_enable_all
(
void
);
292
305
ALT_STATUS_CODE
alt_cache_l1_disable_all
(
void
);
306
315
ALT_STATUS_CODE
alt_cache_l1_instruction_enable
(
void
);
316
323
ALT_STATUS_CODE
alt_cache_l1_instruction_disable
(
void
);
324
332
bool
alt_cache_l1_instruction_is_enabled
(
void
);
333
347
ALT_STATUS_CODE
alt_cache_l1_instruction_invalidate
(
void
);
348
358
ALT_STATUS_CODE
alt_cache_l1_data_enable
(
void
);
359
369
ALT_STATUS_CODE
alt_cache_l1_data_disable
(
void
);
370
378
bool
alt_cache_l1_data_is_enabled
(
void
);
379
399
ALT_STATUS_CODE
alt_cache_l1_data_invalidate
(
void
* vaddress,
size_t
length);
400
413
ALT_STATUS_CODE
alt_cache_l1_data_invalidate_all
(
void
);
414
434
ALT_STATUS_CODE
alt_cache_l1_data_clean
(
void
* vaddress,
size_t
length);
435
442
ALT_STATUS_CODE
alt_cache_l1_data_clean_all
(
void
);
443
468
ALT_STATUS_CODE
alt_cache_l1_data_purge
(
void
* vaddress,
size_t
length);
469
476
ALT_STATUS_CODE
alt_cache_l1_data_purge_all
(
void
);
477
510
ALT_STATUS_CODE
alt_cache_l1_parity_enable
(
void
);
511
518
ALT_STATUS_CODE
alt_cache_l1_parity_disable
(
void
);
519
529
bool
alt_cache_l1_parity_is_enabled
(
void
);
530
541
ALT_STATUS_CODE
alt_cache_l1_branch_enable
(
void
);
542
552
ALT_STATUS_CODE
alt_cache_l1_branch_disable
(
void
);
553
562
bool
alt_cache_l1_branch_is_enabled
(
void
);
563
571
ALT_STATUS_CODE
alt_cache_l1_branch_invalidate
(
void
);
572
584
ALT_STATUS_CODE
alt_cache_l1_prefetch_enable
(
void
);
585
592
ALT_STATUS_CODE
alt_cache_l1_prefetch_disable
(
void
);
593
601
bool
alt_cache_l1_prefetch_is_enabled
(
void
);
602
641
ALT_STATUS_CODE
alt_cache_l2_init
(
void
);
642
649
ALT_STATUS_CODE
alt_cache_l2_uninit
(
void
);
650
662
ALT_STATUS_CODE
alt_cache_l2_prefetch_enable
(
void
);
663
675
ALT_STATUS_CODE
alt_cache_l2_prefetch_disable
(
void
);
676
686
bool
alt_cache_l2_prefetch_is_enabled
(
void
);
687
713
ALT_STATUS_CODE
alt_cache_l2_parity_enable
(
void
);
714
721
ALT_STATUS_CODE
alt_cache_l2_parity_disable
(
void
);
722
732
bool
alt_cache_l2_parity_is_enabled
(
void
);
733
743
ALT_STATUS_CODE
alt_cache_l2_enable
(
void
);
744
754
ALT_STATUS_CODE
alt_cache_l2_disable
(
void
);
755
763
bool
alt_cache_l2_is_enabled
(
void
);
764
772
ALT_STATUS_CODE
alt_cache_l2_sync
(
void
);
773
794
ALT_STATUS_CODE
alt_cache_l2_invalidate
(
void
* paddress,
size_t
length);
795
808
ALT_STATUS_CODE
alt_cache_l2_invalidate_all
(
void
);
809
829
ALT_STATUS_CODE
alt_cache_l2_clean
(
void
* paddress,
size_t
length);
830
840
ALT_STATUS_CODE
alt_cache_l2_clean_all
(
void
);
841
861
ALT_STATUS_CODE
alt_cache_l2_purge
(
void
* paddress,
size_t
length);
862
872
ALT_STATUS_CODE
alt_cache_l2_purge_all
(
void
);
873
878
enum
ALT_CACHE_L2_INTERRUPT_e
879
{
881
ALT_CACHE_L2_INTERRUPT_DECERR
= 1 << 8,
882
884
ALT_CACHE_L2_INTERRUPT_SLVERR
= 1 << 7,
885
887
ALT_CACHE_L2_INTERRUPT_ERRRD
= 1 << 6,
888
890
ALT_CACHE_L2_INTERRUPT_ERRRT
= 1 << 5,
891
893
ALT_CACHE_L2_INTERRUPT_ERRWD
= 1 << 4,
894
896
ALT_CACHE_L2_INTERRUPT_ERRWT
= 1 << 3,
897
899
ALT_CACHE_L2_INTERRUPT_PARRD
= 1 << 2,
900
902
ALT_CACHE_L2_INTERRUPT_PARRT
= 1 << 1,
903
905
ALT_CACHE_L2_INTERRUPT_ECNTR
= 1 << 0
906
};
907
typedef
enum
ALT_CACHE_L2_INTERRUPT_e
ALT_CACHE_L2_INTERRUPT_t;
908
920
ALT_STATUS_CODE
alt_cache_l2_int_enable
(uint32_t interrupt);
921
933
ALT_STATUS_CODE
alt_cache_l2_int_disable
(uint32_t interrupt);
934
942
uint32_t
alt_cache_l2_int_status_get
(
void
);
943
950
uint32_t
alt_cache_l2_int_raw_status_get
(
void
);
951
964
ALT_STATUS_CODE
alt_cache_l2_int_status_clear
(uint32_t interrupt);
965
974
#ifdef __cplusplus
975
}
976
#endif
977
978
#endif
/* __ALT_CACHE_H__ */
include
alt_cache.h
Generated on Tue Oct 27 2020 08:37:28 for Hardware Libraries by
1.8.2