casex example
module encode (A, valid, Y);
input [7:0] A; // 8-bit input vector
output [2:0] Y; // 3-bit encoded output
output valid; // Asserted when an input is not all 0’s
reg [2:0] Y; // target of assignment
Y = 3’bx; // Don’t care when input is all 0’s
casex: alternatives can include x and z
? x and z bits are not used in the evaluation