17 #include <cerata/api.h>
20 #include <unordered_map>
25 #include "fletchgen/kernel.h"
26 #include "fletchgen/bus.h"
27 #include "fletchgen/nucleus.h"
31 using cerata::Instance;
39 explicit Mantle(std::string name,
40 const std::vector<std::shared_ptr<RecordBatch>> &recordbatches,
41 const std::shared_ptr<Nucleus> &
nucleus,
63 std::unordered_map<BusPort *, Instance *>
arbiters_;
75 std::shared_ptr<Mantle>
mantle(
const std::string &name,
76 const std::vector<std::shared_ptr<RecordBatch>> &recordbatches,
77 const std::shared_ptr<Nucleus> &
nucleus,
A component that wraps a Kernel and all ArrayReaders/Writers resulting from a Schema set.
std::vector< Instance * > recordbatch_instances_
The RecordBatch instances.
std::vector< std::shared_ptr< RecordBatch > > recordbatch_components() const
Return all RecordBatch(Reader/Writer) components of this Mantle.
Mantle(std::string name, const std::vector< std::shared_ptr< RecordBatch >> &recordbatches, const std::shared_ptr< Nucleus > &nucleus, BusDim bus_dim, Axi4LiteSpec axi_spec)
Construct a Mantle based on a SchemaSet.
std::unordered_map< BusPort *, Instance * > arbiters_
A mapping of bus port (containing the bus parameters and function) to arbiter instances.
std::shared_ptr< Nucleus > nucleus_
The Nucleus to be instantiated by this Mantle.
BusDim bus_dim_
Top-level bus dimensions.
std::shared_ptr< Nucleus > nucleus() const
Return the kernel component of this Mantle.
std::vector< std::shared_ptr< RecordBatch > > recordbatch_components_
The RecordBatch components.
Instance * nucleus_inst_
Shortcut to the instantiated Nucleus.
std::vector< Instance * > recordbatch_instances() const
Return all RecordBatch(Reader/Writer) instances of this Mantle.
Contains all classes and functions related to Fletchgen.
std::shared_ptr< Mantle > mantle(const std::string &name, const std::vector< std::shared_ptr< RecordBatch >> &recordbatches, const std::shared_ptr< Nucleus > &nucleus, BusDim bus_spec, Axi4LiteSpec axi_spec)
Construct a Mantle and return a shared pointer to it.
std::shared_ptr< Nucleus > nucleus(const std::string &name, const std::vector< std::shared_ptr< RecordBatch >> &recordbatches, const std::shared_ptr< Kernel > &kernel, const std::shared_ptr< Component > &mmio, Axi4LiteSpec axi_spec)
Make an Nucleus component based on RecordBatch components. Returns a shared pointer to the new Nucleu...
AXI4-lite bus specification.
Holds bus interface dimensions.