how to set OPB EMC for flash use?

Hi All,

I want to use the flash on the P160 Module, but I don't know how to set the opb EMC(external memory controller) for flash. Does anyone knows? Please help me.

thank you very much!

Lina

Reply to
athena
Loading thread data ...

These settings worked for me. I don't know if they are optimal.

PARAMETER C_MEM1_WIDTH = 32 PARAMETER C_MEM1_BASEADDR = 0xff000000 PARAMETER C_MEM1_HIGHADDR = 0xff7fffff PARAMETER C_READ_ADDR_TO_OUT_SLOW_PS_1 = 90000 PARAMETER C_READ_ADDR_TO_OUT_FAST_PS_1 = 90000 PARAMETER C_WRITE_ADDR_TO_OUT_SLOW_PS_1 = 100000 PARAMETER C_WRITE_ADDR_TO_OUT_FAST_PS_1 = 100000 PARAMETER C_WRITE_MIN_PULSE_WIDTH_PS_1 = 50000 PARAMETER C_READ_RECOVERY_BEFORE_WRITE_PS_1 = 0 PARAMETER C_WRITE_RECOVERY_BEFORE_READ_PS_1 = 0

Reply to
joe4702

Hi Joe,

Thank you very much for your help, but where did you set these parameters as follows:

PARAMETER C_READ_ADDR_TO_OUT_SLOW_PS_1 = 90000 PARAMETER C_READ_ADDR_TO_OUT_FAST_PS_1 = 90000 PARAMETER C_WRITE_ADDR_TO_OUT_SLOW_PS_1 =

100000 PARAMETER C_WRITE_ADDR_TO_OUT_FAST_PS_1 = 100000 PARAMETER C_WRITE_MIN_PULSE_WIDTH_PS_1 = 50000 PARAMETER C_READ_RECOVERY_BEFORE_WRITE_PS_1 = 0 PARAMETER C_WRITE_RECOVERY_BEFORE_READ_PS_1 = 0

I couldn't find them in "add/edit cores" of SRAM_256K*32_FLASH_2M*32, and it is still strange that my flash is only 4M not 8M. Do you add these parameters by software programme?

And about how to read data from or write data to the flash, is there any special methods? Do you have any material or example projects and software codes for the flash on P160 module2? could you gave me some?

thank you very much!

Athena

Reply to
Athena

Those are for an old obsolete version of opb_emc. Is there some reason you are not using a newer version? Download the ipcores updates if you have not already done so.

Reply to
Duane Clark

Oops, I see that those were the settings suggested by joe4702. So I guess that should be directed at him. Hopefully, you are using a more current version of opb_emc core.

With a TE28F640-J3 flash mem, and opb_emc v2.00.a, I use:

PARAMETER INSTANCE = my_flash PARAMETER HW_VER = 2.00.a PARAMETER C_NUM_BANKS_MEM = 1 PARAMETER C_OPB_CLK_PERIOD_PS = 10000 PARAMETER C_MEM0_BASEADDR = 0x94000000 PARAMETER C_MEM0_HIGHADDR = 0x94FFFFFF PARAMETER C_MEM0_WIDTH = 32 PARAMETER C_INCLUDE_DATAWIDTH_MATCHING_0 = 0 PARAMETER C_TCEDV_PS_MEM_0 = 120000 PARAMETER C_TAVDV_PS_MEM_0 = 120000 PARAMETER C_THZCE_PS_MEM_0 = 35000 PARAMETER C_THZOE_PS_MEM_0 = 15000 PARAMETER C_TWC_PS_MEM_0 = 120000 PARAMETER C_TWP_PS_MEM_0 = 70000

I have no idea what flash is on the "P160", nor even what that is. But the parameters are set in the projects system.mhs file. If you are using the GUI, I don't know how to help. I edit the files with a text editor. The values are mostly taken right out of the data sheet for the flash being used.

Reading from a flash is just like reading from any memory device. But writing the flash requires a rather complicated process that is usually implemented in software. And there are many different procedures for the different types of flash, so you will need to read the data sheet for whatever flash you have and implement that (or find someone that has implemented it for your specific flash).

Reply to
Duane Clark

Hello,

Thank you for your help. I got much from your answer. I will read the related materials much more carefully and try to solve the problem.

Thank you!

Athena

Reply to
Athena

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.