`include "disciplines.va" /* * ****************************************************************************************** * Copyright (c) 2019 Pascal Kuthe. This file is part of the OpenVAF project. * It is subject to the license terms in the LICENSE file found in the top-level directory * of this distribution and at https://gitlab.com/DSPOM/OpenVAF/blob/master/LICENSE. * No part of OpenVAF, including this file, may be copied, modified, propagated, or * distributed except according to the terms contained in the LICENSE file. * ***************************************************************************************** */ `define branches\ branch (A,x) ax;\ branch (A,y) ay;\ branch (x,B) xb;\ branch (y,B) yb;\ branch (x,y) xy; `define calculate(a,b)\ b**a/2;\ C = C**2; module schaltung (A,B); inout electrical A,B; electrical x,y; `branches real C = 30; analog begin if (V(ax) > 100) begin if (V(ax) > 100) begin C=42*31+1; end if (V(ax) > 100) begin C=42*31+1; end else if (V(ax) > 100) begin C=42*31+1; end else begin end end I(xy) <+ (C*V(ax)+I(xy))/30; I(ax) <+ `calculate(31,V(ax)) I(ay) <+ V(ay)/20; if (V(ax) > 100) begin C=42*31+1; end I(ax) <+ V(ax)/40; I(ay) <+ C*V(ay)/50; end endmodule