diff options
| author | azidar | 2015-05-01 13:48:06 -0700 |
|---|---|---|
| committer | azidar | 2015-05-01 13:48:06 -0700 |
| commit | 5c63bea388663b82eb1ea43464dfea055b10a79b (patch) | |
| tree | 1687fe4031d743724a4e7747e6cc37d67d401d37 | |
| parent | 723c48b1ed0c341a10d1eba5a226787c33398505 (diff) | |
Bug fix. ExpWidth was improperly evaluated during simplify (not subtracting one)
| -rw-r--r-- | src/main/stanza/passes.stanza | 2 | ||||
| -rw-r--r-- | test/passes/infer-widths/dsh.fir | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza index 429a1406..b1410fa4 100644 --- a/src/main/stanza/passes.stanza +++ b/src/main/stanza/passes.stanza @@ -1395,7 +1395,7 @@ defn solve-constraints (l:List<WGeq>) -> HashTable<Symbol,Int> : (w1,w2) : w (w:ExpWidth) : match(arg1(w)) : - (w1:IntWidth) : IntWidth(pow(2,width(w1))) + (w1:IntWidth) : IntWidth(pow(2,width(w1)) - 1) (w1) : w (w) : w defn substitute (w:Width,h:HashTable<Symbol,Width>) -> Width : diff --git a/test/passes/infer-widths/dsh.fir b/test/passes/infer-widths/dsh.fir index 1eb23115..2cbdfd34 100644 --- a/test/passes/infer-widths/dsh.fir +++ b/test/passes/infer-widths/dsh.fir @@ -1,4 +1,4 @@ -; RUN: firrtl -i %s -o %s.flo -x abcdefghijkl -p ctd | tee %s.out | FileCheck %s +; RUN: firrtl -i %s -o %s.flo -x abcdefghijkl -p cd | tee %s.out | FileCheck %s ;CHECK: Infer Widths |
