[Oberon] FPGA - Colour Support

Skulski, Wojciech skulski at pas.rochester.edu
Sat Oct 7 20:25:37 CEST 2017


These clock manipulations look interesting. I wonder how ISE or Vivado translate these into logic. Combinatorial clocks cannot be used in FPGA designs. Combinatorial means "derived from logic equations" like the ones we see below. The reason is that the clocking inputs to flip flops are seldom (if ever) directly connected to the fabric, where such equations are implemented in hardware. And even if such connections exist (I doubt they do), using them is strongly discouraged by the FPGA manufacturers. Maybe ISE tools are smart enough to somehow pack these equations into the Digital Clock Manager (DCM)? 

So it is an interesting piece of HDL which is calling either for a rework or for examination of the translation report to find out, how it is implemented by the tools. If you want to divide the clock by five, then I am pretty sure the DCM will need to be used.

Concerning the SPI, it can run at a wide range of frequencies. Perhaps some part has some special requirements, which then need to be dealt with locally in the respective HDL module. 

For the OberonStation, RISC5Top.v looks like this:

always @(posedge clk0) clk <= ~clk;

always @(posedge clkfx) begin
  clk0 <= ~clk0 & ~clk1; clk1 <= clk0;
  pclk <= ~pclk;

clkfx runs at 150 MHz
pcclk runs at 75 MHz (VGA timing)
clk0 runs at 50 MHz
clk runs at 25 MHz

So, instead of dividing by 3 and then by 2 to get to clk, we would need to divide clkfx by 5.
Of course the SPI divider „tick“ needs to adopted from 63 to 75 and so on. (400 kHz = 25MHz / 63 = 30 MHz / 75)
Sorry, I forgot to mention these details.

More information about the Oberon mailing list