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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [dejagnu/] [baseboards/] [basic-sid.exp] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# find_sid -- find a usable SID simulator.
2
# This proc is local to this file and is used to locate a SID to use.
3
# Search the build tree, then $PATH.
4
#
5
# Written by Ben Elliston (bje@redhat.com).
6
 
7
proc find_sid { target_alias } {
8
    global env
9
    global tool_root_dir
10
 
11
    set try [lookfor_file ${tool_root_dir} sid/bsp/${target_alias}-sid]
12
    if { $try != "" } {
13
        set sid_build [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
14
        if { $sid_build != "" } { set env(SID) $sid_build }
15
        return $try
16
    }
17
 
18
    # In this case, the bsp script must be available on the PATH.
19
    # Just hope for the best!
20
    return ${target_alias}-sid
21
}
22
 
23
# find_sid_conf -- find a usable pre-generated SID config file.
24
 
25
proc find_sid_conf { config } {
26
    global env
27
    global srcdir
28
 
29
    set try [lookfor_file ${srcdir} sid/bsp/pregen/${config}.conf]
30
    if { $try == "" } { error "No ${config}.conf available." }
31
    return $try
32
}
33
 
34
# find_rawsid -- find a usable SID simulator.
35
# This proc is local to this file and is used to locate a SID to use.
36
# Search the build tree, then $PATH.
37
 
38
proc find_rawsid { } {
39
    global env
40
    global tool_root_dir
41
    global srcdir
42
 
43
    set try [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
44
    if { $try == "" } {
45
        set try "sid"
46
    } else {
47
        # testing build tree
48
        set env(SID_LIBRARY_PATH) [join [glob "${tool_root_dir}/sid/component/*" "$srcdir/sid/component/*"] ":"]
49
        # srcdir=/..../sid/component/testsuite
50
        set tcl_library "$srcdir/tcl/library"
51
        global host_os
52
        switch -glob $host_os {
53
          {cygwin*} { set tcl_library [exec cygpath -w $tcl_library] }
54
        }
55
        set env(TCL_LIBRARY) $tcl_library
56
    }
57
 
58
    return $try
59
}

powered by: WebSVN 2.1.0

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