Skip to content

Conversation

@potsrevennil
Copy link
Contributor

@potsrevennil potsrevennil commented May 13, 2024

In order to support multi-platform including QEMU, simplify the usage of the tests script and avoid some confusion,
as @mkannwischer suggested, the -e flag is removed, only the platform is required.
Thus the tests interface is changed as follow:

❯ tests func --help
Usage: tests func [OPTIONS] {stm32f4discovery|stm32f767zi|mps2-an386}

Options:
  -v, --verbose             Show verbose output or not
  -i, --iterations INTEGER  Number of tests  [default: 1]
  --help                    Show this message and exit.
  • limit the scope of with in nix
  • fix multi targets of libopencm3 string concatanation in nix
  • support for cortex-m7
  • update build ci for m7
  • refactor tests script interface by removing the emulate flag
  • support for cortex-m7 in the tests script
  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
@potsrevennil potsrevennil requested a review from mkannwischer May 13, 2024 09:41
@potsrevennil potsrevennil marked this pull request as ready for review May 13, 2024 09:42
@potsrevennil potsrevennil requested a review from a team as a code owner May 13, 2024 09:42
@potsrevennil potsrevennil removed the request for review from a team May 13, 2024 09:53
@potsrevennil potsrevennil linked an issue May 13, 2024 that may be closed by this pull request
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @potsrevennil.
Here are some initial comments.
I think the benchmarks need to be reworked a bit because this core actually comes with an instruction cache. We'll likely have to do some cache warming and potentially also have to take the median/average over multiple runs.

@mkannwischer
Copy link
Contributor

Please add emulated tests using the mps2-an500.
I put an example here: https://github.com/mkannwischer/hw/tree/master/mps2-an500.

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now. Thanks!
Please do the mps2-an500 and the -u parameter in a separate PR as tracked by #38 and #34.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
@mkannwischer mkannwischer changed the title Support for Cortex-m7 Support for Arm Cortex-M7 (NUCLEO-F767ZI) May 15, 2024
@mkannwischer mkannwischer merged commit ff19445 into pq-code-package:main May 15, 2024
potsrevennil added a commit to potsrevennil/mlkem-c-embedded that referenced this pull request May 15, 2024
* limit the scope of `with` in nix

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* fix multi targets of libopencm3 string concatanation in nix

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* support for cortex-m7

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* update build ci for m7

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* refactor tests script interface by removing the emulate flag

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* support for cortex-m7 in the tests script

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* remove boards that are not supported

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* rename stm32f767zi -> nucleo-f767zi

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* output flash output if verbose flag is on

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* merge shared_options and shared_args for tests script cli

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

* nucleo-f767zi: do not use CCM

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

* take median value for speed benchmark

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>

---------

Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Co-authored-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
@potsrevennil potsrevennil deleted the m7 branch May 21, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add STM32F767ZI (Cortex-M7) support

2 participants