Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back testing in gram #7

Open
jeanthom opened this issue Jun 10, 2020 · 5 comments
Open

Bring back testing in gram #7

jeanthom opened this issue Jun 10, 2020 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@jeanthom
Copy link
Owner

During the LiteDRAM -> dram I ditched all the simulation/test files. This is quite problematic, and should be addressed ASAP.

Ideas:

  • Formal verification whenever possible
  • Use SV models (Micron offers one)
    • HowTo SV with FOSS tools? HowTo DDR I/O modeling for the ECP5?
@jeanthom
Copy link
Owner Author

https://github.com/awersatos/AD/tree/master/Library/HDL%20Simulation/Lattice%20ispLEVER%208.0%20Verilog%20Libraries/ovi_ecp3/src has DDR models for ECP3. Can we reuse those models, or produce similar models for the ECP5?

@jeanthom jeanthom added the enhancement New feature or request label Jun 16, 2020
@jeanthom jeanthom added this to the Cleaner gram milestone Jun 23, 2020
@jeanthom
Copy link
Owner Author

Lattice Diamond provides simulation libraries for the ECP5 (in /usr/local/diamond/3.11_x64/ispfpga/verilog/data/ecp5u):

ALU24A.v
ALU24B.v
ALU54A.v
ALU54B.v
AND2.v
AND3.v
AND4.v
AND5.v
BBPD.v
BBPU.v
BB.v
BCINRD.v
BCLVDSOB.v
BUFBA.v
CCU2C.v
CLKDIVF.v
DCCA.v
DCSC.v
DDRDLLA.v
DELAYF.v
DELAYG.v
DLLDELD.v
DP16KD.v
DPR16X4C.v
DQSBUFM.v
DTR.v
ECLKBRIDGECS.v
ECLKSYNCB.v
EHXPLLL.v
EXTREFB.v
FD1P3AX.v
FD1P3AY.v
FD1P3BX.v
FD1P3DX.v
FD1P3IX.v
FD1P3JX.v
FD1S3AX.v
FD1S3AY.v
FD1S3BX.v
FD1S3DX.v
FD1S3IX.v
FD1S3JX.v
FL1P3AY_FUNC.v
FL1P3AY.v
FL1P3AZ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_X.v
UDFDL6SP_UDP_X.v
UDFDL7E_UDP_X.v
UDFDL7SP_UDP_X.v
UDFDL7_UDP_X.v
USRMCLK.v
VHI.v
VLO.v
XNOR2.v
XNOR3.v
XNOR4.v
XNOR5.v
XOR11.v
XOR21.v
XOR2.v
XOR3.v
XOR4.v
XOR5.v

@jeanthom
Copy link
Owner Author

PoC code with Lattice ECP5 instances published in 0c6d000

@jeanthom
Copy link
Owner Author

jeanthom commented Jul 6, 2020

Currently our simulation code is quite slow because we're using unsynthesizable code in Icarus Verilog. We could use a synthesizable model to make things faster. There's this one which is opensource: https://github.com/freecores/ddr3_synthesizable_bfm

But it isn't flexible enough to emulate a RAM chip with two (or more) DQS signals.

@jeanthom
Copy link
Owner Author

jeanthom commented Aug 7, 2020

Untested classes:

  • gram.core
    • gramCore
    • gram.core.bankmachine
      • _AddressSlicer
      • BankMachine
    • gram.core.controller
      • ControllerSettings
      • gramController
    • gram.core.crossbar
      • gramCrossbar
    • gram.core.multiplexer
      • _CommandChooser
      • _Steerer
      • Multiplexer
    • gram.core.refresher
      • ZQCSExecuter
      • Refresher
  • gram.phy
    • ECP5DDRPHYInit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant