aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch.h
diff options
context:
space:
mode:
authorAdam Greig <adam@adamgreig.com>2022-11-09 02:47:00 +0000
committerAdam Greig <adam@adamgreig.com>2023-01-04 18:34:30 +0000
commit8d8c244e007a5f2d937c569365785ae066c4ce5f (patch)
treea7ecff72e6dac60690fc6cd0c60b6b4314e9b707 /ecp5/arch.h
parent174848b4b3bb84883c1623315ad10fdb5eb5185c (diff)
downloadnextpnr-8d8c244e007a5f2d937c569365785ae066c4ce5f.tar.gz
nextpnr-8d8c244e007a5f2d937c569365785ae066c4ce5f.tar.bz2
nextpnr-8d8c244e007a5f2d937c569365785ae066c4ce5f.zip
Add remapping of DSP clk/ce/rst signals in a block.
Each DSP block contains two slices, and each slice contains multiple MULT18X18D and ALU54B units. Each unit configures each register to use any of CLK0/1/2/3, CE0/1/2/3, and RST0/1/2/3 ports, and the ports are connected per unit (so for example, two MULTs in the same block could connect their CLK0s to different external signals). However, the hardware only has one actual port per block, so it's required that all CLK0 signals within a block are the same. Because the packer is in general allowed to combine two unrelated units into one block, it may end up combining units that use different signals for the same port, which would eventually have caused a router failure. This commit adds validity checks which ensure only unique signals are used per block, and adds remapping so that conflicting signals are automatically reassigned when possible and required.
Diffstat (limited to 'ecp5/arch.h')
-rw-r--r--ecp5/arch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h
index 6ce3c4ce..40b931d6 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -1085,6 +1085,12 @@ struct Arch : BaseArch<ArchRanges>
std::vector<BelBucketId> buckets;
mutable std::vector<TileStatus> tile_status;
+
+ // -------------------------------------------------
+ bool is_dsp_location_valid(CellInfo* cell) const;
+ void remap_dsp_blocks();
+ void remap_dsp_cell(CellInfo* ci, const std::array<IdString, 4> &ports,
+ std::array<NetInfo*, 4> &assigned_nets);
};
NEXTPNR_NAMESPACE_END