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

Subversion Repositories ahbmaster

[/] [ahbmaster/] [trunk/] [test79_AHBmaster/] [component/] [work/] [top/] [CoreUARTapb_0/] [mti/] [scripts/] [coreuart_usertb_apb_master.bfm] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 uson
// ********************************************************************
2
// Actel Corporation Proprietary and Confidential
3
//  Copyright 2009 Actel Corporation.  All rights reserved.
4
//
5
// ANY USE OR REDISTRIBUTION IN PART OR IN WHOLE MUST BE HANDLED IN
6
// ACCORDANCE WITH THE ACTEL LICENSE AGREEMENT AND MUST BE APPROVED
7
// IN ADVANCE IN WRITING.
8
//
9
// Description: Verification testbench APB master BFM script for CoreAI
10
//
11
// Revision Information:
12
// Date     Description
13
//
14
//
15
// SVN Revision Information:
16
// SVN $Revision: $
17
// SVN $Date: $
18
//
19
// Resolved SARs
20
// SAR      Date     Who   Description
21
//
22
// Notes:
23
// 1. best viewed with tabstops set to "4"
24
// 2. Most of the behavior is driven from the BFM script for the APB master.
25
//    Consult the Actel AMBA BFM documentation for more information.
26
// 3. All procedures, variables, and constants used by the 'main' procedure
27
//    are declared in the include file "coreai_veriftb_include.bfm"
28
//
29
// History:             11/05/08  - TFB created
30
//
31
// *********************************************************************
32
 
33
// include constants, and miscellaneous procedures used in this main file
34
include "coreuart_usertb_include.bfm"
35
 
36
procedure main
37
 
38
  header "User Testbench for CoreUART: BFM APB Master Test Harness"
39
        print "(c) Copyright 2009 Actel Corporation. All rights reserved."
40
        print "AS: 03/23/09"
41
        call pr_underscores
42
 
43
  debug 1                       // only text strings printed
44
  //timeout 2000000     // timeout in cycles, in case BFM stalls
45
  //wait 1
46
 
47
  call init_parameter_vars
48
  wait 1
49
  // framing error test
50
  ifnot FIXEDMODE
51
    call set_config 0 0 0 5 1
52
    call set_config 1 0 0 5 1
53
    call framing_err_test
54
  endif
55
 
56
 
57
  // overflow test
58
  call overflow_test
59
 
60
  ifnot FIXEDMODE
61
    // TEST FOR ALL CONFIGURATIONS (matching b/w DUTs)
62
    // configure UART1 and 2 to the same config
63
    print "FIXEDMODE=0: testing for all configurations"
64
    call pr_underscores
65
    loop x 0 1 1                        // parity_en
66
      loop y 0 1 1                      // parity
67
        loop z 0 1 1                    // bit_num
68
            call set_config 0 x y 1 z
69
            call set_config 1 x y 1 z
70
            call data_stream
71
            call set_config 0 x y 3 z
72
            call set_config 1 x y 3 z
73
            call data_stream
74
        endloop
75
      endloop
76
    endloop
77
  endif
78
 
79
  if FIXEDMODE
80
    // TEST FOR ONE CONFIGURATION (FIXED)
81
    print "FIXEDMODE=1: testing for current configuration only (as follows)"
82
    print "BAUD_VALUE:%0d"        BAUD_VALUE
83
    print "PRG_BIT8:%0d"          PRG_BIT8
84
    print "PRG_PARITY:%0d"        PRG_PARITY
85
    call data_stream
86
  endif
87
 
88
 
89
 
90
  // parity error test
91
  ifnot FIXEDMODE
92
    call parity_err_test
93
  endif
94
 
95
  call pr_underscores
96
 
97
 
98
  // enable
99
  print "End of CoreUART User testbench."
100
return

powered by: WebSVN 2.1.0

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