This is a related/follow up question to Uploading Bitstream to CW312T-A35 through CW HUSKY and CW313 Target support - Embedded Security / ChipWhisperer Hardware - NewAE Forum
I’ve been having a lot of trouble glitching AES encryption on the CW312T-A35 Husky target, and I’ve determined a possible issue could be that the bitstream may not be properly uploaded. After doing these steps:
import chipwhisperer as cw
scope = cw.scope()
scope.default_setup()
scope.io.hs2 = 'clkgen'
platform = 'ss2_a35'
from chipwhisperer.hardware.naeusb.programmer_targetfpga import CW312T_XC7A35T
fpga = CW312T_XC7A35T(scope)
# Set to None during programming for better programming reliability (See https://github.com/newaetech/chipwhisperer/blob/develop/software/chipwhisperer/hardware/naeusb/programmer_targetfpga.py)
scope.io.hs2 = None
fpga.program('ss2_aes_wrapper.bit', sck_speed=10e6)
scope.io.hs2 = 'clkgen'
# CW312 is a subset of 305, so use the 305 target
target = cw.target(scope, cw.targets.CW305, force=False, fpga_id=None, platform=platform, program=False)
and checking if the bitstream was uploaded (I got this from the same post):
status = fpga.done_state()
if status:
print("✅ FPGA programmed.")
else:
print("❌ FPGA Not Programmed.")
status
evaluates to True
. However, running target.is_programmed()
returns False
.
My question(s) is/are: is fpga.done_state()
a reliable way to tell if the bitstream is uploaded? Why is target.is_programmed()
returning False
? Am I missing something that is preventing ss2_aes_wrapper.bit
from being properly uploaded? Thanks in advance for your help.