Hello,

The error cases in SLICC can be greatly improved. It's sometimes really
hard to figure out what it actually causing the error. Therefore, you often
have to dig into the compiler (in src/mem/slicc) to understand what's going
on. In this case, it looks like there is a bug in the Python compiler
(expr.inline(True) and expr doesn't have an inline member). I would put
some print statements in/around this line. You can also print out the
current file/line the compiler is processing, which may help narrow down
the problem.

Jason

On Thu, Jul 6, 2017 at 11:30 PM liuchen <[email protected]> wrote:

> Hi all.
>      I am using gem5 to simulate different protocols,so I need to modify
> gems protocol into gem5.I am using MOESI_SMP_directory in gems,but after I
> modified it according to gem5 tutorials,following problems appears:
>      AttributeError: 'LocalVariableAST' object has no attribute 'inline':
>   File "/home/liuchen/gem5_docu/gem5/SConstruct", line 1240:
>     exports = 'env')
>   File "/usr/lib/scons/SCons/Script/SConscript.py", line 609:
>     return method(*args, **kw)
>   File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
>     return _SConscript(self.fs, *files, **subst_kw)
>   File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
>     exec _file_ in call_stack[-1].globals
>   File "/home/liuchen/gem5_docu/gem5/build/ALPHA/SConscript", line 334:
>     SConscript(joinpath(root, 'SConscript'), variant_dir=build_dir)
>   File "/usr/lib/scons/SCons/Script/SConscript.py", line 609:
>     return method(*args, **kw)
>   File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
>     return _SConscript(self.fs, *files, **subst_kw)
>   File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
>     exec _file_ in call_stack[-1].globals
>   File "/home/liuchen/gem5_docu/gem5/build/ALPHA/mem/protocol/SConscript",
> line 104:
>     nodes = env.SLICC([], sources)
>   File "/usr/lib/scons/SCons/Environment.py", line 259:
>     return MethodWrapper.__call__(self, target, source, *args, **kw)
>   File "/usr/lib/scons/SCons/Environment.py", line 223:
>     return self.method(*nargs, **kwargs)
>   File "/usr/lib/scons/SCons/Builder.py", line 632:
>     return self._execute(env, target, source, OverrideWarner(kw), ekw)
>   File "/usr/lib/scons/SCons/Builder.py", line 553:
>     tlist, slist = self._create_nodes(env, target, source)
>   File "/usr/lib/scons/SCons/Builder.py", line 517:
>     target, source = self.emitter(target=tlist, source=slist, env=env)
>   File "/home/liuchen/gem5_docu/gem5/build/ALPHA/mem/protocol/SConscript",
> line 70:
>     slicc.process()
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/parser.py", line 66:
>     self.decl_list.generate()
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/DeclListAST.py",
> line 49:
>     decl.generate()
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/MachineAST.py",
> line 65:
>     self.decls.generate()
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/DeclListAST.py",
> line 49:
>     decl.generate()
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/FuncDeclAST.py",
> line 68:
>     rtype = self.statements.generate(body, return_type)
>   File
> "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/StatementListAST.py", line
> 42:
>     statement.generate(code, return_type)
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/IfStatementAST.py",
> line 59:
>     self.then.generate(code, return_type)
>   File
> "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/StatementListAST.py", line
> 42:
>     statement.generate(code, return_type)
>   File
> "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/ExprStatementAST.py", line
> 40:
>     actual_type,rcode = self.expr.inline(True)
>   File "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/ExprAST.py", line
> 39:
>     return_type = self.generate(code)
>   File
> "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/MethodCallExprAST.py", line
> 40:
>     return_type = expr_ast.generate(tmp)
>   File
> "/home/liuchen/gem5_docu/gem5/src/mem/slicc/ast/FuncCallExprAST.py", line
> 95:
>     actual_type,param_code = expr.inline(True)
>  Does anyone knows how to fix this ?Thanks!
>
>
>
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to