register iO { pc : 64 = 0; } i_pc = 2 + O_pc; # read instruction memory pc = O_pc; # we now have i10bytes wire icode:4, rA:4; icode = i10bytes[4..8]; rA = i10bytes[12..16]; # read the register file reg_srcA = rA; reg_srcB = REG_RSP; # do math wire valE:64; valE = reg_outputB - 8; # store register values reg_dstE = REG_RSP; reg_inputE = valE; # write memory mem_addr = valE; mem_input = reg_outputA; mem_readbit = 0; mem_writebit = (icode == PUSHQ); Stat = [ icode == PUSHQ : STAT_AOK; 1 : STAT_INS; ];