aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Use 'T' postfix to disambiguate LHS and RHS of usingD. Shah2021-02-081-42/+48
| | | | | | | Arches might otherwise have range types named ambigiously with the entry in ArchRanges. Signed-off-by: D. Shah <dave@ds0.me>
* Add archArgs and archArgsToId to Arch APID. Shah2021-02-051-0/+3
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* ice40: Switch to BaseArchD. Shah2021-02-051-0/+1
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* Add pure-virtual ArchAPI interfaceD. Shah2021-02-051-104/+198
| | | | | | | | | This splits out the pure-virtual definition of the architecture API into ArchAPI; leaving BaseArch to only provide default implementations (which can now be completely opted out of by deriving from ArchAPI instead of BaseArch). Signed-off-by: D. Shah <dave@ds0.me>
* Rename ArchBase to BaseArch for consistency with BaseCtxD. Shah2021-02-051-1/+1
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* Add default implementation of bel bucket functionsD. Shah2021-02-051-5/+89
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* Add default implementation of some range-returning functionsD. Shah2021-02-051-5/+27
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* Add a few more functions to ArchBaseD. Shah2021-02-051-8/+14
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* ecp5: Use common wire/pip bindingD. Shah2021-02-051-1/+1
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* Fix now-illegal use of reinterpret_castD. Shah2021-02-051-3/+5
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* nextpnr: Example of shared wire/bel/pip binding codeD. Shah2021-02-051-13/+106
| | | | | | Currently not actually being tested Signed-off-by: D. Shah <dave@ds0.me>
* nextpnr: Use templates to specify range typesD. Shah2021-02-051-0/+21
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* nextpnr: Add base virtual functions for non-range Arch APID. Shah2021-02-051-0/+108
| | | | | | | | | | | | | This makes the Arch API clearer and also allows a base implementation of functions to reduce the amount of complexity to get a basic Arch up and running. Currently this only implements these for functions that don't return a range. Range-returning functions will require more work in order due to the current 'duck typing' approach (probably a struct that contains the range types combined with templating.) Signed-off-by: D. Shah <dave@ds0.me>
* Add RelSlice::ssize and use it when comparing with signed ints.Keith Rothman2021-02-051-0/+1
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Mark IdString and IdStringList single argument constructors explicit.Keith Rothman2021-02-043-18/+28
| | | | | | | | | Single argument constructors will silently convert to that type. This is typically not the right thing to do. For example, the nexus and ice40 arch_pybindings.h files were incorrectly parsing bel name strings, etc. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Use a LRU cache for pip to wire map.Keith Rothman2021-02-031-10/+113
| | | | | | | | This avoids storing the entire pip to wire map in memory with a moderate runtime increase and a dramatic memory decrease (2 GB to 200 MB for A50T). Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* generic: Use IdStringList for all arch object namesD. Shah2021-02-023-1/+28
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* nexus: Implement IdStringList for all arch object namesD. Shah2021-02-021-0/+6
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* ecp5: Implement IdStringList for all arch object namesD. Shah2021-02-023-8/+55
| | | | | | | This is a complete implementation of IdStringList for ECP5; excluding the GUI (which you will have to disable for it to build). Signed-off-by: D. Shah <dave@ds0.me>
* refactor: Replace getXName().c_str(ctx) with ctx->nameOfXD. Shah2021-02-023-9/+8
| | | | | | This makes the ongoing migration to IdStringList easier. Signed-off-by: D. Shah <dave@ds0.me>
* ecp5: Proof-of-concept using IdStringList for bel namesD. Shah2021-02-027-24/+56
| | | | | | | | | | | This uses the new IdStringList API to store bel names for the ECP5. Note that other arches and the GUI do not yet build with this proof-of-concept patch. getBelByName still uses the old implementation and could be more efficiently implemented with further development. Signed-off-by: D. Shah <dave@ds0.me>
* common: First pass at IdStringList methodsD. Shah2021-02-022-3/+64
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* arch: Add getNameDelimiter API for string listsD. Shah2021-02-021-0/+3
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* common: Adding IdStringList typeD. Shah2021-02-021-0/+67
| | | | | | | Using an optimised storage for <=4 objects to avoid excessive heap allocations. Signed-off-by: D. Shah <dave@ds0.me>
* Run "make clangformat".Keith Rothman2021-02-026-63/+73
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Moving missing empty check into initial placement loop.Keith Rothman2021-02-021-5/+14
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Add pybindings for new APIs.Keith Rothman2021-02-021-0/+16
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Rename Partition -> BelBucket.Keith Rothman2021-02-024-91/+91
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Fix regression in use of FastBels.Keith Rothman2021-02-023-10/+38
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Address some compiler warnings.Keith Rothman2021-02-021-1/+1
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Add Partition APIs to ice40, nexus, gowin archs.Keith Rothman2021-02-021-2/+2
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Working compile of ECP5.Keith Rothman2021-02-021-5/+7
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Implement partitioning in placer_heap.Keith Rothman2021-02-023-130/+243
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Add archcheck for partition methods.Keith Rothman2021-02-021-0/+64
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Initial refactoring of placer API.Keith Rothman2021-02-025-68/+136
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Merge pull request #563 from litghost/seperate_pip_range_typesDavid Shah2021-02-021-2/+2
|\ | | | | Seperate PipRange types in pybindings_shared.
| * Seperate PipRange types in pybindings_shared.Keith Rothman2021-02-011-2/+2
| | | | | | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* | Avoid linear scan in PIP check loop.Keith Rothman2021-01-291-18/+10
|/ | | | | | | The previous additions to archcheck increased the runtime of the nexus archcheck quiet a bit. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* cleanup: Spelling fixesD. Shah2021-01-284-11/+12
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* cleanup: Fix compiler warningsD. Shah2021-01-281-1/+2
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* cleanup: Remove dead/unused codeD. Shah2021-01-283-113/+3
| | | | | | | Note that some '#if 0' code that might still be useful for debugging in the future has been retained. Signed-off-by: D. Shah <dave@ds0.me>
* clangformatD. Shah2021-01-282-23/+19
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* Merge pull request #553 from YosysHQ/rel-sliceDavid Shah2021-01-281-0/+42
|\ | | | | Switch from RelPtr to RelSlice
| * Make RelSlice uncopyableD. Shah2021-01-271-0/+3
| | | | | | | | Signed-off-by: D. Shah <dave@ds0.me>
| * Move RelPtr/RelSlice out of arches into commonD. Shah2021-01-271-0/+39
| | | | | | | | | | | | | | The bba approach seems widely used enough that it's reasonable for this to become part of common code. Signed-off-by: D. Shah <dave@ds0.me>
* | Add connectivity round trip checks to archcheck.Keith Rothman2021-01-271-7/+75
|/ | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* C++17 compatibility: Don't use std::random_shufflePer Grön2020-12-302-5/+11
| | | | std::random_shuffle deprecated in C++14 and was removed in C++17.
* Gowin target (#542)Pepijn de Vos2020-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * load wires * add slice bels * add IOB * add aliases * local aliases * broken packing stuff * working packer * add constraints * pnr runs1111 * add timing info * constraints * more constraint stuff * add copyright * remove generic reference * remove parameters * remove generic python api * add newline to end of file * some small refactoring * warn on invalid constraints * don't error on missing cell * comment out debugging print * typo * avoid copy * faster empty idstring * remove intermediate variable * no more deadnames * fix cst warnings * increase ripup and epsilon a bit * take single device parameter * add info to readme * gui stubs * Revert 4d03b681a8634e978bd5af73c97665500047e055 * assign ff_used in assignArchInfo * decrease beta for better routability * try to fix CI
* command.cc: Improve help textDavid Shah2020-12-271-1/+1
| | | | Signed-off-by: David Shah <dave@ds0.me>
* router2: Avoid ripup of critical pathDavid Shah2020-12-011-2/+17
| | | | Signed-off-by: David Shah <dave@ds0.me>