ALUy Spec - Atmelfan/C204 GitHub Wiki

8bit asynchronus alu

Inputs

  • A[7..0]: A operand input
  • B[7..0]: B operand input
  • OP[3..0]: Operation to perform

Outputs

  • C[7..0]: Operation result
  • wr: write to register
  • jmp: load next word into pc

Operations

0x0, NOP  
  Do nothing  
  WR = 0  
  JMP = 0  
  C = don't care  
0x1, ADD a b  
  Add a to b  
  WR = 1  
  JMP = 0  
  C = B + A  
0x2, SUB a b  
  Subtract a from b  
  WR = 1  
  JMP = 0  
  C = B - A  
0x3, AND a b  
  Logical a and b  
  WR = 1  
  JMP = 0  
  C = A and B  
0x4, OR a b
  Logical a or b
  WR = 1
  JMP = 0
  C = A or B
0x5, XOR a b
  Logical a xor b
  WR = 1
  JMP = 0
  C = A xor B
0x6, MICKE a b
  Copy a to b
  WR = 1
  JMP = 0
  C = A
0x7, JMP a b
  Jump if a equals b
  WR = 0
  JMP = (A == B)
  C = don't care
⚠️ **GitHub.com Fallback** ⚠️