TomG008 / SkyNet

Other
235 stars 97 forks source link

KeyError: 'power1' #6

Open GGGGGGGG5566 opened 4 years ago

GGGGGGGG5566 commented 4 years ago

Hello SkyNet,

I want to deploy the code on Ultra96-V2. I started over and built the bitstream and weights from scratch

After finishing building the bitstream and weights, I changed the file name to "SkyNet.bin", "SkyNet.hwh", and "SkyNet.bit", and then ran the script "SkyNet.py" provided by the team.

But I always got the message KeyError: 'power1'

I tried to print out pynq.get_rails() and I only have these followings

{'in1': Rail {name=in1, voltage=Sensor {name=in1_voltage, value=1.193V}}, 
'in2': Rail {name=in2, voltage=Sensor {name=in2_voltage, value=1.797V}}, 
'in3': Rail {name=in3, voltage=Sensor {name=in3_voltage, value=0.844V}}, 
'in4': Rail {name=in4, voltage=Sensor {name=in4_voltage, value=0.852V}}, '
in5': Rail {name=in5, voltage=Sensor {name=in5_voltage, value=1.798V}}, 
'in6': Rail {name=in6, voltage=Sensor {name=in6_voltage, value=1.794V}}, 
'in7': Rail {name=in7, voltage=Sensor {name=in7_voltage, value=0.842V}}, 
'in8': Rail {name=in8, voltage=Sensor {name=in8_voltage, value=0.841V}}, 
'in9': Rail {name=in9, voltage=Sensor {name=in9_voltage, value=0.844V}}, 
'in10': Rail {name=in10, voltage=Sensor {name=in10_voltage, value=1.796V}}, 
'in11': Rail {name=in11, voltage=Sensor {name=in11_voltage, value=1.092V}}}

No "power1" is in pynq.get_rails(). Could you kindly suggest which part I might go wrong so that I could fix it?

Thank you.

onioncc commented 4 years ago

Hi,

Thanks for your interest. The pynq.get_rails() is just about measuring the board power consumption. If you don't need it, you can actually remove the power related code, eg. line 172, 173, 194, etc.

If you do require the power measurement, maybe it is because of the board version, since we were using ultra96-V1.

Thanks, Cong

tianyma commented 3 years ago

modify energy = recorder.frame["power1_power"].mean() * total_time to energy = recorder.frame["5V_power"].mean() * total_time modify recorder = pynq.DataRecorder(rails['power1'].power) to recorder = pynq.DataRecorder(rails['5V'].power)