|
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 SYSTEMVERILOG SKILLS 1
(Q
i
1)
o
e
What
i
is
o
the
q
name
r
e
of
i
the
o
q
j
method
r
e
in
i
which
o
covergroup
q
is constructed
z
in
u
y
your
e
o
project
z
x
?
(Q
i
2)
o
e
A
i
method
o
is
q
defined
r
e
a
i
virtual.
o
q
j
Using
r
e
extended
i
class
o
handle/object,
q
how to
z
call
u
y
the
e
o
virtual
z
x
method defined in base class?
(Q
i
3)
o
e
What
i
is
o
the
q
difference
r
e
B/W
i
the
o
q
j
variable
r
e
in
i
model
o
and
q
static variable
z
in
u
y
class
e
o
?
(Q
i
4)
o
e
What
i
is
o
the
q
difference
r
e
B/W
i
static,
o
q
j
automatic
r
e
and
i
dynamic
o
variables
q
?
www.testbench.in
(Q
i
5)
o
e
What
i
is
o
the
q
difference
r
e
B/W
i
verilog
o
q
j
function
r
e
and
i
SV
o
function
q
?
(Q
i
6)
o
e
What
i
is
o
the
q
output
r
e
of
i
the
o
q
j
following
r
e
program
i
?
program
main
();
i
initial
begin
i
fork
#
25
$display
(
"time
i
=
o
e
0
i
#
o
T25
q
"
,
$time
);
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
i
join_none
www.testbench.in
i
fork
#
20
$display
(
"
i
time
o
e
=
i
0
o
#
q
T20 "
,
$time
);
#
10
$display
(
"
i
time
o
e
=
i
0
o
#
q
T10 "
,
$time
);
#
5
$display
(
"
i
time
o
e
=
i
0
o
#
q
T5 "
,
$time
);
i
join_any
disable
fork
;
end
i
initial
i
#
100
$finish
;
www.testbench.in
endprogram
(Q
i
7)
o
e
Why
i
Constructor
o
is
q
not
r
e
virtual
i
?
(Q
i
8)
o
e
Do
i
we
o
need
q
"virtual
r
e
constructor"
i
functionality
o
q
j
?
r
e
If
i
yes,
o
then
q
why is
z
it
u
y
required
e
o
?
(Q
i
9)
o
e
How
i
to
o
achieve
q
"virtual
r
e
constructor"
i
functionality
o
q
j
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
10)
o
e
Lets
i
say
o
I
q
have
r
e
transactions
i
a,b,c,d,e.
www.testbench.in
i
I
o
e
would
i
like
o
to
q
generate
r
e
transaction
i
series
o
q
j
like
i
(1)A,
o
e
i
(2)
o
e
B
i
or
o
C,
i
(3)D,
i
(4)
o
e
if
i
B
o
is
q
generated
r
e
in
i
second
o
q
j
position
r
e
then
i
generate
o
D
q
and next
z
go
u
y
to
e
o
(5)
z
x
or jump to (1) again,
i
(5)
o
e
E,
i
go
o
back
q
to
r
e
(1)
i
How
o
e
to
i
implement
o
this
q
?
(Q
i
11)
o
e
Write
i
a
o
$display
q
stamen
r
e
to
i
print
o
q
j
the
r
e
value
i
in
o
a
q
enumerated variable.
z
www.testbench.in
(Q
i
12)
o
e
What
i
is
o
the
q
different
r
e
between
i
`define
o
q
j
and
r
e
"let"
i
?
(Q
i
13)
o
e
Why
i
default
o
clocking
q
block
r
e
is
i
required
o
q
j
?
(Q
i
14)
o
e
What
i
is
o
the
q
output
r
e
of
i
the
o
q
j
following
r
e
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
module
ques
();
string
strin
[
7
]
;
www.testbench.in
int
i
,
j
,
k
,
file
;
initial
begin
string
s
;
file
i
=
$fopen
(
"file.txt"
,
"r"
);
while
(!
$feof
(
file
))
begin
k
=
$fscanf
(
file
,
""
,
s
);
strin
[
i
]
=
s
;
i
++;
end
www.testbench.in
$fclose
(
file
);
foreach
(
strin
[
j
])
$display
(
"index
i
j=
o
e
0 string
i
="
,
j
,
strin
[
j
]);
$finish
;
end
endmodule
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
content
i
in
o
e
file
.
txt
www.testbench.in
================
aa
bb
cc
================
Ans:
Index
i
j=0 string
o
e
=
i
aa
Index
i
j=1 string
o
e
=
i
bb
Index
i
j=2 string
o
e
=
i
cc
www.testbench.in
Index
i
j=3 string
o
e
=
i
cc
The
i
data
o
e
"cc"
i
is
o
read
q
twice.
r
e
This
i
is
o
e
because
i
of
o
$feof.
q
(Q
i
15)
o
e
How
i
to
o
deallocate
q
an
r
e
object
i
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
Ans:
When
i
an
o
e
object
i
is
o
no
q
longer
r
e
needed,
i
SystemVerilog
o
q
j
automatically
r
e
reclaims
i
the
o
memory,
q
making it
z
available
u
y
for
e
o
reuse.
z
x
The automatic memory management system is an integral part of SystemVerilog.
If
i
user
o
e
want
i
to
o
deallocate,
q
he
r
e
can
i
just
o
q
j
assign
r
e
null
i
to
o
the
q
object.
www.testbench.in
EXAMPLE:
testclass
i
b
;
// Declare
o
e
a
i
handle
o
b
q
for
r
e
testclass
b
i
=
new
;
//
o
e
Construct a
i
testclass
o
object
q
and
r
e
stores
i
the
o
q
j
address
r
e
in
i
b
o
."new"
q
allocate space
z
for
u
y
testclass
b
=
null
;
i
//Deallocate
o
e
the
i
object.Means
o
Deallocate
q
the
r
e
memory
i
space
o
q
j
for
r
e
object.
(Q
i
16)
o
e
What
i
is
o
callback
q
?
Ans:
Testbenches must
i
provide
o
e
a
i
"hook"
o
where
q
the
r
e
test
i
program
o
q
j
can
r
e
inject
i
new
o
code
q
without modifying
z
the
u
y
original
e
o
classes.
Take
i
an
o
e
example:
i
Suppose
o
u
q
want
r
e
to
i
inject
o
q
j
a
r
e
new
i
functionality in
o
the
q
driver without
z
modifying
u
y
the
e
o
code.
z
x
You can add the new functionality in pre_callback task or post-callback task,without modifying Driver task.
task
Driver
::
run
;
www.testbench.in
forever
begin
...
<
pre_callback
>
//It
i
calls
o
e
the
i
function
o
pre_callback.
i
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
transmit
(
tr
);
end
endtask
task
pre_callback
;
www.testbench.in
endtask
For
i
more
o
e
information,
i
Click on the below link
http://www.testbench.in/VM_08_VMM_CALLBACK.html
(Q
i
17)
o
e
What
i
is
o
factory
q
pattern
r
e
?
Ans:
EXAMPLE::
class
Generator
;
Transaction
i
tr
;
mailbox
mbx
;
www.testbench.in
tr
i
=
new
;
task
run
;
repeat
(
10
)
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
begin
assert
(
tr
.
randomize
);
mbx
.
put
(
tr
);
//
i
Send
o
e
out
i
transaction
end
endtask
endclass
Bug::Here
i
Object
o
e
"tr"
i
is
o
constructed
q
once
r
e
outside
i
the
o
q
j
loop.
r
e
Then
i
"tr"
o
is
q
randomized and
z
put
u
y
them
e
o
into
z
x
mailbox "mbx".But mailbox "mbx" holds only handles,not objects.Therefore Mailbox contains multiple handles pointing to single object.Here code gets the last set of random values.
www.testbench.in
Solution::Loop
i
should
o
e
contain
i
1)Constructing
i
object
o
e
2)Randomizing
i
object
3)Puttting
i
into
o
e
mailbox
task
run
;
repeat
(
10
)
begin
tr
i
=
new
();
o
e
//1.Constructing
assert
(
tr
.
randomize
);
//2.Randomize
www.testbench.in
mbx
.
put
(
tr
);
i
//3.Putting
o
e
into
i
mailbox
end
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
endtask
Second
i
Bug:
o
e
The
i
run
o
task
q
constructs
r
e
a transaction
i
and
o
q
j
immediately
r
e
randomizes
i
it.
o
Means
q
transaction "tr"
z
uses
u
y
whatever
e
o
constraints
z
x
are turned on by default.
Solution
i
:
o
e
Separate
i
the
o
construction
q
of
r
e
tr
i
from
o
q
j
its
r
e
randomization
i
by
o
using
q
a method
z
called "Factory
u
y
Pattern".
Factory
i
Pattern:
1)construct
i
a
o
e
blueprint
i
object
o
2)Randomize
i
this
o
e
blueprint(
i
It
o
has
q
correct
r
e
random
i
values
o
q
j
)
3)Make
i
a
o
e
copy
i
of
o
this
q
object
r
e
www.testbench.in
4)Put
i
into
o
e
mailbox
class
Generator
;
mailbox
mbx
;
Transaction
i
blueprint
;
blueprint
i
=
new
;
//1.Constructing
o
e
Blue
i
print
task
run
;
Transaction
i
tr
;
Repeat
(
10
}
begin
www.testbench.in
assert
(
blueprint
.
randomize
);
//2.Randomizing
i
Blue
o
e
print
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
tr
i
=
blueprint
.
copy
;
// 3.Copy
o
e
the
i
blueprint
mbx
.
put
(
tr
);
//
i
4.Put
o
e
into
i
mailbox
end
endtask
endclass
(Q
i
18)
o
e
Explain
i
the
o
difference
q
between
r
e
data
i
types
o
q
j
logic
r
e
and
i
reg
o
and
q
wire .
Ans:
www.testbench.in
WIRE:
1.
i
Wire
o
e
is
i
just
o
an
q
interconnection
r
e
between
i
two
o
q
j
elements
r
e
which
i
does
o
not
q
have any
z
driving
u
y
strength
2.
i
It
o
e
is
i
used
o
for
q
modeling
r
e
combinational
i
circuit
o
q
j
as
r
e
it
i
cannot
o
store
q
a value.
3.
i
Wire
o
e
has
i
a
o
default
q
value
r
e
of
i
"z""
o
q
j
and
r
e
get
i
values
o
continuously
q
from the
z
outputs
u
y
of
e
o
devices
z
x
to which they are connected to.
4.Example:
wire
A
;
assign
A
i
=
b
&
c
;
Note:wire
i
A
o
e
is
i
evaluated
o
for
q
every
r
e
simulation
i
delta
o
q
j
time.
r
e
So
i
there
o
is
q
no need
z
to
u
y
store
e
o
the
z
x
value.
REG
www.testbench.in
1.
i
Reg
o
e
is
i
a
o
4
q
state
r
e
unsigned
i
variable
o
q
j
that
r
e
can
i
hold
o
a
q
value and
z
retains
u
y
until
e
o
a
z
x
new value is assigned to it.
2.
i
Register
o
e
data
i
type
o
can
q
be
r
e
used
i
for
o
q
j
modeling
r
e
both
i
combinational
o
and
q
sequential logic
3.
i
Default
o
e
value
i
for
o
register
q
is
r
e
"x"
i
and
o
q
j
it
r
e
doesn't
i
require
o
any
q
driver to
z
assign
u
y
value
e
o
like
z
x
wire. It can be driven from initial and always block. Values of the register can be changed anytime in the simulation by assigning a new value to register.
4.Example:
i
reg
A
;
always
@
(
b
i
or
c
)
begin
A
=
b
&
c
;
end
Note:A
i
is
o
e
declared
i
as
o
reg
q
which
r
e
can
i
be
o
q
j
evaluated
r
e
only
i
when
o
there
q
is a
z
change
u
y
in
e
o
any
z
x
of the signal in the sensitivity list. So reg needs to store the value until there is a change in sensitivity list.
www.testbench.in
LOGIC:
i
1.
i
4
o
e
state
i
unsigned
o
data
q
type
r
e
introduced
i
in
o
q
j
System
r
e
verilog.
2.System
i
Verilog
o
e
improves
i
the
o
classic
q
reg
r
e
data
i
type
o
q
j
so
r
e
that
i
it
o
can
q
be driven
z
by
a.
i
Continuous
o
e
assignments, (ex:assign
i
crc=~crc; )
b.
i
Gates,
o
e
(ex:
i
and
o
g1(q_out,
q
d);
r
e
)
c.
i
Modules,
o
e
(ex:
i
Flp_fops
o
f1
q
(q,
r
e
q_out,
i
clk,rst);
o
q
j
)
3.In
i
addition
o
e
to
i
being
o
a
q
variable.
r
e
It
i
is
o
q
j
given
r
e
the
i
synonym
o
logic
q
so that
z
it
u
y
does
e
o
not
z
x
look
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
i
like
o
e
a
i
register
o
declaration.
q
www.testbench.in
4.If
i
you
o
e
only
i
made
o
procedural
q
assignments
r
e
to
i
'logic'
o
q
j
then
r
e
it
i
was
o
semantically
q
equivalent to
z
'reg'.
u
y
5.A
i
logic signal
o
e
can
i
be
o
used
q
anywhere
r
e
a
i
net
o
q
j
is
r
e
used,
i
except
o
that
q
a logic
z
variable
u
y
cannot
e
o
be
z
x
driven by
i
multiple
o
e
structural
i
drivers,
o
such
q
as
r
e
when
i
you
o
q
j
are
r
e
modeling
i
a
o
bidirectional
q
bus.
6.Example:
i
module
sample1
;
logic
crc
,
sa
i
,
d
,
q_out
;
logic
clk
,
rst
;
initial
begin
clk
=
1'b0
;
//procedural
i
assignment
www.testbench.in
i
#
10
clk
o
e
=
1'b1
;
end
assign
crc
=~
crc
;
//continuous
i
assignment
and
g1
(q_out,
i
d);
o
e
//q_out
i
is
o
driven
q
by
r
e
gate
Flp_fops
i
f1
o
e
(q,
i
q_out,
o
clk,rst);
q
//q
r
e
is
i
driven
o
q
j
by
r
e
module
endmodule
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
19)
o
e
What
i
is
o
the
q
need
r
e
of
i
clocking
o
q
j
blocks
r
e
?
www.testbench.in
Ans:
Any
i
signal
o
e
in
i
a
o
clocking
q
block
r
e
is
i
driven
o
q
j
or
r
e
sampled
i
synchronously,
o
ensuring
q
that your
z
testbench
u
y
interacts
e
o
with the
z
x
signals at the right time.
The
i
"skew"
o
e
avoids
i
race
o
conditions
q
between
r
e
Testbench
i
and
o
q
j
DUT.
EXAMPLE:
clocking
cb
i
@(
posedge
clk
);
// clocking
o
e
block
i
cb
o
declares,
q
signals
r
e
inside
i
r active
o
q
j
on positive
r
e
edge
i
of
o
clk.
default
input
#
1ns
i
output
#
2ns
;
//
o
e
Input
i
skew
o
and
q
output
r
e
skew,
i
output
request
;
//output
i
from DUT to
o
e
testbench
input
grant
i
;
//Input
o
e
from
i
testbench
o
to
q
DUT
endclocking
Note:
i
Iinput
o
e
signals(grant) are
i
sampled
o
at
q
1ns
r
e
before
i
clock
o
q
j
event
r
e
and
i
output(request)
o
are
q
driven at
z
2ns
u
y
time after
e
o
corresponding
z
x
clock event
www.testbench.in
If
i
skew
o
e
is
i
not
o
specified,
q
default
r
e
input
i
skew
o
q
j
is
r
e
1step
i
and
o
output
q
skew is
z
0.
(Q
i
20)
o
e
What
i
are
o
the
q
ways
r
e
to
i
avoid
o
q
j
race
r
e
condition
i
between
o
test
q
bench and
z
RTL
u
y
using SystemVerilog
e
o
?
Ans:
1)The
i
clock
o
e
which
i
is
o
given
q
to
r
e
DUT
i
and
o
q
j
Testbench
r
e
should
i
have
o
a
q
phase difference.
z
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
2)DUT
i
should
o
e
work
i
or
o
posedge
q
of
r
e
clock
i
and
o
q
j
testbench
r
e
should
i
work
o
on
q
negedge of
z
clock.
3)Testbench
i
output
o
e
and
i
DUT
o
output
q
pins
r
e
should
i
always
o
q
j
be
r
e
driven
i
using
o
non
q
blocking statements.
4)Clocking
i
blocks.
www.testbench.in
5)Program
i
block.
(Q
i
21)
o
e
Explain
i
Event
o
regions
q
in
r
e
SV
i
.
(Q
i
22)
o
e
What
i
are
o
the
q
types
r
e
of
i
coverages
o
q
j
available
r
e
in
i
SV
o
?
(Q
i
23)
o
e
Can
i
a
o
constructor
q
be
r
e
qualified
i
as
o
q
j
protected
r
e
or
i
local
o
in
q
SV ?
(Q
i
24)
o
e
How
i
to
o
have
q
a
r
e
#delay
i
statement
o
q
j
which
r
e
is
i
independent
o
of
q
timescale ?
z
I
u
y
verilog
e
o
,
z
x
the #delay is dependent on timescale.
www.testbench.in
(Q
i
25)
o
e
Is
i
it
o
possible
q
to
r
e
pass
i
struct
o
q
j
or
r
e
union
i
from
o
SV
q
to C
z
using
u
y
DPI
e
o
?
z
x
If yes, then how is it done ?
(Q
i
26)
o
e
What
i
is
o
OOPS?
(Q
i
27)
o
e
What
i
is
o
inheritance
q
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
28)
o
e
How
i
to
o
write
q
a
r
e
message
i
to
o
q
j
a
r
e
string
i
?
(Q
i
29)
o
e
Signals
i
inside
o
the
q
interface
r
e
should
i
be
o
q
j
wires
r
e
or
i
logic
o
?
www.testbench.in
(Q
i
30)
o
e
Give
i
examples
o
of
q
static
r
e
cast
i
and
o
q
j
dynamic
r
e
cast
i
.
(Q
i
31)
o
e
How
i
the
o
Static
q
cast
r
e
and
i
Dynamic
o
q
j
cast
r
e
errors
i
are
o
reported
q
?
(Q
i
32)
o
e
How
i
Parameterized
o
macros
q
can
r
e
be
i
debugged
o
q
j
?
(Q
i
33)
o
e
What
i
is
o
TLM
q
?
(Q
i
34)
o
e
What
i
will
o
be
q
the
r
e
values
i
of
o
q
j
rand
r
e
and
i
randc
o
variables
q
if randomization
z
fails
u
y
?
www.testbench.in
(Q
i
35)
o
e
Explain
i
about
o
the Timeunit,
q
Timeprecision
r
e
and
i
`timescale
o
q
j
.
(Q
i
36)
o
e
Is
i
it
o
possible
q
to
r
e
access
i
a
o
q
j
member
r
e
of
i
a
o
struct
q
that is
z
returned
u
y
by
e
o
a
z
x
function in side the function ?
(Q
i
37)
o
e
How
i
to
o
randomize
q
a
r
e
real
i
data
o
q
j
type
r
e
variable
i
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
38)
o
e
What
i
is
o
$
q
in
r
e
SV
i
?
(Q
i
39)
o
e
What
i
are
o
the
q
types
r
e
of
i
parameterized
o
q
j
class?
www.testbench.in
(Q
i
40)
o
e
What
i
is
o
the
q
default
r
e
value
i
of
o
q
j
enumerated
r
e
data
i
type
o
?
(Q
i
41)
o
e
What
i
is
o
polymorphism
q
?
(Q
i
42)
o
e
Give
i
an
o
example
q
of
r
e
polymorphism
i
.
(Q
i
43)
o
e
What
i
are
o
the
q
types
r
e
of
i
polymorphism
o
q
j
?
(Q
i
44)
o
e
How
i
to
o
convert
q
a
r
e
command
i
line
o
q
j
defined
r
e
value
i
to
o
a
q
string in
z
SystemVerilog
u
y
?
www.testbench.in
(Q
i
45)
o
e
What
i
are
o
virtual
q
methods
r
e
?
(Q
i
46)
o
e
what
i
is
o
an
q
instance
r
e
of
i
a
o
q
j
class
r
e
?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
47)
o
e
what
i
is
o
a
q
virtual
r
e
class?
(Q
i
48)
o
e
What
i
is
o
a
q
scope
r
e
resolution
i
operator?
(Q
i
49)
o
e
What
i
is
o
deep
q
copy
r
e
?
www.testbench.in
(Q
i
50)
o
e
What
i
is
o
shallow
q
copy
r
e
?
(Q
i
51)
o
e
what
i
is
o
Method
q
Overloading?
(Q
i
52)
o
e
what
i
is
o
Method
q
OverRidingd?
(Q
i
53)
o
e
What
i
is
o
meant
q
by
r
e
abstraction?
(Q
i
54)
o
e
What
i
is
o
a
q
base
r
e
class?
i
www.testbench.in
(Q
i
55)
o
e
What
i
is
o
a
q
superclass?
r
e
(Q
i
56)
o
e
What
i
is
o
the
q
difference
r
e
between
i
Aggregation
o
q
j
and
r
e
Composition?
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
57)
o
e
What
i
is
o
the
q
need
r
e
of
i
virtual
o
q
j
interfaces
r
e
?
i
(Q
i
58)
o
e
What
i
are
o
the
q
advantages
r
e
of
i
OOP?
Ans:
Data
i
hiding
o
e
helps
i
create
o
secure
q
programs.
Redundant
i
code
o
e
can
i
be
o
avoided
q
by
r
e
using
i
inheritance.
www.testbench.in
Multiple
i
instances
o
e
of
i
objects
o
can
q
be
r
e
created.
Work
i
can
o
e
be
i
divided
o
easily
q
based
r
e
on
i
objects.
Inheritance
i
helps
o
e
to
i
save
o
time
q
and
r
e
cost.
(Q
i
59)
o
e
In
i
what
o
context
q
,
r
e
you
i
use
o
q
j
foreach
r
e
loop
i
?
(Q
i
60)
o
e
Write
i
code
o
to print
q
the
r
e
contents
i
of array_2d
o
q
j
[][]
r
e
using
i
foreach
o
loop
q
?
(Q
i
61)
o
e
Implemented
i
code
o
to
q
merge
r
e
double
i
linked
o
q
j
list. Define
r
e
each
i
element
o
of
q
linked list
z
using
u
y
class.
e
o
www.testbench.in
(Q
i
62)
o
e
What
i
will
o
the
q
printed
r
e
value
i
?
i
Bit
o
e
[
7
:
0
]
a
,
b
;
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
i
A
o
e
=
8
<92>hff
;
B
i
=
8
<92>h01
;
i
$display
(
"0"
,
A
o
e
+
B
);
(Q
i
63)
o
e
Why
i
checker...endchecker
o
is
q
used
r
e
?
(Q
i
64)
o
e
I
i
want
o
to
q
delay
r
e
simulation
i
by
o
q
j
smallest
r
e
unit
i
of
o
time.
q
i.e minimum
z
of
u
y
all
e
o
the
z
x
timeprecision. How to do it ?
(Q
i
65)
o
e
Explain
i
stratified
o
event
q
queue
r
e
?
www.testbench.in
(Q
i
66)
o
e
Define
i
enumerated
o
data
q
type
r
e
,with
i
one
o
q
j
of
r
e
its
i
elements
o
value
q
to be
z
X.
(Q
i
67)
o
e
Is
i
this
o
a
q
valid
r
e
syntax
i
?
enum
{
a
=
0
,
b
=
7
,
c
,
d
=
8
}
alphabet
;
(Q
i
68)
o
e
What
i
are
o
the
q
different
r
e
types
i
of
o
q
j
parameters
r
e
available
i
in
o
SV?
(Q
i
69)
o
e
What
i
is
o
the
q
use
r
e
of
i
"type"
o
q
j
operator
r
e
?
www.testbench.in
(Q
i
70)
o
e
What
i
type
o
is
q
the
r
e
index
i
for
o
q
j
int
r
e
array_name
i
[*]?
o
.....w.....w......w......t.....e.....s.....t......b.....e.....n.....c.....h......i.....n
(Q
i
71)
o
e
In
i
a
o
Array,
q
If index
r
e
is
i
out
o
q
j
of
r
e
the
i
address
o
bounds,
q
then what
z
will
u
y
be
e
o
the
z
x
return value ?
(Q
i
72)
o
e
What
i
is
o
the
q
return
r
e
type
i
of
o
q
j
Array
r
e
locator
i
method
o
find_index
q
?
(Q
i
73)
o
e
Write
i
a
o
program
q
to
r
e
choose
i
elements
o
q
j
randomly
r
e
from
i
Queue.
o
No
q
element should
z
be
u
y
reputed
e
o
until
z
x
all elements are chosen. Queue may have elements repeated.
(Q
i
74)
o
e
Declare
i
a
o
queue
q
of
r
e
integers
i
with
o
q
j
maximum
r
e
number
i
of
o
elements
q
to 256.
www.testbench.in
(Q
i
75)
o
e
Explain
i
how
o
you
q
debugged
r
e
randomization
i
failure.
(Q
i
76)
o
e
What
i
is
o
zero
q
delay
r
e
loop
i
and
o
q
j
What
r
e
is
i
the
o
problem
q
with zero
z
delay
u
y
loop
e
o
?
(Q
i
77)
o
e
What
i
is
o
the
q
difference
r
e
between
i
zero
o
q
j
delay
r
e
loop
i
in
o
design
q
and testbench
z
?
(Q
i
78)
o
e
Is
i
randomize()
o
method
q
is
r
e
virtual
i
?
(Q
i
79)
o
e
Write
i
code
o
for
q
the
r
e
below
i
spec:
o
q
j
i
2
o
e
varibles
i
a,b
o
are
q
declared
r
e
in
i
module.
o
q
j
www.testbench.in
i
Generate
o
e
random
i
runbers
o
such
q
that
r
e
a
i
>
o
q
j
b.
r
e
i
Do
o
e
not
i
use
o
$random
q
or
r
e
$urandom.
i
(Q
i
80)
o
e
In
i
a
o
class,
q
a
r
e
variable
i
is
o
q
j
declared
r
e
as
i
randc.
o
But
q
when randomized,
z
the
u
y
random
e
o
value
z
x
doesn<92>t seem to be cyclic. What could be the reason ?
(Q
i
81)
o
e
Pre_randomize()
i
is
o
virtual
q
or
r
e
not
i
?
i
If
o
e
"yes",
i
did
o
you
q
use
r
e
the
i
keyword
o
q
j
"virtual"
r
e
in
i
front
o
of
q
pre_randomize() ?
i
If
o
e
"not",
i
then
o
what
q
about
r
e
the
i
pre_randomize()
o
q
j
definition
r
e
defined
i
in
o
extended
q
class ?
(Q
i
82)
o
e
How
i
to
o
generate
q
random
r
e
numbers
i
bw
o
q
j
a
r
e
range
i
of
o
values?
www.testbench.in
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!