Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20727 Discussions

Understanding the JAM Player

Altera_Forum
Honored Contributor II
1,988 Views

Hello,  

 

I am trying to implement an in-system-programming routine for a MAX7000S using a freescale microcontroller MC68HC908. I know I can use the free JAM code player provided on the altera website, however I do not have enough memory on the microcontroller to just copy and change it (the JAM player takes at least 20kB and I have only 2kB) 

So I am trying to develop a JAM player in Labview that would read the jbc file and send the appropriate command on the CAN bus to the microcontroller. The microcontroller would then program the MAX7000. 

To do this I need to reverse engineer the JAM code player and that's where I am having difficulties. I read all the application notes (AN39,AN95,AN100,AN111,AN122) but I couldn't find anywhere how to interpret the .jbc file into commands to program the MAX7000S.  

Can anybody explain me how to interpret the jbc file or tell me where I can find more information? 

 

Regards,  

 

Cyril
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
836 Views

Why not using embedded JRunner or other native JTAG tools and industy standard *.svf file?

0 Kudos
Altera_Forum
Honored Contributor II
836 Views

Hello,  

 

Thank you for your prompt reply. I looked at the JRunner and it appears it would take too much memory space, I am actually very limited (2K). Morever using the svf file would force me to implement a parser that would require a lot memory space as well. Actually I figured that any method using the JTAG interface would require a lot of memory space. Is there a file that Quartus can generate that would show what will be in the CPLD memory? I already have some functions to write to the CPLD. Is it even possible to reprogram a CPLD by writing directly at the appropriate address? 

Thanks 

Cyril
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

Hi Cyril, 

 

First, I guess you have the following system : a big "horsepower" CAN master somewhere, connected to your "small" CAN slave board (i.e HC908 + MAX7000). 

I don't think that any STAPL, JAM, SVF or whatever player will fit in your HC09 device. 

For example, I implemented a SVF player running on a NIOS 2 processor : code size is about 50 KBytes, and SVF data for the CPLD being programmed (a Xilinx XC9536XL) is about 40 Kbytes. So It needs about 100 Kbytes for code+data :)  

 

However, maybe you could do the following : implement the SVF player in your "powerfull" CAN master, then implement in your slave some basic CAN commands allowing read/write accesses to the CPLD JTAG pins. The master SVF player should then use these commands to remotly access CPLD JTAG pins, merely seeing your slave board as a "JTAG expander". 

 

I recommend you using SVF files format because they are quite standards, but you will need an embedded SVF player. The one I use is in fact an XSVF player. C source code is freely available from ... Xilinx. I modified Xilinx source code (some I/O port routines initially targeted for PC parallel port) for my embedded system, I must say it was quite easy. I guess you could replace these routines with CAN one. 

Note that XSVF is a Xilinx binary version of standard SVF files. Being binary, XSVF files are smaller than standard SVF ASCII files, but you will need an SVF to XSVF converter. Again, this one is freely available from Xilinx. An other very good news is that this converter seems to allow converting any kind of SVF files : I mean no matter the vendor (Altera or Xilinx) :p . I converted a Cyclone 3 SVF file to XSVF without any problem. 

 

Here is the link to Xilinx app note : http://www.xilinx.com/support/documentation/application_notes/xapp058.pdf 

and the C source : ftp://ftp.xilinx.com/pub/swhelp/cpld/eisp_pc.zip 

 

Hope this helps. 

 

nb : Oh, at least, are you french ?
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

Hello,  

 

Thanks for that, I think this is the only solution if I don't want to add some external memory. I am going to start working towards this solution. 

Yes, actually I am french, but I live and work in Germany. How did you find that out, can my accent be noticed when I write a message? 

 

Take care 

Cyril
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

Hi Cyril, 

 

Well your post smelled camembert :D . No, seriously, Cyril is rather a french first name. 

By the way, hope you will have success in your task. Don't hesitate to post questions, if I could be of any help. 

 

Sincerely.
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

Hi, i find myself more or less in the same situation that you were and i was wondering if you manage to program the cpld via an embedded processor and jtag and wich method did you use??? 

sincerely 

Raul
0 Kudos
Reply