SystemC.py (13331:2e3f70431e60) SystemC.py (13722:4f0de9b591df)
1# Copyright 2018 Google, Inc.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met: redistributions of source code must retain the above copyright
6# notice, this list of conditions and the following disclaimer;
7# redistributions in binary form must reproduce the above copyright
8# notice, this list of conditions and the following disclaimer in the

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

31# simulation. It receives gem5 SimObject lifecycle callbacks (init, regStats,
32# etc.) and manages the lifecycle of the systemc simulation accordingly.
33# It also acts as a collecting point for systemc related control functionality.
34class SystemC_Kernel(SimObject):
35 type = 'SystemC_Kernel'
36 cxx_class = 'sc_gem5::Kernel'
37 cxx_header = 'systemc/core/kernel.hh'
38
1# Copyright 2018 Google, Inc.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met: redistributions of source code must retain the above copyright
6# notice, this list of conditions and the following disclaimer;
7# redistributions in binary form must reproduce the above copyright
8# notice, this list of conditions and the following disclaimer in the

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

31# simulation. It receives gem5 SimObject lifecycle callbacks (init, regStats,
32# etc.) and manages the lifecycle of the systemc simulation accordingly.
33# It also acts as a collecting point for systemc related control functionality.
34class SystemC_Kernel(SimObject):
35 type = 'SystemC_Kernel'
36 cxx_class = 'sc_gem5::Kernel'
37 cxx_header = 'systemc/core/kernel.hh'
38
39 # The sc_time type won't exist until some setup code runs in gem5.
40 try:
41 from _m5.systemc import sc_time
42 except:
43 pass
44
39 class ScMainResult(object):
40 def __init__(self, code, message):
41 self.code = code
42 self.message = message
43
44 def sc_main(self, *args):
45 '''Call the systemc sc_main function with the given string args'''
46 from _m5.systemc import sc_main

--- 42 unchanged lines hidden ---
45 class ScMainResult(object):
46 def __init__(self, code, message):
47 self.code = code
48 self.message = message
49
50 def sc_main(self, *args):
51 '''Call the systemc sc_main function with the given string args'''
52 from _m5.systemc import sc_main

--- 42 unchanged lines hidden ---