The Sparta Modeling Framework
Loading...
Searching...
No Matches
core_example::CPUFactory Class Reference
Inheritance diagram for core_example::CPUFactory:
Collaboration diagram for core_example::CPUFactory:

Public Member Functions

 CPUFactory ()
 Constructor for CPUFactory.
 
 ~CPUFactory ()
 Destructor for CPUFactory.
 
auto setTopology (const std::string &, const uint32_t) -> void
 Set the user-defined topology for this microarchitecture.
 
auto buildTree (sparta::RootTreeNode *) -> void
 Build the device tree by instantiating resource nodes.
 
auto bindTree (sparta::RootTreeNode *) -> void
 Bind all the ports between different units and set TLBs and preload.
 
auto getResourceNames () const -> const std::vector< std::string > &
 Get the list of resources instantiated in this topology.
 
- Public Member Functions inherited from sparta::ResourceFactory< CPU, CPU::CPUParameterSet >
 ResourceFactory (const ResourceFactory &rhp)=delete
 
ResourceFactoryoperator= (const ResourceFactory &rhp)=delete
 
virtual std::string getResourceType () const override
 Returns the resource type-name for this resource, demangled.
 
virtual std::string getResourceTypeRaw () const override
 Returns the resource type-name for this resource as in the typeid.
 
virtual ParameterSetcreateParameters (TreeNode *node) override
 Creates a new set of parameters associated with the resource that can be created by this factory.
 
virtual void deleteParameters (ParameterSet *params) override
 Deletes a ParameterSet created by the createParameters method of this ResourceFactory.
 
virtual void createSubtree (sparta::ResourceTreeNode *n) override
 Optionally creates a subtree of TreeNodes for this TreeNode by attaching children to this node. These children may be regular TreeNode or ResourceTreeNodes.
 
virtual void deleteSubtree (sparta::ResourceTreeNode *n) override
 Optionally deletes the TreeNodes created by createSubtee (if any).
 
virtual void onBuilding (sparta::ResourceTreeNode *n) override
 Hook for additional building on ResourceTreeNode constructing.
 
virtual void onConfiguring (sparta::ResourceTreeNode *n) override
 Hook for additional configuring on resource node configure.
 
ResourcecreateResource (TreeNode *node, const ParameterSet *params) override
 Finally instantiates the resource with its set of Parameters.
 
void deleteResource (Resource *res) override final
 Deletes a resource created by the createResource method of this ResourceFactory.
 
void bindEarly (TreeNode *) override
 Allows contents to be bound together if desired.
 
void bindLate (TreeNode *) override
 Allows contents to be bound together if desired.
 
- Public Member Functions inherited from sparta::ResourceFactoryBase
virtual ~ResourceFactoryBase ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from sparta::ResourceFactory< CPU, CPU::CPUParameterSet >
typedef CPU resource_type
 
typedef CPU::CPUParameterSet params_type
 

Detailed Description

Definition at line 25 of file CPUFactory.hpp.

Constructor & Destructor Documentation

◆ CPUFactory()

core_example::CPUFactory::CPUFactory ( )

Constructor for CPUFactory.

Definition at line 11 of file CPUFactory.cpp.

Member Function Documentation

◆ bindTree()

auto core_example::CPUFactory::bindTree ( sparta::RootTreeNode root_node) -> void

Bind all the ports between different units and set TLBs and preload.

Definition at line 101 of file CPUFactory.cpp.

◆ buildTree()

auto core_example::CPUFactory::buildTree ( sparta::RootTreeNode root_node) -> void

Build the device tree by instantiating resource nodes.

Definition at line 93 of file CPUFactory.cpp.

◆ getResourceNames()

auto core_example::CPUFactory::getResourceNames ( ) const -> const std::vector<std::string>&

Get the list of resources instantiated in this topology.

Definition at line 109 of file CPUFactory.cpp.

◆ setTopology()

auto core_example::CPUFactory::setTopology ( const std::string &  topology,
const uint32_t  num_cores 
) -> void

Set the user-defined topology for this microarchitecture.

Definition at line 22 of file CPUFactory.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: