module: sd_modulator
parameters: int order
inputs: double in, double_interp clk
outputs: double out
classes: SdMbitMod sd_mod("1 - z^-1"), EdgeDetect clkedge()
static_variables:
init: 
if (order == 1)
  sd_mod.set("1 - z^-1");
else if (order == 2)
  sd_mod.set("1 -2z^-1 + z^-2");
else
  sd_mod.set("1 -3z^-1 + 3z^-2 - z^-3");
out = 2.0;
code:
if (clkedge.inp(clk))
   {
   sd_mod.inp(in);
   out = sd_mod.out;
   }
