From 8d7cfa73949d3e1d1f39a0c10eb3b2d1d866ce94 Mon Sep 17 00:00:00 2001 From: Ehsan Khodadad Date: Sat, 7 Sep 2024 15:12:31 +0200 Subject: [PATCH 1/5] lf-default-patmos added to ci.yml --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd12b4eff..17a788684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,14 @@ jobs: compiler-ref: ${{ needs.fetch-lf.outputs.ref }} if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'flexpret') }} + lf-default-patmos: + needs: [fetch-lf] + uses: lf-lang/lingua-franca/.github/workflows/c-patmos-tests.yml@master + with: + runtime-ref: ${{ github.ref }} + compiler-ref: ${{ needs.fetch-lf.outputs.ref }} + if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'patmos') }} + lf-default: needs: [fetch-lf] uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master From b6d2cdda299ae394f51dd3fc9a3f6a7fc33428c2 Mon Sep 17 00:00:00 2001 From: Ehsan Khodadad Date: Thu, 19 Sep 2024 14:27:03 +0200 Subject: [PATCH 2/5] lf_sleep and lf_nanosleep functions added --- .../impl/src/lf_patmos_support.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/low_level_platform/impl/src/lf_patmos_support.c b/low_level_platform/impl/src/lf_patmos_support.c index 43f20710c..6529c95bc 100644 --- a/low_level_platform/impl/src/lf_patmos_support.c +++ b/low_level_platform/impl/src/lf_patmos_support.c @@ -70,6 +70,26 @@ int _lf_interruptable_sleep_until_locked(environment_t* env, instant_t wakeup) { } } +int lf_sleep(interval_t sleep_duration) { + instant_t now; + _lf_clock_gettime(&now); + instant_t wakeup = now + sleep_duration; + + // Do busy sleep + do { + _lf_clock_gettime(&now); + } while ((now < wakeup)); + return 0; +} + +/** + * Pause execution for a number of nanoseconds. + * + * @return 0 for success, or -1 for failure. In case of failure, errno will be + * set appropriately (see `man 2 clock_nanosleep`). + */ +int lf_nanosleep(interval_t requested_time) { return lf_sleep(requested_time); } + /** * Patmos clock does not need initialization. */ From 09554970b24304e73a58ff7034b96e9027408152 Mon Sep 17 00:00:00 2001 From: Ehsan Khodadad Date: Tue, 24 Sep 2024 13:00:47 +0200 Subject: [PATCH 3/5] space added --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17a788684..cdcced9b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: with: runtime-ref: ${{ github.ref }} compiler-ref: ${{ needs.fetch-lf.outputs.ref }} - if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'patmos') }} + if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'patmos') }} lf-default: needs: [fetch-lf] From d42e879cec243d3de345c68ffbd15ea122540240 Mon Sep 17 00:00:00 2001 From: Ehsan Khodadad Date: Tue, 24 Sep 2024 13:20:44 +0200 Subject: [PATCH 4/5] Drop Patmos test --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d117845f8..f4a472d02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,13 +63,13 @@ jobs: # compiler-ref: ${{ needs.fetch-lf.outputs.ref }} # if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'flexpret') }} - lf-default-patmos: - needs: [fetch-lf] - uses: lf-lang/lingua-franca/.github/workflows/c-patmos-tests.yml@master - with: - runtime-ref: ${{ github.ref }} - compiler-ref: ${{ needs.fetch-lf.outputs.ref }} - if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'patmos') }} +# lf-default-patmos: +# needs: [fetch-lf] +# uses: lf-lang/lingua-franca/.github/workflows/c-patmos-tests.yml@master +# with: +# runtime-ref: ${{ github.ref }} +# compiler-ref: ${{ needs.fetch-lf.outputs.ref }} +# if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'patmos') }} lf-default: needs: [fetch-lf] From a1fbf9873f2eb52cba1417935f287642c70c1247 Mon Sep 17 00:00:00 2001 From: Ehsan Khodadad Date: Tue, 24 Sep 2024 13:32:49 +0200 Subject: [PATCH 5/5] patmos test removed --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4a472d02..ab26dd4de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,14 +63,6 @@ jobs: # compiler-ref: ${{ needs.fetch-lf.outputs.ref }} # if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'flexpret') }} -# lf-default-patmos: -# needs: [fetch-lf] -# uses: lf-lang/lingua-franca/.github/workflows/c-patmos-tests.yml@master -# with: -# runtime-ref: ${{ github.ref }} -# compiler-ref: ${{ needs.fetch-lf.outputs.ref }} -# if: ${{ !github.event.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'patmos') }} - lf-default: needs: [fetch-lf] uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master