aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
Commit message (Collapse)AuthorAgeFilesLines
* Add getBelHidden and add some missing "override" statements.Keith Rothman2021-02-111-2/+5
| | | | Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
* Remove the unused CellInfo::pins fieldgatecat2021-02-101-3/+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>
* Mark IdString and IdStringList single argument constructors explicit.Keith Rothman2021-02-041-4/+5
| | | | | | | | | 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>
* generic: Use IdStringList for all arch object namesD. Shah2021-02-021-0/+15
| | | | 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-021-1/+24
| | | | | | | 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>
* ecp5: Proof-of-concept using IdStringList for bel namesD. Shah2021-02-021-4/+22
| | | | | | | | | | | 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-021-3/+29
| | | | 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>
* clangformatD. Shah2021-01-281-5/+2
| | | | Signed-off-by: D. Shah <dave@ds0.me>
* C++17 compatibility: Don't use std::random_shufflePer Grön2020-12-301-4/+10
| | | | std::random_shuffle deprecated in C++14 and was removed in C++17.
* Only print filenames for now, default onRoss Schlaikjer2020-08-301-4/+2
|
* Add option to print critical path source codeRoss Schlaikjer2020-08-301-0/+5
| | | | | | | In order to make debugging the critical path easier, add an option that will log the location each net was defined, if known. If the file that contains the definition is known, and is readable, also print the part of the source HDL responsible for the signal definition.
* Port nextpnr-{ice40,ecp5} to WASI.whitequark2020-05-231-0/+14
| | | | | | | | | | | | | | | | | | | | | This involves very few changes, all typical to WASM ports: * WASM doesn't currently support threads or atomics so those are disabled. * WASM doesn't currently support exceptions so the exception machinery is stubbed out. * WASM doesn't (and can't) have mmap(), so an emulation library is used. That library currently doesn't support MAP_SHARED flags, so MAP_PRIVATE is used instead. There is also an update to bring ECP5 bbasm CMake rules to parity with iCE40 ones, since although it is possible to embed chipdb into nextpnr on WASM, a 200 MB WASM file has very few practical uses. The README is not updated and there is no included toolchain file because at the moment it's not possible to build nextpnr with upstream boost and wasi-libc. Boost requires a patch (merged, will be available in boost 1.74.0), wasi-libc requires a few unmerged patches.
* svg: Basic SVG graphics renderingDavid Shah2020-02-151-0/+5
| | | | Signed-off-by: David Shah <dave@ds0.me>
* ecp5: Router2 test integrationDavid Shah2020-02-031-0/+22
| | | | Signed-off-by: David Shah <dave@ds0.me>
* Preserve hierarchy through packingDavid Shah2019-12-271-0/+7
| | | | Signed-off-by: David Shah <dave@ds0.me>
* python: Add bindings for hierarchy structuresDavid Shah2019-12-271-4/+4
| | | | Signed-off-by: David Shah <dave@ds0.me>
* First pass at data structures for hierarchyDavid Shah2019-12-271-2/+29
| | | | Signed-off-by: David Shah <dave@ds0.me>
* frontend/base: Functions for port importDavid Shah2019-12-271-0/+2
| | | | Signed-off-by: David Shah <dave@ds0.me>
* sdf: Working on support for CVCDavid Shah2019-10-241-1/+1
| | | | Signed-off-by: David Shah <dave@ds0.me>
* sdf: Add basic support for writing SDF filesDavid Shah2019-10-191-0/+5
| | | | Signed-off-by: David Shah <dave@ds0.me>
* python: Adding helper functions for netlist modificationDavid Shah2019-09-151-1/+23
| | | | Signed-off-by: David Shah <dave@ds0.me>
* json: Add support for net aliasesDavid Shah2019-09-131-0/+5
| | | | Signed-off-by: David Shah <dave@ds0.me>
* ecp5: New Property interfaceDavid Shah2019-08-051-0/+1
| | | | Signed-off-by: David Shah <dave@ds0.me>
* Major Property improvements for common and iCE40David Shah2019-08-051-27/+88
| | | | Signed-off-by: David Shah <dave@ds0.me>
* Switching from std to boost fix crashMiodrag Milanovic2019-07-051-4/+4
|
* clangformat runMiodrag Milanovic2019-06-251-17/+20
|
* Preserve portsMiodrag Milanovic2019-06-211-0/+3
|
* moved some context variables to settingsMiodrag Milanovic2019-06-151-7/+11
|
* No need for settings classMiodrag Milanovic2019-06-151-0/+13
|
* Use properties for settings and save in jsonMiodrag Milanovic2019-06-121-1/+1
|
* Save top level attrs and store current stepMiodrag Milanovic2019-06-071-0/+3
|
* CleanupMiodrag Milanovic2019-06-071-2/+2
|
* WIP saving/loading attributesMiodrag Milanovic2019-06-071-0/+3
|