module: distortion_dpa_10bit
description:  Distortion table for DPA 10bit. Coded by Min Park 12/23/08
             (converted 10/08/10)
              table.dat path modified by Min Park 10/22/10
parameters:  
inputs:  double in
outputs:  double out
classes: List list1() 
static_variables:  double distort[1024] int nn int in_int 
init:  
   list1.load("c:/CppSim/SimRuns/Pwm_polar_tx/distortion_dpa_10bit_tst/table.dat");
   list1.reset();
   for(nn=1023; nn>=00; nn--){
      distort[nn] = list1.read();
   }

end:  
code:  
   in_int = (int)in;
   if( in_int < 0 )
      in_int = 0;

   if( in_int>=0 && in_int<= 1023){
      out = distort[in_int];
   }
   else{
      printf("Error! in is out of range. in=%e\n",in);
   }


functions:  
custom_classes_definition:  
custom_classes_code:  
