mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-02-02 15:01:26 +00:00
Rename some of bels
This commit is contained in:
@@ -245,7 +245,7 @@ struct BitstreamBackend
|
||||
|
||||
void write_bitstream()
|
||||
{
|
||||
check_multipliers();
|
||||
//check_multipliers();
|
||||
|
||||
ChipConfig cc;
|
||||
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());
|
||||
}
|
||||
break;
|
||||
case id_CPE_LT_L.index:
|
||||
case id_CPE_LT_U.index:
|
||||
case id_CPE_L2T4.index:
|
||||
case id_CPE_L2T5.index:
|
||||
case id_CPE_ADDF.index:
|
||||
@@ -300,24 +302,26 @@ struct BitstreamBackend
|
||||
}
|
||||
}
|
||||
if (l.z == CPE_LT_FULL_Z) {
|
||||
if (cell.second->type.in(id_CPE_MX4)) {
|
||||
update_cpe_mux(cell.second.get(), id_IN1, id_INIT_L11, 0, params);
|
||||
update_cpe_mux(cell.second.get(), id_IN2, id_INIT_L11, 1, params);
|
||||
update_cpe_mux(cell.second.get(), id_IN3, id_INIT_L11, 2, params);
|
||||
update_cpe_mux(cell.second.get(), id_IN4, id_INIT_L11, 3, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, 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);
|
||||
} else {
|
||||
update_cpe_lt(cell.second.get(), id_IN1, id_INIT_L00, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN2, id_INIT_L00, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN3, id_INIT_L01, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN4, id_INIT_L01, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, 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);
|
||||
if (!cell.second->type.in(id_CPE_MULT)) {
|
||||
if (cell.second->type.in(id_CPE_MX4)) {
|
||||
update_cpe_mux(cell.second.get(), id_IN1, id_INIT_L11, 0, params);
|
||||
update_cpe_mux(cell.second.get(), id_IN2, id_INIT_L11, 1, params);
|
||||
update_cpe_mux(cell.second.get(), id_IN3, id_INIT_L11, 2, params);
|
||||
update_cpe_mux(cell.second.get(), id_IN4, id_INIT_L11, 3, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, 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);
|
||||
} else {
|
||||
update_cpe_lt(cell.second.get(), id_IN1, id_INIT_L00, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN2, id_INIT_L00, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN3, id_INIT_L01, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN4, id_INIT_L01, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
|
||||
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -303,14 +303,14 @@ void GateMatePacker::pack_mult()
|
||||
// fpga_generic.pas in p_r might have useful info
|
||||
|
||||
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_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$zero_upper", 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_LT_U, ctx->idf("%s$zero_upper", name.c_str(ctx)));
|
||||
return ZeroDriver{zero_lower, zero_upper, name};
|
||||
};
|
||||
|
||||
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_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$a_passthru_upper", 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_LT_U, ctx->idf("%s$a_passthru_upper", name.c_str(ctx)));
|
||||
return APassThroughCell{a_passthru_lower, a_passthru_upper, name, inverted};
|
||||
};
|
||||
|
||||
@@ -320,40 +320,40 @@ void GateMatePacker::pack_mult()
|
||||
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_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$b_passthru_upper", 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_LT_U, ctx->idf("%s$b_passthru_upper", name.c_str(ctx)));
|
||||
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_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$carry_upper", 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_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};
|
||||
}
|
||||
|
||||
{
|
||||
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'));
|
||||
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'));
|
||||
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_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$f_route_upper", 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_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};
|
||||
}
|
||||
|
||||
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_upper = create_cell_ptr(id_CPE_HALF_U, ctx->idf("%s$row%d$mult_upper", 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_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)});
|
||||
}
|
||||
|
||||
{
|
||||
auto *msb_route_lower = create_cell_ptr(id_CPE_HALF_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_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_LT_U, ctx->idf("%s$msb_route_upper", name.c_str(ctx)));
|
||||
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_x = x_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.
|
||||
|
||||
Reference in New Issue
Block a user