Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trunner: armv7a9: provide soft restarts #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maska989
Copy link
Contributor

@maska989 maska989 commented Dec 5, 2023

JIRA: CI-389

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: armv7a9-zynq7000-evk.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link

github-actions bot commented Dec 5, 2023

Unit Test Results

6 002 tests  ±0   5 368 ✔️ +7   29m 16s ⏱️ -56s
   346 suites ±0      634 💤 ±0 
       1 files   ±0          0  - 7 

Results for commit f184945. ± Comparison against base commit c789b19.

♻️ This comment has been updated with latest results.

@maska989 maska989 force-pushed the maska989/armv7a9_soft_restarts branch 3 times, most recently from d7996bc to e9f10fb Compare December 5, 2023 12:07
@maska989 maska989 force-pushed the maska989/armv7a9_soft_restarts branch from e9f10fb to f184945 Compare December 5, 2023 13:18
@maska989 maska989 marked this pull request as ready for review December 5, 2023 15:09
@@ -109,6 +109,9 @@ def __call__(self, flash=False, hard=False):

self._set_flash_mode(flash)

# Ensuring that first up target will change state before restart
time.sleep(0.5)
Copy link
Contributor

Choose a reason for hiding this comment

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

From what I understand it's only needed on zynq target, so why do we add it in the common code?

Copy link
Contributor Author

@maska989 maska989 Dec 14, 2023

Choose a reason for hiding this comment

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

On other targets are no impact about that, because construction and way how they change states are different from zynq 7000. On other targets we can easily first up reboot and in this time change state. Zynq7000 need to have to change state as first because it prepares target for what is needed after reboot. I added this code there because it doesn't colidate with other targets and clarify situation with order in flashing state.

This is Reset cycle of zynq7000-zedboard:
image

And there is reason why Reboot is needed and what types of Signals can be needed in this situation:
image
image

Comment on lines 30 to +35
def _reboot_soft(self):
self._reboot_hard()
self.host.set_reset(0)
time.sleep(0.5)
self.dut.clear_buffer()
self.host.set_reset(1)
time.sleep(0.25)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's already defined in the same form in the parent class, so you can just remove it just like it's done there: https://github.com/phoenix-rtos/phoenix-rtos-tests/blob/8c6d062c2fbd327e2664ec371fcf8bddf1135483/trunner/target/armv7m7.py#L21C14-L21C14

Copy link
Contributor Author

@maska989 maska989 Dec 14, 2023

Choose a reason for hiding this comment

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

@damianloew look closely on line 32. Same history like before. It needs more time to bring down the target.

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.

2 participants