Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
Need Forum Guidance? Click here

Search our FPGA Knowledge Articles here.
18987 Discussions

Altera Quartus (.jic to .pof)

Altera_Forum
Honored Contributor II
1,646 Views

[SUP]Hi All, 

 

Need help here. (I uploaded the screenshot) 

i have file from my customer .jic file, using JTAG mode and its included JTAG device and flash device. 

can i split it out to only flash device to .pof file using mode in-socket programming mode? 

 

 

[/SUP]
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
249 Views

The binary image can be extracted from the .jic file. I'm doing it like below 

 

struct { unsigned short typ; unsigned len; } jicrechdr; finput = fopen(filename,"rb"); fread(buffer,1,12,finput); while (!feof(finput)) { fread(&jicrechdr,1,6,finput); if (jicrechdr.typ != 0x1c) fseek(finput,jicrechdr.len,SEEK_CUR); else break; } if (feof(finput)) exit(1); fseek(finput,jicrechdr.len & 0xff,SEEK_CUR); imagesize = jicrechdr.len & 0xffffff00; // read binary image
Altera_Forum
Honored Contributor II
249 Views

 

--- Quote Start ---  

The binary image can be extracted from the .jic file. I'm doing it like below 

 

struct { unsigned short typ; unsigned len; } jicrechdr; finput = fopen(filename,"rb"); fread(buffer,1,12,finput); while (!feof(finput)) { fread(&jicrechdr,1,6,finput); if (jicrechdr.typ != 0x1c) fseek(finput,jicrechdr.len,SEEK_CUR); else break; } if (feof(finput)) exit(1); fseek(finput,jicrechdr.len & 0xff,SEEK_CUR); imagesize = jicrechdr.len & 0xffffff00; // read binary image 

--- Quote End ---  

 

 

Is this c programming lauguage, i not familiar with this programming? any tool to direct convert it?
Altera_Forum
Honored Contributor II
249 Views

Yes, C language. I have my own tool converting .jic to .hex. Reason is that Quartus had (still has?) a bug making the .hex binary output incompatible with CRC check during remote system upgrade. 

 

For a one time action, you can cut out the binary image with a hex editor.
Altera_Forum
Honored Contributor II
249 Views

Is there any documentation available for the JIC file format or programming files in general? Plus there is parts missing from your code. Unsigned short is 16bit (!?) and unsigned len is 32 or 64 bit depending on system (!?). Would be better to use stdint types here. 

 

Can you make full source available? 

 

Markus
Altera_Forum
Honored Contributor II
249 Views

Consider the code being written for a 32 bit tool.

Altera_Forum
Honored Contributor II
249 Views

 

--- Quote Start ---  

Consider the code being written for a 32 bit tool. 

--- Quote End ---  

 

 

Cool, can you consider publishing the complete code (I guess there is parts missing)? 

 

Markus
Reply