Dear all,
I am trying to model analog latch in verilog-a but have been unable to do it. The requirement is as follows
It is required to sample an analog value at positive clock cycle of CLK2 and hold the same value even during the negative clock cycle of CLK2.
Any leads??
Dear all,
I am trying to model analog latch in verilog-a but have been unable to do it. The requirement is as follows
It is required to sample an analog value at positive clock cycle of CLK2 and hold the same value even during the negative clock cycle of CLK2.
Any leads??
// VerilogA code
`include "constants.vams"
`include "disciplines.vams"
module veriloga_latch(vin,vclk,vout_sampled);
input vin,vclk;
output vout_sampled;
voltage vin, vclk, vout_sampled;
parameter real vdd=1;
real vsample=0;
analog begin
if (V(vclk)>0.9*vdd) begin
vsample=V(vin);
end
V(vout_sampled) <+ vsample;
end
endmodule