OpenCores
URL https://opencores.org/ocsvn/pltbutils/pltbutils/trunk

Subversion Repositories pltbutils

[/] [pltbutils/] [branches/] [dev0007/] [templates/] [vhdl/] [template2/] [tc1.vhd] - Blame information for rev 73

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 pela
----------------------------------------------------------------------
2
----                                                              ----
3
---- PlTbUtils Example Testcase Architecture for                  ----
4 44 pela
---- Template Testbench                                           ----
5 2 pela
----                                                              ----
6
---- This file is part of the PlTbUtils project                   ----
7
---- http://opencores.org/project,pltbutils                       ----
8
----                                                              ----
9 44 pela
---- Description:                                                 ----
10 2 pela
---- 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 an example which demonstrates how PlTbUtils     ----
15
---- can be used.                                                 ----
16
----                                                              ----
17
----                                                              ----
18
---- To Do:                                                       ----
19
---- -                                                            ----
20
----                                                              ----
21
---- Author(s):                                                   ----
22
---- - Per Larsson, pela@opencores.org                            ----
23
----                                                              ----
24
----------------------------------------------------------------------
25
----                                                              ----
26 44 pela
---- Copyright (C) 2013-2014 Authors and OPENCORES.ORG            ----
27 2 pela
----                                                              ----
28
---- This source file may be used and distributed without         ----
29
---- restriction provided that this copyright statement is not    ----
30
---- removed from the file and that any derivative work contains  ----
31
---- the original copyright notice and the associated disclaimer. ----
32
----                                                              ----
33
---- This source file is free software; you can redistribute it   ----
34
---- and/or modify it under the terms of the GNU Lesser General   ----
35
---- Public License as published by the Free Software Foundation; ----
36
---- either version 2.1 of the License, or (at your option) any   ----
37
---- later version.                                               ----
38
----                                                              ----
39
---- This source is distributed in the hope that it will be       ----
40
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
41
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
42
---- PURPOSE. See the GNU Lesser General Public License for more  ----
43
---- details.                                                     ----
44
----                                                              ----
45
---- You should have received a copy of the GNU Lesser General    ----
46
---- Public License along with this source; if not, download it   ----
47
---- from http://www.opencores.org/lgpl.shtml                     ----
48
----                                                              ----
49
----------------------------------------------------------------------
50
library ieee;
51
use ieee.std_logic_1164.all;
52
use ieee.numeric_std.all;
53 44 pela
--use work.txt_util.all;
54 2 pela
use work.pltbutils_func_pkg.all;
55
 
56
architecture tc1 of tc_template is
57
begin
58
  p_tc1 : process
59 44 pela
    variable pltbv  : pltbv_t := C_PLTBV_INIT;
60 2 pela
  begin
61 44 pela
    startsim("tc1", pltbv, pltbs);
62 2 pela
    rst         <= '1'; -- Template example
63
    -- < Template info: initialize other DUT stimuli here. >
64
 
65 44 pela
    starttest(1, "Reset test", pltbv, pltbs); -- Template example
66
    waitclks(2, clk, pltbv, pltbs); -- Template example
67
    check("template_signal during reset", template_signal, 0, pltbv, pltbs); -- Template example
68 2 pela
    -- < Template info: check other DUT outputs here. 
69
    rst  <= '0'; -- Template example
70 44 pela
    endtest(pltbv, pltbs);
71 2 pela
 
72 44 pela
    starttest(2, "Template test", pltbv, pltbs);
73 2 pela
    -- < Template info: set all relevant DUT inputs here. >
74 44 pela
    waitclks(2, clk, pltbv, pltbs); -- Template example
75 2 pela
    -- < Template info: check all relevant DUT outputs here. >
76 44 pela
    endtest(pltbv, pltbs);
77 2 pela
    -- < Template info: add more tests here. >
78
 
79 44 pela
    endsim(pltbv, pltbs, true);
80 2 pela
    wait;
81
  end process p_tc1;
82
end architecture tc1;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.