17 #include <cerata/api.h>
24 #include "fletchgen/basic_types.h"
25 #include "fletchgen/nucleus.h"
30 using NodeProfilerPorts = std::map<Node *, std::pair<std::vector<Instance *>, std::vector<Port *>>>;
33 std::vector<MmioReg>
GetProfilingRegs(
const std::vector<std::shared_ptr<RecordBatch>> &recordbatches);
36 std::shared_ptr<cerata::Type>
stream_probe(
const std::shared_ptr<Node> &count_width);
39 std::unique_ptr<cerata::Instance>
profiler(
const std::string &name,
40 cerata::NodeMap *rebinding,
41 const std::shared_ptr<cerata::ClockDomain> &domain =
kernel_cd());
Contains all classes and functions related to Fletchgen.
std::shared_ptr< ClockDomain > kernel_cd()
Fletcher accelerator clock domain.
std::unique_ptr< cerata::Instance > profiler(const std::string &name, cerata::NodeMap *rebinding, const std::shared_ptr< cerata::ClockDomain > &domain=kernel_cd())
Returns an instance of a StreamProfiler.
std::map< Node *, std::pair< std::vector< Instance * >, std::vector< Port * > >> NodeProfilerPorts
A mapping from nodes to profiler instances and ports.
std::shared_ptr< cerata::Type > stream_probe(const std::shared_ptr< Node > &count_width)
Returns a stream probe type based on a count width for multi-epc streams.
NodeProfilerPorts EnableStreamProfiling(cerata::Component *comp, const std::vector< cerata::Signal * > &profile_nodes)
Transforms a Cerata component graph to include stream profilers for selected nodes.
std::vector< MmioReg > GetProfilingRegs(const std::vector< std::shared_ptr< RecordBatch >> &recordbatches)
Obtain the registers that should be reserved in the mmio component for profiling.