Commit 1e6fa7b8 by Zachary Snow

fix looping simplification on unfolded based literals

parent b2b6f8f8
......@@ -66,6 +66,10 @@ simplifyStep (Call (Ident "$clog2") (Args [Dec k] [])) =
clog2 :: Integer -> Integer
clog2 n = if n < 2 then 0 else clog2Help 1 n
-- TODO: add full constant evaluation for all number literals to avoid the
-- anti-loop hack below
simplifyStep e@(BinOp _ (BinOp _ Number{} Number{}) Number{}) = e
simplifyStep (BinOp op e1 e2) = simplifyBinOp op e1 e2
simplifyStep other = other
......
module top;
initial $display("%b", (12'hb03 - 12'hb07) + 12'hb10);
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment