defines
Classes
SocCapability
SoC available capabilities
MemoryType
SoC available memory types
Attributes
is_init_ram
property
Whether the _INIT placement for this memory targets loadable RAM.
Memories whose *_INIT linker macro places symbols into
loadable RAM (i.e. the section is writable at the linker
level, with bytes copied from a load region at boot) cannot
be declared const at the C type level — GNU ld will
otherwise infer a read-only section group, refuse to merge
with the writable RAM section, and orphan the symbol into an
unrelated output section.
Returns:
Functions
init_const_qualifier
C const prefix appropriate for an _INIT blob in this memory.
Returns "const " for memories whose init section is
read-only at link time (flash/XIP), and "" for memories
whose init section is loadable RAM (where const would
cause a section-flag conflict — see :attr:is_init_ram).
Returns:
to_qualifiers
Convert memory placement to C qualifiers
Parameters:
-
(prefixstr, default:'AOT') –Prefix for the qualifier macro
-
(initbool, default:False) –For pre-initialized data (aka .data) vs zeroed (.bss)
-
(writablebool, default:True) –Whether the data will be written to at runtime
Returns:
-
str(str) –C qualifier macro (e.g., AOT_PUT_IN_SRAM_INIT)
SocPlatform
Base class for SoC platforms
Attributes:
-
name(str) –Unique platform name
-
speeds(list[int]) –List of supported clock speeds in MHz
-
memories(dict[MemoryType, int]) –Memory sizes in bytes
-
capabilities(list[SocCapability]) –List of SoC capabilities
-
preferred_memory_order(list[MemoryType]) –Preferred memory order for allocations
-
min_alignment(int | None) –Minimum alignment requirement in bytes