xheep_gen.xheep module
- class xheep_gen.xheep.XHeep(bus_type: BusType)
Bases:
objectRepresents the whole X-HEEP system.
An instance of this class is passed to the mako templates.
- Parameters:
bus_type (BusType) – The bus type chosen for this mcu.
- Raises:
TypeError – when parameters are of incorrect type.
- IL_COMPATIBLE_BUS_TYPES = [<BusType.NtoM: 'NtoM'>]
Constant set of bus types that support interleaved memory banks
- add_extension(name, extension)
Register an external extension or configuration (object, dict, etc.).
- Parameters:
name (str) – Name of the extension.
extension (Any) – The extension object.
- add_peripheral_domain(domain: PeripheralDomain)
Add a peripheral domain to the system. The domain should already contain all peripherals well configured. When adding a domain, a deepcopy is made to avoid side effects.
- Parameters:
domain (PeripheralDomain) – The domain to add.
- are_base_peripherals_configured() bool
- Returns:
True if the base peripherals are configured, False otherwise.
- Return type:
- are_peripherals_configured() bool
- Returns:
True if both base and user peripherals are configured, False otherwise.
- Return type:
- are_user_peripherals_configured() bool
- Returns:
True if the user peripherals are configured, False otherwise.
- Return type:
- build()
Makes the system ready to be used.
- get_base_peripheral_domain()
Returns a deepcopy of the base peripheral domain.
- Returns:
The base peripheral domain.
- Return type:
- get_extension(name)
Retrieve a previously registered extension.
- Parameters:
name (str) – Name of the extension.
- Returns:
The extension object.
- Return type:
Any
- get_padring()
- get_user_peripheral_domain()
Returns a deepcopy of the user peripheral domain.
- Returns:
The user peripheral domain.
- Return type:
- is_extension_defined(name)
Check if an extension is defined.
- memory_ss() MemorySS
- Returns:
the configured memory subsystem
- Return type:
MemorySS
- set_memory_ss(memory_ss: MemorySS)
Sets the memory subsystem of the system.
- Parameters:
memory_ss (MemorySS) – The memory subsystem to set.
- Raises:
TypeError – when memory_ss is of incorrect type.
- validate()
Does some basics checks on the configuration
This should be called before using the XHeep object to generate the project.