Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
startnexys3
Posts: 18
Registered: ‎04-02-2012
0

Problem about write and read data from the psram on the Nexys3

Hi experts

I am a  newer in FPGA.Using the Nexys3 board to learn the abc. Recently i try to write a program to communicate with the PSRAM on the Nexys3.I find it is deadly hard to do that,no mater how i modify the code,it doesn't work.I add a UART to send the data to pc and found that  the data i read from the psram that i writed  are all ZERO  ??

Would you please tell me what's wrong with my code?

 

here are my code and the psram' s datasheet.

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Problem about write and read data from the psram on the Nexys3

[ Edited ]

Did you simulate your design to verify

  • correct reception by the UART
  • writing correct data to the correct psram address
  • reading correct address from the psram
  • sending correct data by the UART
  • resets and clocks working correctly

You mentioned that you added a UART to the design, but the base design should include a UART.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Regular Visitor
startnexys3
Posts: 18
Registered: ‎04-02-2012
0

Re: Problem about write and read data from the psram on the Nexys3

i count from 0 to 20 and write the number into the ram,then,the next 20 counts,i read from the ram.I have simulated and found that the address bus and timing seems have no question.so i generate the bit directly and program the spartan6.

       I have tested that uart work correctly, i think that the problem may lie in the communication with the ram.I also enable the led to show the data,but all the leds is off,when processing read.

       I read from the datasheet that it access time is both 70ns.so i use the state machine to read and write.i count from 0 to 9 ,when 1,i set the address , give data and pull down the cs and we, when 8, the write is finished.so i pull up the cs and we.read data is similar.

     sense that the nexys3's clk is 100mhz, the write and read time is meetted.so i really don't konw what's wrong.

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Problem about write and read data from the psram on the Nexys3

If you truly believe that you have done a thorough job of verifying your design with logic simulation, and your design does not function as simulated, then you have few options.  The first option is to verify with an oscilloscope (or ChipScope) that the hardware matches the simulation.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Regular Visitor
startnexys3
Posts: 18
Registered: ‎04-02-2012
0

Re: Problem about write and read data from the psram on the Nexys3

ok  i'll try a chipscope latter.

Regular Visitor
startnexys3
Posts: 18
Registered: ‎04-02-2012
0

Re: Problem about write and read data from the psram on the Nexys3

i try nearly one day to learn to use the chipscope and found that data writen is right, but read is all zero :-(

so i think that the timing must have problem,here is my simulation on writing screen shoot, can you see anyting wrong on it?timming.png

 

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Problem about write and read data from the psram on the Nexys3

i try nearly one day to learn to use the chipscope and found that data writen is right, but read is all zero

 

Until you can correctly read the data which has been written, you do not know with certainty that the data is correctly written.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Visitor
andrewsi
Posts: 20
Registered: ‎02-05-2012

Re: Problem about write and read data from the psram on the Nexys3

I recently created a Verilog module for the Nexys 3 which successfully does simple PSRAM reads and writes and should be reasonably easy to integrate into another design as long as you don't also need to use the flash chip that shares the same lines. I would be happy to share this with you, except I'm away from home (and my source code) until next Monday. Can you wait until then? FYI- there is a Verilog simulation model that you can use with ISim on the same Micron page as the datasheet, it'll tell you if you've violated important timing parameters or when you've read or written data successfully in the console area. This was extremely useful for me to get my own code working properly. Andy
Regular Visitor
startnexys3
Posts: 18
Registered: ‎04-02-2012
0

Re: Problem about write and read data from the psram on the Nexys3

:-)  while waitting for you, I try the FYI first.

Regular Visitor
startnexys3
Posts: 18
Registered: ‎04-02-2012
0

Re: Problem about write and read data from the psram on the Nexys3

:-(  It sense that Micron has stop to provide the FYI  up until now I can't find the simulate model.