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

Subversion Repositories scarm

[/] [scarm/] [branches/] [release_0_1/] [src/] [main.cpp] - Blame information for rev 5

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

Line No. Rev Author Line
1 5 zhong
/***************************************************************************
2
                          main.cpp  -  description
3
                             -------------------
4
    begin                : Oct 2 2002
5
    copyright            : (C) 2002 UESTC
6
    author               : Zhong Tao
7
    email                : zhong@opencores.org
8
 ***************************************************************************/
9
 
10
/***************************************************************************
11
 *                                                                         *
12
 *   This program is free software; you can redistribute it and/or modify  *
13
 *   it under the terms of the GNU General Public License as published by  *
14
 *   the Free Software Foundation; either version 2 of the License, or     *
15
 *   (at your option) any later version.                                   *
16
 *                                                                         *
17
 ***************************************************************************/
18
#include <systemc.h>
19
#include "top.h"
20
 
21
int sc_main(int argc,char* argv[])
22 2 zhong
{
23 5 zhong
    cout<<"********************************************"<<endl;
24
        cout<<"*    scARM:A GNU SystemC ARM Simulator!    *"<<endl;
25
        cout<<"*         author:Zhong Tao                 *"<<endl;
26
        cout<<"*       email    zhong@opencores.org       *"<<endl;
27
    cout<<"********************************************"<<endl;
28 2 zhong
 
29 5 zhong
        char *prog_name = NULL;
30
    top  board("board");
31
 
32
        for(int i = 1; i < argc; i++)
33
        {
34 2 zhong
 
35 5 zhong
                        prog_name = argv[i];
36
 
37
        }
38
 
39
        if(prog_name)
40
        {
41 2 zhong
 
42 5 zhong
        board.init(prog_name);//load program
43
                sc_start(-1);
44 2 zhong
 
45
 
46 5 zhong
        }
47
        else
48
        {
49
                cout<<"  usage : scARM <file name> <args...>"<<endl;
50
                cout<<"  file name : a program to execute"<<endl;
51
                cout<<"  Note:Program should be plain bianery format."<<endl;
52
                cout<<"  args : arguments to the file"<<endl;
53
        }
54
        return 0;
55
 
56
}

powered by: WebSVN 2.1.0

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