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

Subversion Repositories uart2bus_testbench

[/] [uart2bus_testbench/] [trunk/] [tb/] [test/] [uart_test.svh] - Blame information for rev 11

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

Line No. Rev Author Line
1 3 HanySalah
//-------------------------------------------------------------------------------------------------
2 2 HanySalah
//
3
//                             UART2BUS VERIFICATION
4
//
5 3 HanySalah
//-------------------------------------------------------------------------------------------------
6 2 HanySalah
// CREATOR    : HANY SALAH
7
// PROJECT    : UART2BUS UVM TEST BENCH
8
// UNIT       : TEST
9 3 HanySalah
//-------------------------------------------------------------------------------------------------
10 2 HanySalah
// TITLE      : UART TEST
11 3 HanySalah
// DESCRIPTION: THIS COMPONENT INCLUDES THE MAIN TESTS THAT WILL BE FORCED TO THE DUT. IT INCLUDES
12
//              VIRTUAL BASE TEST FUNCTION THAT SHARES THE MOST COMMON ATTRIBUTES OF ALL TESTS.
13
//              THE TESTS IMPLEMENTED THROUGH BELOW ARE RELATED TO THE TESTBENCH SPECIFICATIONS
14
//              DOCUMENT. YOU CAN DOWNLOAD IT DIRECTLY THROUGH OPENCORES.COM OR FIND IT IN THE DOC
15
//              DIRECTORY.
16
//-------------------------------------------------------------------------------------------------
17 2 HanySalah
// LOG DETAILS
18
//-------------
19
// VERSION      NAME        DATE        DESCRIPTION
20
//    1       HANY SALAH    10012016    FILE CREATION
21 3 HanySalah
//    2       HANY SALAH    20012016    ADD BINARY MODE TESTS AND INVALID TESTS
22
//    3       HANY SALAH    12022016    IMPROVE BLOCK DESCRIPTION & ADD COMMENTS
23
//-------------------------------------------------------------------------------------------------
24
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR OPENCORES MEMBERS
25
// ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE CREATOR'S PERMISSION
26
//-------------------------------------------------------------------------------------------------
27
 
28
//  The base test class that includes the uvm printer and establish the whole environment.
29
//  It also responsible for setting the environment configurations described in details through the
30
//  testbench specifications document.
31
//  The environment configurations are set during the end of elaboration phase. It includes:
32
//    ----------------------------------------------------------------------------------------
33
//  - The active edge   : The active clock edge at which, the data is changed on the UART buses.
34
//                        It could be positive edge or negative edge.
35
//    ----------------------------------------------------------------------------------------
36
//  - The start bit     : Represent the sequence through which the byte is serialized; either to
37
//                        start with the most significant bit or the least significant bit.
38
//    ----------------------------------------------------------------------------------------
39
//  - The data format   : The data representation through the text commands either to be ASCII
40
//                        format or ordinary binary format.
41
//    ----------------------------------------------------------------------------------------
42
//  - The number of stop: The number of stop bits sent after the latest bit of each byte. It
43
//    bit(s)              would be either one or two bits
44
//    ----------------------------------------------------------------------------------------
45
//  - The number of bits: The number of bits within each transferred field. It would be either
46
//    in the field        7 or 8 bits per field.
47
//    ----------------------------------------------------------------------------------------
48
//  - The parity mode   : The used parity type of each field. It would be either no parity bit,
49
//                        odd parity or even parity.
50
//    ----------------------------------------------------------------------------------------
51
//  - The response time : Represent the maximum allowable time within which DUT should respond
52
//                        to the driven request.
53
//    ----------------------------------------------------------------------------------------
54
//  - The false data    : Enable force false data on the output port within the read command
55
//    enable              through the both modes; text or binary.
56
//    ----------------------------------------------------------------------------------------
57
virtual class uart_base_test extends uvm_test;
58
 
59 2 HanySalah
  uart_env          env;
60
 
61
  uvm_table_printer printer;
62
 
63
  uart_config       _config;
64
 
65 9 HanySalah
  int               matched ;
66 10 HanySalah
 
67
  uvm_report_server    report_server;
68 9 HanySalah
 
69
  `uvm_component_utils_begin(uart_base_test)
70
     `uvm_field_int(matched,UVM_ALL_ON)
71
  `uvm_component_utils_end
72 2 HanySalah
 
73
  function new (string name,uvm_component parent);
74
    super.new(name,parent);
75
  endfunction:new
76
 
77
  function void build_phase (uvm_phase phase);
78
    super.build_phase(phase);
79
 
80
    env = uart_env::type_id::create("env",this);
81
 
82
    _config = uart_config::type_id::create("_config",this);
83 9 HanySalah
 
84 2 HanySalah
    printer = new();
85 10 HanySalah
    report_server = new();
86 8 HanySalah
    env_configuration();
87 10 HanySalah
    TE_configuration();
88
    uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config);
89 2 HanySalah
  endfunction:build_phase
90
 
91
  function void connect_phase (uvm_phase phase);
92
    super.connect_phase(phase);
93
  endfunction:connect_phase
94
 
95 8 HanySalah
  function void env_configuration ();
96 2 HanySalah
    _config._edge         = pos_edge;
97
    _config._start        = lsb;
98
    _config._datamode     = ascii;
99
    _config.num_stop_bits = 1;
100
    _config.num_of_bits   = 8;
101
    _config._paritymode   = parity_off;
102 3 HanySalah
    _config.response_time = 8680;
103
    _config.use_false_data= no;
104 8 HanySalah
  endfunction:env_configuration
105 2 HanySalah
 
106 10 HanySalah
 function void TE_configuration();
107
    report_server.set_server(report_server);
108
    printer.knobs.depth = 3;
109
    uvm_resource_db#(int)::set("Reporting","matched_packets",0,null);
110
    uvm_root::get().set_timeout(10s);
111 11 HanySalah
    uvm_root::get().finish_on_completion=1'b0;
112 10 HanySalah
 endfunction // TE_configuration
113
 
114 2 HanySalah
  task run_phase (uvm_phase phase);
115
    phase.phase_done.set_drain_time(this,5000);
116
  endtask:run_phase
117 9 HanySalah
 
118
  function void report_phase (uvm_phase phase);
119 10 HanySalah
     int num_errors;
120
     string status;
121
     num_errors = report_server.get_severity_count(UVM_ERROR);
122 9 HanySalah
     uvm_resource_db#(int)::read_by_name("Reporting","matched_packets",matched);
123 10 HanySalah
     if(num_errors == 0) status =  "PASSED";
124
     else status = "FAILED";
125
     $display("--------------------------------------------------\n");
126
     $display("\t\t SIMULATION %s \n",status);
127
     $display("--------------------------------------------------");
128 9 HanySalah
     `uvm_info("FINAL STATUS",$sformatf("The number of matched packets are %0d",matched),UVM_NONE);
129
  endfunction // report_phase
130 11 HanySalah
 
131
  function void final_phase (uvm_phase phase);
132
     $stop;
133
  endfunction // final_phase
134
 
135 2 HanySalah
endclass:uart_base_test
136
 
137 3 HanySalah
//-------------------------------------------------------------------------------------------------
138
//
139
//                          PURE TEXT MODE TESTS
140
//
141
//-------------------------------------------------------------------------------------------------
142 2 HanySalah
 
143 3 HanySalah
  //  This test apply thirteen successive tests of UART write request using text communication mode.
144
  //  Refer to test plan section in the testbench specifications document for more details.
145
  class write_text_mode extends uart_base_test;
146
 
147
    seq_1p1   seq1;
148
    seq_1p2   seq2;
149
    seq_1p3   seq3;
150
    seq_1p4   seq4;
151
    seq_1p5   seq5;
152
    seq_1p6   seq6;
153
    seq_1p7   seq7;
154
    seq_1p8   seq8;
155
    seq_1p9   seq9;
156
    seq_1p10  seq10;
157
    seq_1p11  seq11;
158
    seq_1p12  seq12;
159
    seq_1p13  seq13;
160 2 HanySalah
 
161 3 HanySalah
    `uvm_component_utils(write_text_mode)
162 2 HanySalah
 
163 3 HanySalah
    function new (string name,uvm_component parent);
164
      super.new(name,parent);
165
    endfunction:new
166 2 HanySalah
 
167 3 HanySalah
    function void build_phase (uvm_phase phase);
168
      super.build_phase (phase);
169
      seq1  = seq_1p1::type_id::create("seq1");
170
      seq2  = seq_1p2::type_id::create("seq2");
171
      seq3  = seq_1p3::type_id::create("seq3");
172
      seq4  = seq_1p4::type_id::create("seq4");
173
      seq5  = seq_1p5::type_id::create("seq5");
174
      seq6  = seq_1p6::type_id::create("seq6");
175
      seq7  = seq_1p7::type_id::create("seq7");
176
      seq8  = seq_1p8::type_id::create("seq8");
177
      seq9  = seq_1p9::type_id::create("seq9");
178
      seq10 = seq_1p10::type_id::create("seq10");
179
      seq11 = seq_1p11::type_id::create("seq11");
180
      seq12 = seq_1p12::type_id::create("seq12");
181
      seq13 = seq_1p13::type_id::create("seq13");
182
    endfunction:build_phase
183 2 HanySalah
 
184
 
185 3 HanySalah
    task run_phase (uvm_phase phase);
186
      super.run_phase(phase);
187
      phase.raise_objection(this);
188
      seq1.start(env.agent._seq,null);
189
      seq2.start(env.agent._seq,null);
190
      seq3.start(env.agent._seq,null);
191
      seq4.start(env.agent._seq,null);
192
      seq5.start(env.agent._seq,null);
193
      seq6.start(env.agent._seq,null);
194
      seq7.start(env.agent._seq,null);
195
      seq8.start(env.agent._seq,null);
196
      seq9.start(env.agent._seq,null);
197
      seq10.start(env.agent._seq,null);
198
      seq11.start(env.agent._seq,null);
199
      seq12.start(env.agent._seq,null);
200
      seq13.start(env.agent._seq,null);
201
      phase.drop_objection(this);
202
    endtask:run_phase
203
  endclass:write_text_mode
204 2 HanySalah
 
205 3 HanySalah
  //  This test apply thirteen successive tests of UART read request using text communication mode.
206
  //  Refer to test plan section in the testbench specifications document for more details.
207
  class read_text_mode extends uart_base_test;
208
 
209
    seq_2p1   seq1;
210
    seq_2p2   seq2;
211
    seq_2p3   seq3;
212
    seq_2p4   seq4;
213
    seq_2p5   seq5;
214
    seq_2p6   seq6;
215
    seq_2p7   seq7;
216
    seq_2p8   seq8;
217
    seq_2p9   seq9;
218
    seq_2p10  seq10;
219
    seq_2p11  seq11;
220
    seq_2p12  seq12;
221
    seq_2p13  seq13;
222 2 HanySalah
 
223
 
224 3 HanySalah
    `uvm_component_utils(read_text_mode)
225 2 HanySalah
 
226 3 HanySalah
    function new (string name,uvm_component parent);
227
      super.new(name,parent);
228
    endfunction:new
229 2 HanySalah
 
230 3 HanySalah
    function void build_phase (uvm_phase phase);
231
      super.build_phase(phase);
232
      seq1  = seq_2p1::type_id::create("seq1");
233
      seq2  = seq_2p2::type_id::create("seq2");
234
      seq3  = seq_2p3::type_id::create("seq3");
235
      seq4  = seq_2p4::type_id::create("seq4");
236
      seq5  = seq_2p5::type_id::create("seq5");
237
      seq6  = seq_2p6::type_id::create("seq6");
238
      seq7  = seq_2p7::type_id::create("seq7");
239
      seq8  = seq_2p8::type_id::create("seq8");
240
      seq9  = seq_2p9::type_id::create("seq9");
241
      seq10 = seq_2p10::type_id::create("seq10");
242
      seq11 = seq_2p11::type_id::create("seq11");
243
      seq12 = seq_2p12::type_id::create("seq12");
244
      seq13 = seq_2p13::type_id::create("seq13");
245
    endfunction:build_phase
246 2 HanySalah
 
247 3 HanySalah
    task run_phase (uvm_phase phase);
248
      super.run_phase(phase);
249
      phase.raise_objection(this);
250
      seq1.start(env.agent._seq,null);
251
      seq2.start(env.agent._seq,null);
252
      seq3.start(env.agent._seq,null);
253
      seq4.start(env.agent._seq,null);
254
      seq5.start(env.agent._seq,null);
255
      seq6.start(env.agent._seq,null);
256
      seq7.start(env.agent._seq,null);
257
      seq8.start(env.agent._seq,null);
258
      seq9.start(env.agent._seq,null);
259
      seq10.start(env.agent._seq,null);
260
      seq11.start(env.agent._seq,null);
261
      seq12.start(env.agent._seq,null);
262
      seq13.start(env.agent._seq,null);
263
      phase.drop_objection(this);
264
    endtask:run_phase
265
  endclass:read_text_mode
266 2 HanySalah
 
267 3 HanySalah
//-------------------------------------------------------------------------------------------------
268
//
269
//                          PURE BINARY MODE TESTS
270
//
271
//-------------------------------------------------------------------------------------------------
272 2 HanySalah
 
273 3 HanySalah
  //  This test apply six successive tests of UART nop request using binary communication mode.
274
  //  Refer to test plan section in the testbench specifications document for more details.
275
  class nop_command_mode extends uart_base_test;
276
 
277
    seq_3p1   seq1;
278
    seq_3p2   seq2;
279
    seq_3p3   seq3;
280
    seq_4p1   seq4;
281
    seq_4p2   seq5;
282
    seq_4p3   seq6;
283 2 HanySalah
 
284 3 HanySalah
    `uvm_component_utils(nop_command_mode)
285 2 HanySalah
 
286 3 HanySalah
    function new (string name,uvm_component parent);
287
      super.new(name,parent);
288
    endfunction:new
289 2 HanySalah
 
290 3 HanySalah
    function void build_phase (uvm_phase phase);
291
      super.build_phase(phase);
292
      seq1  = seq_3p1::type_id::create("seq1");
293
      seq2  = seq_3p2::type_id::create("seq2");
294
      seq3  = seq_3p3::type_id::create("seq3");
295
      seq4  = seq_4p1::type_id::create("seq4");
296
      seq5  = seq_4p2::type_id::create("seq5");
297
      seq6  = seq_4p3::type_id::create("seq6");
298
    endfunction:build_phase
299 2 HanySalah
 
300 3 HanySalah
    task run_phase(uvm_phase phase);
301
      super.run_phase(phase);
302
      phase.raise_objection(this);
303
      seq1.start(env.agent._seq,null);
304
      seq2.start(env.agent._seq,null);
305
      seq3.start(env.agent._seq,null);
306
      seq4.start(env.agent._seq,null);
307
      seq5.start(env.agent._seq,null);
308
      seq6.start(env.agent._seq,null);
309
      phase.drop_objection(this);
310
    endtask:run_phase
311
  endclass:nop_command_mode
312 2 HanySalah
 
313
 
314 3 HanySalah
  //  This test apply ten successive tests of UART write request using binary communication mode.
315
  //  Refer to test plan section in the testbench specifications document for more details.
316
  class write_command_mode extends uart_base_test;
317
 
318
    seq_5p1   seq1;
319
    seq_5p2   seq2;
320
    seq_5p3   seq3;
321
    seq_5p4   seq4;
322
    seq_5p5   seq5;
323
    seq_5p6   seq6;
324
    seq_5p7   seq7;
325
    seq_5p8   seq8;
326
    seq_5p9   seq9;
327
    seq_5p10  seq10;
328 2 HanySalah
 
329 3 HanySalah
    `uvm_component_utils(write_command_mode)
330 2 HanySalah
 
331 3 HanySalah
    function new (string name,uvm_component parent);
332
      super.new(name,parent);
333
    endfunction:new
334 2 HanySalah
 
335 3 HanySalah
    function void build_phase (uvm_phase phase);
336
      super.build_phase(phase);
337
      seq1  = seq_5p1::type_id::create("seq1");
338
      seq2  = seq_5p2::type_id::create("seq2");
339
      seq3  = seq_5p3::type_id::create("seq3");
340
      seq4  = seq_5p4::type_id::create("seq4");
341
      seq5  = seq_5p5::type_id::create("seq5");
342
      seq6  = seq_5p6::type_id::create("seq6");
343
      seq7  = seq_5p7::type_id::create("seq7");
344
      seq8  = seq_5p8::type_id::create("seq8");
345
      seq9  = seq_5p9::type_id::create("seq9");
346
      seq10 = seq_5p10::type_id::create("seq10");
347
    endfunction:build_phase
348 2 HanySalah
 
349 3 HanySalah
    task run_phase (uvm_phase phase);
350
      super.run_phase(phase);
351
      phase.raise_objection(this);
352
      uvm_test_done.set_drain_time(this,5000);
353
      //seq1.start(env.agent._seq,null);
354
      seq2.start(env.agent._seq,null);
355
      seq3.start(env.agent._seq,null);
356
      seq4.start(env.agent._seq,null);
357
      seq5.start(env.agent._seq,null);
358
      seq6.start(env.agent._seq,null);
359
      seq7.start(env.agent._seq,null);
360
      seq8.start(env.agent._seq,null);
361
      seq9.start(env.agent._seq,null);
362
      seq10.start(env.agent._seq,null);
363
      phase.drop_objection(this);
364
    endtask:run_phase
365
  endclass: write_command_mode
366 2 HanySalah
 
367
 
368 3 HanySalah
  //  This test apply ten successive tests of UART read request using binary communication mode.
369
  //  Refer to test plan section in the testbench specifications document for more details.
370
  class read_command_mode extends uart_base_test;
371
 
372
    seq_6p1   seq1;
373
    seq_6p2   seq2;
374
    seq_6p3   seq3;
375
    seq_6p4   seq4;
376
    seq_6p5   seq5;
377
    seq_6p6   seq6;
378
    seq_6p7   seq7;
379
    seq_6p8   seq8;
380
    seq_6p9   seq9;
381
    seq_6p10  seq10;
382 2 HanySalah
 
383 3 HanySalah
    `uvm_component_utils(read_command_mode)
384 2 HanySalah
 
385 3 HanySalah
    function new (string name,uvm_component parent);
386
      super.new(name,parent);
387
      seq1  = seq_6p1::type_id::create("seq1");
388
      seq2  = seq_6p2::type_id::create("seq2");
389
      seq3  = seq_6p3::type_id::create("seq3");
390
      seq4  = seq_6p4::type_id::create("seq4");
391
      seq5  = seq_6p5::type_id::create("seq5");
392
      seq6  = seq_6p6::type_id::create("seq6");
393
      seq7  = seq_6p7::type_id::create("seq7");
394
      seq8  = seq_6p8::type_id::create("seq8");
395
      seq9  = seq_6p9::type_id::create("seq9");
396
      seq10 = seq_6p10::type_id::create("seq10");
397
    endfunction:new
398 2 HanySalah
 
399 3 HanySalah
    function void build_phase (uvm_phase phase);
400
      super.build_phase(phase);
401
 
402
    endfunction:build_phase
403
 
404
    task run_phase (uvm_phase phase);
405
      super.run_phase(phase);
406
      phase.raise_objection(this);
407
      //seq1.start(env.agent._seq,null);
408
      seq2.start(env.agent._seq,null);
409
      seq3.start(env.agent._seq,null);
410
      seq4.start(env.agent._seq,null);
411
      seq5.start(env.agent._seq,null);
412
      seq6.start(env.agent._seq,null);
413
      seq7.start(env.agent._seq,null);
414
      seq8.start(env.agent._seq,null);
415
      seq9.start(env.agent._seq,null);
416
      seq10.start(env.agent._seq,null);
417
      phase.drop_objection(this);
418
    endtask:run_phase
419
  endclass:read_command_mode
420
 
421
//-------------------------------------------------------------------------------------------------
422
//
423
//                        COMBINED COMMAND TESTS
424
//
425
//-------------------------------------------------------------------------------------------------
426
 
427
  // this test randomly apply series of 100 text mode commands. They would be either read or write
428
  // sequences described in text mode tests in the testbench specifications document.
429
  class text_mode_test extends uart_base_test;
430
 
431
    rand int unsigned command_number;
432
 
433 11 HanySalah
    bit coverage_hit = 1'b0;
434
 
435 3 HanySalah
    seq_1p1   seq1;
436
    seq_1p2   seq2;
437
    seq_1p3   seq3;
438
    seq_1p4   seq4;
439
    seq_1p5   seq5;
440
    seq_1p6   seq6;
441
    seq_1p7   seq7;
442
    seq_1p8   seq8;
443
    seq_1p9   seq9;
444
    seq_1p10  seq10;
445
    seq_1p11  seq11;
446
    seq_1p12  seq12;
447
    seq_1p13  seq13;
448
 
449
 
450
    seq_2p1   seq14;
451
    seq_2p2   seq15;
452
    seq_2p3   seq16;
453
    seq_2p4   seq17;
454
    seq_2p5   seq18;
455
    seq_2p6   seq19;
456
    seq_2p7   seq20;
457
    seq_2p8   seq21;
458
    seq_2p9   seq22;
459
    seq_2p10  seq23;
460
    seq_2p11  seq24;
461
    seq_2p12  seq25;
462
    seq_2p13  seq26;
463
 
464
    `uvm_component_utils(text_mode_test)
465
 
466
    constraint limit {
467
        command_number inside {[1:26]};
468
    }
469
 
470
    function new (string name , uvm_component parent);
471
      super.new(name,parent);
472
    endfunction:new
473
 
474
    function void build_phase (uvm_phase phase);
475
      super.build_phase(phase);
476
      seq1  = seq_1p1::type_id::create("seq1");
477
      seq2  = seq_1p2::type_id::create("seq2");
478
      seq3  = seq_1p3::type_id::create("seq3");
479
      seq4  = seq_1p4::type_id::create("seq4");
480
      seq5  = seq_1p5::type_id::create("seq5");
481
      seq6  = seq_1p6::type_id::create("seq6");
482
      seq7  = seq_1p7::type_id::create("seq7");
483
      seq8  = seq_1p8::type_id::create("seq8");
484
      seq9  = seq_1p9::type_id::create("seq9");
485
      seq10 = seq_1p10::type_id::create("seq10");
486
      seq11 = seq_1p11::type_id::create("seq11");
487
      seq12 = seq_1p12::type_id::create("seq12");
488
      seq13 = seq_1p13::type_id::create("seq13");
489
      seq14 = seq_2p1::type_id::create("seq14");
490
      seq15 = seq_2p2::type_id::create("seq15");
491
      seq16 = seq_2p3::type_id::create("seq16");
492
      seq17 = seq_2p4::type_id::create("seq17");
493
      seq18 = seq_2p5::type_id::create("seq18");
494
      seq19 = seq_2p6::type_id::create("seq19");
495
      seq20 = seq_2p7::type_id::create("seq20");
496
      seq21 = seq_2p8::type_id::create("seq21");
497
      seq22 = seq_2p9::type_id::create("seq22");
498
      seq23 = seq_2p10::type_id::create("seq23");
499
      seq24 = seq_2p11::type_id::create("seq24");
500
      seq25 = seq_2p12::type_id::create("seq25");
501
      seq26 = seq_2p13::type_id::create("seq26");
502 11 HanySalah
      uvm_resource_db #(int)::set("coverage_cloud","text_coverage",0,null);
503
      //uvm_resource_db #(int)::set("coverage_cloud","text_coverage",0,null);
504 3 HanySalah
    endfunction:build_phase
505
 
506
    task run_phase (uvm_phase phase);
507
      super.run_phase(phase);
508
      phase.raise_objection(this);
509 11 HanySalah
      while (coverage_hit==1'b0)
510 3 HanySalah
        begin
511
        randomize();
512
        case (command_number)
513
          1:
514
            begin
515
            seq1.start(env.agent._seq,null);
516
            end
517
          2:
518
            begin
519
            seq2.start(env.agent._seq,null);
520
            end
521
          3:
522
            begin
523
            seq3.start(env.agent._seq,null);
524
            end
525
          4:
526
            begin
527
            seq4.start(env.agent._seq,null);
528
            end
529
          5:
530
            begin
531
            seq5.start(env.agent._seq,null);
532
            end
533
          6:
534
            begin
535
            seq6.start(env.agent._seq,null);
536
            end
537
          7:
538
            begin
539
            seq7.start(env.agent._seq,null);
540
            end
541
          8:
542
            begin
543
            seq8.start(env.agent._seq,null);
544
            end
545
          9:
546
            begin
547
            seq9.start(env.agent._seq,null);
548
            end
549
          10:
550
            begin
551
            seq10.start(env.agent._seq,null);
552
            end
553
          11:
554
            begin
555
            seq11.start(env.agent._seq,null);
556
            end
557
          12:
558
            begin
559
            seq12.start(env.agent._seq,null);
560
            end
561
          13:
562
            begin
563
            seq13.start(env.agent._seq,null);
564
            end
565
          14:
566
            begin
567
            seq14.start(env.agent._seq,null);
568
            end
569
          15:
570
            begin
571
            seq15.start(env.agent._seq,null);
572
            end
573
          16:
574
            begin
575
            seq16.start(env.agent._seq,null);
576
            end
577
          17:
578
            begin
579
            seq17.start(env.agent._seq,null);
580
            end
581
          18:
582
            begin
583
            seq18.start(env.agent._seq,null);
584
            end
585
          19:
586
            begin
587
            seq19.start(env.agent._seq,null);
588
            end
589
          20:
590
            begin
591
            seq20.start(env.agent._seq,null);
592
            end
593
          21:
594
            begin
595
            seq21.start(env.agent._seq,null);
596
            end
597
          22:
598
            begin
599
            seq22.start(env.agent._seq,null);
600
            end
601
          23:
602
            begin
603
            seq23.start(env.agent._seq,null);
604
            end
605
          24:
606
            begin
607
            seq24.start(env.agent._seq,null);
608
            end
609
          25:
610
            begin
611
            seq25.start(env.agent._seq,null);
612
            end
613
          26:
614
            begin
615
            seq26.start(env.agent._seq,null);
616
            end
617
          default:
618
            begin
619
            `uvm_fatal("OUT OF RANGE","Command Number is Out of Range")
620
            end
621 11 HanySalah
        endcase // case (command_number)
622
        evaluate_coverage();
623 3 HanySalah
        end
624
        phase.drop_objection(this);
625
    endtask:run_phase
626 11 HanySalah
 
627
    function void evaluate_coverage();
628
       int text_coverage;
629
       uvm_resource_db#(int)::read_by_name("coverage_cloud","text_coverage",text_coverage);
630
       if(text_coverage >= 95) coverage_hit=1'b1;
631
    endfunction // evaluate_coverage
632
 
633 9 HanySalah
  endclass:text_mode_test

powered by: WebSVN 2.1.0

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