How can I make array length the logarithm of an input parameter in Verilog?

OP #5992586
Rate this post
useful
not useful
The Verilog module I want to write has a parameter that is an integer, 
and I need to create an array of integers whose length is the ceiling of 
(smallest integer greater than or equal to) the log (base two) of that 
parameter. Does anyone know how I can do that in Verilog?

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now