google / google/xls

Side-effect condition pass is fragile

Open
#2,008 0 comments 0 reactions 0 assignees View on GitHub
codegen
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

The side-effect condition pass (a codegen pass) can randomly fail with a "stage guard not found" type of error.

The problem seems to mostly occur because codegen performs dataflow simplification, which can replace or remove the relevant stage guard signal (e.g. stage_valid, pipeline_valid, etc.).

#1300 is one way to fix this- we could make replacing the stage guard be a supported operation that still allows the side-effect condition pass to get the needed signals.

Another way to fix this is to reorder the steps of codegen, e.g. delay delay dataflow simplification until after side-effects have been rewritten, or to have a placeholder for the stage guard during cloning so that we don't need a side-effect condition pass, we just replace the placeholder.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.