gaom9
Full Member level 4
how to add dc voltage
Hi,
I want to add a dc voltage as a common voltage of the circuit to the Differentiator in verilog-a. I add it as follow:
`include "discipline.h"
`include "constants.h"
// model diff - Differentiator
//
module diff (vin, vout);
input vin;
output vout;
electrical vin, vout;
parameter real outcom = 2.5;
real vout_val;
parameter real tau = 0.0001;
analog begin
vout_val = outcom + tau * ddt(V(vin));
V(vout) <+ vout_val;
end
endmodule
Here outcom is the dc voltage which I added. tau is the Differentiator constant. But it does not work, the output common voltage is still Zero.
What is the matter with it, please?
And my simulate tool is cadence spectre.
Thank you.
Best regards!
Hi,
I want to add a dc voltage as a common voltage of the circuit to the Differentiator in verilog-a. I add it as follow:
`include "discipline.h"
`include "constants.h"
// model diff - Differentiator
//
module diff (vin, vout);
input vin;
output vout;
electrical vin, vout;
parameter real outcom = 2.5;
real vout_val;
parameter real tau = 0.0001;
analog begin
vout_val = outcom + tau * ddt(V(vin));
V(vout) <+ vout_val;
end
endmodule
Here outcom is the dc voltage which I added. tau is the Differentiator constant. But it does not work, the output common voltage is still Zero.
What is the matter with it, please?
And my simulate tool is cadence spectre.
Thank you.
Best regards!