ARM-software / tarmac-trace-utilities

Tools for analyzing and browsing Tarmac instruction traces.
Apache License 2.0
67 stars 22 forks source link

Tarmac log unsupported format #6

Closed nick-samsung closed 3 years ago

nick-samsung commented 3 years ago

Hi,

I am trying to parse a tarmac log generated from a run and I am getting the following error:

tarmac_example_for_github_issue.log:7: unknown Tarmac event type 'MNR4_I' tarmac_example_for_githubissue.log:8: unknown Tarmac event type 'BNR4I' tarmac_example_for_github_issue.log:12: unknown Tarmac event type 'MNR4OI' tarmac_example_for_github_issue.log:13: unknown Tarmac event type 'BNR4OI' tarmac_example_for_github_issue.log:16: expected ')' after bracketed value 3027 cyc IT (00022ad6:00000000) 00022ad6 48e2 T16 LDR r0,[pc,#904] ; [0x22e60]

tarmac_example_for_github_issue.log

BR Nick

statham-arm commented 3 years ago

Thanks for the report! This must be a flavour of Tarmac I haven't run into before. Can you tell me anything about the application that produced it?

nick-samsung commented 3 years ago

I believe it is cadence palladium simulator running an image of our FW.

statham-arm commented 3 years ago

Do you know what CPU is being simulated?

(As I understand it, the simulator itself is unlikely to have Tarmac-producing functionality built in to it; it's more likely that something running on the simulator is generating that trace, and it would help to know what.)

nick-samsung commented 3 years ago

Cortex-m4

We have an RTL block that was given from ARM that does the trace. (No idea which simulation software)

This block was used as the basis to synthesize a palladium VHDL model that also outputs a similar tarmac log. The example given is the output NOT from the palladium.

statham-arm commented 3 years ago

I've got a draft implementation in #7 of changes that should support this Tarmac flavour. But I'm not 100% confident of them, because documentation for that particular Tarmac producer was difficult to find.

Could you try out the changes in that PR and see how they work for you? If there's any further problem, please let me know.

statham-arm commented 3 years ago

Following some testing (thanks!), I've pushed that patch to main, so I think this should be complete now.