How to parameterize a case statement with don't cares?
问题 I have a wire called input and I want to detect the number of leading I am trying to create a module which uses the case statement below to change the output data depending on the number of leading zeros. However the size of the input is parameterizable. If X was a fixed value of 4, I would just create a case statement, case (input) 4'b0001 : o_data = {i_data[0]}; 4'b001x : o_data = {i_data[1],1'b0}; 4'b01xx : o_data = {i_data[2],2'b0}; 4'b1xxx : o_data = {i_data[3],3'b0}; default : o_data =