Skip to content

Silicon Labs: Add support for hardware CRC #7479

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

Merged
merged 1 commit into from
Jul 19, 2018

Conversation

stevew817
Copy link
Contributor

@stevew817 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

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

LGTM. Will wait for one other before starting CI

@screamerbg
Copy link
Contributor

LGTM

Copy link
Contributor

@mprse mprse left a comment

Choose a reason for hiding this comment

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

Implementation consistent with the requirements.

Copy link
Contributor

@ashok-rao ashok-rao left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @stevew817

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 12, 2018

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Jul 12, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 12, 2018


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

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@stevew817
Copy link
Contributor Author

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

@cmonr
Copy link
Contributor

cmonr commented Jul 16, 2018

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Jul 16, 2018

@stevew817
Copy link
Contributor Author

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

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 17, 2018

Completed but not reported back, restarting

/morph export-build

@stevew817
Copy link
Contributor Author

@0xc0170 Still nothing...

@cmonr
Copy link
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
Copy link
Contributor Author

@cmonr No dice...

@mbed-ci
Copy link

mbed-ci commented Jul 18, 2018

@stevew817
Copy link
Contributor Author

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

@cmonr
Copy link
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
Copy link
Contributor

cmonr commented Jul 19, 2018

/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jul 19, 2018

Exporter Build : SUCCESS

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

@cmonr cmonr merged commit 2188110 into ARMmbed:master Jul 19, 2018
@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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants