Commit Graph

7628 Commits

Author SHA1 Message Date
Gabriel Somlo d108d2ad3d tools/litex_json2dts_linux.py: update mmc node
Add `reg-names` property, which facilitates cleaner probing
for the upstream Linux device driver. Also, add a reference
to the LiteX sys_clk, also for the benefit of the upstream
driver, which can't rely on the CPU frequency matching sys_clk.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2021-12-10 11:05:58 -05:00
Gabriel Somlo b4fb3ea981 tools/litex_json2dts_linux.py: update clock specification
Remove `bus-frequency` property from `soc` node. Instead,
create a separate `clocks` section containing a node to
represent the LiteX sys_clk, which may be referenced from
other peripherals if needed.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2021-12-10 11:02:35 -05:00
Greg Davill 416886c723 software.fatfs: Align fatfs sector buffers 2021-12-10 17:27:26 +10:30
Florent Kermarrec 230ba5f7ba cpu/gowin_emcu: Minor cosmetic cleanups, add copyright. 2021-12-09 16:01:41 +01:00
enjoy-digital 7286f95f55
Merge pull request #1125 from fjullien/efinix_add_bank_voltage
efinix: add io bank voltage configuration
2021-12-09 14:26:33 +01:00
enjoy-digital 435e16c421
Merge pull request #1126 from sergachev/feature/gowin_emcu
Add initial Gowin EMCU support
2021-12-09 14:25:04 +01:00
Ilia Sergachev db83b38a2a cores/cpu: add initial Gowin EMCU support 2021-12-08 23:51:57 +01:00
Ilia Sergachev 18a1d74cf6 soc/interconnect: add basic ahb support 2021-12-08 23:08:45 +01:00
Franck Jullien 5efb64b80b efinix: add io bank voltage configuration 2021-12-08 18:04:11 +01:00
Florent Kermarrec 9482cbc85d soc/add_pcie: Expose more DMA parameters. 2021-12-08 08:21:09 +01:00
enjoy-digital d3b493d4e8
Merge pull request #1124 from tcal-x/cfu-finalize
Defer adding the CFU instance until cpu.do_finalize().
2021-12-07 18:34:09 +01:00
enjoy-digital 96b3587225
Merge pull request #1123 from LazyDodo/master
build/altera: fix rbf generation on windows
2021-12-07 18:33:13 +01:00
Tim Callahan 85a3b00d1f Defer adding CFU instance until cpu.do_finalize().
Signed-off-by: Tim Callahan <tcal@google.com>
2021-12-07 00:09:59 -08:00
Ray Molenkamp 235e55c9af build/altera: fix rbf generation on windows
Testing for a file existing is slightly different
between bash and .bat files which caused the batch
file to error out.
2021-12-06 09:39:19 -07:00
enjoy-digital cdaf8af555
Merge pull request #1121 from gregdavill/dram-rank-fix
soc.intergration.dram: Use nranks in capacity calc
2021-12-06 10:33:09 +01:00
Greg Davill 4679b86314 soc.intergration.dram: Use nranks in capacity calc
This ensures that dual ranked memory appears with the correct capacity
2021-12-05 15:34:24 +10:30
Florent Kermarrec d9c44c46ab cores/clock/gowin_gw1n: Add back GW1NR support. 2021-12-02 18:22:42 +01:00
enjoy-digital e6f316d0f4
Merge pull request #1115 from sergachev/master
Improve Gowin clock primitive support
2021-12-02 09:13:31 +01:00
Andrew Dennison b8710e44b8 build/efinix: Fix VHDL support. 2021-12-01 08:32:49 +01:00
enjoy-digital c5cd2e55e6
Merge pull request #1116 from lschuermann/dev/sim-remove-ifg-debug
litex_sim/xgmii: remove IFG SUFFICIENT debug message
2021-11-30 16:07:49 +01:00
enjoy-digital 5e851bd09e
Merge pull request #1117 from enjoy-digital/gpio_tristate
cores/gpio/GPIOTristate: Allow passing platform resource with subsignals directly.
2021-11-30 16:07:22 +01:00
Florent Kermarrec 16a43e983e cores/gpio/GPIOTristate: Use Record.flatten() instead of Record.raw_bits().
Fix verilog syntax error.
2021-11-30 15:48:34 +01:00
Florent Kermarrec 9036050364 cores/gpio/GPIOTristate: Allow passing platform resource with subsignals directly. 2021-11-30 15:32:48 +01:00
Leon Schuermann c18635ad19 litex_sim/xgmii: remove IFG SUFFICIENT debug message
Removes a leftover debug message for validating correct XGMII IFG DIC
behavior. Useful for development, but gets annoying quickly while
running the simulation.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-11-30 14:19:12 +01:00
Florent Kermarrec aebef65932 build/generic_platform/add_source: Tranform filename to absolute path earlier to catch duplications when relative/absolute paths are used in design. 2021-11-29 14:17:58 +01:00
enjoy-digital f2319d39d4
Merge pull request #1114 from andykitchen/femtorv-reset-fix
fix FemtoRV reset signal
2021-11-29 08:07:13 +01:00
enjoy-digital facb278ef8
Merge pull request #1113 from shenki/microwatt-xilinx-multiplier
microwatt: Use Xilinx multiplier
2021-11-29 08:04:57 +01:00
Joel Stanley 24ec49db2e microwatt: Use Xilinx multiplier
Use the technology specific multiplier implementation when building for a
Xilinx platform.

This isn't understood by yosys so we can't use it when yosys is used for
synthesis.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-11-29 15:30:19 +10:30
Andy Kitchen 2562ae5f63 fix FemtoRV reset signal 2021-11-28 22:35:46 +11:00
Ilia Sergachev f743dd3873 cores/clock/gowin: merge GW1NS PLL support into GW1N; add more details to PLL frequency ranges 2021-11-28 11:59:36 +01:00
Florent Kermarrec 0503188661 litex_setup/riscv_gcc_toolchain_download: Add Fedora support (get linux-centos6). 2021-11-26 14:21:26 +01:00
Florent Kermarrec 85d6cb4b8d build/anlogic: Minor cosmetic cleanups. 2021-11-23 19:12:31 +01:00
enjoy-digital c2d6ea97fa
Merge pull request #1111 from mmicko/anlogic
Add initial support for Anlogic devices
2021-11-23 19:02:16 +01:00
Miodrag Milanovic fac2b2a9fb Add initial support for Anlogic devices 2021-11-22 19:08:58 +01:00
Florent Kermarrec aecfbc0609 cpu/femtorv/core: Fix standard variant march. 2021-11-22 09:34:38 +01:00
Florent Kermarrec 440ef4e2b5 cpu/femtorv/core: Fix petitbateau's march (rv32imfc). 2021-11-22 09:12:45 +01:00
Florent Kermarrec a96304e287 cpu/femtorv/core: Generate gcc_flags from GCC_FLAGS/Variants. 2021-11-22 09:10:04 +01:00
enjoy-digital 828f763b48
Merge pull request #1100 from lschuermann/dev/sim-xgmii-ethernet-ifg
sim/xgmii_ethernet: fix XGMII start of frame char handling and RX IFG insertion (with optional DIC)
2021-11-21 19:19:46 +01:00
Florent Kermarrec e383212ffb cores/cpu/femtorv: Fix typos (thanks @BrunoLevy) and remove TODO (upstream has been updated). 2021-11-19 22:43:57 +01:00
Florent Kermarrec 59d5b1230f cores/cpu/femtorv: Fix variant filename/CI. 2021-11-19 19:40:10 +01:00
Florent Kermarrec 10155c7d6f cpu/femtorv: Start support of electron, intermissum, gracilis and petitbateau variants. 2021-11-19 18:45:47 +01:00
Florent Kermarrec 3c3884b1ea cores/cpu/femtorv: Add initial variants support (With Quark and Tachyon for now). 2021-11-19 16:31:20 +01:00
Florent Kermarrec 54a4e6c1f6 cpu/femtorv: Rewrite FemtoRV Mem Bus to Wishbone adaption (thanks @BrunoLevy for the FemtoRV bus clarifications).
Fixes the SDRAM accesses :)
2021-11-19 15:43:15 +01:00
Florent Kermarrec 605b6aff7c cores/cpu/femtorv: Switch to upstream femtorv32_quark (patched version can now be avoided). 2021-11-19 12:24:59 +01:00
Leon Schuermann de6085c5b3 sim/xgmii_ethernet: support RX IFG deficit idle count mechanism
Because XGMII only allows start of frame characters to be placed on lane
0 (first octet in a 32-bit XGMII bus word), when a packet's length % 4 !=
0, we can't transmit exactly 12 XGMII idle characters inter-frame gap
(the XGMII end of frame character counts towards the inter-frame gap,
while start of frame does not). Given we are required to transmit a
minimum of 12 bytes IFG, it's allowed to send packet length % 4 bytes
additional IFG bytes. However this would waste precious bandwidth
transmitting these characters.

Thus, 10Gbit/s Ethernet and above allow using the deficit idle count
mechanism. It allows to delete some idle characters, as long as an
average count of >= 12 bytes IFG is maintained. This is to be
implemented as a two bit counter as specified in IEEE802.3-2018,
section four, 46.3.1.4 Start control character alignment.

This commit optionally implements the deficit idle count algorithm as
described by Eric Lynskey of the UNH InterOperability Lab[1]. It may
not have much or any impact in the XGMII simulation when using a TAP
interface, however when connecting this simulation to another the DIC
mechanism is a valuable implementation for both saturating proper
10Gbit/s linerate and validating the LiteEth PHY (XGMII to stream)
converter implementation.

[1]: https://www.iol.unh.edu/sites/default/files/knowledgebase/10gec/10GbE_DIC.pdf

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-11-17 13:47:02 +01:00
Leon Schuermann 228c8699b5 sim/xgmii_ethernet: add RX IFG insertion
The previous state of the xgmii_ethernet module did not insert an
inter-frame gap at all. The IFG is mandated as part of the IEEE802.3
specification for Ethernet and as such the module was incorrect.

This fixes the inter-frame gap insertion by keeping track of the IFG
using a counter.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-11-17 13:47:02 +01:00
Leon Schuermann 05dda4cbdc sim/xgmii_ethernet: switch internal bus representation to 32 bits
The xgmii_ethernet module used to represent internal XGMII interface
signals using 64-bit signals. While this is not incorrect per se, it
makes a standards-compliant implementation of the XGMII significantly
harder in the long run. This is because XGMII fundamentally is defined
as a 32-bit bus, and thus has constraints in relation to that bus
width. For example, it is specified that packets may only ever start
on the XGMII lane 0, that is the first octet of a 32-bit XGMII bus
word. Hence, to properly handle a XGMII start of frame control
character using a 64-bit bus representation, the first and fifth octet
would need to be respected, along with shifting data depending on the
start octet.

Hence this change causes the internal XGMII interface to be
represented as a 32-bit bus. Because it is common for FPGAs to
implement the XGMII as a 64-bit bus given the fact that a DDR bus
cannot be represented in an FPGA and 32 bits without DDR would require
a clock frequency of 312.5MHz, it still permits 64-bit operation. This
is implemented by always transmitting two 32-bit bus words back to
back.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-11-17 13:47:02 +01:00
Florent Kermarrec af6b6c94b8 litex_setup: Use fixed sha1 for pythondata-cpu-ibex. 2021-11-16 18:16:05 +01:00
Florent Kermarrec b1c4670606 build/efinix: Add InterfaceWriterBlock/InterfaceWriterXMLBlock and remove DRAM specific block/xml block generation.
These blocks are specific to the boards so move it to LiteX-Boards targets.
2021-11-16 17:40:33 +01:00
enjoy-digital 3012d7d634
Merge pull request #1103 from trabucayre/review_eoss3_core
Review eoss3 core
2021-11-15 08:32:28 +01:00