__init__.py (11802:be62996c95d1) __init__.py (11991:d3f19484145f)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 17 unchanged lines hidden (view full) ---

26#
27# Authors: Nathan Binkert
28
29# Import useful subpackages of M5, but *only* when run as an m5
30# script. This is mostly to keep backward compatibility with existing
31# scripts while allowing new SCons code to operate properly.
32
33try:
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 17 unchanged lines hidden (view full) ---

26#
27# Authors: Nathan Binkert
28
29# Import useful subpackages of M5, but *only* when run as an m5
30# script. This is mostly to keep backward compatibility with existing
31# scripts while allowing new SCons code to operate properly.
32
33try:
34 # Try to import something that's generated by swig
34 # Try to import a native module
35 import _m5.core
36
37 # Try to grab something from it in case demandimport is being used
38 _m5.core.curTick
39 in_gem5 = True
40except ImportError:
41 # The import failed, we're being called from the build system
42 in_gem5 = False

--- 13 unchanged lines hidden ---
35 import _m5.core
36
37 # Try to grab something from it in case demandimport is being used
38 _m5.core.curTick
39 in_gem5 = True
40except ImportError:
41 # The import failed, we're being called from the build system
42 in_gem5 = False

--- 13 unchanged lines hidden ---