Skip to content

Commit

Permalink
Simplified load/store interconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizioferrandi committed Apr 7, 2024
1 parent ef03699 commit ff1c191
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/HLS/binding/interconnection/mux_connection_binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1590,24 +1590,13 @@ void mux_connection_binding::create_connections()
determine_connection(op, HLS_manager::io_binding_type(var_node_idx, 0), fu_obj, port_offset(1),
port_index, data, bus_addr_bitsize, alignment);
/// connect size port
if(Prec != algn && Prec % algn)
{
Prec = std::max(8ull, resize_1_8_pow2(Prec));
HLS_manager::check_bitwidth(Prec);
determine_connection(
op, HLS_manager::io_binding_type(0, Prec), fu_obj, port_offset(2), port_index, data,
static_cast<unsigned>(object_bitsize(TreeM, HLS_manager::io_binding_type(0, Prec))));
}
else
{
const auto IR_var_bitsize = tree_helper::SizeAlloc(tn);
HLS_manager::check_bitwidth(IR_var_bitsize);
unsigned int var_bitsize;
var_bitsize = static_cast<unsigned int>(IR_var_bitsize);
determine_connection(
op, HLS_manager::io_binding_type(0, var_bitsize), fu_obj, port_offset(2), port_index, data,
static_cast<unsigned>(object_bitsize(TreeM, HLS_manager::io_binding_type(0, var_bitsize))));
}
const auto IR_var_bitsize = tree_helper::SizeAlloc(tn);
HLS_manager::check_bitwidth(IR_var_bitsize);
unsigned int var_bitsize;
var_bitsize = static_cast<unsigned int>(IR_var_bitsize);
determine_connection(
op, HLS_manager::io_binding_type(0, var_bitsize), fu_obj, port_offset(2), port_index, data,
static_cast<unsigned>(object_bitsize(TreeM, HLS_manager::io_binding_type(0, var_bitsize))));
}
else
{
Expand Down

0 comments on commit ff1c191

Please sign in to comment.