2014年6月3日 星期二

Verilog Primitives

Verilog Provides in-built primitives for basic gate and switch level modeling. Any circuit can be modeled by using continuous assignment of gate and switch level primitives.
and (strong1, weak0)#(1,2) gate1(out, in1, in2);


Basic Gates

and
0
1
x
z
or
0
1
x
z
xor
0
1
x
z
0
0
0
0
0
0
0
1
x
x
0
0
1
x
x
1
0
1
x
x
1
1
1
1
1
1
1
0
x
x
x
0
x
x
x
x
x
1
x
x
x
x
x
x
x
z
0
x
x
x
z
x
1
x
x
z
x
x
x
x
nand
0
1
x
z
nor
0
1
x
z
xnor
0
1
x
z
0
1
1
1
1
0
1
0
x
x
0
1
0
x
x
1
1
0
x
x
1
0
0
0
0
1
0
1
x
x
x
1
x
x
x
x
x
0
x
x
x
x
x
x
x
z
1
x
x
x
z
x
0
x
x
z
x
x
x
x



buf
not
input
output
input
output
0
0
0
1
1
1
1
0
x
x
x
x
z
x
z
x

bufif1, bufif0, notif1, notif0 Gates


bufif0
control input
bufif1
control input
0
1
x
z
0
1
x
z
data
0
0
z
L
L
data
0
z
0
L
L
input
1
1
z
H
H
input
1
z
1
H
H
x
x
z
x
x
x
z
x
x
x
z
x
z
x
x
z
z
x
x
x

notif0
control input
notif1
control input
0
1
x
z
0
1
x
z
data
0
1
z
H
H
data
0
z
1
H
H
input
1
0
z
L
L
input
1
z
0
L
L
x
x
z
x
x
x
z
x
x
x
z
x
z
x
x
z
z
x
x
x

nmos, pmos, rnmos, rpmos, cmos, and rcmos switches

The cmos and rcmos switches have four ports: the first is an output port, the second is a data port, the third is a n-control port, and the fourth a is p-control port.

pmos
control input
nmos
control input
rpmos
0
1
x
z
rnmos
0
1
x
Z
data
0
0
z
L
L
data
0
z
0
L
L
input
1
1
z
H
H
input
1
z
1
H
H
x
x
z
x
x
x
z
x
x
x
z
z
z
z
z
z
z
z
z
z

cmos
N control
rcmos
0
1
x
z
P control
0
1
x
z
0
1
x
z
0
1
x
z
0
1
x
z
Data
0
0
z
L
L
0
0
0
0
0
L
L
L
0
L
L
L
1
1
z
H
H
1
1
1
1
1
H
H
H
1
H
H
H
x
x
z
x
x
x
x
x
x
x
x
x
x
x
x
x
x
z
z
z
z
z
z
z
z
z
z
z
z
z
z
z
z
z
Symbols L and H have a special meaning. The symbol L means that the output has 0 or z value. The symbol H means that the output has 1 or z value. Any transition to H or L is treated as a transition to x.

rtranif0rtranif1tranif0 and tranif1 switches


The rtranif0, rtranif1, tranif0 and tranif1 switches have three ports: two bidirectional data ports and one control port (third position on port list).

tran and rtran switches

The tran and rtran switches have two bidirectional data ports.
pullup and pulldown sources
The instantiation pullup and pulldown sources cannot contain delay declaration. The pullup can contain only strength1 specification (the strength0 declaration is optional). The pulldown can contain only strength0 specification (the strength1 declaration is optional).
The pullup source places a logic value 1 on connected signals. The pull down source places a logic value 0 on connected signals.




沒有留言:

張貼留言

2024年4月24日 星期三 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --2

 2024年4月24日 星期三 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --2 AngularJS 實例 <!DOCTYPE html> <html> <head> &...