aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Create machxo2 backend (renamed from generic).gatecat2021-02-121-1/+2
| | | | Signed-off-by: William D. Jones <thor0505@comcast.net>
* Make BaseArch getDecalGraphics return an empty rangegatecat2021-02-121-1/+1
| | | | | | | Fix assertion failure when opening the GUI on an arch without any decals. Signed-off-by: gatecat <gatecat@ds0.me>
* Merge pull request #580 from litghost/add_design_loaded_state_variablegatecat2021-02-122-1/+6
|\ | | | | Add design_loaded state variable.
| * Add design_loaded state variable.Keith Rothman2021-02-112-1/+6
| | | | | | | | | | | | | | This is to decouple the command line flag "--json" and enable other frontend's. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* | Add getBelHidden and add some missing "override" statements.Keith Rothman2021-02-112-3/+8
|/ | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Remove the unused CellInfo::pins fieldgatecat2021-02-103-25/+0
| | | | | | | | | | | No arches ever actually used this to implement a Cell->Bel pin mapping, and in practice if any did try they would inevitably hit bitrot. This field had limited use in practice as it is necessary to also support cases where one cell pin maps to more than one bel pin. Removing this old field is the first step towards developing a new API for this. Signed-off-by: gatecat <gatecat@ds0.me>
* Add BaseArchRanges for default ArchRanges typesgatecat2021-02-091-0/+21
| | | | Signed-off-by: gatecat <gatecat@ds0.me>
* Make BaseCtx destructor virtualgatecat2021-02-081-1/+1
| | | | Signed-off-by: gatecat <gatecat@ds0.me>
* 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>