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

sdram controller #58

Open
hstarmans opened this issue Jan 11, 2017 · 1 comment
Open

sdram controller #58

hstarmans opened this issue Jan 11, 2017 · 1 comment

Comments

@hstarmans
Copy link
Contributor

hstarmans commented Jan 11, 2017

Abstract
Conversion is not possible sdram_sdr_controller is not finished

Dear all,

I am trying to test the rhea sdram controller on the xula2-lx25. I have already done a successful test with the sdram controller of @udara28, see sdram controlller, who was coached in a Google Summer code 2015 by @devbisme.
The sdram interface of udara is similar to the sdram interface of @cfelton see here; both are based upon xesscorp.
I am, however, unable to get a conversion with rhea.

from myhdl import instances, always_seq, block, Signal, ResetSignal
from rhea.system import Wishbone
from rhea import Global
from rhea.cores.sdram import SDRAMInterface, sdram_sdr_controller


@block
def sdramtest(clock, clock_sdram, reset):
    # Interfaces to the modules
    glbl=Global(clock=clock, reset=reset)
    ixbus=Wishbone(glbl=glbl, data_width=16,address_width=12) #see: Winboad_W9812G6JH_75
    exbus=SDRAMInterface()
    exbus.clk=clock_sdram  # TODO: The sdram clock should be linked somehow to the xula clock
    tbdut=sdram_sdr_controller(clock,reset,ibus=ixbus,extram=exbus)

    return instances()

if __name__=="__main__":
    clock=Signal(bool(0))
    clock_sdram = Signal(bool(0))
    reset=ResetSignal(1,active=0,async=True)
    inst=sdramtest(clock, clock_sdram, reset)
    inst.convert(hdl='Verilog')

The code fails AttributeError: 'SDRAMInterface' object has no attribute 'lock'.

In sdram_sdr_controller:
line 60: sdram.lock but SDRAMInterface does not have this attribute
line 81: In line 81 of sdram_sdr_controller, the following default portmap is defined;
'extmem': SDRAMInterface(clock)
However; SDRAMInterface does not accept clock.

Furthermore, in Rhea's SDRAMInterface, the functions load_mode and precharge are not present. Rhea does seem to have a placeholder for them in the dictionary "Commands"; LMR and PRE, i.e. Load Mode Register and Precharge. Rhea also defines two types of writes; controller side and a side identified as _. The functions _read and _write are slightly different from read and write in Udara's work.

Conclusion
Conversion is not possible sdram_sdr_controller is not finished

@cfelton
Copy link
Owner

cfelton commented Jan 12, 2017

@hstarmans yes the SDRAM controller in rhea is not complete - I must have made a mistake merging some of it in to the main branch (should only be available as WIP on the sdram branch)? It is essentially a port of @udara28's version but using some of the framework in rhea.

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

No branches or pull requests

2 participants