Skip to content

Commit

Permalink
[WireDFT] Add support for wiring optional clock div bypass signal. (#…
Browse files Browse the repository at this point in the history
…5219) (#5225)

If a signal is annotated as the clock divider bypass signal, wire it to clock gates that have the expected port.

Like test_en wiring the port number is hardcoded, but unlike test_en this ignores the "bypass" port if that port doesn't match the expected bypass port name/dir/type.

Warning is emitted if looks compatible but name doesn't match and bypass signal annotation is found.
  • Loading branch information
dtzSiFive authored May 18, 2023
1 parent 3e9e5fa commit b1e3e33
Show file tree
Hide file tree
Showing 5 changed files with 335 additions and 152 deletions.
2 changes: 2 additions & 0 deletions include/circt/Dialect/FIRRTL/AnnotationDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ constexpr const char *metadataDirectoryAttrName =
constexpr const char *noDedupAnnoClass = "firrtl.transforms.NoDedupAnnotation";
constexpr const char *dftTestModeEnableAnnoClass =
"sifive.enterprise.firrtl.DFTTestModeEnableAnnotation";
constexpr const char *dftClockDividerBypassAnnoClass =
"sifive.enterprise.firrtl.DFTClockDividerBypassAnnotation";

// Grand Central Annotations
constexpr const char *serializedViewAnnoClass =
Expand Down
1 change: 1 addition & 0 deletions lib/Dialect/FIRRTL/Transforms/LowerAnnotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ static const llvm::StringMap<AnnoRecord> annotationRecords{{
{extractAssumeAnnoClass, NoTargetAnnotation},
{extractCoverageAnnoClass, NoTargetAnnotation},
{dftTestModeEnableAnnoClass, {stdResolve, applyWithoutTarget<true>}},
{dftClockDividerBypassAnnoClass, {stdResolve, applyWithoutTarget<true>}},
{runFIRRTLTransformAnnoClass, {noResolve, drop}},
{mustDedupAnnoClass, NoTargetAnnotation},
{addSeqMemPortAnnoClass, NoTargetAnnotation},
Expand Down
Loading

0 comments on commit b1e3e33

Please sign in to comment.