FPGARelated.com
Forums

Loading the design from Compact Flash...

Started by Xesium January 31, 2008
Hi everybody,
It's been a while I'm struggling with ML310 board to have my design
loaded from compact flash to the Virtex II-pro FPGA on the board. I'm
generating system.ace file using iMPACT and program the compact flash
using a card reader. In my design I have a Microblaze with an OPB
timer, OPB SysAce controller and OPB uart-lite, I have some more
controllers connected to OPB which I think should not matter in the
flow of my design. In my software application I set the timer, write
something to the STD-OUT which is RS232 and after executing some code
I read the value of the timer again to know how many cycles it took
for that piece of code. Anyway my problem is when I load the design to
the compact flash, when I power on the device (or when I reset
system_ace) sysAce Status LED on the board blinks several times and
then all the LEDs including SysAce Status LED go green which to me
means that it loaded the design to the FPGA. However the problem is
the system seemingly goes to freeze mode. It doesn't write anything to
hyperterminal so that I could know if it is working or not. As well no
matter how much I keep SysAce button pressed it doesn't reset the
sysace any more. As well I can't get connected to the board for debug
using XMD through Parallel IV cable. So in fact I can't do anything
except to shut down the board. I have no clue what the problem can be.
I also tried using the bitstream already on the Xilinx ML310 Compact
Flash card. I put my design in to folder cf7 but the same things
happen when I want to load that design.

Do you have any clue what the problem can be? I'd appreciate it if you
could point me to the solution or can introduce a tutorial or article
which in fact shows how exactly configuring through flash can be done.
I already went through several articles but still haven't been able to
get it work.

I'd appreciate your comments and help beforehand,

Amir

Xesium wrote:
> Hi everybody, > It's been a while I'm struggling with ML310 board to have my design > loaded from compact flash to the Virtex II-pro FPGA on the board. I'm > generating system.ace file using iMPACT and program the compact flash > using a card reader. In my design I have a Microblaze with an OPB > timer, OPB SysAce controller and OPB uart-lite, I have some more > controllers connected to OPB which I think should not matter in the > flow of my design. In my software application I set the timer, write > something to the STD-OUT which is RS232 and after executing some code > I read the value of the timer again to know how many cycles it took > for that piece of code. Anyway my problem is when I load the design to > the compact flash, when I power on the device (or when I reset > system_ace) sysAce Status LED on the board blinks several times and > then all the LEDs including SysAce Status LED go green which to me > means that it loaded the design to the FPGA. However the problem is > the system seemingly goes to freeze mode. It doesn't write anything to > hyperterminal so that I could know if it is working or not. As well no > matter how much I keep SysAce button pressed it doesn't reset the > sysace any more. As well I can't get connected to the board for debug > using XMD through Parallel IV cable. So in fact I can't do anything > except to shut down the board. I have no clue what the problem can be. > I also tried using the bitstream already on the Xilinx ML310 Compact > Flash card. I put my design in to folder cf7 but the same things > happen when I want to load that design. > > Do you have any clue what the problem can be? I'd appreciate it if you > could point me to the solution or can introduce a tutorial or article > which in fact shows how exactly configuring through flash can be done. > I already went through several articles but still haven't been able to > get it work. > > I'd appreciate your comments and help beforehand, > > Amir
Hi Amir, I have never had much luck generating ace files with impact, especially if you want to load program data for a microblaze or some such. The most reliable way I have found is to run the genace.tcl script from within an XPS/EDK shell. The syntax goes something like this: xmd -tcl genace.tcl -jprog -hw <name of bit file.bit> -board ml310 - ace <name of ace file.ace> There are other options to load program or data sections into external ram if needs be. You can find more info in the Emebedded System Tools Reference Manual www.xilinx.com/ise/embedded/est_rm.pdf If you just put the ace file it generates on a CF card by itself, the systemAce should load it no problems Good luck, Dave
Thanks so much Dave.
I actually tried this command:
$ xmd -tcl genace.tcl -jprog -hw implementation/download.bit -board
ml310 -target mdm -elf timer_test/executable.elf -ace system.ace

My software code is supposed to write something to hyperterminal
through RS232 port and I have in fact populated the local BRAMs with
the data and instructions of my software code and download.bit should
contain that information (I tried commands with and without -elf
timer_test/executable.elf). When I download the bitstream through my
computer everything looks OK and my code writes whatever it is
supposed to write to hyperterminal. The structure that I have on my CF
card is as follows:
The CF for ML310 comes already loaded with some programs, when I turn
on the device the ML310 demo on the CF is loaded and writes something
on hyperterminal and gives me some options. There is one folder in the
path: <CF-Drive>/xilinx/cf7 where I can copy my ace file to. If I want
to execute and load my design when Xilinx demo is loaded I have to
press 7 so that it loads my design (which is inside folder cf7). So
whenever I hit 7 it says that it is loading new config 7, the sysAce
Status on the board blinks twice (or three times) and then all the
LEDs go green giving me the idea that now it's working. However if my
code is actually loaded then it should write something to the
hyperterminal but that doesn't happen!
Firstly I don't know why it is so, secondly I know no more convenient
way to make sure that my design is actually loaded and working (the
only way I found convenient is to write something to the output)!

So I really appreciate any help or comment in this regards,

Amir

PS. By the way all the problems that I had like the system being
frozen is solved now. I actually went back and designed everything
from scratch and now that part is solved. I also made sure that ISE
and EDK that I'm using (8.2) is updated with the latest service packs.



On Feb 3, 1:48 am, David <simianfe...@gmail.com> wrote:
> Xesium wrote: > > Hi everybody, > > It's been a while I'm struggling with ML310 board to have my design > > loaded from compact flash to the Virtex II-pro FPGA on the board. I'm > > generating system.ace file using iMPACT and program the compact flash > > using a card reader. In my design I have a Microblaze with an OPB > > timer, OPB SysAce controller and OPB uart-lite, I have some more > > controllers connected to OPB which I think should not matter in the > > flow of my design. In my software application I set the timer, write > > something to the STD-OUT which is RS232 and after executing some code > > I read the value of the timer again to know how many cycles it took > > for that piece of code. Anyway my problem is when I load the design to > > the compact flash, when I power on the device (or when I reset > > system_ace) sysAce Status LED on the board blinks several times and > > then all the LEDs including SysAce Status LED go green which to me > > means that it loaded the design to the FPGA. However the problem is > > the system seemingly goes to freeze mode. It doesn't write anything to > > hyperterminal so that I could know if it is working or not. As well no > > matter how much I keep SysAce button pressed it doesn't reset the > > sysace any more. As well I can't get connected to the board for debug > > using XMD through Parallel IV cable. So in fact I can't do anything > > except to shut down the board. I have no clue what the problem can be. > > I also tried using the bitstream already on the Xilinx ML310 Compact > > Flash card. I put my design in to folder cf7 but the same things > > happen when I want to load that design. > > > Do you have any clue what the problem can be? I'd appreciate it if you > > could point me to the solution or can introduce a tutorial or article > > which in fact shows how exactly configuring through flash can be done. > > I already went through several articles but still haven't been able to > > get it work. > > > I'd appreciate your comments and help beforehand, > > > Amir > > Hi Amir, > > I have never had much luck generating ace files with impact, > especially if you want to load program data for a microblaze or some > such. The most reliable way I have found is to run the genace.tcl > script from within an XPS/EDK shell. The syntax goes something like > this: > > xmd -tcl genace.tcl -jprog -hw <name of bit file.bit> -board ml310 - > ace <name of ace file.ace> > > There are other options to load program or data sections into external > ram if needs be. You can find more info in the Emebedded System Tools > Reference Manual > > www.xilinx.com/ise/embedded/est_rm.pdf > > If you just put the ace file it generates on a CF card by itself, the > systemAce should load it no problems > > Good luck, > > Dave
> I actually tried this command: > $ xmd -tcl genace.tcl -jprog -hw implementation/download.bit -board > ml310 -target mdm -elf timer_test/executable.elf -ace system.ace > > My software code is supposed to write something to hyperterminal > through RS232 port and I have in fact populated the local BRAMs with > the data and instructions of my software code and download.bit should > contain that information (I tried commands with and without -elf > timer_test/executable.elf).
Did you try removing the "-target mdm" as well? If your program is in bram it shouldn't be necessary.
> Firstly I don't know why it is so, secondly I know no more convenient > way to make sure that my design is actually loaded and working (the > only way I found convenient is to write something to the output)!
You could try a very simple design in ISE that just flashes a led or something and make an ace file from that. That should at least tell you whether it is a problem with the systemAce or the microblaze. Also, re-reading your original post - you probably don't need the OPB SysAce controller unless you intend to write to the compact flash - it could be causing some conflict with the sysace chip if it's not set up properly. Cheers, Dave
Dave,
Thanks so much. Actually removing -target mdm worked!
I feel dumb to have spent weeks trying to fix this issue! But at least
it is working now!

Thanks a lot again,

Amir

On Feb 4, 11:26 pm, David <simianfe...@gmail.com> wrote:
> > I actually tried this command: > > $ xmd -tcl genace.tcl -jprog -hw implementation/download.bit -board > > ml310 -target mdm -elf timer_test/executable.elf -ace system.ace > > > My software code is supposed to write something to hyperterminal > > through RS232 port and I have in fact populated the local BRAMs with > > the data and instructions of my software code and download.bit should > > contain that information (I tried commands with and without -elf > > timer_test/executable.elf). > > Did you try removing the "-target mdm" as well? If your program is in > bram it shouldn't be necessary. > > > Firstly I don't know why it is so, secondly I know no more convenient > > way to make sure that my design is actually loaded and working (the > > only way I found convenient is to write something to the output)! > > You could try a very simple design in ISE that just flashes a led or > something and make an ace file from that. That should at least tell > you whether it is a problem with the systemAce or the microblaze. > > Also, re-reading your original post - you probably don't need the OPB > SysAce controller unless you intend to write to the compact flash - it > could be causing some conflict with the sysace chip if it's not set up > properly. > > Cheers, > Dave
On Feb 6, 4:13 am, Xesium <amirhossein.gholamip...@gmail.com> wrote:
> Dave, > Thanks so much. Actually removing -target mdm worked! > I feel dumb to have spent weeks trying to fix this issue! But at least > it is working now! > > Thanks a lot again, > > Amir > > On Feb 4, 11:26 pm, David <simianfe...@gmail.com> wrote: > > > > I actually tried this command: > > > $ xmd -tcl genace.tcl -jprog -hw implementation/download.bit -board > > > ml310 -target mdm -elf timer_test/executable.elf -ace system.ace > > > > My software code is supposed to write something to hyperterminal > > > through RS232 port and I have in fact populated the local BRAMs with > > > the data and instructions of my software code and download.bit should > > > contain that information (I tried commands with and without -elf > > > timer_test/executable.elf). > > > Did you try removing the "-target mdm" as well? If your program is in > > bram it shouldn't be necessary. > > > > Firstly I don't know why it is so, secondly I know no more convenient > > > way to make sure that my design is actually loaded and working (the > > > only way I found convenient is to write something to the output)! > > > You could try a very simple design in ISE that just flashes a led or > > something and make an ace file from that. That should at least tell > > you whether it is a problem with the systemAce or the microblaze. > > > Also, re-reading your original post - you probably don't need the OPB > > SysAce controller unless you intend to write to the compact flash - it > > could be causing some conflict with the sysace chip if it's not set up > > properly. > > > Cheers, > > Dave
No problem Amir. I suspect that the -target mdm switch was stopping the mircroblaze, in much the same way as it stops when you connect to it with xmd. Dave
Dave,
I actually realized that -target mdm was not a problem. Because later
on when I did the same thing with -target mdm set it worked again.
Previously I used to export my design to ISE and synthesize and place
and route it there and then generate the ace file through iMPACT.
However this time (that worked) I actually did everything through EDK
and used shell commands to generate the ace file. So basically the
design through ISE has some problems some where and I have not
realized where exactly. I realized that the mode pins (M2M1M0) are set
as 101 (boundary-scan) in EDK but the same in ISE were set as 111
(slave serial). I'm not sure but I think 101 is the desired
configuration because sysAce is going to reconfigure from compact
flash. So there is no external clock to the FPGA configuration unless
I'm wrong. In any case I tried changing the configuration mode in ISE
but it didn't work. So I'm not sure what exactly the problem is with
ISE but obviously generating the ace file from the design in ISE
doesn't work but the same in EDK is working.

Thanks Dave for the hint on using XPS/EDK shell.

Amir

On Feb 5, 5:17 pm, D.J.Mulli...@gmail.com wrote:
> On Feb 6, 4:13 am, Xesium <amirhossein.gholamip...@gmail.com> wrote: > > > > > Dave, > > Thanks so much. Actually removing -target mdm worked! > > I feel dumb to have spent weeks trying to fix this issue! But at least > > it is working now! > > > Thanks a lot again, > > > Amir > > > On Feb 4, 11:26 pm, David <simianfe...@gmail.com> wrote: > > > > > I actually tried this command: > > > > $ xmd -tcl genace.tcl -jprog -hw implementation/download.bit -board > > > > ml310 -target mdm -elf timer_test/executable.elf -ace system.ace > > > > > My software code is supposed to write something to hyperterminal > > > > through RS232 port and I have in fact populated the local BRAMs with > > > > the data and instructions of my software code and download.bit should > > > > contain that information (I tried commands with and without -elf > > > > timer_test/executable.elf). > > > > Did you try removing the "-target mdm" as well? If your program is in > > > bram it shouldn't be necessary. > > > > > Firstly I don't know why it is so, secondly I know no more convenient > > > > way to make sure that my design is actually loaded and working (the > > > > only way I found convenient is to write something to the output)! > > > > You could try a very simple design in ISE that just flashes a led or > > > something and make an ace file from that. That should at least tell > > > you whether it is a problem with the systemAce or the microblaze. > > > > Also, re-reading your original post - you probably don't need the OPB > > > SysAce controller unless you intend to write to the compact flash - it > > > could be causing some conflict with the sysace chip if it's not set up > > > properly. > > > > Cheers, > > > Dave > > No problem Amir. I suspect that the -target mdm switch was stopping > the mircroblaze, in much the same way as it stops when you connect to > it with xmd. > > Dave