Re: [myhdl-list] intbv.saturate, intbv.wrap
Brought to you by:
jandecaluwe
From: Christopher L. F. <cf...@uc...> - 2008-06-28 18:33:57
|
I missed the earlier discussion, but my opinion the wrap is used very often in DSP applications. Any time you use an integrator (CIC, loop filters, etc) you frequently take advantage of the wrap. Even FIR filters will often use the wrap "feature". Now with that said, you don' t have to use the wrap, the wrap buys another bit(s) of precision (or growth) without adding the additional bit(s). At the expense of an additional bit(s) you should be able to use the bounded intbv for the design, and the limits will be checked. If you are using something like an integrator (or something that has one) on a very slow signal it will require more bits so it can be expensive this is usually where the wrap is used. Any DC offset will cause problems in this case (integrator growth). In the figure below (attached?) you can see for a pure integrator the gain vs. frequencies and can calculate the maximum bits required. If the design can handle the additional bits it is probably worth while having it bounded in simulation, may find other issues etc. |