In IceCore Getting Started there is some example code that one can clone from git.
One of these examples is the blink.v
. The function blink
there is "called" from function chip
in file chip.v
. In the latter clk
is said to be 25 MHz. I am not certain which config file that defines this. In chip.blif
I find clk
used in the [24]
large reg
in blink.v
. But where is 25 MHz defined?
The reason I ask is that the blinking blinks at a period of 1.34 s. However 25.000.000 / (2exp24) = 25000000 / 16777216 = 1.49.. - if this is the correct calculation. If I increase the reg size to 26 I get two more bits and 2exp2 = 4 times longer period, seen as 1.34 * 4 = 5.4 seconds period. I am scoping it. You can see the diff from the builds shown here.
Either my reasoning is wrong (most probably) or it's not 25 MHz? 22.5 MHz suits better from my calculations since 22500000 / 16777216 = 1,3411045074462891.