litex.git
3 years agoremove debugging
Pepijn de Vos [Sat, 1 Aug 2020 09:06:08 +0000 (11:06 +0200)]
remove debugging

3 years agoadd openFPGAloader programmer
Pepijn de Vos [Sat, 1 Aug 2020 09:05:09 +0000 (11:05 +0200)]
add openFPGAloader programmer

3 years agointegration/soc: fix dma_bus typo.
Florent Kermarrec [Mon, 27 Jul 2020 09:06:09 +0000 (11:06 +0200)]
integration/soc: fix dma_bus typo.

3 years agotargets: keep in sync with litex-boards.
Florent Kermarrec [Fri, 24 Jul 2020 14:34:17 +0000 (16:34 +0200)]
targets: keep in sync with litex-boards.

3 years agoMerge pull request #604 from antmicro/jboc/axi-lite
enjoy-digital [Fri, 24 Jul 2020 12:54:11 +0000 (14:54 +0200)]
Merge pull request #604 from antmicro/jboc/axi-lite

Improve AXI Lite data width converters

3 years agosoc/interconnect/axi: add basic AXI Lite up-converter
Jędrzej Boczar [Fri, 24 Jul 2020 11:46:51 +0000 (13:46 +0200)]
soc/interconnect/axi: add basic AXI Lite up-converter

3 years agoMerge pull request #603 from enjoy-digital/socdoc-extensions
Sean Cross [Fri, 24 Jul 2020 08:42:23 +0000 (16:42 +0800)]
Merge pull request #603 from enjoy-digital/socdoc-extensions

Socdoc extensions

3 years agodoc: socdoc: document new `sphinx_extra_config` parameter
Sean Cross [Fri, 24 Jul 2020 08:03:24 +0000 (16:03 +0800)]
doc: socdoc: document new `sphinx_extra_config` parameter

This allows for appending additional configuration to `conf.py`.

Signed-off-by: Sean Cross <sean@xobs.io>
3 years agoMerge pull request #602 from enjoy-digital/socdoc-extensions
enjoy-digital [Fri, 24 Jul 2020 08:02:06 +0000 (10:02 +0200)]
Merge pull request #602 from enjoy-digital/socdoc-extensions

doc: socdoc: document `sphinx_extensions` parameter

3 years agolitex: add `sphinx_extra_config` to `generate_docs()`
Sean Cross [Fri, 24 Jul 2020 08:01:54 +0000 (16:01 +0800)]
litex: add `sphinx_extra_config` to `generate_docs()`

This allows us to append additional strings to the sphinx `conf.py`.

Signed-off-by: Sean Cross <sean@xobs.io>
3 years agodoc: socdoc: document `sphinx_extensions` parameter
Sean Cross [Fri, 24 Jul 2020 07:47:59 +0000 (15:47 +0800)]
doc: socdoc: document `sphinx_extensions` parameter

This adds documentation for `sphinx_extensions` which can be used to add
additional features to output.

Signed-off-by: Sean Cross <sean@xobs.io>
3 years agosoc/interconnect/axi: separate AXI Lite converter channels
Jędrzej Boczar [Thu, 23 Jul 2020 14:54:02 +0000 (16:54 +0200)]
soc/interconnect/axi: separate AXI Lite converter channels

3 years agoCHANGES: update.
Florent Kermarrec [Thu, 23 Jul 2020 16:02:58 +0000 (18:02 +0200)]
CHANGES: update.

3 years agocore/cpu: integrate Zynq as a classical CPU (Zynq7000), deprecate SoCZynq.
Florent Kermarrec [Thu, 23 Jul 2020 15:40:46 +0000 (17:40 +0200)]
core/cpu: integrate Zynq as a classical CPU (Zynq7000), deprecate SoCZynq.

This is the logical continuation of the recent change to avoid specific SoC classes.
A Zynq FPGA can be used with or without the PS7. When used without the PS7, a softcore CPU
can be used as with others FPGAs. When using the PS7, the softcore is replaced with the PS7
and connected to the SoC through one of the AXI GP interface.

An example is available on litex-boards.

3 years agoliblitesdcard/sdcard: use max divider of 256 (128 was not enough for the initial...
Florent Kermarrec [Wed, 22 Jul 2020 21:15:36 +0000 (23:15 +0200)]
liblitesdcard/sdcard: use max divider of 256 (128 was not enough for the initial 400Khz clock frequency).

3 years agoCHANGES: update.
Florent Kermarrec [Wed, 22 Jul 2020 21:10:26 +0000 (23:10 +0200)]
CHANGES: update.

3 years agoMerge pull request #600 from antmicro/jboc/axi-lite
enjoy-digital [Wed, 22 Jul 2020 21:03:07 +0000 (23:03 +0200)]
Merge pull request #600 from antmicro/jboc/axi-lite

Implement AXI Lite interconnect

3 years agosoc: add initial DMA bus support (optionally provided by CPU(s) for cache coherency).
Florent Kermarrec [Wed, 22 Jul 2020 16:43:28 +0000 (18:43 +0200)]
soc: add initial DMA bus support (optionally provided by CPU(s) for cache coherency).

When provided, the modules doing DMA shall connect the DMA to the dma_bus to allow the CPU(s) to manage cache coherency
and avoid the manual cache flushes.

This has been tested with VexRiscv SMP and LiteSDCard doing DMA while loading Linux binaries.

3 years agotest/axi: move all AXI Lite tests to separate file
Jędrzej Boczar [Wed, 22 Jul 2020 14:59:17 +0000 (16:59 +0200)]
test/axi: move all AXI Lite tests to separate file

3 years agosoc/integration: use AXILiteSRAM when using bus_standard="axi-lite"
Jędrzej Boczar [Wed, 22 Jul 2020 14:57:51 +0000 (16:57 +0200)]
soc/integration: use AXILiteSRAM when using bus_standard="axi-lite"

3 years agotest/axi: add crossbar stress tests
Jędrzej Boczar [Wed, 22 Jul 2020 14:31:51 +0000 (16:31 +0200)]
test/axi: add crossbar stress tests

3 years agosoc/integration: add bus standard parser arguments
Jędrzej Boczar [Wed, 22 Jul 2020 13:55:49 +0000 (15:55 +0200)]
soc/integration: add bus standard parser arguments

3 years agosoc/interconnect/axi: improve Timeout module and test it with shared interconnect
Jędrzej Boczar [Wed, 22 Jul 2020 13:02:42 +0000 (15:02 +0200)]
soc/interconnect/axi: improve Timeout module and test it with shared interconnect

3 years agotest/axi: add shared AXI Lite interconnect tests
Jędrzej Boczar [Wed, 22 Jul 2020 12:01:02 +0000 (14:01 +0200)]
test/axi: add shared AXI Lite interconnect tests

3 years agosoc/interconnect/axi: implement AXI Lite decoder
Jędrzej Boczar [Tue, 21 Jul 2020 12:25:24 +0000 (14:25 +0200)]
soc/interconnect/axi: implement AXI Lite decoder

3 years agosoc/interconnect/axi: lock AXILiteArbiter until all requests have been responded to
Jędrzej Boczar [Mon, 20 Jul 2020 16:08:56 +0000 (18:08 +0200)]
soc/interconnect/axi: lock AXILiteArbiter until all requests have been responded to

3 years agotest/test_axi: add AXI Lite interconnect arbiter tests
Jędrzej Boczar [Mon, 20 Jul 2020 14:00:21 +0000 (16:00 +0200)]
test/test_axi: add AXI Lite interconnect arbiter tests

3 years agosocinterconnect/axi: interconnect shared sketch
Jędrzej Boczar [Fri, 17 Jul 2020 14:54:57 +0000 (16:54 +0200)]
socinterconnect/axi: interconnect shared sketch

3 years agosoc/interconnect/axi: point-to-point interconnect and timeout module with tests
Jędrzej Boczar [Fri, 17 Jul 2020 14:48:46 +0000 (16:48 +0200)]
soc/interconnect/axi: point-to-point interconnect and timeout module with tests

3 years agosoc/integration: choose interconnect based on bus standard
Jędrzej Boczar [Fri, 17 Jul 2020 10:47:29 +0000 (12:47 +0200)]
soc/integration: choose interconnect based on bus standard

3 years agosoc/integration: add axi-lite standard to SoCBusHandler
Jędrzej Boczar [Fri, 17 Jul 2020 07:59:30 +0000 (09:59 +0200)]
soc/integration: add axi-lite standard to SoCBusHandler

3 years agoMerge pull request #599 from antmicro/gen-mmcm-pr
enjoy-digital [Wed, 22 Jul 2020 12:52:26 +0000 (14:52 +0200)]
Merge pull request #599 from antmicro/gen-mmcm-pr

litex-gen: add mmcm core

3 years agolitex-gen: add mmcm core
Piotr Binkowski [Thu, 2 Jul 2020 12:07:12 +0000 (14:07 +0200)]
litex-gen: add mmcm core

3 years agoboards: keep in sync with litex-boards.
Florent Kermarrec [Wed, 22 Jul 2020 06:50:38 +0000 (08:50 +0200)]
boards: keep in sync with litex-boards.

3 years agosoc/integration/add_sdcard: add direct connection to VexRiscv's dmabus for testing.
Florent Kermarrec [Tue, 21 Jul 2020 17:54:42 +0000 (19:54 +0200)]
soc/integration/add_sdcard: add direct connection to VexRiscv's dmabus for testing.

3 years agocpu/vexriscv/system.h: update flush_cpu_dcache.
Florent Kermarrec [Tue, 21 Jul 2020 17:43:00 +0000 (19:43 +0200)]
cpu/vexriscv/system.h: update flush_cpu_dcache.

3 years agointerconnect/wishbone: add minimal UpConverter.
Florent Kermarrec [Tue, 21 Jul 2020 17:35:14 +0000 (19:35 +0200)]
interconnect/wishbone: add minimal UpConverter.

3 years agoMerge pull request #597 from antmicro/jboc/litex-buildenv-add-adapter-fix
enjoy-digital [Mon, 20 Jul 2020 21:11:01 +0000 (23:11 +0200)]
Merge pull request #597 from antmicro/jboc/litex-buildenv-add-adapter-fix

Fix Vivado crash when using 1:1 wishbone.Converter

3 years agoMerge pull request #595 from betrusted-io/master
enjoy-digital [Mon, 20 Jul 2020 20:47:16 +0000 (22:47 +0200)]
Merge pull request #595 from betrusted-io/master

wire up missing register bits.

3 years agoMerge pull request #598 from sergachev/master
enjoy-digital [Mon, 20 Jul 2020 17:24:21 +0000 (19:24 +0200)]
Merge pull request #598 from sergachev/master

interconnect/csr_bus: fix paged access warning

3 years agointerconnect/csr_bus: fix paged access warning
Ilia Sergachev [Mon, 20 Jul 2020 16:23:09 +0000 (18:23 +0200)]
interconnect/csr_bus: fix paged access warning

3 years agofix/Vivado: don't instantiate wishbone.Converter in add_adapter when not needed
Jędrzej Boczar [Mon, 20 Jul 2020 13:17:56 +0000 (15:17 +0200)]
fix/Vivado: don't instantiate wishbone.Converter in add_adapter when not needed

Fixes an issue with Vivado which crashes with SIGSEGV when building litex-buildenv at:
https://github.com/antmicro/litex-buildenv/commit/cc003bef3ac1407f9788ec8b7cc52d5981f8364a
and litex bumped to 4a18b828bc81522a654f51a73f20faece4dc313c,
with options:
    CPU=mor1kx; CPU_VARIANT=linux; PLATFORM=arty; FIRMWARE=linux; TARGET=net
The only difference in Verilog is that we avoid creating new Interface and doing
`new_interface.connect(interface)`, so this shouldn't make any difference, but
this somehow generates the error in Vivado (tested on v2018.3 and v2019.2).

3 years agosoftware/liblitesdcard/spisdcard: remove optimization on receive_block (not working...
Florent Kermarrec [Mon, 20 Jul 2020 10:28:29 +0000 (12:28 +0200)]
software/liblitesdcard/spisdcard: remove optimization on receive_block (not working on all configs) and increase max clk_freq to 20MHz.

3 years agosoc/cores/spi/SPIMaster: rewrite/simplify.
Florent Kermarrec [Mon, 20 Jul 2020 08:36:35 +0000 (10:36 +0200)]
soc/cores/spi/SPIMaster: rewrite/simplify.
- Make sure MOSI is latched on start, MISO is stable during Xfer (last value).
- Allow clk_divider down to 2.
- improve test errors reporting with hex() on AssertEqual.

3 years agowire up missing register bits.
bunnie [Sat, 18 Jul 2020 19:00:25 +0000 (03:00 +0800)]
wire up missing register bits.

Not sure how they went missing...but just noticed them.

3 years agoliblitesdcard/spisdcard: update comments.
Florent Kermarrec [Fri, 17 Jul 2020 13:39:39 +0000 (15:39 +0200)]
liblitesdcard/spisdcard: update comments.

3 years agosoc/cores/spi: make sure done and miso are synchronous.
Florent Kermarrec [Fri, 17 Jul 2020 13:38:52 +0000 (15:38 +0200)]
soc/cores/spi: make sure done and miso are synchronous.

3 years agospisdcard: revert to 8-bit SPI, optimize spisdcardreceive_block and reduce clk to...
Florent Kermarrec [Fri, 17 Jul 2020 09:58:26 +0000 (11:58 +0200)]
spisdcard: revert to 8-bit SPI, optimize spisdcardreceive_block and reduce clk to 12.5MHz for now.

3 years agosoc/cores/spi: make sure miso is stable during xfer.
Florent Kermarrec [Fri, 17 Jul 2020 09:56:27 +0000 (11:56 +0200)]
soc/cores/spi: make sure miso is stable during xfer.

3 years agobios/boot: add bootargs support on netboot/sdcardboot to optionally specify r1/r2...
Florent Kermarrec [Thu, 16 Jul 2020 16:09:18 +0000 (18:09 +0200)]
bios/boot: add bootargs support on netboot/sdcardboot to optionally specify r1/r2/r3/addr.

For example:
{
"Image":  "0x40000000",
"bootargs": {
"r1":  "0x12345678",
}
}

will copy Image to 0x40000000 and set r1 to 0x12345678.

By default, r1,r2,r3 are set to 0 and addr is the address if the last loaded image, so:

{
"Image":         "0x40000000",
"rootfs.cpio":   "0x40800000",
"rv32.dtb":      "0x41000000",
"emulator.bin":  "0x41100000",
}

is equivalent to:

{
"Image":         "0x40000000",
"rootfs.cpio":   "0x40800000",
"rv32.dtb":      "0x41000000",
"emulator.bin":  "0x41100000",
"bootargs": {
"r1":   "0x00000000",
"r2":   "0x00000000",
"r3":   "0x00000000",
"addr": "0x00000000",
}
}

3 years agoMerge pull request #594 from antmicro/jboc/axi-lite
enjoy-digital [Thu, 16 Jul 2020 15:56:33 +0000 (17:56 +0200)]
Merge pull request #594 from antmicro/jboc/axi-lite

Add AXILiteDownConverter

3 years agosoc/interconnect/axi: propagate response errors in AXILiteDownConverter
Jędrzej Boczar [Thu, 16 Jul 2020 15:15:58 +0000 (17:15 +0200)]
soc/interconnect/axi: propagate response errors in AXILiteDownConverter

3 years agosoc/interconnect/axi: implement AXILite down-converter
Jędrzej Boczar [Thu, 16 Jul 2020 08:21:43 +0000 (10:21 +0200)]
soc/interconnect/axi: implement AXILite down-converter

3 years agoMerge pull request #593 from antmicro/jboc/axi-lite
enjoy-digital [Thu, 16 Jul 2020 09:56:57 +0000 (11:56 +0200)]
Merge pull request #593 from antmicro/jboc/axi-lite

Add AXILite components: AXILiteSRAM and AXILite2CSR

3 years agosoc/integration: revert `bus` argument for add_ram/add_rom
Jędrzej Boczar [Thu, 16 Jul 2020 08:26:12 +0000 (10:26 +0200)]
soc/integration: revert `bus` argument for add_ram/add_rom

3 years agosoc/integration: use AXILiteConverter (dummy implementation) in add_adapter()
Jędrzej Boczar [Wed, 15 Jul 2020 13:59:16 +0000 (15:59 +0200)]
soc/integration: use AXILiteConverter (dummy implementation) in add_adapter()

3 years agosoc/interconnect/axi: add connect methods for convenience
Jędrzej Boczar [Wed, 15 Jul 2020 13:47:06 +0000 (15:47 +0200)]
soc/interconnect/axi: add connect methods for convenience

3 years agotest/axi: add AXILite2CSR and AXILiteSRAM tests
Jędrzej Boczar [Wed, 15 Jul 2020 10:30:28 +0000 (12:30 +0200)]
test/axi: add AXILite2CSR and AXILiteSRAM tests

3 years agoMerge pull request #592 from antmicro/fix-symbiflow-makefile
enjoy-digital [Wed, 15 Jul 2020 10:08:21 +0000 (12:08 +0200)]
Merge pull request #592 from antmicro/fix-symbiflow-makefile

symbiflow: changed toolchain command names in Makefile

3 years agosoc/interconnect/axi: improve SRAM/CSR access speed
Jędrzej Boczar [Wed, 15 Jul 2020 09:28:21 +0000 (11:28 +0200)]
soc/interconnect/axi: improve SRAM/CSR access speed

3 years agosymbiflow: changed toolchain command names in Makefile
Alessandro Comodi [Wed, 15 Jul 2020 09:31:06 +0000 (11:31 +0200)]
symbiflow: changed toolchain command names in Makefile

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
3 years agosoc/interconnect: add AXILite SRAM
Jędrzej Boczar [Wed, 15 Jul 2020 08:58:34 +0000 (10:58 +0200)]
soc/interconnect: add AXILite SRAM

3 years agosoc/interconnect: add AXILite2CSR bridge
Jędrzej Boczar [Tue, 14 Jul 2020 14:28:29 +0000 (16:28 +0200)]
soc/interconnect: add AXILite2CSR bridge

3 years agosoc/integration: update add_adapter to convert between AXILite/Wishbone
Jędrzej Boczar [Tue, 14 Jul 2020 12:44:28 +0000 (14:44 +0200)]
soc/integration: update add_adapter to convert between AXILite/Wishbone

3 years agobuild/lattice/trellis: set default spimode to None (--spimode not passed to ecppack...
Florent Kermarrec [Mon, 13 Jul 2020 09:55:03 +0000 (11:55 +0200)]
build/lattice/trellis: set default spimode to None (--spimode not passed to ecppack) as default instead of fast-read.

Using fast-read as default prevent loading the .bit via JTAG (see #589).

3 years agobuild/lattice/trellis: fix spimode typo.
Florent Kermarrec [Sat, 11 Jul 2020 19:30:19 +0000 (21:30 +0200)]
build/lattice/trellis: fix spimode typo.

3 years agoMerge pull request #588 from oskirby/trellis-spimode
enjoy-digital [Sat, 11 Jul 2020 19:26:55 +0000 (21:26 +0200)]
Merge pull request #588 from oskirby/trellis-spimode

trellis: Add option to select SPI mode.

3 years agotrellis: Add option to select SPI mode.
Owen Kirby [Sat, 11 Jul 2020 18:48:10 +0000 (11:48 -0700)]
trellis: Add option to select SPI mode.

This allows a significant speedup when booting large bitstreams on ECP5
boards that support dual or quad SPI operation.

3 years agoMerge pull request #587 from antmicro/mor1x_ror_instruction
enjoy-digital [Fri, 10 Jul 2020 09:21:13 +0000 (11:21 +0200)]
Merge pull request #587 from antmicro/mor1x_ror_instruction

mor1kx: Do not generate the ror instruction

3 years agointegration/soc/sdcard: add mode parameter to enable read only, write only or read...
Florent Kermarrec [Fri, 10 Jul 2020 09:18:22 +0000 (11:18 +0200)]
integration/soc/sdcard: add mode parameter to enable read only, write only or read+write modes.

3 years agomor1kx: Do not generate the ror instruction
Mateusz Holenko [Fri, 10 Jul 2020 09:03:35 +0000 (11:03 +0200)]
mor1kx: Do not generate the ror instruction

The mor1kx core does not support `l.ror` instruction
by default, but gcc/clang flags allowed the
compiler to generate it.

3 years agocore/cpu/CPUNone: set endianness to little.
Florent Kermarrec [Fri, 10 Jul 2020 08:42:00 +0000 (10:42 +0200)]
core/cpu/CPUNone: set endianness to little.

3 years agoMerge pull request #585 from FFY00/more-gcc
Tim Ansell [Thu, 9 Jul 2020 16:34:22 +0000 (09:34 -0700)]
Merge pull request #585 from FFY00/more-gcc

cpu: add a few missing GCC toolchains

3 years agocpu: add a few missing GCC toolchains
Filipe Laíns [Thu, 9 Jul 2020 14:58:33 +0000 (15:58 +0100)]
cpu: add a few missing GCC toolchains

This names are used by Arch Linux for eg.

Signed-off-by: Filipe Laíns <lains@archlinux.org>
3 years agoliblitesdcard/sdcard: clamp divider value.
Florent Kermarrec [Thu, 9 Jul 2020 11:09:36 +0000 (13:09 +0200)]
liblitesdcard/sdcard: clamp divider value.

3 years agoMerge pull request #584 from ozbenh/memtest
enjoy-digital [Thu, 9 Jul 2020 10:54:42 +0000 (12:54 +0200)]
Merge pull request #584 from ozbenh/memtest

Memtest/memspeed improvements

3 years agocores/dma: add stream.last support on WishboneDMAReader.
Florent Kermarrec [Thu, 9 Jul 2020 10:18:09 +0000 (12:18 +0200)]
cores/dma: add stream.last support on WishboneDMAReader.

3 years agomemspeed: Write a fixed value
Benjamin Herrenschmidt [Wed, 8 Jul 2020 07:13:37 +0000 (17:13 +1000)]
memspeed: Write a fixed value

Otherwise we have at least an extra addition in the loop
which squews the result compared to the read loop.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3 years agobuid/io/InferedSDRIO/InferedSDRTristate: avoid unnecessary clk_domain/limitation.
Florent Kermarrec [Wed, 8 Jul 2020 06:33:52 +0000 (08:33 +0200)]
buid/io/InferedSDRIO/InferedSDRTristate: avoid unnecessary clk_domain/limitation.

Just create a local clk_domain from clk signal.

3 years agointerconnect/avalon: minor cleanup, remove max on SyncFIFO depth.
Florent Kermarrec [Wed, 8 Jul 2020 05:53:42 +0000 (07:53 +0200)]
interconnect/avalon: minor cleanup, remove max on SyncFIFO depth.

3 years agomemtest: Fix memspeed access size
Benjamin Herrenschmidt [Wed, 8 Jul 2020 03:21:45 +0000 (13:21 +1000)]
memtest: Fix memspeed access size

The move to libbase reverted the type of the pointer
from long to int.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3 years agomemtest: Fix integer size/type printf errors
Benjamin Herrenschmidt [Wed, 8 Jul 2020 03:17:48 +0000 (13:17 +1000)]
memtest: Fix integer size/type printf errors

In a couple of places, memtest uses %x to print a pointer which
is illegal (and could be problematic on 64-bit). Use %p instead.

Additionally, use %ld when printing longs

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3 years agosoftware/litesdcard: use new clocking and use slow clock during initialization.
Florent Kermarrec [Tue, 7 Jul 2020 17:59:34 +0000 (19:59 +0200)]
software/litesdcard: use new clocking and use slow clock during initialization.

3 years agointegration/soc/sdcard: cleanup emulator integration, fix sim.
Florent Kermarrec [Tue, 7 Jul 2020 13:05:07 +0000 (15:05 +0200)]
integration/soc/sdcard: cleanup emulator integration, fix sim.

3 years agointegration/soc: move pads.rst control to PHY.
Florent Kermarrec [Tue, 7 Jul 2020 12:58:06 +0000 (14:58 +0200)]
integration/soc: move pads.rst control to PHY.

3 years agobuild/io/InferedSDRTristate: pass clock domain to SDROutput/SDRInput.
Florent Kermarrec [Tue, 7 Jul 2020 10:11:47 +0000 (12:11 +0200)]
build/io/InferedSDRTristate: pass clock domain to SDROutput/SDRInput.

3 years agosoftware/liblitesdcard: improve sdcard_init and handle errors.
Florent Kermarrec [Tue, 7 Jul 2020 09:03:26 +0000 (11:03 +0200)]
software/liblitesdcard: improve sdcard_init and handle errors.

3 years agolitesdcard: use new Block2Mem/Mem2Block DMAs.
Florent Kermarrec [Tue, 7 Jul 2020 07:24:08 +0000 (09:24 +0200)]
litesdcard: use new Block2Mem/Mem2Block DMAs.

3 years agolitex/gen: remove io that has been replaced with litex/build/io (and should have...
Florent Kermarrec [Tue, 7 Jul 2020 06:14:42 +0000 (08:14 +0200)]
litex/gen: remove io that has been replaced with litex/build/io (and should have been removed).

3 years agoMerge pull request #583 from gsomlo/gls-sdcard-timeout
enjoy-digital [Tue, 7 Jul 2020 06:06:55 +0000 (08:06 +0200)]
Merge pull request #583 from gsomlo/gls-sdcard-timeout

liblitesdcard/sdcard: adjust card-ready timeout

3 years agoliblitesdcard/sdcard: adjust card-ready timeout
Gabriel Somlo [Mon, 6 Jul 2020 21:00:24 +0000 (17:00 -0400)]
liblitesdcard/sdcard: adjust card-ready timeout

Testing on nexys4ddr and rocket, approximately 12 iterations of the
timeout loop (using `busy_wait(1)`) are needed to receive a "ready"
response from the SDcard, assuming a "warm" reset where the card has
already been previously initialized.

If the SDcard is ejected and re-inserted, or if the board is "cold-reset"
(e.g., reprogrammed via openocd vs. a simple push of the reset button),
it takes approximately 450 iterations before the SDCard responds with a
"ready" message.

In either case, a timeout of 10 is insufficient. This patch increases
the busy-wait to 10, and the timeout loop counter to 128, which should
cover most cases.

Additionally, make a few minor cosmetic improvements.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
3 years agoliblitesdcard/sdcard: add timeout when waiting card to be ready.
Florent Kermarrec [Mon, 6 Jul 2020 18:07:06 +0000 (20:07 +0200)]
liblitesdcard/sdcard: add timeout when waiting card to be ready.

3 years agoliblitesdcard/sdcard: use new SDClocker enable CSR.
Florent Kermarrec [Mon, 6 Jul 2020 16:59:28 +0000 (18:59 +0200)]
liblitesdcard/sdcard: use new SDClocker enable CSR.

3 years agointerconnect/csr_bus: move/rewrite paged access warning.
Florent Kermarrec [Mon, 6 Jul 2020 10:26:24 +0000 (12:26 +0200)]
interconnect/csr_bus: move/rewrite paged access warning.

Was incorrectly triggered with csr_data_width=32.

3 years agointerconnect/csr_bus: remove 64-bit CSR bus alignment support (no longer supported...
Florent Kermarrec [Mon, 6 Jul 2020 07:51:32 +0000 (09:51 +0200)]
interconnect/csr_bus: remove 64-bit CSR bus alignment support (no longer supported in SoCs).

3 years agoMerge pull request #582 from gsomlo/gls-minor-fixup
enjoy-digital [Sun, 5 Jul 2020 08:06:01 +0000 (10:06 +0200)]
Merge pull request #582 from gsomlo/gls-minor-fixup

Minor sdcard fixes

3 years agoliblitesdcard/sdcard: return error code outside '#ifdef SDCARD_DEBUG'
Gabriel Somlo [Sat, 4 Jul 2020 19:24:05 +0000 (15:24 -0400)]
liblitesdcard/sdcard: return error code outside '#ifdef SDCARD_DEBUG'

3 years agoliblitesdcard/sdcard: cosmetic: fix indentation, eliminate redundant counter
Gabriel Somlo [Sat, 4 Jul 2020 19:22:28 +0000 (15:22 -0400)]
liblitesdcard/sdcard: cosmetic: fix indentation, eliminate redundant counter

3 years agotargets: remove sdcard clock domain (now generated in the PHY).
Florent Kermarrec [Fri, 3 Jul 2020 18:11:05 +0000 (20:11 +0200)]
targets: remove sdcard clock domain (now generated in the PHY).

3 years agolitesdcard: use new clocker.
Florent Kermarrec [Fri, 3 Jul 2020 18:06:42 +0000 (20:06 +0200)]
litesdcard: use new clocker.