litedram/bench/arty.py

163 lines
6.9 KiB
Python
Raw Permalink Normal View History

add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
#!/usr/bin/env python3
#
# This file is part of LiteDRAM.
#
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
import os
import argparse
from migen import *
2022-05-02 07:07:29 -04:00
from litex_boards.platforms import digilent_arty
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
from litex.soc.cores.clock import *
from litex.soc.interconnect.csr import *
from litex.soc.integration.soc_core import *
from litex.soc.integration.builder import *
from litedram.common import PHYPadsReducer
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
from litedram.phy import s7ddrphy
from litedram.modules import MT41K128M16
from liteeth.phy.mii import LiteEthPHYMII
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# CRG ----------------------------------------------------------------------------------------------
class _CRG(Module, AutoCSR):
def __init__(self, platform, sys_clk_freq):
self.rst = Signal()
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
self.clock_domains.cd_sys_pll = ClockDomain()
self.clock_domains.cd_sys = ClockDomain()
self.clock_domains.cd_sys4x = ClockDomain(reset_less=True)
self.clock_domains.cd_sys4x_dqs = ClockDomain(reset_less=True)
self.clock_domains.cd_clk200 = ClockDomain()
self.clock_domains.cd_uart = ClockDomain()
2020-12-10 07:43:31 -05:00
self.clock_domains.cd_eth = ClockDomain()
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# # #
2021-06-29 06:36:02 -04:00
# Main PLL.
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
self.submodules.main_pll = main_pll = S7PLL(speedgrade=-1)
self.comb += main_pll.reset.eq(~platform.request("cpu_reset"))
main_pll.register_clkin(platform.request("clk100"), 100e6)
main_pll.create_clkout(self.cd_sys_pll, sys_clk_freq)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
main_pll.create_clkout(self.cd_clk200, 200e6)
main_pll.create_clkout(self.cd_uart, 100e6)
2020-12-10 07:43:31 -05:00
main_pll.create_clkout(self.cd_eth, 25e6)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
main_pll.expose_drp()
self.submodules.idelayctrl = S7IDELAYCTRL(self.cd_clk200)
2020-12-10 07:43:31 -05:00
self.comb += platform.request("eth_ref_clk").eq(self.cd_eth.clk)
2021-06-29 06:36:02 -04:00
# DRAM PLL.
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
self.submodules.pll = pll = S7PLL(speedgrade=-1)
self.comb += pll.reset.eq(~main_pll.locked | self.rst)
pll.register_clkin(self.cd_sys_pll.clk, sys_clk_freq)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
pll.create_clkout(self.cd_sys, sys_clk_freq)
pll.create_clkout(self.cd_sys4x, 4*sys_clk_freq)
pll.create_clkout(self.cd_sys4x_dqs, 4*sys_clk_freq, phase=90)
2021-06-29 06:36:02 -04:00
# Sys Clk Counter.
self.sys_clk_counter = CSRStatus(32)
2021-06-29 06:36:02 -04:00
self.sync += self.sys_clk_counter.status.eq(self.sys_clk_counter.status + 1)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# Bench SoC ----------------------------------------------------------------------------------------
class BenchSoC(SoCCore):
def __init__(self, uart="crossover", sys_clk_freq=int(125e6), with_bist=False, with_analyzer=False):
2022-05-02 07:07:29 -04:00
platform = digilent_arty.Platform()
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# SoCCore ----------------------------------------------------------------------------------
SoCCore.__init__(self, platform, clk_freq=sys_clk_freq,
2020-12-10 05:12:45 -05:00
ident = "LiteDRAM bench on Arty",
2020-10-29 13:58:37 -04:00
integrated_rom_size = 0x10000,
integrated_rom_mode = "rw",
uart_name = uart)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# CRG --------------------------------------------------------------------------------------
self.submodules.crg = _CRG(platform, sys_clk_freq)
# DDR3 SDRAM -------------------------------------------------------------------------------
self.submodules.ddrphy = s7ddrphy.A7DDRPHY(
pads = PHYPadsReducer(platform.request("ddram"), [0, 1]),
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
memtype = "DDR3",
nphases = 4,
sys_clk_freq = sys_clk_freq)
self.add_sdram("sdram",
phy = self.ddrphy,
module = MT41K128M16(sys_clk_freq, "1:4"),
origin = self.mem_map["main_ram"],
2021-03-12 04:25:11 -05:00
with_bist = with_bist)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# UARTBone ---------------------------------------------------------------------------------
if uart != "serial":
self.add_uartbone(name="serial", clk_freq=100e6, baudrate=115200, cd="uart")
# Etherbone --------------------------------------------------------------------------------
self.submodules.ethphy = LiteEthPHYMII(
clock_pads = self.platform.request("eth_clocks"),
pads = self.platform.request("eth"),
with_hw_init_reset = False)
self.add_etherbone(phy=self.ethphy)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# Analyzer ---------------------------------------------------------------------------------
if with_analyzer:
from litescope import LiteScopeAnalyzer
analyzer_signals = [self.ddrphy.dfi]
self.submodules.analyzer = LiteScopeAnalyzer(analyzer_signals,
depth = 256,
clock_domain = "sys",
csr_csv = "analyzer.csv")
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# Leds -------------------------------------------------------------------------------------
from litex.soc.cores.led import LedChaser
self.submodules.leds = LedChaser(
pads = platform.request_all("user_led"),
sys_clk_freq = sys_clk_freq)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
# Main ---------------------------------------------------------------------------------------------
def main():
parser = argparse.ArgumentParser(description="LiteDRAM Bench on Arty A7")
parser.add_argument("--uart", default="crossover", help="Selected UART: crossover (default) or serial")
parser.add_argument("--build", action="store_true", help="Build bitstream")
parser.add_argument("--with-bist", action="store_true", help="Add BIST Generator/Checker")
parser.add_argument("--with-analyzer", action="store_true", help="Add Analyzer")
parser.add_argument("--load", action="store_true", help="Load bitstream")
parser.add_argument("--load-bios", action="store_true", help="Load BIOS")
parser.add_argument("--sys-clk-freq", default=None, help="Set sys_clk_freq")
parser.add_argument("--test", action="store_true", help="Run Full Bench")
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
args = parser.parse_args()
soc = BenchSoC(uart=args.uart, with_bist=args.with_bist, with_analyzer=args.with_analyzer)
2022-05-02 07:07:29 -04:00
builder = Builder(soc, csr_csv="csr.csv")
builder.build(run=args.build)
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
if args.load:
prog = soc.platform.create_programmer()
prog.load_bitstream(os.path.join(builder.gateware_dir, soc.build_name + ".bit"))
if args.load_bios:
2020-12-10 05:21:21 -05:00
from common import load_bios
2022-05-02 07:07:29 -04:00
load_bios("build/digilent_arty/software/bios/bios.bin")
if args.sys_clk_freq is not None:
from common import s7_set_sys_clk
s7_set_sys_clk(clk_freq=float(args.sys_clk_freq), vco_freq=soc.crg.main_pll.compute_config()["vco"])
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
if args.test:
from common import s7_bench_test
s7_bench_test(
freq_min = 60e6,
freq_max = 150e6,
freq_step = 1e6,
vco_freq = soc.crg.main_pll.compute_config()["vco"],
2022-05-02 07:07:29 -04:00
bios_filename = "build/digilent_arty/software/bios/bios.bin")
add bench directory with a first bench on arty board. The aim is to create an automated hardware bench, control is done over Etherbone (but could also be done over UARTBone, PCIe, USB, etc...) and various frequencies are tested and BIOS logged. It would also be useful to be able to recompile/reload BIOS in this bench to easily test software changes and verify it works with various frequencies. Can be tested with: ./arty.py --build --load lxserver --udp ./arty.py --test Dump Main PLL... ClkReg1: low_time: 8 high_time: 8 reserved: 1 phase_mux: 0 Reconfig Main PLL to 133.33333333333331MHz... Measuring sys_clk... sys_clk: 133.72MHz Reset SoC and get BIOS log... __ __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| Build your hardware, easily! (c) Copyright 2012-2020 Enjoy-Digital (c) Copyright 2007-2015 M-Labs BIOS built on Aug 6 2020 18:49:15 BIOS CRC passed (44c8f057) Migen git sha1: 7bc4eb1 LiteX git sha1: 188e6f57 --=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB L2: 8KiB MAIN-RAM: 262144KiB --========== Initialization ============-- Initializing DRAM @0x40000000... SDRAM now under software control SDRAM now under software control Read leveling: m0, b00: |00000000000000000000000000000000| delays: - m0, b01: |00000000000000000000000000000000| delays: - m0, b02: |00000000000000000000000000000000| delays: - m0, b03: |00000000000000000000000000000000| delays: - m0, b04: |00000000000000000000000000000000| delays: - m0, b05: |00000000000000000000000000000000| delays: - m0, b06: |00000000000000000000000000000000| delays: - m0, b07: |00000000000000000000000000000000| delays: - m0, b08: |00000000000000000000000000000000| delays: - m0, b09: |11111111111000000000000000000000| delays: 05+-05 m0, b10: |00000000000111111111110000000000| delays: 16+-05 m0, b11: |00000000000000000000000111111111| delays: 27+-04 m0, b12: |00000000000000000000000000000000| delays: - m0, b13: |00000000000000000000000000000000| delays: - m0, b14: |00000000000000000000000000000000| delays: - m0, b15: |00000000000000000000000000000000| delays: - best: m0, b09 delays: 05+-05 m1, b00: |00000000000000000000000000000000| delays: - m1, b01: |00000000000000000000000000000000| delays: - m1, b02: |00000000000000000000000000000000| delays: - m1, b03: |00000000000000000000000000000000| delays: - m1, b04: |00000000000000000000000000000000| delays: - m1, b05: |00000000000000000000000000000000| delays: - m1, b06: |00000000000000000000000000000000| delays: - m1, b07: |00000000000000000000000000000000| delays: - m1, b08: |00000000000000000000000000000000| delays: - m1, b09: |11111111111000000000000000000000| delays: 05+-05 m1, b10: |00000000000011111111111000000000| delays: 17+-05 m1, b11: |00000000000000000000000011111111| delays: 28+-04 m1, b12: |00000000000000000000000000000000| delays: - m1, b13: |00000000000000000000000000000000| delays: - m1, b14: |00000000000000000000000000000000| delays: - m1, b15: |00000000000000000000000000000000| delays: - best: m1, b09 delays: 05+-05 SDRAM now under hardware control Memtest at 0x40000000... [########################################] [########################################] Memtest OK Memspeed at 0x40000000... Writes: 212 Mbps Reads: 188 Mbps --============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout No boot medium found --============= Console ================-- litex> Reconfig Main PLL to 114.28571428571428MHz...
2020-08-06 13:01:48 -04:00
if __name__ == "__main__":
main()