litex.git
5 years agocpu/vexriscv: add "linux+no-dsp" variant
Florent Kermarrec [Mon, 17 Jun 2019 07:54:17 +0000 (09:54 +0200)]
cpu/vexriscv: add "linux+no-dsp" variant

5 years agocpu/vexriscv: update
Florent Kermarrec [Mon, 17 Jun 2019 07:24:57 +0000 (09:24 +0200)]
cpu/vexriscv: update

5 years agotargets/ulx3s: use CAS latency of 3 to be compatible with production boards
Florent Kermarrec [Mon, 17 Jun 2019 07:20:21 +0000 (09:20 +0200)]
targets/ulx3s: use CAS latency of 3 to be compatible with production boards

5 years agoMerge pull request #199 from ambrop72/no-ethmac-fix
enjoy-digital [Thu, 13 Jun 2019 05:14:03 +0000 (07:14 +0200)]
Merge pull request #199 from ambrop72/no-ethmac-fix

bios: Fix build when ethphy is present but ethmac is not.

5 years agobios: Fix build when ethphy is present but ethmac is not.
Ambroz Bizjak [Wed, 12 Jun 2019 23:02:22 +0000 (01:02 +0200)]
bios: Fix build when ethphy is present but ethmac is not.

While testing my Ethernet DMA, I renamed the `ethmac` module to `ethmac_dma` so that it wouldn't be used from the BIOS, but I got an undefined reference to `eth_init` because `bios.c` checks different CSR defines than the code that defines `eth_init`.

5 years agotest/test_axi: remove litex.gen.sim import (was only useful for debug)
Florent Kermarrec [Wed, 12 Jun 2019 09:28:06 +0000 (11:28 +0200)]
test/test_axi: remove litex.gen.sim import (was only useful for debug)

5 years agosetup.py: add migen to install_requires
Florent Kermarrec [Wed, 12 Jun 2019 09:26:57 +0000 (11:26 +0200)]
setup.py: add migen to install_requires

5 years agoMerge pull request #198 from TomKeddie/tomk_20190610_artyspi
enjoy-digital [Tue, 11 Jun 2019 13:50:02 +0000 (15:50 +0200)]
Merge pull request #198 from TomKeddie/tomk_20190610_artyspi

boards/arty : Add directly connected spi clk pin

5 years agotest/test_code8b10b: add test_coding
Florent Kermarrec [Mon, 10 Jun 2019 16:53:30 +0000 (18:53 +0200)]
test/test_code8b10b: add test_coding

5 years agoboards/arty : Add directly connected spi clk pin to avoid need for STARTUPE2
Tom Keddie [Mon, 10 Jun 2019 15:33:02 +0000 (08:33 -0700)]
boards/arty : Add directly connected spi clk pin to avoid need for STARTUPE2

5 years agotest/test_prbs: add PRBSGenerator/Checker tests
Florent Kermarrec [Mon, 10 Jun 2019 14:05:53 +0000 (16:05 +0200)]
test/test_prbs: add PRBSGenerator/Checker tests

5 years agosoc/cores: add PRBS (Pseudo Random Binary Sequence) Generator/Checker
Florent Kermarrec [Mon, 10 Jun 2019 14:05:36 +0000 (16:05 +0200)]
soc/cores: add PRBS (Pseudo Random Binary Sequence) Generator/Checker

Imported from LiteICLink. PRBS can be useful for different purposes, so is
better integrated in LiteX.

5 years agotools/litex_term: exit on 2 consecutive CTRL-C
Florent Kermarrec [Mon, 10 Jun 2019 13:06:57 +0000 (15:06 +0200)]
tools/litex_term: exit on 2 consecutive CTRL-C

When running OS with LiteX and when LiteXTerm is use, we want to be able to
send CTRl-C to the OS. Ensure a specific sequence is sent to close the terminal.

5 years agocpu/vexriscv: update submodule
Florent Kermarrec [Mon, 10 Jun 2019 10:57:10 +0000 (12:57 +0200)]
cpu/vexriscv: update submodule

5 years agodoc: add litex-hub logo
Florent Kermarrec [Sun, 9 Jun 2019 17:36:09 +0000 (19:36 +0200)]
doc: add litex-hub logo

5 years agodoc: redesign new logo
Florent Kermarrec [Sat, 8 Jun 2019 22:36:46 +0000 (00:36 +0200)]
doc: redesign new logo

5 years agodoc: add new logo
Florent Kermarrec [Fri, 7 Jun 2019 22:45:30 +0000 (00:45 +0200)]
doc: add new logo

5 years agocpu/vexriscv: update submodule
Florent Kermarrec [Fri, 7 Jun 2019 16:36:46 +0000 (18:36 +0200)]
cpu/vexriscv: update submodule

5 years agobuild/sim: allow configuring verilator optimization level
Florent Kermarrec [Fri, 7 Jun 2019 10:28:20 +0000 (12:28 +0200)]
build/sim: allow configuring verilator optimization level

5 years agobuild/sim: allow defining start/end cycles for tracing
Florent Kermarrec [Fri, 7 Jun 2019 09:50:57 +0000 (11:50 +0200)]
build/sim: allow defining start/end cycles for tracing

5 years agobuild/sim: use -O0 for verilator compilation
Florent Kermarrec [Fri, 7 Jun 2019 09:16:39 +0000 (11:16 +0200)]
build/sim: use -O0 for verilator compilation

In most of the case, execution speed is already fast enough with -O0 and
with complex design -O0 is a lost faster to compile than -O3. In the future
we could add a switch to choose which optimization we want.

5 years agosoc/integration/soc_core: list rocket as supported CPU
Florent Kermarrec [Fri, 7 Jun 2019 09:14:36 +0000 (11:14 +0200)]
soc/integration/soc_core: list rocket as supported CPU

5 years agosoftware/bios: change prompt to "litex" in green.
Florent Kermarrec [Fri, 7 Jun 2019 09:10:04 +0000 (11:10 +0200)]
software/bios: change prompt to "litex" in green.

5 years agointegration/soc_core: improve readibility (add separators/comments)
Florent Kermarrec [Wed, 5 Jun 2019 21:43:16 +0000 (23:43 +0200)]
integration/soc_core: improve readibility (add separators/comments)

5 years agotest/test_targets: add de10lite
Florent Kermarrec [Wed, 5 Jun 2019 18:03:19 +0000 (20:03 +0200)]
test/test_targets: add de10lite

5 years agoMerge pull request #196 from msloniewski/de10lite_support
enjoy-digital [Wed, 5 Jun 2019 17:44:54 +0000 (19:44 +0200)]
Merge pull request #196 from msloniewski/de10lite_support

De10lite support

5 years agoMerge pull request #195 from antmicro/extend_generated_headers
enjoy-digital [Wed, 5 Jun 2019 17:20:15 +0000 (19:20 +0200)]
Merge pull request #195 from antmicro/extend_generated_headers

Extend generated headers & csv

5 years agoboards/targets: add target for de10lite platform
msloniewski [Wed, 5 Jun 2019 16:53:49 +0000 (18:53 +0200)]
boards/targets: add target for de10lite platform

5 years agoboards/platforms: add de10lite Terasic platform support
msloniewski [Wed, 5 Jun 2019 16:53:30 +0000 (18:53 +0200)]
boards/platforms: add de10lite Terasic platform support

5 years agobuild/altera: Add possibility to turn off generation of .rbf file
msloniewski [Wed, 5 Jun 2019 16:52:40 +0000 (18:52 +0200)]
build/altera: Add possibility to turn off generation of .rbf file

For some FPGAs (e.g. MAX10) .rbf file cannot be generated.
Add possibility to turn off that feature for those chips.

5 years agointegration/builder: generate flash_boot address to csv
Mateusz Holenko [Wed, 5 Jun 2019 15:27:27 +0000 (17:27 +0200)]
integration/builder: generate flash_boot address to csv

5 years agointegration/builder: generate shadow_base address to mem.h and csv
Mateusz Holenko [Wed, 5 Jun 2019 15:35:47 +0000 (17:35 +0200)]
integration/builder: generate shadow_base address to mem.h and csv

5 years agoMerge pull request #193 from gsomlo/gls-memcpy-fix
enjoy-digital [Tue, 4 Jun 2019 19:49:18 +0000 (21:49 +0200)]
Merge pull request #193 from gsomlo/gls-memcpy-fix

software/libbase: memcpy: simple, arch-width agnostic implementation

5 years agosoftware/libbase: memcpy: simple, arch-width agnostic implementation
Gabriel L. Somlo [Tue, 4 Jun 2019 18:42:54 +0000 (14:42 -0400)]
software/libbase: memcpy: simple, arch-width agnostic implementation

Remove optimizations targeted specifically at rv32 architecture,
allowing memcpy to work on all word sizes.

Since this is "only" the BIOS, it is also arguably better to
optimize for size rather than performance, given that control
will be quickly handed over to some other program being loaded.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
5 years agoMerge pull request #192 from sutajiokousagi/pr_c99_types
Tim Ansell [Sun, 2 Jun 2019 23:54:20 +0000 (16:54 -0700)]
Merge pull request #192 from sutajiokousagi/pr_c99_types

fix signed char type to be explicitly signed

5 years agofix signed char type to be explicitly signed
bunnie [Mon, 3 Jun 2019 06:00:27 +0000 (06:00 +0000)]
fix signed char type to be explicitly signed

5 years agoupdate stdint.h to include c99 types
bunnie [Sun, 2 Jun 2019 22:26:18 +0000 (22:26 +0000)]
update stdint.h to include c99 types

needed for some third party libraries to compile

5 years agoMerge pull request #191 from sergachev/master
Tim Ansell [Sun, 2 Jun 2019 20:00:20 +0000 (13:00 -0700)]
Merge pull request #191 from sergachev/master

Fix interrupt_name in soc_core/add_interrupt

5 years agofix csr_name in add_csr()
Ilia Sergachev [Sun, 2 Jun 2019 18:56:02 +0000 (20:56 +0200)]
fix csr_name in add_csr()

5 years agofix interrupt_name
Ilia Sergachev [Sun, 2 Jun 2019 18:48:08 +0000 (20:48 +0200)]
fix interrupt_name

5 years agotest/test_targets: add de2_115, de1soc
Florent Kermarrec [Sun, 2 Jun 2019 17:22:09 +0000 (19:22 +0200)]
test/test_targets: add de2_115, de1soc

5 years agoboards/platform/arty: add Arty A7-100 variant
Florent Kermarrec [Sun, 2 Jun 2019 17:10:44 +0000 (19:10 +0200)]
boards/platform/arty: add Arty A7-100 variant

5 years agoMerge pull request #189 from open-design/terasic-boards
enjoy-digital [Sun, 2 Jun 2019 16:40:57 +0000 (18:40 +0200)]
Merge pull request #189 from open-design/terasic-boards

Add support for Terasic DE2-115 and Terasic DE1-SoC boards

5 years agoMerge pull request #190 from sutajiokousagi/pr_c99_types
Tim Ansell [Sun, 2 Jun 2019 15:15:52 +0000 (08:15 -0700)]
Merge pull request #190 from sutajiokousagi/pr_c99_types

update stdint.h to include c99 types

5 years agoboards: add Terasic DE2-115 initial support
Antony Pavlov [Mon, 27 May 2019 08:17:51 +0000 (11:17 +0300)]
boards: add Terasic DE2-115 initial support

See https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=139&No=502&PartNo=1
for board details.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
5 years agoboards: add Terasic DE1-SoC Board support
Antony Pavlov [Wed, 29 May 2019 06:12:48 +0000 (09:12 +0300)]
boards: add Terasic DE1-SoC Board support

See https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=836
for board details.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
5 years agoMerge pull request #188 from gsomlo/gls-csr-cleanup
enjoy-digital [Thu, 30 May 2019 20:40:39 +0000 (22:40 +0200)]
Merge pull request #188 from gsomlo/gls-csr-cleanup

Miscellaneous cleanup patches

5 years agosoc/integration/cpu_interface: improve code legibility
Gabriel L. Somlo [Wed, 29 May 2019 14:07:43 +0000 (10:07 -0400)]
soc/integration/cpu_interface: improve code legibility

Factor out code appearing in both branches of an if/else.

5 years agosoc/interconnect/gearbox: add msb_first/lsb_first order
Florent Kermarrec [Wed, 29 May 2019 08:25:25 +0000 (10:25 +0200)]
soc/interconnect/gearbox: add msb_first/lsb_first order

5 years agoboards/targets/arty: generate 25MHz ethernet clock with S7PLL
Florent Kermarrec [Tue, 28 May 2019 07:55:06 +0000 (09:55 +0200)]
boards/targets/arty: generate 25MHz ethernet clock with S7PLL

Allow ethernet to work when sys_clk_freq != 100MHz

5 years agoMerge pull request #187 from open-design/indent
Tim Ansell [Sun, 26 May 2019 10:01:31 +0000 (03:01 -0700)]
Merge pull request #187 from open-design/indent

litex/boards/targets: don't use tab for indentation

5 years agolitex/boards/targets: don't use tab for indentation
Antony Pavlov [Sun, 26 May 2019 08:59:13 +0000 (11:59 +0300)]
litex/boards/targets: don't use tab for indentation

Fix pep8 E101 "indentation contains mixed spaces and tab" error.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
5 years agosoc/interconnect/axi: add round/robin arbitration between writes/reads
Florent Kermarrec [Sat, 25 May 2019 08:02:31 +0000 (10:02 +0200)]
soc/interconnect/axi: add round/robin arbitration between writes/reads

5 years agotravis: update RISC-V toolchain
Florent Kermarrec [Sat, 25 May 2019 07:30:54 +0000 (09:30 +0200)]
travis: update RISC-V toolchain

5 years agobios/irc: remove compilation workaround
Florent Kermarrec [Sat, 25 May 2019 07:24:48 +0000 (09:24 +0200)]
bios/irc: remove compilation workaround

5 years agoREADME: update RISC-V toolchain
Florent Kermarrec [Sat, 25 May 2019 07:24:25 +0000 (09:24 +0200)]
README: update RISC-V toolchain

5 years ago.gitmodules/rocket: switch to https://github.com/enjoy-digital/rocket-litex-verilog
Florent Kermarrec [Fri, 24 May 2019 08:39:48 +0000 (10:39 +0200)]
.gitmodules/rocket: switch to https://github.com/enjoy-digital/rocket-litex-verilog

5 years agosoftware/bios/isr.c: workaround compilation issue (need to be fixed)
Florent Kermarrec [Fri, 24 May 2019 08:13:24 +0000 (10:13 +0200)]
software/bios/isr.c: workaround compilation issue (need to be fixed)

5 years agosoc/integration/soc_core: revert default mem_map (do specific RocketChip remapping...
Florent Kermarrec [Fri, 24 May 2019 08:08:16 +0000 (10:08 +0200)]
soc/integration/soc_core: revert default mem_map (do specific RocketChip remapping for now)

5 years agoboards/targets: revert default sys_clk_freq on nexys4ddr/versa_ecp5 (but add paramete...
Florent Kermarrec [Fri, 24 May 2019 07:37:33 +0000 (09:37 +0200)]
boards/targets: revert default sys_clk_freq on nexys4ddr/versa_ecp5 (but add parameter to configure it)

5 years agoMerge pull request #186 from gsomlo/gls-rocket
enjoy-digital [Fri, 24 May 2019 08:15:02 +0000 (10:15 +0200)]
Merge pull request #186 from gsomlo/gls-rocket

Experimental Support for 64-bit RocketChip

5 years agofixup: generated-verilog submodule for experimental Rocket support
Gabriel L. Somlo [Thu, 23 May 2019 20:27:17 +0000 (16:27 -0400)]
fixup: generated-verilog submodule for experimental Rocket support

FIXME: This patch uses https://github.com/gsomlo/rocket-litex-verilog,
however in the long term it would perhaps be better if enjoy-digital
hosted the generated-verilog repository.
Once that's in place, I'd be happy to re-spin (and squash) this patch
on top of its parent -- GLS

5 years agosoc/cores/cpu/rocket: Support for 64-bit RocketChip (experimental)
Gabriel L. Somlo [Thu, 9 May 2019 12:47:06 +0000 (08:47 -0400)]
soc/cores/cpu/rocket: Support for 64-bit RocketChip (experimental)

Simulate a Rocket-based 64-bit LiteX SoC with the following command:

  litex/tools/litex_sim.py [--with-sdram] --cpu-type=rocket

NOTE: Synthesizes to FPGA and passes timing at 50MHz on nexys4ddr
(with vivado) and ecp5versa (with yosys/trellis/nextpnr), but at
this time does not yet properly initialize physical on-board DRAM.
On ecp5versa, using '--with-ethernet', up to 97% of the available
TRELLIS_SLICE capacity is utilized.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
5 years agoMerge pull request #185 from gsomlo/gls-sim-sdram
enjoy-digital [Thu, 23 May 2019 13:52:33 +0000 (15:52 +0200)]
Merge pull request #185 from gsomlo/gls-sim-sdram

tools/litex_sim: restore functionality of '--with-sdram' option

5 years agotools/litex_sim: restore functionality of '--with-sdram' option
Gabriel L. Somlo [Thu, 23 May 2019 12:53:26 +0000 (08:53 -0400)]
tools/litex_sim: restore functionality of '--with-sdram' option

After LiteDRAM commit #50e1d478, an additional positional argument
('databits') is required by the PhySettings() constructor.

The value used here (32) will generate a 64MByte simulated SDRAM.

5 years agoMerge pull request #183 from xobs/usb-to-0x43
enjoy-digital [Tue, 21 May 2019 05:19:15 +0000 (07:19 +0200)]
Merge pull request #183 from xobs/usb-to-0x43

Use 0x43/0xc3 for USB bridge magic packet

5 years agoremote: usb: print "access denied" error
Sean Cross [Tue, 21 May 2019 01:35:09 +0000 (02:35 +0100)]
remote: usb: print "access denied" error

When we get an error with errno 13, it means that the user doesn't
have access to the USB device.  Rather than silently eating this
error and returning -1, print out a message to aid in debugging.

Signed-off-by: Sean Cross <sean@xobs.io>
5 years agoremote: usb: use 0x43/0xc3 for packet header
Sean Cross [Tue, 21 May 2019 01:14:18 +0000 (09:14 +0800)]
remote: usb: use 0x43/0xc3 for packet header

The previous value -- 0xc0 -- is used by Windows all the time to query
special descriptors.  This was causing a conflict when using the USB
bridge on a Windows device.

Change the magic packet from "Vendor: Device" queries to "Vendor:
Other" by setting the bottom two bits.

Signed-off-by: Sean Cross <sean@xobs.io>
5 years agosoc/cores/minerva: update to latest
Florent Kermarrec [Fri, 17 May 2019 20:21:57 +0000 (22:21 +0200)]
soc/cores/minerva: update to latest

5 years agoMerge pull request #182 from gsomlo/gls-nexys4-eth-fixup
enjoy-digital [Fri, 17 May 2019 14:33:34 +0000 (16:33 +0200)]
Merge pull request #182 from gsomlo/gls-nexys4-eth-fixup

boards/nexys4ddr: ethernet support fix-up

5 years agoboards/nexys4ddr: ethernet support fix-up
Gabriel L. Somlo [Fri, 17 May 2019 14:06:12 +0000 (10:06 -0400)]
boards/nexys4ddr: ethernet support fix-up

Commit 5f6e7874 added ethernet support, let's now also expose it via
the "--with-ethernet" command line argument.

5 years agoMerge branch 'master' of http://github.com/enjoy-digital/litex
Florent Kermarrec [Thu, 16 May 2019 13:15:30 +0000 (15:15 +0200)]
Merge branch 'master' of github.com/enjoy-digital/litex

5 years agosoc_core: remove csr_expose and add add_csr_master method
Florent Kermarrec [Thu, 16 May 2019 13:14:55 +0000 (15:14 +0200)]
soc_core: remove csr_expose and add add_csr_master method

This could be useful in specific case were we don't have a wishbone master
but just want to have a csr bus and allow the user to define it.

/!\ Since there is no arbitration on between the CSR masters, use this with
precaution /!\

5 years agosoftware/include/base/csr-defs.h: add specific CSR_IRQ_MASK/PENDING for Minerva
Florent Kermarrec [Wed, 15 May 2019 20:40:32 +0000 (22:40 +0200)]
software/include/base/csr-defs.h: add specific CSR_IRQ_MASK/PENDING for Minerva

5 years agosoftware/bios/boot: remove specific linux commands (not needed with device tree)
Florent Kermarrec [Tue, 14 May 2019 09:44:15 +0000 (11:44 +0200)]
software/bios/boot: remove specific linux commands (not needed with device tree)

5 years agoboards/targets/de0nano: reduce to 50MHz sys_clk, simplify CRG
Florent Kermarrec [Tue, 14 May 2019 09:02:09 +0000 (11:02 +0200)]
boards/targets/de0nano: reduce to 50MHz sys_clk, simplify CRG

5 years agoplatforms/de0nano: change serial pins (put then next to the GND pin)
Florent Kermarrec [Tue, 14 May 2019 08:31:40 +0000 (10:31 +0200)]
platforms/de0nano: change serial pins (put then next to the GND pin)

5 years agocpu/vexriscv/core: update
Florent Kermarrec [Mon, 13 May 2019 08:59:26 +0000 (10:59 +0200)]
cpu/vexriscv/core: update

5 years agocpu/vexriscv: update submodule (new linux variant)
Florent Kermarrec [Mon, 13 May 2019 08:59:03 +0000 (10:59 +0200)]
cpu/vexriscv: update submodule (new linux variant)

5 years agoboards/nexys4ddr: add ethernet support (RMII 100Mbps)
Florent Kermarrec [Mon, 13 May 2019 08:18:23 +0000 (10:18 +0200)]
boards/nexys4ddr: add ethernet support (RMII 100Mbps)

5 years agoboards/targets/netv2: +x
Florent Kermarrec [Sat, 11 May 2019 10:39:02 +0000 (12:39 +0200)]
boards/targets/netv2: +x

5 years agosoc/cores: remove cordic
Florent Kermarrec [Sat, 11 May 2019 07:36:53 +0000 (09:36 +0200)]
soc/cores: remove cordic

Cordic is useful for DSP cores but not as a Soc building block.

5 years agoLICENSE: clarify
Florent Kermarrec [Sat, 11 May 2019 07:26:51 +0000 (09:26 +0200)]
LICENSE: clarify

5 years agosoc/interconnect: remove axi_lite
Florent Kermarrec [Sat, 11 May 2019 07:12:20 +0000 (09:12 +0200)]
soc/interconnect: remove axi_lite

axi_lite code was defining AXI4Lite signals and doing a AXI4Lite bridge to the
CSR bus when LiteX was not having proper AXI support. LiteX now has  proper AXI
support and it also cover what axi_lite was doing: To create a AXILite to CSR
bus, user can create an AXILite2Wishbone bridge and then connect the CSR bus
directly to the wishbone bus as done in the others non-AXI SoC.

5 years agoboards: add initial NeTV2 support (clocks, leds, dram, ethernet)
Florent Kermarrec [Fri, 10 May 2019 16:55:40 +0000 (18:55 +0200)]
boards: add initial NeTV2 support (clocks, leds, dram, ethernet)

5 years agosoc/integration/soc_sdram: simplify/fix main_ram_size computation using new databits...
Florent Kermarrec [Fri, 10 May 2019 13:46:22 +0000 (15:46 +0200)]
soc/integration/soc_sdram: simplify/fix main_ram_size computation using new databits value of the phy

5 years agosoc/integration/soc_core: allow user to defined internal csr/interrupts
Florent Kermarrec [Fri, 10 May 2019 09:05:34 +0000 (11:05 +0200)]
soc/integration/soc_core: allow user to defined internal csr/interrupts

For some designs with different capabilities, we want to run the same software
and then have the CSRs/Interrupts defined to a specific location.

5 years agoboards/targets: use new add_csr method
Florent Kermarrec [Thu, 9 May 2019 21:50:43 +0000 (23:50 +0200)]
boards/targets: use new add_csr method

5 years agotools/litex_sim: add uart csr (required when with_uart=False with new add_csr method)
Florent Kermarrec [Thu, 9 May 2019 21:33:08 +0000 (23:33 +0200)]
tools/litex_sim: add uart csr (required when with_uart=False with new add_csr method)

5 years agosoc/integration/soc_core: rework csr assignation/reservation
Florent Kermarrec [Thu, 9 May 2019 21:32:22 +0000 (23:32 +0200)]
soc/integration/soc_core: rework csr assignation/reservation

Similar refactor than on interrupts. Adds a add_csr method but still
retro-compatible with old way to declare CSRs.

5 years agoboards/targets: declare ethmac interrupt with new add_interrupt method
Florent Kermarrec [Thu, 9 May 2019 10:13:15 +0000 (12:13 +0200)]
boards/targets: declare ethmac interrupt with new add_interrupt method

The previous way to define interrupt is still valid, but using add_interrupt
method will ease maintenance

5 years agoMerge branch 'master' of http://github.com/enjoy-digital/litex
Florent Kermarrec [Thu, 9 May 2019 09:57:19 +0000 (11:57 +0200)]
Merge branch 'master' of github.com/enjoy-digital/litex

5 years agointegration/soc_core: rework interrupt assignation/reservation
Florent Kermarrec [Thu, 9 May 2019 09:54:22 +0000 (11:54 +0200)]
integration/soc_core: rework interrupt assignation/reservation

The CPUs can now reserve specific interrupts with reserved_interrupts property.
User can still define interrupts in SoCCore.interrupt_map (old way) or use
add_interrupt method. Interrupts specific to SoCCore internal modules are
allocated automatically on the remaining free interrupt ids.

Priority for the interrupts allocation:
- 1) CPU reserved interrupts.
- 2) User interrupts.
- 3) SoCCore interrupts.

5 years agotest/test_targets: fix test_ulx3s name
Florent Kermarrec [Thu, 9 May 2019 09:48:57 +0000 (11:48 +0200)]
test/test_targets: fix test_ulx3s name

5 years agoboards/targets: fix ulx3s/versa_ecp5 build
Florent Kermarrec [Thu, 9 May 2019 09:48:32 +0000 (11:48 +0200)]
boards/targets: fix ulx3s/versa_ecp5 build

5 years agocpu: add `reserved_interrupts` property
Mateusz Holenko [Mon, 6 May 2019 14:49:21 +0000 (16:49 +0200)]
cpu: add `reserved_interrupts` property

5 years agoMerge pull request #179 from gsomlo/gls-xtra-addrlen
enjoy-digital [Thu, 9 May 2019 06:57:31 +0000 (08:57 +0200)]
Merge pull request #179 from gsomlo/gls-xtra-addrlen

soc/integration/cpu_interface: more arch-specific address size fixes

5 years agosoc/integration/cpu_interface: more arch-specific address size fixes
Gabriel L. Somlo [Wed, 8 May 2019 19:36:13 +0000 (15:36 -0400)]
soc/integration/cpu_interface: more arch-specific address size fixes

When generating arch-specific include files (generated/[mem|csr].h)
ensure address literal defines are suffixed by 'L', denoting their
'unsigned long' type. This inhibits compiler warnings when values
computed based on these constants are cast to pointers.

Also ensure csr_[read|write][b|w|l]() function declarations have
'unsigned long' address arguments.

Finally, restore the correct (32-bit, (unsigned *)) expected
behavior of the MMPTR() macro, inadvertently converted to an
arch-specific sized access (unsigned long *) by commit 5c2b8685.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
5 years agoboards/targets: make sys_clk_freq a parameter
Florent Kermarrec [Tue, 7 May 2019 16:44:03 +0000 (18:44 +0200)]
boards/targets: make sys_clk_freq a parameter

Most of the targets can now generate an abritrary sys_clk_freq from onboard XO.

5 years agoboards/targets/minispartan6: for now revert experimental s6pll clocking
Florent Kermarrec [Tue, 7 May 2019 11:05:28 +0000 (13:05 +0200)]
boards/targets/minispartan6: for now revert experimental s6pll clocking