3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 20:38:44 +00:00
yosys/tests/simple/case_expr_query.sv
Zachary Snow 7608985d2c fix width detection of array querying function in case and case item expressions
I also removed the unnecessary shadowing of `width_hint` and `sign_hint`
in the corresponding case in `simplify()`.
2021-12-17 21:22:08 -07:00

33 lines
562 B
Systemverilog

module top(
output logic [5:0] out
);
always_comb begin
out = '0;
case ($bits (out)) 6:
case ($size (out)) 6:
case ($high (out)) 5:
case ($low (out)) 0:
case ($left (out)) 5:
case ($right(out)) 0:
case (6) $bits (out):
case (6) $size (out):
case (5) $high (out):
case (0) $low (out):
case (5) $left (out):
case (0) $right(out):
out = '1;
endcase
endcase
endcase
endcase
endcase
endcase
endcase
endcase
endcase
endcase
endcase
endcase
end
endmodule