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

Subversion Repositories openmsp430

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

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

Line No. Rev Author Line
1 134 olivier.gi
/*===========================================================================*/
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 202 olivier.gi
 
39 134 olivier.gi
integer ii;
40
 
41
initial
42
   begin
43
      $display(" ===============================================");
44
      $display("|                 START SIMULATION              |");
45
      $display(" ===============================================");
46 202 olivier.gi
 
47
      // Disable automatic DMA verification
48
      #10;
49
      dma_verif_on = 0;
50
 
51 134 olivier.gi
      repeat(5) @(posedge mclk);
52
      stimulus_done = 0;
53
 
54
      // Disable detection of the end of test
55
      force inst_pc = 16'h0000;
56
 
57 202 olivier.gi
 
58 134 olivier.gi
 
59
      //  SCAN MODE
60
      //------------------------------
61
 
62
      for ( ii=0; ii < 8; ii=ii+1)
63
        begin
64
           scan_mode = ~scan_mode;
65
           repeat(5) @(posedge mclk);
66
        end
67
      scan_mode = 1'b0;
68
 
69
      reset_n       = 1'b1;
70
      #93;
71
      reset_n       = 1'b0;
72
      #593;
73
      reset_n       = 1'b1;
74
      repeat(20) @(posedge mclk);
75
 
76
      //  SCAN ENABLE
77
      //------------------------------
78
 
79
      for ( ii=0; ii < 8; ii=ii+1)
80
        begin
81
           scan_enable = ~scan_enable;
82
           repeat(5) @(posedge mclk);
83
        end
84
      scan_enable = 1'b0;
85
 
86
      reset_n       = 1'b1;
87
      #93;
88
      reset_n       = 1'b0;
89
      #593;
90
      reset_n       = 1'b1;
91
      repeat(20) @(posedge mclk);
92
 
93
      //  SCAN MODE & SCAN ENABLE
94
      //------------------------------
95
 
96
      for ( ii=0; ii < 8; ii=ii+1)
97
        begin
98
           scan_mode = ~scan_mode;
99
           repeat(5) @(posedge mclk);
100
           scan_enable = ~scan_enable;
101
           repeat(5) @(posedge mclk);
102
           scan_enable = ~scan_enable;
103
           repeat(5) @(posedge mclk);
104
           scan_mode = ~scan_mode;
105
           repeat(5) @(posedge mclk);
106
        end
107
      scan_mode   = 1'b0;
108
      scan_enable = 1'b0;
109
      repeat(5) @(posedge mclk);
110
 
111
      for ( ii=0; ii < 8; ii=ii+1)
112
        begin
113
           scan_enable = ~scan_enable;
114
           repeat(5) @(posedge mclk);
115
           scan_mode = ~scan_mode;
116
           repeat(5) @(posedge mclk);
117
           scan_mode = ~scan_mode;
118
           repeat(5) @(posedge mclk);
119
           scan_enable = ~scan_enable;
120
           repeat(5) @(posedge mclk);
121
        end
122
      scan_mode   = 1'b0;
123
      scan_enable = 1'b0;
124
 
125
      reset_n       = 1'b1;
126
      #93;
127
      reset_n       = 1'b0;
128
      #593;
129
      reset_n       = 1'b1;
130
      repeat(20) @(posedge mclk);
131
 
132
      release inst_pc;
133
 
134
 
135
 
136
      stimulus_done = 1;
137
   end
138
 

powered by: WebSVN 2.1.0

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