SConscript (6036:f0841ee466a5) SConscript (6181:19fedb1e5ded)
1# -*- mode:python -*-
2
3# Copyright (c) 2006 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

44# Convert to SCons File node to get path handling
45models_db = File('cpu_models.py')
46# slurp in contents of file
47execfile(models_db.srcnode().abspath)
48
49# Template for execute() signature.
50exec_sig_template = '''
51virtual Fault execute(%(type)s *xc, Trace::InstRecord *traceData) const = 0;
1# -*- mode:python -*-
2
3# Copyright (c) 2006 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

44# Convert to SCons File node to get path handling
45models_db = File('cpu_models.py')
46# slurp in contents of file
47execfile(models_db.srcnode().abspath)
48
49# Template for execute() signature.
50exec_sig_template = '''
51virtual Fault execute(%(type)s *xc, Trace::InstRecord *traceData) const = 0;
52virtual Fault eaComp(%(type)s *xc, Trace::InstRecord *traceData) const
53{ panic("eaComp not defined!"); M5_DUMMY_RETURN };
52virtual Fault initiateAcc(%(type)s *xc, Trace::InstRecord *traceData) const
53{ panic("initiateAcc not defined!"); M5_DUMMY_RETURN };
54virtual Fault completeAcc(Packet *pkt, %(type)s *xc,
55 Trace::InstRecord *traceData) const
56{ panic("completeAcc not defined!"); M5_DUMMY_RETURN };
57virtual int memAccSize(%(type)s *xc)
58{ panic("memAccSize not defined!"); M5_DUMMY_RETURN };
59'''
60
61mem_ini_sig_template = '''
54virtual Fault initiateAcc(%(type)s *xc, Trace::InstRecord *traceData) const
55{ panic("initiateAcc not defined!"); M5_DUMMY_RETURN };
56virtual Fault completeAcc(Packet *pkt, %(type)s *xc,
57 Trace::InstRecord *traceData) const
58{ panic("completeAcc not defined!"); M5_DUMMY_RETURN };
59virtual int memAccSize(%(type)s *xc)
60{ panic("memAccSize not defined!"); M5_DUMMY_RETURN };
61'''
62
63mem_ini_sig_template = '''
64virtual Fault eaComp(%(type)s *xc, Trace::InstRecord *traceData) const
65{ panic("eaComp not defined!"); M5_DUMMY_RETURN };
62virtual Fault initiateAcc(%s *xc, Trace::InstRecord *traceData) const { panic("Not defined!"); M5_DUMMY_RETURN };
63'''
64
65mem_comp_sig_template = '''
66virtual Fault completeAcc(uint8_t *data, %s *xc, Trace::InstRecord *traceData) const { panic("Not defined!"); return NoFault; M5_DUMMY_RETURN };
67'''
68
69# Generate a temporary CPU list, including the CheckerCPU if

--- 112 unchanged lines hidden ---
66virtual Fault initiateAcc(%s *xc, Trace::InstRecord *traceData) const { panic("Not defined!"); M5_DUMMY_RETURN };
67'''
68
69mem_comp_sig_template = '''
70virtual Fault completeAcc(uint8_t *data, %s *xc, Trace::InstRecord *traceData) const { panic("Not defined!"); return NoFault; M5_DUMMY_RETURN };
71'''
72
73# Generate a temporary CPU list, including the CheckerCPU if

--- 112 unchanged lines hidden ---