Commit Graph

1612 Commits

Author SHA1 Message Date
Florent Kermarrec 9ac09ddde5 tools: add litex_sim_new based on SoCCore and using add_sdram method 2020-02-10 18:00:46 +01:00
Florent Kermarrec cbcd953dd7 soc_core: use add_rom 2020-02-10 17:43:29 +01:00
Florent Kermarrec 487ac3da9a soc/add_cpu: simplify CPUNone integration 2020-02-10 17:40:46 +01:00
Florent Kermarrec f7d4648ca1 soc/SoCBusHandler: add add_adapter method and use it to convert Master/Slave before connecting to the Bus 2020-02-10 17:17:31 +01:00
Florent Kermarrec 379d47a843 soc/add_sdram: add sdram csr 2020-02-10 17:02:20 +01:00
Florent Kermarrec 3921b6345c soc/add_sdram: fix rocket, shorten comments 2020-02-10 16:55:15 +01:00
Florent Kermarrec 14b627b466 soc/add_sdram: improve API 2020-02-10 16:38:20 +01:00
Florent Kermarrec 1faefdc0fa soc: add LiteXSoC class and mode add_identifier/uart/sdram to it 2020-02-10 16:28:11 +01:00
Florent Kermarrec 11dbe19084 soc_core/sdram: cleanup, add disclaimer 2020-02-10 16:21:21 +01:00
Florent Kermarrec 5eb88cd904 soc: add add_sdram 2020-02-10 16:01:19 +01:00
Florent Kermarrec 39011593ac soc: add csr_regions, update copyright 2020-02-10 15:11:37 +01:00
Florent Kermarrec d2b069516a soc: add cpu rom/sram check 2020-02-10 14:48:46 +01:00
Florent Kermarrec de100fddf5 soc: add SOCIORegion and manage it 2020-02-10 14:36:53 +01:00
Florent Kermarrec 6b8c425f9b soc: reorder main components/peripherals 2020-02-10 13:07:09 +01:00
Florent Kermarrec 84b5df7871 soc: add add_cpu method 2020-02-09 21:56:32 +01:00
Florent Kermarrec 7ee9ce38a7 .gitmodules/black-parrot: switch to https://github.com/enjoy-digital/black-parrot (without the submodules) 2020-02-09 19:53:04 +01:00
Florent Kermarrec b676a559fd soc: fix unit-tests 2020-02-09 19:01:03 +01:00
Florent Kermarrec 0a5883901a soc: integrate constants/build 2020-02-08 22:08:37 +01:00
Florent Kermarrec 014d5a56a8 soc: show sorted regions (by origin) / locs 2020-02-08 21:34:26 +01:00
Florent Kermarrec c69b6b7c12 soc: simplify color theme 2020-02-08 21:30:34 +01:00
enjoy-digital 1dced8183e
Merge pull request #278 from scanakci/blackparrot_litex
Blackparrot litex
2020-02-08 10:30:55 +01:00
Florent Kermarrec 3cb90297ac soc: add add_uart method 2020-02-08 10:19:18 +01:00
Florent Kermarrec e5cacb8bbd soc_core: cleanup imports 2020-02-07 23:16:29 +01:00
Florent Kermarrec 33d498b826 soc_core: get_csr_address no longer used 2020-02-07 23:11:08 +01:00
Florent Kermarrec 1feff1d7d5 soc: integrate CSR master/interconnect/collection and IRQ collection 2020-02-07 19:50:35 +01:00
Florent Kermarrec 3ba7c29ed9 soc: add add_constant/add_config methods 2020-02-07 19:09:54 +01:00
Florent Kermarrec 29bbe4c02a soc: add add_csr_bridge method 2020-02-07 18:49:20 +01:00
Florent Kermarrec b84c291c34 soc: add add_controller/add_identifier/add_timer methods 2020-02-07 18:31:50 +01:00
Florent Kermarrec 9445c33e9d soc: add add_ram/add_rom methods 2020-02-07 16:06:32 +01:00
Florent Kermarrec e5a8ac1dab soc: add automatic bus data width convertion to add_master/add_slave 2020-02-07 15:31:59 +01:00
Florent Kermarrec 8f67f1157d soc/soc_core: cleanup, remove some unused attributes 2020-02-07 15:19:02 +01:00
Florent Kermarrec 2c6e5066a7 soc: move SoCController from soc_core to soc 2020-02-07 14:52:53 +01:00
Florent Kermarrec 848fa20d1e soc: create SoCLocHandler and use it to simplify SoCCSRHandler and SoCIRQHandler 2020-02-07 13:25:54 +01:00
Florent Kermarrec 39458c92eb soc: add use_loc_if_exists on SoCIRQ.add to use current location is already defined 2020-02-06 19:50:44 +01:00
Florent Kermarrec 1eff0799a4 soc: add use_loc_if_exists on SoCCSR.add to use current location is already defined 2020-02-06 18:50:17 +01:00
Florent Kermarrec 8bc420679a soc/integration: initial adaptation to new SoC class 2020-02-06 18:21:13 +01:00
Florent Kermarrec 1d70ef6958 soc/cores/spi_opi: cleanup, rename to S7SPIOPI (since 7-Series specific for now) 2020-02-06 17:58:01 +01:00
Florent Kermarrec 62f3537db0 soc/cores: rename spiopi to spi_opi 2020-02-06 17:08:00 +01:00
Florent Kermarrec f58e8188b7 soc/cores/i2s: cleanup pass, rename to S7I2SSlave (since 7-Series specific for now), rename fifodepth to fifo_depth for consistency with others cores. 2020-02-06 17:00:04 +01:00
enjoy-digital c2c80b5d0a
Merge pull request #378 from betrusted-io/merge_ip
Request to merge I2S and SPIOPI cores
2020-02-06 16:29:33 +01:00
bunnie 98e46c2708 reduce indents 2020-02-06 21:55:44 +08:00
Florent Kermarrec 6baa07a69b soc/integration: add new soc class prorotype with SoCRegion/SoCBus/SoCCSR/SoCIRQ/SoC 2020-02-06 11:06:41 +01:00
bunnie d2b394a9be update doc comments on events for i2s 2020-02-06 17:58:02 +08:00
bunnie 416afd3109 add doc comment for event 2020-02-06 17:56:21 +08:00
bunnie 33d9e45a8b fix formatting on spiopi
Pycharm really butchered the code when I did a copy-and-paste...
it has questionable default formatting preferences.
2020-02-06 17:54:26 +08:00
Florent Kermarrec 9b11e9192d cpu/vexriscv: update submodule 2020-02-06 10:50:35 +01:00
bunnie cc6ed667df Request to merge I2S and SPIOPI cores 2020-02-06 17:25:00 +08:00
enjoy-digital 5ff02e23a0
Merge pull request #375 from xobs/add-lxsocdoc
Add lxsocdoc
2020-02-05 10:15:21 +01:00
Florent Kermarrec 1944d8d9d0 bios/main: add LiteX tagline 2020-02-04 19:14:23 +01:00
Mariusz Glebocki 90fe585003 build/sim: allow to use environment's {C,LD}FLAGS
There are use cases where additional flags should be added to CFLAGS or
LDFLAGS, e.g. when using Conda environment.
2020-02-04 17:31:31 +01:00
Sean Cross 58598d4fda integration: svd: move svd generation to `export`
It was suggested that we should move svd generation into `export`,
alongside the rest of the generators such as csv, json, and h.  This
performs this move, while keeping a compatible `generate_svd()` function
inside `soc/doc/`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-02-04 23:49:08 +08:00
Sean Cross 73ed7e564c soc: doc: use sphinx toctree as it was intended
The sphinx toctree was behaving oddly, and so previously we were
ignoring it completely.  This patch causes it to be used correctly,
which removes the need for double-including various sections.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-02-04 20:34:10 +08:00
Sean Cross 7c3bc0b09f litex-doc: initial merge of lxsocdoc
lxsocdoc enables automatic documentation of litex projects, including
automatic generation of SVD files.

This merges the existing lxsocdoc distribution into the `soc/doc` directory.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-02-04 20:14:41 +08:00
Piotr Binkowski f3b068e2ee tools/litex_sim: use l2_reverse flag 2020-02-03 12:03:57 +01:00
Florent Kermarrec 3350d33f9c wishbone/Cache: add reverse parameter 2020-01-31 19:31:33 +01:00
Florent Kermarrec eff9caee6a soc_sdram: add l2_reverse parameter 2020-01-31 19:18:07 +01:00
Vadim Kaushan de88ed282a
Fix argument descriptions 2020-01-31 18:54:25 +03:00
Vadim Kaushan eb49ec217e
Pass --csr-json to the Builder 2020-01-31 18:53:50 +03:00
Florent Kermarrec b69f2993e4 soc_core: add UART bridge support (simplify having to do it externally) 2020-01-31 15:12:18 +01:00
Florent Kermarrec 7a6c04db9e build/altera/quartus: fix fmt_r typo 2020-01-30 13:55:13 +01:00
Florent Kermarrec c6b9676db8 cpu/minerva: update (use new nMigen API) 2020-01-30 13:42:02 +01:00
Florent Kermarrec 9d2894727e inteconnect/stream: use PipeValid implementation for Buffer 2020-01-30 09:36:04 +01:00
Florent Kermarrec 1c88c0f896 inteconnect/stream: cleanup 2020-01-30 09:32:04 +01:00
enjoy-digital cafd9c358a
Merge pull request #366 from gsomlo/gls-csr-followup
software, integration/export: (re-)expose CSR subregister accessors
2020-01-30 08:18:12 +01:00
Gabriel Somlo ff2775c264 software, integration/export: (re-)expose CSR subregister accessors
Expose a pair of `csr_[read|write]_simple()` subregister accessors, and
restore the way dedicated accessors are generated in "generated/csr.h"
to use hard-coded combinations of shifts and subregister accessor calls.

This restores downstream ability to override CSR handling at the
subregister accessor level.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-01-29 14:29:24 -05:00
Florent Kermarrec f3f9808d1f interconnect/stream: add PipeValid and PipeWait to cut timing paths. 2020-01-29 18:27:29 +01:00
Florent Kermarrec b22ad1acfb build/xilinx/vivado: improve readability of generated tcl/xdc files 2020-01-29 16:27:18 +01:00
Florent Kermarrec 7bc34a9bc7 integration/soc_core: revert integrate_sram_size default value (cause issues when using External SPRAM).
When using SoCCore, integrated SRAM can be disabled with integrated_sram_size=0 if not wanted.
2020-01-29 08:31:41 +01:00
Piotr Binkowski c02dd5e8f9 tools/litex_sim: add ddr4 PhySettings 2020-01-28 14:28:24 +01:00
Florent Kermarrec 0820adbda1 tools/litex_sim: add --sdram-init parameter 2020-01-27 21:30:13 +01:00
Florent Kermarrec 01ae10b803 software/bios: revert M-Labs MiSoC copyright. 2020-01-27 13:12:37 +01:00
Florent Kermarrec ea5ef8c1be README: update copyright year and make sure LICENSE/README both mention MiSoC 2020-01-27 12:15:11 +01:00
Florent Kermarrec 95cfa6a82c platforms/netv2: add pcie pins 2020-01-27 08:25:57 +01:00
Greg Davill 1f43906236 soc/software/bios/sdram: ECP5 move strobe dly_sel 2020-01-26 09:55:38 +10:30
Greg Davill f84f57d651 soc/software/bios/sdram: On ECP5 strobe dly_sel after read leveling 2020-01-25 13:11:39 +10:30
Florent Kermarrec 52765488b5 tools/litex_sim: update copyrights and cosmetic changes 2020-01-24 13:58:49 +01:00
enjoy-digital b280bb2ff2
Merge pull request #358 from antmicro/litex_sim_ddr
tools/litex_sim: add support for other sdram types
2020-01-24 13:33:03 +01:00
Piotr Binkowski 9aa97c2e0c tools/litex_sim: add support for other sdram types (DDR, LPDDR, DDR2, DDR3)
Right now litex_sim supports only SDR memories because it uses hardcoded
PhySettings. With this change PhySettings will be generated based on
selected sdram type which will allow us to use all the different types
of sdram chips in simulation.
2020-01-24 12:30:35 +01:00
Florent Kermarrec 19ef19ce0d cores/clock/create_clkout: rename clk_ce to ce, improve error reporting 2020-01-24 09:10:31 +01:00
enjoy-digital 7e08836062
Merge pull request #357 from betrusted-io/add_clk_ce
Add clk ce
2020-01-24 09:01:57 +01:00
bunnie 1f7549b4c0 add BUFIO to clockgen buffer options 2020-01-24 15:01:13 +08:00
bunnie b3f9aa11be add option for BUFGCE to the clock generator buffer types 2020-01-24 14:58:51 +08:00
Florent Kermarrec cbc081c43d tools/litex_sim: review/cleanup sdram-module/sdram-data-width features. 2020-01-23 15:42:47 +01:00
enjoy-digital b35ea459e7
Merge pull request #354 from antmicro/litex_sim_ddr
tools/litex_sim: specify dram chip and data width via commandline
2020-01-23 15:34:53 +01:00
Piotr Binkowski 674cfcde7d tools/litex_sim: specify dram chip and data width via commandline
litex_sim used a single predefined DRAM chip, with this it is now
possible to specify which one to use with --sdram-module and also
its data bus width can be set using --sdram-data-width
2020-01-23 14:41:37 +01:00
enjoy-digital b23f13d960
Merge pull request #351 from antmicro/fix_sram_size_argument
Fix sram size argument
2020-01-23 14:16:02 +01:00
Mateusz Holenko 7a05353aa7 soc_core: rename integrated_sram_size argument
To keep a consistent naming scheme across all arguments.
2020-01-23 13:46:09 +01:00
Mateusz Holenko c4bb4169f1 soc_core: fix integrated_sram_size argument type
Right now it's kept as a string and crashes
when trying to do math operations on it.
2020-01-23 13:45:16 +01:00
Florent Kermarrec 5845df76cc build/xilinx/vivado: add pre_placement/pre_routing commands 2020-01-21 19:00:58 +01:00
Florent Kermarrec 1388088240 cores/icap: add add_timing_constraints method 2020-01-21 14:08:36 +01:00
Florent Kermarrec 2074a86ee3 cores/dna: cleanup and add add_timing_constraints method 2020-01-21 14:08:17 +01:00
Florent Kermarrec d39dc8cf5d tools/litex_sim: cleanup/simplify 2020-01-20 21:22:41 +01:00
Florent Kermarrec a0d95766ac build/sim: add -Wl,--no-as-needed to LDFLAGS for Ubuntu 16.04 support (thanks kamejoko80) 2020-01-20 12:55:38 +01:00
Florent Kermarrec 80c3dc41d3 targets: use mem_region.origin instead of mem_map definition (prepare for automatic mem_region allocation) 2020-01-20 12:10:00 +01:00
Florent Kermarrec 53bc18cc3f soc_core: add new alloc_mem/add_mem_region to allow automatic allocation of memory regions
With add_memory_region, user needs to provide the memory origin, which should not be needed since
could be retrieved from mem_map and prevent automatic allocation which is already possible for csr
and interrupts.

New add_mem_region method now allows both: defining the memory origin in mem_map (which will then
be used) or let the SoC builder automatically find and allocate a memory region.
2020-01-20 12:05:08 +01:00
bunnie eae0e00496 cores/clock/xadc: ease DRP timings
Hard IP blocks are fixed in location, so long/deep combinational paths routing to multiple hard IP blocks can lead to timing closure problems.

XADC and MMCM DRPs currently have their DEN pins triggered by the ".re" output of a CSR. This is asynchronously derived from a fairly complicated set of logic that involves a logic path that goes all the way back through the cache and arbitration mechanisms of the wishbone bus. On more complex designs, this is leading to a failure of timing closure for these paths, because the hard IP blocks can be located in disparate portions of the chip which "pulls" the logic cluster in opposite directions in an attempt to absorb the routing delays to these IP blocks, leading to non-optimal placement for everything else and thus timing closure problems.

This pull request proposes that we add a pipeline delay on these critical paths. This delays the commit of the data to the DRP by one cycle, but greatly relieves timing because the pipeline register can be placed close to the cluster of logic that computes addresses, caching, and arbitration, allowing for the routing slack to the hard IP blocks to be absorbed by the path between the pipe register and the hard IP block.

In general, this shouldn't be a problem because the algorithm to program the DRP is to hit the write or read CSR, and then poll the drdy bit until it is asserted (so the process is already pretty slow). The MMCM in particular should have almost no impact, because MMCM updates are infrequent and the subsequent lock time of the MMCM is pretty long. The XADC is potentially more problematic because it can produce data at up to 1MSPS; but if sysclk is around 100MHz, adding 10ns to the read latency is relatively small compared to the theoretical maximum data rate of one every 1,000ns.

Note that the xadc patch requires introducing a bit of logic into the non-DRP path. This is because without explicitly putting an "if" statement around the logic, you fall back to the non-blocking semantics of the verilog operator, which ultimately leads to a pretty hefty combinational path. By having a default "if" that should get optimized out when DRP is not enabled, when the DRP path /is/ enabled the synthesizer knows it can safely push the async signal into a simple mux as opposed to worrying about enforcing the non-blocking operator semantics to get the desired result.
2020-01-19 20:57:14 +01:00
Florent Kermarrec 008a089471 targets/nexys4ddr: fix typo 2020-01-17 13:17:08 +01:00
Florent Kermarrec 36e5274a2b SoCSDRAM: set default max_sdram_size to 1GB (maximum we can map with current mem_map) 2020-01-17 12:45:23 +01:00
Florent Kermarrec 46c1c5c16f targets/kcu105: remove main_ram_size_limit 2020-01-17 12:27:21 +01:00
Florent Kermarrec 5913c91caa SoCSDRAM: rename main_ram_size_limit to max_sdram_size and make it a parameter of SoCSDRAM, expose SoCSDRAM parameters to user 2020-01-17 12:16:08 +01:00