|
From: Stephen W. <st...@ic...> - 2016-02-09 00:13:56
|
If you make a small but complete example that we cal compile for ourselves, we can take a look at this. On 02/08/2016 12:50 PM, Dan McLeran wrote: > I am using iverilog to learn SystemVerilog. I am following along in a > digital system design book and am having trouble building one of the > examples. The code uses a function to calculate log2: > > module #(parameter AL = 8, BL = 8, QL = AL + BL) ... > > logic[clog2(AL):0] count; > ... > function clog2(input int n); > begin > clog2 = 0; > n--; > while(n > 0) > begin > clog2++; > n >>= 1; > end > end > endfunction > endmodule > > I calling iverilog like this: > > iverilog -g2012 -Wall -o booth booth.sv > > It seems to get hung processing the loop or detecting n == 0 or > something. Is there an easy way > to debug this? I was thinking I'd run iverilog within gdb but maybe > there is a faster way to determine what is happening? > > Regards, > > Dan McLeran > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > Iverilog-devel mailing list > Ive...@li... > https://lists.sourceforge.net/lists/listinfo/iverilog-devel > -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." |