10.1. Persona Swapping Simulation
Persona swapping simulation verifies the swapping of PR personas for a given PR partition. For this simulation you can use RTL or gate level PR simulation model of the personas. The simulation requires PR input and output multiplexers to specify the active persona. The testbench sequence to run this simulation is as follows:
- Assert the pr_activate signal, while changing the persona_select signal on the PR input and output multiplexer select lines to select the desired persona.
- After finishing PR, the testbench deasserts the pr_activate signal.
- Reset the persona.
Refer to the pr_sim_wrapper.sv file for information on how to instantiate the PR multiplexers. The simulation library for these multiplexers is in altera_lnsim.sv.
The simulation steps are as follows:
- Initialization and Initial Reset occur within the first two cycles and transitions to Section #1: PR with Freeze, then reset.
- The two 1-bit inputs, a and b, toggle through their four possible states, and the AND gate gives the correct response on the result output signal.
- A PR transition occurs by activating the pr_activate signal and changing the persona_select to the counter persona. While this transition occurs, the freeze signal activates to assert the output to a known value of 1.
When PR is complete, after one cycle in this case, the rst_n reset signal asserts to reset the counter persona to a known value state.
For the reset to take effect, you may have to hold the freeze and rst_n signals for a longer period, depending on the persona pipeline depth delay. In this design example, each persona has a one cycle delay from input to output.
- The 2-bit counter counts until the next PR transition occurs. The counter undergoes the same process as step 3 when transitioning to the FSM persona.
- The inputs a and b toggle through its four possible states, and the FSM outputs the correct response while activated.
Figure 13. Persona Swapping Simulation Waveform
