|
HOME
|
ABOUT
|
ARTICLES
|
ACK
|
FEEDBACK
|
TOC
|
LINKS
|
BLOG
|
JOBS
|
Tutorials
SystemVerilog
Verification
Constructs
Interface
OOPS
Randomization
Functional Coverage
Assertion
DPI
UVM Tutorial
VMM Tutorial
OVM Tutorial
Easy Labs : SV
Easy Labs : UVM
Easy Labs : OVM
Easy Labs : VMM
AVM Switch TB
VMM Ethernet sample
Verilog
Verification
Verilog Switch TB
Basic Constructs
OpenVera
Constructs
Switch TB
RVM Switch TB
RVM Ethernet sample
Specman E
Interview Questions
TEST YOUR VERILOG SKILLS 2
(Q
i
22)
o
e
How
i
to
o
generate
q
a
r
e
random
i
number
o
q
j
between
r
e
44
i
to
o
55
q
?
(Q
i
23)
o
e
How
i
to
o
get
q
different
r
e
random
i
numbers
o
q
j
in
r
e
different
i
simulations?
(Q
i
24)
o
e
i
what
o
is
q
the
r
e
different
i
between
o
q
j
$sformat
r
e
and
i
$swrite?
Ans:
The
i
system
o
e
task
i
$sformat
o
is
q
similar
r
e
to
i
the
o
q
j
system
r
e
task
i
$swrite,
o
with
q
a one
z
major
u
y
difference.
e
o
Unlike
z
x
the display and write family of output system tasks, $sformat always interprets its second argument, and only its second argument as a format string. This format argument can be a static string, such as "data is 0" , or can be a reg variable whose content is interpreted as the format string. No other arguments are interpreted as format strings. $sformat supports all the format specifiers supported by $display,
(Q
i
25)
o
e
i
What
o
is
q
the
r
e
difference
i
between
o
q
j
wire
r
e
and
i
reg?
www.testbench.in
Ans:
Net
i
types:
o
e
(wire,tri)Physical
i
connection
o
between
q
structural
r
e
elements.
i
Value
o
q
j
assigned
r
e
by
i
a
o
continuous
q
assignment or
z
a
u
y
gate
e
o
output.
Register
i
type:
o
e
(reg,
i
integer,
o
time,
q
real,
r
e
real
i
time)
o
q
j
represents
r
e
abstract
i
data
o
storage
q
element. Assigned
z
values
u
y
only
e
o
within
z
x
an always statement or an initial statement.
The
i
main
o
e
difference
i
between
o
wire
q
and
r
e
reg
i
is
o
q
j
wire
r
e
cannot
i
hold
o
(store)
q
the value
z
when
u
y
the
e
o
no
z
x
connection between a and b like
a-------------b,
i
if
o
e
there
i
is
o
no
q
connection
r
e
in
i
a
o
q
j
and
r
e
b,
i
wire
o
loose
q
value where
z
as
u
y
reg
e
o
can
z
x
hold the value even if there in no connection.
Default
i
values:wire
o
e
is
i
Z,reg
o
is
q
x.
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
26)
o
e
What
i
happens
o
if
q
a
r
e
port
i
is
o
q
j
unconnected
r
e
?
www.testbench.in
Ans:
Unconnected
i
input
o
e
ports
i
initialize
o
to
q
z
r
e
and
i
feed
o
q
j
that
r
e
value
i
into
o
the
q
component, which
z
can
u
y
cause
e
o
problems.
z
x
More common are redundant or unwanted outputs which are left unconnected to be optimized away in synthesis.
(Q
i
27)
o
e
i
What
o
is
q
the
r
e
difference
i
between
o
q
j
===
r
e
and
i
==
o
?
Ans
i
:
output
i
of
o
e
"=="
i
can
o
be
q
1,
r
e
0
i
or
o
q
j
X.
output
i
of
o
e
"==="
i
can
o
only
q
be
r
e
0
i
or
o
q
j
1.
When
i
you
o
e
are
i
comparing
o
2
q
nos
r
e
using
i
"=="
o
q
j
and
r
e
if
i
one/both
o
the
q
numbers have
z
one
u
y
or
e
o
more
z
x
bits as "x" then the output would be "X" . But if use "===" output would be 0 or 1.
www.testbench.in
e.g
i
A
o
e
=
i
3'b1x0
B
i
=
o
e
3'b10x
A
i
==
o
e
B
i
will
o
give
q
X
r
e
as
i
output.
A
i
===
o
e
B
i
will
o
give
q
0
r
e
as
i
output.
"=="
i
is
o
e
used
i
for
o
comparison
q
of
r
e
only
i
1's
o
q
j
and
r
e
0's
i
.It
o
can't
q
compare X's.
z
If
u
y
any
e
o
bit
z
x
of the input is X output will be X
"==="
i
is
o
e
used
i
for
o
comparison
q
of
r
e
X
i
also...
"=="
i
can
o
e
be
i
synthesized,
o
where
q
as
r
e
"==="
i
cannot.
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
www.testbench.in
(Q
i
28)
o
e
i
What
o
is
q
the
r
e
difference
i
among
o
q
j
case,casex
r
e
and
i
casez?
Ans:
case
i
treats
o
e
only
i
0
o
or
q
1
r
e
values
i
in
o
q
j
case
r
e
alternative
i
and
o
is
q
is not
z
dealing
u
y
with
e
o
don't
z
x
care condition.
casex
i
treats
o
e
all
i
x
o
and
q
z
r
e
values
i
in
o
q
j
case
r
e
alternative
i
or
o
case
q
expression as
z
a
u
y
don't
e
o
care.
casez
i
treats
o
e
all
i
z
o
values
q
in
r
e
case
i
alternatives.
o
q
j
all
r
e
bit
i
positions
o
with
q
z can
z
treat
u
y
as
e
o
a
z
x
don't care
(Q
i
29)
o
e
What
i
is
o
the
q
difference
r
e
between
i
@(a
o
q
j
or
r
e
b)
i
and
o
@(a
q
| b)
(Q
i
30)
o
e
What
i
is
o
full
q
case
r
e
and
i
parallel
o
q
j
case.??
www.testbench.in
(Q
i
31)
o
e
What
i
is
o
the
q
difference
r
e
between
i
compiled,
o
q
j
interpreted,
r
e
event
i
based
o
and
q
cycle based
z
simulator
u
y
?
(Q
i
32)
o
e
What
i
is
o
compilation
q
?
Ans:
To
i
simulate
o
e
a
i
Verilog
o
model,
q
we
r
e
must
i
first
o
q
j
convert
r
e
our
i
source
o
files
q
into a
z
binary
u
y
form
e
o
that
z
x
can be recognized by the simulator. The process of checking the syntax and producing the binary file is known as compilation.
(Q
i
33)
o
e
What
i
data
o
types
q
can
r
e
be
i
used
o
q
j
for
r
e
input
i
port,
o
outut
q
port and
z
inout
u
y
port
e
o
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
34)
o
e
What
i
is
o
the
q
functionality
r
e
of
i
trireg
o
q
j
?
www.testbench.in
(Q
i
35)
o
e
What
i
is
o
the
q
functionality
r
e
of
i
tri1
o
q
j
ans
r
e
tri0
i
?
(Q
i
36)
o
e
Difference
i
between
o
conditional
q
compilation
r
e
and
i
$plusargs??
(Q
i
37)
o
e
What
i
is
o
the
q
benefit
r
e
of
i
using
o
q
j
Behavior
r
e
modeling
i
style
o
over
q
RTL modeling?
(Q
i
38)
o
e
What
i
is
o
the
q
difference
r
e
between
i
task
o
q
j
and
r
e
function?
Index
Functional Verification Questions
Functional Verification Questions 2
Test Your Systemverilog Skills 1
Test Your Systemverilog Skills 2
Test Your Systemverilog Skills 3
Test Your Systemverilog Skills 4
Test Your Sva Skills
Test Your Verilog Skills 1
Test Your Verilog Skills 2
Test Your Verilog Skills 3
Test Your Verilog Skills 4
Test Your Verilog Skills 5
Test Your Verilog Skills 6
Test Your Verilog Skills 7
Test Your Verilog Skills 8
Test Your Verilog Skills 9
Test Your Verilog Skills 10
Test Your Verilog Skills 11
Test Your Verilog Skills 12
Test Your Verilog Skills 13
Test Your Verilog Skills 14
Test Your Verilog Skills 15
Test Your Verilog Skills 16
Test Your Verilog Skills 17
Test Your Specman Skills 1
Test Your Specman Skills 2
Test Your Specman Skills 3
Test Your Specman Skills 4
Test Your Sta Skills 1
Test Your Sta Skills 2
Test Your Sta Skills 3
Test Your Sta Skills 4
Test Your Sta Skills 5
Test Your Sta Skills 6
Test Your Sta Skills 7
Test Your Dft Skills 1
Test Your Dft Skills 2
Test Your Dft Skills 3
Test Your Dft Skills 4
Test Your Uvm Ovm Skills
Report a Bug or Comment on This section
- Your input is what keeps Testbench.in improving with time!