hades.models.pic
Class PicExec

java.lang.Object
  extended byhades.models.pic.PicExec
Direct Known Subclasses:
PicExec16F84

public class PicExec
extends java.lang.Object

PicExec - the execution unit used in the PIC16C84. This class concludes all the parts needed to simulate this chip except the io.


Field Summary
 int action
           
 PicAlu alu
           
static int ALUACTION
          The four different instruction types
static int BITACTION
           
 PicBreakPoint breakPoint
           
 PicClocking clocking
           
 PicDecode decode
           
 PicEeprom eeprom
           
 PicEprom eprom
          The rt-elements
 PicEpromBreakPoints epromBreakPoints
           
static int JUMPACTION
           
static int LITERALACTION
           
 PicWordReg nextInstruction
          Instruction pipeline
 PicWordReg nextJump
           
 int operand
           
 PicRegBank regBank
           
 PicRegBankBreakPoints regBankBreakPoints
           
 int result
           
 PicBitReg skip
           
 PicBitReg sleep
          Sleep Mode
 PicStack stack
           
 PicWdt wdt
           
 PicByteReg workReg
           
 
Constructor Summary
PicExec()
           
 
Method Summary
 void advance()
          Increment clocking depending on sleep-mode
 void buildRegBank(PicBreakPoint breakPoint, PicEpromBreakPoints epromBreakPoints)
           
 void clock()
          this method has to be called to execute the different quarter cycles
 void fetchNextInstruction(int nextInstr)
          Get the next instruction or trash the pipeline
 void firstCycle()
          First quarter cycle, increment program-counter and decode instruction
 void fourthCycle()
          Fourth quarter cycle, write alu-result and fetch next instruction
 void incPc()
          increment program-counter or jump
 void por()
          Power-on-reset, just call the por()-method of all included parts
 void reset()
          Reset, just call the reset()-method of all included parts
 void secondCycle()
          Second quarter cycle, read the operands for third cycle
 void thirdCycle()
          Third quarter cycle, use ALU and increment timer0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALUACTION

public static final int ALUACTION
The four different instruction types

See Also:
Constant Field Values

BITACTION

public static final int BITACTION
See Also:
Constant Field Values

JUMPACTION

public static final int JUMPACTION
See Also:
Constant Field Values

LITERALACTION

public static final int LITERALACTION
See Also:
Constant Field Values

eprom

public PicEprom eprom
The rt-elements


alu

public PicAlu alu

decode

public PicDecode decode

regBank

public PicRegBank regBank

workReg

public PicByteReg workReg

clocking

public PicClocking clocking

stack

public PicStack stack

eeprom

public PicEeprom eeprom

wdt

public PicWdt wdt

breakPoint

public PicBreakPoint breakPoint

regBankBreakPoints

public PicRegBankBreakPoints regBankBreakPoints

epromBreakPoints

public PicEpromBreakPoints epromBreakPoints

nextInstruction

public PicWordReg nextInstruction
Instruction pipeline


nextJump

public PicWordReg nextJump

skip

public PicBitReg skip

operand

public int operand

action

public int action

result

public int result

sleep

public PicBitReg sleep
Sleep Mode

Constructor Detail

PicExec

public PicExec()
Method Detail

buildRegBank

public void buildRegBank(PicBreakPoint breakPoint,
                         PicEpromBreakPoints epromBreakPoints)

por

public void por()
Power-on-reset, just call the por()-method of all included parts


reset

public void reset()
Reset, just call the reset()-method of all included parts


fetchNextInstruction

public void fetchNextInstruction(int nextInstr)
Get the next instruction or trash the pipeline


incPc

public void incPc()
increment program-counter or jump


firstCycle

public void firstCycle()
First quarter cycle, increment program-counter and decode instruction


secondCycle

public void secondCycle()
Second quarter cycle, read the operands for third cycle


thirdCycle

public void thirdCycle()
Third quarter cycle, use ALU and increment timer0


fourthCycle

public void fourthCycle()
Fourth quarter cycle, write alu-result and fetch next instruction


advance

public void advance()
Increment clocking depending on sleep-mode


clock

public void clock()
this method has to be called to execute the different quarter cycles