Commit Graph

7253 Commits

Author SHA1 Message Date
Jędrzej Boczar e5c1482572 soc/software/liblitedram: add sdram debugging utilities 2021-05-17 14:19:16 +02:00
Jędrzej Boczar cd6f98c4c8 soc/software/liblitedram: use updated sdram_dfii_pix_X_addr interface 2021-05-17 14:11:10 +02:00
Jędrzej Boczar 33fb48584b soc/software/libbase: add option for read retries in memtest_data 2021-05-17 13:56:31 +02:00
Jędrzej Boczar d610c9da44 soc/software/libbase: limit number of errors printed when using MEMTEST_*_DEBUG 2021-05-17 13:53:32 +02:00
Vegard Storheil Eriksen 422c356930 software/liblitespi: Remove manual mode control. 2021-05-17 13:44:02 +02:00
Jędrzej Boczar b90d0bd1f7 soc/software/libbase: make memtest_data more configurable, add on_error callback 2021-05-17 13:42:44 +02:00
Florent Kermarrec 13979a43b7 soc/add_cpu: Fix/Simplify CFU integration. 2021-05-17 12:04:37 +02:00
Florent Kermarrec d0e8de077c soc/SoCController: Add separate fields for SoC and CPU resets.
As discussed in #909, in some specific cases, it can be interesting to be able
to keep the CPU in reset while the rest of the SoC is still operating (ex the
peripherals/bridges).

With theses changes, the old behaviour is preserved to do a full SoC Reset (at
the exception that writing a 1 is now mandatory) and a separate field specific
to the CPU reset is added.

The SoC Reset is a pulse (otherwise the system would be stuck in Reset) while
the CPU Reset is based on the register value (so can be pulse or hold).
2021-05-17 11:43:04 +02:00
Florent Kermarrec 06f4658174 cpu: Specify clock domain (improve readability). 2021-05-17 10:51:54 +02:00
Florent Kermarrec 78bdde0424 cpu/vexriscv: Simplify CFU integration, use Cfu.v as default CFU when not specified and rename argument to --cpu-cfu. 2021-05-17 10:02:58 +02:00
Florent Kermarrec 87bb10f43b CHANGES: Start listing changes for next release. 2021-05-17 09:58:46 +02:00
Florent Kermarrec a6c37df175 soc_core: Improve readability and move ROM initialization to SoCCore. (--integrated-rom-file args is also renamed to --integrated-rom-init to simplify support for str and list). 2021-05-17 09:55:28 +02:00
Florent Kermarrec dd72b1acfe soc/add_cpu: Add **kwargs support. 2021-05-17 09:53:40 +02:00
Florent Kermarrec 298f65e78e cpu/vexriscv: Change methods' order to improve readability. 2021-05-17 08:54:53 +02:00
enjoy-digital fc0e1440c5
Merge pull request #908 from antmicro/cfu-integration
Add CFU integration
2021-05-17 08:43:38 +02:00
zyp 1571da4989
software/liblitespi: Fix speed test. (#911)
Before this patch, the loop would finish with lowest_div either set to the first failing value
or 0 even if it succeeded with 0. Fix it so that if all tests pass, it’ll end up being -1 before
the incrementation.

This patch also skips retesting the original value. If the retest failed, lowest_div would be incremented past the original value and could potentially wrap around.
2021-05-17 08:30:38 +02:00
Robert Szczepanski d5dab98a2c Add CFU integration 2021-05-14 09:20:58 +02:00
bunnie 53982acd9f
I2S fix: sample SYNC on the correct edge (#904)
* resolve issue #862 add description to soc.svd

The issue is that with no description provided it simply would
not put out a description tag, which breaks compatibility with
other programs.

Insert a somewhat useful default description including a timestamp
and the words "LiteX SoC".

* I2S fix: sample SYNC on the correct edge

The original Tx path implementation samples SYNC on the falling
edge, out of convenience with the fact that teh data must also
change on the falling edge.

This works OK, until you have a CODEC which has a ~40ns max
delay spec on the SYNC, and also has a slightly asymmetric
SYNC edge (the SYNC signal is also the WCLK or LRCLK depending on
which docs you read). The SYNC by spec is supposed to change
on the falling edge, and this extra delay is enough to cause
the SYNC to introduce occassional bit or frame shifts into
the audio.

This fix samples the SYNC on the rising edge, but still
changes the data on the falling edge, thus allowing for
implementations where SYNC has quite loose timings relative
to everything else (as is the case on the TLV320AIC3200)
2021-05-07 08:17:49 +02:00
enjoy-digital 01a7ff44d2
Merge pull request #905 from hansfbaier/master
lattice/programmer.py: Add iCESugar programmer
2021-05-07 08:16:55 +02:00
Hans Baier 5fd1cae618 lattice/programmer.py: Add iCESugar programmer 2021-05-07 10:55:48 +07:00
Florent Kermarrec 34ed5672c3 tools/litex_server/litex_term: Add --jtag-chain argument. 2021-05-06 15:41:25 +02:00
Florent Kermarrec 24105f12d5 openocd/stream: Expose chain parameter. 2021-05-06 15:25:18 +02:00
Florent Kermarrec aea1e7fb20 jtag/jtagbone: Expose chain parameter. 2021-05-06 14:58:47 +02:00
Florent Kermarrec 3ce5f3867a cores/video/VideoS7GTPHDMIPHY: Add refclk support (None, Differential or Single-Ended). 2021-05-06 10:50:29 +02:00
Florent Kermarrec bfb90f5625 soc/cores/video: Add VideoS7GTPHDMIPHY (7-Series HDMI PHY over GTPs).
Validated on Decklink Mini 4K Monitor at 1080p60 (should allow UHD/4K), still
some fixed things, but should provide a good basis to go further...
2021-05-05 18:12:10 +02:00
Florent Kermarrec d6084cd1f9 CHANGES: Add 2021.04 changes. 2021-05-03 11:59:42 +02:00
Florent Kermarrec 1d21a90076 software/liblitespi: Fix compilation warning. 2021-05-03 10:34:45 +02:00
enjoy-digital c3f4da4376
Merge pull request #902 from tcal-x/radiant-lse
Add 'lse' as a --synth-mode alternative with Radiant toolchain.
2021-05-03 10:13:52 +02:00
Tim Callahan dcd13d27ef Add 'lse' as a --synth-mode option with Radiant.
Signed-off-by: Tim Callahan <tcal@google.com>
2021-05-01 21:12:56 -07:00
enjoy-digital fb8f45be73
Merge pull request #901 from stffrdhrn/litex-sdcard-irq
integration/soc: Wire up the sdirq to the CPU
2021-04-30 12:30:35 +02:00
Florent Kermarrec 59b968decc cores/clock/gowin_gw1n: Fix indent. 2021-04-30 12:22:59 +02:00
Florent Kermarrec 5dc3ad3b29 soc/cores/spi/SPISlave: Minor cleanup. 2021-04-30 12:16:49 +02:00
Florent Kermarrec 75bb78a413 cores/clock: Add initial Gowin GW1N PLL support.
For now limited to one output clock and not supporting phase/duty cycle adjustements.
2021-04-30 11:31:04 +02:00
Florent Kermarrec fefc5aae66 cores/video/VideoVGAPHY: Add optional clk support.
Some LCDs displays are almost VGA compatible (no DE, active low hsync/vsync)
but require the clock.
2021-04-29 11:50:04 +02:00
Florent Kermarrec 87ebdea5a7 software/libliteeth: Add optional ETH_PHY_NO_RESET support to allow disabling software reset.
Un-wanted when using the Hybrid LiteETHMAC since interrupt the hardware UDP/IP stack.
2021-04-29 11:50:00 +02:00
Stafford Horne a9e935e61a tools/litex_json2dts: Add interrupt settings for sdcard 2021-04-29 17:52:17 +09:00
Stafford Horne dc1a4c5380 integration/soc: Wire up the sdirq to the CPU
I am working on testing out the patches from:
 https://github.com/litex-hub/linux/pull/8

These linux patches take advantage of the sdcard interrupt to track when
transfers finish.  However, it seems the interrupt is not being
connected to the CPU.

This patch does that by allowing us to directly register and
EventManager module with the irq handler.
2021-04-29 17:18:51 +09:00
Tim Ansell 11f091d4cf
Merge pull request #900 from stffrdhrn/rom-to-128k
integration/soc_core: Increase default ROM size to 128K
2021-04-28 15:28:19 -07:00
Stafford Horne 2f96cf021c integration/soc_core: Increase default ROM size to 128K
With recent BIOS changes the default rom size on the mor1kx built just
passes over the 64k boundary and the build fails.  Since the 128K
default is a soft limit and the ROM gets resized to the actual ROM
requirements this should be relatively safe.

Note, that if a RW rom is configured the full 128kb will be allocated.

Fixes: #893
2021-04-29 06:52:49 +09:00
Florent Kermarrec 9098f5553c software/liblitedram: Add liblitedram prefix to includes (to use copy of bist.c/sdram.c externally). 2021-04-28 17:21:04 +02:00
Florent Kermarrec bb355a773a integration/soc/video: Allow passing timings as str or tuple (name, dict).
When passed as str, the timing dict will be extracted from litex.soc.cores.video.video_timings.
When passed as tuple, custom dict will be directly passed to VTG.
2021-04-28 16:58:11 +02:00
Florent Kermarrec c4e8e44cd9 cores/video/VideoTimingGenerator: Allow passing custom dict as default_video_timings.
Allow only listing the classical video timings in the core and let user provide the timings
specific to other configurations.
2021-04-28 16:56:28 +02:00
enjoy-digital da1092d9c0
Merge pull request #896 from danc86/nodefaultlibs
soc/software: link with compiler instead of ld
2021-04-28 15:44:49 +02:00
Florent Kermarrec f7b615ffab software/liblitedram/sdram.c: Avoid direct ddrphy_wdly_dq_rst during DQ-DQS training on Ultrascale/Ultrascale+ (seems to cause issue on some configurations/modules).
Also add a delay to be similar to read_leveling reset/inc functions.
2021-04-28 14:42:41 +02:00
Florent Kermarrec dc4f9772ba software/liblitedram/sdram.c: Move common centering functions to separate section. 2021-04-28 14:15:48 +02:00
Florent Kermarrec 19d16fa27f software/liblitedram/sdram/sdram_write_leveling_find_cmd_delay: Only update best_count when error < best_error. 2021-04-28 11:23:34 +02:00
Florent Kermarrec c50989be8e software/liblitedram/sdram: Add sdram_tck_taps variable and use it internally to avoid un-needed accesses to CSRs. 2021-04-28 11:22:07 +02:00
Florent Kermarrec 87c0e30cef software/liblitedram/sdram.c: Remove residual wrap around code, fix some spaces/tabs. 2021-04-28 10:45:35 +02:00
Florent Kermarrec 74c42a55e2 tools/litex_json2dts/framebuffer: Use framebuffer_base. 2021-04-27 18:59:54 +02:00
Florent Kermarrec a3f3d8f08f software/liblitedram/sdram: Fix compilation warning. 2021-04-27 16:33:40 +02:00