Skip to content

Document simulation API for watching uninitialized input signals#291

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/document-watch-on-uninitialized-signals
Draft

Document simulation API for watching uninitialized input signals#291
Copilot wants to merge 3 commits intomasterfrom
copilot/document-watch-on-uninitialized-signals

Conversation

Copy link

Copilot AI commented Feb 28, 2026

SpinalHDL 1555 introduced an API to detect undriven DUT input signals during simulation, but it was undocumented. Adds a new section to Simulation/signal.rst covering all four new functions.

Changes

  • source/SpinalHDL/Simulation/signal.rst — New "Watching uninitialized input signals" section with an API reference table and usage example:

    • addInputsAssignmentWatch(dut) — mark all module inputs as watched
    • addWatchedSignals(signals) — mark an explicit Seq[BaseType] as watched
    • checkInputsAssignmentAfterReset(cd, stopOnFail) — after each clock sampling, emit warnings (or call simFailure) for any watched input that has never been driven
    • checkWatchedSignalAssigned() — returns names of currently undriven watched signals
  • .gitignore — Added build/ to exclude Sphinx HTML output from the repo.

Example

SimConfig.compile(new MyTopLevel).doSim { dut =>
  addInputsAssignmentWatch(dut)          // watch all inputs
  dut.clockDomain.forkStimulus(10)
  checkInputsAssignmentAfterReset(dut.clockDomain, stopOnFail = false)

  // forgetting to drive dut.io.enable here triggers a warning each cycle
  dut.clockDomain.waitSampling(100)
  simSuccess()
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Document watch on uninitialized input signals.</issue_title>
<issue_description>Do not merge until SpinalHDL/SpinalHDL#1555 has not been merged</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 28, 2026 05:53
Co-authored-by: Readon <3614708+Readon@users.noreply.github.com>
Co-authored-by: Readon <3614708+Readon@users.noreply.github.com>
Copilot AI changed the title [WIP] Document watch on uninitialized input signals Document simulation API for watching uninitialized input signals Feb 28, 2026
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.

Document watch on uninitialized input signals.

2 participants