Forum Discussion
Altera_Forum
Honored Contributor
17 years agoAccessing CRC_ERROR circuitry in user logic
Hello,
We plan to use the CRC_ERROR function of the Stratix II device, but I'm having a hard time to understand from the handbook and AN357 how I can access the block from user logic. What I'd like to do is: 1) Detect in user logic whether a CRC ERROR condition has occurred 2) Inject a CRC error through user logic for testing (not via JTAG, which I saw is possible) AN357 talks of some "WYSIWYG atoms" for accessing the block, but I'm not familiar with them. Can't I do it via some megafunction interface? Thanks in advance5 Replies
- Altera_Forum
Honored Contributor
There isn't a megawizard for the CRC configuration verification function. To access the CRC_ERROR function internally, you'll need to manually instantiate the <device>_crcblock primitive (cycloneiii_crcblock, for example). The verilog instance is in the app note, the VHDL component (for cyclone III) looks like this:
component cycloneiii_crcblock generic ( lpm_type : string := "cycloneiii_crcblock" ); port( clk : in std_logic := '0'; crcerror : out std_logic; ldsrc : in std_logic := '0'; regout : out std_logic; shiftnld : in std_logic := '0' ); end component; This one was found in the cycloneiii_components.vhd file in the ...\quartus\libraries\vhdl\wysiwyg directory in your installation directories. Once you instantiate this in your code, connect the crc_error port to a bidirectional pin. You can then use the input function of that pin to access the CRC_ERROR signal in your design. I don't think Quartus will let you access CRC_ERROR any other way, since there's a dedicated path from the error detection logic to the I/O cell, so it had to pass through a bidir pin before being available in the FPGA fabric. I hope that helps. - Altera_Forum
Honored Contributor
--- Quote Start --- I don't think Quartus will let you access CRC_ERROR any other way, since there's a dedicated path from the error detection logic to the I/O cell, so it had to pass through a bidir pin before being available in the FPGA fabric. --- Quote End --- Yes, see AN357. Also, according to the doc, there's no means to force a CRC error for test (apart from loading a configuration that has CRC error). - Altera_Forum
Honored Contributor
--- Quote Start --- There isn't a megawizard for the CRC configuration verification function. To access the CRC_ERROR function internally, you'll need to manually instantiate the <device>_crcblock primitive (cycloneiii_crcblock, for example). The verilog instance is in the app note, the VHDL component (for cyclone III) looks like this: component cycloneiii_crcblock generic ( lpm_type : string := "cycloneiii_crcblock" ); port( clk : in std_logic := '0'; crcerror : out std_logic; ldsrc : in std_logic := '0'; regout : out std_logic; shiftnld : in std_logic := '0' ); end component; This one was found in the cycloneiii_components.vhd file in the ...\quartus\libraries\vhdl\wysiwyg directory in your installation directories. Once you instantiate this in your code, connect the crc_error port to a bidirectional pin. You can then use the input function of that pin to access the CRC_ERROR signal in your design. I don't think Quartus will let you access CRC_ERROR any other way, since there's a dedicated path from the error detection logic to the I/O cell, so it had to pass through a bidir pin before being available in the FPGA fabric. I hope that helps. --- Quote End --- Yes, this helps. Though I don't understand why this isn't directly documented by Altera. Also, can I connect it to *any* bidir pin or only the crc_error out pin? If there's a dedicated path to a IO cell I'd guess I'm limited to the actual crc_error pin. - Altera_Forum
Honored Contributor
--- Quote Start --- Also, can I connect it to *any* bidir pin or only the crc_error out pin? If there's a dedicated path to a IO cell I'd guess I'm limited to the actual crc_error pin. --- Quote End --- You're going to have to use the CRC_ERROR pin, but once you bring it back into the fabric via the bidir, you can do whatever you want with it -- including routing it to another output pin. - Altera_Forum
Honored Contributor
--- Quote Start --- You're going to have to use the CRC_ERROR pin, but once you bring it back into the fabric via the bidir, you can do whatever you want with it -- including routing it to another output pin. --- Quote End --- Which is all a bit pointless really because if the FPGA does incur an SEU then that may well involve the pin routing CRAM - which in turn means the rerouted CRC_ERROR pin may well disappear on a CRC error!