1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-05-02 22:32:35 +00:00
Commit Graph

167 Commits

Author SHA1 Message Date
Miodrag Milanovic
57be32e6ba BUFG support 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
58bdd1fad7 Fix script 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
5472c71d10 Added MX2 and MX4 support 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
673cde5732 Add clock inversion pip 2025-03-24 15:10:28 +00:00
Lofty
795c284d48 Constrain routes to have correct inversion state 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
2c13107456 Add CPE input inverters 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
ba23199ed1 Fix CC_L2T5 pack 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
88f05a889d Start work on BUFG support 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
ce22d927b6 Use pin connection aliases 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
5f5a27477b Update due to API changes 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
fa30fe22e1 Use device wrapper class 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
9a917602d4 Cleanup 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
f3cf710625 Prevent pass trough issues 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
2c87767b1e Fix DFF pack 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
ec687be0f7 Handle MUX flags 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
bf6e7601d3 pack DFF fixes 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
53b1f73058 Naive pack CC_DFF 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
9a8e88e7db Naive lut tree CPE pack 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
36d6bc2503 Keep just used connections for now 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
12878929e0 Cleanup 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
9e47ce646f Add LVDS support 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
c92be9258a More parameter checks 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
110fe6f519 Cleanup 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
a05bbd75aa Fixed typo 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
0ff7c8ced0 Add IN1->RAM_O2 propagation 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
8f9afe64aa GPIO initial work 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
c8d046bb1b Fix script 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
8e591a97e0 Start adding infrastructure for reading bitstream 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
eb6cce2446 Add support for reading from config 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
0e77fac613 Restructure code 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
a56ef9b8f5 Propagate errors 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
1586cfc7ce Use CCF to set IO location 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
e95b87fbf1 Add CCF parsing 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
e2c1e5a354 Initial work on forming bitstream 2025-03-24 15:10:28 +00:00
Miodrag Milanovic
d11d0f4575 Initial code for GateMate 2025-03-24 15:10:28 +00:00
YRabbit
81ccada239 Gowin. Add I3C io buffer. (#1445)
* Gowin. Add I3C io buffer.

A buffer is added that can operate as a normal IOBUF in PUSH-PULL mode
or switch to open-drain IOBUF mode.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. Turn a variable into a set of flags

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-01-29 14:02:21 +01:00
YRabbit
a76c5b5a0f Gowin. Typo fix.
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-01-29 08:47:41 +01:00
YRabbit
b95a3ca567 Gowin. Implement MIPI IO.
Adds output (MIPI_OBUF and MIPI_OBUF_A) and input (MIPI_IBUF) primitives
to allow the use of “real” MIPI (not emulation) ports capable of
operating in both HS and LP modes.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-01-29 08:47:41 +01:00
Miodrag Milanović
e12093201a CMake: Add include guards when IMPORT_BBA_FILES is used (#1438) 2025-01-23 10:54:37 +01:00
Catherine
90d746f79e CMake: add support for exporting and importing .bba files.
This is useful for certain cross-compilation workloads, and to cache
rarely changing build products.

To use this functionality, build e.g. as follows:

    cmake . -B build-export -DEXPORT_BBA_FILES=../bba-files -DARCH=all
    cmake --build build-export -t nextpnr-all-bba

    cmake . -B build-import -DIMPORT_BBA_FILES=../bba-files -DARCH=all
    cmake --build build-import
2025-01-23 07:49:12 +00:00
Catherine
cd7f7c12f1 CMake: refactor architecture-specific build system parts.
Two user-visible changes were made:
* `-DUSE_RUST` is replaced with `-DBUILD_RUST`, by analogy with
  `-DBUILD_PYTHON`
* `-DCOVERAGE` was removed as it doesn't work with either modern GCC
  or Clang
2025-01-21 17:13:03 +00:00
Catherine
dcfb7d8c33 CMake: align Himbaechel targets with non-Himbaechel ones.
Primarily, this commit makes both of them use the `BBAsm` functions
to build and compile `.bba` files.

In addition, Himbaechel targets are now aligned with the rest in
how they are configured: instead of having all uarches enabled with
all of the devices disabled (the opposite of the rest of nextpnr),
uarches must be enabled explicitly but they come with all devices
enabled (except for Xilinx, which does not have a list of devices).
2025-01-21 17:13:03 +00:00
Catherine
d214308f5f CMake: reformat for consistency.
Normalize keywords to:

    if (...)
    elseif (...)
    else()
    endif()

    foreach (...)
    endforeach()

    other(...)

Normalize whitespace to 4 spaces.
2025-01-16 11:36:44 +01:00
Catherine
574f504787 Find all components of Python at the same time.
This is explicitly recommended by the FindPython module documentation
and is required to avoid failed builds on some systems. See:
https://cmake.org/cmake/help/latest/module/FindPython.html
2025-01-13 03:29:43 +00:00
YRabbit
92694d7db7 Gowin. BUGFIX. Do not create missing wires. (#1418)
Erroneously created wires for specific IOs on the underside of some
chips.

Fixes https://github.com/YosysHQ/nextpnr/issues/1417

Also cosmetic edits.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-01-12 08:12:06 +01:00
Catherine
5fe680390f Various fixes for clang/libc++ build (#1415)
* Gowin: add header includes required on libstdc++.

* kernel: fix incorrect printf-style format.

* himbaechel: add missing `override` qualifiers.

* Gowin: remove unnecessary `std::move`.

These calls inhibit RVO, a stronger optimization than moving an object.
2025-01-12 08:11:33 +01:00
YRabbit
c565e364bc Gowin. Add the ability to place registers in IOB (#1403)
* Gowin. Add the ability to place registers in IOB

IO blocks have registers: for input, for output and for OutputEnable
signal - IREG, OREG and TREG respectively.

Each of the registers has one implicit non-switched wire, which one
depends on the type of register (IREG has a Q wire, OREG has a D wire).
Although the registers can be activated independently of each other they
share the CLK, ClockEnable and LocalSetReset wires and this places
restrictions on the possible combinations of register types in a single
IO.

Register placement in IO blocks is enabled by specifying the command
line keys --vopt ireg_in_iob, --vopt oreg_in_iob, or --vopt ioreg_in_iob.

It should be noted that specifying these keys leads to attempts to place
registers in IO blocks, but no errors are generated in case of failure.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. Registers in IO

Check for unconnected ports.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. IO regs. Verbose warnings.

If an attempt to place an FF in an IO block fails, issue a warning
detailing the reason for the failure, whether it is a register type
conflict, a network requirement violation, or a control signal conflict.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. BUGFIX. Fix FFs compatibility.

Flipflops with a fixed ClockEnable input cannot coexist with flipflops
with a variable one.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. FFs in IO.  Changing diagnostic messages.

Placement modes are still specified by the command line keys
ireg_in_iob/oreg_in_iob/ioreg_in_iob, but also introduces more granular
control in the form of attributes at I/O ports:

  (* NOIOBFF *) - registers are never placed in this IO,

  (* IOBFF *) - registers must be placed in this IO, in case of failure
  a warning (not an error) with the reason for nonplacement is issued,

  _attribute_absence_ - no diagnostics will be issued: managed to place - good, failed - not bad either.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. Registers in IO.

Change the logic for handling command line keys and attributes -
attributes allow routines to be placed in IO regardless of global mode.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. Registers in IO. Fix style.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-01-01 13:11:57 +01:00
Aritz Erkiaga
0345b6e803 Fix gowin ALU SUB mode ports (#1407) 2025-01-01 13:05:54 +01:00
YRabbit
3d350c21c5 Gowin. BUGFIX. Global clock routing. (#1410)
Adds additional restrictions on the first PIP after the clock source -
only connections to SPINEs are allowed. This allowed to correct the
behaviour of DQCEs since the latter can only disable/enable SPINEs.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-12-31 10:31:03 +01:00
Miodrag Milanović
d810aac867 Add GroupId related calls to Himbaechel API (#1399)
* Add GroupId related calls to Himbaechel API

* Example uarch using new API features

* Update drawGroup to propagate only GroupId
2024-12-05 13:59:33 +01:00