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.

[Moved] Verilog-A problem regarding square wave generation.

Status
Not open for further replies.

upasana sahu

Newbie
Newbie level 2
Joined
Jul 10, 2020
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
30
Hello,

I am trying to write verilog-A code to model a circuit .
I want to generate a square wave . Fot 0 to T(time) output should be low and for T to T1 time output should be high and it repeat .

Here is the code, however it doesn't seem to work.
Any help?
Code:
module Neuron16Jan(IN1,IN2,R1,G1);
input IN1,IN2;
output R1;
output G1;
electrical IN1,IN2,G1;
electrical gnd; //internal port
electrical R1;
parameter real slope_velocity_vs_currentdensity=0.11;
parameter real vlogic_low=225e-3;
parameter real vlogic_high=703e-3;
parameter real total_distance=5800e-9;
parameter real delt=209n;
real t;
real t1;
integer temp,next;
analog begin
V(gnd)<+0;
t=(total_distance)/((slope_velocity_vs_currentdensity)*(I(IN1,gnd)+I(IN2,gnd))*1e6);
t1=((total_distance)/((slope_velocity_vs_currentdensity)*(I(IN1,gnd)+I(IN2,gnd))*1e6))+209n;
@(initial_step) begin
temp=0;
end

@(timer(t)) begin
temp=0;
end
@(timer(t,t1)) begin
temp=1;
end
V(R1)<+ transition(temp ? vlogic_high:vlogic_low,0.01n,0.01n);
end
endmodule
 
Last edited by a moderator:

This post is likely better suited for the Analog Integrated Circuit Design, Layout & Fabrication Questions. Analog ASIC Design sub-forum!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top