Closed vogelpi closed 2 years ago
On reducing numpy
and scipy
:
I think numpy
gets used for some binary list conversion in the CW310 board interface would be the only hit. SciPy should be avoidable. It's listed as a dependency for ChipWhisperer as it will break some of the SCA algorithms, which for most users is important. Longer-term we could add a separate 'chipwhisperer-api' or similar module release which is built from the same code-base but removes the dependency, or if the CW310 API is stable the relevant files could be moved to OT (we have the copyright so this can be done cleanly w/o messing up the copyright notices).
Longer-term we could add a separate 'chipwhisperer-api' or similar module release which is built from the same code-base but removes the dependency
Having a reduced package that only contains the "connectivity" parts would be fantastic; the existing "chipwhisperer" package could then depend on that to avoid duplicating the code. (And since we want it, we're also willing to invest time into helping with the implementation, of course.)
Having a dependency on Python packages in OpenTitan is fine, we don't need to vendor everything in. However, we try to keep the dependency tree reasonably small to avoid a "support nightmare". We have, for example, users on RHEL6 that routinely have trouble building binaries, including C extensions of some Python packages. The large majority of OpenTitan developers only wants to flash an FPGA and load a bit of software, but doesn't need the full power of the ChipWhisperer platform.
Closing, as all tasks have been completed.
6614 adds initial support for the ChipWhisperer CW310 board with Xilinx Kintex 7 XC7K410T FPGA. When doing the PR and during the review process, a couple of follow-up items got identified:
Tooling:
sw/host/spiflash
, see https://github.com/lowRISC/opentitan/pull/6614#discussion_r637067566~ This could theoretically be done but we dropped support for NexysVideo and kept usingcw310_loader.py
for the ChipWhisperer boards. In the meantime,opentitantool
is used for bootstrapping FPGA. Onceopentitantool
has the ability to also prep VMEM images for bootstrapping in DV sim,spiflash
might get removed. See https://github.com/lowRISC/opentitan/pull/12821#issuecomment-1135453310opentitan-pgm-fpga
~ This could theoretically be done by leveraging the FTDI MPSEE interface emulation of the SAM3X/U. However, there are some restrictions on what FPGA pins can be made available to the FTDI MPSEE interface by default. Some of them can be dynamically switched through Python. See https://github.com/lowRISC/opentitan/pull/12633#discussion_r879539230 for details. In the end, we didn't have a strong need for this so far and kept usingcw310_loader.py
instead. In the meantime, we dropped support for NexysVideo andopentitan-pgm-fpga
got removed with #12821.numpy
,scipy
introduced through the ChipWhisperer Python API, see https://github.com/lowRISC/opentitan/pull/6614#issuecomment-844323063 , see #12832Hardware:
hw/top_earlgrey/util/top_earlgrey_reduce.py
. See lowRISC/OpenTitan#7369