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 --- 17 unchanged lines hidden (view full) --- 26# Authors: Gabe Black 27 28from __future__ import print_function 29 30import argparse 31import m5 32import os 33import re |
34import sys |
35 36from m5.objects import SystemC_Kernel, Root 37 38# pylint:disable=unused-variable 39 40kernel = SystemC_Kernel() 41root = Root(full_system=True, systemc_kernel=kernel) 42 --- 11 unchanged lines hidden (view full) --- 54cause = m5.simulate(m5.MaxTick).getCause() 55 56result = kernel.sc_main_result() 57if result.code != 0: 58 # Arguably this should make gem5 fail, but some tests purposefully 59 # generate errors, and as long as their output matches that's still 60 # considered correct. A "real" systemc config should expect sc_main 61 # (if present) not to fail. |
62 print('\n' + result.message) 63 sys.exit(int(result.code)) |