Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Verilog A code for symmetrical charge pump

vug

Newbie
Newbie level 3
Joined
Jul 4, 2024
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
37
I'm confused in writing the verilog A (analog Verilog) code for the above circuit in discrete domain ie, implemented in cadence virtuoso. This is a symmetrical charge pump using switched capacitor circuit. Can anyone help me with the code?

1720547614511.png
 
View attachment 192182
I'm confused in writing the verilog A (analog Verilog) code for the above circuit in discrete domain ie, implemented in cadence virtuoso. This is a symmetrical charge pump using switched capacitor circuit. Can anyone help me with the code?
During the clock high phase, connect the positive input to the capacitor's positive terminal and the negative input to the negative terminal. This charges the capacitor to the voltage difference (inp - inn).

During the clock low phase, connect the positive terminal of the capacitor to the output and the negative terminal to ground. This transfers the stored charge to the output, creating a voltage on Vout proportional to the input voltage difference.
 
This is the code i have written in z domain for the same circuit.
But the output is still zero.

Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
`include "constants.vams"
`include "disciplines.vams"
 
module singlecpdis (vinp, vinm, voutp, voutm);
  inout vinp, vinm, voutp, voutm;
  electrical vinp, vinm, voutp, voutm, in, in1, in2, out, out1, out2;
//parameter real n=1;
// parameter real fsamp = 10e6; // Sampling frequency
//parameter real CL = 100e-12 from (0:inf); // Capacitance C
//parameter real CT = 100e-12 from (0:inf);
  parameter real G = 0.002;
  parameter real T = 0.1e-6;     // Sampling period
 
analog begin
 
V(in) <+ V(vinp)-V(vinm);
V(in1) <+ zi_nd(V(in),{1},{1},T);
V(in2) <+ zi_nd(V(in),{0,1},{1},T);
 
V(out) <+ V(voutp) - V(voutm);
V(out1) <+ zi_nd(V(out),{1},{1},T);
V(out2) <+ zi_nd(V(out),{0,1},{1},T);
 
I(in) <+ zi_nd(I(in),{1},{1},T);
I(out) <+ zi_nd(I(out),{1},{1},T);
 
I(in) <+ G*(V(in1)-V(out2));
I(out) <+ G*(V(out1)-V(in2));
 
end
endmodule




[MODERATOR ACTION]
  • Added SYNTAX tags enclosing the code
 
Last edited by a moderator:

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top