Python TLB API¶
| 함수 | 시그니처 |
|---|---|
init_tlb |
(tlb_init_info: TLBInitInfo) -> None |
alloc_tlb_page |
(tlb_alloc_info: TLBAllocInfo) -> None |
dealloc_tlb_page |
(tlb_dealloc_info: TLBDeallocInfo) -> None |
configure_tlb |
(page_size: int, shared_channel_number: int, auto_prefetch_enable: bool = False, auto_prefetch_len_x: int = 0, auto_prefetch_len_y: int = 0, auto_prefetch_stride_y: int = 0, transl_time_limit: int = 0) -> None |
set_page_table_range |
(page_table_base_addr: int, page_table_size: int, effective_vpn_width: int, cache_invalidate: bool = True) -> None |
flush_tlb |
() -> None |
TLBInitInfo, TLBAllocInfo, TLBDeallocInfo, PageType, ValuePageMode는 hart.hart에서 import합니다
(Types). init_tlb()은 Bertha DC EVT0 전용이고, EVT1은 configure_tlb()와 set_page_table_range()로
TLB를 설정합니다. 각 함수의 의미는 C++ TLB API와 같습니다.
예제¶
alloc_tlb_page¶
한 요청에 페이지 종류별로 페이지를 할당합니다.
예제
1 2 3 4 5 6 7 | |
dealloc_tlb_page¶
요청이 끝나면 그 페이지를 돌려줍니다.
예제
1 2 3 4 5 6 7 | |
init_tlb¶
정적 KV 캐시 경로, Bertha DC EVT0 전용입니다.
예제
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |