Guest
#3892761
I have the following line of code: constant DPRAM_DEPTH : integer := integer(ceil(log2(real(NUM_SLOTS)))); When NUM_SLOTS equals 0, I want my DPRAM_WIDTH to be 0, however log2 of 0 is negative infinity so I get an invalid result. How can I obtain 0 when NUM_SLOTS is 0, and still get the functionality I want out of that snippet of code? Thanks