Merge pull request #736 from YosysHQ/gatecat/pp-multi-output

interchange: Allow site wires driven by more than one bel
This commit is contained in:
gatecat 2021-06-28 16:27:04 +01:00 committed by GitHub
commit 78c965141f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,8 +63,6 @@ void PseudoPipData::init_tile_type(const Context *ctx, int32_t tile_type)
sites.emplace(wire_data.site); sites.emplace(wire_data.site);
int32_t driver_bel = -1;
int32_t output_pin = -1;
for (const BelPortPOD &bel_pin : wire_data.bel_pins) { for (const BelPortPOD &bel_pin : wire_data.bel_pins) {
const BelInfoPOD &bel_data = type_data.bel_data[bel_pin.bel_index]; const BelInfoPOD &bel_data = type_data.bel_data[bel_pin.bel_index];
if (bel_data.synthetic != NOT_SYNTH) { if (bel_data.synthetic != NOT_SYNTH) {
@ -92,18 +90,9 @@ void PseudoPipData::init_tile_type(const Context *ctx, int32_t tile_type)
continue; continue;
} }
// Each site wire should have 1 driver!
NPNR_ASSERT(driver_bel == -1);
driver_bel = bel_pin.bel_index;
output_pin = bel_pin_idx;
}
if (driver_bel != -1) {
NPNR_ASSERT(output_pin != -1);
PseudoPipBel bel; PseudoPipBel bel;
bel.bel_index = driver_bel; bel.bel_index = bel_pin.bel_index;
bel.output_bel_pin = output_pin; bel.output_bel_pin = bel_pin_idx;
pseudo_pip_bels.push_back(bel); pseudo_pip_bels.push_back(bel);
} }
} }