summaryrefslogtreecommitdiff
path: root/configs/example/read_config.py
diff options
context:
space:
mode:
authorAndrew Bardsley <Andrew.Bardsley@arm.com>2015-11-22 05:10:21 -0500
committerAndrew Bardsley <Andrew.Bardsley@arm.com>2015-11-22 05:10:21 -0500
commit4375678a0d8429ee51882d328f851402b61d6ac5 (patch)
treecbe5b044d9c13dfd27b59edf6778c0b97ba73e33 /configs/example/read_config.py
parent4596a33e10ebbab83d757c5c6a9efe9c299a7499 (diff)
downloadgem5-4375678a0d8429ee51882d328f851402b61d6ac5.tar.xz
config: Added missing types to JSON/INI Python reader
Added the missing types EthernetAddr and Current to the JSON/INI file reader example configs/example/read_config.py. Also added __str__ to EthernetAddr to make values appear in the same form in JSON an INI files.
Diffstat (limited to 'configs/example/read_config.py')
-rw-r--r--configs/example/read_config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/configs/example/read_config.py b/configs/example/read_config.py
index ecb2950e6..dfd5b7f1a 100644
--- a/configs/example/read_config.py
+++ b/configs/example/read_config.py
@@ -101,6 +101,7 @@ param_parsers = {
'NumericParamValue': simple_parser(cast=long),
'TickParamValue': tick_parser(),
'Frequency': tick_parser(cast=m5.objects.Latency),
+ 'Current': simple_parser(suffix='A'),
'Voltage': simple_parser(suffix='V'),
'Enum': simple_parser(),
'MemorySize': simple_parser(suffix='B'),
@@ -108,7 +109,8 @@ param_parsers = {
'AddrRange': addr_range_parser,
'String': simple_parser(),
'MemoryBandwidth': memory_bandwidth_parser,
- 'Time': simple_parser()
+ 'Time': simple_parser(),
+ 'EthernetAddr': simple_parser()
}
for name, parser in param_parsers.iteritems():