litex.git
4 years agosoftware/bios/boot: move f_mount to copy_image_from_sdcard_to_ram and force mount.
Florent Kermarrec [Wed, 10 Jun 2020 09:46:18 +0000 (11:46 +0200)]
software/bios/boot: move f_mount to copy_image_from_sdcard_to_ram and force mount.

4 years agosoftware/libliteeth/tftp: switch to progress bar.
Florent Kermarrec [Wed, 10 Jun 2020 08:00:05 +0000 (10:00 +0200)]
software/libliteeth/tftp: switch to progress bar.

4 years agobios/boot/copy_image_from_flash_to_ram: add missing init_progression_bar.
Florent Kermarrec [Wed, 10 Jun 2020 07:59:38 +0000 (09:59 +0200)]
bios/boot/copy_image_from_flash_to_ram: add missing init_progression_bar.

4 years agosoc/spisdcard: use 32-bit SPIMaster and do 32-bit xfers in spisdcardreceive_block...
Florent Kermarrec [Wed, 10 Jun 2020 07:50:30 +0000 (09:50 +0200)]
soc/spisdcard: use 32-bit SPIMaster and do 32-bit xfers in spisdcardreceive_block to optimize speed.

4 years agosoftware/libbase/progress: avoid \t in progress bar, reduce HASHES_PER_LINE.
Florent Kermarrec [Wed, 10 Jun 2020 07:15:59 +0000 (09:15 +0200)]
software/libbase/progress: avoid \t in progress bar, reduce HASHES_PER_LINE.

4 years agosoftware/libsdcard/spisdcard: add and use busy_wait_us to optimize speed.
Florent Kermarrec [Wed, 10 Jun 2020 07:15:12 +0000 (09:15 +0200)]
software/libsdcard/spisdcard: add and use busy_wait_us to optimize speed.

4 years agobios/boot/copy_image_from_sdcard_to_ram: use chunks of 32KB to increase speed.
Florent Kermarrec [Wed, 10 Jun 2020 06:21:54 +0000 (08:21 +0200)]
bios/boot/copy_image_from_sdcard_to_ram: use chunks of 32KB to increase speed.

4 years agobios/boot: add progress bar to copy_image_from_flash_to_ram, use uint32_t in flash...
Florent Kermarrec [Wed, 10 Jun 2020 06:12:12 +0000 (08:12 +0200)]
bios/boot: add progress bar to copy_image_from_flash_to_ram, use uint32_t in flash/sdcard functions.

4 years agolibase/progress: move __div64_32, do_div to div64.h/c as it was in Barebox.
Florent Kermarrec [Wed, 10 Jun 2020 05:47:21 +0000 (07:47 +0200)]
libase/progress: move __div64_32, do_div to div64.h/c as it was in Barebox.

4 years agosoftware/liblitesdcard: remove read_block prototype, minor cleanup.
Florent Kermarrec [Wed, 10 Jun 2020 05:40:08 +0000 (07:40 +0200)]
software/liblitesdcard: remove read_block prototype, minor cleanup.

4 years agobios/boot: use progress bar in copy_image_from_sdcard_to_ram.
Florent Kermarrec [Tue, 9 Jun 2020 18:00:32 +0000 (20:00 +0200)]
bios/boot: use progress bar in copy_image_from_sdcard_to_ram.

4 years agolibbase: add progress bar (from Barebox).
Florent Kermarrec [Tue, 9 Jun 2020 18:00:05 +0000 (20:00 +0200)]
libbase: add progress bar (from Barebox).

4 years agosoftware/liblitesdcard: add retries when setting card to Idle.
Florent Kermarrec [Tue, 9 Jun 2020 17:59:38 +0000 (19:59 +0200)]
software/liblitesdcard: add retries when setting card to Idle.

4 years agosoftware/liblitesdcard/sdcard: add FatFs disk functions.
Florent Kermarrec [Tue, 9 Jun 2020 15:58:43 +0000 (17:58 +0200)]
software/liblitesdcard/sdcard: add FatFs disk functions.

4 years agosoftware/liblitesdcard/spisdcard: rename #defines and allow external definition.
Florent Kermarrec [Tue, 9 Jun 2020 11:50:16 +0000 (13:50 +0200)]
software/liblitesdcard/spisdcard: rename #defines and allow external definition.

4 years agosoftware/liblitesdcard: create fat directory for FatFs files.
Florent Kermarrec [Tue, 9 Jun 2020 11:44:26 +0000 (13:44 +0200)]
software/liblitesdcard: create fat directory for FatFs files.

4 years agosofware/liblitesdcard: enable Long Filename (LFN).
Florent Kermarrec [Tue, 9 Jun 2020 11:35:14 +0000 (13:35 +0200)]
sofware/liblitesdcard: enable Long Filename (LFN).

4 years agosoftware/libsdcard: rewrite/simplify SPISDCard/FatFs support and only keep SDCard...
Florent Kermarrec [Tue, 9 Jun 2020 10:50:56 +0000 (12:50 +0200)]
software/libsdcard: rewrite/simplify SPISDCard/FatFs support and only keep SDCard ver2.00+ compatibility.

4 years agoMerge pull request #559 from gsomlo/gls-fix-crlf
enjoy-digital [Sat, 6 Jun 2020 20:06:46 +0000 (22:06 +0200)]
Merge pull request #559 from gsomlo/gls-fix-crlf

liblitesdcard: convert all sources to unix style newlines (cosmetic)

4 years agoliblitesdcard: convert all sources to unix style newlines (cosmetic)
Gabriel Somlo [Sat, 6 Jun 2020 17:24:29 +0000 (13:24 -0400)]
liblitesdcard: convert all sources to unix style newlines (cosmetic)

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agosoftware/liblitesdcard: remove unsused functions with FF_FS_READONLY.
Florent Kermarrec [Fri, 5 Jun 2020 21:25:54 +0000 (23:25 +0200)]
software/liblitesdcard: remove unsused functions with FF_FS_READONLY.

4 years agosoftware/liblitesdcard: switch to FatFs for sdcardboot.
Florent Kermarrec [Fri, 5 Jun 2020 18:09:02 +0000 (20:09 +0200)]
software/liblitesdcard: switch to FatFs for sdcardboot.

4 years agosoftware/liblitesdcard: base it on FatFs generic example code + LiteX's SPIMaster...
Florent Kermarrec [Fri, 5 Jun 2020 14:27:38 +0000 (16:27 +0200)]
software/liblitesdcard: base it on FatFs generic example code + LiteX's SPIMaster specific functions.

4 years agosoftware/liblitesdcard: add FatFs files.
Florent Kermarrec [Fri, 5 Jun 2020 13:30:14 +0000 (15:30 +0200)]
software/liblitesdcard: add FatFs files.

To avoid maintaining our own code and support all Fat filesystems, let's just use FatFs library.

4 years agosoftware/liblitesdcard/spisdcard: simplify/rewrite for consistency with the others...
Florent Kermarrec [Fri, 5 Jun 2020 07:07:19 +0000 (09:07 +0200)]
software/liblitesdcard/spisdcard: simplify/rewrite for consistency with the others parts of the project.
- Improve code readability, remove un-needed or duplicate comments.
- Only use a spi_xfer function for both write/read.
- Set the SDCard to low clk freq before init and increase it when initialized.

4 years agosoftware/liblitesdcard: add copyrights to spisdcard/fat16.
Florent Kermarrec [Thu, 4 Jun 2020 10:13:26 +0000 (12:13 +0200)]
software/liblitesdcard: add copyrights to spisdcard/fat16.

4 years agosoftware/liblitesdcard/sdcard: simplify readSector.
Florent Kermarrec [Thu, 4 Jun 2020 09:55:25 +0000 (11:55 +0200)]
software/liblitesdcard/sdcard: simplify readSector.

4 years agosoftware/liblitesdcard: fat16 boot working with both SPI and SD modes.
Florent Kermarrec [Thu, 4 Jun 2020 09:40:42 +0000 (11:40 +0200)]
software/liblitesdcard: fat16 boot working with both SPI and SD modes.

4 years agosoftware/liblitesdcard: move fat16 code to separate file to avoid duplication.
Florent Kermarrec [Wed, 3 Jun 2020 21:16:13 +0000 (23:16 +0200)]
software/liblitesdcard: move fat16 code to separate file to avoid duplication.

4 years agosoftware/bios/libsdcard: add initial boot from sdcard with litescard, rename spisdcar...
Florent Kermarrec [Wed, 3 Jun 2020 18:03:18 +0000 (20:03 +0200)]
software/bios/libsdcard: add initial boot from sdcard with litescard, rename spisdcardboot command to sdcardboot.

4 years agosoc/add_sdcard: use SDClockerS7 for 7-Series and SDClockerGen for others devices.
Florent Kermarrec [Wed, 3 Jun 2020 16:36:06 +0000 (18:36 +0200)]
soc/add_sdcard: use SDClockerS7 for 7-Series and SDClockerGen for others devices.

4 years agoMerge pull request #558 from antmicro/fix-function-names-liblitespi
enjoy-digital [Wed, 3 Jun 2020 14:34:55 +0000 (16:34 +0200)]
Merge pull request #558 from antmicro/fix-function-names-liblitespi

litex/soc/software/liblitespi: fix names associated with PHY CSRs

4 years agolitex/soc/software/liblitespi: fix names associated with PHY CSRs
Jan Kowalewski [Wed, 3 Jun 2020 13:33:47 +0000 (15:33 +0200)]
litex/soc/software/liblitespi: fix names associated with PHY CSRs

4 years agoboards/ulx3s: add sdcard pins and initial LiteSDCard integration.
Florent Kermarrec [Wed, 3 Jun 2020 12:36:33 +0000 (14:36 +0200)]
boards/ulx3s: add sdcard pins and initial LiteSDCard integration.

4 years agosoc/add_sdcard: add minimal SDClockerECP5 on ECP5.
Florent Kermarrec [Wed, 3 Jun 2020 12:34:59 +0000 (14:34 +0200)]
soc/add_sdcard: add minimal SDClockerECP5 on ECP5.

4 years agosoc/add_sdcard: remove limitation to 7-Series but only add clocker for it.
Florent Kermarrec [Wed, 3 Jun 2020 11:47:39 +0000 (13:47 +0200)]
soc/add_sdcard: remove limitation to 7-Series but only add clocker for it.

4 years agosoc/add_sdcard: emulator clocking moved to litesdcard.
Florent Kermarrec [Wed, 3 Jun 2020 11:43:44 +0000 (13:43 +0200)]
soc/add_sdcard: emulator clocking moved to litesdcard.

4 years agosoftware/libsdcard: keep SDCARD_DEBUG enabled for now, fix typos.
Florent Kermarrec [Wed, 3 Jun 2020 11:38:34 +0000 (13:38 +0200)]
software/libsdcard: keep SDCARD_DEBUG enabled for now, fix typos.

4 years agosoc/add_sdcard: remove Timer (unused).
Florent Kermarrec [Wed, 3 Jun 2020 11:13:07 +0000 (13:13 +0200)]
soc/add_sdcard: remove Timer (unused).

4 years agosoftware/liblitesdcard: review/simplify (code is over-complicated, revert part of...
Florent Kermarrec [Wed, 3 Jun 2020 10:56:03 +0000 (12:56 +0200)]
software/liblitesdcard: review/simplify (code is over-complicated, revert part of the old code and write a minimal test for now).

4 years agosoftware/liblitesdcard: remove sdtimer functions (unused).
Florent Kermarrec [Wed, 3 Jun 2020 09:11:45 +0000 (11:11 +0200)]
software/liblitesdcard: remove sdtimer functions (unused).

sdtimer was used to evaluate performance but is no longer used.

4 years agoMerge pull request #556 from antmicro/mglb/symbiflow-fixes
enjoy-digital [Tue, 2 Jun 2020 14:33:40 +0000 (16:33 +0200)]
Merge pull request #556 from antmicro/mglb/symbiflow-fixes

Symbiflow toolchain support: fix part name and clock frequency

4 years agotargets/arty: use sys_clk_freq = 60MHz for Symbiflow toolchain
Mariusz Glebocki [Tue, 2 Jun 2020 12:56:20 +0000 (14:56 +0200)]
targets/arty: use sys_clk_freq = 60MHz for Symbiflow toolchain

4 years agobuild/xilinx/symbiflow: remap part name
Mariusz Glebocki [Tue, 2 Jun 2020 12:53:15 +0000 (14:53 +0200)]
build/xilinx/symbiflow: remap part name

4 years agosoftware/liblitedram: revert sdrsw() in sdrlevel: this is still required for sdrlevel...
Florent Kermarrec [Tue, 2 Jun 2020 14:14:53 +0000 (16:14 +0200)]
software/liblitedram: revert sdrsw() in sdrlevel: this is still required for sdrlevel command.

4 years agoMerge pull request #553 from ozbenh/sim-autoinit
enjoy-digital [Tue, 2 Jun 2020 13:49:00 +0000 (15:49 +0200)]
Merge pull request #553 from ozbenh/sim-autoinit

sdram: Unconditionally switch to SW control before inits

4 years agoMerge pull request #557 from antmicro/mor1kx_linux_booting
enjoy-digital [Tue, 2 Jun 2020 13:45:52 +0000 (15:45 +0200)]
Merge pull request #557 from antmicro/mor1kx_linux_booting

bios: boot: Boot linux on mor1kx with external device tree and rootfs

4 years agoCHANGES: update and change added features order.
Florent Kermarrec [Tue, 2 Jun 2020 13:05:46 +0000 (15:05 +0200)]
CHANGES: update and change added features order.

4 years agobios: boot: Boot linux on mor1kx with external device tree and rootfs
Mateusz Holenko [Fri, 29 May 2020 10:20:36 +0000 (12:20 +0200)]
bios: boot: Boot linux on mor1kx with external device tree and rootfs

4 years agotest: update.
Florent Kermarrec [Tue, 2 Jun 2020 11:51:44 +0000 (13:51 +0200)]
test: update.

4 years agotargets: rename gateware-toolchain parameter to toolchain.
Florent Kermarrec [Tue, 2 Jun 2020 11:44:23 +0000 (13:44 +0200)]
targets: rename gateware-toolchain parameter to toolchain.

4 years agotargets/arty: integrate symbiflow changes to avoid duplication.
Florent Kermarrec [Tue, 2 Jun 2020 11:34:44 +0000 (13:34 +0200)]
targets/arty: integrate symbiflow changes to avoid duplication.

4 years agobuild/generic_platform: add default_clk constraints only when used.
Florent Kermarrec [Tue, 2 Jun 2020 11:34:09 +0000 (13:34 +0200)]
build/generic_platform: add default_clk constraints only when used.

4 years agobuild/xilinx/symbiflow: reuse .xdc generation from Vivado to avoid duplication, fix...
Florent Kermarrec [Tue, 2 Jun 2020 10:36:02 +0000 (12:36 +0200)]
build/xilinx/symbiflow: reuse .xdc generation from Vivado to avoid duplication, fix copyright.

4 years agoboards/arty: remove specific arty_symbiflow platform and adapt target to use standard...
Florent Kermarrec [Tue, 2 Jun 2020 10:18:12 +0000 (12:18 +0200)]
boards/arty: remove specific arty_symbiflow platform and adapt target to use standard platform.

4 years agoxilinx/simbiflow: add simple symbiflow_device re-mapping.
Florent Kermarrec [Tue, 2 Jun 2020 10:15:38 +0000 (12:15 +0200)]
xilinx/simbiflow: add simple symbiflow_device re-mapping.

4 years agoMerge pull request #551 from antmicro/mglb/symbiflow-toolchain-xilinx-7-support
enjoy-digital [Tue, 2 Jun 2020 09:55:33 +0000 (11:55 +0200)]
Merge pull request #551 from antmicro/mglb/symbiflow-toolchain-xilinx-7-support

Add Symbiflow toolchain support for Xilinx 7-series

4 years agoMerge pull request #552 from ozbenh/memspeed-long
Tim Ansell [Mon, 1 Jun 2020 22:23:03 +0000 (15:23 -0700)]
Merge pull request #552 from ozbenh/memspeed-long

sdram: Use unsigned long for memory test

4 years agosdram: Use unsigned long for memory test
Benjamin Herrenschmidt [Mon, 1 Jun 2020 22:08:42 +0000 (08:08 +1000)]
sdram: Use unsigned long for memory test

This makes it twice as fast on 64-bit CPUs when using a 64-bit bus :-)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years agotest/test_targets: add arty_symbiflow
Mariusz Glebocki [Mon, 1 Jun 2020 11:58:44 +0000 (13:58 +0200)]
test/test_targets: add arty_symbiflow

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
4 years agotargets: add arty_symbiflow
Mariusz Glebocki [Mon, 1 Jun 2020 11:41:49 +0000 (13:41 +0200)]
targets: add arty_symbiflow

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
4 years agoplatforms: add arty_symbiflow
Mariusz Glebocki [Mon, 1 Jun 2020 11:40:32 +0000 (13:40 +0200)]
platforms: add arty_symbiflow

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
4 years agobuild/xilinx: add Symbiflow toolchain support
Mariusz Glebocki [Mon, 1 Jun 2020 11:39:33 +0000 (13:39 +0200)]
build/xilinx: add Symbiflow toolchain support

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
4 years agoMerge pull request #550 from antmicro/jboc/spd-read
enjoy-digital [Mon, 1 Jun 2020 19:17:40 +0000 (21:17 +0200)]
Merge pull request #550 from antmicro/jboc/spd-read

bios/litedram: Add command to verify SPD contents with the one used during generation

4 years agoMerge pull request #549 from antmicro/mglb/fix-vivado-yosys
enjoy-digital [Mon, 1 Jun 2020 17:58:01 +0000 (19:58 +0200)]
Merge pull request #549 from antmicro/mglb/fix-vivado-yosys

build/xilinx: do not assume build name is "top"

4 years agosdram: Unconditionally switch to SW control before inits
Benjamin Herrenschmidt [Mon, 1 Jun 2020 13:44:09 +0000 (23:44 +1000)]
sdram: Unconditionally switch to SW control before inits

This will allow the controller to default to HW control which means
the sim model can be used without specific initializations

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years agobuild/xilinx: do not assume build name is "top"
Mariusz Glebocki [Sat, 23 May 2020 10:57:55 +0000 (12:57 +0200)]
build/xilinx: do not assume build name is "top"

4 years agoMerge pull request #547 from gsomlo/gls-fix-sdcard-status
enjoy-digital [Mon, 1 Jun 2020 09:37:05 +0000 (11:37 +0200)]
Merge pull request #547 from gsomlo/gls-fix-sdcard-status

soc/software/litesdcard: update for response register back to 128 bits

4 years agointerconnect/wishbone/DownConverter: skip accesses on slave when sel==0 and simplify.
Florent Kermarrec [Mon, 1 Jun 2020 09:03:08 +0000 (11:03 +0200)]
interconnect/wishbone/DownConverter: skip accesses on slave when sel==0 and simplify.

Improve efficiency for 64-bit CPU accessing only the 32-bit LSBs/MSBs.

4 years agosoc/interconnect/axi: generate wishbone.sel for reads.
Florent Kermarrec [Mon, 1 Jun 2020 08:58:45 +0000 (10:58 +0200)]
soc/interconnect/axi: generate wishbone.sel for reads.

4 years agosoc/software: only keep 32-bit CSR alignment support.
Florent Kermarrec [Mon, 1 Jun 2020 08:01:14 +0000 (10:01 +0200)]
soc/software: only keep 32-bit CSR alignment support.

64-bit support was added for 64-bit CPU because of limitation of the hardware
on CSR accesses. Now that the Wihhbone2CSR bus handles wishbone.sel, this is no
longer required.

4 years agosoc/software/litesdcard: update for response register back to 128 bits
Gabriel Somlo [Sat, 30 May 2020 00:42:49 +0000 (20:42 -0400)]
soc/software/litesdcard: update for response register back to 128 bits

The additional (17th) byte returned via the response register was
ignored by software (bios and kernel), so LiteSDCard was updated
to only return the (original, useful) 128 bits.

This patch updates the LiteSDCard code in the LiteX bios to only
expect those 128 bits, and to do so in a manner that's portable
across CSR data widths and alignments.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agowishbone/wishbone2csr: use wishbone.sel on CSR write.
Florent Kermarrec [Sat, 30 May 2020 13:21:32 +0000 (15:21 +0200)]
wishbone/wishbone2csr: use wishbone.sel on CSR write.

CSR write is only done if wishbone.sel != 0. This should avoid the need for 64-bit
CSR alignment on 64-bit CPUs since a 64-bit Wishbone write access targeting only the
32-bit LSB or MSB will be splitted in 2x32-bit accesses: one with sel=0xf, one with sel=0.

4 years agosoc/software/litesdcard: use new send register to send command and remove CSR8_CMD_FIX.
Florent Kermarrec [Fri, 29 May 2020 18:15:02 +0000 (20:15 +0200)]
soc/software/litesdcard: use new send register to send command and remove CSR8_CMD_FIX.

4 years agoplatforms/nexys_video: add spisdcard pins.
Florent Kermarrec [Fri, 29 May 2020 17:36:33 +0000 (19:36 +0200)]
platforms/nexys_video: add spisdcard pins.

4 years agotargets/nexys_video: add spi-sdcard and sdcard support.
Florent Kermarrec [Fri, 29 May 2020 17:26:29 +0000 (19:26 +0200)]
targets/nexys_video: add spi-sdcard and sdcard support.

4 years agoplaforms/nexys_video: keep up to date with litex-boards.
Florent Kermarrec [Fri, 29 May 2020 17:26:03 +0000 (19:26 +0200)]
plaforms/nexys_video: keep up to date with litex-boards.

4 years agotargets: simplify Ethernet/Etherbone integration on targets with both.
Florent Kermarrec [Fri, 29 May 2020 17:22:35 +0000 (19:22 +0200)]
targets: simplify Ethernet/Etherbone integration on targets with both.

4 years agobios/cmds/cmd_litesdcard: rewrite comments/descriptions.
Florent Kermarrec [Fri, 29 May 2020 16:51:24 +0000 (18:51 +0200)]
bios/cmds/cmd_litesdcard: rewrite comments/descriptions.

4 years agobios/main: replace / with -.
Florent Kermarrec [Fri, 29 May 2020 16:40:54 +0000 (18:40 +0200)]
bios/main: replace / with -.

4 years agoMerge pull request #545 from gsomlo/gls-fix-mmptr
enjoy-digital [Fri, 29 May 2020 16:32:30 +0000 (18:32 +0200)]
Merge pull request #545 from gsomlo/gls-fix-mmptr

csr: fix simple accessor alignment

4 years agocsr: fix simple accessor alignment
Gabriel Somlo [Fri, 29 May 2020 15:54:10 +0000 (11:54 -0400)]
csr: fix simple accessor alignment

MMPTR should always follow CSR alignment, NOT CSR data width.
(the latter merely indicates how many bits within a MMPTR are
actually populated).

Fixup for commit #4a5072a.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agosoftware/liblitesdcard: replace hexdump with dump_bytes already available in the...
Florent Kermarrec [Fri, 29 May 2020 15:15:20 +0000 (17:15 +0200)]
software/liblitesdcard: replace hexdump with dump_bytes already available in the BIOS.

4 years agosoc/add_sdcard: add with_emulator parameter to use SDCard emulator (from Google Proje...
Florent Kermarrec [Fri, 29 May 2020 14:07:08 +0000 (16:07 +0200)]
soc/add_sdcard: add with_emulator parameter to use SDCard emulator (from Google Project Vault) and integrate it in litex_sim.

4 years agobios/litedram: add option to verify SPD EEPROM memory contents
Jędrzej Boczar [Fri, 29 May 2020 13:14:54 +0000 (15:14 +0200)]
bios/litedram: add option to verify SPD EEPROM memory contents

4 years agobuild/sim/spdeeprom: use hex format when loading from file
Jędrzej Boczar [Fri, 29 May 2020 12:56:56 +0000 (14:56 +0200)]
build/sim/spdeeprom: use hex format when loading from file

4 years agosetup.py: add litex_jtag_uart and litex_crossover_uart to console_scripts.
Florent Kermarrec [Fri, 29 May 2020 08:40:17 +0000 (10:40 +0200)]
setup.py: add litex_jtag_uart and litex_crossover_uart to console_scripts.

4 years agoMerge pull request #543 from antmicro/jboc/eeprom-sim
enjoy-digital [Thu, 28 May 2020 14:46:34 +0000 (16:46 +0200)]
Merge pull request #543 from antmicro/jboc/eeprom-sim

litex/build/sim: add module for simulating SPD EEPROM

4 years agotargets/nexys4ddr: fix sdcard assert.
Florent Kermarrec [Thu, 28 May 2020 13:31:33 +0000 (15:31 +0200)]
targets/nexys4ddr: fix sdcard assert.

4 years agobios: add main bus and csr bus infos, use KiB/GiB.
Florent Kermarrec [Thu, 28 May 2020 13:05:24 +0000 (15:05 +0200)]
bios: add main bus and csr bus infos, use KiB/GiB.

4 years agolitex/build/sim: add module for simulating SPD EEPROM
Jędrzej Boczar [Thu, 28 May 2020 10:10:25 +0000 (12:10 +0200)]
litex/build/sim: add module for simulating SPD EEPROM

4 years agointegration/soc/add_sdcard: always use 32-bit/512bytes memories (not sure this will...
Florent Kermarrec [Wed, 27 May 2020 21:26:26 +0000 (23:26 +0200)]
integration/soc/add_sdcard: always use 32-bit/512bytes memories (not sure this will change?) and allocate sdwrite/sdread regions dynamically.

4 years agointegration/soc: add add_sdcard method with integration code from nexys4ddr.
Florent Kermarrec [Wed, 27 May 2020 21:18:15 +0000 (23:18 +0200)]
integration/soc: add add_sdcard method with integration code from nexys4ddr.

Even if not cleaned up yet, having it there will avoid duplications in targets.

4 years agocsr: Fix definition(s) of CSR_BASE in generated headers
Benjamin Herrenschmidt [Fri, 22 May 2020 07:53:20 +0000 (17:53 +1000)]
csr: Fix definition(s) of CSR_BASE in generated headers

CSR_BASE is currently defined twice. Once in mem.h as the base
of the CSR region in the SoC address space, and once in csr.h
as the base address for all CSRs.

This fixes two issues with those definitions:

 - The mem.h one is unconditional which prevents an external
redefinition (which is useful under some circumstances such as
when using an address decoder outside of LiteX with a standalone
core).

 - The csr.h one is actually the origin of the first CSR region
rather than the origin of the CSR region in the SoC space. They
are usually the same ... unless you don't have CSR bank 0 in
which case the csr.h one becomes different. This causes conflicts
with the mem.h definition and breaks projects using a standalone
cores.

The first one is fixed by adding the #ifndef/#endif around the
definition of the memory regions, the second one by passing the
csr_base to use to get_csr_header()

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years agoliblitedram/sdram: Add option to disable cdelay()
Benjamin Herrenschmidt [Fri, 22 May 2020 07:37:37 +0000 (17:37 +1000)]
liblitedram/sdram: Add option to disable cdelay()

When running in sim, those delays can take a *long* time, which
isn't always necessary with the simulated litedram PHY.

This allows system.h to optionally set CONFIG_SIM_DISABLE_DELAYS
which  causes cdelay to do nothing.

This is especially useful when using a verilated litedram inside
a bigger/slower simulated design as to not spend a huge amount
of time going through the initializations.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years agocpu/serv: add variants.
Florent Kermarrec [Wed, 27 May 2020 18:00:10 +0000 (20:00 +0200)]
cpu/serv: add variants.

4 years agosoc/integration/export: add optional csr_base parameter.
Florent Kermarrec [Wed, 27 May 2020 17:59:54 +0000 (19:59 +0200)]
soc/integration/export: add optional csr_base parameter.

4 years agobuild/sim/verilator: add regular_comb parameter (that defaults to False) and pass...
Florent Kermarrec [Wed, 27 May 2020 17:54:52 +0000 (19:54 +0200)]
build/sim/verilator: add regular_comb parameter (that defaults to False) and pass it to get_verilog.

4 years agoMerge pull request #542 from gsomlo/gls-sdcard-followup
enjoy-digital [Wed, 27 May 2020 17:04:18 +0000 (19:04 +0200)]
Merge pull request #542 from gsomlo/gls-sdcard-followup

software/bios: fixup sdclk command

4 years agoMerge pull request #541 from antmicro/jboc/spd-read
enjoy-digital [Wed, 27 May 2020 17:03:50 +0000 (19:03 +0200)]
Merge pull request #541 from antmicro/jboc/spd-read

Add support for I2C to read SPD EEPROM