Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / legion / docs / readmes / README.lockstep
CommitLineData
920dae64
AT
1/*
2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5#pragma ident "@(#)README.lockstep 1.1 05/07/29 SMI"
6
7##
8## Lockstep Execution (lockstep)
9##
10## This explains how to enable and use the lockstep feature
11##
12
13[-] Enabling this Features:
14
15 See README.debug_hook for full details on how to enable this feature.
16
17[-] Lockstep Execution:
18
19 Description:
20 This feature allows you to run 2 simulators in lockstep. This could be
21 used to run 2 copies of legion (one in 'master' mode and the other in
22 'slave' mode) or to run legion in lockstep with another simulator or tool
23 (assuming the other simulator/tool implements the 'slave' side of the
24 lockstep feature).
25
26 Each legion needs to have either a 'master' or a 'slave' lockstep
27 directive added in order to be able to run them in lockstep.
28 They must both be running on the same system and must have
29 been started by the same user-id.
30
31 Format:
32 * debug_hook [lockstep] [mode] [start]
33 *
34 * [lockstep] - we've already parsed this. That's how we got here.
35 * [mode] - master or slave
36 * master writes its data to shm region and waits for
37 * slave to compare. Dump any mismatches when simulators
38 * fall out of lockstep.
39 * [start] - optional, when supplied we enter into lockstep mode
40 * from this instn count onwards
41 *
42
43 Examples:
44 Each legion needs to have either a 'master' or a 'slave' lockstep
45 directive added to it's config file. Examples of both master and
46 slave formats are below:
47
48 processor "niagara" {
49 clkfreq 5000000 ;
50 cores 1;
51 vthreads 1;
52 nglobals 4;
53 nwins 8;
54 rstv 0xfff0000020;
55 maxtl 7;
56 // Lockstep examples:
57 // debug_hook lockstep master;
58 // debug_hook lockstep slave;
59 // debug_hook lockstep master 0x10;
60 // debug_hook lockstep slave 0x10;
61 }
62
63 Viewing Data:
64 There is no data to be viewed until the simulators fall out of lockstep
65 with each other. If this does happen, the instn and previous instn on
66 both simualtors will be dumped with the complete register dump of both
67 master and slave similators showing where the mismatch is.
68
69 Modifying Source:
70 The source for the coverage feature is contained in
71 src/procs/sunsparc/debug/lockstep.c
72