Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / vests / vhdl-93 / billowitch / compliant / tc1757.vhd @ 3fd18385

History | View | Annotate | Download (4.08 KB)

1

    
2
-- Copyright (C) 2001 Bill Billowitch.
3

    
4
-- Some of the work to develop this test suite was done with Air Force
5
-- support.  The Air Force and Bill Billowitch assume no
6
-- responsibilities for this software.
7

    
8
-- This file is part of VESTs (Vhdl tESTs).
9

    
10
-- VESTs is free software; you can redistribute it and/or modify it
11
-- under the terms of the GNU General Public License as published by the
12
-- Free Software Foundation; either version 2 of the License, or (at
13
-- your option) any later version. 
14

    
15
-- VESTs is distributed in the hope that it will be useful, but WITHOUT
16
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18
-- for more details. 
19

    
20
-- You should have received a copy of the GNU General Public License
21
-- along with VESTs; if not, write to the Free Software Foundation,
22
-- Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
23

    
24
-- ---------------------------------------------------------------------
25
--
26
-- $Id: tc1757.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $
27
-- $Revision: 1.2 $
28
--
29
-- ---------------------------------------------------------------------
30

    
31
ENTITY c09s05b01x00p01n01i01757ent IS
32
END c09s05b01x00p01n01i01757ent;
33

    
34
ARCHITECTURE c09s05b01x00p01n01i01757arch OF c09s05b01x00p01n01i01757ent IS
35
  type   t_wlogic  is (U, D, Z0, Z1, ZDX, DZX, ZX);
36
  signal count : integer ;
37
  signal ECLK  : t_wlogic;
38
  signal ECLK2 : t_wlogic;
39
  signal ECL   : integer := 1;
40
BEGIN
41
  count <=    0 after  0 ns,
42
              1 after 10 ns,
43
              2 after 20 ns,
44
              3 after 30 ns,
45
              4 after 40 ns,
46
              5 after 50 ns,
47
              6 after 60 ns;
48
  ----------------------------------------------------------------------
49
  ECLK <= transport 
50
          U   after 1 ns WHEN count=0 ELSE
51
          D   after 1 ns WHEN count=1 ELSE
52
          Z0  after 1 ns WHEN count=2 ELSE
53
          Z1  after 1 ns WHEN count=3 ELSE
54
          ZDX after 1 ns WHEN count=4 ELSE
55
          DZX after 1 ns WHEN count=5 ELSE
56
          ZX  after 1 ns ;
57
  TESTING: PROCESS(count)
58
  BEGIN
59
    if   count = 0 then
60
      ECLK2 <= transport U   after 1 ns;
61
    elsif   count = 1 then
62
      ECLK2 <= transport D   after 1 ns;
63
    elsif   count = 2 then
64
      ECLK2 <= transport Z0  after 1 ns;
65
    elsif   count = 3 then
66
      ECLK2 <= transport Z1  after 1 ns;
67
    elsif   count = 4 then
68
      ECLK2 <= transport ZDX after 1 ns;
69
    elsif   count = 5 then
70
      ECLK2 <= transport DZX after 1 ns;
71
    else
72
      ECLK2 <= transport ZX  after 1 ns;
73
    end if;   
74
  END PROCESS TESTING;
75
  PROCESS(ECLK,ECLK2)
76
  BEGIN
77
    if       now =  0 ns then
78
      NULL;
79
    elsif   (now =  1 ns) and (ECLK /= ECLK2) then
80
      assert FALSE
81
        report "FAILED TEST"
82
        severity ERROR;
83
      ECL <= 0;
84
    elsif   (now = 11 ns) and (ECLK /= ECLK2) then
85
      assert FALSE
86
        report "FAILED TEST"
87
        severity ERROR;
88
      ECL <= 0;
89
    elsif   (now = 21 ns) and (ECLK /= ECLK2) then
90
      assert FALSE
91
        report "FAILED TEST"
92
        severity ERROR;
93
      ECL <= 0;
94
    elsif   (now = 31 ns) and (ECLK /= ECLK2) then
95
      assert FALSE
96
        report "FAILED TEST"
97
        severity ERROR;
98
      ECL <= 0;
99
    elsif   (now = 41 ns) and (ECLK /= ECLK2) then
100
      assert FALSE
101
        report "FAILED TEST"
102
        severity ERROR;
103
      ECL <= 0;
104
    elsif   (now = 51 ns) and (ECLK /= ECLK2) then
105
      assert FALSE
106
        report "FAILED TEST"
107
        severity ERROR;
108
      ECL <= 0;
109
    elsif   (now = 61 ns) and (ECLK /= ECLK2) then
110
      assert FALSE
111
        report "FAILED TEST"
112
        severity ERROR;
113
      ECL <= 0;
114
    end if;
115
  END PROCESS;
116
  PROCESS(ECLK,ECLK2)
117
  BEGIN
118
    if      (now > 60 ns) and (ECL = 1) then
119
      assert FALSE
120
        report "***PASSED TEST: c09s05b01x00p01n01i01757"
121
        severity NOTE;
122
    elsif   (now > 60 ns) and (ECL = 0) then
123
      assert FALSE
124
        report "***FAILED TEST: c09s05b01x00p01n01i01757 - The conditional signal assignment represents a process statement in which the signal transform is an if statement."
125
        severity ERROR;
126
    end if;
127
  END PROCESS;
128

    
129
END c09s05b01x00p01n01i01757arch;