You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@rachitnigam
Currently vast produces the wrong output when a bit shift is part of an add expression. The output does not respect verilog order of operations.
Here is a test that fails:
#[test]
fn test_bit_shift_order_of_operations() {
let bin1 = Expr::new_ulit_bin(4, "1000");
let bin2 = Expr::new_ulit_bin(4, "0100");
let shift_by :i32 = 2;
let shift = Expr::new_shift_left(bin1, shift_by);
let add = Expr::new_add(bin2, shift);
let exp = "4'b0100 + (4'b1000 << 2)".to_string();
let res = add.to_string();
check!(res, exp);
}
with a result of 4'b0100 + 4'b1000 << 2
instead of 4'b0100 + (4'b1000 << 2)
If this is a more general issue I'd be happy to look into it more.
The text was updated successfully, but these errors were encountered:
@rachitnigam
Currently vast produces the wrong output when a bit shift is part of an add expression. The output does not respect verilog order of operations.
Here is a test that fails:
with a result of
4'b0100 + 4'b1000 << 2
instead of
4'b0100 + (4'b1000 << 2)
If this is a more general issue I'd be happy to look into it more.
The text was updated successfully, but these errors were encountered: