Open ertgtct opened 4 years ago
I agree. The verilog code provided by lattice is
wire clk_48;
SB_HFOSC u_hfosc (
.CLKHFPU(1'b1),
.CLKHFEN(1'b1),
.CLKHF(clk_48)
);
I agree too.
A solution could be an "output-clk". Then you only have to use the code-block above once. It would be possible the prescale the 48Mhz to the usual 12Mhz before assigning for compatibility reasons.
I'll add my $0.02 here in saying this would be nice to have.
Idea: Is it possible to make your own custom block that you define the RTL for? In that case, it is just as simple as putting this RTL in that block?
wire clk;
SB_HFOSC inthosc(.CLKHFPU(1'b1), .CLKHFEN(1'b1), .CLKHF(clk));
Has anyone tried this already?
I just tested the above method, and it works.
Here is a link to the .ice file for this to use as a starter point:
https://gist.github.com/jrwagz/a2722055eea4211acd902e7548ee3905
It would be great to be able to define one of the internal oscillators (the HF one in the best case) as input for the clock network. Then you dont have to route the clock discretely. An example can be found here: https://github.com/Idorobots/upduino-blinky/blob/master/blinky-extended/blinky.v (Credits go to Idorobots for the great example).