[U-Boot-Users] RFC: Xilinx Spartan3 relocation code

Laurent Pinchart laurentp at cse-semaphore.com
Tue Aug 21 11:04:06 CEST 2007


Hi Matthias,

On Tuesday 21 August 2007 10:52, Matthias Fuchs wrote:
> Bruce,
>
> what kind of bitstream file do you download to your FPGA?
> A .bit File? In this case we should put the bit mirroring into the
> wdata() callback or the *_sp_load() function, because the serial slave
> download is fine without mirroring.

You can't do that. Data should be mirrored only if they come from bitstreams 
(fpga loadb). PROM files are already mirrored. The wdata() callback would 
then have to mirror the bits only for "fpga loadb" and not for "fpga load", 
but that information is not available in the callback.

> Any way there is not need to malloc 
> a very huge amount of memory an do the mirroring on a buffer. This
> can be done on-the-fly during download.
>
> Matthias
>
> On Monday 20 August 2007 19:46, Bruce_Leonard at selinc.com wrote:
> > Stefan,
> >
> > > > > I fixed and added some things for the generic FPGA boot. Patches
> >
> > will be
> >
> > > > > posted with the new board patch.
> >
> > Sorry for the late reply, had a big BBQ this weekend for my anniversary
> > and haven't checked my e-mail in three or four days.  Could you please
> > let me know what your patches are going to look like?  I don't want to
> > push up any patches that will cover/conflict things you've got in your
> > queue.
> >
> > > > trouble getting the FPGA to program.  We're currently assuming that
> >
> > our
> >
> > > > interface to the FPGA is broken, but if there's known issues in the
> > > > generic code that would be nice to know :).
> >
> > I finally figured out what stupid thing I was doing.  Both the FPGA and
> > the PPC are big endian, however if the processor is little endian the
> > data needs to be bit-swapped before going to the FPGA over SelectMap. 
> > When I was commenting out the code to do the bit-swapping (which we don't
> > need to do) I got over zealous by one line and wasn't initializing a
> > pointer.  So I was sending nothing but 0x24 to the FPGA.  Wonder why it
> > didn't program?
> >
> > :0
> >
> > I'm going to try and come up with a clean way (probably a config option)
> > of doing or not doing the bit-swap thing in code.  If you're running a
> > bit endian system you really don't need or want to do it.  Little endian
> > systems, unless you're very carefull with your HW design, you want to do
> > it.  I'll have a patch for it in a couple of days.  I was thinking
> > something along the lines of "#define CFG_NO_SELECTMAP_BITSWAP".  If it's
> > not defined the code does the bit-swap, which is the way everything
> > currently works.  Or should it be a CONFIG instead?
> >
> > Bruce
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75




More information about the U-Boot mailing list