russeree
Newbie level 2
![Newbie level 2](/styles/images/ranks/alevel2.gif)
I am very new to functions, I have a parameter to specify the input freq(mhz). Would this return a value I could use to specify a vector width?
Code:
function int _ms_unit_width;
int freq_mhz = (int_input_freq_mhz/1000);
_ms_unit_width = ($clog2(freq_mhz)+1);
endfunction