deltasigmaADC
Junior Member
Offline
Posts: 10
|
I'm trying to implement sample and hold with finite rise and fall time unlike the the case in ahdlLib which has sudden jumps at output. My code is as below.
module sah_ideal_risefall(vin, vout, vclk); input vin, vclk; output vout; electrical vin, vout, vclk; parameter real vtrans_clk = 2.5; parameter real risefalltime = 2p; real vout_val;
analog begin @(initial_step) begin vout_val = 0; end @(cross(V(vclk) - vtrans_clk, +1)) begin vout_val = V(vin); end V(vout) <+ transition(vout_val,0,risefalltime); end endmodule
During simulation spectre is giving me a warning as below.
line 22: Transition filter contains a continuous signal in the expression. Since a transition filter can only be applied to piecewise constant signals, redefine the expression to ensure that the transition filter applies only to a piecewise constant signal.
Isn't the variable updated only during positive edge of the clock? Doesn't that make the variable piecewise linear signal?
Thank you in advance
|