Slow capture speed when the target is an external FPGA (Altera Cyclone V)


#1

Hi,

I’m trying to capture traces using the magnetic field probe (h-probe) from an external FPGA (Altera DE-10 nano). I’m using CW lite (CW1173) as the capture board. The target FPGA has been powered up from the capture board, and the clock and trigger pins are also connected. I’ve programmed the target board with a custom design and I’m generating the appropriate trigger signal which has similar electrical properties compared to the trigger signal we can see when using XMEGA as the target board with AES implementation.

My problem is, I can’t get enough traces captured. Although I’m generating 4000 trigger signals, the capture board is capturing only about 300 (less than 10%).

I can’t figure out what makes the capture speed slower. What can be a potential problem for this kind of behavior? Any sort of help or suggestion will be highly appreciated.

Thank you.


#2

Hi Shakil,

I’m not sure if I understand what is happening.
Do you mean that 3700 out of the 4000 captures result in a time out, e.g. the CW doesn’t recognize the trigger?
Are you arming the CW prior to each capture attempt?
Jean-Pierre


#3

Hi Jean-Pierre,

Thanks for your quick response.

I’m not sure what is going wrong. I’m generating 4000 triggers from the target board. So, shouldn’t the capture board capture 4000 traces?

Can you please clarify what did you mean by “arming the CW prior to each capture attempt”?

Thank you.

Best, Shakil


#4

Hi Shakil,

I’m still not clear on how you’re trying to gather 4000 traces; can you describe your approach in more detail?
Maybe I’ve misunderstood but it sounds like you’ve programmed your target to independently emit 4000 triggers. This won’t work because CW only responds to a trigger when it’s armed. This was a bit less transparent in the old v4 GUI, but in the latest Jupyter-based releases, you can see exactly the steps required to capture one trace in __init__.py:

  1. write the key
  2. arm the scope
  3. write the plaintext
  4. retrieve the result

This is all done if you follow the same approach as the notebooks, e.g. calling cw.capture_trace().
Are you doing something similar? Are you seeing any timeouts? (if you’re using v5, you would see a timeout message in Jupyter; in the v4 GUI, you’d see it in the debug logging pane).

Jean-Pierre


#5

Hi,

I’m so sorry for replying this late as I became very busy.

Thanks a lot for your response. I had a few issues in arming the scope which I’ve taken care of.

My approach: My custom design is running on the external FPGA (target) and I want to use ChipWhisperer to capture a certain number (say, 4000) of traces. So, I don’t need (1) write the key and (3) write the plaintext steps. I’m doing the other two steps, i.e arming the scope and retrieving the result. My target board generates 4000 trigger signals and I’m arming the scope 4000 times and retrieving the results. I’m not seeing any timeout messages. But, the overall count of traces is not 4000. Can you please let me know what I’m missing right now? Thank you.

Best,
Shakil


#6

Hi Shakil,

I suggest you try debugging what happens when you retrieve each trace (i.e. the scope.get_last_trace() call). With any luck this will point you towards the source of your problem.

Jean-Pierre


#7

Hi,

Thank you for the suggestion. I’m debugging and will let you know if something comes up.

Best,
Shakil