litex.git
4 years agosoc/interconnect/packet: fix synthesis (synthesis tools can do all sort of optimizati...
Florent Kermarrec [Fri, 15 Nov 2019 15:19:05 +0000 (16:19 +0100)]
soc/interconnect/packet: fix synthesis (synthesis tools can do all sort of optimizations, but we still need to provide valid verilog :))

4 years agosoc/interconnect/packet: connect error/last_be only present on both sink and source
Florent Kermarrec [Fri, 15 Nov 2019 13:57:31 +0000 (14:57 +0100)]
soc/interconnect/packet: connect error/last_be only present on both sink and source

4 years agosoc/interconnect/packet: simplify/refactor Packetizer/Depacketizer to keep it simple
Florent Kermarrec [Fri, 15 Nov 2019 13:34:56 +0000 (14:34 +0100)]
soc/interconnect/packet: simplify/refactor Packetizer/Depacketizer to keep it simple

To avoid complex FSMs, let the synthesis tool do the simplifications when the FSM states are not reachable.

4 years agotest/test_packet: add 32/64/128-bit loopback tests (passing :))
Florent Kermarrec [Fri, 15 Nov 2019 10:36:52 +0000 (11:36 +0100)]
test/test_packet: add 32/64/128-bit loopback tests (passing :))

4 years agotest/test_packet: prepare for testing dw > 8-bit
Florent Kermarrec [Fri, 15 Nov 2019 10:32:42 +0000 (11:32 +0100)]
test/test_packet: prepare for testing dw > 8-bit

4 years agosoc/interconnect/packet: update copyright
Florent Kermarrec [Fri, 15 Nov 2019 10:25:38 +0000 (11:25 +0100)]
soc/interconnect/packet: update copyright

4 years agosoc/interconnect/packet: add > 8-bit support to Packetizer/Depacketizer
Vamsi K Vytla [Fri, 15 Nov 2019 10:22:49 +0000 (11:22 +0100)]
soc/interconnect/packet: add > 8-bit support to Packetizer/Depacketizer

With high speed link (10gbps XGMII ethernet for example), stream data_width is generally
> 8-bit which make header/data un-aligned on bytes boundaries. The change allows the
Packetizer/Depacketizer to work on stream with a data_width > 8-bit.

4 years agobuild/sim: cleanup run_as_root
Florent Kermarrec [Fri, 15 Nov 2019 09:57:31 +0000 (10:57 +0100)]
build/sim: cleanup run_as_root

4 years agobuild/sim/modules: add XGMII 10Gbps ethernet module
Vamsi K Vytla [Fri, 15 Nov 2019 09:47:13 +0000 (10:47 +0100)]
build/sim/modules: add XGMII 10Gbps ethernet module

Used to simulate SoCs with XGMII 10Gbps ethernet and to do LiteEth verification

4 years agosim/ethernet: remove trailing whitespaces
Florent Kermarrec [Fri, 15 Nov 2019 09:39:49 +0000 (10:39 +0100)]
sim/ethernet: remove trailing whitespaces

4 years agotest: add initial test_packet
Florent Kermarrec [Fri, 15 Nov 2019 09:29:39 +0000 (10:29 +0100)]
test: add initial test_packet

Use a header with 8,16,32,64,128-bit fields and test a Packetizer/Depacketizer loopback with random field values, random packet data & length.

4 years agotools/litex_sim: cleanup/update (no functional change)
Florent Kermarrec [Thu, 14 Nov 2019 10:19:07 +0000 (11:19 +0100)]
tools/litex_sim: cleanup/update (no functional change)

4 years agotools/litex_term: remove automatic reboot when flashing and clear mem_regions to...
Florent Kermarrec [Mon, 11 Nov 2019 17:38:10 +0000 (18:38 +0100)]
tools/litex_term: remove automatic reboot when flashing and clear mem_regions to avoid re-flashing on next reboot(s)

4 years agobios/flash: minor cleanup on serialboot flashing, add flash address support
Florent Kermarrec [Fri, 8 Nov 2019 23:00:55 +0000 (00:00 +0100)]
bios/flash: minor cleanup on serialboot flashing, add flash address support

4 years agoMerge pull request #305 from FrankBuss/master
enjoy-digital [Fri, 8 Nov 2019 22:51:49 +0000 (23:51 +0100)]
Merge pull request #305 from FrankBuss/master

adding support to flash an FBI image

4 years agosoc_core: add integrated-rom-file parameter to allow initializing rom from command...
Florent Kermarrec [Fri, 8 Nov 2019 22:27:58 +0000 (23:27 +0100)]
soc_core: add integrated-rom-file parameter to allow initializing rom from command line

4 years agocores/code_8b10b/Decoder: add basic invalid symbols detection
Florent Kermarrec [Fri, 8 Nov 2019 18:43:01 +0000 (19:43 +0100)]
cores/code_8b10b/Decoder: add basic invalid symbols detection

Check that we have 4,5 or 6 ones in the symbol. This does not report all
invalid symbols but still allow detecting issues with the link.

4 years agoadding support to flash an FBI image
fb@frank-buss.de [Fri, 8 Nov 2019 16:16:28 +0000 (17:16 +0100)]
adding support to flash an FBI image

4 years agosoftware/bios: rename ef command to fe (for consistency)
Florent Kermarrec [Fri, 8 Nov 2019 12:14:21 +0000 (13:14 +0100)]
software/bios: rename ef command to fe (for consistency)

4 years agosoftware/libbase/spiflash: rename CHIP_ERASE_CMD to CE_CMD (for consistency)
Florent Kermarrec [Fri, 8 Nov 2019 12:13:54 +0000 (13:13 +0100)]
software/libbase/spiflash: rename CHIP_ERASE_CMD to CE_CMD (for consistency)

4 years agoMerge pull request #302 from FrankBuss/master
enjoy-digital [Fri, 8 Nov 2019 12:04:33 +0000 (13:04 +0100)]
Merge pull request #302 from FrankBuss/master

erase flash command added

4 years agosoc_core: remove add_cpu method (when no real CPU but only wishbone masters, self...
Florent Kermarrec [Fri, 8 Nov 2019 11:55:29 +0000 (12:55 +0100)]
soc_core: remove add_cpu method (when no real CPU but only wishbone masters, self.cpu is declared as CPUNone)

4 years agoerase flash command added
fb@frank-buss.de [Thu, 7 Nov 2019 18:19:54 +0000 (19:19 +0100)]
erase flash command added

4 years agointegration/export: do not include soc.h in csr.h when with_access_functions=False
Florent Kermarrec [Thu, 7 Nov 2019 08:02:31 +0000 (09:02 +0100)]
integration/export: do not include soc.h in csr.h when with_access_functions=False

Idealy we should have another parameter for that.

4 years agosoc_sdram/kcu105: add optional main_ram_size_limit and use it on KCU105 to limit...
Florent Kermarrec [Thu, 7 Nov 2019 08:00:54 +0000 (09:00 +0100)]
soc_sdram/kcu105: add optional main_ram_size_limit and use it on KCU105 to limit to 1GB instead of 2GB.

CSR map will need to be updated to support the 2GB.

4 years agosoc_sdram: remove use_full_memory_we parameter (always used as True)
Florent Kermarrec [Thu, 7 Nov 2019 07:56:52 +0000 (08:56 +0100)]
soc_sdram: remove use_full_memory_we parameter (always used as True)

4 years agosoc_sdram: update copyrights
Florent Kermarrec [Thu, 7 Nov 2019 07:44:34 +0000 (08:44 +0100)]
soc_sdram: update copyrights

4 years agoMerge pull request #300 from gsomlo/gls-rocket-axi
enjoy-digital [Thu, 7 Nov 2019 07:40:30 +0000 (08:40 +0100)]
Merge pull request #300 from gsomlo/gls-rocket-axi

RFC: Direct link between Rocket/mem_axi <--> LiteDRAM dataport

4 years agocpu/rocket: parameterize axi interface data width
Gabriel Somlo [Fri, 1 Nov 2019 12:45:23 +0000 (08:45 -0400)]
cpu/rocket: parameterize axi interface data width

Rocket variants can be configured with axi port data widths that
are multiples of the native word size (64 bits in our case). In
the future, we will add variants with mem_axi data width > 64 bit,
to match the native data width of the LiteDRAM controller on
various development boards (e.g., 128 bits on the ecp5versa, and
256 bits on the trellisboard).

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agosoc_sdram: remove upper limit on usable main RAM
Gabriel Somlo [Thu, 31 Oct 2019 20:23:36 +0000 (16:23 -0400)]
soc_sdram: remove upper limit on usable main RAM

Revert commit #68a503174.

4 years agocpu/rocket, soc_sdram: Connect mem_axi to LiteDRAM, bypass WB bus
Gabriel Somlo [Wed, 30 Oct 2019 14:37:17 +0000 (10:37 -0400)]
cpu/rocket, soc_sdram: Connect mem_axi to LiteDRAM, bypass WB bus

Connect Rocket's dedicated port for cached RAM accesses (mem_axi)
directly to the LiteDRAM data port, bypassing the shared LiteX
(Wishbone) bus.

When both Rocket's mem_axi and LiteDRAM's port have the same data
width, use a native point-to-point AXI connection.

Otherwise, convert both ends to Wishbone, and use the Wishbone
data width converter to bridge the gap.
FIXME: In the future, this part should be replaced with a native
AXI data width converter!

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agointerconnect/csr_bus/SRAM: add mem_size check
Florent Kermarrec [Fri, 1 Nov 2019 10:33:43 +0000 (11:33 +0100)]
interconnect/csr_bus/SRAM: add mem_size check

Memory size is limited to 512 bytes:
- CSR region size is 0x800 (4096)
- default csr_data_width is 8
maximum size = 4096/8 = 512 bytes.

4 years agosoc_core/soc_core_args: specify default cpu (vexriscv)
Florent Kermarrec [Fri, 1 Nov 2019 10:30:50 +0000 (11:30 +0100)]
soc_core/soc_core_args: specify default cpu (vexriscv)

4 years agolattice/diamond/tcl: always use / separators, even on windows
Florent Kermarrec [Fri, 1 Nov 2019 09:11:12 +0000 (10:11 +0100)]
lattice/diamond/tcl: always use / separators, even on windows

4 years agocpu/minerva: elaborate minerva verilog to build directory
Florent Kermarrec [Fri, 1 Nov 2019 08:25:02 +0000 (09:25 +0100)]
cpu/minerva: elaborate minerva verilog to build directory

4 years agosoc/integration/builder: pass output_dir to platform, make sure gateware/software...
Florent Kermarrec [Fri, 1 Nov 2019 08:23:42 +0000 (09:23 +0100)]
soc/integration/builder: pass output_dir to platform, make sure gateware/software directory are created before finalizing

4 years agocpu/minerva: generate minerva.v near core.py not in submodule
Florent Kermarrec [Thu, 31 Oct 2019 20:15:12 +0000 (21:15 +0100)]
cpu/minerva: generate minerva.v near core.py not in submodule

4 years agocpu/minverva: give more explicit error message when not able to elaborate cpu
Florent Kermarrec [Thu, 31 Oct 2019 07:52:04 +0000 (08:52 +0100)]
cpu/minverva: give more explicit error message when not able to elaborate cpu

4 years agoMerge pull request #297 from mithro/mem-region-pp
Tim Ansell [Thu, 31 Oct 2019 03:49:27 +0000 (20:49 -0700)]
Merge pull request #297 from mithro/mem-region-pp

Improve the error message on memory region conflict.

4 years agoImprove the error message on memory region conflict.
Tim 'mithro' Ansell [Thu, 31 Oct 2019 02:32:20 +0000 (19:32 -0700)]
Improve the error message on memory region conflict.

Before;
```
ValueError: Memory region conflict between rom and main_ram
```

After;
```
ValueError: Memory region conflict between rom (<SoCMemRegion 0x10000000 0x10000 cached>) and main_ram (<SoCMemRegion 0x0 0x20000000 cached>)
```

Fixes #296.

4 years agoMerge pull request #293 from mithro/mor1kx-fix
Tim Ansell [Wed, 30 Oct 2019 21:28:48 +0000 (14:28 -0700)]
Merge pull request #293 from mithro/mor1kx-fix

Fix file names for the mor1kx processor.

4 years agoFix file names for the mor1kx processor.
Tim 'mithro' Ansell [Wed, 30 Oct 2019 20:49:24 +0000 (13:49 -0700)]
Fix file names for the mor1kx processor.

Fixes #292.

4 years agotargets: use type="io" instead of io_region=True
Florent Kermarrec [Wed, 30 Oct 2019 15:33:40 +0000 (16:33 +0100)]
targets: use type="io" instead of io_region=True

4 years agointegration/SoCMemRegion: use type instead of io_region/linker_region and export...
Florent Kermarrec [Wed, 30 Oct 2019 15:31:27 +0000 (16:31 +0100)]
integration/SoCMemRegion: use type instead of io_region/linker_region and export type to csv/json

Supported types: "cached", "io", "cached+linker", "io+linker", default="cached"

4 years agosoc_core: add check_regions_overlap method, add linker_region support (overlap is...
Florent Kermarrec [Mon, 28 Oct 2019 17:32:28 +0000 (18:32 +0100)]
soc_core: add check_regions_overlap method, add linker_region support (overlap is not checked on linker_regions)

4 years agosoc_core/add_memory_region: fix memory overlap detection
Florent Kermarrec [Mon, 28 Oct 2019 16:07:37 +0000 (17:07 +0100)]
soc_core/add_memory_region: fix memory overlap detection

4 years agotest/test_targets: skip Minerva test on Travis-CI, remove commented tests
Florent Kermarrec [Mon, 28 Oct 2019 09:59:43 +0000 (10:59 +0100)]
test/test_targets: skip Minerva test on Travis-CI, remove commented tests

4 years agocpu/minerva: elaborate from nmigen sources during build, enable hardware multiplier
Florent Kermarrec [Mon, 28 Oct 2019 09:22:17 +0000 (10:22 +0100)]
cpu/minerva: elaborate from nmigen sources during build, enable hardware multiplier

4 years agoMerge pull request #286 from gsomlo/gls-timingstrict
enjoy-digital [Fri, 25 Oct 2019 10:28:29 +0000 (12:28 +0200)]
Merge pull request #286 from gsomlo/gls-timingstrict

build/lattice/trellis: optionally allow failure if p&r timing not met

4 years agobuild/lattice/trellis: optionally allow failure if p&r timing not met
Gabriel Somlo [Thu, 24 Oct 2019 17:56:20 +0000 (13:56 -0400)]
build/lattice/trellis: optionally allow failure if p&r timing not met

When timing requirements are strict, allow the build process to fail upon
failure to meet timing. This facilitates running the build process from a
loop, repeatedly, until a "lucky" p&r solution is found, e.g.:

  while true; do
    litex/boards/targets/versa_ecp5.py --gateware-toolchain trellis \
      --sys-clk-freq=60e06 --cpu-type rocket --cpu-variant linux \
      --with-ethernet --yosys-nowidelut \
      --nextpnr-timingstrict
    if [ "$?" == "0" ]; then
      echo "Success" | mail -s "Build Succeeded" your@email.here
      break
    fi
  done

This augments commit #683e0668, which unconditionally forced p&r to
succeed, regardless of whether timing was met, via '--timing-allow-fail'.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agoMerge pull request #283 from kbeckmann/kbeckmann/bios_increment_address
enjoy-digital [Sun, 20 Oct 2019 13:30:22 +0000 (15:30 +0200)]
Merge pull request #283 from kbeckmann/kbeckmann/bios_increment_address

bios: Increment address when writing to flash

4 years agobios: Increment address when writing to flash
Konrad Beckmann [Sat, 19 Oct 2019 20:58:24 +0000 (22:58 +0200)]
bios: Increment address when writing to flash

4 years agobuild/lattice/trellis: use --timing-allow-fail to allow generating bistream when...
Florent Kermarrec [Fri, 18 Oct 2019 12:12:01 +0000 (14:12 +0200)]
build/lattice/trellis: use --timing-allow-fail to allow generating bistream when timings are not met

This is the default behaviour of the others tools and allow testing designs on hardware with small violations.

4 years agosoc/cores/icap/ICAPBitstream: always keep fifo.source.ready to 1
Florent Kermarrec [Fri, 18 Oct 2019 08:26:47 +0000 (10:26 +0200)]
soc/cores/icap/ICAPBitstream: always keep fifo.source.ready to 1

4 years agoMerge pull request #282 from antmicro/icapbitstream_fixes
enjoy-digital [Fri, 18 Oct 2019 08:24:20 +0000 (10:24 +0200)]
Merge pull request #282 from antmicro/icapbitstream_fixes

Fix ICAPBitstream

4 years agocores/icap/ICAPBitstream: add source ready signal.
Jan Kowalewski [Fri, 18 Oct 2019 07:33:31 +0000 (09:33 +0200)]
cores/icap/ICAPBitstream: add source ready signal.

4 years agosoc/integration/__init__: remove imports (not used and causing issues
Florent Kermarrec [Thu, 17 Oct 2019 10:44:16 +0000 (12:44 +0200)]
soc/integration/__init__: remove imports (not used and causing issues

4 years agobuild: always use platform.add_source and avoid manipulate platform.sources directly
Florent Kermarrec [Thu, 17 Oct 2019 10:13:06 +0000 (12:13 +0200)]
build: always use platform.add_source and avoid manipulate platform.sources directly

4 years agobuild/generic_platform: replace set with list for sources/verilog_include_paths
Florent Kermarrec [Thu, 17 Oct 2019 07:52:31 +0000 (09:52 +0200)]
build/generic_platform: replace set with list for sources/verilog_include_paths

Python does not have native OrderedSet and we need to be able to preserve the order of the sources
for some backends (Verilator for instance), so use list instead of set.

4 years agocores/icap/ICAPBitstream: simplify, add icap_clk_div parameter, describe how to use it.
Florent Kermarrec [Wed, 16 Oct 2019 12:56:17 +0000 (14:56 +0200)]
cores/icap/ICAPBitstream: simplify, add icap_clk_div parameter, describe how to use it.

4 years agobuild/generic_platform: keep language to None if None after tools.language_by_filename
Florent Kermarrec [Tue, 15 Oct 2019 10:13:42 +0000 (12:13 +0200)]
build/generic_platform: keep language to None if None after tools.language_by_filename

4 years agosoc_core: fix default --uart_name
Florent Kermarrec [Mon, 14 Oct 2019 20:15:02 +0000 (22:15 +0200)]
soc_core: fix default --uart_name

4 years agointegration/soc_core: expose more SoC parameters
Florent Kermarrec [Mon, 14 Oct 2019 07:12:25 +0000 (09:12 +0200)]
integration/soc_core: expose more SoC parameters

4 years agoMerge pull request #280 from kbeckmann/picorv32_typo
Tim Ansell [Sun, 13 Oct 2019 18:29:46 +0000 (11:29 -0700)]
Merge pull request #280 from kbeckmann/picorv32_typo

picorv32: Fix minimal variant params

4 years agopicorv32: Fix minimal variant params
Konrad Beckmann [Sun, 13 Oct 2019 10:56:55 +0000 (12:56 +0200)]
picorv32: Fix minimal variant params

The param p_ENABLE_COUNTERS was misspelled.

4 years agosoc_core: fix soc_core_argdict
Florent Kermarrec [Sat, 12 Oct 2019 21:05:53 +0000 (23:05 +0200)]
soc_core: fix soc_core_argdict

4 years agocpu/lm32: add missing buses
Florent Kermarrec [Sat, 12 Oct 2019 17:20:50 +0000 (19:20 +0200)]
cpu/lm32: add missing buses

4 years agosoc_core/soc_core_argdict: use inspect to get all parameters and simplify
Florent Kermarrec [Sat, 12 Oct 2019 17:18:57 +0000 (19:18 +0200)]
soc_core/soc_core_argdict: use inspect to get all parameters and simplify

4 years agointegration: simplify cpu buses auto-conversion (always use Converter, thanks gsomlo)
Florent Kermarrec [Fri, 11 Oct 2019 19:55:26 +0000 (21:55 +0200)]
integration: simplify cpu buses auto-conversion (always use Converter, thanks gsomlo)

4 years agointerconnect/wishbone: fix Converter case when buses are identical
Florent Kermarrec [Fri, 11 Oct 2019 19:49:11 +0000 (21:49 +0200)]
interconnect/wishbone: fix Converter case when buses are identical

4 years agoplatforms/versa_ecp5: add serdes refclk/sma
Florent Kermarrec [Fri, 11 Oct 2019 12:28:29 +0000 (14:28 +0200)]
platforms/versa_ecp5: add serdes refclk/sma

4 years agocpu/rocket: expose 64-bit buses (use automatic down-conversion of SoCCore)
Florent Kermarrec [Fri, 11 Oct 2019 07:01:50 +0000 (09:01 +0200)]
cpu/rocket: expose 64-bit buses (use automatic down-conversion of SoCCore)

4 years agosoc_core: add automatic down-conversion of CPU buses to 32-bit (if needed)
Florent Kermarrec [Fri, 11 Oct 2019 06:59:25 +0000 (08:59 +0200)]
soc_core: add automatic down-conversion of CPU buses to 32-bit (if needed)

4 years agosoc/interconnect/axi: re-align to improve readability
Florent Kermarrec [Fri, 11 Oct 2019 06:41:05 +0000 (08:41 +0200)]
soc/interconnect/axi: re-align to improve readability

4 years agosoftware/bios: simplify banners
Florent Kermarrec [Fri, 11 Oct 2019 06:38:12 +0000 (08:38 +0200)]
software/bios: simplify banners

4 years agocpu/picorv32: remove obsolete comment
Florent Kermarrec [Thu, 10 Oct 2019 20:29:54 +0000 (22:29 +0200)]
cpu/picorv32: remove obsolete comment

4 years agocpu/picorv32: use a single idbus
Florent Kermarrec [Thu, 10 Oct 2019 20:02:04 +0000 (22:02 +0200)]
cpu/picorv32: use a single idbus

4 years agocpu: cleanup/re-align
Florent Kermarrec [Thu, 10 Oct 2019 19:52:09 +0000 (21:52 +0200)]
cpu: cleanup/re-align

4 years agocpu/rocket: rename ibus/dbus to mem_wb/mmio_wb and add size suffix
Florent Kermarrec [Thu, 10 Oct 2019 19:40:29 +0000 (21:40 +0200)]
cpu/rocket: rename ibus/dbus to mem_wb/mmio_wb and add size suffix

4 years agocpu: add buses list and use it in soc_core to add bus masters
Florent Kermarrec [Thu, 10 Oct 2019 19:35:06 +0000 (21:35 +0200)]
cpu: add buses list and use it in soc_core to add bus masters

4 years agointegration: move soc constants to soc.h of csr.h
Florent Kermarrec [Thu, 10 Oct 2019 19:15:49 +0000 (21:15 +0200)]
integration: move soc constants to soc.h of csr.h

software retro-compat with soc.h included in csr.h

4 years agobuild/generic_platform: only add sources if language is not None
Florent Kermarrec [Thu, 10 Oct 2019 17:39:33 +0000 (19:39 +0200)]
build/generic_platform: only add sources if language is not None

4 years agoxilinx/vivado: replace "xy" == language with language == "xy"
Florent Kermarrec [Thu, 10 Oct 2019 17:36:17 +0000 (19:36 +0200)]
xilinx/vivado: replace "xy" == language with language == "xy"

4 years agoMerge pull request #277 from railnova/feature/vivado_sysverilog_support
enjoy-digital [Thu, 10 Oct 2019 17:31:09 +0000 (19:31 +0200)]
Merge pull request #277 from railnova/feature/vivado_sysverilog_support

[feature] Add SystemVerilog support for the Vivado builder

4 years agointegration/soc_zynq: shadow_base no longer recommended (replace with io_regions)
Florent Kermarrec [Thu, 10 Oct 2019 17:23:01 +0000 (19:23 +0200)]
integration/soc_zynq: shadow_base no longer recommended (replace with io_regions)

4 years agobios/main: use same banner than README (MiSoC cited in README/LICENSE)
Florent Kermarrec [Thu, 10 Oct 2019 17:21:32 +0000 (19:21 +0200)]
bios/main: use same banner than README (MiSoC cited in README/LICENSE)

4 years agosoftware/bios: don't show peripherals init banner if nothing to init, add Ethernet...
Florent Kermarrec [Thu, 10 Oct 2019 17:18:28 +0000 (19:18 +0200)]
software/bios: don't show peripherals init banner if nothing to init, add Ethernet init printf

4 years agoAdd system Verilog support for the Vivado builder
Martin Cornil [Thu, 10 Oct 2019 12:06:37 +0000 (14:06 +0200)]
Add system Verilog support for the Vivado builder

4 years agoMerge pull request #276 from gsomlo/gls-rocket-map
enjoy-digital [Wed, 9 Oct 2019 19:25:57 +0000 (21:25 +0200)]
Merge pull request #276 from gsomlo/gls-rocket-map

cpu/rocket: swap main_mem and io regions

4 years agocpu/rocket: swap main_mem and io regions
Gabriel Somlo [Wed, 9 Oct 2019 18:25:41 +0000 (14:25 -0400)]
cpu/rocket: swap main_mem and io regions

The total size of RAM (main_mem) can be expected to vary significantly,
and often exceed the size needed for MMIO allocations by a large margin.

As such, place Rocket's MMIO (io regions) below 0x8000_0000, and start
the RAM (main_mem) at 0x8000_0000, with nothing above it to limit its
future growth.

Also, bump the pre-built Rocket verilog submodule to an updated version,
which also comes with matching changes to the way MMIO and RAM accesses
are mapped and routed to their respective AXI interfaces.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
4 years agocpu: add default io_regions to CPUNone (all address range can be used as IO)
Florent Kermarrec [Wed, 9 Oct 2019 10:05:10 +0000 (12:05 +0200)]
cpu: add default io_regions to CPUNone (all address range can be used as IO)

4 years agoMerge pull request #275 from pcotret/patch-1
enjoy-digital [Wed, 9 Oct 2019 09:20:50 +0000 (11:20 +0200)]
Merge pull request #275 from pcotret/patch-1

Update README (related to issue #273)

4 years agosoc_core: improve check_io_region error message
Florent Kermarrec [Wed, 9 Oct 2019 08:47:19 +0000 (10:47 +0200)]
soc_core: improve check_io_region error message

4 years agotargets/sim: switch from shadow_base to io_regions
Florent Kermarrec [Wed, 9 Oct 2019 08:38:22 +0000 (10:38 +0200)]
targets/sim: switch from shadow_base to io_regions

4 years agocpu/rocket: move csr to IO region
Florent Kermarrec [Wed, 9 Oct 2019 08:24:01 +0000 (10:24 +0200)]
cpu/rocket: move csr to IO region

4 years agobuild/xilinx/vivado: fix default synth-mode
Florent Kermarrec [Wed, 9 Oct 2019 08:19:18 +0000 (10:19 +0200)]
build/xilinx/vivado: fix default synth-mode

4 years agosoc_core/cpu: add io_regions and deprecate shadow_base (with API retro-compat)
Florent Kermarrec [Wed, 9 Oct 2019 08:14:14 +0000 (10:14 +0200)]
soc_core/cpu: add io_regions and deprecate shadow_base (with API retro-compat)

The shadow_base parameter has always been difficult to apprehend, replace it with
io_regions (uncached regions) defined user or the CPU.

The equivalent of a shadow_base parameter of 0x80000000 in the old API is:
io_regions = {0x80000000: 0x80000000} # origin, length

It's still possible to use shadow_base with retro-compat, but user is encouraged
to update and features will be removed in the future.

4 years agoUpdate README (related to issue #273)
Pascal Cotret [Wed, 9 Oct 2019 07:48:32 +0000 (09:48 +0200)]
Update README (related to issue #273)

Following my problems with the quick start guide (issue #273), I suggest a few modifications to have a "real" quick start guide.

4 years agoMerge pull request #274 from gsomlo/gls-shadow-base
enjoy-digital [Tue, 8 Oct 2019 19:15:54 +0000 (21:15 +0200)]
Merge pull request #274 from gsomlo/gls-shadow-base

builder: use the SoC's existing shadow base with get_csr_header()

4 years agobuilder: use the SoC's existing shadow base with get_csr_header()
Gabriel Somlo [Tue, 8 Oct 2019 18:28:50 +0000 (14:28 -0400)]
builder: use the SoC's existing shadow base with get_csr_header()

Both the SoC and get_csr_header() have independently set defaults
for the value of 'shadow_base'. If the SoC's value was modified,
ensure that get_csr_header() uses the modified value instead of
its own default.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>