diff options
Diffstat (limited to 'test/passes/infer-types/gcd.fir')
| -rw-r--r-- | test/passes/infer-types/gcd.fir | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/passes/infer-types/gcd.fir b/test/passes/infer-types/gcd.fir index b261f0d1..4fdc9ab1 100644 --- a/test/passes/infer-types/gcd.fir +++ b/test/passes/infer-types/gcd.fir @@ -1,4 +1,4 @@ -; RUN: firrtl %s abcde | tee %s.out | FileCheck %s +; RUN: firrtl %s abcde ct | tee %s.out | FileCheck %s ;CHECK: Infer Types circuit top : @@ -7,6 +7,7 @@ circuit top : input y : UInt output z : UInt z := sub-mod(x, y) + ;CHECK: z@<t:UInt> := sub-mod(x@<t:UInt>, y@<t:UInt>)@<t:UInt> module gcd : input a : UInt(16) input b : UInt(16) @@ -19,10 +20,16 @@ circuit top : x.init := UInt(0) y.init := UInt(42) when greater(x, y) : + ;CHECK: when greater(x@<t:UInt>, y@<t:UInt>)@<t:UInt> : inst s of subtracter + ;CHECK: inst s of subtracter@<t:{input x : UInt@<t:UInt>, input y : UInt@<t:UInt>, output z : UInt@<t:UInt>, input reset : UInt(1)@<t:UInt(1)>}> s.x := x s.y := y x := s.z + ;CHECK: s@<t:{input x : UInt@<t:UInt>, input y : UInt@<t:UInt>, output z : UInt@<t:UInt>, input reset : UInt(1)@<t:UInt(1)>}>.reset@<t:UInt(1)> := reset@<t:UInt(1)> + ;CHECK: s@<t:{input x : UInt@<t:UInt>, input y : UInt@<t:UInt>, output z : UInt@<t:UInt>, input reset : UInt(1)@<t:UInt(1)>}>.x@<t:UInt> := x@<t:UInt> + ;CHECK: s@<t:{input x : UInt@<t:UInt>, input y : UInt@<t:UInt>, output z : UInt@<t:UInt>, input reset : UInt(1)@<t:UInt(1)>}>.y@<t:UInt> := y@<t:UInt> + ;CHECK: x@<t:UInt> := s@<t:{input x : UInt@<t:UInt>, input y : UInt@<t:UInt>, output z : UInt@<t:UInt>, input reset : UInt(1)@<t:UInt(1)>}>.z@<t:UInt> else : inst s2 of subtracter s2.x := x @@ -32,6 +39,7 @@ circuit top : x := a y := b v := equal(v, UInt(0)) + ;CHECK: v@<t:UInt(1)> := equal(v@<t:UInt(1)>, UInt(0))@<t:UInt> z := x module top : input a : UInt(16) @@ -43,4 +51,4 @@ circuit top : i.e := UInt(1) z := i.z - +; CHECK: Finished Infer Types |
