# and are meant to initialize the stream and substream IDs for
# every memory request, regardless of how the packet has been
# generated (Random, Linear, Trace etc)
-class StreamGenType(Enum): vals = [ 'none', 'fixed', 'random' ]
+class StreamGenType(ScopedEnum): vals = [ 'none', 'fixed', 'random' ]
# The traffic generator is a master module that generates stimuli for
# the memory system, based on a collection of simple behaviours that
StreamGen::create(const BaseTrafficGenParams *p)
{
switch (p->stream_gen) {
- case Enums::fixed:
+ case StreamGenType::fixed:
return new FixedStreamGen(p);
- case Enums::random:
+ case StreamGenType::random:
return new RandomStreamGen(p);
- case Enums::none:
+ case StreamGenType::none:
default:
return nullptr;
}
from m5.objects.Serial import SerialDevice
-class TerminalDump(Enum): vals = ["none", "stdoutput", "stderror", "file"]
+class TerminalDump(ScopedEnum): vals = [
+ "none", "stdoutput", "stderror", "file"]
class Terminal(SerialDevice):
type = 'Terminal'
Terminal::terminalDump(const TerminalParams* p)
{
switch (p->outfile) {
- case Enums::TerminalDump::none:
+ case TerminalDump::none:
return nullptr;
- case Enums::TerminalDump::stdoutput:
+ case TerminalDump::stdoutput:
return simout.findOrCreate("stdout");
- case Enums::TerminalDump::stderror:
+ case TerminalDump::stderror:
return simout.findOrCreate("stderr");
- case Enums::TerminalDump::file:
+ case TerminalDump::file:
return simout.findOrCreate(p->name);
default:
panic("Invalid option\n");