diff options
| author | azidar | 2015-12-10 14:36:33 -0800 |
|---|---|---|
| committer | azidar | 2016-01-16 11:45:00 -0800 |
| commit | fd35220712129f5f0074444008702af4aaf19ad2 (patch) | |
| tree | 8ac0a08ac325f452b11f4195b86640e65092669f /src/main/stanza/ir-utils.stanza | |
| parent | 2beab33ac298470bc04caf1c3b7a5a0d17d465d4 (diff) | |
Finished adding clocks to Stop and Print
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
| -rw-r--r-- | src/main/stanza/ir-utils.stanza | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza index dbcf3b73..9bcf1fd9 100644 --- a/src/main/stanza/ir-utils.stanza +++ b/src/main/stanza/ir-utils.stanza @@ -279,9 +279,9 @@ defmethod print (o:OutputStream, c:Stmt) : (c:EmptyStmt) : print(o, "skip") (c:StopStmt) : - print-all(o, ["stop(" ret(c) ")"]) + print-all(o, ["stop(" clk(c) ", " ret(c) ")"]) (c:PrintfStmt) : - print-all(o, ["printf("]) ;" + print-all(o, ["printf(" clk(c) ", " ]) ;" print-all(o, join(List(escape(string(c)),args(c)), ", ")) print(o, ")") @@ -376,7 +376,8 @@ defmethod map (f: Expression -> Expression, c:Stmt) -> Stmt : (c:Connect) : Connect(info(c),f(loc(c)), f(exp(c))) (c:BulkConnect) : BulkConnect(info(c),f(loc(c)), f(exp(c))) (c:OnReset) : OnReset(info(c),f(loc(c)),f(exp(c))) - (c:PrintfStmt) : PrintfStmt(info(c),string(c),map(f,args(c))) + (c:PrintfStmt) : PrintfStmt(info(c),string(c),map(f,args(c)),f(clk(c))) + (c:StopStmt) : StopStmt(info(c),ret(c),f(clk(c))) (c) : c public defmulti map<?T> (f: Stmt -> Stmt, c:?T&Stmt) -> T |
