|
发表于 2022-9-5 16:15:52
|
显示全部楼层
本帖最后由 andy2000a 于 2022-9-5 16:19 编辑
simple switch verilogA code
module simple_switch(in, out, tp);
input in, tp;
output out;
electricl in, out, tp;
parameter real vth =0.4;
real vout
analog begin
if (V(tp) >= vth) begin
vout = V(in);
end else
vout = 0;
V(out) <+ vout;
end
endmodule
|
|