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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [fv/] [fsm_input.e] - Blame information for rev 218

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

Line No. Rev Author Line
1 206 creep
<'
2
import fsm_components.e;
3
type fsm_input_t  :
4
                [ RESET, INSTRUCTIONS ];
5
 
6
'>
7
                        BRK, RTI, RTS, PHA_PHP, PLA_PLP, JSR,
8
                        ACCUMULATOR_OR_IMPLIED, IMMEDIATE, JMP,
9
                        ABSOLUTE_READ_INSTRUCTIONS,
10
                        ABSOLUTE_READ_MODIFY_WRITE,
11
                        ABSOLUTE_WRITE_INSTRUCTIONS,
12
                        ZERO_PAGE_READ_INSTRUCTIONS,
13
                        ZERO_PAGE_READ_MODIFY_WRITE,
14
                        ZERO_PAGE_WRITE_INSTRUCTIONS,
15
                        ZERO_PAGE_INDEXED_READ_INSTRUCTIONS,
16
                        ZERO_PAGE_INDEXED_READ_MODIFY_WRITE,
17
                        ZERO_PAGE_INDEXED_WRITE_INSTRUCTIONS,
18
                        ABSOLUTE_INDEXED_READ_INSTRUCTIONS,
19
                        ABSOLUTE_INDEXED_READ_MODIFY_WRITE,
20
                        ABSOLUTE_INDEXED_WRITE_INSTRUCTIONS,
21
                        REL,
22
                        INDEXED_INDIRECT_READ_INSTRUCTIONS,
23
                        INDEXED_INDIRECT_READ_MODIFY_WRITE,
24
                        INDEXED_INDIRECT_WRITE_INSTRUCTIONS,
25
                        INDIRECT_INDEXED_READ_INSTRUCTIONS,
26
                        INDIRECT_INDEXED_READ_MODIFY_WRITE,
27
                        INDIRECT_INDEXED_WRITE_INSTRUCTIONS,
28
                        ABSOLUTE_INDIRECT,
29
                        ALU
30
<'
31
--type fsm_test_type: [REGULAR, RAND];
32
 
33
struct fsm_input_s {
34
        input_kind : fsm_input_t;
35
        --n_cycles   : int;
36
--      test_kind  : fsm_test_type;
37
        reset_n    : bit;
38
        alu_result : byte;
39
        alu_status : byte;
40
        data_in    : byte;
41
        alu_x      : byte;
42
        alu_y      : byte;
43
 
44
//      when RESET'input_kind fsm_input_s {
45
//              keep reset_n == 0;
46
//              --keep n_cycles == 7;
47
//      };
48
 
49
//      when BRK'input_kind fsm_input_s {
50
//              keep reset_n == 1;
51
//              keep n_cycles == 7;
52
//              keep data_in == 8'h;
53
//      };
54
 
55
//      when RTI'input_kind fsm_input_s {
56
//              keep reset_n == 1;
57
//      };
58
 
59
//      when RTS'input_kind fsm_input_s {
60
//              keep reset_n == 1;
61
//      };
62
 
63
//      when PHA_PHP'input_kind fsm_input_s {
64
//              keep reset_n == 1;
65
//      };
66
 
67
//      when PLA_PLP'input_kind fsm_input_s {
68
//              keep reset_n == 1;
69
//      };
70
 
71
//      when JSR'input_kind fsm_input_s {
72
//              keep reset_n == 1;
73
//      };
74
 
75
//      when ACCUMULATOR_OR_IMPLIED'input_kind fsm_input_s {
76
//              keep reset_n == 1;
77
//              keep data_in ==
78
//      };
79
 
80
//      when IMMEDIATE'input_kind fsm_input_s {
81
//              keep reset_n == 1;
82
//      };
83
 
84
//      when JMP'input_kind fsm_input_s {
85
//              keep reset_n == 1;
86
//      };
87
 
88
//      when ABSOLUTE_READ_INSTRUCTIONS'input_kind fsm_input_s {
89
//              keep reset_n == 1;
90
//      };
91
 
92
//      when ABSOLUTE_READ_MODIFY_WRITE'input_kind fsm_input_s {
93
//              keep reset_n == 1;
94
//      };
95
 
96
//      when ABSOLUTE_WRITE_INSTRUCTIONS'input_kind fsm_input_s {
97
//              keep reset_n == 1;
98
//      };
99
 
100
//      when ZERO_PAGE_READ_INSTRUCTIONS'input_kind fsm_input_s {
101
//              keep reset_n == 1;
102
//      };
103
 
104
//      when ZERO_PAGE_READ_MODIFY_WRITE'input_kind fsm_input_s {
105
//              keep reset_n == 1;
106
//      };
107
 
108
//      when ZERO_PAGE_WRITE_INSTRUCTIONS'input_kind fsm_input_s {
109
//              keep reset_n == 1;
110
//      };
111
 
112
//      when ZERO_PAGE_INDEXED_READ_INSTRUCTIONS'input_kind fsm_input_s {
113
//              keep reset_n == 1;
114
//      };
115
 
116
//      when ZERO_PAGE_INDEXED_READ_MODIFY_WRITE'input_kind fsm_input_s {
117
//              keep reset_n == 1;
118
//      };
119
 
120
//      when ZERO_PAGE_INDEXED_WRITE_INSTRUCTIONS'input_kind fsm_input_s {
121
//              keep reset_n == 1;
122
//      };
123
 
124
//      when ABSOLUTE_INDEXED_READ_INSTRUCTIONS'input_kind fsm_input_s {
125
//              keep reset_n == 1;
126
//      };
127
 
128
//      when ABSOLUTE_INDEXED_READ_MODIFY_WRITE'input_kind fsm_input_s {
129
//              keep reset_n == 1;
130
//      };
131
 
132
//      when ABSOLUTE_INDEXED_WRITE_INSTRUCTIONS'input_kind fsm_input_s {
133
//              keep reset_n == 1;
134
//      };
135
 
136
//      when REL'input_kind fsm_input_s {
137
//              keep reset_n == 1;
138
//      };
139
 
140
//      when INDEXED_INDIRECT_READ_INSTRUCTIONS'input_kind fsm_input_s {
141
//              keep reset_n == 1;
142
//      };
143
 
144
//      when INDEXED_INDIRECT_READ_MODIFY_WRITE'input_kind fsm_input_s {
145
//              keep reset_n == 1;
146
//      };
147
 
148
//      when INDEXED_INDIRECT_WRITE_INSTRUCTIONS'input_kind fsm_input_s {
149
//              keep reset_n == 1;
150
//      };
151
 
152
//      when INDIRECT_INDEXED_READ_INSTRUCTIONS'input_kind fsm_input_s {
153
//              keep reset_n == 1;
154
//      };
155
 
156
//      when INDIRECT_INDEXED_READ_MODIFY_WRITE'input_kind fsm_input_s {
157
//              keep reset_n == 1;
158
//      };
159
 
160
//      when INDIRECT_INDEXED_WRITE_INSTRUCTIONS'input_kind fsm_input_s {
161
//              keep reset_n == 1;
162
//      };
163
 
164
//      when ABSOLUTE_INDIRECT'input_kind fsm_input_s {
165
//              keep reset_n == 1;
166
//      };
167
 
168
//      when ALU'input_kind fsm_input_s {
169
//              keep reset_n == 1;
170
//      };
171
 
172
//      when 'input_kind fsm_input_s {
173
//              keep reset_n == 1;
174
//      };
175
 
176
--      when REGULAR'test_kind alu_input_s {
177
--              keep soft input_kind == select {
178
--                      45: ENABLED_VALID;
179
--                      45: DISABLED_VALID;
180
--                      10: RESET;
181
--              };
182
--      };
183
 
184
--      when ENABLED_VALID'input_kind alu_input_s {
185
--              keep reset_n == TRUE; // remember this is active low 
186
--              keep alu_enable == TRUE;
187
--              keep alu_a in [0..255];
188
--      };
189
 
190
--      when DISABLED_VALID'input_kind alu_input_s {
191
--              keep reset_n == TRUE; // remember this is active low 
192
--              keep alu_enable == FALSE;
193
--              keep alu_a in [0..255];
194
--      };
195
 
196
        keep soft input_kind == select {
197
                        99: INSTRUCTIONS;
198
                        1 : RESET;
199
                };
200
 
201
        when RESET'input_kind fsm_input_s {
202
                keep reset_n == 0;
203
        };
204
 
205
        when INSTRUCTIONS'input_kind fsm_input_s {
206
                keep reset_n == 1;
207
        };
208
 
209
--      event T1_cover_event;
210
--      cover T1_cover_event is {
211
--              item input_kind using no_collect=TRUE, ignore = (input_kind == ENABLED_RAND || input_kind == DISABLED_RAND);
212
--              item alu_opcode using num_of_buckets=256, radix=HEX, no_collect=TRUE;
213
--              cross input_kind, alu_opcode;
214
--              //item alu_a;
215
--      };
216
};
217
 
218
--extend fsm_input_s {
219
--      rand_op : byte;
220
--
221
--      when RAND'test_kind alu_input_s {
222
--              keep soft input_kind == select {
223
--                      45: ENABLED_RAND;
224
--                      45: DISABLED_RAND;
225
--                      10: RESET;
226
--              };
227
--      };
228
--
229
--      when ENABLED_RAND'input_kind alu_input_s {
230
--              keep reset_n == TRUE; // remember this is active low 
231
--              keep alu_enable == TRUE;
232
--              keep alu_a in [0..255];
233
--              keep rand_op in [0..255];
234
--      };
235
--
236
--      when DISABLED_RAND'input_kind alu_input_s {
237
--              keep reset_n == TRUE; // remember this is active low 
238
--              keep alu_enable == FALSE;
239
--              keep alu_a in [0..255];
240
--              keep rand_op in [0..255];
241
--      };
242
--
243
--      event T2_cover_event;
244
--      cover T2_cover_event is {
245
--              item alu_enable using no_collect=TRUE;
246
--              item rand_op using num_of_buckets=256, radix=HEX, no_collect=TRUE;
247
--              cross alu_enable, rand_op;
248
--      };
249
--};
250
 
251
'>

powered by: WebSVN 2.1.0

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