PYNQ-Z1 Board with v3.0.1 from downloaded image.
When running the fsm_generator.ipynb and pattern_generator_and_trace_analyzer.ipynb, the captured waveforms are incorrect when calling the run
method. For FSM, the state machine advances twice per clock cycle, but works properly when stepped through the logictools_controller
(see below incorrect output, when the commented code is run instead, output is correct). Similarly, the pattern generator loopback signals are all 0 when run
, but work fine when stepped.
I haven’t been able to determine if this is an issue with my specific board (no spare boards to test), or whether this is an issue with the software/overlay within PYNQ, so any insight would be helpful.
After digging into the code a bit, it looks like the only difference between a run
and a step
is the command being written to the MicroBlaze. From pynq.lib.logictools.fsm_generator.py
:
def run(self):
...
cmd_run = CMD_RUN | FSM_ENGINE_BIT
if self.analyzer is not None:
cmd_run |= TRACE_ENGINE_BIT
self.logictools_controller.write_command(cmd_run)
...
vs
...
def step(self):
cmd_step = CMD_STEP | FSM_ENGINE_BIT
if self.analyzer is not None:
cmd_step |= TRACE_ENGINE_BIT
self.logictools_controller.write_command(cmd_step)
...
which leads me to believe that this might be an issue with the overlay itself, but without access to the detailed design of the overlay I don’t think I can verify this.
Hi @gweesip,
Welcome to the PYNQ community.
You can find and rebuild the loogictools overlay from here PYNQ/boards/Pynq-Z1/logictools at master · Xilinx/PYNQ · GitHub
Mario
Thanks. I’m not quite at the point of building overlays for PYNQ, but I’ll definitely give that a try when I get there. If I get to the root cause before anyone else chimes in here, I’ll be sure to update.