mr_vasanth
Member level 5
- Joined
- Mar 12, 2007
- Messages
- 86
- Helped
- 5
- Reputation
- 10
- Reaction score
- 7
- Trophy points
- 1,288
- Location
- Bangalore, India, India
- Activity points
- 1,906
Code Verilog - [expand] 1 2 3 4 5 function integer clogb2; input[31:0] value; for(clogb2=0; value>0; clogb2=clogb2+1) value = value>>1; endfunction
Assume the input value is 1.
I just could not understand how the recursive function call works and when clogb2=clogb2+1 gets executed.
Can someone explain this ?
Last edited by a moderator: