module: period_avg_inverse
parameters: double gain
inputs: double in, double clk
outputs: double out
classes: EdgeDetect clkedge()
static_variables:
init:
code:
if (clkedge.inp(clk))
  {
  if (fabs(in) < 1e-3)
     { 
      printf("error in 'period_avg_inverse':\n");
      printf("  input is too low\n");
      printf("  in = %5.3e\n",in);
      printf("  -> this should never happen??\n");
      exit(1);
     }
  out=gain/in;
  }
