Project

General

Profile

I have another question regarding EMIF.

Added by Kyungguk Bok 8 months ago

hello
I have another question regarding EMIF.

Currently, we have performed an EMIF communication GPIO example using MDK.

mpGpio = new tcDspFpgaGpio((void*)0x66000280);

From a DSP perspective, we proceeded by entering the physical address into the FPGA.
So, excluding examples, how should developers proceed with EMIF communication?

Through the example in the DSP, I learned that I only need to enter the FPGA physical address. How do I proceed in the DSP if I want to directly perform EMIF communication, excluding the example?

thank you


Replies (6)

I have another question regarding EMIF. - Added by Jonathan Cormier 8 months ago

Hi. Can you give an example of what you are trying to do? Your question
isn't making sense to me.

RE: I have another question regarding EMIF. - Added by Kyungguk Bok 8 months ago

dabbyeon gamsahabnida. jega halyeoneun il-eun EMIF tongsin-eul jinhaenghalyeogo habnida. FPGA yeje (MDK\examples\industrial_io\fpga\vhdl)eseo IndustrialIO_top yejeleul iyonghago, DSP yeje(MDK\sw\DSP\lib\core\DspFpgaGpio)leul tonghaeseo GPIO yejeleul jinhaeng hayeossseubnida. hyeonjaeneun FPGA yeje(MDK\fpga\vhdl\fifo_dram_sync)tonghae fifo-e jeojangdoen deiteoleul EMIF tongsin-eulo DSPeseo jeonsong bad-eulyeogo hago issseubnida. FPGAeseo fifo_dram_syncleul inseuteonseuhwa hayeo, gijon yeje cheoleom constant CORE_TS_MODULE : integer := 1; constant CORE_I2C_MODULE : integer := 2; constant CORE_LCD_MODULE : integer := 3; constant CORE_DVI_MODULE : integer := 4; constant CORE_GPIO_MODULE : integer := 5; constant CORE_PWM_MODULE : integer := 6; constant CORE_FIFO_MODULE : integer :=7; eseo 7lo dugo EMIF tongsin-eul jinhaenghalyeogo habnida. GPIO silheomsi yejeeseoneun mpGpio = new tcDspFpgaGpio((void*)0x66000280); eulo jusoleul iblyeoghaeseo jinhaenghayeossneunde(jadong-eulo ARMeseo iomapping-eul sikyeojuneungeo gatseubnida.) icheoleom fifo modyulhago tongsin-eul halyeomyeon DSPeseo eotteohge jinhaeng-eul haeya haneunji moleugessseubnida. 0x66000300 jusoleul eotteohge jeog-yong-eul haeyahaneunji moleugessseubnida. ttalo laibeuleoliga issneunji gung-geumhabnida.
자세히
882 / 5,000
번역 결과
번역 결과
Thank you for answer.

What I'm trying to do is conduct EMIF communication.
We used the IndustrialIO_top example in the FPGA example (MDK\examples\industrial_io\fpga\vhdl) and performed the GPIO example through the DSP example (MDK\sw\DSP\lib\core\DspFpgaGpio). Currently, we are trying to receive data stored in fifo from DSP through EMIF communication through FPGA example (MDK\fpga\vhdl\fifo_dram_sync).
Instantiate fifo_dram_sync in FPGA, like the existing example
constant CORE_TS_MODULE : integer := 1;
constant CORE_I2C_MODULE : integer := 2;
constant CORE_LCD_MODULE : integer := 3;
constant CORE_DVI_MODULE : integer := 4;
constant CORE_GPIO_MODULE : integer := 5;
constant CORE_PWM_MODULE : integer := 6;
constant CORE_FIFO_MODULE : integer :=7;
We are going to set it to 7 and proceed with EMIF communication.

In the GPIO experiment example, mpGpio = new tcDspFpgaGpio((void*)0x66000280); I proceeded by entering the address (I think ARM automatically performs iomapping).

I don't know how to proceed in DSP to communicate with the fifo module like this.
I don't know how to apply the address 0x66000300. I wonder if there is a separate library.

RE: I have another question regarding EMIF. - Added by Michael Williamson 8 months ago

If you have the FPGA portion working by decoding the address to the FIFO using the base_module.vhd file, which generates a read strobe and an enable, etc., then for the DSP all you need to do is create a basic integer pointer and dereference it, for example:

void ReadFromFIFOonDSP(uint16_t* buffer, int len)
{
    uint16_t* ptr = (uint16_t*)0x66000300;
    for (int i = 0; i < len; ++i)
    {
        buffer[i] = *ptr;
    }
}

RE: I have another question regarding EMIF. - Added by Kyungguk Bok 8 months ago

Thank you for answer.

I'm still a beginner, so my questions may be basic.

If I input o_DBus<= Data in FPGA, will data be transmitted?

As far as I know, EMIF has an address and data, but the example above only has a CS address.

So how should I set the data that matches the address?

RE: I have another question regarding EMIF. - Added by Kyungguk Bok 8 months ago

I have additional questions.

I would like to perform EMIF communication only with DSP and FPGA, without ARM.

If you proceed without fpga_ctrl.ko, does EMIF communication proceed without ARM?

DSP informed me

void ReadFromFIFOonDSP(uint16_t* buffer, int len) {
uint16_t* ptr = (uint16_t*)0x66000300;
for (int i = 0; i < len; ++i) {
buffer[i] = *ptr;
}
}

Is it possible without performing fpga_ctrl.ko insmod with the above source???

RE: I have another question regarding EMIF. - Added by Jonathan Cormier 8 months ago

Kyungguk Bok wrote in RE: I have another question regarding EMIF.:

I have additional questions.

I would like to perform EMIF communication only with DSP and FPGA, without ARM.

If you proceed without fpga_ctrl.ko, does EMIF communication proceed without ARM?

As long as your willing to use u-boot on the ARM to load the DSP and the FPGA then I think this should already work. U-boot has to have configured the EMIF to support loading the FPGA.
https://support.criticallink.com/gitweb/?p=u-boot-mitydspl138.git;a=blob;f=board/davinci/mityomapl138/mityomapl138.c;h=9d616ffe99d3f3e4fceae41f90e509b638013d5a;hb=275ff0e76f22e3a47e3cbf72f4aa61083eb507a7#l268

    (1-6/6)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)