44 #ifndef CONN_BINDING_HPP 45 #define CONN_BINDING_HPP 48 #include "config_HAVE_UNORDERED.hpp" 72 using data_transfer = std::tuple<unsigned int, unsigned int, vertex, vertex, vertex>;
88 using connection = std::tuple<generic_objRef, generic_objRef, unsigned int, unsigned int>;
206 void specialise_mux(
const generic_objRef mux,
unsigned int bits_tgt)
const;
234 unsigned int conn_type);
286 virtual void print()
const;
297 void add_data_transfer(
const generic_objRef op1,
const generic_objRef op2,
unsigned int operand,
309 void AddConnectionCB(
const generic_objRef op1,
const generic_objRef op2,
unsigned int operand,
329 sparse_logic.insert(so);
definition of target of a connection
bool operator<(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
void AddConnectionCB(const generic_objRef op1, const generic_objRef op2, unsigned int operand, unsigned int port_index, connection_objRef conn)
Creates a connection between two objects.
generic_objRef bind_selector_port(direction_type dir, unsigned int mode, const vertex &cond, const OpGraphConstRef data)
std::map< unsigned int, generic_objRef > input_ports
map between input port variable and generic object
const std::map< unsigned int, Selectors > & GetSelectors() const
std::map< std::pair< generic_objRef, unsigned int >, generic_objRef, GenericObjUnsignedIntSorter > Selectors
selector ports
virtual void add_to_SM(const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM)
Add the interconnection to the structural representation of the datapath.
generic_objRef get_port(unsigned int var, direction_type dir)
Returns reference to generic object associated to a given variable, for a specific port direction...
const std::map< const_param, generic_objRef > & get_constant_objs() const
const ParameterConstRef parameters
The set of input parameters.
Class specification of the graph structures.
This class manages the circuit structures.
std::tuple< std::string, std::string > const_param
definition of the key to deal with constant parameters
generic_objRef bind_port(unsigned int var, direction_type dir)
Bind variable to a port object.
unsigned long long determine_bit_level_mux() const
Returns the number of bit-level multiplexers.
virtual void print() const
Function that prints the interconnection binding.
std::map< connection, connection_objRef, ConnectionSorter > conn_implementation_map
redefinition of map to manage ordered/unordered structures
generic_objRef get_constant_obj(const std::string &value, const std::string ¶m, unsigned int precision)
CONSTREF_FORWARD_DECL(BehavioralHelper)
bool check_pv_allconnected(structural_objectRef port_i)
check if a port vector has its port bounded to something
std::map< unsigned int, Selectors > selectors
void add_data_transfer(const generic_objRef op1, const generic_objRef op2, unsigned int operand, unsigned int port_index, data_transfer data)
Adds a data transfer between two objects.
std::map< const_param, generic_objRef > constant_values
constant values
void add_command_ports(const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM)
Add signals from/to controller.
Base class for all resources into datapath.
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
std::map< std::pair< vertex, unsigned int >, generic_objRef > command_input_ports
map between command input port (operation vertex and command type) and generic object ...
std::map< unsigned int, generic_objRef > output_ports
map between output port variable and generic object
This class manages the technology library structures.
std::tuple< unsigned int, unsigned int, vertex, vertex, vertex > data_transfer
definition of the data transfer (tree_node, precision, from, to, data_transferred, current_op).
Class managing the interconnection binding.
static unsigned unique_id
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Generic class managing all resources into datapath.
std::map< vertex, generic_objRef > command_output_ports
map between output port variable and generic object
virtual ~conn_binding()
Destructor.
Generic class managing elements used to interconnect generic objects into datapath.
void specialise_mux(const generic_objRef mux, unsigned int bits_tgt) const
Specialize a multiplexer according to the type of the variables crossing it.
conn_binding(const BehavioralHelperConstRef BH, const ParameterConstRef parameters)
Constructor.
void mux_connection(const hlsRef HLS, const structural_managerRef SM)
Add the mux-based interconnection.
static conn_bindingRef create_conn_binding(const HLS_managerRef _HLSMgr, const hlsRef _HLS, const BehavioralHelperConstRef _BH, const ParameterConstRef _parameters)
factory method to create the right conn_binding depending on the flow
std::map< ConnectionTarget, ConnectionSources > conn_variables
map between the input of the unit and the corresponding incoming connections.
std::map< generic_objRef, CustomOrderedSet< data_transfer >, GenericObjSorter > ConnectionSources
definition of sources of a connection
std::map< vertex, std::map< unsigned int, generic_objRef > > activation_ports
map between a vertex and the corresponding activation signal
Template definition of refcount.
conn_implementation_map conn_implementation
map between the connection <src, tgt, tgt_port, tgt_port_index> and the corresponding object ...
bool operator()(const connection &x, const connection &y) const
Compare position of two connections.
std::tuple< generic_objRef, generic_objRef, unsigned int, unsigned int > connection
connection between two objects (<src, tgt, tgt_port, tgt_port_index>)
const std::map< ConnectionTarget, ConnectionSources > & get_data_transfers() const
Returns the map containing all the data transfers.
void add_sparse_logic_dp(const hlsRef HLS, const structural_managerRef SM, const HLS_managerRef HLSMgr)
Add sparse logic to the datapath.
void add_datapath_connection(const technology_managerRef TM, const structural_managerRef SM, const structural_objectRef src, const structural_objectRef port_tgt, unsigned int conn_type)
Add a data converter, if needed, between two objects of the structural representation of the datapath...
const BehavioralHelperConstRef BH
reference to the behavioral helper associated with the specification
CustomOrderedSet< generic_objRef, GenericObjSorter > sparse_logic
set containing all the sparse logic contained into the datapath
REF_FORWARD_DECL(HLS_manager)
Autoheader include.
enum { IN=0, OUT } direction_type
direction port identifier
Data structure that contains all information about high level synthesis process.
x
Return the smallest n such that 2^n >= _x.
Class used to describe a particular graph with operations as nodes.
generic_objRef bind_command_port(const vertex &ver, direction_type dir, unsigned int mode, const OpGraphConstRef g)
Bind vertex to a command port object.
virtual void mux_allocation(const hlsRef HLS, const structural_managerRef SM, structural_objectRef src, structural_objectRef tgt, connection_objRef conn)
Add multiplexers to the structural representation of the datapath.
int debug_level
control the verbosity during the debugging
definition of the connection implementations
std::map< std::string, structural_objectRef > converters
data type converters
int output_level
control the output verbosity
void add_sparse_logic(const generic_objRef so)
enum { STG=0 } type_t
type of the data-structure
Base object for all the structural objects.
refcount< generic_obj > generic_objRef
RefCount definition for generic_obj class.