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

Silicon Labs: Add support for hardware CRC #7479

Merged
merged 1 commit into from Jul 19, 2018

Conversation

Projects
None yet
8 participants
@stevew817
Contributor

stevew817 commented Jul 11, 2018

Description

Adding in support for the mbed CRC API, such that CRC calculations can be accelerated by hardware on EFM32PG, EFR32MG and EFM32GG11.

Test results:

mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'OK'
mbedgt: test on hardware with target id: 204100ED0001B6F4D6B5856F
mbedgt: test suite 'tests-mbed_hal-crc' .............................................................. OK in 26.53 sec
	test case: 'test: CRC calculation - multi input.' ............................................ OK in 0.00 sec
	test case: 'test: CRC calculation - single input.' ........................................... OK in 0.00 sec
	test case: 'test: hal_crc_compute_partial() - invalid parameters.' ........................... OK in 0.02 sec
	test case: 'test: hal_crc_is_supported() - invalid parameter.' ............................... OK in 0.00 sec
	test case: 'test: re-configure without getting the result.' .................................. OK in 0.00 sec
	test case: 'test: supported polynomials.' .................................................... OK in 0.00 sec
mbedgt: test case summary: 6 passes, 0 failures
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.5187645681
mbedgt: test suite report:
+---------------------+---------------+--------------------+--------+--------------------+-------------+
| target              | platform_name | test suite         | result | elapsed_time (sec) | copy_method |
+---------------------+---------------+--------------------+--------+--------------------+-------------+
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | OK     | 26.53              | default     |
+---------------------+---------------+--------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+---------------------+---------------+--------------------+-------------------------------------------------------+--------+--------+--------+--------------------+
| target              | platform_name | test suite         | test case                                             | passed | failed | result | elapsed_time (sec) |
+---------------------+---------------+--------------------+-------------------------------------------------------+--------+--------+--------+--------------------+
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | test: CRC calculation - multi input.                  | 1      | 0      | OK     | 0.0                |
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | test: CRC calculation - single input.                 | 1      | 0      | OK     | 0.0                |
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | test: hal_crc_compute_partial() - invalid parameters. | 1      | 0      | OK     | 0.02               |
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | test: hal_crc_is_supported() - invalid parameter.     | 1      | 0      | OK     | 0.0                |
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | test: re-configure without getting the result.        | 1      | 0      | OK     | 0.0                |
| TB_SENSE_12-GCC_ARM | TB_SENSE_12   | tests-mbed_hal-crc | test: supported polynomials.                          | 1      | 0      | OK     | 0.0                |
+---------------------+---------------+--------------------+-------------------------------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 6 OK
mbedgt: completed in 28.72 sec

Pull request type

[ ] Fix
[ ] Refactor
[ ] New target
[X] Feature
[ ] Breaking change

@cmonr cmonr requested review from screamerbg and ashok-rao Jul 12, 2018

@cmonr cmonr added the needs: review label Jul 12, 2018

@cmonr cmonr requested a review from deepikabhavnani Jul 12, 2018

@cmonr

cmonr approved these changes Jul 12, 2018

LGTM. Will wait for one other before starting CI

@screamerbg

This comment has been minimized.

Member

screamerbg commented Jul 12, 2018

LGTM

@mprse

mprse approved these changes Jul 12, 2018

Implementation consistent with the requirements.

@ashok-rao

LGTM! Thanks @stevew817

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Jul 12, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 12, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 12, 2018

Build : SUCCESS

Build number : 2583
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7479/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.


bool hal_crc_is_supported(const crc_mbed_config_t *config)
{
//GPCRC supports any 16-bit poly, but only the CCITT 32-bit poly

This comment has been minimized.

@deepikabhavnani

deepikabhavnani Jul 12, 2018

Contributor

Looks good to me, just one query / concern, GPCRC_PRESENT will always be present for all targets?
In case DEVICE_CRC is true and GPCRC_PRESENT is not defined hal_crc_is_supported should return false and rest of the API's should just return.

This comment has been minimized.

@stevew817

stevew817 Jul 16, 2018

Contributor

DEVICE_CRC is a target-specific definition through targets.json, while GPCRC_PRESENT is a Silicon Labs CMSIS define. If a device doesn't have a GPCRC engine, then we don't add the CRC capability to its entry in targets.json.

The reason for still having the DEVICE_CRC define is to allow people to turn off CRC acceleration if they should want to do so.

@0xc0170 0xc0170 added needs: review and removed needs: CI labels Jul 13, 2018

@stevew817 stevew817 force-pushed the SiliconLabs:feature/crc branch from 220e9a4 to 8649162 Jul 16, 2018

@stevew817

This comment has been minimized.

Contributor

stevew817 commented Jul 16, 2018

Rebased on master and added CRC capability to EFM32GG11 as well, now that #7079 was merged.

@cmonr cmonr added needs: CI and removed needs: review labels Jul 16, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 16, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 16, 2018

Build : SUCCESS

Build number : 2614
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7479/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@stevew817

This comment has been minimized.

Contributor

stevew817 commented Jul 17, 2018

@0xc0170 Is the exporter really still 'in progress' after 16 hours?

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 17, 2018

Completed but not reported back, restarting

/morph export-build

@stevew817

This comment has been minimized.

Contributor

stevew817 commented Jul 18, 2018

@0xc0170 Still nothing...

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 18, 2018

That's weird. I've never seen the pipeline get stuck like that...

/morph export-build

Should be <2h now.

@stevew817

This comment has been minimized.

Contributor

stevew817 commented Jul 18, 2018

@cmonr No dice...

@mbed-ci

This comment has been minimized.

@stevew817

This comment has been minimized.

Contributor

stevew817 commented Jul 18, 2018

Oh goodness, looks like either someone needs to make a call to Sweden or implement better resource management for CI resources...

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 19, 2018

Sorry, but it looks like the CI is having a day...
We're looking into it, and hopefully people in the opposite timezone from me will be able to iron out issues to get this re-run.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 19, 2018

/morph export-build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 19, 2018

@cmonr cmonr merged commit 2188110 into ARMmbed:master Jul 19, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 794 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10055 cycles (+16 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the needs: CI label Jul 19, 2018

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Merge pull request ARMmbed#7479 from SiliconLabs/feature/crc
Silicon Labs: Add support for hardware CRC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment