|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimObject
hades.models.pic.TurboPicCore
Nested Class Summary | |
(package private) class |
TurboPicCore.ADDLW
ADDLW: add a literal to W, 0 < L <= 255; update C, DC, Z flags 1 clock period |
(package private) class |
TurboPicCore.ADDWF
ADDWF F,D add W and register F (0 < F <= 127), store into W (D=0) or F (D=1) update C, DC, Z flags 1 clock period |
(package private) class |
TurboPicCore.ANDLW
ANDLW: logical AND a literal to W, 0 < L <= 255 update Z flag 1 clock period |
(package private) class |
TurboPicCore.ANDWF
ANDWF F,D logical AND W and register F (0 < F <= 127), store into W (D=0) or F (D=1) update Z flag 1 clock period |
(package private) class |
TurboPicCore.BCF
BCF F,B clear bit B in register 0 < F <= 127 no flags are changed 1 clock period |
(package private) class |
TurboPicCore.BreakPoint
|
(package private) class |
TurboPicCore.BSF
BSF F,B clear bit B in register 0 < F <= 127 no flags are changed 1 clock period |
(package private) class |
TurboPicCore.BTFSC
BTFSC F,B test bit B in register 0 < F <= 127, skip next instruction if clear no flags are changed 1 clock period |
(package private) class |
TurboPicCore.BTFSS
BTFSS F,B test bit B in register 0 < F <= 127, skip next instruction if clear no flags are changed 1 clock period |
(package private) class |
TurboPicCore.CALL
CALL addr call subroutine at "addr", update stack, PCLATH is not changed no flags are changed 2 clock period |
(package private) class |
TurboPicCore.CLRF
CLRF F clear the register specified by 0 < F <= 127 set the Z (zero) flag 1 clock period |
(package private) class |
TurboPicCore.CLRW
CLRW clear the W register (accumulator), set Z flag one clock period |
(package private) class |
TurboPicCore.CLRWDT
CLRWDT clear the WDT register (watch dog timer) set nTO, nPD flags one clock period |
(package private) class |
TurboPicCore.COMF
COMF F, D the contents of register 0 < F <= 127 are complemented, and the result is stored into W (D=0) or back into F (D=1) updates Z flag one clock period |
(package private) class |
TurboPicCore.DECF
DECF F, D the contents of register 0 < F <= 127 are decremented, and the result is stored into W (D=0) or back into F (D=1) updates Z flag one clock period |
(package private) class |
TurboPicCore.DECFSZ
DECFSZ F, D the contents of register 0 < F <= 127 are decremented, and the result is stored into W (D=0) or back into F (D=1). |
(package private) class |
TurboPicCore.DECFSZ_NF
|
(package private) class |
TurboPicCore.GOTO
GOTO goto instruction, final destination given by 11 bit argument and two bits from PCLATH register, no status bits are affected 2 clock periods |
(package private) class |
TurboPicCore.INCF
INCF F, D the contents of register 0 < F <= 127 are incremented, and the result is stored into W (D=0) or back into F (D=1) updates Z flag one clock period |
(package private) class |
TurboPicCore.INCFSZ
INCFSZ F, D the contents of register 0 < F <= 127 are decremented, and the result is stored into W (D=0) or back into F (D=1). |
(package private) class |
TurboPicCore.IORLW
IORLW: logical OR a literal to W, 0 < L <= 255 update Z flag 1 clock period |
(package private) class |
TurboPicCore.IORWF
IORWF F,D logical OR W and register F (0 < F <= 127), store into W (D=0) or F (D=1) update Z flag 1 clock period |
(package private) class |
TurboPicCore.MOVF
MOVF F, D move the contents of register 0 < F <= 127 to the W register for (D=0) and to F itself for (D=1). |
(package private) class |
TurboPicCore.MOVLW
MOVLW l move a literal to W, 0 < l <= 255 no flags are affected 1 clock period |
(package private) class |
TurboPicCore.MOVWF
MOVWF F move the contents of W to register 0 < F <= 127. |
(package private) class |
TurboPicCore.NOP
NOP don't change the processor state one clock period |
(package private) class |
TurboPicCore.OPTION
OPTION load OPTION register with contents of W. |
(package private) class |
TurboPicCore.PicInstruction
common base class for the PIC instructions |
(package private) class |
TurboPicCore.PicMemoryEepromAdapter
|
(package private) class |
TurboPicCore.PicMemoryEpromAdapter
|
(package private) class |
TurboPicCore.PicMemoryRegbankAdapter
|
(package private) class |
TurboPicCore.PicMemoryStackAdapter
|
(package private) class |
TurboPicCore.PicRegAdapter
|
(package private) class |
TurboPicCore.PicRegINTCONAdapter
|
(package private) class |
TurboPicCore.PicRegPCAdapter
|
(package private) class |
TurboPicCore.PicRegSTATUSAdapter
|
(package private) class |
TurboPicCore.PicRegWAdapter
|
(package private) class |
TurboPicCore.RETFIE
RETFIE return from interrupt (the PC value is taken from the stack). |
(package private) class |
TurboPicCore.RETLW
RETLW l return from a subroutine, and put literal l into W no flags are affected 2 clock periods |
(package private) class |
TurboPicCore.RETURN
RETURN l return from a subroutine no flags are affected 2 clock periods |
(package private) class |
TurboPicCore.RLF
RLF F, D the contents of register 0 < F <= 127 are rotated one bit left through the carry flag. |
(package private) class |
TurboPicCore.RRF
RRF F, D the contents of register 0 < F <= 127 are rotated one bit right through the carry flag. |
(package private) class |
TurboPicCore.SLEEP
SLEEP don't change the processor state one clock period |
(package private) class |
TurboPicCore.SUBLW
SUBLW l the W register value is subtracted from 8-bit literal l, and the result is placed in W. |
(package private) class |
TurboPicCore.SUBWF
SUBWF F,D subtract the W value from register 0 < F <= 127, and store into W (D=0) or F (D=1) update C, DC, Z flags 1 clock period |
(package private) class |
TurboPicCore.SWAPF
SWAPF F,D the upper and lower nibbles of register f are exchanged, and the result is stored into W (D=0) or F (D=1) no flags are affected 1 clock period |
(package private) class |
TurboPicCore.TRIS
TRIS f load TRIS register 5 <= f <= 7with contents of W. |
(package private) class |
TurboPicCore.XORLW
XORLW: logical XOR a literal to W, 0 < L <= 255 update Z flag 1 clock period |
(package private) class |
TurboPicCore.XORWF
XORWF F,D logical XOR W and register F (0 < F <= 127), store into W (D=0) or F (D=1) update Z flag 1 clock period |
Field Summary | |
static int |
_C
|
(package private) long |
_cycle
|
static int |
_DC
|
(package private) int |
_EEADR
|
(package private) int |
_EECON1
|
(package private) int |
_EECON2
|
(package private) int |
_EEDATA
|
static int |
_EEIE
|
(package private) int |
_FSR
|
static int |
_GIE
|
(package private) int |
_INDF
|
(package private) int |
_INTCON
|
static int |
_INTE
|
static int |
_INTF
|
static int |
_IRP
|
static int |
_nPD
|
static int |
_nTO
|
(package private) int |
_OPTION
|
(package private) int |
_PC
|
(package private) int |
_PCL
|
(package private) int |
_PCLATH
|
(package private) double |
_period
|
(package private) int |
_PORTA_LATCH
|
(package private) int |
_PORTB_LATCH
|
static int |
_RA0
|
static int |
_RA1
|
static int |
_RA2
|
static int |
_RA3
|
static int |
_RA4
|
static int |
_RBIE
|
static int |
_RBIF
|
static int |
_RP0
|
static int |
_RP1
|
(package private) int |
_SP
|
(package private) int |
_STATUS
|
static int |
_T0IE
|
static int |
_T0IF
|
(package private) int |
_TMR0
|
(package private) int |
_TRISA
|
(package private) int |
_TRISB
|
(package private) int |
_W
|
(package private) int |
_WDT
|
(package private) int |
_WDT_PRESCALER
|
static int |
_Z
|
static java.lang.String[][] |
bank0BitNames
|
static java.lang.String[] |
bank0Names
|
static java.lang.String[][] |
bank1BitNames
|
static java.lang.String[] |
bank1Names
|
(package private) int[] |
eeprom
|
static int |
EEPROM_SIZE
|
(package private) boolean |
enableDebugSignals
|
(package private) boolean |
enableGUI
|
(package private) boolean |
enableIRQs
|
(package private) boolean |
enableWDT
|
static int |
EPROM_SIZE
|
(package private) boolean |
isResetOrSleep
|
(package private) java.util.Hashtable |
labelTable
|
static int |
MAX_RAM
|
(package private) long |
n_errors
|
(package private) boolean |
needCheckIRQs
|
(package private) TurboPicCore.PicInstruction[] |
program
|
(package private) int[] |
register
|
(package private) int[] |
stack
|
static int |
STACK_DEPTH
|
Fields inherited from class hades.simulator.SimObject |
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
Constructor Summary | |
TurboPicCore()
|
Method Summary | |
java.lang.String |
__fill(java.lang.String s,
int n_chars)
|
java.lang.String |
__formatBit(int register,
int bit)
|
java.lang.String |
__formatFD(int f,
int d)
|
java.lang.String |
__formatLabel(int address,
int n_chars)
|
java.lang.String |
__formatLiteral(int literal)
|
java.lang.String |
__formatReg(int register)
|
java.lang.String |
__hex(int value,
int n_chars)
|
java.lang.String |
__xhex(int value,
int n_chars)
|
java.lang.String |
_d(int i)
format a register value |
java.lang.String |
_h(int i)
|
void |
checkIRQs()
|
void |
clearLabels()
|
void |
createAndInitializeMemoryArrays()
|
TurboPicCore.PicInstruction |
createDECFSZ(int _f,
int _d)
|
TurboPicCore.PicInstruction |
decode(int opcode)
return the PicInstruction subclass corresponding to the given opcode |
void |
dump()
dump PIC state |
void |
dumpProgram(java.io.OutputStream OS)
|
void |
error(java.lang.String s)
raise a Runtime exception (Error), due to some internal error |
boolean |
isCodeBreakPoint(int addr)
|
boolean |
isNormalRegister(int addr)
|
boolean |
isSpecialRegister(int addr)
|
void |
loadProgram(java.lang.String resourcename)
|
void |
loadProgramFormatHEX(java.io.InputStream IS)
load a program from a file in Microchip/Intel HEX16format, as produced by the MPASM assembler and toolkit. |
void |
loadProgramFormatROM(java.io.InputStream IS)
load a program from a file in ROM format, which contains (addr_hex opcode_hex) and (#label addr_hex label_name) lines. |
static void |
main(java.lang.String[] argv)
main: simple selftest and performance test for the TurboPicCore |
int |
readPortA()
read operation on PORT A. |
int |
readPortB()
read operation on PORT B. |
int |
readReg(int _addr7)
read the PIC file register selected by 7-bit parameter _addr7. |
int |
readRegRaw(int _addr9)
read a register specified by its full PIC16XX family (9-bit) file address. |
void |
reset()
reset the PIC processor |
void |
setCodeBreakPoint(int addr)
|
void |
setEnableIRQs(boolean b)
|
void |
setEnableWDT(boolean b)
|
void |
singleStep()
execute one PIC instruction |
void |
steps(int N)
execute N PIC instructions |
(package private) void |
tinySelftest()
|
void |
writePCL(int value)
write PCL pseudo register: this writes the lower 8 bits of the _PC program counter register, while the upper 5 bits are taken from _PCH. |
void |
writePortA(int value)
write operation to PORT A. |
void |
writePortB(int value)
write operation to PORT B. |
void |
writeReg(int _addr7,
int value)
|
void |
writeTrisA(int value)
write operation on the TRIS A register. |
void |
writeTrisB(int value)
write operation on the TRIS B register. |
Methods inherited from class hades.simulator.SimObject |
configure, constructDynamicSymbol, copy, elaborate, evaluate, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getToolTip, getVersionId, initialize, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, setVersionId, setVisible, tearDown, toString, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
double _period
long _cycle
long n_errors
boolean enableWDT
boolean enableIRQs
boolean isResetOrSleep
boolean enableGUI
boolean enableDebugSignals
boolean needCheckIRQs
int[] register
int[] stack
int[] eeprom
TurboPicCore.PicInstruction[] program
java.util.Hashtable labelTable
int _PC
int _W
int _SP
int _WDT
int _WDT_PRESCALER
int _INDF
int _TMR0
int _PCL
int _STATUS
int _FSR
int _PORTA_LATCH
int _PORTB_LATCH
int _EEDATA
int _EEADR
int _PCLATH
int _INTCON
int _OPTION
int _TRISA
int _TRISB
int _EECON1
int _EECON2
public static final java.lang.String[] bank0Names
public static final java.lang.String[] bank1Names
public static final java.lang.String[][] bank0BitNames
public static final java.lang.String[][] bank1BitNames
public static final int MAX_RAM
public static final int EEPROM_SIZE
public static final int EPROM_SIZE
public static final int STACK_DEPTH
public static final int _C
public static final int _DC
public static final int _Z
public static final int _nPD
public static final int _nTO
public static final int _RP0
public static final int _RP1
public static final int _IRP
public static final int _RBIF
public static final int _INTF
public static final int _T0IF
public static final int _RBIE
public static final int _INTE
public static final int _T0IE
public static final int _EEIE
public static final int _GIE
public static final int _RA0
public static final int _RA1
public static final int _RA2
public static final int _RA3
public static final int _RA4
Constructor Detail |
public TurboPicCore()
Method Detail |
public void createAndInitializeMemoryArrays()
public void clearLabels()
public void setEnableWDT(boolean b)
public void setEnableIRQs(boolean b)
public boolean isSpecialRegister(int addr)
public boolean isNormalRegister(int addr)
public void setCodeBreakPoint(int addr)
public boolean isCodeBreakPoint(int addr)
public int readReg(int _addr7)
public int readRegRaw(int _addr9)
Reading INDF will still use the PIC indirect addressing method via FSR.
public int readPortA()
public int readPortB()
public void writePortA(int value)
public void writePortB(int value)
public void writeTrisA(int value)
public void writeTrisB(int value)
public void writePCL(int value)
public void writeReg(int _addr7, int value)
public void checkIRQs()
public void error(java.lang.String s)
public TurboPicCore.PicInstruction createDECFSZ(int _f, int _d)
public void loadProgramFormatROM(java.io.InputStream IS)
public void loadProgramFormatHEX(java.io.InputStream IS)
public void loadProgram(java.lang.String resourcename)
public void dumpProgram(java.io.OutputStream OS)
public TurboPicCore.PicInstruction decode(int opcode)
public java.lang.String _d(int i)
public java.lang.String _h(int i)
public java.lang.String __formatReg(int register)
public java.lang.String __formatFD(int f, int d)
public java.lang.String __hex(int value, int n_chars)
public java.lang.String __xhex(int value, int n_chars)
public java.lang.String __formatBit(int register, int bit)
public java.lang.String __formatLabel(int address, int n_chars)
public java.lang.String __fill(java.lang.String s, int n_chars)
public java.lang.String __formatLiteral(int literal)
public void dump()
public void reset()
public void singleStep()
public void steps(int N)
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
void tinySelftest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |