FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6343 Discussions

Generic Serial Flash Interface : writing to EPCQ bigger than 256MB problem

IMura
Novice
1,094 Views

I am trying to write to an EPCQL512 using the Generic Serial Flash Interface that I instantiated in my Arria 10 HPS. The problem is the Generic Serial Flash Interface creates the avl_mem and avl_csr, and that the avl_mem only has the span of 0x4000000. With 32bit word, we have 256Mb addressable. How can we then address the other parts of the EPCQ?

Thank you

0 Kudos
12 Replies
YuanLi_S_Intel
Employee
744 Views

Hi Izami,

 

Are you saying that the size of address from 0x08000000 to 0x0bffffff is not enough due to 32 bit and 256MB addressable?

 

I think there is some misunderstanding on this. The avl_csr, avl_mem is the address to access to CSR and MEM register. All you need to do is, assign different address for all the register, then write the data to the register in HPS.

 

Thank You.

 

Regards,

YL

0 Kudos
IMura
Novice
744 Views

Hi Yl,

I think I am starting to not understand this avl_mem at all. I thought that theses busses were byte addressed so because I am able to address the csr registers without any problems, avl_csr has the span of 0x00000100 or 256 bytes so all the 32 bits of the registers 0x0 -> 0xD or 52 bytes can be addressed without any problems .

 

For avl_mem , what does it actually correspond to?

I thought that the address that I put on the avl_mem_addr was the address for the EPCQ flash memory so it should reflect the whole EPCQ memory space. I have no problem for the CSR registers, but for MEM, I still can't figure out how to access the byte 0x10000000/ 268435456/ 256M and beyond on the EPCQL since putting this address on the avl_mem_addr means that it's already outside of the 0x04000000 span. It's even worse if I consider the span to be byte span : this makes it only 64Mb addressable?

 

Thank you for helping me with this

 

Regards

0 Kudos
IMura
Novice
744 Views

Hello,

I am still trying to access this area of the memory. Maybe if you can just liste the step of how to read the 32bit word of the byte address h10000004?

0 Kudos
YuanLi_S_Intel
Employee
744 Views

Hi Izami,

 

Perhaps picture speaks more than thousand words. I have a video to guide user how to use generic serial flash interface. Can you please look at it?

 

Declare register address for avl_mem & avl_csr:

https://www.youtube.com/watch?v=QLLyTAH05bU (5.38 min)

 

Step to read data:

https://www.youtube.com/watch?v=QLLyTAH05bU (17.42 min)

 

Please let me know if you have any further question.

 

Regards,

YL

0 Kudos
IMura
Novice
744 Views

Hi YL,

I did re-watch the video. again I am repeating the same thing :

at 17.50min, see how to address the memory, you put the byte address in the &addr of the avl_mem? now since avl_mem's span is 0x04000000, how do you put an address BIGGER than base+0x04000000?

 

Regards

0 Kudos
YuanLi_S_Intel
Employee
744 Views

Hi Izami,

 

Apologize i dont understand about this. "at 17.50min, see how to address the memory, you put the byte address in the &addr of the avl_mem? now since avl_mem's span is 0x04000000,"

 

Can you please clarify?

0 Kudos
IMura
Novice
744 Views

Hi YL,

 

Sorry, English is not my first language.

 

To make it simple and to avoid repeating the same things, maybe you can try to write down the tcl command to write 0xABCDEF at byte address 536870912 of the ecpql 512, if you please?

 

Thanks

0 Kudos
YuanLi_S_Intel
Employee
744 Views

HI Izami,

 

The TCL command to write data 0xABCDEF to address of 0x536870912 is:

 

master_write_32 $mp 0x00ABCDEF 0x536870912

 

Another thing i noticed is that the address. EPCQ-L is using 4 byte addressing. Thus, you cannot write to 0x536870912. You need to write to 0x0 then the subsequent address is 0x4 and so on.

 

Thank You.

 

0 Kudos
IMura
Novice
744 Views

Hi YL,

 

Thank you,

However, when I wrote the byte address without the "0x" prefix, I meant the address in decimal base so 536870912  = in hexa 0x20000000 which is still a 4Byte address so your answer doesn't really help me much.

 

How do I address this then?

 

Thank you

0 Kudos
YuanLi_S_Intel
Employee
744 Views

Hi Izami,

 

Can you try this?

master_write_32 $mp 0x00ABCDEF 0x20000000

 

Thank You,

0 Kudos
IMura
Novice
744 Views

Hi YL

Thanks for the quick reply

 

Doing that, we go outside of the address span : Quartus gives the span 0x04000000 and Quartus normally gives 32 bit Word address, so in byte address, the span is 0x10000000 (yes in HEX).

master_write_32 $mp 0x00ABCDEF 0x20000000 will write OUTSIDE of this span.

 

So it wont work.

0 Kudos
YuanLi_S_Intel
Employee
744 Views

Hi Izami,

 

The address is just the address for the FIFO. Have you tried to write? Is the error still existed?

 

Thank You.

0 Kudos
Reply