On Thursday, February 22, 2007 2:53 PM John Williams wrote: >Leonid wrote: > >> I have Spartan-2e board here which resembles to certain extent >> Spartan-3e starter kit. There are differences however - SDRAM instead of >> DDR, older Microblaze core, higher CPU clock, EMAC instead Etherlite, >> etc... I've attached auto-config.h files, generated by Petalogix BSP for >> both cases. >> >> I managed to compile and run u-boot and uClinux for both boards. >> >> However there is visible delay - 3-5 sec - when start any application >> (like "ls" for instance) on my Spartan-2e target under uClinux. The >> following observations have been done: >> >> 1) Delay depends on application's size: "ls" which in fact starts >> busybox >> (200K) takes several seconds to start while small "cat" launches >> quickly. >> >> 2) On Spartan-3e Starter Kit delay is also visible, but less than on my >> Spartan-2e based HW. Note that the Starter Kit CPU clock is little bit >> slower than mine (50MHz vs. 64MHz). >> >> 3) Simple memory read/write tests (I ran them from BRAM based code) show >> that my board performs even better than starter kit which is to be >> expected provided that clock is higher. >> >> I sounds for me that uClinux kernel uses some resources (cashes?) which >> are not well supported in older Spartan-2e architecture. Can somebody >> give me an idea where to look? >There are a couple of critical differences in your systems that will be >contributing to this: > >1. instruction and data caches are not present in your -2e system. Even >a small (2kb) instruction cache gives a huge performance improvement. >Data cache is not so critical. > >2. HW integer multiplier. When synthesising mb-v2.00.a for Spartan2E >family, there is no HW multipler support. This will contribute to >maknig your system slower. > >Looking at the datasheets for various MicroBlaze versions, it's not >clear whether you can force the use of logic to create HW multipler on >older FPGA families without embedded multiplers. > >Point (1) is the almost certainly the main cause of your performance >problems, but (2) will also be having some impact. > >Is there a reason you want to use the obsolete v2.00.a of MicroBlaze? We are ready to use everything which will run on Spartan-2e. In order to boost performance, we have tried to use Microblaze 4 (see auto-config.h attached); we basically copied Spartan-3e Starter Kit design as far as we could (cashes are shorter in our case). We did bump into several issues however: 1) u-boot didn't work if it was compiled with HW multiplication support (which Microblaze 4 presumably has): it didn't recognize flash, serial output had junk, etc... - I didn't investigate in depth. To make u-boot working, I have done the following change: ==== //depot/LM125/uClinux/petalinux-v0.10-rc1/software/petalinux-dist/u-boot /board/petalogix/microblaze-auto/config.mk#1 - /home/leonid/LM125/uClinux/petalinux-v0.10-rc1/software/petalinux-dist/u -boot/board/petalogix/microblaze-auto/config.mk ==== @@ -71,13 +71,15 @@ endif ifneq (,$(findstring spartan3,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) HAS_HARD_MULT := y endif +ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) ifeq ($(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL),1) HAS_HARD_MULT := y endif +endif ifeq ($(HAS_HARD_MULT),y) PLATFORM_CPPFLAGS += -mno-xl-soft-mul else PLATFORM_CPPFLAGS += -mxl-soft-mul 2) I could compile and load uClinux then, but it was so slooooow... took about 5 mins just boot it... Looks like there is some problems in using Microblaze 4 on Spartan-2e... can you suggest anything? Regards, Leonid.