Commit Graph

5538 Commits

Author SHA1 Message Date
Dave Marples d2d82dacf2 Bios linker edits to prevent inappropriate optimisation 2020-05-12 23:32:49 +01:00
Florent Kermarrec 3fb99b7d33 cores/spi_flash: add back old SpiFlashDualQuad and rename new one as SpiFlashQuadReadWrite. 2020-05-12 16:51:47 +02:00
enjoy-digital 2a5a7536b8
Merge pull request #478 from antmicro/extended_spi_flash
Extended SPI flash support
2020-05-12 16:42:01 +02:00
enjoy-digital 7d79da8eda
Merge pull request #510 from mubes/colorlight_usb
Colorlight usb
2020-05-12 16:35:29 +02:00
Florent Kermarrec 3a6dd95d6f integration/soc: review/simplify changes for standalone cores.
- do the CSR alignment update only if CPU is not CPUNone.
- revert PointToPoint interconnect when 1 master and 1 slave since this will
break others use cases and will prevent mapping slave to a specific location.
It's probably better to let the synthesis tools optimize the 1:1 mapping directly.
- add with_soc_interconnect parameter to add_sdram that defaults to True. When
set to False, only the LiteDRAMCore will be instantiated and interconnect with
the SoC will not be added.
2020-05-12 16:18:26 +02:00
Dave Marples 8499733289 Fix dumb missing line 2020-05-12 14:40:11 +01:00
enjoy-digital 0d5eb13359
Merge pull request #511 from ozbenh/standalone-cores
Improve standalone cores
2020-05-12 14:55:44 +02:00
Florent Kermarrec 873d95e517 interconnect/wishbonebridge: refresh/simplify.
This should also improve Wishbone timings.

Tested on iCEBreaker:
./icebreaker.py --cpu-type=None --uart-name=uartbone --csr-csv=csr.csv --build --flash

With the following script:

#!/usr/bin/env python3

import sys

from litex import RemoteClient

wb = RemoteClient()
wb.open()

# # #

print("scratch: 0x{:08x}".format(wb.regs.ctrl_scratch.read()))

errors = 0
for i in range(2):
for j in range(32):
wb.write(wb.mems.sram.base + 4*j, i + j)
for j in range(32):
if wb.read(wb.mems.sram.base + 4*j) != (i + j):
errors += 1
print("sram errors: {:d}".format(errors))

# # #

wb.close()
2020-05-12 13:40:28 +02:00
Benjamin Herrenschmidt f628ff6b47 WB2CSR: Use CSR address_width for the wishbone bus
Currently, we create a wishbone interface with the default address
width (30 bits) for the bridge. Instead, create an interface that
has the same number of address bits as the CSR bus.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:37:36 +10:00
Benjamin Herrenschmidt 520c17e96d soc_core: Add option to override CSR base
When creating standalone IP cores such as standalone LiteDRAM without
a CPU, the CSR are presented externally via a wishbone with just enough
address bits to access individual CSRs (14), and no address decoding
otherwise. It is expected that the design using such core will have
its own address decoder gating cyc/stb.

However, such a design might still need to use LiteX code such as
the sdram init code, which relies on the generated csr.h. Thus we
want to be able to control the CSR base address used by that generated
csr.h.

This could be handled instead by having the "host" code provide
modified csr_{read,write}_simple() that include the necessary base
address. However, such an approach would make things complicated
if the design includes multiple such standalone cores with separate
CSR busses (such as LiteDRAM and LiteEth).


Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:35:12 +10:00
Benjamin Herrenschmidt ecbd40284a soc: Don't update CSR alignment when there is no CPU
The alignment specified by the standalone core config should
be honored.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:31:23 +10:00
Benjamin Herrenschmidt f28f247130 soc: Don't create a wishbone slave to LiteDRAM with no CPU
When creating a standalone LiteDRAM core with no CPU, there is
no need to create a wishbone slave to LiteDRAM interface.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:30:19 +10:00
Dave Marples 33e202edd4 Bring into line with master 2020-05-12 12:28:09 +01:00
Benjamin Herrenschmidt dcc881db92 soc: Don't create a share intercon with only one master and one slave
This creates a lot of useless churn in the resulting verilog. Instead
use a point to point interconnect in that case.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 20:58:19 +10:00
enjoy-digital c136113a9b
Merge pull request #506 from scanakci/blackparrot_litex
Update README and core.py for Blackparrot and change vivado command for systemverilog
2020-05-12 11:41:25 +02:00
enjoy-digital d2c9d38567
Merge pull request #508 from antmicro/update_litesdcard
Update Litex bios to handle updated litesdcard.
2020-05-12 11:38:09 +02:00
Dave Marples dc1d452008 Addition of boot address parameter for trellis builds 2020-05-12 09:41:37 +01:00
Kamil Rakoczy 0db3506997 Update Litex bios to handle updated litesdcard. 2020-05-12 10:07:16 +02:00
sadullah aed1d514ab Update README.md and core.py for BlackParrot 2020-05-12 03:06:38 -04:00
sadullah 5e4a436089 Vivado Command Update for Systemverilog
Add BlackParrot to LiteX setup file
2020-05-12 03:05:41 -04:00
enjoy-digital 3ce9010083
Merge pull request #505 from DurandA/patch-3
Enable 1x mode on SPI flash
2020-05-11 22:53:31 +02:00
Florent Kermarrec e2176cefc2 soc: remove with_wishbone (a SoC always always has a Bus) and expose more bus parameters. 2020-05-11 22:39:17 +02:00
Arnaud Durand 2c40967b5a Enable 1x mode on SPI flash 2020-05-11 22:12:40 +02:00
Florent Kermarrec 1e610600f6 build/lattice/diamond/clock_constraints: review and improve similarities with the others build backends. 2020-05-11 10:52:39 +02:00
enjoy-digital ebcf67c10f
Merge pull request #502 from shuffle2/master
diamond: project generation improvements
2020-05-11 09:55:52 +02:00
enjoy-digital 80f5327e3d
Merge pull request #490 from daveshah1/rdimm_bside_init
Add RDIMM side-B inversion support
2020-05-11 09:42:55 +02:00
enjoy-digital 13db89ebd2
Merge branch 'master' into rdimm_bside_init 2020-05-11 09:42:35 +02:00
Florent Kermarrec c9e36d7fdd lattice/icestorm: add ignoreloops/seed support (similar to trellis) and icestorm_args. 2020-05-11 09:33:26 +02:00
Florent Kermarrec ea7fe383a3 lattice/trellis: simplify seed support and add it to trellis_args. 2020-05-11 09:26:12 +02:00
enjoy-digital 5ee01c9460
Merge pull request #484 from ilya-epifanov/lattice-trellis-toolchain-seed
Can now pass `--seed` to `nextpnr-ecp5` via `TrellisToolchain` `kwargs`
2020-05-11 09:13:26 +02:00
enjoy-digital 5987ddb454
Merge pull request #485 from ilya-epifanov/cpu-imac-config-for-vexriscv
Added `imac` config for CPUs …
2020-05-11 08:58:28 +02:00
enjoy-digital c5f74a5aa7
Merge branch 'master' into cpu-imac-config-for-vexriscv 2020-05-11 08:58:20 +02:00
Florent Kermarrec 59d88a880c integration/soc/add_adapter: rename is_master to direction. 2020-05-11 08:47:50 +02:00
enjoy-digital 57390666d8
Merge pull request #504 from sergachev/master
integration/soc: fix add_adapter for slaves
2020-05-11 08:34:03 +02:00
Ilia Sergachev e4fa4bbcf7 integration/soc: fix add_adapter for slaves 2020-05-10 11:32:34 +02:00
Benjamin Herrenschmidt 2d70220b80 bios: Fix warning on 64-bit
This fixes an incorrect printf format specifier

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-09 19:44:43 +02:00
Shawn Hoffman eeee179dd8 diamond: close project when done
Avoids ".recovery file is present" prompt.
2020-05-09 02:28:00 -07:00
Shawn Hoffman 9b782bd7da diamond: clock constraint improvements
Specify NET or PORT for freq constraints

Add equivalent timing closure check that diamond ui uses,
and default to asserting check has passed
2020-05-09 02:28:00 -07:00
Florent Kermarrec fbbbdf03b5 core/led: simplify LedChaser (to have the same user interface than GPIOOut). 2020-05-08 22:13:47 +02:00
Florent Kermarrec 05869beb72 cores/led: add LedChaser (now that LiteX is running on FPGA mining boards let's use fancy led blinks :)) 2020-05-08 13:18:12 +02:00
Florent Kermarrec 90c485fcc8 integration/soc: add clock_domain parameter to add_etherbone.
To allow using a sys_clk < 125MHz with a 1Gbps link.
2020-05-08 13:16:26 +02:00
Florent Kermarrec f1a50a2138 integration/soc: add add_uartbone method (to add a UARTBone aka UART Wishbone bridge). 2020-05-08 11:54:51 +02:00
Florent Kermarrec 79ee135f56 bios/sdram: fix lfsr typo. 2020-05-07 12:11:59 +02:00
enjoy-digital 162d32603d
Merge pull request #500 from mubes/fixups
Fixups
2020-05-07 11:55:58 +02:00
Florent Kermarrec d74f8fc93d build/xilinx: add disable_constraints parameter to Platform.add_ip.
When integrate .xci, we don't necessarily want to apply the default timing/loc
constrants generated by Vivado but our custom ones. Setting disable_constraints
to True allow disabling .xdc generated by the IP.
2020-05-07 11:34:26 +02:00
Dave Marples 2a37b97d9f Merge branch 'master' of https://github.com/enjoy-digital/litex into fixups 2020-05-07 09:36:41 +01:00
Dave Marples 967e38bb57 Small fixups to address compiler warnings etc. 2020-05-07 09:26:46 +01:00
Florent Kermarrec 84841e1d58 bios/sdram: fix merge typo in lfsr (thanks Benjamin Herrenschmidt). 2020-05-07 08:21:57 +02:00
Benjamin Herrenschmidt 99c5b0fca1 bios/sdram: Use an LFSR to speed up pseudo-random number generation
This speeds up the memory test by an order of magnitude, esp. on
cores without a hardware multiplier by getting rid of the
multiplication in the loop.

The LFSR implementation comes from microwatt's simple_random test
project.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-06 21:56:10 +02:00
enjoy-digital 34f268689a
Merge pull request #499 from DurandA/patch-2
Add data dirs to manifest
2020-05-06 18:54:23 +02:00