Skip to content

soc: nxp: imxrt: imxrt5xx: add Fusion F1 DSP selects #90829

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
Jun 6, 2025

Conversation

mjchen0
Copy link
Contributor

@mjchen0 mjchen0 commented May 29, 2025

Add select for GEN_HANDLERS to use the more efficient generated interrupt handlers.

Add select for HIFI3, which are the SIMD related registers.

Add select for GEN_HANDLERS to use the more efficient
generated interrupt handlers.

Add select for HIFI3, which are the SIMD related registers.

Signed-off-by: Mike J. Chen <[email protected]>
Copy link

@decsny decsny requested review from dbaluta and iuliana-prodan May 30, 2025 20:29
@decsny
Copy link
Member

decsny commented May 30, 2025

@dbaluta @iuliana-prodan it seems like some of these shared files should also be added to xtensa nxp area, since a file can be assigned to multiple groups. You are not getting requested by the bot on these type of PR which would probably be relevant to you. So if you can please update the MAINTAINER.yml for all the files you can think of that you would potentially need to review

@dbaluta
Copy link
Collaborator

dbaluta commented Jun 2, 2025

@decsny thanks for point this out.

I have added this #90947 but I wonder how can I check this before merging?

I try creating a test PR on nxp-upstream repo but the checks are not kicking in. -- nxp-upstream#9

@@ -36,6 +36,8 @@ config SOC_MIMXRT595S_CM33
config SOC_MIMXRT595S_F1
select XTENSA
select XTENSA_HAL if ("$(ZEPHYR_TOOLCHAIN_VARIANT)" != "xcc" && "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "xt-clang")
select XTENSA_CPU_HAS_HIFI3
Copy link
Collaborator

@iuliana-prodan iuliana-prodan Jun 2, 2025

Choose a reason for hiding this comment

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

Why this is needed for Fusion F1?

LE: Isn't enough to select XTENSA_CPU_HAS_HIFI or XTENSA_HIFI?
Even though this is also confusing, since on i.MXRT500 we have a Fusion F1, not a HiFi.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could replace it with a select for BOTH XTENSA_CPU_HAS_HIFI and XTENSA_HIFI, but it was easier to just add one select. One is not enough. My real goal is to unlock XTENSA_HIFI_SHARING, but that depends on XTENSA_HIFI and XTENSA_CPU_HAS_HIFI.

I'm not an expert on all the variants of Xtensa, but the documentation for Fusion F1 says "It is derived from a smaller version of the Cadence HiFi 3 DSP." so I guess it's not totally wrong to say it is a HIFI3, though it doesn't have all the features of a full HIFI3.

The other option is to add a specific config for XTENSA_CPU_HAS_FUSIONF1, but Fusion F1 seems to be a relatively old and uncommon DSP, so I initially didn't think it was worth adding all the changes to add another XTENSA_CPU variant.

Copy link
Collaborator

@iuliana-prodan iuliana-prodan Jun 3, 2025

Choose a reason for hiding this comment

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

@mjchen0 thanks for the explanation.
You're right, we shouldn't complicate too much. I agree to keep XTENSA_CPU_HAS_HIFI3 - at least we have this discussion to remember why we selected it.

@mjchen0
Copy link
Contributor Author

mjchen0 commented Jun 2, 2025

@decsny thanks for point this out.

I have added this #90947 but I wonder how can I check this before merging?

I try creating a test PR on nxp-upstream repo but the checks are not kicking in. -- nxp-upstream#9

To test, you really also need to add a CONFIG_XTENSA_HIFI_SHARING somewhere, like an app prj.conf.

Then test multi-threaded usage of some code that uses the SIMD registers. You could maybe have to threads doing Opus decoding, or one doing encoding and one doing decoding, or just write a simple function that uses a few SIMD registers for loading or storing from memory.

@decsny
Copy link
Member

decsny commented Jun 3, 2025

@decsny thanks for point this out.

I have added this #90947 but I wonder how can I check this before merging?

I try creating a test PR on nxp-upstream repo but the checks are not kicking in. -- nxp-upstream#9

Just run the get_maintainer.py script in script folder

@kartben kartben merged commit 2923504 into zephyrproject-rtos:main Jun 6, 2025
27 checks passed
@mjchen0 mjchen0 deleted the fusion_f1_selects branch June 11, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants