Top Banner
Switch Level Modeling
14

Switch Level Modeling

Dec 31, 2015

Download

Documents

byron-santos

Switch Level Modeling. Objective. After completing this chapter, you will be able to Describe what is the structural modeling Describe how to instantiate switch primitives Describe how to model a design in switch primitives Describe how to specify delays in switches - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Switch Level Modeling

Switch Level Modeling

Page 2: Switch Level Modeling

Objective

After completing this chapter, you will be able to

Describe what is the structural modeling Describe how to instantiate switch primitivesDescribe how to model a design in switch

primitivesDescribe how to specify delays in switchesDescribe other features of switch primitives

04/19/23EnhanceEdu, IIIT-H2

Page 3: Switch Level Modeling

Switch Primitives

Ideal switches – without a prefixed letter “r”Resistive switches – with a prefixed letter “r”

04/19/23EnhanceEdu, IIIT-H3

MOS switches• nmos• pmos• cmos

Bidirectional switches• tran• tranif0• tranif1

Power and ground nets• supply1• supply0

Resistive switches• rnmos• rpmos• rcmos

Resistive bidirectional switches

• rtran• rtranif0• rtranif1

Pullup and pulldown• pullup• pulldown

Page 4: Switch Level Modeling

The nmos and pmos Switches

To instantiate switch elements switch_name [instance_name] (output, input,

control); The instance_name is optional

04/19/23EnhanceEdu, IIIT-H4

Page 5: Switch Level Modeling

Example -- The CMOS Inverter

04/19/23EnhanceEdu, IIIT-H5

module mynot (input x, output f);// internal declarationsupply1 vdd;supply0 gnd;// NOT gate bodypmos p1 (f, vdd, x);nmos n1 (f, gnd, x);endmodule

Page 6: Switch Level Modeling

Example -- CMOS NAND Gates

04/19/23EnhanceEdu, IIIT-H6

module my_nand (input x, y, output f);supply1 vdd;supply0 gnd;wire a;// NAND gate bodypmos p1 (f, vdd, x);pmos p2 (f, vdd, y);nmos n1 (f, a, x);nmos n2 (a, gnd, y);endmodule

Page 7: Switch Level Modeling

Example -- A Pseudo nMOS Gate

04/19/23EnhanceEdu, IIIT-H7

module my_pseudo_nor(input x, y, output f);supply0 gnd;// Pseudo nMOS gate bodynmos nx (f, gnd, x);nmos ny (f, gnd, y);pullup (f);endmodule

Page 8: Switch Level Modeling

CMOS Switch

04/19/23EnhanceEdu, IIIT-H8

To instantiate CMOS switches

cmos [instance_name] (output, input, ncontrol,

pcontrol);

• The instance_name is optional

Page 9: Switch Level Modeling

An Example -- A 2-to-1 Multiplexer

module my_mux (out, s, i0, i1);output out;input s, i0, i1;//internal wirewire sbar; //complement of s

not (sbar, s);//instantiate cmos switchescmos (out, i0, sbar, s);cmos (out, i1, s, sbar);endmodule

04/19/23EnhanceEdu, IIIT-H9

Page 10: Switch Level Modeling

Bidirectional Switches

To instantiate bidirectional switches:tran [instance_name] (in, out);tranif0 [instance_name] (in, out, control);tranif1 [instance_name] (in, out, control);• instance_name is optional

04/19/23EnhanceEdu, IIIT-H10

Page 11: Switch Level Modeling

Delay Specifications -- MOS/CMOS Switches

Specify no delay

mos_sw [instance_name](output, input, …);

cmos [instance_name](output, input, …); Specify propagation delay only

mos_sw #(prop_delay)[instance_name](output, input, …);

cmos #(prop_delay)[instance_name](output, input, …); Specify both rise and fall times

mos_sw #(t_rise, t_fall)[instance_name](output, input, …);

cmos #(t_rise, t_fall)[instance_name](output, input, …); Specify rise, fall, and turn-off times

mos_sw #(t_rise, t_fall, t_off)[instance_name](output, input, …);

cmos #(t_rise, t_fall, t_off)[instance_name](output, input, …);

04/19/23EnhanceEdu, IIIT-H11

Page 12: Switch Level Modeling

Delay Specifications -- Bidirectional Switches

Specify no delaybdsw name [instance name](in, out, control); Specify a turn-on and turn-off delaybdsw name #(t_on_off)[instance name](in,

out,control);Specify separately turn-on and turn-

off delaysbdsw name #(t_on, t_off)[instance name](in,

out, control);

04/19/23EnhanceEdu, IIIT-H12

Page 13: Switch Level Modeling

Signal Strengths

Can be weakened or attenuated by the resistance of the wires

04/19/23EnhanceEdu, IIIT-H13

Page 14: Switch Level Modeling

Single Strength Reduction

04/19/23EnhanceEdu, IIIT-H14