This module ramps down the field set point in a controlled manner. It is intended for use when a soft trip requires the rf field be ramped down quickly, but not instantaneously. Normally, the set-point data stream passes the module through the in and outports. Following a trigger, however, a snapshot of the interleaved I and Q parts is captured and the I and Q parts are each reduced in magnitude by one unit per predetermined number of clock cycles. These declining components are gated onto the out port and arrive at zero at an interval following the trigger in proportion to their initial values. Later when the module is reset, the in port is again gated onto the out port.
Ports | Parameters | Notes | Example | Illustration
clk | input | The clock input. |
reset | input | Reset input, which clears the ramp registers. |
quad | input | Two-bit vector fiducial indicating the current quadrant, for alignment of the I and Q components. |
go | input | A vector of triggers. |
in | output | The I/Q data stream that ramps to zero the the module is triggered. |
out | output | The output data stream that ramps to zero when triggered. |
busy | output | Indicates the ramp is in progress. |
done | output | A pulse indicates the ramp is completed. |
trip | output | Logic level indicating whether the module is tripped. It goes high when trippulse pulses. The module is untripped by a reset pulse. |
trippulse | output | Pulsed when the ramp down is actually triggered. If the go[] trigger vector consists of only one bit, then trippulse is pulsed at the same time as go pulse. When there is a multi-level trigger, then trippulse occurs when all trigger events have occurred simultaneous with the final one. |
width | 16 | Data bit width. |
duration | 32 | The inverse slope of the ramp down in clock cycles per decrement of the ramp (at most 256}. |
gobits | 2 | The number of bits of the go trigger vector. |
wire [15:0] din, dout; wire [1:0] quadrant; wire clk, reset, rdBusy, rdDone, Trip; RampDown #(.width(16), .gobits(2), .duration(24)) rd ( .clk(clk), .reset(reset), .en(1'b1), .quad(quad), .go({Trip, quad==2'b00}), .in(ramplocal), .out(ramp), .busy(rdBusy), .done(rdDone) );