title: verilog, binary length of a parameter
body: <p>My module gets a parameter and I want to have a counter in my code to that value. say for example, <code>parameter n=16</code> and I want to define <code>reg [x:0] i</code> so I can count to n. how can I find x ? there should be a real easy way ? </p>