OpenCores
URL https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Software/] [AdvancedWatchpointControl/] [src/] [advancedWatchpointControl/] [targetTransactor.java] - Blame information for rev 51

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 51 nyawn
// This class handles the top-level target transactions.
2
// Its methods are specific transactions (read register,
3
// is target running, etc.).  It constructs an appropriate
4
// transaction object, then gives it to the RSP algorithm
5
// for processing.
6
 
7
 
8
package advancedWatchpointControl;
9
 
10
import java.io.IOException;
11
 
12
public class targetTransactor {
13
 
14
        rspCoder rsp = null;
15
 
16
        public targetTransactor(rspCoder r) {
17
                rsp = r;
18
        }
19
 
20
        // Succeeds or throws an IOException.
21
        public void writeRegister(targetDebugRegisterSet.regType reg, long val) throws IOException {
22
                WriteRegisterTransaction xact = new WriteRegisterTransaction(reg, val);
23
                rsp.Transact(xact);
24
        }
25
 
26
        // Returns a valid value or throws an IOException.
27
        public long readRegister(targetDebugRegisterSet.regType reg) throws IOException {
28
                long ret;
29
                ReadRegisterTransaction xact = new ReadRegisterTransaction(reg);
30
                rsp.Transact(xact);
31
                ret = xact.getDataValueRead();
32
                return ret;
33
        }
34
 
35
        // Returns a valid boolean indicator or throws an IOException.
36
        public boolean isTargetRunning() throws IOException {
37
                boolean ret;
38
                TargetRunningTransaction xact = new TargetRunningTransaction();
39
                rsp.Transact(xact);
40
                ret = xact.getIsTargetRunning();
41
                return ret;
42
        }
43
 
44
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.