Commit graph

21 commits

Author SHA1 Message Date
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
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
whitequark 6d9852506f vendor.xilinx_{7series,ultrascale}: set BUFG* SIM_DEVICE as appropriate.
Fixes #438 (again).
2020-08-26 15:45:58 +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
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
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
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 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
whitequark 6cee280407 plat, vendor: systematically escape net and file names in Tcl.
Before this commit, there was only occasional quoting of some names
used in any Tcl files. (I'm not sure what I was thinking.)

After this commit, any substs that may include Tcl special characters
are escaped. This does not include build names (which are explicitly
restricted to ASCII to avoid this problem), or attribute names (which
are chosen from a predefined set). Ideally we'd use a more principled
approach but Jinja2 does not support custom escaping mechanisms.

Note that Vivado restricts clock names to a more restrictive set that
forbids using Tcl special characters even when escaped.

Fixes #375.
2020-05-02 10:41:18 +00:00
Nicolas Robin 28f5eba9fb vendor: fix typo async_ff_sync 2020-03-15 11:34:52 +00:00
whitequark 12c79025f3 vendor: fix a few issues in commit 2f8669ca. 2020-03-12 20:29:17 +00:00
awygle 2f8669cad6
lib.cdc: extract AsyncFFSynchronizer.
In some cases, it is necessary to synchronize a reset-like signal but
a new clock domain is not desirable. To address these cases, extract
the implementation of ResetSynchronizer into AsyncFFSynchronizer,
and replace ResetSynchronizer with a thin wrapper around it.
2020-03-08 21:37:40 +00:00
whitequark 3e2ecdf2fb build.res,vendor: place clock constraint on port, not net, if possible.
For most toolchains, these are functionally identical, although ports
tend to work a bit better, being the common case. For Vivado, though,
it is necessary to place them on the port because its timing analyzer
considers input buffer delay.

Fixes #301.
2020-02-06 23:37:15 +00:00
whitequark 5888f29c1f xilinx_{7series,ultrascale}: run report_methodology.
This can expose important timing issues, such as #301.
2020-02-06 19:38:21 +00:00
Jean-François Nguyen f207f3f620 vendor.xilinx_*: Set IOB attribute on cels instead of nets. 2019-11-18 15:04:03 +00:00
Emily a783e4645d Refactor build script toolchain lookups.
Now environment variable overrides no longer infect the build scripts.

_toolchain.overrides is dropped as probably misguided in the first place.

Fixes #251.
2019-10-13 13:53:24 +00:00
whitequark 9fe27a15ad vendor.xilinx_ultrascale: new supported family. 2019-10-10 16:35:48 +00:00