def config_pmbus(self): """Configure pmbus related attributes. This includes the pmbus rails and sensors. """ self.pmbus_rails = get_rails() sensors = [] for rail in list(self.pmbus_rails.values()): sensors.append(rail.voltage) sensors.append(rail.current) sensors.append(rail.power) self.pmbus_sensors = sensors self.pmbus_recorder = DataRecorder(*sensors)
parameter = np.fromfile("SkyNet.bin", dtype=np.int16) np.copyto(weight, parameter[0:220672]) np.copyto(biasm[0:428 * 16], parameter[220672:]) print("Parameters loading done") overlay = Overlay("SkyNet.bit") print("Bitstream loaded") SkyNet = overlay.SkyNet SkyNet.write(0x10, img.physical_address) SkyNet.write(0x1c, fm.physical_address) SkyNet.write(0x28, weight.physical_address) SkyNet.write(0x34, biasm.physical_address) rails = pynq.get_rails() #recorder = pynq.DataRecorder(rails["power1"].power) ################################## Main process ################################## bbox_origin = np.empty(64, dtype=np.int16) bbox = np.zeros((4, 4), dtype=np.float32) result = open('predict.txt', 'w+') batch_buff = None image = np.zeros((4, 160, 320, 4), np.uint8) image_buff = np.zeros((4, 160, 320, 4), np.uint8) print("Loading images to DDR...") load_image_to_ddr() print("\n**** Start to detect") start = time.time()
def get_power(): rails = pynq.get_rails() return (rails["PSINT_FP"].power.value, rails["INT"].power.value)