Skip to main content

Debugging Kernels That Use Filters

Use this guide when a kernel uses counter filters or filtered sockets.

Check what was received​

A wavelet arriving at a tile does not prove the filter accepted it. Check the received array as well as the arrival log.

  1. Confirm the sender's color and route reach the intended receiver.
  2. Check the filter's settings: .min/.max for a range filter; .tick, .limit and .maxpass for a counter filter.
  3. Check that the receive length matches the number of values the filter should accept.
  4. Inspect the result in bench-sim.core with miget, or use meminsp to find when individual words were written.

Use files from the same run:

miget image=bench-sim.core map=bench.map symbol=recv.result text
meminsp img_path=bench.img map_path=bench.map log_path=bench-sim.log tile_str=T0.0

At the meminsp> prompt, replace recv.result with a name from symbols:

symbols
print recv.result
diff recv.result @0 @200
seek 0
watch recv.result changed
run

See the meminsp reference for more commands.

Common symptoms​

SymptomWhat to check
Arrivals look correct, but the receive is shortFilter settings and the arriving traffic's color and route
The last expected value is missingPass window, receive length, and packets still waiting at the cycle limit
Only a boundary row or column failsPer-tile state inputs, padding, and clamping
Output remains zeroWhether the receive completes and the output-writing code runs
A run with generated filter state failsThe state-generation parameters and whether the intended state file was loaded

Start with one filtered socket and a short sequence of distinct values. Check the final received element as well as the total count before scaling back up.