Project

General

Profile

Command Line Options » History » Version 17

Sergey Smolov, 11/19/2022 12:05 PM

1 1 Sergey Smolov
h1. Command Line Options
2
3 13 Sergey Smolov
{{toc}}
4
5
h1. Overview
6
7 3 Sergey Smolov
The _Trace Matcher_ command line looks as follows:
8 1 Sergey Smolov
<pre>
9 14 Sergey Smolov
usage: traceutils [-h] [-d] [-fds] [-sa START_ADDR] [-se] [-sr] [-w [W_SIZE]]
10
                  FILE [FILE ...]
11 4 Sergey Smolov
12
positional arguments:
13
  FILE                  Path to trace file
14 1 Sergey Smolov
15
optional arguments:
16 14 Sergey Smolov
  -h, --help            show this help message and exit
17
  -d, --debug           Print for debug messages (default: disabled)
18
  -fds, --first-dif-stop
19
                        Stop the tool on the first diversity (default:
20
                        disabled)
21 17 Sergey Smolov
  -bs B_SIZE, --boot-size B_SIZE
22
                        Number of instruction records at the trace
23
                        beginning that avoid matching because they
24
                        are of boot section (default: unused)     
25 14 Sergey Smolov
  -sa START_ADDR, --start-addr START_ADDR
26
                        Set the start address from which trace records are to
27 15 Sergey Smolov
                        be compared (default: unused)
28 14 Sergey Smolov
  -se, --skip-equal     Skip subsequent records if they differ in time field
29
                        only (default: disabled)
30
  -sr, --skip-rest      Skip matching for the rest of the longest trace
31
                        (default: disabled)
32 13 Sergey Smolov
  -w [W_SIZE], --window-size [W_SIZE]
33
                        Matching window size in ticks (default: 1)
34 1 Sergey Smolov
</pre>
35
36 13 Sergey Smolov
The detailed descriptions of some specific options are given below.
37 1 Sergey Smolov
38 16 Sergey Smolov
h2. Stopping when first difference
39
40
When an appropriate option is enabled, the tool ceases matching process when the first non-matched record has been detected.
41 17 Sergey Smolov
42
h2. Boot size
43
44
Size of the boot section at which (or right after) start address should be located.
45 16 Sergey Smolov
46
h2. Start address
47
48
One of the possible use cases for @Trace Matcher@ tool is a comparison of traces with different _beginnings_ but with the same _main part_. Such situation may appear at microprocessor execution traces, when the same test program has been run on two models of microprocessor (or on model\emulator and on RTL itself), but in one case trace includes preceding _boot program_ trace and does not contain it in another case.
49
To reduce the number of false discrepancies, @start address@ is introduced. Having this option enabled, the tool will skip all the parsed records at the trace until an instruction with the specified address will not be found. An option is global for all traces.
50
51
There may be the following situations:
52
53
* If the option is not set, the matching process is started from the first record
54
* If the option is set but there is no such instruction record at some trace - this trace is treated as incorrect and an error is reported
55
56
57
h2. Skip matching for the rest
58
59
There are not so many reasons to continue the matching process when there is only one not completely parsed trace. When enabled, the appropriate option disables matching in such case.
60
61 13 Sergey Smolov
h2. Window size
62
63
For example, there are two input trace files that are called @log1.txt@ and @log2.txt@. The @log1.txt@ file contains the following records:
64
<pre>
65
1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1
66
1 clk R r8 00000000
67
</pre>
68
69
The @log2.txt@ file contains the following records:
70
<pre>
71
1 clk R r8 00000000
72
1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1
73
</pre>
74
75
Trace files to compare may contain same _records_ (lines), but at different positions relative to each other. To take this effect into account and do not treat actually simultaneous but formally logged in different order events, a *window* concept is introduced. The idea is not to compare trace files record by record, but "record block" by "records block" with the aim to find equal but reordered records. Such block is called as "window". Window is characterized by it's size that is a number of records inside the window. By default, window size is set to 1. It means that record by record comparison will be made.