summaryrefslogtreecommitdiffstats
path: root/zpu/sw/simulator/com/zylin/zpu/simulator/Sim.java
blob: 21450f725f745a1843c6fdec2cef3ab544305d06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

package com.zylin.zpu.simulator;

import com.zylin.zpu.simulator.exceptions.CPUException;
import com.zylin.zpu.simulator.exceptions.MemoryAccessException;

public interface Sim
{
/**
     * halts the CPU. 
     */
    void suspend();
    void writeByte(int i, int val) throws CPUException;
    /** 
     * synchronous method that returns when simulator enters the halt state. 
     **/
    void cont();
    /** 
     * synchronous method that returns when simulator finishes step or otherwise enters
     * the halt state. 
     **/
    void step();

    int getReg(int i) throws CPUException;

    int getREGNUM();
    int readByte(int addr) throws CPUException;

    /**
     * @param sp The sp to set.
     * @throws CPUException 
     */
    void setSp(int sp) throws CPUException;

    /**
     * @return Returns the sp.
     */
    int getSp();

    /**
     * @param pc The pc to set.
     * @throws MemoryAccessException
     */
    void setPc(int pc) throws MemoryAccessException;

    /**
     * @return Returns the pc.
     */
    int getPc();

    void enableAccessWatchPoint(int address, int length) throws CPUException;

    void disableAccessWatchPoint(int address, int length) throws CPUException;

    int cpuReadLong(int i) throws CPUException;

    void cpuWriteLong(int i, int retval) throws MemoryAccessException;

    int getArg(int num) throws CPUException;
	void sessionStarted();

}
OpenPOWER on IntegriCloud