acacia.arch¶
Module Contents¶
Classes¶
Data¶
API¶
- class acacia.arch.PageSize¶
A representation a page size in a Microkit system. This is a simple dataclass that keeps a size, name, and a set of utility methods in one place.
- name: str¶
None
- size_bytes: int¶
None
- __post_init__()¶
- __eq__(value: object, /) bool¶
- addr_is_aligned(addr: int) bool¶
Return true if the given address is aligned to page boundary
- roundup_to_page(addr: int) int¶
Round an address up to the next page boundary.
- rounddown_to_page(addr: int) int¶
Round an address down to the previous page boundary.
- acacia.arch.SmallPage¶
‘PageSize(…)’
- acacia.arch.LargePage¶
‘PageSize(…)’
- acacia.arch.page_sizes¶
None
- class acacia.arch.Arch¶
Representation of a system architecture. Most of this API is provided for legacy use from sdf_gen.
- arch: acacia.arch.ArchID¶
None
- is_arm() bool¶
- is_riscv() bool¶
- is_x86() bool¶
- default_page_size() acacia.arch.PageSize¶
- default_page_size_bytes() int¶
- addr_is_page_aligned(addr: int, page_size: Optional[acacia.arch.PageSize] = None) bool¶
Check if an address or size is aligned to a page boundary. Selects the default arch page size if none is provided.
- roundup_to_page(n: int, page_size: Optional[acacia.arch.PageSize] = None) int¶
Given a size or address, round up to the nearest page boundary. Selects the default arch page size if none is provided.
- rounddown_to_page(n: int, page_size: Optional[acacia.arch.PageSize] = None) int¶
Given a size or address, round down to the nearest page boundary. Selects the default arch page size if none is provided.
- determine_region_page_size(size: int) acacia.arch.PageSize¶
Return the best page size for a region of a given size. I.e. the largest page size this region fits into without creating fragmentation.
- __repr__() str¶
- acacia.arch.aarch64¶
‘Arch(…)’
- acacia.arch.riscv64¶
‘Arch(…)’
- acacia.arch.x86_64¶
‘Arch(…)’