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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [main.cpp] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 zhong
///////////////////////////////////////////////////////////////////////////////
2
// This program is free software; you can redistribute it and/or
3
// modify it under the terms of the GNU General Public License
4
// as published by the Free Software Foundation; either version 2
5
// of the License, or (at your option) any later version.
6
//
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU General Public License for more details.
11
//
12
// You should have received a copy of the GNU General Public License
13
// along with this program; if not, write to the Free Software
14
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
//
16
//  main.cpp -- This is a simple ARM core modeling with SystemC.
17
//               Architecure defined by Allen Tao Zhong.
18
//          
19
//  Original Author: Allen Tao Zhong,
20
//  University of Electronic Science and Technology in China
21
//  email: zhong@opencores.org
22
//  header main.h
23
//  info   This is a simple ARM modeling using SystemC.
24
//               Architecure defined by Allen Tao Zhong. 
25
//
26
///////////////////////////////////////////////////////////////////////////////
27
 
28
/*****************************************************************************
29
 
30
  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
31
  changes you are making here.
32
 
33
      Name, Affiliation, Date:
34
  Description of Modification:
35
 
36
 *****************************************************************************/
37
#include "main.h"
38
#include  <stdlib.h>
39
#include "scTypes.h"
40
#include ".\SOC\scARMSoC.h"
41
#include ".\SOC\Mem\scMemory.h"
42
int sc_main(int ac, char *av[])
43
{
44
    // First check the args
45
  if (ac <= 1)
46
    {
47
      cout<< "Usage: scARM  sim_time  \n";
48
      exit (0);
49
    }
50
    int time=atoi(av[1]);
51
 
52
    sc_clock CLK("clock1",10,0.5,1,true);
53
    sc_link_mp<uint32_t> l_n_addr;
54
        sc_link_mp<uint32_t> l_n_data;
55
 
56
    scMemory ram("ram");
57
    scARMSoC processor("processor");
58
 
59
     ram(CLK,l_n_addr,l_n_data);
60
         processor(CLK,l_n_addr,l_n_data);
61
 
62
  //start simulation
63
 
64
   sc_start(time);
65
 
66
 
67
 return (0);
68
}
69
// EOF

powered by: WebSVN 2.1.0

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