title: Apply decay envelope to waveform without multiplication
body: <p>I'm trying to apply a decay envelope to a sinusoidal waveform using Verilog. Hardware constraints prevent use of multiplication to simply multiply by the envelope. The sine values and envelope values, for which I'm simply using 1-exp(-x), are stored in ROMs to speed everything up. </p>
  
  <p>Right now I'm simply calculating the output sample by subtracting the exponential value from the sine value if the sine value is larger. If the exponential value is larger than the sine value, the output sample is zero. This works pretty well, but the current exponential value to subtract needs to be modulated by the current location on the sine wave so that the full value is subtracted when the sine is maximum and zero is subtracted when the sine is zero. </p>
  
  <p>I'd appreciate any advice that anyone can give and I can provide more details if required. If this isn't an appropriate place for Verilog questions is there somewhere else that's better?</p>
  
  <p>Thanks!</p>