Forum Discussion

IMura's avatar
IMura
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

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

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

12 Replies

  • YuanLi_S_Intel's avatar
    YuanLi_S_Intel
    Icon for Regular Contributor rankRegular Contributor

    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

    • IMura's avatar
      IMura
      Icon for Occasional Contributor rankOccasional Contributor

      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

  • IMura's avatar
    IMura
    Icon for Occasional Contributor rankOccasional Contributor

    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?

    • IMura's avatar
      IMura
      Icon for Occasional Contributor rankOccasional Contributor

      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

  • YuanLi_S_Intel's avatar
    YuanLi_S_Intel
    Icon for Regular Contributor rankRegular Contributor

    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?

  • IMura's avatar
    IMura
    Icon for Occasional Contributor rankOccasional Contributor

    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

  • YuanLi_S_Intel's avatar
    YuanLi_S_Intel
    Icon for Regular Contributor rankRegular Contributor

    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.

  • IMura's avatar
    IMura
    Icon for Occasional Contributor rankOccasional Contributor

    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

  • YuanLi_S_Intel's avatar
    YuanLi_S_Intel
    Icon for Regular Contributor rankRegular Contributor

    Hi Izami,

    Can you try this?

    master_write_32 $mp 0x00ABCDEF 0x20000000

    Thank You,

    • IMura's avatar
      IMura
      Icon for Occasional Contributor rankOccasional Contributor

      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.

  • YuanLi_S_Intel's avatar
    YuanLi_S_Intel
    Icon for Regular Contributor rankRegular Contributor

    Hi Izami,

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

    Thank You.