Commit Graph

6403 Commits

Author SHA1 Message Date
Piotr Binkowski 18e90234b0 interconnect/axi: add get_ios to full AXI 2020-12-18 08:59:11 +01:00
Florent Kermarrec 4092180662 tools/lxterm/json: json file provide relative path, add json file directory to image names.
Allow sharing same json file between serial boot and Ethernet/SDCard/SATAboot:

boot.json:
{
	"Image":        "0x40000000",
	"rv32.dtb":     "0x40ef0000",
	"rootfs.cpio":  "0x41000000",
	"opensbi.bin":  "0x40f00000"
}

If boot.json and images are located in images directory, using lxterm --images=images/boot.json
will now work.
2020-12-17 16:08:32 +01:00
enjoy-digital f777cddefe
Merge pull request #731 from lindemer/pmp
Allow selection of VexRiscv_Secure* from lxsim CLI
2020-12-14 19:41:51 +01:00
Samuel Lindemer c23a894014 Allow selection of VexRiscv_Secure* from lxsim CLI 2020-12-14 10:54:02 +01:00
Florent Kermarrec bc2b7995f5 integration/export/get_csr_header: don't generate replace/write fields access functions when CSR is read only. 2020-12-14 10:51:37 +01:00
bunnie 649edd189a
Merge pull request #729 from betrusted-io/master
another minor change - reveal STARTUPE2 block's ring oscillator
2020-12-13 02:19:56 +08:00
bunnie 422cc2baae another minor change - reveal STARTUPE2 block's ring oscillator 2020-12-13 01:49:43 +08:00
Florent Kermarrec fb3b09db15 integration/soc/add_uart: add crossover+bridge support.
Useful to have both CPU UART and bridge debug capability.
2020-12-10 18:32:21 +01:00
Florent Kermarrec 88bd754dd6 software: add minimal baremetal demo app.
Used to demonstrates how to easily create baremetal apps, boot to it with LiteX and
also ease litex_term testing.

To build it: export BUILD_DIR=xxyy/litex/litex/boards/targets/build/arty && make
To load it: lxterm /dev/ttyUSB1 --kernel=demo.bin

--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
[LXTERM] Received firmware download request from the device.
[LXTERM] Uploading demo.bin to 0x40000000 (9264 bytes)...
[LXTERM] Upload complete (9.8KB/s).
[LXTERM] Booting the device.
[LXTERM] Done.
Executing booted program at 0x40000000

--============= Liftoff! ===============--

LiteX minimal demo app built Dec 10 2020 17:13:02

Available commands:
help               - Show this command
reboot             - Reboot CPU
led                - Led demo
donut              - Spinning Donut demo
litex-demo-app> led
Led demo...
Counter mode...
Shift mode...
Dance mode...
litex-demo-app> donut
Donut demo...

                                      $$$$$@@@@@
                                  $##########$$$$$$$$
                               ###*!!!!!!!!!***##$$$$$$
                             ***!!====;;;;===!!**###$$$$#
                            **!===;;;:::::;:===!!**####$##
                          !*!!==;;:~-,,.,-~::;;=!!**#######!
                          !!!!=;:~-,.......-~::==!!***#####*
                         !!!!==;~~-.........,-:;==!!***###**!
                         !**!!=;:~-...     ..-:;=!!!********!
                        ;!*#####*!!;.       ~:;==!!!******!!=
                        :!*###$$$$#*!      :;==!!!!!****!!!=;
                        ~=!*#$$$@@@$$##!!!!!!!!!!!!****!!!!=;
                         ;=!*#$$$@@@@$$#*******!*!!*!!!!!==;~
                         -;!*###$$$$$$$###******!!!!!!!===;~
                          -;!!*####$#####******!!!!!!==;;:-
                           ,:=!!!!**#**#***!!!!!!!====;:~,
                             -:==!!!*!!*!!!!!!!===;;;:~-
                               .~:;;========;=;;:::~-,
                                  .--~~::::~:~~--,.
litex-demo-app>
2020-12-10 17:16:28 +01:00
bunnie ef6fd57613
Merge pull request #727 from betrusted-io/master
fix a timing error in the S7 OPI block
2020-12-10 23:17:29 +08:00
Florent Kermarrec ee41fbb338 tools: deprecate litex_jtag_uart (now directly integrated in litex_term). 2020-12-10 15:48:10 +01:00
bunnie 8ee0fdbf8e fix a timing error in the S7 OPI block
should have no impact on normal operation, the path is
only for registering addresses that are correlated with
ECC errors as reported by the OPI device.
2020-12-10 22:48:09 +08:00
Florent Kermarrec 39b84581f4 tools/litex_term: add JTAG UART support (litex_term jtag_uart). 2020-12-10 15:46:12 +01:00
Florent Kermarrec 384041affb tools/litex_term/crossover: use burst to speed up reads. 2020-12-10 14:34:00 +01:00
Florent Kermarrec 48dc574703 integration/soc/add_uart: pass fifo_depth to UARTCrossover. 2020-12-10 14:33:29 +01:00
Florent Kermarrec 1976fd4b90 tools: deprecate litex_crossover_uart (now directly integrated in litex_term). 2020-12-10 13:54:21 +01:00
Florent Kermarrec feeb2f72e0 tools/litex_term: add direct crossover UART bridge suppport (lxterm --crossover) and switch to multiprocessing. 2020-12-10 13:45:38 +01:00
Stéphane Gourichon 8a82ddf6e1
CSR fields: generate convenience functions (#725)
Generate convenience methods to extract/replace bits in CSR fields, only generate replace if CSR register is writable.
2020-12-10 11:32:21 +01:00
Florent Kermarrec cd80c87f1a software/liblitedram/write_leveling: revert ideal_delay to 0, ensure write delay is set just before 0 to 1 transition. 2020-12-09 19:51:19 +01:00
Florent Kermarrec 5ebea9434b software/liblitedram/sdram: improve comments. 2020-12-09 17:53:33 +01:00
enjoy-digital 44d21cb0f3
Merge pull request #722 from geertu/master
tools/litex_json2dts: Miscellaneous fixes and improvements
2020-12-08 14:01:14 +01:00
enjoy-digital a80398d2ab
Merge pull request #724 from sergachev/master
soc/interconnect/axi: let connect_to_pads() be used by AXIInterface too
2020-12-08 13:45:12 +01:00
Florent Kermarrec c6fb9ef939 software/liblitedram: limit clk/cmd scan to 1/2 tCK.
Restrict the clk/cmd scan to 1/2 tCK since the full scan is not required
and in some cases can compromise the calibration with the wrong best clk/cmd
value selection.

This should also allow using cmd_latency=0 in all cases.
2020-12-08 10:01:18 +01:00
Florent Kermarrec c19c343ecf software/libbase: add memtest_access before testing bus/addr/data to exit early if bus errors are detected. 2020-12-07 14:05:51 +01:00
Florent Kermarrec fb05fbc5cc software: always provide flush_l2_cache implementation (even if empty) to avoid #ifdefs CONFIG_L2_SIZE. 2020-12-07 13:45:05 +01:00
Florent Kermarrec 3ce74f6e29 software/libbase/memtest: cosmetic cleanups. 2020-12-07 13:23:58 +01:00
Ilia Sergachev 9af9ee6b66 soc/interconnect/axi: let connect_to_pads() be used by AXIInterface too 2020-12-06 00:23:30 +01:00
Florent Kermarrec bed072ef19 tools/litex_term: use different payload_length/delay settings for USB-ACM. 2020-12-04 19:59:49 +01:00
Geert Uytterhoeven d8b844bbda tools/litex_json2dts: Group tuples in liteeth reg property
To improve human readability and enable automatic validation, the tuples
in "reg" properties should be grouped using angle brackets.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-12-04 16:38:48 +01:00
Geert Uytterhoeven a17b535906 tools/litex_json2dts: Fix DTS indentation
Make indentation of the generated DTS more consistent, by always using 8
spaces (no TABs), and aligning continued lines.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-12-04 16:21:52 +01:00
Geert Uytterhoeven 8265d06728 tools/litex_json2dts: Fix SPI bus #size-cells
As per Documentation/devicetree/bindings/spi/spi-controller.yaml,
"#size-cells" must be zero for a PCI bus.

This gets rid of the following build warnings:

    build/orangecrab/orangecrab.dts:105.29-39: Warning (reg_format): /soc/spi@f0004800/mmc-slot@0:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)
    buildroot/rv32.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
    buildroot/rv32.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
    buildroot/rv32.dtb: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
    buildroot/rv32.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
    build/orangecrab/orangecrab.dts:91.46-110.19: Warning (spi_bus_bridge): /soc/spi@f0004800: incorrect #size-cells for SPI bus
    buildroot/rv32.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
    buildroot/rv32.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'

Fixes: fafa844aa7 ("json2dts: Add Linux DT generation script")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-12-04 16:19:29 +01:00
Florent Kermarrec b7c0922ec1 tools/litex_term: increase outstanding to 128 (4 is slowing down speed with USB-FIFO). 2020-12-04 16:01:35 +01:00
Florent Kermarrec 894802d131 tools/litex_term: add sfl_outstanding parameter (set to 4), cleanup code and increase inter-frame delay.
This fixes upload on OrangeCrab with USB-ACM, but we still need to understand why
sfl_payload_length can't be set to 255 with USB-FIFO.
2020-12-04 15:46:18 +01:00
Florent Kermarrec 5e10552f3f soc/interconnect/packet/Packetizer: fix last_be for 10gbe. 2020-12-03 17:11:04 +01:00
enjoy-digital 168c5380cf
Merge pull request #718 from trabucayre/zynq_fix_constraints
don't add pins without pad location in constraints file
2020-12-03 16:21:06 +01:00
enjoy-digital 88023394fd
Merge pull request #721 from daveshah1/dave/nexus-pll-resetena
clock/lattice_nx: Set PLLRESET_ENA parameter
2020-12-03 15:54:16 +01:00
Florent Kermarrec dba6653cb4 tools/litex_term: reduce sfl_payload_length to 64 as before.
See: https://github.com/enjoy-digital/litex/issues/720.
2020-12-03 12:52:00 +01:00
David Shah 90315868a8 clock/lattice_nx: Set PLLRESET_ENA parameter
If this parameter isn't set to ENABLED; then the PLLRESET signal is
ignored.

Signed-off-by: David Shah <dave@ds0.me>
2020-12-03 11:49:48 +00:00
Florent Kermarrec 172dc18dfb bios/boot: remove SFL_CMD_LOAD_NO_CRC support (non longer useful since CRC checking is now fast). 2020-12-03 12:11:48 +01:00
enjoy-digital 136db6a0ca
Merge pull request #719 from davidlattimore/no-error-recovery
lxterm: Speed up CRC checked uploads
2020-12-03 12:06:46 +01:00
Florent Kermarrec d6a49e85c4 integration/soc_core: only add IRQs from interrupt_map if SoC supports them. 2020-12-03 09:48:42 +01:00
Florent Kermarrec 42e7b8d35a integration/soc/irq: improve error message. 2020-12-03 09:47:50 +01:00
David Lattimore b421d50b40 lxterm: Increase maximum payload size to match BIOS
sfl_frame (in sfl.h) already had a payload size of 255.

This should give about a 10% speed gain due to reduced overhead. 8 bytes
of header per 251 bytes sent, as opposed to 8 bytes of header per 60
bytes sent
2020-12-03 13:44:09 +11:00
David Lattimore 03c2257baf lxterm: Deprecate --no-crc flag
The flag is left, in case people are using it from scripts, but now does
nothing besides printing a warning.
2020-12-03 13:37:43 +11:00
David Lattimore 513a799a39 lxterm: Don't attempt to recover from CRC errors during upload.
This allows transfers to proceed at the full speed of the serial link.
We still check all responses, but will now fail outright if a CRC error
occurs.
2020-12-03 13:37:26 +11:00
Gwenhael Goavec-Merou b896b20e46 don't add pins without pad location in constraints file 2020-12-02 13:24:15 +01:00
Florent Kermarrec 8eecbd7b57 integration/soc/add_sdcard: integrate interrupts. 2020-12-01 13:25:05 +01:00
enjoy-digital 2e7203d930
Merge pull request #716 from gsomlo/gls-irq-misc
miscellaneous (mostly cosmetic) soc irq init fixes
2020-12-01 08:29:05 +01:00
Gabriel Somlo 5cc3db0176 soc: cosmetic: reduce horizontal indentation in IRQ init. 2020-11-30 16:29:16 -05:00
Gabriel Somlo 9af56cf247 soc: fix typo in IRQ handler exception 2020-11-30 16:27:31 -05:00