Skip to content

Conversation

@teqdruid
Copy link
Contributor

It has been observed that some simulators (verilator) does not handle combinational driving from DPI well (resulting in non-determinism wrt. some of the combinational outputs being dropped/replicated). Questa does not show this behavior. A mitigation is to add a skid buffer to decouple the DPI interface from the output interface. Use the existing skid buffer from ESIPrimitives.

It has been observed that some simulators (verilator) does not handle
combinational driving from DPI well (resulting in non-determinism wrt.
some of the combinational outputs being dropped/replicated). Questa does
not show this behavior. A mitigation is to add a skid buffer to decouple
the DPI interface from the output interface. Use the existing skid
buffer from ESIPrimitives.
@teqdruid teqdruid requested a review from Copilot September 17, 2025 19:38
@teqdruid teqdruid added the ESI label Sep 17, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a skid buffer to the Cosim_Endpoint_ToHost module to mitigate non-deterministic behavior observed in some simulators (specifically Verilator) when handling combinational driving from DPI interfaces. The solution uses an existing ESI_PipelineStage primitive to decouple the DPI interface from the output interface.

Key changes:

  • Introduces intermediate pipeline signals (DataOut_a_*) to buffer data from DPI calls
  • Replaces direct DataOut assignments with a skid buffer implementation using ESI_PipelineStage
  • Updates the control logic to work with the new buffered approach

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@teqdruid teqdruid requested a review from mortbopet September 18, 2025 00:54
@teqdruid
Copy link
Contributor Author

@mortbopet feel free to merge if you approve.

@mortbopet mortbopet merged commit 0886d5e into main Sep 18, 2025
8 checks passed
@mortbopet mortbopet deleted the teqdruid/cosim-dpi-skid branch September 18, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants