0
\$\begingroup\$

I having a hard time understanding the best way to setup a NIOS II system with external code and the resets and clocks. One of the reasons why I'd like to figure this out is the JTAG system really struggles and it seems that portions of the system never get reset correctly.

First things first: You need a dual rank synchronizer or some kind of ARST sanitation like this here. So I have that in my HDL code

One question I have is what does the Altera Qsys Clock Source actually do? Does it preform the function of a dual rank syncronizer? Or does it need a sanitized ARST signal? Because in a most systems examples from altera and other suppliers they don't sanitize the ARST and run it straight into the Qsys/NIOS block. (Like in Example 1A below)

The other question that I have is: If I have external code that I connect to the Qsys\NIOS II system what reset signal do I use? Does it need to be reset with the Qsys\NIOS II system? Does the Qsys\NIOS Clock Source do something to the clock signal? Do I have export the Clock and Reset signals from the Qsys system?

Which way is correct? Are there advantages to either way?

schematic

schematic

simulate this circuit – Schematic created using CircuitLab

schematic

simulate this circuit

\$\endgroup\$
2
  • \$\begingroup\$ In terms of getting the JTAG reset to work properly, have you connected the jtag_debug_module_reset output from the NIOS processor back to the reset_n pin of the NIOS as well as anywhere else you want to be reset by the JTAG? \$\endgroup\$ Commented Sep 10, 2016 at 1:10
  • \$\begingroup\$ There was at one point a question about how Qsys handles reset sync, but I can't seem to find it now. \$\endgroup\$ Commented Sep 10, 2016 at 1:13

1 Answer 1

1
\$\begingroup\$

Example 1A is the correct one. QSYS synchronizes reset deassert internally for the Nios logic. But you need a reset synchronizer for the other logic implemented in the FPGA (outside QSYS).

\$\endgroup\$
1
  • \$\begingroup\$ So wouldn't there be a problem if I have two different ASYNC resets (one inside Qsys and one outside) because some of the registers connecting the QSYS project and would be reset at different times? Wouldn't Exa 1 also work by making sure all registers would be reset at the same time? Do I have to make sure all registers are reset via ASYNC at the same time if there is connecting logic? \$\endgroup\$
    – Voltage Spike
    Commented Oct 24, 2016 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.