Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[firtool][test] Check layer specialization options work. #7364

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions test/firtool/specialize-layers-1.fir
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
; RUN: firtool %s -disable-layers=A -split-input-file | FileCheck %s
; RUN: firtool %s | FileCheck %s --check-prefixes=DEFAULT,COMMON
; RUN: firtool %s --disable-layers=A | FileCheck %s --check-prefixes=SPECIALIZE,COMMON
; RUN: firtool %s --enable-layers=A | FileCheck %s --check-prefixes=SPECIALIZE,ENABLE,COMMON

; Check that layer specialization works.
; CHECK-LABEL: module LayerSpecialization();
; CHECK-NEXT: endmodule

; SPECIALIZE-NOT: LayerSpecialization_A
; DEFAULT: module LayerSpecialization_A

; COMMON-LABEL: module LayerSpecialization();
; ENABLE-NEXT: Ext ext ();
; COMMON-NEXT: endmodule

; SPECIALIZE-NOT: LayerSpecialization_A
; DEFAULT: "layers_LayerSpecialization_A.sv"
FIRRTL version 4.0.0
circuit LayerSpecialization:
layer A, bind:
extmodule Ext:
public module LayerSpecialization:
layerblock A:
wire w : UInt<1>
invalidate w
inst ext of Ext
Loading