Merge pull request #1030 from YosysHQ/gatecat/ice40-dsp25_10-fix
ice40: Fix handling of carry out route-thru via 25,14
This commit is contained in:
commit
c44b034fc3
@ -829,10 +829,7 @@ void write_asc(const Context *ctx, std::ostream &out)
|
||||
// Weird UltraPlus bits
|
||||
if (tile == TILE_DSP0 || tile == TILE_DSP1 || tile == TILE_DSP2 || tile == TILE_DSP3 ||
|
||||
tile == TILE_IPCON) {
|
||||
if ((ctx->args.type == ArchArgs::UP5K || ctx->args.type == ArchArgs::UP3K) && x == 25 && y == 14) {
|
||||
// Mystery bits not set in this one tile
|
||||
} else {
|
||||
for (int lc_idx = 0; lc_idx < 8; lc_idx++) {
|
||||
auto set_ipcon = [&](int lc_idx) {
|
||||
static const std::vector<int> ip_dsp_lut_perm = {
|
||||
4, 14, 15, 5, 6, 16, 17, 7, 3, 13, 12, 2, 1, 11, 10, 0,
|
||||
};
|
||||
@ -840,13 +837,22 @@ void write_asc(const Context *ctx, std::ostream &out)
|
||||
set_config(ti, config.at(y).at(x), "LC_" + std::to_string(lc_idx), ((i % 8) >= 4),
|
||||
ip_dsp_lut_perm.at(i));
|
||||
if (tile == TILE_IPCON)
|
||||
set_config(ti, config.at(y).at(x),
|
||||
"Cascade.IPCON_LC0" + std::to_string(lc_idx) + "_inmux02_5", true);
|
||||
set_config(ti, config.at(y).at(x), "Cascade.IPCON_LC0" + std::to_string(lc_idx) + "_inmux02_5",
|
||||
true);
|
||||
else
|
||||
set_config(ti, config.at(y).at(x),
|
||||
"Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) + "_LC0" +
|
||||
std::to_string(lc_idx) + "_inmux02_5",
|
||||
true);
|
||||
};
|
||||
if ((ctx->args.type == ArchArgs::UP5K || ctx->args.type == ArchArgs::UP3K) && x == 25 && y == 14) {
|
||||
// Mystery bits not set in this one tile, other than to route through the DSP carry out if used
|
||||
if (ctx->getBoundBelCell(ctx->getBelByLocation(Loc(25, 10, 0)))) {
|
||||
set_ipcon(0);
|
||||
}
|
||||
} else {
|
||||
for (int lc_idx = 0; lc_idx < 8; lc_idx++) {
|
||||
set_ipcon(lc_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user