1
|
|
2
|
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc
|
3
|
|
4
|
-- This file is part of VESTs (Vhdl tESTs).
|
5
|
|
6
|
-- VESTs is free software; you can redistribute it and/or modify it
|
7
|
-- under the terms of the GNU General Public License as published by the
|
8
|
-- Free Software Foundation; either version 2 of the License, or (at
|
9
|
-- your option) any later version.
|
10
|
|
11
|
-- VESTs is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
14
|
-- for more details.
|
15
|
|
16
|
-- You should have received a copy of the GNU General Public License
|
17
|
-- along with VESTs; if not, write to the Free Software Foundation,
|
18
|
-- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
|
20
|
-- ---------------------------------------------------------------------
|
21
|
--
|
22
|
-- $Id: ch_05_ch_05_15.vhd,v 1.2 2001-10-26 16:29:34 paw Exp $
|
23
|
-- $Revision: 1.2 $
|
24
|
--
|
25
|
-- ---------------------------------------------------------------------
|
26
|
|
27
|
entity ch_05_15 is
|
28
|
generic ( extended_reset : boolean := false );
|
29
|
end entity ch_05_15;
|
30
|
|
31
|
|
32
|
----------------------------------------------------------------
|
33
|
|
34
|
|
35
|
architecture test of ch_05_15 is
|
36
|
|
37
|
signal functional_reset, equivalent_reset : bit := '0';
|
38
|
|
39
|
begin
|
40
|
|
41
|
|
42
|
block_05_3_r : block is
|
43
|
port ( reset : out bit );
|
44
|
port map ( reset => functional_reset );
|
45
|
begin
|
46
|
|
47
|
-- code from book:
|
48
|
|
49
|
reset_gen : reset <= '1', '0' after 200 ns when extended_reset else
|
50
|
'1', '0' after 50 ns;
|
51
|
|
52
|
-- end of code from book
|
53
|
|
54
|
end block block_05_3_r;
|
55
|
|
56
|
|
57
|
----------------
|
58
|
|
59
|
|
60
|
block_05_3_s : block is
|
61
|
port ( reset : out bit );
|
62
|
port map ( reset => equivalent_reset );
|
63
|
begin
|
64
|
|
65
|
-- code from book:
|
66
|
|
67
|
reset_gen : process is
|
68
|
begin
|
69
|
if extended_reset then
|
70
|
reset <= '1', '0' after 200 ns;
|
71
|
else
|
72
|
reset <= '1', '0' after 50 ns;
|
73
|
end if;
|
74
|
wait;
|
75
|
end process reset_gen;
|
76
|
|
77
|
-- end of code from book
|
78
|
|
79
|
end block block_05_3_s;
|
80
|
|
81
|
|
82
|
----------------
|
83
|
|
84
|
|
85
|
verifier :
|
86
|
assert functional_reset = equivalent_reset
|
87
|
report "Functional and equivalent models give different results";
|
88
|
|
89
|
|
90
|
end architecture test;
|