You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
467 B
Python

import pin
FETCH = [
# 把 pc(当前是0) 的值 输出到偏移地址寄存器中,
pin.PC_OUT | pin.MAR_IN,
# 内存根据上方修改后的偏移地址寄存器找到数据输出到总线上, IR 写入, 给PC 增加1
pin.RAM_OUT | pin.IR_IN | pin.PC_INC,
pin.PC_OUT | pin.MAR_IN,
pin.RAM_OUT | pin.DST_IN | pin.PC_INC,
pin.PC_OUT | pin.MAR_IN,
pin.RAM_OUT | pin.SRC_IN | pin.PC_INC,
]
if __name__ == "__main__":
print(FETCH)