aboutsummaryrefslogtreecommitdiff
path: root/test/passes/resolve-kinds
diff options
context:
space:
mode:
authorazidar2015-12-09 18:31:45 -0800
committerazidar2016-01-16 14:28:17 -0800
commitbe78d49aa01c097978f69a3b022acb2047fdf438 (patch)
tree76dc4b32b5e6861938404ebb4d124ca5b87d13a5 /test/passes/resolve-kinds
parentc427b31a1ef8361b643d5f7435aeb42472dfe626 (diff)
New memory works with verilog. Slowly changing tests and fixing bugs.
Decided to not have Conditionally in low firrtl - instead, Print and Stop have enables
Diffstat (limited to 'test/passes/resolve-kinds')
-rw-r--r--test/passes/resolve-kinds/gcd.fir44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/passes/resolve-kinds/gcd.fir b/test/passes/resolve-kinds/gcd.fir
index 2f8deb4e..3583c81a 100644
--- a/test/passes/resolve-kinds/gcd.fir
+++ b/test/passes/resolve-kinds/gcd.fir
@@ -6,8 +6,8 @@ circuit top :
input x : UInt
input y : UInt
output z : UInt
- z := subw(x, y)
- ;CHECK: z@<k:port> := subw(x@<k:port>, y@<k:port>)
+ z <= subw(x, y)
+ ;CHECK: z@<k:port> <= subw(x@<k:port>, y@<k:port>)
module gcd :
input clk : Clock
input reset : UInt<1>
@@ -18,24 +18,24 @@ circuit top :
output v : UInt<1>
reg x : UInt,clk,reset
reg y : UInt,clk,reset
- onreset x := UInt(0)
- onreset y := UInt(42)
+ onreset x <= UInt(0)
+ onreset y <= UInt(42)
when gt(x, y) :
inst s of subtracter
- s.x := x
- ;CHECK: s@<k:inst>.x := x@<k:reg>
- s.y := y
- x := s.z
+ s.x <= x
+ ;CHECK: s@<k:inst>.x <= x@<k:reg>
+ s.y <= y
+ x <= s.z
else :
inst s2 of subtracter
- s2.x := x
- s2.y := y
- y := s2.z
+ s2.x <= x
+ s2.y <= y
+ y <= s2.z
when e :
- x := a
- y := b
- v := eq(v, UInt(0))
- z := x
+ x <= a
+ y <= b
+ v <= eq(v, UInt(0))
+ z <= x
module top :
input a : UInt<16>
input b : UInt<16>
@@ -44,13 +44,13 @@ circuit top :
output z : UInt
inst i of gcd
;CHECK: inst i of gcd@<k:module>
- i.a := a
- i.b := b
- i.clk := clk
- i.reset := reset
- i.e := UInt(1)
- z := i.z
- ;CHECK: z@<k:port> := i@<k:inst>.z
+ i.a <= a
+ i.b <= b
+ i.clk <= clk
+ i.reset <= reset
+ i.e <= UInt(1)
+ z <= i.z
+ ;CHECK: z@<k:port> <= i@<k:inst>.z
; CHECK: Finished Resolve Kinds