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

Subversion Repositories pltbutils

[/] [pltbutils/] [trunk/] [templates/] [vhdl/] [template2/] [tc1.vhd] - Blame information for rev 89

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

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

powered by: WebSVN 2.1.0

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