Command Line Options » History » Revision 16
Revision 15 (Sergey Smolov, 02/07/2020 03:33 PM) → Revision 16/17 (Sergey Smolov, 02/07/2020 03:55 PM)
h1. Command Line Options {{toc}} h1. Overview The _Trace Matcher_ command line looks as follows: <pre> usage: traceutils [-h] [-d] [-fds] [-sa START_ADDR] [-se] [-sr] [-w [W_SIZE]] FILE [FILE ...] positional arguments: FILE Path to trace file optional arguments: -h, --help show this help message and exit -d, --debug Print for debug messages (default: disabled) -fds, --first-dif-stop Stop the tool on the first diversity (default: disabled) -sa START_ADDR, --start-addr START_ADDR Set the start address from which trace records are to be compared (default: unused) -se, --skip-equal Skip subsequent records if they differ in time field only (default: disabled) -sr, --skip-rest Skip matching for the rest of the longest trace (default: disabled) -w [W_SIZE], --window-size [W_SIZE] Matching window size in ticks (default: 1) </pre> The detailed descriptions of some specific options are given below. h2. Stopping when first difference When an appropriate option is enabled, the tool ceases matching process when the first non-matched record has been detected. h2. Start address 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. 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. There may be the following situations: * If the option is not set, the matching process is started from the first record * 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 h2. Skip matching for the rest 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. h2. Window size For example, there are two input trace files that are called @log1.txt@ and @log2.txt@. The @log1.txt@ file contains the following records: <pre> 1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1 1 clk R r8 00000000 </pre> The @log2.txt@ file contains the following records: <pre> 1 clk R r8 00000000 1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1 </pre> 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. h2. Stopping when first difference When an appropriate option is enabled, the tool ceases matching process when the first non-matched record has been detected. h2. Skip matching for the rest 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.