-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIRRTL][LowerLayers] Update rwprobe operations if possible.
Fixes first example in #7365 . Add error path to LowerLayers so anything that goes wrong can fail the pass.
- Loading branch information
Showing
4 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; RUN: firtool %s | FileCheck %s | ||
|
||
FIRRTL version 4.0.0 | ||
|
||
; Check use of colored rwprobe in enablelayers. | ||
; Check rwprobe of hardware in a layer. | ||
|
||
; Order isn't critical, but for simplicity just check lines. | ||
|
||
; CHECK: module TH(); | ||
; CHECK-NEXT: `ifndef SYNTHESIS | ||
; CHECK-NEXT: initial | ||
; CHECK-NEXT: force TH.d.t.w = 1'h1; | ||
; CHECK-NEXT: `endif // not def SYNTHESIS | ||
; CHECK-NEXT: DUT d (); | ||
; CHECK-NEXT: endmodule | ||
|
||
; CHECK: module DUT_T(); | ||
; CHECK-NEXT: wire w = 1'h0; | ||
; CHECK-NEXT: endmodule | ||
; | ||
; CHECK: module DUT(); | ||
; CHECK-NEXT: endmodule | ||
|
||
circuit TH: | ||
layer T, bind: | ||
|
||
public module TH enablelayer T: | ||
inst d of DUT | ||
force_initial(d.p, UInt<1>(1)) | ||
|
||
public module DUT: | ||
output p : RWProbe<UInt<1>, T> | ||
|
||
layerblock T: | ||
wire w : UInt<1> | ||
connect w, UInt<1>(0) | ||
define p = rwprobe(w) | ||
|