Commit graph

3461 commits

Author SHA1 Message Date
Florent Kermarrec
a8cea15b95 cores/clock/gowin_gw1n/create_clkout: Add reset support (through AsyncResetSynchronizer) and enable it by default.
Should be based on PLL's lock but does not seem stable, so use reset input for now.
2021-07-14 09:38:23 +02:00
Florent Kermarrec
cfbc06c297 build/gowin/common: Add AsyncResetSynchronizer implementation. 2021-07-14 09:37:00 +02:00
enjoy-digital
fab6512928
Merge pull request #967 from JosephBushagour/jbushagour_assembly_interoperability
Make "generated/soc.h" able to be included in assembly files.
2021-07-13 10:47:59 +02:00
enjoy-digital
df67b65a0a
Merge pull request #957 from pftbest/fix_fst
Fix compile error when FST traces are enabled on macOS.
2021-07-13 10:38:40 +02:00
Joey Bushagour
c79e428fe1 Add soc.h interoperability with assembly. 2021-07-12 08:33:17 -05:00
Florent Kermarrec
bc77aa37f0 include/hw/common: Fix _csr_rd_buf/_csr_wr_buf for sizeof(buf[0]) < CSR_DW_BYTES case.
- Shift in _csr_rd_buf should only been done when buf is set.
- When CSR size is not an exact multiple of the CSR data-width, the gap is in
the low addresses, not the high ones. So offset is introduced to take this into
account.
2021-07-09 17:36:17 +02:00
Florent Kermarrec
b29a99cd0b liblitedram/sdram.c: Fix DFII_PIX_DATA_BYTES computation.
DFII CSR size is not necessarily multiple of 4 (often the case but not with ECC for example).
2021-07-09 17:32:43 +02:00
George Hilliard
8954041a93 clock/lattice_ecp5/ECP5PLL: Only consider non-dpa clocks as feedback
Dynamically adjusting the phase of a feedback will cause it to unlock.
The phase adjust ports are shared by all the outputs, so there is no
technical way to prevent this.  Allow the user to indicate that they
will not adjust a clock when requesting an output by setting
uses_dpa=False, and only consider those that the user has promised not
to use.
2021-07-08 08:14:14 -05:00
Florent Kermarrec
9a51dfb50e tools/litex_sim: Let the SDRAMPHYModel pick default settings. 2021-07-08 09:09:57 +02:00
Florent Kermarrec
fced79631e tools/litex_sim: sdram_module_nphases/get_sdram_phy_settings now directly integrated in litedram.phy.model. 2021-07-08 09:01:32 +02:00
George Hilliard
34ba649f38 clock/lattice_ecp5/ECP5PLL: implement 4-output solver
Reimplement the configuration loop to allow all 4 outputs to be used by
the user, if one of them is suitable for use as VCO feedback.

The new strategy is to first iterate over requested outputs to see if
any of them can be used as a feedback source.  If one can, it is
selected, and if no output is suitable, it attempts to instantiate one.
Once the feedback path is selected, the VCO frequency is known and it
attempts to calculate the remaining outputs' settings.

In addition, this implementation now respects datasheet limits in two
new ways:

- It respects the post-input-divider minimum frequency of 10MHz
- It respects the max output frequency of 400MHz for instantiated
  feedback outputs

I am slightly unhappy with the seemingly-repetitive for loops. However
each one has slightly different sematics and I don't see a way to
combine them that doesn't hinder readability.
2021-07-07 01:15:06 -05:00
George Hilliard
8b9f03efba clock/lattice_ecp5/ECP5PLL: Expose standby signal 2021-07-06 08:40:36 -05:00
Yoshimasa Niwa
0953c52eea Increase delay for tty.usbmodem on macOS.
**Problems**

On macOS USB CDC ACM, which appears as `/dev/tty.usbmodem*`,
somehow `lxterm` keeps failing to send a payload.

**Solution**

Increase delay.

It's very unknown why to me, however, probably macOS USB CDC ACM
driver implementation issue.

**Testing**

Tested on MacBook Air (2020, M1) for OrangeCrab (rev.0.2) target
with Linux on LiteX SoC bitstream build from current commit and
load prebuild Linux On LiteX image.
2021-07-05 11:46:57 -07:00
Florent Kermarrec
f9f1b8e25d liblitedram: Consider 1s window is valid when indirectly seen before 0 (start at 0 and long enough). 2021-06-29 12:03:51 +02:00
Ilia Sergachev
65babd6500 soc/interconnect/axi: fix valid signal in connect_to_pads for axi lite 2021-06-28 11:50:45 +02:00
Vadzim Dambrouski
35204225e8 Fix compile error when FST traces are enabled on macOS.
Compile options should be the same for all platforms.
2021-06-27 17:34:43 +03:00
developandplay
9fd9eaea07 Move patch script to python-data 2021-06-27 01:31:05 +02:00
developandplay
ac217d818f Set environmental variables in python 2021-06-27 01:07:27 +02:00
developandplay
e3f6d8349b Use os methods to expand env vars 2021-06-26 16:30:54 +02:00
developandplay
b787ee4411 Move systemverilog files to python-data 2021-06-26 15:45:48 +02:00
developandplay
16b3e08c17 Copy config loader in python 2021-06-26 15:37:17 +02:00
enjoy-digital
23afca3de8
Merge pull request #953 from developandplay/blackparrot-32bit-csr
Blackparrot 32bit csr
2021-06-23 19:20:51 +02:00
Florent Kermarrec
edc4c85615 build/lattice/common: Add ECP5 Differential Output support. 2021-06-23 11:55:22 +02:00
developandplay
adb71bde8c Adjust wishbone adapter for 32bits 2021-06-22 23:37:24 +02:00
developandplay
b795f848a2 Fixup blackparrot 2021-06-22 18:43:17 +02:00
Florent Kermarrec
c395a8068a cores/prbs: Minor Cleanup and make sure to generate errors when RX is Idle. 2021-06-22 16:57:00 +02:00
Florent Kermarrec
2cd6224acf clock/lattice_ecp5/ECP5PLL: Add expose_dpa method (Dynamic Phase Adjustment) and move code to it. 2021-06-22 12:07:39 +02:00
enjoy-digital
09a3ca6fd0
Merge pull request #949 from zyp/ecp5_dynamic_pll
cores/clock/ecp5: Add dynamic phase adjustment signals.
2021-06-22 12:04:20 +02:00
enjoy-digital
26df3fa2c4
Merge pull request #952 from smunaut/dfu
build/DFUProg: Allow to specify alt interface and to not reboot
2021-06-22 12:03:43 +02:00
Florent Kermarrec
3d81c9a437 build/lattice/LatticeProgrammer: pgrcmd always seems to return a non-zero value so disable check. 2021-06-22 11:59:42 +02:00
Florent Kermarrec
f381cdcd1a build/GenericProgrammer: Add check parameter to make check optional. 2021-06-22 11:59:38 +02:00
Sylvain Munaut
38e46bb3d3 build/DFUProg: Allow to specify alt interface and to not reboot
Some targets have multiple alt settings for DFU for different zone
of the flash. Allowing to specify which one to flash and not
rebooting immediately allows to flash several of them at once.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2021-06-21 16:12:55 +02:00
Florent Kermarrec
d6f24f2f68 cores/uart/RS232ClkPhaseAccum: Avoid reset on phase signal, improve timings/resources on iCE40. 2021-06-20 14:33:25 +02:00
Florent Kermarrec
4c8184fbb6 cores/uart: Fix refactoring typo (tick is a 1-bit Signal), thanks @tnt. 2021-06-20 08:58:45 +02:00
Vegard Storheil Eriksen
b58c416a24 cores/clock/ecp5: Add dynamic phase adjustment signals. 2021-06-19 11:24:08 +02:00
developandplay
7d2e19ac26 Enable non-interactive mode 2021-06-18 12:35:42 +02:00
enjoy-digital
fdb278838c
Merge pull request #881 from developandplay/patch-1
Add --non-interactive option to simulation
2021-06-18 10:40:19 +02:00
Florent Kermarrec
5205356d24 tools/litex_json2dts: Simplify Switches interrupt support (and make it similar to other interrupts). 2021-06-18 10:36:33 +02:00
enjoy-digital
291374e66f
Merge pull request #854 from mczerski/gpio_dts_irq
dts: gpio: interrupt controller definition for switches
2021-06-18 10:29:30 +02:00
Florent Kermarrec
98676162a3 VexRiscv-SMP: Review/Cleanup #906. 2021-06-18 10:19:27 +02:00
enjoy-digital
58c533668c
Merge pull request #906 from rdolbeau/extra_config_and_dts
Configurable [ID]TLB for VexRiscv & improved DTS
2021-06-18 10:09:28 +02:00
Florent Kermarrec
8ce7c583e6 cores/spi: Add Manual CS Mode (to allow doing Bulk Xfers without external changes), also cleanup/simplify a bit CSR descriptions. 2021-06-18 10:07:01 +02:00
Florent Kermarrec
a4be067d91 tools: Add litex_contributors.py script to easily update CONTRIBUTORS file. 2021-06-17 23:04:28 +02:00
Florent Kermarrec
7179d88e8c ram/lattice_nx: Add init parameter and rename method to add_init.
When init is not empty, call add_init automatically (similar to Memory).
2021-06-16 18:33:00 +02:00
enjoy-digital
869b5c24a8
Merge pull request #941 from danc86/nxlram-initval
soc/cores/ram: allow populating initial values in Nexus LRAM
2021-06-16 18:31:00 +02:00
enjoy-digital
b0e6851150
Merge pull request #942 from zyp/external_software_packages
Allow external software packages to be linked into the BIOS
2021-06-16 18:21:55 +02:00
enjoy-digital
aad64bbf9b
Merge pull request #943 from JosephBushagour/jbushagour_getargspec_fix
Replace deprecated inspect.getargspec with inspect.getfullargspec.
2021-06-16 14:59:39 +02:00
Tim Callahan
e59530ab50 Force SymbiFlow 'make' to be non-parallel.
Signed-off-by: Tim Callahan <tcal@google.com>
2021-06-15 14:49:28 -07:00
Florent Kermarrec
8a644c9086 soc/add_video_xy: Allow passing phy or phy's Endpoint. 2021-06-15 18:10:24 +02:00
Joey Bushagour
62ea48940a Replace deprecated inspect.getargspec with inspect.getfullargspec. 2021-06-15 08:03:11 -05:00
Vegard Storheil Eriksen
8d527a1f3f soc/software/bios: Allow registering init functions. 2021-06-13 14:04:34 +02:00
Vegard Storheil Eriksen
61636f1248 soc/integration/builder: Allow linking in external software packages. 2021-06-13 14:04:34 +02:00
Dan Callaghan
be4c7cfb34 soc/cores/ram: allow populating initial values in Nexus LRAM
On designs which use Nexus parts without any external memory, it can be
difficult to fit an embedded ROM program larger than a few KiB. Radiant
cannot infer LRAM, and refuses to infer EBRAM under many circumstances
too, so large memories tend to just consume a huge number of LUTs.

This patch makes it possible to explicitly wire up an LRAM as a ROM,
populate its initial values with a program, and execute directly from
it. That lets us embed programs up to 64KiB.
2021-06-11 16:41:10 +10:00
bunnie
311b633a11 breakout the keyclearb pin for integration elsewhere 2021-06-11 04:44:39 +08:00
enjoy-digital
0a932be491
Merge pull request #936 from developandplay/patch-4
Sync ROM_BOOT_ADDRESS with main_ram location
2021-06-09 12:11:24 +02:00
enjoy-digital
d5cfe09f4c
Merge pull request #931 from madscientist159/add-1920-1200-mode
Add 1920x1200@60 RBv2 to LiteX video modes
2021-06-09 09:03:57 +02:00
enjoy-digital
8cdb0b8db3
Merge pull request #932 from developandplay/patch-3
Fix base_address for LiteDRAMWishbone2Native
2021-06-09 08:58:28 +02:00
Florent Kermarrec
5061a368da cores/video: Regroup VGA/DVI Phy in VideoGenericPHY and support variations (positive/negative hsync/vsync, etc...) 2021-06-09 08:49:29 +02:00
developandplay
e0352a1f0f
Sync ROM_BOOT_ADDRESS with main_ram location
Rocket and Blackparrot main_ram starts at 0x80000000
Vexriscv main_ram starts at 0x40000000
2021-06-09 03:36:32 +02:00
Florent Kermarrec
25ead1ad69 interconnect/stream: Add Gate. 2021-06-08 18:58:08 +02:00
developandplay
f2caeaf83a
Fix base_address for LiteDRAMWishbone2Native
Fixes `origin == None` due to https://github.com/litex-hub/litex-boards/commit/ba01776
2021-06-08 00:51:11 +02:00
Raptor Engineering Development Team
47c19933fa Add 1920x1200@60 RBv2 to LiteX video modes Tested on Raptor Sparrowhawk 2021-06-07 14:49:33 -05:00
Florent Kermarrec
a064e9d048 soc/interconnect/wishbone: Fix SEL propagation on UpConverter (thanks @Dolu1990). 2021-06-02 10:46:53 +02:00
Florent Kermarrec
0b329c3dce tools/litex_json2dts: Add initial USB OHCI support. 2021-06-01 10:41:35 +02:00
Florent Kermarrec
a17ded2ce6 soc/cores: Add initial USB OHCI core wrapper. 2021-06-01 10:28:30 +02:00
Florent Kermarrec
6c8e839cef soc/cores/freqmeter: Minor simplification. 2021-06-01 10:26:27 +02:00
Florent Kermarrec
26db10701a integration/soc/add_video_terminal: Connect UART to TX FIFO instead of Source.
Allow UART to be displayed on terminal with Auto TX flush.
2021-05-28 11:11:49 +02:00
Florent Kermarrec
ad1fe143cc cores/uart: Cleanup code and add optional automatic TX Flush.
In some SoCs where UART's PHY is managed externally (ex through a Bridge) we don't
necessarily want the UART TX to wait for the PHY to be ready (and then stall the
CPU) but just want to let the CPU print the UART and will just connect when useful
and handle backpressure when connected.

This is now possible by calling add_auto_tx_flush method, ex in the SoC:
self.uart.add_auto_tx_flush(sys_clk_freq)
2021-05-28 11:03:23 +02:00
Florent Kermarrec
d11dc0b503 libbase/memtest: Print size with 1 digit after the decimal point. 2021-05-27 19:33:29 +02:00
enjoy-digital
9b85769499
Merge pull request #923 from gsomlo/gls-fix-gcc-warn
software/lib*: address gcc warnings
2021-05-27 18:50:24 +02:00
enjoy-digital
d7f4293743
Merge pull request #924 from developandplay/patch-2
Use add_etherbone in simulation
2021-05-27 18:49:45 +02:00
Florent Kermarrec
34df454157 cores/timer/uart: Use edge="rising on Timer/UART's EventSourceProcess.
Make code easier to understand.
2021-05-27 18:47:40 +02:00
Gabriel Somlo
9a24034d1d software/lib*: address gcc warnings
Fix gcc warnings: use 'unsigned long' to represent memory addresses,
and remove 'static' from the definition of 'cdelay()', as it is called
from multiple C files.
2021-05-27 08:47:29 -04:00
developandplay
c17421bccb
Use add_etherbone in simulation
Fixes not working analyzer example from wiki
2021-05-26 23:18:22 +02:00
Florent Kermarrec
5fd215fe3a soc/interconnect/stream/Pipeline: Improve comments. 2021-05-26 18:34:22 +02:00
Florent Kermarrec
b1d8fe61f8 cores/cpu: Add initial FemtoRV support.
FemtoRV is a minimalist RISC-V CPU with design process documented and
available at https://github.com/BrunoLevy/learn-fpga.

This CPU is a very nice way to discover/learn RISC-V and this LiteX support
can be useful to learn how to integrate a custom CPU with LiteX.

With this support, FemtoRV is now directly usable with LiteX Sim:
$litex_sim --cpu-type=femtorv

This should also enable its use on all boards (> 50) available in LiteX-Boards
repository (but hasn't been tested yet), ex:
$python3 -m litex_boards.targets.digilent_arty --cpu-type=femtorv --build
2021-05-26 09:08:41 +02:00
Florent Kermarrec
d3560e5772 liblitedram/sdram.c: Update sdram_write_read_check_test_pattern with SDRAM_PHY_ECP5DDRPHY.
The return value has been changed and also required to be update for SDRAM_PHY_ECP5DDRPHY.
2021-05-25 10:28:56 +02:00
enjoy-digital
8085cc3c97
Merge pull request #915 from zyp/liblitespi_remove_mode
software/liblitespi: Remove manual mode control.
2021-05-25 08:41:13 +02:00
Romain Dolbeau
c06bd2c77d Make the [ID]TLB size configurable from Litex ; expand the DTS to include cache/TLB/topology in CPUs & generate the required information for VexRiscv 2021-05-23 03:15:02 -04:00
Florent Kermarrec
55344b4c14 cores/clock/xilinx: Add power down support. 2021-05-19 22:31:35 +02:00
Florent Kermarrec
cbb75b852e cores/clock/xilinx: Cosmetic cleanup on Instances. 2021-05-19 22:20:04 +02:00
Florent Kermarrec
12b27f961c software/liblitedram: Fix compilation on designs without SDRAM. 2021-05-19 11:07:03 +02:00
Florent Kermarrec
aa2622b1f5 software/liblitedram: Add missing #ifdef SDRAM_DEBUG to fix compilation with large DRAMs.
sdram_dbg seems to have current limitations: "At most 32 databits SDR or 16 databits DDR supported".
2021-05-18 11:36:19 +02:00
Jędrzej Boczar
93f357d853 soc/software/liblitedram: make leveling scores more robust by counting number of bitslips 2021-05-17 14:53:04 +02:00
Jędrzej Boczar
50805797c6 soc/software/liblitedram: optional write latency calibration debug output 2021-05-17 14:49:30 +02:00
Jędrzej Boczar
1f2b8621fe soc/software/liblitedram: add sdram_debug command 2021-05-17 14:38:35 +02:00
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
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
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
1d21a90076 software/liblitespi: Fix compilation warning. 2021-05-03 10:34:45 +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
Jędrzej Boczar
ad23130a9a software/liblitedram: use single iteration of dq-dqs training 2021-04-27 10:54:32 +02:00
Dan Callaghan
020466a43e soc/software: link with compiler instead of ld
The linker does not actually recognise -nodefaultlibs, that is a compiler
option.

Prior to binutils 2.36, ld treated -nodefaultlibs as a string of short
options and ignored them as unrecognised. Starting from binutils 2.36, it
reports an error instead:

    riscv64-unknown-elf-ld: Error: unable to disambiguate: -nodefaultlibs (did you mean --nodefaultlibs ?)

See also: https://sourceware.org/bugzilla/show_bug.cgi?id=27050

Fixes #825.
2021-04-27 15:36:13 +10:00
Florent Kermarrec
4c26dbe98f cores/cpu/microwatt: Re-map csr/xics and keep the lower 128MBs for the SoC IO auto-allocation. 2021-04-26 18:37:40 +02:00
Florent Kermarrec
9a82fd1d54 tools/litex_sim: Use automatic ethmac allocation. 2021-04-26 18:33:50 +02:00
Florent Kermarrec
48ec20e2ef software/liblitedram/sdram: Remove wraps around in sdram_leveling_center_module.
Adding wraps around capability will have to be discussed, if implemented this has to
be done very carefully since there are no relation between the total delay that can
be compensated through the I/O-DELAYs and the SDRAM clock period.

As implemented, it also produced confusing values in the logs:

m0:0 m1:0
Read leveling:
  m0, b0: |00000000000000000000000000000000| delays: -
  m0, b1: |00000000000011111111111111100000| delays: 19+-07
  m0, b2: |00000000000000000000000000001111| delays: 14+-17
  m0, b3: |00000000000000000000000000000000| delays: -
  m0, b4: |00000000000000000000000000000000| delays: -
  m0, b5: |00000000000000000000000000000000| delays: -
  m0, b6: |00000000000000000000000000000000| delays: -
  m0, b7: |00000000000000000000000000000000| delays: -
  best: m0, b01 delays: 19+-07
  m1, b0: |00000000000000000000000000000000| delays: -
  m1, b1: |00000000000011111111111111000000| delays: 19+-07
  m1, b2: |00000000000000000000000000001111| delays: 15+-17
  m1, b3: |00000000000000000000000000000000| delays: -
  m1, b4: |00000000000000000000000000000000| delays: -
  m1, b5: |00000000000000000000000000000000| delays: -
  m1, b6: |00000000000000000000000000000000| delays: -
  m1, b7: |00000000000000000000000000000000| delays: -
  best: m1, b01 delays: 19+-07
Switching SDRAM to hardware control.

--> 14+-17 and 15+-17 are confusing.
2021-04-26 17:27:27 +02:00
enjoy-digital
a6c5fd7aed
Merge pull request #891 from antmicro/crosslink-nx-fix-sdr-buffers
Lattice Crosslink NX: Fix clock port names in SDR{in/out} Impl
2021-04-26 11:19:44 +02:00
Jan Luebbe
f4c9bf0666 bios: support passing tftp filename to the 'netboot' command
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2021-04-25 20:45:03 +02:00
Karol Gugala
54f729fbc1 Lattice: Fix port names in SDR{in/out} Impl
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
2021-04-25 19:47:30 +02:00
Florent Kermarrec
22d763ee11 tools/litex_sim: Remove self.add_csr calls no longer required. 2021-04-23 19:33:51 +02:00
Florent Kermarrec
8c8c1fe6e0 tools/litex_sim: Fix cpu in configuration (allow list of supported CPU to be listed when invalid cpu_type is provided). 2021-04-23 19:16:18 +02:00
Florent Kermarrec
116c2f1549 cores/cpu: Cosmetic cleanups. 2021-04-23 16:16:31 +02:00
Florent Kermarrec
fe7029a7e0 software/liblitedram: Add missing read window re-centering after selecting bitslip in Write DQ-DQS training. 2021-04-22 17:08:20 +02:00
enjoy-digital
447d2648e8
Merge pull request #884 from antmicro/jboc/dq-dqs-training
Write DQ-DQS training
2021-04-22 17:08:08 +02:00
Florent Kermarrec
0ed7852779 tools/litex_term: Add time.sleep on BridgeUART to avoid high CPU usage. 2021-04-22 17:07:33 +02:00
Florent Kermarrec
75045914b4 global: Bump copyright year. 2021-04-22 17:07:29 +02:00
Florent Kermarrec
b55af2156b soc/add_sdcard: Fix cmd_done signal. 2021-04-21 13:38:00 +02:00
Paul Mackerras
e6765f847d integration/soc/add_sdcard: Add an interrupt for command completion
This is useful for long-running commands generally and in particular
for those without any data transfer, such as erase.  It is a
level-sensitive interrupt because that makes it a little harder to
lose interrupts due to incorrect programming.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2021-04-21 09:00:31 +10:00
Florent Kermarrec
2ac7e0b978 software/liblitesdcard: Update with LiteSDCard changes (SDCARD_CTRL_RESPONSE_SHORT_BUSY is now directly a supported command). 2021-04-20 14:30:28 +02:00
enjoy-digital
b29515bd1d
Merge pull request #885 from paulusmack/master
software/liblitesdcard: Tell the controller when to wait while the card is busy
2021-04-20 14:30:08 +02:00
enjoy-digital
eea63968d2
Merge pull request #877 from rdolbeau/eth_int_fix
Fix interrupt issue with ethernet on recent Linux-On-Litex-Vexriscv/SMP
2021-04-19 18:12:01 +02:00
Paul Mackerras
49c4d735c5 software/liblitesdcard: Tell the controller when to wait while the card is busy
Bit 2 of the command register now tells the controller to wait while
the card is indicating that it is busy (by pulling the DAT0 line low).
The card can do this for commands 7 and 12 and app command 41 (and
also for commands 20, 28, 29, 38 and 43, but we don't use those here.)

This sets bit 2 for those commands.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2021-04-19 09:12:13 +10:00
Jędrzej Boczar
2a5973b21f soc/software/liblitedram: refactor centering code into more generic function 2021-04-16 15:41:24 +02:00
Jędrzej Boczar
76d121ea36 soc/software/liblitedram: add DQ-DQS training procedure 2021-04-16 11:50:38 +02:00
Romain Dolbeau
f310dd52f3 Fix interrupt issue with ethernet on recent Linux-On-Litex-Vexriscv/SMP
It seems an overreaching 'interrupt-parent' caused trouble to interrupt routing.
This moves 'interrupt-parent' to the SoC entry.
2021-04-15 10:06:53 +02:00
developandplay
8ef7353fe5
Add interactivity option to simulation 2021-04-14 13:39:47 +02:00
enjoy-digital
246142256b
Merge pull request #880 from betrusted-io/issue-862
resolve issue #862 add description to soc.svd
2021-04-14 08:58:42 +02:00
enjoy-digital
01479ed541
Merge pull request #879 from betrusted-io/timer-doc
use AutoDoc for timer documentation
2021-04-14 08:56:37 +02:00
Florent Kermarrec
f014e4cbd2 tools/litex_client: Add filter parameter to dump_registrers to only dump/display the filtered registers:
ex: litex_cli --regs --filter=pcie_phy will only dump/display pcie_phy registers.
2021-04-13 13:44:41 +02:00
bunnie
1b78b12024 resolve feedback on import location 2021-04-12 22:27:22 +08:00
bunnie
ab0aab6913 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".
2021-04-12 22:08:05 +08:00
bunnie
2bb830bb69 use AutoDoc for timer documentation
Not sure why nobody else saw this, but sometime in the last month's
patches sphinx started throwing an error when building docs for
the timer block. The problem is that the body and title are 'None'
and the doc code tries to invoke methods on None.

Changing the doc methodology to AutoDoc and explicitly creating the intro
section fixes this.
2021-04-12 21:53:05 +08:00
Florent Kermarrec
5011b564c3 integration/soc: Add _ prefix to build_name when build_name starts with digit (Invalid verilog top level name). 2021-04-12 08:32:05 +02:00
Florent Kermarrec
15cf4d75e9 software/liblitesdcard: Add SDCARD_CMD25_SUPPORT #define to allow disabling/enabling Multiple Block Writes and implement Multiple Block Writes. 2021-04-09 19:34:13 +02:00
Florent Kermarrec
5cdf621367 software/liblitesdcard: Add SDCARD_CMD18_SUPPORT #define to allow disabling/enabling Multiple Block Reads.
Also use Single Block Read when only 1 block to read, avoid stop transmission.
2021-04-09 19:17:32 +02:00
Florent Kermarrec
9bec0ce7a2 soc/add_ethernet: Add with_timestamp parameter to enable Timestamping and use timer0.uptime_cycles as Timestamp source. 2021-04-08 14:37:48 +02:00
Florent Kermarrec
7caed56790 cores/timer: Expose uptime_cycles and allow multiple calls to add_uptime. 2021-04-08 14:36:10 +02:00
Florent Kermarrec
dbe09341c0 soc/add_pcie: Remove duplicate assert (already checked by check_if_exists). 2021-04-08 12:19:56 +02:00
enjoy-digital
37a81b145a
Merge pull request #875 from rdolbeau/reserve_fb_memory
json2dts: add the framebuffer memory in the 'reserved-memory' entry, …
2021-04-07 12:17:00 +02:00
Florent Kermarrec
e5e472d469 soc/software: Remove SoCController dependency for BIOS compilation. 2021-04-07 10:45:43 +02:00
Florent Kermarrec
02328e5236 integration/soc: Add check_bios_requirements method and check for ctrl, timer0, rom and sram presence in the SoC when using the BIOS. 2021-04-07 10:37:48 +02:00
Florent Kermarrec
6940db7730 software/bios: Fix compilation without UART. 2021-04-07 09:03:07 +02:00
Romain Dolbeau
dac6c1cbb1 json2dts: add the framebuffer memory in the 'reserved-memory' entry, so that Linux doesn't try to use it for something else. 2021-04-06 13:44:50 +02:00
enjoy-digital
8db1a619f5
Merge pull request #874 from chmousset/enh/ECP5DifferentialInput
[enh] ECP5 DIfferential input support
2021-04-06 12:27:33 +02:00
enjoy-digital
4500641d78
Merge pull request #873 from sthornington/master
Fix yosys read command for SystemVerilog sources
2021-04-06 12:08:07 +02:00
Charles-Henri Mousset
51ea0c0427 [enh] ECP5 DIfferential input support 2021-04-05 17:24:51 +02:00
Simon Thornington
4b0a359675 Fix yosys read command for SystemVerilog sources 2021-04-05 10:37:17 -04:00
Romain Dolbeau
3addd587b6 640x480@60Hz (lowest bandwidth option yet) 2021-04-04 17:20:53 +02:00
Florent Kermarrec
080ecad522 cpu/vexriscv_smp: Add specialization of the RAM implementation based on the FPGA family (Platform).
RAMXilinx was not infered correctly on Intel/Altera devices, we now have an Intel/Altera specific
implementation and could add other specific implementations in the future if required.
2021-03-30 11:10:05 +02:00
Florent Kermarrec
70d11974fc cores/video/framebuffer: Add support for video clock faster than sys_clk with DRAM's data-width > 32.
In this, CDC has to be done first and Data-width conversion is then done in Video clock domain.
2021-03-30 10:14:10 +02:00
Florent Kermarrec
c182f4db5f cores/video: Add check of Video Timings and list available ones when not supported. 2021-03-30 09:15:17 +02:00
Florent Kermarrec
2ed5f14e9e integration/soc/soc_core: Remove --min-l2-data-width and --max-sdram-size that don't need to be configurable but can just be enforced in the target file. 2021-03-29 11:26:29 +02:00
Florent Kermarrec
ac7857fa4f cores/video/add_video_framebuffer: Add workaround when SDRAM data_width < 32. 2021-03-29 11:25:34 +02:00
Florent Kermarrec
4a29e2403c integration/soc/add_sdram: Directly use main_ram mem_map mapping if available. 2021-03-29 11:22:31 +02:00
Florent Kermarrec
99a26fc710 integration/soc/add_video_framebuffer: Modify default framebuffer base address. 2021-03-29 10:59:32 +02:00
Florent Kermarrec
bf999cfeac cores/Video: Expose fifo_depth and add underflow signal that can be used investigate bandwidth issues. 2021-03-29 10:58:31 +02:00
enjoy-digital
544c0e2c84
Merge pull request #867 from geertu/json2dts-fixes2
Json2dts fixes2
2021-03-28 18:54:26 +02:00
Geert Uytterhoeven
24ad265a3b tools/litex_json2dts: Fix i2c node
i2c@f0000800: '#address-cells' is a required property
    From schema: Documentation/devicetree/bindings/i2c/litex,i2c.yaml
    i2c@f0000800: '#size-cells' is a required property
    From schema: Documentation/devicetree/bindings/i2c/litex,i2c.yaml

Fix this by adding the missing properties.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-03-28 12:44:45 +02:00
Geert Uytterhoeven
e09b2bd1c5 tools/litex_json2dts: Fix gpio node
gpio@f0003000: 'gpio-controller' is a required property
    From schema: Documentation/devicetree/bindings/gpio/litex,gpio.yaml
    gpio@f0003000: '#gpio-cells' is a required property
    From schema: Documentation/devicetree/bindings/gpio/litex,gpio.yaml

Fix this by adding the missing properties.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-03-28 12:44:45 +02:00
Shawn Hoffman
fc75e57d9a lattice: use pnmainc on windows 2021-03-27 04:36:02 -07:00
Shawn Hoffman
e56268d419 don't require compiler_rt if not used 2021-03-27 04:18:17 -07:00
Florent Kermarrec
b858dd62e9 liblitesdcard/sdcard: Remove divider workaround (was due to LiteSDCard backpressure issue). 2021-03-26 23:19:08 +01:00
Florent Kermarrec
37704195af tools/litex_json2dts: Revert previous mac0 formating (thanks geertu). 2021-03-26 23:17:55 +01:00
Florent Kermarrec
9d62cbf56e integration/soc/SoCCSRHandler: Only keep Auto-Allocation mode. 2021-03-26 23:11:39 +01:00
Florent Kermarrec
24ee6de5c2 cores/video: Make de pin optional on VideoDVIPHY. 2021-03-26 22:53:59 +01:00
Geert Uytterhoeven
a7a70fa2f0 tools/litex_json2dts: Fix mmc node
mmc@f0006800:reg:0: [4026558464, 256, 4026560512, 256, 4026562560, 256, 4026564608, 256] is too long
    From schema: dt-schema/dtschema/schemas/simple-bus.yaml
    mmc@f0006800:reg:0: [4026558464, 256, 4026560512, 256, 4026562560, 256, 4026564608, 256] is too long
    From schema: dt-schema/dtschema/schemas/reg.yaml

Fix this by grouping the tuples in the "reg" property using angle
brackets.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-03-26 17:19:01 +01:00
Geert Uytterhoeven
54d2578f04 tools/litex_json2dts: Fix liteuart node
serial@f0001000: 'device_type' does not match any of the regexes: 'pinctrl-[0-9]+'
    From schema: Documentation/devicetree/bindings/serial/litex,liteuart.yaml

Fix this by dropping the offending property.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-03-26 17:19:01 +01:00
Geert Uytterhoeven
bcef9a68ca tools/litex_json2dts: Fix plic node
interrupt-controller@f0c00000: compatible:0: 'sifive,plic-1.0.0' is not one of ['sifive,fu540-c000-plic', 'canaan,k210-plic']
    From schema: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
    interrupt-controller@f0c00000: compatible:1: 'sifive,plic-1.0.0' was expected
    From schema: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
    interrupt-controller@f0c00000: '#address-cells' is a required property
    From schema: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml

Fix this by correcting the order of the compatible values, and adding
the missing #address-cells property.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-03-26 17:19:01 +01:00
Geert Uytterhoeven
610bfe4d0c tools/litex_json2dts: Fix DTS indentation
- Replace bogus TAB by spaces,
  - Drop spaces from empty lines.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-03-26 17:19:01 +01:00
Florent Kermarrec
6b482bce54 tools/litex_json2dts/framebuffer: Switch to new simplified Video Framebuffer.
Timings are already pre-initialized, so software will only have to configure/modify
them to change the video resolution.
2021-03-26 16:25:06 +01:00
Florent Kermarrec
137274dfe0 integration/soc/add_video_framebuffer: Use mem_map for video base address (or defaults to 0x4800000) and pass constants to software. 2021-03-26 16:23:30 +01:00
Florent Kermarrec
ed1d29958a cores/video/VideoFrameBuffer: Fix colors ordering. 2021-03-26 16:22:12 +01:00
Florent Kermarrec
714903e65b cores/video/VideoTerminal: Write CSI interpreter color to term_mem (\e[92;1m\e[0m decoding working). 2021-03-26 11:15:27 +01:00
Florent Kermarrec
18f77ef378 cores/video/VideoTerminal: Also do a CLEAR-X after RST-X (Fix issue with lines displayed with previous contents). 2021-03-26 10:35:02 +01:00
Florent Kermarrec
438eec0268 integration/soc/add_sdcard: Re-Remove self.csr.add (was a false alarm, this also works with Linux-on-LiteX-Rocket). 2021-03-26 08:45:32 +01:00
Gabriel Somlo
c859c34844 json2dts.py: fix mac0 reg property style for consistency
Assuming "#[address|size]-cells = <1>", both of the following are
equivalent:

	reg = <start1 size1>, <start2 size2>, ..., <startN sizeN>;

	reg = <start1 size1 start2 size2 ... startN sizeN>;

The second form appears more widely used and popular, including in
the output of json2dts.py, with the exception of the mac0 node, which
uses the first form. This patch makes output generated for mac0
consistent with that for other DT nodes.
2021-03-25 15:50:12 -04:00
Florent Kermarrec
58701cc48c tools/litex_client: Use CSR base as base address on PCIe designs. 2021-03-25 18:25:37 +01:00
enjoy-digital
518aaeaacb
Merge pull request #863 from Dolu1990/master
cpu/vexriscv_smp add RVC support
2021-03-25 16:26:30 +01:00
Florent Kermarrec
4246f77a97 integration/soc/add_scard: Revert use of self.csr.add since to avoid breaking Linux driver that currently relies on implicit ordering (but probably shoudln't :)). 2021-03-25 14:54:34 +01:00
Dolu1990
e755a02b84 cpu/vexriscv_smp add RVC support 2021-03-25 14:17:19 +01:00
Florent Kermarrec
aad56a047a integration/soc: Use CSR automatic allocation. 2021-03-25 10:09:54 +01:00
Florent Kermarrec
aa9eb1f6a3 integration/soc: Add CSR automatic allocation and enable it by default.
Un-allocated CSRs were already automatically detected so when un-allocated we can just
simply allocate them automatically instead of raising an error. This also allows
simplifying user's code since self.csr.add/self.add_csr will no longer be required.
2021-03-25 09:49:59 +01:00
Florent Kermarrec
3def6ae985 integration/soc: Be sure all add_xy methods use check_if_exists, improve Video integration. 2021-03-25 09:29:33 +01:00
Florent Kermarrec
c9ac5424f4 integration/soc: Cosmetic cleanup pass. 2021-03-25 09:13:43 +01:00
Florent Kermarrec
6e23fb1d99 integration/soc: Move Identifier import to add_identifier. 2021-03-25 08:47:05 +01:00
Florent Kermarrec
e1b20a934a integation/soc: Move VideoXY imports to add_video_xy. 2021-03-25 08:45:55 +01:00
Florent Kermarrec
1b9eefbee4 integration/soc: Move Timer import to add_timer. 2021-03-25 08:43:52 +01:00
Florent Kermarrec
01fdca9149 integration/soc: Move SPIMaster import to add_spi_sdcard. 2021-03-25 08:42:23 +01:00
Florent Kermarrec
5229727c2b integration/soc: Move SpiFlash import to add_spi_flash. 2021-03-25 08:40:53 +01:00
Florent Kermarrec
c60938d7aa integration/soc/ethernet: Simplify timing constraints. 2021-03-25 08:36:37 +01:00
Florent Kermarrec
e27330b0d9 integration/soc: Replace self.add_csr with self.csr.add. 2021-03-25 08:23:39 +01:00
Florent Kermarrec
36bb069b8b interconnect/packet: Minor cleanup. 2021-03-24 18:04:20 +01:00
Florent Kermarrec
6c640b0693 compat/stream_sim: Remove TODO since will not be done. 2021-03-24 17:58:13 +01:00
Florent Kermarrec
9eb318e86a soc/interconnect/stream_sim: Move to compat to prevent since no longer really used or recommended on new designs. 2021-03-24 17:56:21 +01:00
Florent Kermarrec
bc8974dad1 litex_sim: Switch to soc_core_args/soc_core_argdict. 2021-03-24 17:26:48 +01:00
Florent Kermarrec
ee36138f75 compat: Fix (only triggers notice when used) and enable SoCSDRAM compat. 2021-03-24 17:21:26 +01:00
Florent Kermarrec
50ed5e262d integration/soc_core: Move L2/SDRAM arguments soc_core_args. 2021-03-24 17:21:22 +01:00
Florent Kermarrec
ad63f8edc8 compat: Add Retro-Compat for litex.soc.cores.up5kspram (that has now moved to litex.soc.cores.ram). 2021-03-24 17:21:18 +01:00
Florent Kermarrec
f7f277548e Compat: Add litex.compat to handle retro-compatibility on API changes and move integration/soc_sdram to it.
Compat Notice is not yet enabled for soc_sdram since targets first need to be updated.
2021-03-24 17:21:13 +01:00
enjoy-digital
cc02055b42
Merge pull request #859 from Dolu1990/master
soc/cores/cpu/vexriscv_smp cpu per fpu ratio
2021-03-24 08:03:38 +01:00
Dolu1990
391a4429dc soc/cores/cpu/vexriscv_smp add cpu_per_fpu option to change the ratio core count and FPU 2021-03-23 20:05:28 +01:00
Jędrzej Boczar
bea82efc5d gtkwave: fix error when prefix is empty, make treeopen optional 2021-03-23 10:08:06 +01:00
Florent Kermarrec
9113c1a2f9 cores/gpio/GPIOIRQ: Add mode CSR (Edge or Change) and rename polarity CSR to edge.
Allow interrupts on Change, Rising Edge or Falling Edge.
2021-03-20 21:49:12 +01:00
enjoy-digital
c2f65b2b04
Merge pull request #850 from Dolu1990/master
cpu/vexriscv_smp add FPU support
2021-03-19 09:08:44 +01:00
enjoy-digital
db353526c1
Merge pull request #853 from mczerski/liteeth_slots
liteeth: allow to specify nrxslots and ntxslots for liteeth
2021-03-19 08:58:44 +01:00
Florent Kermarrec
d0c4199096 cores/gpio: Fix GPIOIRQ.
Compilation tested in Arty with:

from litex.soc.cores.gpio import GPIOIn
self.submodules.gpio_in = GPIOIn(platform.request("user_sw", 0), with_irq=True)
self.add_csr("gpio_in")
self.add_interrupt("gpio_in")
2021-03-18 19:05:12 +01:00
enjoy-digital
1bb4507d93
Merge pull request #846 from enjoy-digital/axi-lite-downconverter-fix
interconnect/axi: Fix AXILiteDownverterWrite/Read base address.
2021-03-18 18:15:52 +01:00
Florent Kermarrec
8460523f27 cores/video: Add VideoECP5HDMI PHY and move 10to1 Serializer to Generic, share it for Spartan6/ECP5. 2021-03-18 14:43:21 +01:00
Florent Kermarrec
e5695f9934 cores/video: Add VideoS6HDMIPHY (using stream.Gearbox for 10:2 convertion). 2021-03-18 13:49:50 +01:00
Florent Kermarrec
c01284fa23 integration/soc/add_video_colorbars: Review/Fix #849 (Fix ColorBarsPattern clock domain). 2021-03-18 13:48:53 +01:00
Florent Kermarrec
675349055b inteconnect/stream: Increase io_lcm size when io_lcm/i_dw or io_lcm/o_dw < 2.
Allow supporting all cases.
2021-03-18 13:47:10 +01:00
Marek Czerski
d7c0b4c111 dts: gpio: interrupt controller definition for switches
This commit adds support for enabling interupts in switches module.
Declaring switches as GPIOIn module with with_irq=True
will make dts generation add correct interrupt controller definition.
Also, if SWITCHES_NGPIO constant is defined it will be used to
specify correct number of gpios in dts.

example:
self.submodules.switches = GPIOIn(pads=switches_pads, with_irq=True)
self.add_csr("switches")
self.irq.add("switches", use_loc_if_exists=True)
self.add_constant("SWITCHES_NGPIO", len(switches_pads))
2021-03-18 09:52:07 +01:00
Marek Czerski
6eaa426e37 liteeth: allow to specify nrxslots and ntxslots for liteeth 2021-03-18 09:24:48 +01:00
Dolu1990
6b387eb579 cpu/vexriscv_smp add FPU support 2021-03-17 13:20:45 +01:00
enjoy-digital
a166a8dba3
Merge pull request #849 from hansfbaier/add-video-colorbars
video: convenience method to add color bar pattern
2021-03-16 12:51:27 +01:00
Florent Kermarrec
c071bb4ac7 software/liblitesdcard: Check sdcard_wait_data_done in sdcard_switch/sdcard_app_send_scr since requesting a data read transfer. 2021-03-16 12:44:00 +01:00
Hans Baier
f86c743c58 video: convenience method to add color bar pattern 2021-03-16 12:35:58 +07:00
Florent Kermarrec
04cb8e0e5e cores/xadc: Review/Cleanup PR#838, rename _XADC to SystemMonitorDRP and USSYSMON to USSystemMonitor. 2021-03-15 10:35:10 +01:00
enjoy-digital
367b510590
Merge pull request #838 from jersey99/ussysmon
Ussysmon: SYSMONE1 for US devices
2021-03-15 10:19:54 +01:00