OpenCores

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [scan.v] - Blame information for rev 134

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 134 olivier.girard
/*===========================================================================*/
2
/* Copyright (C) 2001 Authors                                                */
3
/*                                                                           */
4
/* This source file may be used and distributed without restriction provided */
5
/* that this copyright statement is not removed from the file and that any   */
6
/* derivative work contains the original copyright notice and the associated */
7
/* disclaimer.                                                               */
8
/*                                                                           */
9
/* This source file is free software; you can redistribute it and/or modify  */
10
/* it under the terms of the GNU Lesser General Public License as published  */
11
/* by the Free Software Foundation; either version 2.1 of the License, or    */
12
/* (at your option) any later version.                                       */
13
/*                                                                           */
14
/* This source is distributed in the hope that it will be useful, but WITHOUT*/
15
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     */
16
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public       */
17
/* License for more details.                                                 */
18
/*                                                                           */
19
/* You should have received a copy of the GNU Lesser General Public License  */
20
/* along with this source; if not, write to the Free Software Foundation,    */
21
/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA        */
22
/*                                                                           */
23
/*===========================================================================*/
24
/*                                SCAN test                                  */
25
/*---------------------------------------------------------------------------*/
26
/* The purpose of this test is to let the scan_mode and scan_enable signals  */
27
/* toggle a bit in order to clean-up code coverage and give more visibility  */
28
/* on potential "real" coverage loss.                                        */
29
/*                                                                           */
30
/* Author(s):                                                                */
31
/*             - Olivier Girard,    olgirard@gmail.com                       */
32
/*                                                                           */
33
/*---------------------------------------------------------------------------*/
34
/* $Rev: 85 $                                                                */
35
/* $LastChangedBy: olivier.girard $                                          */
36
/* $LastChangedDate: 2011-01-28 22:05:37 +0100 (Fri, 28 Jan 2011) $          */
37
/*===========================================================================*/
38
 
39
integer ii;
40
 
41
initial
42
   begin
43
      $display(" ===============================================");
44
      $display("|                 START SIMULATION              |");
45
      $display(" ===============================================");
46
      repeat(5) @(posedge mclk);
47
      stimulus_done = 0;
48
 
49
      // Disable detection of the end of test
50
      force inst_pc = 16'h0000;
51
 
52
 
53
      //  SCAN MODE
54
      //------------------------------
55
 
56
      for ( ii=0; ii < 8; ii=ii+1)
57
        begin
58
           scan_mode = ~scan_mode;
59
           repeat(5) @(posedge mclk);
60
        end
61
      scan_mode = 1'b0;
62
 
63
      reset_n       = 1'b1;
64
      #93;
65
      reset_n       = 1'b0;
66
      #593;
67
      reset_n       = 1'b1;
68
      repeat(20) @(posedge mclk);
69
 
70
      //  SCAN ENABLE
71
      //------------------------------
72
 
73
      for ( ii=0; ii < 8; ii=ii+1)
74
        begin
75
           scan_enable = ~scan_enable;
76
           repeat(5) @(posedge mclk);
77
        end
78
      scan_enable = 1'b0;
79
 
80
      reset_n       = 1'b1;
81
      #93;
82
      reset_n       = 1'b0;
83
      #593;
84
      reset_n       = 1'b1;
85
      repeat(20) @(posedge mclk);
86
 
87
      //  SCAN MODE & SCAN ENABLE
88
      //------------------------------
89
 
90
      for ( ii=0; ii < 8; ii=ii+1)
91
        begin
92
           scan_mode = ~scan_mode;
93
           repeat(5) @(posedge mclk);
94
           scan_enable = ~scan_enable;
95
           repeat(5) @(posedge mclk);
96
           scan_enable = ~scan_enable;
97
           repeat(5) @(posedge mclk);
98
           scan_mode = ~scan_mode;
99
           repeat(5) @(posedge mclk);
100
        end
101
      scan_mode   = 1'b0;
102
      scan_enable = 1'b0;
103
      repeat(5) @(posedge mclk);
104
 
105
      for ( ii=0; ii < 8; ii=ii+1)
106
        begin
107
           scan_enable = ~scan_enable;
108
           repeat(5) @(posedge mclk);
109
           scan_mode = ~scan_mode;
110
           repeat(5) @(posedge mclk);
111
           scan_mode = ~scan_mode;
112
           repeat(5) @(posedge mclk);
113
           scan_enable = ~scan_enable;
114
           repeat(5) @(posedge mclk);
115
        end
116
      scan_mode   = 1'b0;
117
      scan_enable = 1'b0;
118
 
119
      reset_n       = 1'b1;
120
      #93;
121
      reset_n       = 1'b0;
122
      #593;
123
      reset_n       = 1'b1;
124
      repeat(20) @(posedge mclk);
125
 
126
      release inst_pc;
127
 
128
 
129
 
130
      stimulus_done = 1;
131
   end
132
 

powered by: WebSVN 2.1.0

© copyright 1999-2014 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.