Commit Graph

3830 Commits

Author SHA1 Message Date
Florent Kermarrec 8ba5625227 soc/interconnect/wishbone: add Timeout to avoid stalling bus when not responding and generate error. 2018-08-06 12:21:18 +02:00
Florent Kermarrec c0989f65dd soc/cores/cpu: add reset signal 2018-08-06 12:19:23 +02:00
enjoy-digital 380f8b96dd
Merge pull request #81 from xobs/vexriscv-to-wishbone
Push Vexriscv debug directly on the Wishbone bus
2018-07-27 11:59:28 +02:00
Sean Cross fb145daced tools: remove vexriscv_debug
This program is no longer needed.

The `openocd_vexriscv` package natively supports `etherbone`, and now
that the vexriscv debug module is available on Wishbone instead of as a
CSR, this module no longer works.

This change simplifies both tooling (because there is one fewer program
to run) and integration (because you don't need to modify your CSRs
anymore, just `register_mem()`.)

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-27 15:25:33 +08:00
Sean Cross f17b8324d4 vexriscv: reset wishbone bus on CPU reset
If the CPU is resetting during a Wishbone transfer, assert the ERR line.

Because the resetOut line is likely multiple cycles long, this should
give Wishbone enough time to finish its transfer, which will cause d.stb
and i.stb to go to 0, which will return d_err and i_err to 0.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-27 15:24:43 +08:00
Sean Cross c87ca4f1c3 vexriscv: put debug bus directly on wishbone bus
By placing the VexRiscv debug bus on the Wishbone bus, the Etherbone
core can access 32-bit values directly from the core.  Additionally,
both reading and writing are supported without the need to do a SYNC
register as before.

Additionally, the address of the Wishbone bus won't move around anymore,
as it's fixed when doing `self.register_mem()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-27 15:24:43 +08:00
Florent Kermarrec 20d6fcac61 add litex_setup script to clone and install Migen, LiteX and LiteX's cores 2018-07-20 10:11:41 +02:00
Florent Kermarrec 8a311bf4a6 build/generic_platform: use list for sources instead of set
Ideally, we want to use an ordered set (to be able to keep compilation order), to avoid using an external package, we use a list.
2018-07-20 10:01:33 +02:00
Florent Kermarrec df7e5dbcf6 bios/sdram: add ERR_DDRPH_BITSLIP constant and some cleanup 2018-07-19 12:52:00 +02:00
Florent Kermarrec 1564b440eb soc/integration/soc_sdram: add assertion on csr_data_width since BIOS only support SDRAM initialization for csr_data_width=8 2018-07-19 12:51:16 +02:00
Florent Kermarrec ae62fe076c setup.pu: fix exclude 2018-07-19 11:35:50 +02:00
Florent Kermarrec c314193cc9 boards/plarforms/genesys2: replace user_dip_sw with user_sw 2018-07-18 12:48:44 +02:00
Florent Kermarrec 10dd55fd88 boards/platforms/genesys2: add minimum HPC connectors to be able to test SATA, add programmer parameter 2018-07-18 11:51:58 +02:00
Florent Kermarrec b19844d196 setup.py: exclude test, sim, doc directories 2018-07-18 09:37:38 +02:00
Florent Kermarrec 85308672d3 software/bios/linker: revert data section since required by RISC-V compiler 2018-07-18 09:30:14 +02:00
enjoy-digital 55dd58b023
Merge pull request #80 from xobs/fix-vexriscv-csr-read
vexriscv_debug: use csr read()/write() accessors
2018-07-17 17:31:48 +02:00
Sean Cross 41a9e7d9ae vexriscv_debug: use csr read()/write() accessors
CSR access widths can be different from register widths.  8-bit
registers are common.

The runtime-generated `read()` and `write()` functions handle this
mapping correctly.  When direct register accesses are handled, this
mapping is lost.

Use the accessor functions rather than directly accessing the memory
addresses, so that we work on platforms other than 32-bit-wide.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-17 18:03:58 +08:00
Florent Kermarrec 7ecdcaca4b soc/integration/sdram_init: use fixed burst_length for each memtype (even in 1:2, use BL8 for DDR3 since BL4 is not efficient) 2018-07-16 18:40:36 +02:00
Florent Kermarrec a4caa8964a targets/nexys_video: remove read leveling constants (now automatic) 2018-07-16 09:44:15 +02:00
Florent Kermarrec d825004173 targets/nexys4ddr: s7ddrphy now supports ddr2, working 2018-07-16 09:43:09 +02:00
Florent Kermarrec 4f1274e6a6 bios/sdram: improve bitslip selection when window can't be optimal (not enough taps for a full window) 2018-07-16 09:42:09 +02:00
Florent Kermarrec 7dbd85a842 soc/cores/uart: rename UARTMultiplexer to RS232PHYMultiplexer. UARTMultiplexer now acts on serial signals (tx/rx) 2018-07-10 22:32:51 +02:00
Florent Kermarrec ef1c778446 soc_core: add csr_expose parameter to be able to expose csr bus (useful when design is integrated in another) 2018-07-10 13:29:32 +02:00
Florent Kermarrec f9104b201a bios/sdram: improve read leveling (artix7 read-leveling is now done automatically at startup) 2018-07-06 19:22:33 +02:00
Florent Kermarrec c84e189d6a bios/sdram: fix compilation with no write leveling 2018-07-06 16:22:49 +02:00
enjoy-digital b062d4dddc
Merge pull request #79 from xobs/fix-vexriscv-data-read
vexriscv: debug: fix reading DATA register
2018-07-06 13:23:08 +02:00
Sean Cross be8eb5ff84 vexriscv: debug: fix reading DATA register
The REFRESH register accepts an 8-bit address and determines which
register to refresh.  Since there are only two addresses currently in
use, this register can be either 0x00 or 0x04.

A refactor replaced the compare with one that checked for any 0 bits.
Since both 0x00 and 0x04 have 0 bits, this check always evaluated as
true, causing the logic to always refresh the CORE register.

Replace this check with an explicit check for 0x00.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-06 18:22:32 +08:00
enjoy-digital e35be26ebf
Merge pull request #78 from xobs/vexriscv_debug_bridge
Add Vexriscv debug bridge
2018-07-06 11:12:22 +02:00
Sean Cross 6bc9265c2b setup: add vexriscv_debug to list of entrypoints
Add the vexriscv_debug program to the list of scripts created when
installing this module.  This program is a simple bridge that allows
openocd to talk to the vexriscv core so it can be debugged.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-06 16:22:11 +08:00
Sean Cross 45a649be9b tools: vexriscv_debug: add debug bridge
Add a bridge that uses litex_server to go from openocd to wishbone.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-06 16:08:06 +08:00
Florent Kermarrec c821a0feab cores/cpu/vexriscv: create variants: None and "debug", some cleanup 2018-07-05 17:31:23 +02:00
Florent Kermarrec 59fa71593d core/cpu/vexriscv/core: improve indentation 2018-07-05 16:51:40 +02:00
enjoy-digital 6068f6ce9c
Merge pull request #77 from xobs/debug-vexriscv-enjoy
Enable support for vexriscv debugging
2018-07-05 16:46:24 +02:00
Florent Kermarrec 11e8491547 platforms/arty_s7: keep up to date with Migen 2018-07-05 12:02:14 +02:00
Sean Cross 32d5a751db soc_core: uart: add a reset line to the UART
Enable resetting the UART by adding a ResetInserter to the UART.

The UART must be reset when resetting the softcore.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-05 17:25:29 +08:00
Sean Cross 1ef127e06d soc: integration: use the new cpu_debugging flag for vexriscv
Allow a new cpu_debugging flag to be passed to the constructor to
enable in-circuit live debugging of the softcore under gdb.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-05 17:25:29 +08:00
Sean Cross e7c762c8c3 soc: vexriscv: add cpu debug support
Add support for debugging the CPU, and gate it behind a new cpu_debug
parameter.  With this enabled, a simple Wishbone interface is provided.

The debug version of the core adds two 32-bit registers to the CPU.
The register at address 0 indicates status, and is used to halt
and reset the core.

The debug register at address 4 is used to inject opcodes into the
core, and read back the result.

A patched version of OpenOCD can be used to attach to this bus via
the Litex Ethernet or UART bridges.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-05 17:25:28 +08:00
Sean Cross 2024542a3c vexriscv: verilog: pull debug-enabled verilog
The upstream vexriscv repo now generates both the current VexRiscv.v
softcore, as well as VexRiscv-Debug.v.  This -Debug varient exposes
their specialized debug bus that allows for attaching a modified version
of openocd.

Sync the litex repo with the upstream version to take advantage of debug
support.

Signed-off-by: Sean Cross <sean@xobs.io>
2018-07-05 17:25:27 +08:00
Florent Kermarrec d35dc5cdea platforms/arty: merge with Migen 2018-07-05 11:18:49 +02:00
Florent Kermarrec fa0215660b platforms/kc705: keep up to date with Migen 2018-07-05 10:43:26 +02:00
Florent Kermarrec b9f3b49c63 platforms/de0nano: keep up to date with Migen 2018-07-05 10:42:45 +02:00
Florent Kermarrec 1628c36aba README/boards: add precision on Migen's platforms 2018-07-05 10:09:22 +02:00
Florent Kermarrec df99cc66e8 bios/sdram: also check for last read of scan to choose optimal window 2018-07-02 14:12:27 +02:00
Florent Kermarrec 8ce7fcb237 bios/main: add cpu frequency to banner 2018-07-02 13:47:18 +02:00
Florent Kermarrec 477d224921 bios/sdram: check for optimal read window before doing read leveling, increment bitslip if not optimal. 2018-07-02 13:46:48 +02:00
Florent Kermarrec 9e737d3c57 soc/cores/code_8b10b: update (from misoc) 2018-06-29 14:24:44 +02:00
Florent Kermarrec d58eb4ecb7 bios/sdram: use new phy, improve scan, allow disabling high skew 2018-06-28 18:43:48 +02:00
Florent Kermarrec 692cb14245 software/bios: fix picorv32 boot_helper 2018-06-28 11:42:43 +02:00
Florent Kermarrec b5ee110e63 bios/sdram: add write/read leveling scans 2018-06-27 15:31:54 +02:00
Florent Kermarrec 34b2bd0c28 boards: add genesys2 (platform with clk/serial/dram/ethernet + target) 2018-06-27 11:27:05 +02:00