Skip to content

Instantly share code, notes, and snippets.

@jz5
Created November 17, 2013 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jz5/7510913 to your computer and use it in GitHub Desktop.
Save jz5/7510913 to your computer and use it in GitHub Desktop.
$clog2 sample
module m #(max_size = 1023) (
input clk,
input rst_n,
input [$clog2(max_count):0] in,
output [$clog2(max_count):0] out
);
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment