PlTbUtils
1.3
PlTbUtils is a collection of functions, procedures and components for easily creating stimuli and checking response in automatic self-checking testbenches.
tc1.vhd
Go to the documentation of this file.
1
----------------------------------------------------------------------
2
---- ----
3
---- PlTbUtils Testcase Architecture for ----
4
---- Template Testbench ----
5
---- ----
6
---- This file is part of the PlTbUtils project ----
7
---- http://opencores.org/project,pltbutils ----
8
---- ----
9
---- Description: ----
10
---- PlTbUtils is a collection of functions, procedures and ----
11
---- components for easily creating stimuli and checking response ----
12
---- in automatic self-checking testbenches. ----
13
---- ----
14
---- This file is a template, which can be used as a base when ----
15
---- testbenches which use PlTbUtils. ----
16
---- Copy this file to your preferred location and rename the ----
17
---- copied file and its contents, by replacing the word ----
18
---- "templateXX" with a name for your design. ----
19
---- Also remove informative comments enclosed in < ... > . ----
20
---- ----
21
---- ----
22
---- To Do: ----
23
---- - ----
24
---- ----
25
---- Author(s): ----
26
---- - Per Larsson, pela.opencores@gmail.com ----
27
---- ----
28
----------------------------------------------------------------------
29
30
library
ieee
;
31
use
ieee.std_logic_1164.
all
;
32
use
ieee.numeric_std.
all
;
33
--use work.txt_util.all;
34
use
work.
pltbutils_func_pkg
.
all
;
35
36
architecture
tc1
of
tc_template2
is
37
begin
38
p_tc1 :
process
39
variable
pltbv
:
pltbv_t
:=
C_PLTBV_INIT
;
40
begin
41
startsim
(
"tc1"
,
G_SKIPTESTS
,
pltbv
,
pltbs
)
;
42
rst
<=
'
1
'
;
-- Template example
43
-- < Template info: initialize other DUT stimuli here. >
44
45
starttest
(
1
,
"Reset test"
,
pltbv
,
pltbs
)
;
-- Template example
46
if
is_test_active
(
pltbv
)
then
47
waitclks
(
2
,
clk
,
pltbv
,
pltbs
)
;
-- Template example
48
check
(
"template_signal during reset"
,
template_signal
,
0
,
pltbv
,
pltbs
)
;
-- Template example
49
-- < Template info: check other DUT outputs here.
50
rst
<=
'
0
'
;
-- Template example
51
end
if
;
-- is_test_active()
52
endtest
(
pltbv
,
pltbs
)
;
53
54
starttest
(
2
,
"Template test"
,
pltbv
,
pltbs
)
;
55
if
is_test_active
(
pltbv
)
then
56
-- < Template info: set all relevant DUT inputs here. >
57
waitclks
(
2
,
clk
,
pltbv
,
pltbs
)
;
-- Template example
58
-- < Template info: check all relevant DUT outputs here. >
59
end
if
;
-- is_test_active()
60
endtest
(
pltbv
,
pltbs
)
;
61
62
-- < Template info: add more tests here. >
63
64
endsim
(
pltbv
,
pltbs
,
true
)
;
65
wait
;
66
end
process
p_tc1
;
67
end
architecture
tc1
;
pltbutils_func_pkg
This package defines fuctions and procedures for controlling stimuli to a DUT and checking response.
Definition:
pltbutils_func_pkg.vhd:46
tc_template2.tc1
Definition:
tc1.vhd:36
tc_template2
Definition:
tc_template2.vhd:33
tc_template2.rst
out rst std_logic
Definition:
tc_template2.vhd:52
tc_template2.G_SKIPTESTS
G_SKIPTESTS std_logic_vector :=( '0', '0', '0')
Definition:
tc_template2.vhd:42
tc_template2.clk
in clk std_logic
Definition:
tc_template2.vhd:45
tc_template2.pltbs
out pltbs pltbs_t
Definition:
tc_template2.vhd:44
templates
vhdl
template2
tc1.vhd
Generated by
1.9.1