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

Clarification on SDRAM chip on ULX3S for Litex #50

Closed
darkstar007 opened this issue Dec 30, 2021 · 7 comments
Closed

Clarification on SDRAM chip on ULX3S for Litex #50

darkstar007 opened this issue Dec 30, 2021 · 7 comments

Comments

@darkstar007
Copy link

Hi,
I was following learn-fpga/FemtoRV/TUTORIALS/litex.md and it says:

determine SDRAM chip (see image): one of MT48LC16M16, AS4C32M16 or AS4C16M16

However, mine, like the majority of ULX3S has a IS42S16160G in them (see here at the bottom of the page)

Could these instructions be updated to state what value the SDRAM variable should be set to for this case?

Thanks,
Matt

@BrunoLevy
Copy link
Owner

Hi Matt,

From what I'm seeing in the tech sheet, it seems that IS42S16160G is very similar to the other chips supported by LiteX (except that it supports higher freq). There are good chances that it can work with one of the other chips supported by LiteX, did you try ? LiteX BIOS has a sdram_test command that can help detecting if something goes wrong.

Best,
-- Bruno

@darkstar007
Copy link
Author

Hi Bruno,

sdram_test didn't work with AS4C32M16, it worked with MT48LC16M16 (but only tested first megabyte - not sure if that's expected). Not tried AS4C16M16 yet - got sidetracked by food....will try shortly.

Thanks,
Matt

@darkstar007
Copy link
Author

AS4C16M16 also appears to work - and also only 1Mbyte is tested.

@BrunoLevy
Copy link
Owner

LiteX BIOS has several commands to do various tests.

litex> mem_list
will show the different memories projected into address space.
MAIN_RAM is the SDRAM (starts at address 0x40000000)

then you can do:
mem_test

you can also do:
mem_speed

@darkstar007
Copy link
Author

Using MT48LC16M16 I get

litex> mem_list
Available memory regions:
ROM       0x00000000 0x20000 
SRAM      0x01000000 0x2000 
MAIN_RAM  0x40000000 0x2000000 
CSR       0x82000000 0x10000 

litex> mem_test 0x40000000 0x2000000 
Memtest at 0x40000000 (32.0MiB)...
  Write: 0x40000000-0x42000000 32.0MiB    
   Read: 0x40000000-0x42000000 32.0MiB    
Memtest OK

litex> mem_speed 0x40000000 0x2000000 
Memspeed at 0x40000000 (Sequential, 32.0MiB)...
  Write speed: 4.8MiB/s
   Read speed: 6.4MiB/s

So its all probably working....

@BrunoLevy
Copy link
Owner

Sounds good !
Thank you for the update.
Normally these memory chips share many characteristic. You'll tell me whether the demos work (added the missing demos.h file), and I'll add a note in the doc that
"--sdram-module MT48LC16M16" can work for IS42S16160G.

@darkstar007
Copy link
Author

Just tried the demos and they seem fine.

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