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.

[SOLVED] Switched Capcitor Integrator output saturation in Verilog ams

Status
Not open for further replies.

sudeep_

Member level 1
Joined
Jul 31, 2013
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
261
Hi All,

I used the simple Verilog ams code for simulating Switched Capcitor Integrator. I am not sure how to control the Inegrator output saturation in this code.

Can anyone help in this case to add Integrator output bounds.


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module noninvert_integ(out, in, phi1, phi2);
input in, phi1, phi2;
voltage in;
output out;
wreal out;
wire phi1, phi2;
parameter real Cs = 1p from (0:inf);
parameter real Ci = 1p from (0:inf);
parameter real agnd = 1.65 from (0:inf);
real state, qs;
initial begin
qs = 0.0;
state = 0.0;
end
always @(negedge(phi1))
qs = Cs*(V(in)–agnd);
always @(negedge(phi2))
state = (qs + Ci*(out–agnd))/Ci;
assign out = state + agnd;
endmodule

 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top