nextpnr/himbaechel
Joris van Zwieten 83a2430d19 himbaechel/xilinx: fix MMCM loop filter and power register programming
The MMCM fasm writer put the 10-bit BANDWIDTH loop-filter word into
FILTREG1_RESERVED[11:0] and wrote a hardcoded 0x3d4 into TABLE[9:0].
prjxray's TABLE[9:0] is the loop-filter table word; with the filter
word misplaced the MMCM analog loop is misconfigured and never
asserts LOCKED on hardware (clock outputs stay dead).

Swap them: TABLE[9:0] gets filter_lookup[CLKFBOUT_MULT-1],
FILTREG1_RESERVED[11:0] gets the constant 0x8, matching Vivado
bitstreams for the same configurations.

Also program POWER_REG from the actual configuration instead of
0xffff: 0x0100 for integer-only counters, 0x9900 when CLKOUT0 or
CLKFBOUT uses fractional divide, again matching Vivado (verified on
integer and CLKOUT0_DIVIDE_F=6.5 fractional testcases by diffing
against Vivado bitstreams).

Hardware-validated on xc7a100t (QMTech Wukong): MMCM-derived clocks
(integer and fractional configurations) lock and run; the same
designs never asserted LOCKED before this change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 15:39:04 +02:00
..
himbaechel_dbgen himbaechel: Extend API to enable cell delay override (#1535) 2025-08-20 06:32:18 +02:00
uarch himbaechel/xilinx: fix MMCM loop filter and power register programming 2026-07-30 15:39:04 +02:00
.gitignore himbächel: Initial implementation 2023-05-13 08:26:41 +02:00
CMakeLists.txt himbaechel: Merge all test entrypoints into one 2026-07-27 11:01:32 +02:00
arch.cc himbaechel: Enable use of electrostatic placer (#1657) 2026-03-03 12:19:41 +01:00
arch.h himbaechel: bounds check getBelByLocation 2026-05-04 13:38:04 +02:00
arch_pybindings.cc himbaechel: Add Python binding for get_tile_wire_range 2025-06-25 18:37:17 +02:00
arch_pybindings.h himbächel: Initial implementation 2023-05-13 08:26:41 +02:00
archdefs.h Add GroupId related calls to Himbaechel API (#1399) 2024-12-05 13:59:33 +01:00
chipdb.h himbaechel: Extend API to enable cell delay override (#1535) 2025-08-20 06:32:18 +02:00
himbaechel_api.cc himbaechel: Enable use of electrostatic placer (#1657) 2026-03-03 12:19:41 +01:00
himbaechel_api.h himbaechel: Enable use of electrostatic placer (#1657) 2026-03-03 12:19:41 +01:00
himbaechel_constids.h himbächel: Initial implementation 2023-05-13 08:26:41 +02:00
himbaechel_gfxids.h Add GroupId related calls to Himbaechel API (#1399) 2024-12-05 13:59:33 +01:00
himbaechel_helpers.cc himbaechel: Add support for new constants API 2023-11-07 09:00:03 +01:00
himbaechel_helpers.h clangformat 2024-09-30 14:51:33 +02:00
main.cc himbaechel: add uarch specific options parsing (#1582) 2025-10-21 14:41:53 +02:00
test_main.cc himbaechel: Merge all test entrypoints into one 2026-07-27 11:01:32 +02:00