class data_mem: memory=[8*'0']*4*1024*16 def mem(self,write_en,read_en,address,data_in,funct3): #写使能,读使能,(使能为int的0或1)地址,输入数据,func3 #输出为data_out if write_en: if funct3=='000': pass elif funct3=='001': pass elif funct3=='010': pass else: pass if read_en: if funct3=='000': pass elif funct3=='001': pass elif funct3=='010': pass elif funct3=='100': pass elif funct3=='101': pass else: pass