From: Clifford Wolf Date: Thu, 11 Jul 2013 17:24:59 +0000 (+0200) Subject: Another vloghammer related bugfix X-Git-Tag: yosys-0.2.0~536 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b380c8c790233f9237b503656cfd28fd5e65eff5;p=yosys.git Another vloghammer related bugfix --- diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index 7a9c8ba64..791ee9867 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -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; } diff --git a/tests/simple/vloghammer.v b/tests/simple/vloghammer.v index 09987e7c9..eb0e15d02 100644 --- a/tests/simple/vloghammer.v +++ b/tests/simple/vloghammer.v @@ -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 +