Home    Bloggers    Messages    Webinars    Resources   
Tw  |  Fb  |  In  |  Rss
Paul Clarke

Why PicoBlaze? Programming With the JTAG Loader

Paul Clarke
krischaplin
krischaplin
1/24/2013 6:34:08 PM
User Rank
Beginner
Re: loading picoblaze mem without the Xilinx cable/device..
Thanks Ken, much appreciated :-)

50%
50%
Paul Clarke
Paul Clarke
1/24/2013 7:14:49 AM
User Rank
Blogger
Re: loading picoblaze mem without the Xilinx cable/device..
Have a look at what Adam has done in this blog. Here he uses a UART to load a image into memory (in this case external to device). This is the basic method you would use I would feel.

http://www.programmableplanet.com/author.asp?section_id=2142&doc_id=248966

Also as a note, I talk to Ken and others about posts and always try and check details as best I can.


So for example I have checked with Ken about debugging already befor my next post gets written. I have a few intresting ideas that I will talk about and investigate, but was really intrested to see if others had somthing that they could comment on, maybe I have not considered.

And yes, its all about debugging the code, in the picoblaze as it runs it on the target. Not the PicoBlazr hardware or using a simulator.

50%
50%
Ken_Chapman
Ken_Chapman
1/24/2013 5:04:00 AM
User Rank
Expert
Re: loading picoblaze mem without the Xilinx cable/device..

To give credit where credit is due, JTAG Loader was created and implemented by the brilliant Kris Chaplin; the other 'KC'!

Before Kris created JTAG Loader I used to load new programs into BRAM via a UART (and a proper serial port on my PC in those days). Not surprisingly, my 'loader' circuit consisted of a second PicoBlaze which formed a bridge between the UART and the target BRAM associated with PicoBlaze under development. The 'loader' PicoBlaze generated the usual prompts and feedback to the user terminal. I used the 'send text file' facility in HyperTerminal to transmit the HEX file which the 'loader' PicoBlaze received, converted from ASCII Hex into real bits and stored in the target BRAM.  

So if you don't have the standard cable or connections available to use iMPACT, ChipScope and JTAG Loader then it really is a case of utilising whatever form of communication that you do have and I'd like to think that PicoBlaze could help realise such a custom 'loader'. I say 'custom' because it really does depend on both the physical hardware available and if your application needs to use the same resource. For example, if you only have one serial port (UART) then there has to be some kind of scheme put in place for switching it between the 'loader' and the 'application'. You could get all clever and complicated or simply use a manual switch (if there is one) but something suitable has to be put into your hardware design whereas JTAG Loader is nicely independent.

By the way, let's not forget that loading BRAMs with data isn't constrained to the land of PicoBlaze; this could be any data, in any memory, for any purpose.

50%
50%
JezmoSSL
JezmoSSL
1/23/2013 4:47:12 PM
User Rank
Blogger
Re: loading picoblaze mem without the Xilinx cable/device..
Yes and no is the answer it takes ages to build the fpga every time you change the rom , but in simulation land how else do you confirm that the code is correct without running it in model sim/Isim ? In which case you need to model the rom contents, If you had a proper sdk for the picoblaze then you could simulate it in there but you dont Also because of the way that chipscope works if you need to use it then things have gone horribly wrong

50%
50%
aventuri
aventuri
1/23/2013 4:04:08 PM
User Rank
Beginner
loading picoblaze mem without the Xilinx cable/device..
hi,

let me tell in advance that i'm not sure y've understood correctly your last question.. did you really mean "how to debug the picoblaze CPU?" or just how to debug a program (mis-behaving) running ON the picoblaze.

if the answer is the former, i've to say: "why i should!? :-) ";  this micro controller seems so carefully maintained [*] that i really can't believe a nasty bug is living inside..

i'm sure that KC too has raised more then an eyebrow at your final question! :-)

if the right answer is the latter, stick one of those nice macros driving an UART and start printing those registers in your program as all the good old scripters from the world wide web do!

end of joke, and coming to my question, i'm wondering if i can find a way to upload my memory to design with picoblaze through  jtag BUT without using the "jtag-loader" binary. i'm asking so because i've got one of those nice Papilio Pro (S6LX9) board that do have their own cable/controller (FTDI) for both Jtag to FPGA and Uart too (dual channel).

As it's not compatible with Impact i suppose it's also not compatible with this method.

as i think jtag-loader uses some fairly standard method for accessing remotely the FPGA "memory" (i read about Bscan primitives and User2 and something like that but i'm not really proficient in Jtag machinery..), i'm wondering if there's some "specs" to make it working with some open source tool on linux (thinking openocd here). anyone?

of course i could arrange some vhdl code for loading the block ram through the serial port, but it could take some time and there's already this standard jtag access method. why re-invent the wheel.. ;-)

 

bests

 

Andrea

[*] and so many designs rely on it, too.. such a huge peer review going on...

50%
50%
More Blogs from Paul Clarke
Now it's time to look at the memory interface that will supply the information required by our PicoBlaze 8-bit soft processor core.
We've now reached the point where we are ready to start debugging a PicoBlaze-based design using the ISim software simulation tool.
For some reason, my simulation never loads my memory with any contents. Instead, it's left containing undefined ('UUUU...') states. Can you help?
The PicoBlaze does not come with the ability to single step, set breakpoints, and monitor registers and memory, so we need a way to get around these limitations.
flash poll
follow us on twitter
follow Xilinx on twitter
like us on facebook
like Xilinx on facebook
All Programmable Planet     About Us     Contact Us     Help     Register     Twitter     Facebook     RSS