Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

Altera Quartus (.jic to .pof)

[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]

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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