Commit Graph

1259 Commits

Author SHA1 Message Date
Florent Kermarrec 52d7dbe3a6 frontend/fifo: make sure FIFO is only used on LiteDRAMNativePort, expose writer/reader fifo depth, add separators and update copyrights. 2020-06-04 09:26:13 +02:00
enjoy-digital c4c8803f4f
Merge pull request #204 from antmicro/jboc/spd-read
Add DDR4 SPD EEPROM data parser
2020-06-04 08:54:59 +02:00
enjoy-digital 067e8a5eb3
Merge pull request #205 from antmicro/jboc/fifo
frontend/fifo: increase FIFO level only after data has actually been written
2020-06-04 08:41:04 +02:00
Jędrzej Boczar e5179eb9ab gen: fix LiteDRAMFIFO parameters 2020-06-03 17:39:45 +02:00
Jędrzej Boczar 8fedc3fcd2 frontend/fifo: increase FIFO level after data has actually been written 2020-06-03 16:13:28 +02:00
Florent Kermarrec 992f80c68b litedram_gen: add Ultrascale(+) support and KCU105 config file, remove cmd_delay on 7-series (not automatically calibrated). 2020-06-03 09:35:40 +02:00
Florent Kermarrec 361d250677 litedram_gen: avoid second S7PLL for iodelay clk, generate it from main S7PLL on CLKOUT0 (with fractional divide). 2020-06-03 09:04:00 +02:00
Florent Kermarrec 1b56dcf364 litedram_gen: add more memtype asserts, remove csr_alignment (now fixed to 32-bit). 2020-06-03 08:57:31 +02:00
Florent Kermarrec a595fe07f2 dfii: simplify control using CSRFields. 2020-06-02 16:31:33 +02:00
enjoy-digital 899462c864
Merge pull request #202 from ozbenh/sim-autoinit
Default to HW control for sim
2020-06-02 15:48:41 +02:00
Jędrzej Boczar 863c45a114 test/spd_data: add missing files to tracking 2020-06-02 15:19:53 +02:00
Jędrzej Boczar cbd90877b0 modules/spd: select tFAW_min_ck depending on page size 2020-06-02 12:19:38 +02:00
Jędrzej Boczar a8f2c044c9 modules: add DDR4SPDData parser 2020-06-02 12:16:41 +02:00
enjoy-digital d62fd24c81
Merge pull request #201 from antmicro/jboc/spd-read
modules/spd: save SPD data in SDRAMModule
2020-06-01 21:16:58 +02:00
Jędrzej Boczar 4233f86112 modules/spd: save SPD data in SDRAMModule to allow for runtime verification 2020-06-01 16:56:41 +02:00
Benjamin Herrenschmidt f3f89ed8d1 Default to HW control for sim
(needs corresponding sdram.c fix in litex)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-01 23:44:59 +10:00
Florent Kermarrec f23cb8056d litedram_gen: revert builder.build(..., regular_comb=False). 2020-05-27 19:56:00 +02:00
Florent Kermarrec d1db115d6c litedram_gen: review/simplify #197. 2020-05-27 19:42:40 +02:00
enjoy-digital a8e281f7c5
Merge pull request #197 from ozbenh/standalone-sim
Allow generation of a standalone sim model
2020-05-27 19:16:00 +02:00
enjoy-digital 83b9a1d798
Merge pull request #199 from antmicro/jboc/spd-read
modules: add function for parsing SPD EEPROM dumps from BIOS firmware
2020-05-27 14:57:16 +02:00
Benjamin Herrenschmidt d0f0c94652 phy/model: Don't generate empty mem_*.init files
When using the SDRAM PHY model without specified init data, the
generator still generates a bunch of $readmemh for each bank
reading mem.init, mem_1.init etc... all of which are 0-sized files.

This is cumbersome especially when using a standalone model in
an external project.

This is fixed by having the default bank_init be set to a list
of "None" rather than a list of empty lists.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-22 18:09:11 +10:00
Benjamin Herrenschmidt b8d6da534f gen: Allow generation of a standalone sim model
If the --sim argument is passed, this generates a model using
the simulation platform and simulated PHY.

Note: The data_width is set to 16 for now, which matches the
Arty. I haven't yet figured out how to extract that info from
the data we have in the .yml

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-22 18:09:06 +10:00
Jędrzej Boczar cbe91bcd41 modules: add function for parsing SPD EEPROM dumps from BIOS firmware 2020-05-21 16:18:34 +02:00
Florent Kermarrec 639a31fdd2 test/test_timing: update test_txxd_controller. 2020-05-20 23:40:01 +02:00
Florent Kermarrec 3c1ab76bbc litedram/common/tXXDController: only set reset to 1 when txxd is None.
This avoids triggering a warning/error with Yosys.
2020-05-19 13:10:32 +02:00
enjoy-digital e95af3f15b
Merge pull request #195 from enjoy-digital/bios-libs
Init: Generate DFII defines in sdram_phy.h
2020-05-19 08:18:38 +02:00
Florent Kermarrec fe48a9290c test/reference: update. 2020-05-19 08:16:11 +02:00
Florent Kermarrec c30910a9d2 init: generate DFII_CONTROL flags in sdram_phy.h instead of defining them in the BIOS. 2020-05-18 23:06:33 +02:00
Florent Kermarrec 5078b19bff core/crossbar: remove retro-compat > 6 months old. 2020-05-18 18:51:56 +02:00
Florent Kermarrec 3b105d512b modules: fix SDRAMRegisteredModule. 2020-05-15 21:39:00 +02:00
enjoy-digital b2a5685396
Merge pull request #189 from daveshah1/ddr4_rdimm_init
Add support for DDR4 RDIMMs
2020-05-15 21:34:43 +02:00
Florent Kermarrec 7ae4ad5b7d modules: add SDR/DDR/DDR2/DDR3/DDR4 SDRAMModule (and Registered versions). 2020-05-15 21:27:43 +02:00
Florent Kermarrec 1f7d9eb0b9 litedram_gen: pass FPGA speedgrade to iodelay_pll. 2020-05-14 11:44:32 +02:00
Jędrzej Boczar 22bd01c014 frontend/wishbone: simplify by reusing LiteDRAMNativePortConverter 2020-05-13 17:14:42 +02:00
Florent Kermarrec f4871b9f13 litedram_gen: use default settings on wb_bus. 2020-05-13 14:50:06 +02:00
Jędrzej Boczar b0bde294c0 frontend/wishbone: fix wb2native missing wdata.ready when wb/port data widths differ 2020-05-13 10:14:00 +02:00
Florent Kermarrec 6fb8396d8e litedram_gen: remove csr_base (no longer needed since CPUNone type will automatically set csr mapping to 0x00000000) and create a use bus with the same address_width as the main bus of the SoC.
For some use cases, we will want to have the CPU + wb_ctrl interface.
2020-05-13 09:41:48 +02:00
Jędrzej Boczar 79314f9549 frontend/wishbone: fix wdata.valid being high with old data, use cmd.last=1 2020-05-12 17:15:18 +02:00
Jędrzej Boczar 000a352079 frontend/adaptation: delay sending write commands to prevent data loss during up-conversion 2020-05-12 17:15:18 +02:00
Jędrzej Boczar 84fb7d338a frontend/adaptation: refactor up-converter logic to use FSM for clarity 2020-05-12 17:14:58 +02:00
Florent Kermarrec 94c215e852 litedram_gen: review/simplify #193, always add ddrctrl. 2020-05-12 16:21:04 +02:00
enjoy-digital f036ec2c26
Merge pull request #193 from ozbenh/standalone-cores
Improve standalone cores
2020-05-12 14:56:40 +02:00
Benjamin Herrenschmidt 04717b478b gen: Rename standalone core wishbone
Name it wb_ctrl rather than just wb, which makes the resulting
core signal names a bit more descriptive. IE. The DRAM control
bus (by opposition to the use/data buss(es).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:59:01 +10:00
Benjamin Herrenschmidt b0838f70e3 gen: Add option to specify CSR alignment
On some standalone core implementations, such with Microwatt,
the main system bus is 64-bit, but the wishbone to access the
CSRs is 32-bit.

To avoid extra logic & muxes and just wire these together, it's
useful to be able to specify a larger alignemnt (64-bit) for the
CSRs so that the generated csr.h contains the right offsets.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:58:13 +10:00
Benjamin Herrenschmidt d5a03b3d89 gen: Add option to generate DDRCTL on standalone cores
Microwatt will want that as it uses init_done to select whether
to run the SDRAM init code or the user code at reset.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:56:33 +10:00
Benjamin Herrenschmidt efad6b3ca5 gen: Add option to specify CSR base for standalone cores
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:55:05 +10:00
Benjamin Herrenschmidt c91cbb597d gen: Remove obsolete bus_expose config option
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-12 21:54:47 +10:00
Florent Kermarrec 4e539ad76e litedram_gen: switch to SoCCore. 2020-05-12 09:21:36 +02:00
Florent Kermarrec ac33d29727 litedram_gen: simplify and expose bus when CPU is set to None. 2020-05-12 09:07:59 +02:00
Florent Kermarrec fe478382e1 litedram_gen: expose a Bus Slave port instead of a CSR port.
The logic overhead is minimal and it makes things easier with more flexibility:
- since the main Bus is arbitrated, CPU and Bus Slave can coexist.
- integration is easier in LiteX.
- bridging to APB/AXI is easier.
2020-05-11 22:47:09 +02:00