Rename some of bels

This commit is contained in:
Miodrag Milanovic 2025-06-30 12:38:34 +02:00
parent 21e1e7b269
commit bf1802bfee
2 changed files with 40 additions and 36 deletions

View File

@ -245,7 +245,7 @@ struct BitstreamBackend
void write_bitstream() void write_bitstream()
{ {
check_multipliers(); //check_multipliers();
ChipConfig cc; ChipConfig cc;
cc.chip_name = device; cc.chip_name = device;
@ -267,6 +267,8 @@ struct BitstreamBackend
cc.tiles[loc].add_word(stringf("GPIO.%s", p.first.c_str(ctx)), p.second.as_bits()); cc.tiles[loc].add_word(stringf("GPIO.%s", p.first.c_str(ctx)), p.second.as_bits());
} }
break; break;
case id_CPE_LT_L.index:
case id_CPE_LT_U.index:
case id_CPE_L2T4.index: case id_CPE_L2T4.index:
case id_CPE_L2T5.index: case id_CPE_L2T5.index:
case id_CPE_ADDF.index: case id_CPE_ADDF.index:
@ -300,24 +302,26 @@ struct BitstreamBackend
} }
} }
if (l.z == CPE_LT_FULL_Z) { if (l.z == CPE_LT_FULL_Z) {
if (cell.second->type.in(id_CPE_MX4)) { if (!cell.second->type.in(id_CPE_MULT)) {
update_cpe_mux(cell.second.get(), id_IN1, id_INIT_L11, 0, params); if (cell.second->type.in(id_CPE_MX4)) {
update_cpe_mux(cell.second.get(), id_IN2, id_INIT_L11, 1, params); update_cpe_mux(cell.second.get(), id_IN1, id_INIT_L11, 0, params);
update_cpe_mux(cell.second.get(), id_IN3, id_INIT_L11, 2, params); update_cpe_mux(cell.second.get(), id_IN2, id_INIT_L11, 1, params);
update_cpe_mux(cell.second.get(), id_IN4, id_INIT_L11, 3, params); update_cpe_mux(cell.second.get(), id_IN3, id_INIT_L11, 2, params);
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params); update_cpe_mux(cell.second.get(), id_IN4, id_INIT_L11, 3, params);
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, params); update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
update_cpe_lt(cell.second.get(), id_IN7, id_INIT_L03, params); update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, params);
update_cpe_lt(cell.second.get(), id_IN8, id_INIT_L03, params); update_cpe_lt(cell.second.get(), id_IN7, id_INIT_L03, params);
} else { update_cpe_lt(cell.second.get(), id_IN8, id_INIT_L03, params);
update_cpe_lt(cell.second.get(), id_IN1, id_INIT_L00, params); } else {
update_cpe_lt(cell.second.get(), id_IN2, id_INIT_L00, params); update_cpe_lt(cell.second.get(), id_IN1, id_INIT_L00, params);
update_cpe_lt(cell.second.get(), id_IN3, id_INIT_L01, params); update_cpe_lt(cell.second.get(), id_IN2, id_INIT_L00, params);
update_cpe_lt(cell.second.get(), id_IN4, id_INIT_L01, params); update_cpe_lt(cell.second.get(), id_IN3, id_INIT_L01, params);
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params); update_cpe_lt(cell.second.get(), id_IN4, id_INIT_L01, params);
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, params); update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
update_cpe_lt(cell.second.get(), id_IN7, id_INIT_L03, params); update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, params);
update_cpe_lt(cell.second.get(), id_IN8, id_INIT_L03, params); update_cpe_lt(cell.second.get(), id_IN7, id_INIT_L03, params);
update_cpe_lt(cell.second.get(), id_IN8, id_INIT_L03, params);
}
} }
} }

View File

@ -303,14 +303,14 @@ void GateMatePacker::pack_mult()
// fpga_generic.pas in p_r might have useful info // fpga_generic.pas in p_r might have useful info
auto create_zero_driver = [&](IdString name) { auto create_zero_driver = [&](IdString name) {
auto *zero_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$zero_lower", name.c_str(ctx))); auto *zero_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$zero_lower", name.c_str(ctx)));
auto *zero_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$zero_upper", name.c_str(ctx))); auto *zero_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$zero_upper", name.c_str(ctx)));
return ZeroDriver{zero_lower, zero_upper, name}; return ZeroDriver{zero_lower, zero_upper, name};
}; };
auto create_a_passthru = [&](IdString name, bool inverted) { auto create_a_passthru = [&](IdString name, bool inverted) {
auto *a_passthru_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$a_passthru_lower", name.c_str(ctx))); auto *a_passthru_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$a_passthru_lower", name.c_str(ctx)));
auto *a_passthru_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$a_passthru_upper", name.c_str(ctx))); auto *a_passthru_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$a_passthru_upper", name.c_str(ctx)));
return APassThroughCell{a_passthru_lower, a_passthru_upper, name, inverted}; return APassThroughCell{a_passthru_lower, a_passthru_upper, name, inverted};
}; };
@ -320,40 +320,40 @@ void GateMatePacker::pack_mult()
auto col = MultiplierColumn{}; auto col = MultiplierColumn{};
{ {
auto *b_passthru_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$b_passthru_lower", name.c_str(ctx))); auto *b_passthru_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$b_passthru_lower", name.c_str(ctx)));
auto *b_passthru_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$b_passthru_upper", name.c_str(ctx))); auto *b_passthru_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$b_passthru_upper", name.c_str(ctx)));
col.b_passthru = BPassThroughCell{b_passthru_lower, b_passthru_upper, name}; col.b_passthru = BPassThroughCell{b_passthru_lower, b_passthru_upper, name};
} }
{ {
auto *carry_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$carry_lower", name.c_str(ctx))); auto *carry_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$carry_lower", name.c_str(ctx)));
auto *carry_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$carry_upper", name.c_str(ctx))); auto *carry_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$carry_upper", name.c_str(ctx)));
col.carry = CarryGenCell{carry_lower, carry_upper, name, is_even_x, carry_enable_cinx}; col.carry = CarryGenCell{carry_lower, carry_upper, name, is_even_x, carry_enable_cinx};
} }
{ {
auto *multfab_lower = create_cell_ptr(id_CPE_HALF_L, auto *multfab_lower = create_cell_ptr(id_CPE_LT_L,
ctx->idf("%s$multf%c_lower", name.c_str(ctx), is_even_x ? 'a' : 'b')); ctx->idf("%s$multf%c_lower", name.c_str(ctx), is_even_x ? 'a' : 'b'));
auto *multfab_upper = create_cell_ptr(id_CPE_HALF_U, auto *multfab_upper = create_cell_ptr(id_CPE_LT_U,
ctx->idf("%s$multf%c_upper", name.c_str(ctx), is_even_x ? 'a' : 'b')); ctx->idf("%s$multf%c_upper", name.c_str(ctx), is_even_x ? 'a' : 'b'));
col.multfab = MultfabCell{multfab_lower, multfab_upper, name, is_even_x, multfab_enable_cinx}; col.multfab = MultfabCell{multfab_lower, multfab_upper, name, is_even_x, multfab_enable_cinx};
} }
{ {
auto *f_route_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$f_route_lower", name.c_str(ctx))); auto *f_route_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$f_route_lower", name.c_str(ctx)));
auto *f_route_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$f_route_upper", name.c_str(ctx))); auto *f_route_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$f_route_upper", name.c_str(ctx)));
col.f_route = FRoutingCell{f_route_lower, f_route_upper, name, is_even_x}; col.f_route = FRoutingCell{f_route_lower, f_route_upper, name, is_even_x};
} }
for (int i = 0; i < (a_width / 2); i++) { for (int i = 0; i < (a_width / 2); i++) {
auto *mult_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$row%d$mult_lower", name.c_str(ctx), i)); auto *mult_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$row%d$mult_lower", name.c_str(ctx), i));
auto *mult_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$row%d$mult_upper", name.c_str(ctx), i)); auto *mult_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$row%d$mult_upper", name.c_str(ctx), i));
col.mults.push_back(MultCell{mult_lower, mult_upper, name, i == ((a_width / 2) - 1)}); col.mults.push_back(MultCell{mult_lower, mult_upper, name, i == ((a_width / 2) - 1)});
} }
{ {
auto *msb_route_lower = create_cell_ptr(id_CPE_HALF_L, ctx->idf("%s$msb_route_lower", name.c_str(ctx))); auto *msb_route_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$msb_route_lower", name.c_str(ctx)));
auto *msb_route_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$msb_route_upper", name.c_str(ctx))); auto *msb_route_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$msb_route_upper", name.c_str(ctx)));
col.msb_route = MsbRoutingCell{msb_route_lower, msb_route_upper, name}; col.msb_route = MsbRoutingCell{msb_route_lower, msb_route_upper, name};
} }
@ -413,7 +413,7 @@ void GateMatePacker::pack_mult()
cell->constr_abs_z = true; cell->constr_abs_z = true;
cell->constr_x = x_offset; cell->constr_x = x_offset;
cell->constr_y = y_offset; cell->constr_y = y_offset;
cell->constr_z = cell->type == id_CPE_HALF_L ? 1 : 0; cell->constr_z = cell->type == id_CPE_LT_L ? 1 : 0;
}; };
// Constrain zero driver. // Constrain zero driver.