4.6. Nios® -Based Dynamic Reconfiguration Flow
The host software puts the “DR-out” IP into quiescent state by asserting datapath reset to the IP. Then the host software polls the DR CSR Ready for New Trigger until it is set.
Then, the host software programs the profile information to the DR CSR registers and sets the Trigger Reconfig bit. Once Nios® samples the Trigger Reconfig bit set, it shall execute internal Tile specific programming to perform the DR switching, abstracting all the tile-specific architecture from host software. Host software polls specific DR CSR Ready for New Trigger bit to know when the Nios® is done with the switching flow, before host software can initiate another DR on the same channel. Once the Nios® is done with the switching flow, host software can release the “DR-in” IP from reset.
The right flow-chart shows the action taken by the NIOS core (either directly, or indirectly via other controllers) upon receiving the request to perform DR switching. The Trigger Reconfig bit, when set, is sampled by the Nios® core to invoke the internal DR switching flow. Nios® reads the new configuration settings and proceed to start the DR.
The next step is to write new configurations to the respective Tile IP blocks (MAC, PCS, FEC, PMA) registers. The tile registers to be programmed are derived based on the DR CSR registers values configured by host software.
Once the new tile configuration has been done, the Nios® core sets the DR CSR Ready for New Trigger bit so that host software knows the current DR switching is completed.
Typical Dynamic Reconfiguration Software Flow
- Continuously poll Dynamic Reconfiguration New Trigger (0x00) register until asserted. When asserted, the Nios® is ready.
- Reset the current protocol IP. For example, set i_p0_rst_n, i_p0_tx_rst_n, and i_p0_rx_rst_n bits to 1'b0.
- Wait for the current protocol IP reset acknowledgment. For example, clear o_p0_rst_ack_n, o_p0_tx_rst_ack_n, and o_p0_rx_rst_ack_n bits to 1'b0.
- Configure the next profile by programming Dynamic Reconfiguration Next Profile <N> (0x04 - 0x50) registers.
- Trigger dynamic reconfiguration by writing Dynamic Reconfiguration New Trigger (0x00) register.
- Continuously poll Dynamic Reconfiguration New Trigger (0x00) register until asserted.
- Configure the new protocol IP with a new configuration. For example, use 0x200 - 0x0208 offset for Ethernet Multirate IP registers.
- Take the new protocol IP out of reset. For example, set i_p0_rst_n, i_p0_tx_rst_n, and i_p0_rx_rst_n bits to 1'b1.
- Wait for new protocol IP reset acknowledgment. For example, o_p0_rst_ack_n, o_p0_tx_rst_ack_n, and o_p0_rx_rst_ack_n bits to 1'b1.
- Dynamic reconfiguration is complete.