예쟈룽의 메모장

[CAD] - Ideal Switch 설계 (SPST 타입, SPDT타입) 본문

CAD

[CAD] - Ideal Switch 설계 (SPST 타입, SPDT타입)

예쟈룽 2021. 1. 3. 19:12

In electronics, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits.

 

Two HDLs used today: VHDL and Verilog

 

Both are industrial standards and are supported by most software tools.

 

 

• Verilog-A

Continuous-time/continuous-value simulation

Signal flow modeling

Conservative modeling

 

Able to model analog circuits and systems

- Signal-flow models

Model relates potentials only

Useful for abstract models

- Conservative models

Model relates potentials and flows

Device modeling and loading at interfaces

 

회로를 단락하고 개방하는 이상적인 스위치를 설계해보겠습니다.

 

SPST 스위치 (왼쪽 : 기호, 오른쪽 : 로커 스위치)

 

 

Library Manager의 File - New - Cell View 를 클릭하고 아래와 같이 설정합니다.

 

Cell : 원하는 이름

Type : VerilogA

View : veriloga (Type 설정 시 자동 설정)

 

 

 

 

 

OK를 클릭하면 아래와 같이 만들 소자의 작동을 기술하는 창이 나타납니다.

그럼 오른쪽과 같이 작성합니다.

 

 

아래는 위에서 작성한 소스 코드입니다. 복붙하기 쉽게 다시 작성했습니다.

 

module ideal_sw (p, n, ps, ns);
parameter real thresh = 0;
output p, n;
input ps, ns;
electrical p, n, ps, ns;

analog begin
@(cross( V(ps, ns) - thresh, 0 ));
if ( V(ps, ns) > thresh )
	V(p, n) <+ 0;
else
	I(p, n) <+0;
end

endmodule

 

 

 

 

 

 

 

+) 참고

Comments