gram.git
2 years agoPut sysclk2x back under system reset control
Raptor Engineering Development Team [Sun, 10 Apr 2022 02:31:27 +0000 (21:31 -0500)]
Put sysclk2x back under system reset control

2 years agoAvoid timing violation on ECP5 PHY PAUSE signal
Raptor Engineering Development Team [Sat, 9 Apr 2022 20:19:22 +0000 (15:19 -0500)]
Avoid timing violation on ECP5 PHY PAUSE signal

2 years agoRevert "Avoid timing violation on ECP5 PHY PAUSE signal"
Raptor Engineering Development Team [Sat, 9 Apr 2022 20:18:23 +0000 (15:18 -0500)]
Revert "Avoid timing violation on ECP5 PHY PAUSE signal"

This reverts commit 11d72971fc1656daa05abfa7ff33f697eb3d629f.

Inadvertently added debug garbage in this commit.

2 years agoAvoid timing violation on ECP5 PHY PAUSE signal
Raptor Engineering Development Team [Sat, 9 Apr 2022 20:01:28 +0000 (15:01 -0500)]
Avoid timing violation on ECP5 PHY PAUSE signal

2 years agoWire up missing CRG / DDR3 clock control / reset signals
Raptor Engineering Development Team [Sat, 9 Apr 2022 20:00:47 +0000 (15:00 -0500)]
Wire up missing CRG / DDR3 clock control / reset signals

Swap DELAYF for DELAYG on DQ lines

2 years agoRe-apply part of 180026c72f0e1d3ef365b2214288d4a543a238dd
Raptor Engineering Development Team [Thu, 7 Apr 2022 20:23:22 +0000 (15:23 -0500)]
Re-apply part of 180026c72f0e1d3ef365b2214288d4a543a238dd

The rank decoder inversion was incorrectly removed in
commit 03e79da11c95b3fa3a2e55a4c08af8521c4d2283

Tested to give valid memtest output over UART bridge

2 years agoBackport litedram 05ed5bf59d31029d3f91c5a348cdd539a150631b
Raptor Engineering Development Team [Thu, 7 Apr 2022 20:23:13 +0000 (15:23 -0500)]
Backport litedram 05ed5bf59d31029d3f91c5a348cdd539a150631b

phy/ecp5ddrphy: simplify using new get_sys_phase.

2 years agoWorking at 50MHz system clock
Raptor Engineering Development Team [Thu, 7 Apr 2022 18:39:38 +0000 (13:39 -0500)]
Working at 50MHz system clock

2 years agoSwitch CRG back over to ECP5 version
Raptor Engineering Development Team [Thu, 7 Apr 2022 18:38:59 +0000 (13:38 -0500)]
Switch CRG back over to ECP5 version

Memtest pass using external UART bridge

2 years agoPartially revert GIT hash 180026c72f0e1d3ef365b2214288d4a543a238dd
Raptor Engineering Development Team [Thu, 7 Apr 2022 18:38:53 +0000 (13:38 -0500)]
Partially revert GIT hash 180026c72f0e1d3ef365b2214288d4a543a238dd

UART bridge now gives a valid memtest

2 years agoProperly connect reset and cs signals
Raptor Engineering Development Team [Thu, 7 Apr 2022 18:38:01 +0000 (13:38 -0500)]
Properly connect reset and cs signals

Starting to get (corrupt) data out of the memory...

2 years agoAdd initial support for external DRAM init on the Raptor Versa ECP5-85 board
Raptor Engineering Development Team [Thu, 7 Apr 2022 18:32:41 +0000 (13:32 -0500)]
Add initial support for external DRAM init on the Raptor Versa ECP5-85 board

2 years agoinitialise bitslip with a specific value rather than an incrementor
Luke Kenneth Casson Leighton [Thu, 17 Mar 2022 12:52:50 +0000 (12:52 +0000)]
initialise bitslip with a specific value rather than an incrementor

2 years agoadd alternative variant of runsimsoc.sh
Luke Kenneth Casson Leighton [Thu, 17 Mar 2022 12:52:26 +0000 (12:52 +0000)]
add alternative variant of runsimsoc.sh

2 years agoadd 1024M_ddr3_parameters.vh for MT41K64M16
Luke Kenneth Casson Leighton [Sun, 13 Mar 2022 11:16:01 +0000 (11:16 +0000)]
add 1024M_ddr3_parameters.vh for MT41K64M16

2 years agoadd a 2nd clock, this one deliberately the
Luke Kenneth Casson Leighton [Fri, 11 Mar 2022 13:47:13 +0000 (13:47 +0000)]
add a 2nd clock, this one deliberately the
same frequency as the main one, for now

2 years agoannoyingly reverting reset_n naming back to reset
Luke Kenneth Casson Leighton [Fri, 11 Mar 2022 13:00:16 +0000 (13:00 +0000)]
annoyingly reverting reset_n naming back to reset

2 years agotidyup on gramWishbone class, add comments
Luke Kenneth Casson Leighton [Thu, 10 Mar 2022 12:33:15 +0000 (12:33 +0000)]
tidyup on gramWishbone class, add comments

2 years agotidy up gramWishbone constructor, pass Wishbone features to bus
Luke Kenneth Casson Leighton [Thu, 10 Mar 2022 12:20:24 +0000 (12:20 +0000)]
tidy up gramWishbone constructor, pass Wishbone features to bus

2 years agocode-cleanup and copyright notices
Luke Kenneth Casson Leighton [Thu, 10 Mar 2022 12:17:36 +0000 (12:17 +0000)]
code-cleanup and copyright notices

2 years agofix up simulation to be more like VERSA_ECP5
Luke Kenneth Casson Leighton [Tue, 1 Mar 2022 15:22:20 +0000 (15:22 +0000)]
fix up simulation to be more like VERSA_ECP5
* use MT4164M16 instead of MT41256M16
* add a Chip-Select line (dram_cs_n) which is currently inverted
* reduce the number of address lines in the simulated platform

2 years agoremove unneeded import
Luke Kenneth Casson Leighton [Mon, 28 Feb 2022 11:04:32 +0000 (11:04 +0000)]
remove unneeded import

2 years agouse dict for lookup of DFI to pads names
Luke Kenneth Casson Leighton [Sat, 26 Feb 2022 14:09:27 +0000 (14:09 +0000)]
use dict for lookup of DFI to pads names
add ras.reset=1

2 years agoadd missing reset-HI values to cas_n, cs_n, we_n and act_n
Luke Kenneth Casson Leighton [Sat, 26 Feb 2022 13:54:43 +0000 (13:54 +0000)]
add missing reset-HI values to cas_n, cs_n, we_n and act_n

2 years agoget chipselect (cs_n) name right in ECP5DDRPHY
Luke Kenneth Casson Leighton [Fri, 25 Feb 2022 18:48:34 +0000 (18:48 +0000)]
get chipselect (cs_n) name right in ECP5DDRPHY
has to have a minor workaround to adjust for DFI Interface being
named "cs_n" but nmigen-boards convention being "cs"

2 years agorestore naming convention "cs_r" on DFI Interface
Luke Kenneth Casson Leighton [Fri, 25 Feb 2022 18:31:02 +0000 (18:31 +0000)]
restore naming convention "cs_r" on DFI Interface

2 years agoset name of DFI interface to ecp5phy in ECP5DDRPHY
Luke Kenneth Casson Leighton [Fri, 25 Feb 2022 18:20:49 +0000 (18:20 +0000)]
set name of DFI interface to ecp5phy in ECP5DDRPHY

2 years agoallow DDR3 reset (rst) signal to be controlled by DFI commands,
Luke Kenneth Casson Leighton [Fri, 25 Feb 2022 01:21:42 +0000 (01:21 +0000)]
allow DDR3 reset (rst) signal to be controlled by DFI commands,
update icarus simulation to match, and
rename dfi.Interface reset signal to reset_n

2 years agoadd a BitSlip module
Luke Kenneth Casson Leighton [Thu, 24 Feb 2022 17:55:22 +0000 (17:55 +0000)]
add a BitSlip module

2 years agoreplace the simulation Clock-Reset-Generator with one that is more general.
Luke Kenneth Casson Leighton [Thu, 24 Feb 2022 17:55:05 +0000 (17:55 +0000)]
replace the simulation Clock-Reset-Generator with one that is more general.
the icarus verilog simulation now passes where previously it did not

2 years agoadd CSRs to FakePHY which allows at least testing of firmware as-is
Luke Kenneth Casson Leighton [Thu, 24 Feb 2022 17:52:16 +0000 (17:52 +0000)]
add CSRs to FakePHY which allows at least testing of firmware as-is
the burstdet and read-delay get read and written, do nothing, but it
is better than having to modify the dram firmware

2 years agoremove continue/skip and add comment that all
Luke Kenneth Casson Leighton [Tue, 22 Feb 2022 12:56:59 +0000 (12:56 +0000)]
remove continue/skip and add comment that all
control pins have to be requested "xdr:4"

2 years agoadd debug print statements to investigate FakePHY
Luke Kenneth Casson Leighton [Mon, 21 Feb 2022 18:41:52 +0000 (18:41 +0000)]
add debug print statements to investigate FakePHY
add some more names on dfi.Interface instances, again to see what is
going on in gtkwave traces of SocTest nmigen simulation

2 years agoadd a debug verilog dump of one of the FakePHY SocTest cases
Luke Kenneth Casson Leighton [Mon, 21 Feb 2022 18:41:09 +0000 (18:41 +0000)]
add a debug verilog dump of one of the FakePHY SocTest cases
to see what is going on

2 years agoadd dfii submodules so they get explicit names
Luke Kenneth Casson Leighton [Sun, 20 Feb 2022 01:32:09 +0000 (01:32 +0000)]
add dfii submodules so they get explicit names

2 years agoadd name to DFI Interface (helps gtkwave traces)
Luke Kenneth Casson Leighton [Sun, 20 Feb 2022 01:04:53 +0000 (01:04 +0000)]
add name to DFI Interface (helps gtkwave traces)

2 years agofix gram unit test imports
Luke Kenneth Casson Leighton [Sat, 19 Feb 2022 23:48:32 +0000 (23:48 +0000)]
fix gram unit test imports

2 years agofix ECP5DDRPHY cs declaration
Luke Kenneth Casson Leighton [Wed, 16 Feb 2022 12:33:11 +0000 (12:33 +0000)]
fix ECP5DDRPHY cs declaration

4 years agogram.test.test_core_bankmachine: Reduce formal test depth
Jean THOMAS [Fri, 7 Aug 2020 19:29:02 +0000 (21:29 +0200)]
gram.test.test_core_bankmachine: Reduce formal test depth

4 years agoAdd links to other memory controller projects
Jean THOMAS [Fri, 7 Aug 2020 18:35:47 +0000 (20:35 +0200)]
Add links to other memory controller projects

4 years agogram.core.multiplexer: Fix variable name in _Steerer
Jean THOMAS [Fri, 7 Aug 2020 17:51:53 +0000 (19:51 +0200)]
gram.core.multiplexer: Fix variable name in _Steerer

4 years agogram.test.test_core_multiplexer: Add test for _Steerer (fixing #7)
Jean THOMAS [Fri, 7 Aug 2020 16:57:12 +0000 (18:57 +0200)]
gram.test.test_core_multiplexer: Add test for _Steerer (fixing #7)

4 years agogram.core.multiplexer: Remove unnecessary array slicing
Jean THOMAS [Fri, 7 Aug 2020 16:31:19 +0000 (18:31 +0200)]
gram.core.multiplexer: Remove unnecessary array slicing

4 years agogram.core.multiplexer: Code cleaning in _Steerer
Jean THOMAS [Fri, 7 Aug 2020 16:23:37 +0000 (18:23 +0200)]
gram.core.multiplexer: Code cleaning in _Steerer

4 years agogram.core.multiplexer: Cleaner code in _Steerer
Jean THOMAS [Fri, 7 Aug 2020 16:17:35 +0000 (18:17 +0200)]
gram.core.multiplexer: Cleaner code in _Steerer

4 years agoexamples: Display rdly map
Jean THOMAS [Fri, 7 Aug 2020 16:10:54 +0000 (18:10 +0200)]
examples: Display rdly map

4 years agogram.test.test_core_bankmachine: Ensure refresh_gnt isn't asserted if there is no...
Jean THOMAS [Fri, 7 Aug 2020 16:04:29 +0000 (18:04 +0200)]
gram.test.test_core_bankmachine: Ensure refresh_gnt isn't asserted if there is no refresh request (fixing #7)

4 years agogram.core.bankmachine: Make condition code cleaner
Jean THOMAS [Fri, 7 Aug 2020 15:28:41 +0000 (17:28 +0200)]
gram.core.bankmachine: Make condition code cleaner

4 years agogram.core.bankmachine: Add comment for address slicers
Jean THOMAS [Fri, 7 Aug 2020 15:27:51 +0000 (17:27 +0200)]
gram.core.bankmachine: Add comment for address slicers

4 years agogram.core.bankmachine: Remove unused local variables in BankMachine
Jean THOMAS [Fri, 7 Aug 2020 15:13:01 +0000 (17:13 +0200)]
gram.core.bankmachine: Remove unused local variables in BankMachine

4 years agogram.core.bankmachine: Rename LiteDRAM -> gram in documentation
Jean THOMAS [Fri, 7 Aug 2020 14:40:58 +0000 (16:40 +0200)]
gram.core.bankmachine: Rename LiteDRAM -> gram in documentation

4 years agogram.test.test_core_bankmachine: Add test for _AddressSlicer (fixing #7)
Jean THOMAS [Fri, 7 Aug 2020 14:19:39 +0000 (16:19 +0200)]
gram.test.test_core_bankmachine: Add test for _AddressSlicer (fixing #7)

4 years agogram.test.test_core_refresher: Add test for ZQCSExecuter (fixing #7)
Jean THOMAS [Fri, 7 Aug 2020 14:02:03 +0000 (16:02 +0200)]
gram.test.test_core_refresher: Add test for ZQCSExecuter (fixing #7)

4 years agogram.phy.ecp5ddrphy: Fix ECP5DDRPHYInit (wrong domains)
Jean THOMAS [Fri, 7 Aug 2020 11:57:35 +0000 (13:57 +0200)]
gram.phy.ecp5ddrphy: Fix ECP5DDRPHYInit (wrong domains)

4 years agogram.phy.ecp5ddrphy: Remove internal signal for delay
Jean THOMAS [Fri, 7 Aug 2020 10:33:06 +0000 (12:33 +0200)]
gram.phy.ecp5ddrphy: Remove internal signal for delay

4 years agogram.phy.ecp5ddrphy: Detect burstdet on rising edge, not by logic level
Jean THOMAS [Fri, 7 Aug 2020 10:24:09 +0000 (12:24 +0200)]
gram.phy.ecp5ddrphy: Detect burstdet on rising edge, not by logic level

4 years agoexamples: Load stock calibration profile if calibration failed
Jean THOMAS [Thu, 6 Aug 2020 16:49:19 +0000 (18:49 +0200)]
examples: Load stock calibration profile if calibration failed

4 years agogram.phy.ecp5ddrphy: Make non-critical signals reset-less
Jean THOMAS [Thu, 6 Aug 2020 15:28:41 +0000 (17:28 +0200)]
gram.phy.ecp5ddrphy: Make non-critical signals reset-less

4 years agogram.phy.ecp5ddrphy: Revert to LiteDRAM's dqs_re
Jean THOMAS [Thu, 6 Aug 2020 15:28:03 +0000 (17:28 +0200)]
gram.phy.ecp5ddrphy: Revert to LiteDRAM's dqs_re

4 years agogram.core.multiplexer: Fix regression introduced in 7d8339c
Jean THOMAS [Thu, 6 Aug 2020 15:22:49 +0000 (17:22 +0200)]
gram.core.multiplexer: Fix regression introduced in 7d8339c

4 years agoexamples: Make frequency a parameter
Jean THOMAS [Thu, 6 Aug 2020 15:16:10 +0000 (17:16 +0200)]
examples: Make frequency a parameter

4 years agoexamples: Continue self-test even if calibration is unsuccessful
Jean THOMAS [Thu, 6 Aug 2020 14:57:47 +0000 (16:57 +0200)]
examples: Continue self-test even if calibration is unsuccessful

4 years agogram.phy.ecp5ddrphy: Remove unused stream import
Jean THOMAS [Thu, 6 Aug 2020 11:15:19 +0000 (13:15 +0200)]
gram.phy.ecp5ddrphy: Remove unused stream import

4 years agogram.phy.ecp5ddrphy: Add documentation for _DQSBUFMSettingManager
Jean THOMAS [Thu, 6 Aug 2020 10:43:10 +0000 (12:43 +0200)]
gram.phy.ecp5ddrphy: Add documentation for _DQSBUFMSettingManager

4 years agogram.test: Use correct timing for simulations
Jean THOMAS [Thu, 6 Aug 2020 10:30:21 +0000 (12:30 +0200)]
gram.test: Use correct timing for simulations

4 years agogram.phy.ecp5ddrphy: Fix DQSBUFM's pause signal (fixes #51)
Jean THOMAS [Thu, 6 Aug 2020 10:28:13 +0000 (12:28 +0200)]
gram.phy.ecp5ddrphy: Fix DQSBUFM's pause signal (fixes #51)

4 years agogram.phy.ecp5ddrphy: Code cleaning
Jean THOMAS [Thu, 6 Aug 2020 09:59:26 +0000 (11:59 +0200)]
gram.phy.ecp5ddrphy: Code cleaning

4 years agogram.core.bankmachine: Factorize tXXDController valid signal
Jean THOMAS [Wed, 5 Aug 2020 14:44:43 +0000 (16:44 +0200)]
gram.core.bankmachine: Factorize tXXDController valid signal

4 years agoFix code styling
Jean THOMAS [Wed, 5 Aug 2020 14:37:38 +0000 (16:37 +0200)]
Fix code styling

4 years agoRemove steerer_sel function
Jean THOMAS [Wed, 5 Aug 2020 13:36:19 +0000 (15:36 +0200)]
Remove steerer_sel function

4 years agoFix test using delays for comb propagation instead of additional clock pulses
Jean THOMAS [Wed, 5 Aug 2020 13:33:01 +0000 (15:33 +0200)]
Fix test using delays for comb propagation instead of additional clock pulses

4 years agoAdd unit test for tXXDController
Jean THOMAS [Wed, 5 Aug 2020 12:54:30 +0000 (14:54 +0200)]
Add unit test for tXXDController

4 years agoFix AntiStarvation test
Jean THOMAS [Tue, 4 Aug 2020 15:24:51 +0000 (17:24 +0200)]
Fix AntiStarvation test

4 years agoFix exception condition
Jean THOMAS [Tue, 4 Aug 2020 13:57:38 +0000 (15:57 +0200)]
Fix exception condition

4 years agoRaise ValueError if the number of DQ pads is not a multiple of 8 (fixing #48)
Jean THOMAS [Tue, 4 Aug 2020 13:48:24 +0000 (15:48 +0200)]
Raise ValueError if the number of DQ pads is not a multiple of 8 (fixing #48)

4 years agoRaise ValueError if RefreshTimer period is unsupported (fixing #48)
Jean THOMAS [Tue, 4 Aug 2020 13:47:08 +0000 (15:47 +0200)]
Raise ValueError if RefreshTimer period is unsupported (fixing #48)

4 years agoRaise ValueError if anti-starvation timeout is unsupported (fixing #48)
Jean THOMAS [Tue, 4 Aug 2020 13:45:37 +0000 (15:45 +0200)]
Raise ValueError if anti-starvation timeout is unsupported (fixing #48)

4 years agoRaise ValueError if commands array isn't of len=4 (fixing #48)
Jean THOMAS [Tue, 4 Aug 2020 13:43:56 +0000 (15:43 +0200)]
Raise ValueError if commands array isn't of len=4 (fixing #48)

4 years agoSample data based on datavalid signal (fixes #47)
Jean THOMAS [Tue, 4 Aug 2020 13:37:08 +0000 (15:37 +0200)]
Sample data based on datavalid signal (fixes #47)

4 years agoRaise exception if no native port is present (fixing #48)
Jean THOMAS [Tue, 4 Aug 2020 13:27:40 +0000 (15:27 +0200)]
Raise exception if no native port is present (fixing #48)

4 years agoMake burstdet_reg reset-less
Jean THOMAS [Tue, 4 Aug 2020 12:14:24 +0000 (14:14 +0200)]
Make burstdet_reg reset-less

4 years agoFix simulation to support diff pairs
Jean THOMAS [Tue, 4 Aug 2020 11:24:11 +0000 (13:24 +0200)]
Fix simulation to support diff pairs

4 years agoFix sel signal used in wishbone frontend
Jean THOMAS [Tue, 4 Aug 2020 10:00:53 +0000 (12:00 +0200)]
Fix sel signal used in wishbone frontend

4 years agoDefault SEL to 1's if SEL=0 (fixes #43)
Jean THOMAS [Tue, 4 Aug 2020 09:29:28 +0000 (11:29 +0200)]
Default SEL to 1's if SEL=0 (fixes #43)

4 years agoRemove unused variable in wishbone frontend test
Jean THOMAS [Tue, 4 Aug 2020 09:28:50 +0000 (11:28 +0200)]
Remove unused variable in wishbone frontend test

4 years agoAdd additional tests for sel signal
Jean THOMAS [Mon, 3 Aug 2020 20:05:44 +0000 (22:05 +0200)]
Add additional tests for sel signal

4 years agoAdd more sel tests
Jean THOMAS [Mon, 3 Aug 2020 16:03:26 +0000 (18:03 +0200)]
Add more sel tests

4 years agoFix native port we signal (fixes #44)
Jean THOMAS [Mon, 3 Aug 2020 15:51:43 +0000 (17:51 +0200)]
Fix native port we signal (fixes #44)

4 years agoFix sel test
Jean THOMAS [Mon, 3 Aug 2020 15:51:13 +0000 (17:51 +0200)]
Fix sel test

4 years agoAdd test for wishbone sel signal
Jean THOMAS [Mon, 3 Aug 2020 15:47:09 +0000 (17:47 +0200)]
Add test for wishbone sel signal

4 years agoRevert to dqs_re from LiteDRAM
Jean THOMAS [Mon, 3 Aug 2020 11:46:34 +0000 (13:46 +0200)]
Revert to dqs_re from LiteDRAM

4 years agoUse const qualifier for gram_read/gram_write
Jean THOMAS [Mon, 3 Aug 2020 11:39:04 +0000 (13:39 +0200)]
Use const qualifier for gram_read/gram_write

4 years agoUpdate setup.py (based on LUNA)
Jean THOMAS [Mon, 3 Aug 2020 11:35:50 +0000 (13:35 +0200)]
Update setup.py (based on LUNA)

4 years agoUse mainstream ECPIX5 platform file (fixing #38)
Jean THOMAS [Mon, 3 Aug 2020 11:29:44 +0000 (13:29 +0200)]
Use mainstream ECPIX5 platform file (fixing #38)

4 years agoUse -Werror
Jean THOMAS [Mon, 3 Aug 2020 11:25:48 +0000 (13:25 +0200)]
Use -Werror

4 years agoFix memtest abort
Jean THOMAS [Mon, 3 Aug 2020 11:05:42 +0000 (13:05 +0200)]
Fix memtest abort

4 years agoAdd auto calibration result check, abort memtest if more than 10 fails
Jean THOMAS [Mon, 3 Aug 2020 11:02:07 +0000 (13:02 +0200)]
Add auto calibration result check, abort memtest if more than 10 fails

4 years agoDon't test the same rdly twice
Jean THOMAS [Mon, 3 Aug 2020 10:57:40 +0000 (12:57 +0200)]
Don't test the same rdly twice

4 years agoFix pointer bug
Jean THOMAS [Mon, 3 Aug 2020 10:57:24 +0000 (12:57 +0200)]
Fix pointer bug

4 years agoRemove we_n from xdr list
Jean THOMAS [Mon, 3 Aug 2020 10:45:01 +0000 (12:45 +0200)]
Remove we_n from xdr list