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

Serial Configuration Devices (EPCS16) question / Fast Read

Altera_Forum
Honored Contributor II
1,295 Views

I have a question about one of the operations being used in AS Configuration. 

My FPGA is Cyclone-III, and my AS Configuration device is EPCS16. 

 

I can see (using the scope) that upon AS Configuration, the Cyclone III first issues a read status opcode, then a read silicon id, and finally a fast read

 

My question is (after looking at the Vol 2, Ch 3 Configuration Handbook section e.g. page 3-21), how does the FPGA know when to drive ncs back to a High level (at the end of the operation) ? 

 

Does it have some kind of logic, or a lookup table, so after the result of getting the Silicon ID, it decides how many DCLK pulses should be issued, in order to read all sectors within the capacity of an EPCS16 ? 

 

Or else (I think this is less likely), it's monitoring the data pattern and after seeing a certain signature, it knows that it reached the end of the configuration data ? 

 

I just want to understand how the duration (for deassertion of nCS) is decided by the master (FPGA) ... so that I can't be missing the very last bit, for example, if nCS gets deasserted one cycle or slightly too early (or too late). (I just don't know whether I could be seeing a CRC error ... I think in the documentation they mention "Frame Error".) 

 

 

I wonder whether there's a single Frame CRC for the entire EPCS memory contents, or it has a Frame CRC in each sector ?? 

 

Thanks for your help; Larry.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
302 Views

AFAIK the FPGA decodes the stream as it receives it, and knows exactly when it has received all the bits it needs to complete its own programming cycle (taking into account any compression on the configuration data as well).

0 Kudos
Altera_Forum
Honored Contributor II
302 Views

The header of the configuration data does contain a length value. You can look at the default boot loader source code for NIOS to see how to find the length in the header. I seem to recall it is a bit convoluted and not just looking for the bytes in the right location. 

 

The default boot loader uses this information as it assumes the NIOS software application image is stored immediately after the configuration data.
0 Kudos
Altera_Forum
Honored Contributor II
302 Views

Thanks a lot Kevin. Eventually we'll upgrade our user code, to support remote system upgrade / remote update ... and I'm sure I'll want to understand more about this. 

But I don't think we're going to use NIOS; we do our own rtl source description code. Larry
0 Kudos
Altera_Forum
Honored Contributor II
302 Views

lcarver: I also do not use NIOS, and it runs fine here. 

But I do suspect that I would have used less resources and would have developed it faster had I used a NIOS.
0 Kudos
Reply