Another vloghammer related bugfix
authorClifford Wolf <clifford@clifford.at>
Thu, 11 Jul 2013 17:24:59 +0000 (19:24 +0200)
committerClifford Wolf <clifford@clifford.at>
Thu, 11 Jul 2013 17:24:59 +0000 (19:24 +0200)
frontends/ast/genrtlil.cc
tests/simple/vloghammer.v

index 7a9c8ba645054fecb7017d9d46980e9f825388de..791ee986761aeea34eb7ee4b9543a50e93e0171f 100644 (file)
@@ -836,7 +836,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
        case AST_TO_SIGNED:
        case AST_TO_UNSIGNED: {
                        RTLIL::SigSpec sig = children[0]->genRTLIL();
-                       is_signed = type == AST_TO_SIGNED;
+                       is_signed = sign_hint;
                        return sig;
        }
 
index 09987e7c93c9d2bfff1cb709b455959afe408f86..eb0e15d029eaaecf370ace2b426735a0f2d22ab8 100644 (file)
@@ -50,3 +50,10 @@ module test07(a, b, y);
   assign y = 2'b11 != a+b;
 endmodule
 
+module test08(a, b, y);
+  input [1:0] a;
+  input [1:0] b;
+  output y;
+  assign y = a == ($signed(b) >>> 1);
+endmodule
+