6#include "sparta/simulation/ResourceFactory.hpp"
9#include "sparta/simulation/ResourceTreeNode.hpp"
10#include "CPUTopology.hpp"
12namespace core_example{
41 auto setTopology(
const std::string&,
const uint32_t) -> void;
62 auto buildTree_(
sparta::RootTreeNode*,
67 auto bindTree_(
sparta::RootTreeNode*,
68 const std::vector<
CPUTopology::PortConnectionInfo>&) ->
void;
73 const
char to_replace_ {
'*'};
78 std::unique_ptr<CPUTopology> topology_;
83 std::vector<std::string> resource_names_;
88 std::vector<sparta::TreeNode*> private_nodes_;
93 std::vector<std::unique_ptr<sparta::ResourceTreeNode>> to_delete_;
TreeNode refinement representing the root (or "top") of a device tree.
auto getResourceNames() const -> const std::vector< std::string > &
Get the list of resources instantiated in this topology.
~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.
CPUFactory()
Constructor for CPUFactory.
Templated ResourceFactoryBase implementation which can be used to trivially define Resource Factories...
TreeNode which represents the root ("top") of a device tree.
Macros for handling exponential backoff.