Skip to content

fpga: reject implicit nets in synthesis - #128

Merged
adambagley merged 2 commits into
mainfrom
implicit_net_guard
Oct 31, 2026
Merged

adambagley merged 2 commits into
mainfrom
implicit_net_guard

Conversation

@adambagley

Copy link
Copy Markdown
Collaborator

Verilator binds a name used before its declaration to the later declaration. Inside a generate block, Vivado instead gives the use its own implicit net, so either the use or the declaration is left undriven and the hardware differs from every Verilator simulation. The build accepted this without complaint.

  • Declare the six nets on main that were used before their declarations: the NIC RX and TX engines' packer and unpacker inputs, the APLIC read capture in soc_top, and the async FIFO's read pointer. Each use was in its module's own scope, where Vivado binds the later declaration, so the logic does not change.
  • Treat Synth 8-11241, Vivado's implicit-net message, as an error in top-level synthesis. fpga/README.md's troubleshooting table describes the error, and a test keeps the setting ahead of synthesis.

X3 synthesis passes with the check, also with the VCU118's 1G Ethernet logic enabled, and main without the declaration moves stops on it. The VCU118 build itself was not run. Lint, the build-flow tests and the NIC, APLIC and async FIFO benches pass.

The NIC engines' packer and unpacker connections, the APLIC read capture in
soc_top and the async FIFO's write-side pointer synchronizer named nets
declared further down their modules. Vivado assumed implicit nets for them
and, because each use was in the module's own scope, bound them to the
later declarations, so the logic was unaffected. Declare them before their
first use so that synthesis can reject implicit nets.
Verilator binds a name used before its declaration to the later
declaration. Inside a generate block, Vivado instead gives the use its own
implicit net, so either the use or the declaration is left undriven and
Vivado ties the logic it feeds to constants, unlike any Verilator
simulation. Top-level synthesis now treats Synth 8-11241, Vivado's
implicit-net message, as an error. The troubleshooting table describes the
error, and a test keeps the setting ahead of synthesis.
@adambagley
adambagley merged commit d403f3b into main Oct 31, 2026
42 of 86 checks passed
@adambagley
adambagley deleted the implicit_net_guard branch October 31, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant