Commit Graph

393 Commits

Author SHA1 Message Date
Dr Jonathan Richard Robert Kimmitt afb49cca01 fuzzers/036-iob18-ologic-sing: SING-row IOB18 OLOGIC segbits
A SING-row sibling of 036-iob18-ologic.  The parent fuzzer filters
to IOB18S / IOB18M (diff-pair main / secondary), leaving the IOB18
site type in *_SING tiles uncharacterised.  This fuzzer's filter
is the complement: only the IOB18 site type, only in *_SING
tiles.  Pushes to lioi_sing / rioi_sing via the two new mergedb
modes.

utils/mergedb.sh: add the two missing modes.  The captured
specimens emit LIOI_SING. and RIOI_SING. entries in the same
file; the new cases grep each side into its own merge target so
the existing segbits_lioi_sing.db / segbits_rioi_sing.db are
populated symmetrically without needing to refactor the fuzzer
into two passes.

Note: the SING-tile frame layout has 2 words (offsets 99..100),
so OLOGIC features at word offsets 30+ within the regular LIOI
tile cannot be straightforwardly mirrored.  The 10 features the
fuzzer captures (ZINV_CLK, ODDR/OSERDES SRTYPE/TSRTYPE, OSERDES
DATA_WIDTH variants) all land within the SING tile's two-word
window.  The OMUX.D1 / OQUSED / OSERDES.DATA_RATE_TQ.BUF features
nextpnr-xilinx emits for transparent OBUF route-thrus on V7
SING-row IOBs (VC707 led[?] @ LIOI_SING_X82Y51) still need a
separate solution -- they likely live in an aliased frame
through the neighbouring full LIOI tile.  Tracking that as a
separate follow-up.
2026-06-04 14:13:02 +01:00
Dr Jonathan Richard Robert Kimmitt a8de0afdb3 virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
  - rst_to_led (IBUF↔OBUF passthrough)
  - counter_skewfree (button-clocked 8b counter, general routing)
  - counter_sw_bufr (button → BUFR → 8b counter)
  - counter_bufr  (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
  - counter_2bufg (2× BUFGCTRL on the same source)
  - vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
  - vc707_picosoc  (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
                    'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)

Highlights of this drop:

utils/fasm2frames.py (+223 net):
  - Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
    IBUFDS differential pair. Fires off the FASM-level direction
    heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
    .IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
    on default-state IOBs too).
  - INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
    Y1 OBUF is present.
  - PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
    cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
    flow naturally from the existing IOSTANDARD segbits).
  - HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
    for BUFRCLK3 (the channel exercised by counter_sw_bufr).
  - GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
    INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
  - PUDC_B tile excluded from the bank-glue walk (its IN features are
    virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).

utils/utils.tcl (+47):
  - write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
    bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
    dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
    041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).

utils/mergedb.sh (+15):
  - LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
    rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
    uses left-side IOB18 too; upstream kintex7 mergedb only knew the
    right side).

11 fuzzers patched for virtex7 readiness:
  - 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
    HP-bank results come from the actual fuzzer rather than HR-side sed.
  - 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
    LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
    EXCLUDE_RE updated for L-side prefixes.
  - 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
    XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
  - 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
  - 041, 045, 034, 034b, 043, 044, 046: removed local
    write_pip_txtdata override that shadowed the patched utils.tcl
    bulk-fetch (was re-introducing the slow per-net Tcl path).

README.md (+86):
  - 'Virtex-7 Port Status (virtex7-support branch)' section —
    achievements, goals, work-in-progress, constraints.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 10:13:53 +01:00
Dr Jonathan Richard Robert Kimmitt 39f5de415d Add Virtex-7 (xc7vx485t) family support
Port prjxray to the Virtex-7 family, modelled on Kintex-7, targeting
xc7vx485tffg1761-2 (vc707). Non-breaking for the existing families.

Family registration:
- settings/virtex7.sh, settings/virtex7/devices.yaml
- Makefile: virtex7 in DATABASES/XRAY_PARTS + db-extras-virtex7 targets
- utils/update_parts.py, update_resources.py: virtex7 choice
- CI matrix (Pipeline.yml), Vivado edition (xilinx.sh), README

Architecture adaptations for the HP-bank-only VX part (verified non-breaking):
- update_resources.tcl: fall back to HP banks when no HR banks exist
- XRAY_IOSTANDARD env (default LVCMOS33; LVCMOS18 for virtex7), parameterised
  across the fuzzer generate.tcl files
- fuzzers: enable HP-bank (iob18/ioi18) + IOI/HCLK handling for virtex7;
  GTX skipped (ffg1761 bonds only ~7 of 14 GTX quads)
- 005-tilegrid: HP/HR bank tile handling; iob18_int INT offset 3->2;
  ioi18 AUTO_FRAME; cfg PDRC-2 DRC disable; add_tdb skips unsolved edge tiles;
  per-specimen retry for transient FlexLM SIGSEGV under concurrency
- per-family Vivado version gate (virtex7 -> v2020.1.1)
- XRAY_ROI and XRAY_ROI_GRID tuned to a compact CLBLL+CLBLM region

General fixes:
- tools/bitread.cc: fix use-after-free of the mmap'd bitstream (exposed by the
  larger Virtex-7 bitstream)
- utils/environment.python.sh: add repo root to PYTHONPATH (PEP 660 editable
  install doesn't expose the repo-root utils/ package)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 07:21:23 +01:00
Hans Baier 59551505e3 utils/mergedb.sh: add GTX support
Signed-off-by: Hans Baier <foss@hans-baier.de>
2025-02-13 17:20:08 +07:00
Hans Baier 2ce7ea1381 riob18: fix IBUF_LOW_PWR_SUPPORTED
Signed-off-by: Hans Baier <hansfbaier@gmail.com>
2022-12-14 05:15:48 +07:00
Hans Baier c7cc58362c add support for the kintex high performance banks
Signed-off-by: Hans Baier <hansfbaier@gmail.com>
2022-11-24 01:37:46 +07:00
Adrien Prost-Boucle 7044d85649 utils/environment.h: Protect against unintentionally wrongly set env var XRAY_VIVADO
Signed-off-by: Adrien Prost-Boucle <adrien.prost-boucle@laposte.net>
2022-08-18 03:21:37 +02:00
Alessandro Comodi 1bd8142625 scripts: use open safe file class
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2022-03-17 10:04:19 +01:00
Alessandro Comodi 5e5217c631 utils: add file locking
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2022-03-10 14:05:40 +01:00
Alessandro Comodi 6c4188a520 utils: parallelize all roi parts generation
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2022-03-04 11:05:55 +01:00
Steve f3474a2625 Add support for xc7s50
The previous xc7s50t branch was messed up. This new branch is created to re-submit xc7s50t's changes for merging.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
2021-12-13 18:39:27 +08:00
litghost 2046bcaa9a
Merge pull request #1627 from dnltz/WIP/dnltz/parts_fixups
Docu fixup and prevent AssertionError
2021-04-01 09:23:18 -07:00
Alessandro Comodi 2be05d612b utils: update_resources: remove temp_file
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-03-26 13:47:38 +01:00
Alessandro Comodi 8305cc81d9 run make format-tcl
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-03-26 13:47:38 +01:00
Alessandro Comodi cb54b7f012 update_resources: skip parts with same speedgrade to get pins
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-03-26 13:47:38 +01:00
Alessandro Comodi 0219727e9c cells_data: add clock information on ports.json
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-03-26 13:47:38 +01:00
Daniel Schultz f562d6acfd Makefile: Do not dump the environment during db-prepare
The resources.yaml file does not exists at the beginning of the db-prepare calls
but the environment wants to read it which leads to the following error:

Preparing artix7 files
============================
Traceback (most recent call last):
  File ".../prjxray/utils/create_environment.py", line 62, in <module>
    main()
  File ".../prjxray/utils/create_environment.py", line 55, in main
    environment = get_environment_variables()
  File ".../prjxray/utils/create_environment.py", line 37, in get_environment_variables
    part_info = get_part_information(db_root, part)
  File ".../prjxray/prjxray/util.py", line 44, in get_part_information
    "Mapping file {} does not exists".format(filename)
AssertionError: Mapping file .../prjxray/database/artix7/mapping/parts.yaml does not exists

Do not dump the environment during this stage because the XRAY_PART is the only
neccessary information which is set in the <family>.sh script.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2021-03-26 08:28:54 +01:00
Daniel Schultz 74ba878c25 utils: Add new tools to roi all parts
* Adds a new tool to update the parts mapping file for a family.
* Adds a new tool to update the resource file for a family.
* Adds a new tool to roi all parts by calling "make roi_only" with different
   parts

Update the Makefile to update the artix7 files with "make db-update".

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2021-03-15 17:37:58 +01:00
Alessandro Comodi 6794c98cdf gtp: generate attributes and ports files to add to the db
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-03-09 16:06:19 +01:00
Alessandro Comodi 711895765f 062-pcie-int-pips: add fuzzer to document PCIE_INT_INTERFACE DELAY PIPs
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-02-05 19:18:35 +01:00
Alessandro Comodi 5137498bcb 066-gtp-int-pips: add fuzzer for GTP_INT_INTERFACE DELAY PIPs
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-02-04 12:35:00 +01:00
Alessandro Comodi 6e95748068 065-gtp-common-pips: add fuzzer to document GTP_COMMON_MID pips
Problems found:

- for some PIPs configurations, no bit is generated. For instance if
there are only connections with RX/TX from the GTP channel
- some missing PIPs with one bit only
- re-routing now correctly runs for every PIP

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-02-02 19:35:23 +01:00
Jan Kowalewski 1d7c55e034 mergedb: add gtp_channel_mid
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2021-01-22 10:40:04 +01:00
Jan Kowalewski 4620af4639 064-gtp-channel: enable gtp_channel in mergedb
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2021-01-22 10:40:04 +01:00
Alessandro Comodi 47baef5aea mergedb: add gtp_common_mid
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-01-20 18:23:24 +01:00
Alessandro Comodi 5c892e4f44 063-gtp-common: enable gtp_common in mergedb
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-01-20 18:23:24 +01:00
Alessandro Comodi 3d4c9addf0 environment: fix environment set up
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-01-20 11:28:56 +01:00
Alessandro Comodi ea772f01b6 mergedb: add pcie_bot tile
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-01-14 17:17:13 +01:00
Daniel Schultz cd4ca4916e Update tests to fabric refactoring
Since the tilegrid.json file is not anymore placed inside the part directory,
the test needs to be updated slightly to work with the new structure.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2021-01-12 22:36:58 +01:00
Daniel Schultz ec15a221d6 utils: xyaml: Do not use deprecated function
From the official PyYAML documentation:

"Warning: It is not safe to call yaml.load with any data received from an
untrusted source! yaml.load is as powerful as pickle.load and so may call
any Python function. Check the yaml.safe_load function though."

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2021-01-12 22:36:58 +01:00
Daniel Schultz d3fba0c6a0 utils: Overwrite localisation settings
Set localisation settings to default values to prevent different locale
results from tools.

Example: Non-English speaking countries use a comma as decimal seperators but
Python's float convert only accepts a point.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2021-01-12 22:36:58 +01:00
Keith Rothman 90d420eef3 Add initial MMCM feature and PIP support.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2020-10-08 17:44:42 -07:00
Keith Rothman b741467366 Increase 044 filters and reverse order of mergedb for better errors.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2020-10-08 11:18:27 -07:00
Keith Rothman 9ecee64d4e Add IFF.IN_USE feature.
This addresses missing features in
https://github.com/SymbiFlow/symbiflow-arch-defs/issues/1536 .

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2020-10-06 10:43:39 -07:00
Keith Rothman 837e160560 Add fix to prevent INT features with 3 bits.
This may help fix #1246.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2020-10-01 11:20:06 -07:00
Keith Rothman c7033a6a19 Clean up python install process.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2020-09-09 09:48:48 -07:00
Maciej Kurc 0ac02c2d27 Added a feature name check to mergedb.py
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2020-07-29 16:35:27 +02:00
litghost 764ec71eb2 Revert "Move fasm2frames to prjxray"
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2020-06-15 17:32:11 -07:00
Alessandro Comodi 8e4e400b17 move fasm2frames to prjxray to avoid including utils in python package
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2020-06-09 13:47:58 +02:00
Andrew Butt 5d4f056864 Add reset config to allow upload to PS region
Signed-off-by: Andrew Butt <butta@seas.upenn.edu>
2020-05-29 09:54:48 -04:00
Tim Ansell 1f41082937
Merge pull request #1301 from antmicro/licensing
Updating copyright headers to match current best practices
2020-05-26 09:01:50 -07:00
Tomasz Michalak c66f4f4aa1 Add license headers to tcl files
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
2020-05-26 07:33:12 -07:00
Tomasz Michalak 300bc62227 Add licensing header to bash scripts
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
2020-05-26 07:33:12 -07:00
Tomasz Michalak e8311caea2 Add licensing header to python scripts
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
2020-05-26 07:33:12 -07:00
Andrew Butt e27733b714 Added support for xc7z020clg400-1 and added an openocd config file for pynq-z1
Signed-off-by: Andrew Butt <butta@seas.upenn.edu>
2020-05-22 16:34:51 -04:00
Alessandro Comodi 28a93e08cc fix pytest
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2020-05-21 16:32:49 +02:00
Alessandro Comodi 12bf76f897 setup: include utils directory
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2020-05-21 13:42:26 +02:00
Maciej Kurc 9582526071 Corrected feature name in fasm2frames.py
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2020-05-07 15:51:55 +02:00
Alessandro Comodi 2d62f223d6 grid: update test data and make format
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2020-03-24 20:27:26 +01:00
Tim Ansell dd5fb6d9d5
Merge pull request #1254 from mithro/segprint-tool
Fix segprint tool for new tileconn.json location
2020-02-26 21:24:21 -08:00