You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
microwatt/fpga
Paul Mackerras d458b5845c ECP5: Adjust PLL constants so the PLL lock indication works
At present, code (such as simple_random) which produces serial port
output during the first few milliseconds of operation produces garbled
output.  The reason is that the clock has not yet stabilized and is
running slow, resulting in the bit time of the serial characters being
too long.

The ECP5 data sheet says that the phase detector should be operated
between 10 and 400 MHz.  The current code operates it at 2MHz.
Consequently, the PLL lock indication doesn't work, i.e. it is always
zero.  The current code works around that by inverting it, i.e. taking
the "not locked" indication to mean "locked".

Instead, we now run it at 12MHz, chosen because the common external
clock inputs on ECP5 boards are 12MHz and 48MHz.  Normally this would
mean that the available system clock frequencies would be multiples of
12MHz, but this is a little inconvenient as we use 40MHz on the Orange
Crab v0.21 boards.  Instead, by using the secondary clock output for
feedback, we can have any divisor of the PLL frequency as the system
clock frequency.

The ECP5 data sheet says the PLL oscillator can run at 400 to 800
MHz.  Here we choose 480MHz since that allows us to generate 40MHz and
48MHz easily and is a multiple of 12MHz.

With this, the lock signal works correctly, and the inversion can be
removed.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
3 years ago
..
LICENSE Initial import of microwatt 5 years ago
acorn-cle-215.xdc acorn: Add support for the Acorn CLE 215+ 4 years ago
arty_a7.xdc Remove -add from xdc files 3 years ago
clk_gen_bypass.vhd Fix clk_gen_bypass 5 years ago
clk_gen_ecp5.vhd ECP5: Adjust PLL constants so the PLL lock indication works 3 years ago
clk_gen_mcmm.vhd Fix some whitespace issues 3 years ago
clk_gen_plle2.vhd fpga/clk_gen_plle2: Add support for 50Mhz->100Mhz 3 years ago
cmod_a7-35.xdc Remove -add from xdc files 3 years ago
firmware.hex Add a few more FPGA related files 5 years ago
fpga-random.vhdl Add random number generator and implement the darn instruction 4 years ago
fpga-random.xdc Add random number generator and implement the darn instruction 4 years ago
genesys2.xdc Remove -waveform from xdc files 3 years ago
hello_world.hex hello_world: Use new headers and frequency from syscon 4 years ago
main_bram.vhdl Rename 'do' signal to avoid verilator System Verilog warning 3 years ago
nexys-video.xdc litesdcard: Add Nexys Video support 3 years ago
nexys_a7.xdc Remove -add from xdc files 3 years ago
pp_fifo.vhd pp_fifo: Fix full fifo losing all data on simultaneous push & pop 4 years ago
pp_soc_uart.vhd uart: Remove combinational loops on ack and stall signal 4 years ago
pp_utilities.vhd Initial import of microwatt 5 years ago
soc_reset.vhdl soc_reset: Use counters, add synchronizers 4 years ago
soc_reset_tb.vhdl Exit cleanly from testbench on success 4 years ago
top-acorn-cle-215.vhdl acorn: Add support for the Acorn CLE 215+ 4 years ago
top-arty.vhdl Merge pull request #329 from paulusmack/wb-fix 3 years ago
top-generic.vhdl core: Add a short multiplier 3 years ago
top-genesys2.vhdl fpga: Add support for Genesys2 4 years ago
top-nexys-video.vhdl Merge pull request #329 from paulusmack/wb-fix 3 years ago
top-wukong-v2.vhdl Add support for QMTech Wukong v2 board 3 years ago
wukong-v2.xdc Add support for QMTech Wukong v2 board 3 years ago