Home
  VHDL
  Structure
  ImpReport
  InstrSet
    I-jp
    I-and
      i-and-sim
  Links
  Nicht gefunden
I-and

e-mail: info@flexputer.de

29/07/02 10:43

First we need a Instruction Pointer (IP) that is to be modified by the
jump instruction. Letís use Register 15 (0x0f) as the IP and set the
initial value to 0xFFFFFFFC.

Define   IP   0x0f
Register IP = 0xfffffffe


At power up we load Register 0x0f (IP) to the External Memory Unit
and wait for the first instruction to arrive at the input of the LUT.

LUT 0

Code JSel=0 Fetch=0 Alu=SEL_A DstY=MEM_ADDR SrcB=0 SrcA=IP

Code JSel=1 Fetch=1 Alu=Wait DstY=0       SrcB=0 SrcA=0
 


Now we define 3 Registers to serve as evaluation stack and set some
initial values to see the and working in the simulation

Define   RegA   0x01
Register RegA = 0xAA
Define   RegB  0x02
Register RegB = 0xF5
Define   RegC  0x03


As OpCode I used 0x46
- first we do the AND operation and tell the EMU to read the next
   instruction.
- then we move register C to register B
- finally we wait for the next instruction

LUT 0x46

Code JSel=0 Fetch=1 Alu=AND  DstY=RegA SrcB=RegB SrcA=RegA
Code JSel=0 Fetch=0 Alu=SELA DstY=RegB SrcB=0    SrcA=RegC
Code JSel=1 Fetch=0 Alu=Wait DstY=0    SrcB=0    SrcA=0
 

  See my Flexputer executing the first and instruction