mem-ruby: Add a ruby namespace
Encapsulate all ruby-related files in a ruby namespace. Change-Id: If642c9751ecefc35b45c5dd69d85e67813cc5224 Issued-on: https://gem5.atlassian.net/browse/GEM5-984 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47307 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
eeedf63c86
commit
60e4ad955d
@@ -244,7 +244,7 @@ from m5.objects.Controller import RubyController
|
||||
class $py_ident(RubyController):
|
||||
type = '$py_ident'
|
||||
cxx_header = 'mem/ruby/protocol/${c_ident}.hh'
|
||||
cxx_class = 'gem5::$py_ident'
|
||||
cxx_class = 'gem5::ruby::$py_ident'
|
||||
''')
|
||||
code.indent()
|
||||
for param in self.config_parameters:
|
||||
@@ -301,6 +301,9 @@ class $py_ident(RubyController):
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
extern std::stringstream ${ident}_transitionComment;
|
||||
|
||||
class $c_ident : public AbstractController
|
||||
@@ -458,6 +461,7 @@ void unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr);
|
||||
code('''
|
||||
};
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __${ident}_CONTROLLER_H__
|
||||
@@ -540,6 +544,9 @@ void unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr);
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
int $c_ident::m_num_controllers = 0;
|
||||
std::vector<statistics::Vector *> $c_ident::eventVec;
|
||||
std::vector<std::vector<statistics::Vector *> > $c_ident::transVec;
|
||||
@@ -1211,6 +1218,7 @@ $c_ident::functionalReadBuffers(PacketPtr& pkt, WriteMask &mask)
|
||||
return read;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
''')
|
||||
|
||||
@@ -1266,6 +1274,9 @@ $c_ident::functionalReadBuffers(PacketPtr& pkt, WriteMask &mask)
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
void
|
||||
${ident}_Controller::wakeup()
|
||||
{
|
||||
@@ -1341,6 +1352,7 @@ ${ident}_Controller::wakeup()
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
''')
|
||||
|
||||
@@ -1375,6 +1387,9 @@ ${ident}_Controller::wakeup()
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
TransitionResult
|
||||
${ident}_Controller::doTransition(${ident}_Event event,
|
||||
''')
|
||||
@@ -1603,6 +1618,7 @@ if (!checkResourceAvailable(%s_RequestType_%s, addr)) {
|
||||
return TransitionResult_Valid;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
''')
|
||||
code.write(path, "%s_Transitions.cc" % self.ident)
|
||||
|
||||
Reference in New Issue
Block a user