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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
load_base_board_description "cygmon";
2
 
3
set_board_info testcase_timeout 30;
4
 
5
proc ${board}_init { dest } {
6
    global usparc_init_count;
7
    set shell_prompt [board_info $dest shell_prompt];
8
 
9
    if ![info exists usparc_init_count] {
10
        set usparc_init_count 0;
11
    } else {
12
        incr usparc_init_count;
13
        if { $usparc_init_count == 3 } {
14
            return -1;
15
        }
16
 
17
    }
18
    remote_close $dest;
19
    set shell_id [remote_open $dest];
20
    if { $shell_id == "" || $shell_id < 0 } {
21
        return [remote_reboot $dest];
22
    } else {
23
        remote_binary $dest;
24
        remote_send $dest "\n";
25
        set got_one 0;
26
        remote_expect $dest 5 {
27
            -re "$shell_prompt" { set got_one 1; exp_continue; }
28
            default {
29
                if { ! $got_one } {
30
                    remote_close $dest;
31
                    return [remote_reboot $dest];
32
                }
33
            }
34
        }
35
        remote_send $dest "m \[15\]1fff1001f00 32\n";
36
        remote_expect $dest 5 {
37
            -re "$shell_prompt" {
38
                unset usparc_init_count;
39
                remote_close $dest;
40
                return 0;
41
            }
42
            default {
43
                remote_close $dest;
44
                return [remote_reboot $dest];
45
            }
46
        }
47
    }
48
}

powered by: WebSVN 2.1.0

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