Doing function calls inside @(*) causes lint errors. Instead, remove staging registers to eliminate 1 cycle latency between DPI call and when output is visible to Chisel.