summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-12-20 20:34:04 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-12-20 20:34:04 -0600
commitfc53f9ffcc880a5429fb41a881bc095bf200e4a4 (patch)
tree398d012bd772b37673e3046aad5ca3d48e872ec4 /src/mem/slicc/symbols
parent30b259a31eb8e2b4dc5aaef2705ee3896a457062 (diff)
downloadgem5-fc53f9ffcc880a5429fb41a881bc095bf200e4a4.tar.xz
ruby: slicc: replace max_in_port_rank with number of inports
This patch replaces max_in_port_rank with the number of inports. The use of max_in_port_rank was causing spurious re-builds and incorrect initialization of variables in ruby related regression tests. This was due to the variable value being used across threads while compiling when it was not meant to be. Since the number of inports is state machine specific value, this problem should get solved.
Diffstat (limited to 'src/mem/slicc/symbols')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index c96af4a90..b969d79a3 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -460,12 +460,8 @@ $c_ident::$c_ident(const Params *p)
{
m_name = "${ident}";
''')
- #
- # max_port_rank is used to size vectors and thus should be one plus the
- # largest port rank
- #
- max_port_rank = self.in_ports[0].pairs["max_port_rank"] + 1
- code(' m_max_in_port_rank = $max_port_rank;')
+ num_in_ports = len(self.in_ports)
+ code(' m_in_ports = $num_in_ports;')
code.indent()
#
@@ -1104,9 +1100,9 @@ ${ident}_Controller::wakeup()
code.indent()
code('// ${ident}InPort $port')
if port.pairs.has_key("rank"):
- code('m_cur_in_port_rank = ${{port.pairs["rank"]}};')
+ code('m_cur_in_port = ${{port.pairs["rank"]}};')
else:
- code('m_cur_in_port_rank = 0;')
+ code('m_cur_in_port = 0;')
code('${{port["c_code_in_port"]}}')
code.dedent()