Commit graph

181 commits

Author SHA1 Message Date
whitequark 97aa7a3aa9 vendor.xilinx_*: deprecate legacy Xilinx platform aliases. 2021-11-05 18:43:27 +00:00
Olivier Galibert 177f1b2e40
vendor.intel: add Mistral toolchain support. 2021-10-14 16:02:22 +00:00
H-S-S-11 9834b7e95f
vendor.xilinx: avoid using / for hierarchy in ISE constraint files. 2021-09-25 10:41:23 +00:00
Marcelina Kościelnicka bdbe8bff27 Unify Xilinx platforms into a single class, support more devices
This merges existing code, and also adds support for:

- Virtex, Virtex E (also known as Spartan 2, Spartan 2E)
- Virtex 2, Virtex 2 Pro
- Spartan 3, Spartan 3E (in addition to existing Spartan 3A, Spartan 3A
  DSP support)
- Virtex 4
- Virtex 5
- Virtex 6
- ISE synthesis for Series 7

Fixes #552.
2021-09-25 05:04:06 +00:00
Robin Ole Heinemann 23a44f3cb6 vendor.xilinx_{7series,ultrascale}: hierachical -> hierarchical
Signed-off-by: Robin Ole Heinemann <robin.ole.heinemann@gmail.com>
2021-08-16 22:17:27 +00:00
Adam Greig d824795c2c
vendor.lattice_{ecp5,machxo_2_3l}: remove -forceAll from Diamond scripts.
Fixes #604.
2021-04-12 09:48:20 +00:00
nickoe 746886ca8a
vendor.xilinx_7series: fix tool names for symbiflow.
Prefix "tools" with symbiflow_ as is done for the QuickLogic Symbiflow
toolchain. Installing symbiflow gives me the tools with the preifx, so I
guess this is the correct way to move forward.
2021-01-31 18:08:44 +00:00
Katherine Temkin 09de190bd1 vendor.lattice_ecp5: correctly generate OE signaling when xdr=0
This fixes a logic bug introduced in
6ce2b21e19.
2021-01-26 09:44:22 +00:00
Adam Greig 6ce2b21e19
vendor.lattice_ecp5: replicate OE signal for each output bit.
nextpnr can only pack OE FFs into IOLOGIC when there's one OFS1P3DX per
output, rather than one shared instance.
2021-01-23 18:06:52 +00:00
Adam Greig 3a4b61c16e
vendor.lattice_ecp5: remove outdated comment in ECP5 platform.
Starting with nextpnr c6401413a, nextpnr does pack *FS1P3DX
into IOLOGIC cells.
2021-01-14 11:34:03 +00:00
whitequark b466b724fe Revert "vendor.xilinx_7series: byte swap generated bitstream"
This reverts commit 14a5c42a8b.
2020-12-12 22:08:57 +00:00
whitequark 90e3504097 vendor.intel: implement add_settings (QSF) and add_constraints (SDC) overrides. 2020-11-24 20:35:58 +00:00
whitequark f1473e483a vendor.xilinx_spartan_3_6: fix typo.
This was introduced in commit 2f8669ca.

Fixes #549.
2020-11-22 00:16:02 +00:00
Jan Kowalewski adef3b2e7b vendor.quicklogic: enable SoC clock configuration
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-11-13 16:27:15 +00:00
whitequark 36bc1d2b4d vendor.quicklogic: write OpenOCD scripts as part of build process.
The OpenOCD scripts for EOS-S3 are roughly equivalent to SVF files
for a more traditional FPGA, which we also produce, for some common
"default" configuration, as a part of the build process.
2020-11-13 05:44:16 +00:00
whitequark d6da4c257b build.plat: TemplatedPlatform.iter_extra_files→Platform.iter_files.
This function was added in commit 20553b14 in the wrong place, with
the wrong name, and without tests. Fix all that.
2020-11-10 05:30:30 +00:00
Konrad Beckmann ebbdac9798
vendor.intel: add support for Cyclone V internal oscillator
When using the default clock "cyclonev_oscillator" on Cyclone V devices,
the internal oscillator will be used.
2020-11-06 11:35:18 +00:00
whitequark c6150d0586 vendor.lattice_{ice40,ecp5}: clean up $verilog_initial_trigger wires.
These only matter in simulation and after conversion to Verilog.
During synthesis they cause Yosys to produce warnings:

  Warning: Wire $verilog_initial_trigger has an unprocessed 'init' attribute.
2020-11-06 01:31:14 +00:00
whitequark 0ef01b1282 vendor.quicklogic: part→package 2020-11-05 07:36:43 +00:00
Norbert Braun 14a5c42a8b vendor.xilinx_7series: byte swap generated bitstream
The Zynq driver in the FPGA Manager framework on Linux expects bitstreams that
are byte swapped with respect to what the Vivado command
`write_bitstream -bin_file` produces. Thus, use the `write_cfgmem` command with
appropriate options to generate the bitstream (.bin file).

Fixes #519.
2020-11-03 09:39:49 +00:00
David Lattimore 781a3aa767
vendor.lattice_ice40: zero-pad CLKHF_DIV in SB_HFOSC instance.
Fixes #520.
2020-11-02 06:19:47 +00:00
Jan Kowalewski 8fe319f065 vendor.quicklogic: utilize internal SoC clock in EOS-S3
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-10-30 18:11:25 +00:00
Jan Kowalewski b88009bd96 vendor.quicklogic: fix toolchain nomenclature
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-10-30 18:11:25 +00:00
Jan Kowalewski 2c505deacc vendor.quicklogic: fix syntax
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-10-19 23:02:47 +00:00
Jan Kowalewski 9746138e55
vendor.quicklogic: new platform.
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>

Co-authored-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-10-15 18:02:25 +00:00
William D. Jones 47ecc16283
vendor.lattice_{ecp5,machxo_2_3l}: explain how to set up NMIGEN_ENV_Diamond on Windows. 2020-08-29 19:34:57 +00:00
whitequark b65e11f38f sim: split into base, core, and engines.
Before this commit, each simulation engine (which is only pysim at
the moment, but also cxxsim soon) was a subclass of SimulatorCore,
and every simulation engine module would essentially duplicate
the complete structure of a simulator, with code partially shared.

This was a really bad idea: it was inconvenient to use, with
downstream code having to branch between e.g. PySettle and CxxSettle;
it had no well-defined external interface; it had multiple virtually
identical entry points; and it had no separation between simulation
algorithms and glue code.

This commit completely rearranges simulation code.
  1. sim._base defines internal simulation interfaces. The clarity of
     these internal interfaces is important because simulation
     engines mix and match components to provide a consistent API
     regardless of the chosen engine.
  2. sim.core defines the external simulation interface: the commands
     and the simulator facade. The facade provides a single entry
     point and, when possible, validates or lowers user input.
     It also imports built-in simulation engines by their symbolic
     name, avoiding eager imports of pyvcd or ctypes.
  3. sim.xxxsim (currently, only sim.pysim) defines the simulator
     implementation: time and state management, process scheduling,
     and waveform dumping.

The new simulator structure has none of the downsides of the old one.

See #324.
2020-08-27 11:52:31 +00:00
whitequark 6d9852506f vendor.xilinx_{7series,ultrascale}: set BUFG* SIM_DEVICE as appropriate.
Fixes #438 (again).
2020-08-26 15:45:58 +00:00
whitequark abaa9091f4 vendor.xilinx_7series: unbreak.
This commit fixes a series of typos introduced in commit 4e208b0a.
2020-08-26 14:57:31 +00:00
whitequark 0802f943ba lib.cdc: in AsyncFFSynchronizer(), rename domain= to o_domain=.
This is for consistency with other synchronizers.

Fixes #467.
2020-08-26 03:19:13 +00:00
Robin Ole Heinemann 630c0fd99a vendor.lattice_machxo_2_3l: add SRAM svf generation 2020-08-24 14:41:14 +00:00
Mariusz Glebocki 4e208b0ac1 vendor: Add initial support for Symbiflow for Xilinx 7-series 2020-08-24 14:39:10 +00:00
Mariusz Glebocki 77616837e8 vendor.xilinx_7series: add _part property getter 2020-08-24 14:39:10 +00:00
Robin Ole Heinemann b86acdc601 vendor.lattice_{ecp5,machxo_2_3l}: specify impl-dir correctly 2020-08-10 17:52:47 +00:00
whitequark d964ba9cc4 build,vendor: never carry around parts of differential signals.
When a port component is skipped, it should appear neither in the RTL
nor in the constraint file. However, passing around components of
differential ports explicitly makes that harder.

Fixes #456.
Supersedes #457.

Co-authored-by: Jean THOMAS <git0@pub.jeanthomas.me>
2020-07-31 18:41:59 +00:00
whitequark c9662c5ff8 vendor.xilinx_{7series,ultrascale}: use BUFGCTRL rather than BUFGCE.
Fixes #438 (again).
2020-07-31 17:48:22 +00:00
whitequark c75fa45fd8 vendor.xilinx_{7series,ultrascale}: add SIM_DEVICE parameter.
The parameter defaults to "ULTRASCALE", even when synthesizing for
7-series devices. This could lead to a simulation/synthesis mismatch,
and causes a warning.

Fixes #438.
2020-07-23 16:38:28 +00:00
Jean THOMAS f7a8fcc94c
vendor.lattice_ecp5: add missing differential IO types. 2020-07-23 12:24:31 +00:00
whitequark 23da2fdda6 vendor.xilinx_{7series,ultrascale}: remove grade property.
This was added in commit bfd4538d based on a misunderstanding of how
Xilinx part numbers work.
 * non-ultrascale 7-series parts don't have temperature grades;
 * ultrascale parts have temperature grade as a part of speed grade.
2020-07-08 09:08:00 +00:00
Konrad Beckmann d4946b060a vendor.lattice_ecp5: Add support for io with xdr=7
This adds support for IOs with xdr=7 using the
IODDR71B and ODDR71B primitives.
2020-07-06 16:12:07 +00:00
Konrad Beckmann 981e674081 vendor.lattice_ecp5: Add support for io with xdr=4
This adds support for IOs with xdr=4 using the
IDDRX2F and ODDRX2F primitives.
2020-07-06 16:12:07 +00:00
whitequark 6bfff25e76 vendor: yosys is not a required tool for proprietary toolchains.
Since commit b9799b4c, the discovery mechanism for the Yosys required
to produce Verilog is different from the usual require_tool(); namely
it is possible to produce Verilog without a `yosys` binary on PATH.

Fixes #419.
2020-07-02 18:13:54 +00:00
whitequark 706eb03e6b vendor.lattice_machxo2: add back as a compatibility shim. 2020-06-21 17:28:01 +00:00
Gwenhael Goavec-Merou 0aef5f4d48
vendor.lattice_machxo*: add MachXO3L support. 2020-06-21 17:24:47 +00:00
whitequark afa4345903 vendor.lattice_ice40: reword confusing comment. NFC. 2020-05-31 10:21:45 +00:00
whitequark 43b1ed1bf6 vendor.intel: don't use write_verilog -decimal.
See commit 702e41ba for details.
2020-05-21 09:49:42 +00:00
whitequark 7238e58224 vendor.intel: double-quote Tcl values rather than brace-quoting.
For unknown reasons, Quartus treats {foo} and "foo" in completely
different ways, which is not true for normal Tcl code; specifically,
it preserves the braces if they are used. Because of this, since
commit 6cee2804, the vendor.intel package was completely broken.
2020-05-21 09:48:42 +00:00
whitequark 702e41ba3c vendor.xilinx_{7series,ultrascale}: don't use write_verilog -decimal.
In commit 892cff05, `-decimal` was used when writing Verilog for
Vivado targets because it treats (* keep=32'd1 *) and (* keep=1 *)
differently in violation of Verilog LRM. However, it is possible
to avoid that workaround by using (* keep="TRUE" *). Do that,
and remove `-decimal` to avoid special-casing 32-bit constants.

Refs #373.
2020-05-21 08:57:43 +00:00
whitequark 892cff059b vendor.xilinx_{7series,ultrascale}: add (*keep*) on constrained clocks.
If the clock signal is not a top-level port and has aliases, it can
be optimized out, and then the constraint will no longer apply.
To prevent this, make sure the constrained signal is preferred over
any aliases by using the `keep` attribute.

Vivado does not parse attributes like (* keep = 32'd1 *) as valid
even though, AFAICT, they are equivalent to (* keep = 1 *) or simply
(* keep *) per IEEE 1364. To work around this, use the solution we
currently use for Quartus, which is `write_verilog -decimal`.

Fixes #373.
2020-05-20 04:58:03 +00:00
Gwenhael Goavec-Merou e301798cee
vendor.lattice_machxo2: generate binary bitstreams. 2020-05-08 04:42:21 +00:00