forked from chipsalliance/firrtl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tests, and included a check for the name of the pass, which
allows the compiler to print after each pass to ease debugging
- Loading branch information
Showing
11 changed files
with
131 additions
and
27 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,10 @@ | ||
TODO: rename ! to *. | ||
|
||
when declare a var, give it a type because compiler assumes it is ? | ||
|
||
if costantantly adding to end of a list, should use a vector type instead of a list, because add is much faster than append (depends on length of left operand) | ||
|
||
TODO: test case | ||
inst a of mywire | ||
|
||
|
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,46 @@ | ||
; RUN: firrtl %s abcde | tee %s.out | FileCheck %s | ||
|
||
;CHECK: Infer Types | ||
circuit top : | ||
module subtracter : | ||
input x : UInt | ||
input y : UInt | ||
output z : UInt | ||
z := sub-mod(x, y) | ||
module gcd : | ||
input a : UInt(16) | ||
input b : UInt(16) | ||
input e : UInt(1) | ||
output z : UInt(16) | ||
output v : UInt(1) | ||
reg x : UInt | ||
reg y : UInt | ||
; CHECK: reg x : UInt | ||
x.init := UInt(0) | ||
y.init := UInt(42) | ||
when greater(x, y) : | ||
inst s of subtracter | ||
s.x := x | ||
s.y := y | ||
x := s.z | ||
else : | ||
inst s2 of subtracter | ||
s2.x := x | ||
s2.y := y | ||
y := s2.z | ||
when e : | ||
x := a | ||
y := b | ||
v := equal(v, UInt(0)) | ||
z := x | ||
module top : | ||
input a : UInt(16) | ||
input b : UInt(16) | ||
output z : UInt | ||
inst i of gcd | ||
i.a := a | ||
i.b := b | ||
i.e := UInt(1) | ||
z := i.z | ||
|
||
|
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,8 @@ | ||
; RUN: firrtl %s abcde | tee %s.out | FileCheck %s | ||
|
||
;CHECK: Infer Types | ||
circuit top : | ||
module top : | ||
wire io : {input x : UInt, output y : UInt} | ||
io.x := add(io.x,io.y) | ||
;CHECK: n:io:{input x : UInt, output y : UInt}.x := add(n:io:{input x : UInt, output y : UInt}.x, n:io:{input x : UInt, output y : UInt}.y) |
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
1 change: 1 addition & 0 deletions
1
test/passes/make-explicit-reset/abc.fir → .../passes/make-explicit-reset/mix-reset.fir
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
1 change: 1 addition & 0 deletions
1
test/passes/resolve-kinds/ab.fir → test/passes/resolve-kinds/gcd.fir
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