Beruflich Dokumente
Kultur Dokumente
ECE-419
Switch-Level Modeling
Verilog provides the ability to design at a MOS-transistor level.
Design at this level is becoming rare with the increasing complexity of circuits
(millions of transistors) and with the availability of sophisticated CAD tools.
Switch-Modeling Elements:
Two types of MOS switches can be defined with the keywords, nmos and pmos.
control control
Contd.
Instantiation of NMOS and PMOS Switches
nmos n1 (out, data, control) ; //instantiate a nmos switch
pmos p1(out, data, control); //instantiate a pmos switch
Since switches are Verilog primitives, like logic gates, the name of the instance is
optional
Contd.
CMOS Switches: CMOS switches are declared with the keyword cmos
A cmos device can be modeled with a nmos and a pmos device.
ncontrol
data out
pcontrol
supply1 vdd;
supply0 gnd;
assign a = vdd; //Connect a to vdd
assign b = gnd; //Connect b to gnd
Example: Inverter