summaryrefslogtreecommitdiff
path: root/src/mem/protocol/SConscript
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-10 16:22:26 -0800
committerNathan Binkert <nate@binkert.org>2010-03-10 16:22:26 -0800
commitcf86532857ba1e199db6ff16541e7242c6225ff0 (patch)
treee107e443364bd326d791d2c19e126986cf4aa022 /src/mem/protocol/SConscript
parent1068ca85d0a29bfa71dc6a21a8d6c8888dce4bc3 (diff)
downloadgem5-cf86532857ba1e199db6ff16541e7242c6225ff0.tar.xz
slicc: have a central mechanism for creating a code_formatter.
This makes it easier to add global variables like protocol
Diffstat (limited to 'src/mem/protocol/SConscript')
-rw-r--r--src/mem/protocol/SConscript5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/protocol/SConscript b/src/mem/protocol/SConscript
index 2c29ea374..5f64938c6 100644
--- a/src/mem/protocol/SConscript
+++ b/src/mem/protocol/SConscript
@@ -63,8 +63,9 @@ def slicc_scanner(node, env, path):
env.Append(SCANNERS=Scanner(function=slicc_scanner,skeys=['.slicc']))
def slicc_emitter(target, source, env):
+ protocol = source[0].get_contents()
files = [s.srcnode().abspath for s in source[1:]]
- slicc = SLICC(debug=True)
+ slicc = SLICC(protocol, debug=True)
print "SLICC parsing..."
for name in slicc.load(files, verbose=True):
print " %s" % name
@@ -104,7 +105,7 @@ def slicc_action(target, source, env):
if not isdir(hdir):
os.mkdir(hdir)
- slicc = SLICC(debug=True)
+ slicc = SLICC(protocol, debug=True)
files = [str(s) for s in source[1:]]
slicc.load(files, verbose=False)