[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: [microblaze-uclinux] update



Hi Jan,

Schunke Jan-Hendrik wrote:
> I have the offical Xilinx Ethernet Core running on the V2MB1000 Board but I experienced the same problem:
> I could not reach 100 MHz. I was able to modify the webserver for the V2MB1000 and get it running at 67 MHz using a DCM (24MHZ * 14 / 5 = 67.2 MHz). 
> I do not think that this will be a great help but if you want to I can send you the project. 
> On my own design (XC2V2000-5) I have the Ethernetcore and the MB running at 90 MHz. 
> It is possible to reach 100 MHz but only with a lot of PAR effort.

Yes please!

> If you take a look at the opb_ethernet v1.00k documentation in table 26 you can see that they used a VirtexII with speedgrade -6 to achieve the performance (Take a look at the included table copied from the docu.)
> I dare to doubt that you will reach 100MHz in a XC2V1000-4 (which is on my insight board, and I guess thats on your board,too.) Therefore I would not spend much time on performance. I would suggest to slow down your MB maybe even downto 50 MHz (be careful, this will allow only 10MBit on the emac) and get the emac working there. Once it runs I do not see a problem to implement it in faster hardware / higher speedgrade.

Yes you are right.  Well it's about time I learned how to use the DCM I 
suppose, particularly if I want to enable the DDR soon so I can break 
from the 1MB SRAM limit! :)

> Back to booting from flash: For a hardware guy like me this is a big improvement.
> Could you provide the code or the bootloader (it may seem trivial to you but not to me ;-).

Sure.  The hard part is not the bootloader itself, but actually 
preparing the link script to get the kernel (or .elf image) to link to 
the right address.  What I've done is create a custom link script that 
places my code and data and stack and all that from location 0xffe00000 
(whhere my SRAM is mapped) - that results in an elf file which 
xmd/xmdstub will load at the right address.  To get that image into 
flash, I used

mb-objcopy -O binary image.elf image.bin

To create a binary image from the elf file, then used some scripts based 
on your xmdflash tools to burn that image into the flash (mapped to 
0xff000000).  Then, all the bootloader has to do is copy the image from 
flash to ram, and jump to the start address.

Tomorrow when I'm back at work I'll post my link script - it's entirely 
uclinux specific but it might show you enough to get started.  I'll be 
happy to help you work it out if you like - link scripts aren't actually 
as bad as they look at first glance.

Note this is a fairly simplistic approach, just to get me started. 
Ultimately I'll probably port one of the more well-established 
uclinux-capable bootloaders.

> Have you tried execute part of the kernel from flash (leave all read only data in the flash and copy only initialized data to ram, "code relocation")? A few weeks ago I spent some time on linker scripts but since I am the VHDL-guy and my program still fits into the onchip BRAM I stopped working on that.

Only once when I made a coding error!  Again, it's in the roadmap but 
not a priority at the moment.   mb-gcc generates nicely relocateably 
text segments, with only relative branches and that sort of stuff. 
However, the data by default is not relocateable, you have to enable it 
(sorry I forget the switch at the moment, I'm at home).