|
Embedded Artistry Framework
Embedded Systems C++ Framework
|
Interfaces and components for building a processor interface. More...
|
Classes | |
| class | embvm::VirtualProcessorBase< TProcessor > |
| Virtual Processor Base. More... | |
| class | embvm::VirtualProcessorArchBase< TArchitecture > |
| Virtual Interface for Common Architecture-Specific Functionality. More... | |
Interfaces and components for building a processor interface.
| class embvm::VirtualProcessorBase |
Virtual Processor Base.
This class provides the common interfaces and behaviors that virtual processors must implement. Some functionality is common to all platforms (name functions).
Functions whose names are appended with _ are meant to be supplied by the derived hardware platform:
Derived classes may supply additional functions as required. The functions above are the common required functions that all hardware platforms must supply.
This class uses the docs/development/patterns/crtp.md ["CRTP pattern"] rather than virtual inheritance. To derive from this class, do the following:
| TProcessor | the derived pocessor implementation (CRTP pattern) |

Public Member Functions | |
| VirtualProcessorBase (const char *name) noexcept | |
| Create a named virtual hardware platform. More... | |
| VirtualProcessorBase (const std::string &name) noexcept | |
| Create a named virtual hardware platform. More... | |
| VirtualProcessorBase (const std::string_view &name) noexcept | |
| Create a named virtual hardware platform. More... | |
| ~VirtualProcessorBase ()=default | |
| Default destructor. More... | |
| VirtualProcessorBase (const VirtualProcessorBase &)=delete | |
| Deleted copy constructor. More... | |
| const VirtualProcessorBase & | operator= (const VirtualProcessorBase &)=delete |
| Deleted copy assignment operator. More... | |
| VirtualProcessorBase (VirtualProcessorBase &&)=delete | |
| Deleted move constructor. More... | |
| VirtualProcessorBase & | operator= (VirtualProcessorBase &&)=delete |
| Deleted move assignment operator. More... | |
| constexpr const std::string_view & | name () const noexcept |
| Returns the Virtual HW Platform's name. More... | |
| constexpr const char * | name_cstr () const noexcept |
| Returns the platform name as a cstring for C API compatibility. More... | |
| void | init () noexcept |
| Initialize the processor. More... | |
| void | reset () noexcept |
| Reset the chip. More... | |
Static Public Member Functions | |
| static void | earlyInitHook () noexcept |
| Perform any special initialization steps. More... | |
Private Attributes | |
| const std::string_view | name_ |
|
inlineexplicitnoexcept |
Create a named virtual hardware platform.
| name | C-string containing the hardware platform name |
|
inlineexplicitnoexcept |
Create a named virtual hardware platform.
| name | std::string containing the hardware platform name Note: VirtualProcessorBase uses a std::string_view, so the std::string must remain valid throughout the lifetime of VirtualProcessorBase. |
|
inlineexplicitnoexcept |
Create a named virtual hardware platform.
| name | std::string_view containing the hardware platform name Note: VirtualProcessorBase uses a std::string_view, so the std::string_view must remain valid throughout the lifetime of VirtualProcessorBase. |
|
default |
Default destructor.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
inlinestaticnoexcept |
Perform any special initialization steps.
The earlyInitHook_() function must be implemented by the derived class as a static function.
These functions run before the C Run-time setup functions are called, and normal functionality (e.g. OS concepts) are not available.
Early initialization steps represent any super early code that needs to execute. For example, DRAM might need to be initialized before the boot process can relocate memory to its proper location in memory.
These functions are declared static to prevent you from easily using drivers within their confines
|
inlinenoexcept |
Initialize the processor.
The initProcessor_() function must be implemented by the derived class.
Perform any steps necessary for initializing the processor & processor peripheral devices for use.
Note that this is only intended to be processor initialization. Platform initialization nis handled by the init() function.
This function will likely invoke the VirtualProcessor::init() function, but the order and actual initialization process is left to the derived class.
Referenced by BlinkySimulatorHWPlatform::initProcessor_(), and FWDemoSimulatorHWPlatform::initProcessor_().
|
inlinenoexcept |
Returns the Virtual HW Platform's name.
|
inlinenoexcept |
Returns the platform name as a cstring for C API compatibility.
|
delete |
Deleted copy assignment operator.
|
delete |
Deleted move assignment operator.
|
inlinenoexcept |
Reset the chip.
The reset_() function must be implemnted by the derived class.
A soft reset is intended to reset the program to the beginning without performing a full power cycle.
|
private |
| class embvm::VirtualProcessorArchBase |
Virtual Interface for Common Architecture-Specific Functionality.
Virtual processor arch won't actually be part of the processor's inheritance tree. There will be a base class, or set of classes, which can be inherited from through CRTP. All methods will be static. There won't be an instance directly. This will allow us to keep things separated much more nicely.

Public Member Functions | |
| VirtualProcessorArchBase (const VirtualProcessorArchBase &)=delete | |
| Deleted copy constructor. More... | |
| const VirtualProcessorArchBase & | operator= (const VirtualProcessorArchBase &)=delete |
| Deleted copy assignment operator. More... | |
| VirtualProcessorArchBase (VirtualProcessorArchBase &&)=delete | |
| Deleted move constructor. More... | |
| VirtualProcessorArchBase & | operator= (VirtualProcessorArchBase &&)=delete |
| Deleted move assignment operator. More... | |
Static Public Member Functions | |
| static void | interruptsEnable () noexcept |
| static void | interruptsDisable () noexcept |
| static void | memoryBarrier () noexcept |
| static void | instructionBarrier () noexcept |
Protected Member Functions | |
| ~VirtualProcessorArchBase ()=default | |
| VirtualProcessorArchBase ()=default | |
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
protecteddefault |
|
protecteddefault |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
delete |
Deleted copy assignment operator.
|
delete |
Deleted move assignment operator.
1.8.15