This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to implement Ethernet function with 6431? Where can I find sample code?

Dear Sir,

I already implemented the Ethernet function on 6437 EVM board with NDK, and would like to port it to 6431.

But the setting in ".gel" file and "DSP/BIOS Config" file really differ a lot. (Cache, RAM, SRAM, DDR2 ...)

In NDK's example, there is even SRAM in the memory setting within "DSP/BIOS Config" file.

I try to modify the .gel file & "DSP/BIOS Config" file and delete the SRAM in memory setting, but my project just doesn't work.

When I load the code & run, I can not see the code. I can only see lots of NOP assembly code.

Is there a guide to port Ethernet from 6437 to 6431?

Or is there a Ethernet sample code for 6431 DSP?

Or you have any sugesstion for my situation?

Really appreciate your help!!

Best Regards,

 

Eric Fang

 

  • At a minimum, you are going to need to change the following things in the 6437 gel file to port it to 6431:

    Cache size (less available on 6431)

    PLL1 & 2 settings (the 6431 can operate at a max clock of 300MHz I believe, and this ripples down through all the clock fields, remember to keep 1:3:6 ratios where the datasheet says)

    DDR2 settings - the 6431 only has a 16 bit bus and your timing register settings will also change since the frequency changes. (max 133 MHz, the 6437 gel file uses 162 MHz if I recall).

    Any other external memories that you have will need to have their configurations changed as well.

    Unfortunately, this is a painful process.  I would start with the pll, it is relatively straightforward and is just picking multiplies & divides.  Just stick to (all) the limits in the PLL section of the datasheet and record your new frequencies.

    Then you can go to the setup_memory_map() function and modify the length of the L1/L2 sections to match the 6431.  Also make any changes to external memory devices there, especially your DDR2 length & access size attribute (AS4 -> AS2) (it is not 4 bytes, but 2 due to the 16 bit bus).

    You will then need to go into the ddr2 setup function and one by one modify all the timing registers to reflect your new frequency, and repeat for any other external memory inits.

    Finally, you will need to update the cache & memory sizes in your DSP/BIOS config.  I would try to get a hello world style project to load into your board before you try the ethernet.  Best of luck.  Oops, and if the project uses any of the board support libraries for the evmdm6437, you will have to modify those as well.

  • Dear Matt,

    I modify the gel and config files by your instructions.

    And I encounter following error :

     and I find following info in map file :

    .hwi_vec   0    8107fc00    00000200    
                      8107fc00    00000200     evmdm6437cfg.obj (.hwi_vec)

    What bug is this??

    And how do I modify the library to fit 6431?

    Thank you very much!!

    Best Regards,

     

    Eric Fang

     

     

     

     

  • Eric:  Are you able to open a memory window to that region and use the memory window to write a value into 0x8107FC00 and get the same value back?  This would help to make sure the DDR2 memory interface is working with appropriate timing.  This type of error means the emulator attempted to write values (specifically the data is section .hwi_vec) and read them back, but did not get the same data back.

    My suspicion would be one of two things.  The DDR2 memory interface is not configured appropriately for the memory used on the target board or there is no memory out there at that location.

  • I am wondering if you should have kept the "AS4" size setting on the DDR2 section in your memory map... try changing that back and see if it helps at all.

  • Dear Matt,

    Are you telling me that I should modify the following code :

    GEL_MapAddStr( 0x80000000, 0, 0x08000000, "R|W|AS4", 0 );   // 128M DDR2 SDRAM

    to

    GEL_MapAddStr( 0x80000000, 0, 0x04000000, "R|W", 0 );   // 64M DDR2 SDRAM

    What does "AS4" mean?

    Thank you for your help!!

    Best Regards,

     

    Eric Fang

     

     

  • This line tells the debugger what memory it can access... so you need to describe whatever DDR2 chip(s) you have on your custom board.  The "AS4" means that you are addressing in 32 bit mode (4 byte words).  I think you need to leave the | AS4 option in.  Change the length field to match your size.  Although, as stated earlier, the error you are seeing typically means that you do not have the DDR2 configured correctly.  As the address of the error seems to be a legal one, I would bet that you do not have the timing adjusted appropriately.  The EVMDM6437 runs at close to 600 MHz, and I'm pretty sure the 6431 is not capable of that.  So you will need to adjust the timing parameters in the setup ddr2 function.

  • find out this file" Sample NAND Secondary Boot" & run the .out.

    after that,you can load your .out to ddr2