[Fpga-synth] Nomenclature

Scott Gravenhorst music.maker at gte.net
Thu May 29 20:05:30 CEST 2008


Probably a simple question -

I use something I call a "window", which is probably not the correct term and I'd like to know the correct term.

Assume there is a register MyReg of 30 bits width that contains data.  This register needs to connect to a module, such as a DAC, that inputs a smaller number of bits than 30.  For this example, assume it's a 12 bit DAC.

If one simply assigns the top 12 bits of MyReg to the DAC input, that works as long as the general magnitude of values is large enough.  But what if something attenuates the values transferred to MyReg, such as a lowpass filter, such that the output is never more than can be contained in, say, the lowest 15 bits.  Under those conditions, a better connection would be to use not the top 12 bits of MyReg, but to grab 12 bits down to the right a little.  If the system can produce both "large" and "small" signa
ls at MyReg (under different conditions), then it would be nice to be able to adjust where the "window" is located over MyReg.  

I do this as follows:

reg  [29:0] MyReg;
reg  [4:0]  shifts;
wire [11:0] DACwindow;
wire [29:0] MyRegShifter;

assign MyRegShifter = MyReg << shifts;
assign DACwindow    = MyRegShifter[29:18];

The wire vector DACwindow is then transferred to the DAC module input register by a state machine.  'shifts' is an "amplification factor".  The way I look at this, this technique is better than simply left shifting to increase magnitude because bits with computed information are used instead of zeroes.

What is this technique called?



-- ScottG

-----------------------------------------------------------------

-- Scott Gravenhorst
-- GateManPoly - FPGA Based Polyphonic MIDI LA/FM Synthesizer
-- GateMan-III - FPGA Based Monophonic MIDI LA/FM Synthesizer
-- PolyDaWG/8 - FPGA Based 8 Voice Polyphonic MIDI Synthesizer
-- FatMan: home1.gte.net/res0658s/fatman/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- When the going gets tough, the tough use the command line.



More information about the Fpga-synth mailing list