Skip to content

Commit 6969ad9

Browse files
committed
Support a namespace suffix on Fast Models memory events.
I was just sent a Fast Models Tarmac snippet in which the physical address field in an MR8 line had an "_NS" suffix. We already supported this for addresses seen in instruction lines, but this was the first time I've seen it in a memory read or write. Easily fixed!
1 parent 0bd7b8f commit 6969ad9

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lib/parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ class TarmacLineParserImpl {
10271027
* virtual addresses, so we ignore the latter.
10281028
*/
10291029
tok = lex();
1030-
if (!tok.ishex())
1030+
if (!tok.ishexwithoptionalnamespace())
10311031
parse_error(tok, _("expected physical memory address "
10321032
"after ':'"));
10331033
tok = lex();

tests/parsertest.ref

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ Parse warning: unsupported system operation 'AT'
9494
* InstructionEvent time=2 effect=executed pc=1000184c iset=Thumb width=32 instruction=f2c30003 disassembly="MOVT r0,#0x3003"
9595
--- Tarmac line: 2 clk cpu0 R r0 3003fe00
9696
* RegisterEvent time=2 reg=r0 offset=0 bytes=30:03:fe:00
97+
--- Tarmac line: 180000140000 ps MR8 0000010006fffcc0:010116fffcc0_NS 00000100_05101000
98+
* MemoryEvent time=180000140000 read=true known=true addr=10006fffcc0 size=8 contents=10005101000
9799
--- Tarmac line: Tarmac Text Rev 3t
98100
--- Tarmac line: 17000 ns ES EXC [0x00] Reset
99101
* TextOnlyEvent time=17000 type="EXC" text="[0x00] Reset"

tests/parsertest.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
2 clk cpu0 IT (2) 1000184c f2c30003 T thread_s : MOVT r0,#0x3003
8383
2 clk cpu0 R r0 3003fe00
8484

85+
180000140000 ps MR8 0000010006fffcc0:010116fffcc0_NS 00000100_05101000
86+
8587
# ----------------------------------------------------------------------
8688
# Trace lines seen in multiple samples of broadly Cycle Models
8789
# flavoured Tarmac

0 commit comments

Comments
 (0)