Control the gain variable inside the generated IP block
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anoop R
le 6 Sep 2021
Réponse apportée : JT Ferrara
le 8 Sep 2021
Hello,
I have a simulink block which generates the signal at a given frequency. The output of the signal generator is fed into Gain block and later some filters and the output at the last. These blocks are made into subsystems which has signal input and output.
My question is when i convert this simulink block into Xilinx IP using HDL code generator, I get one AXI Lite interface. I have additionlly added AXIS stream as well. so i can control my stream output based one values written to AXI lite from processor. Now i want to change the gain of the sinmulink model inside the subsystem.
Is there any way i can do that? Like i have 100 gain values which needs to be changed and i dont want everytime to go to simulink , change the gain value and generate IP again.
Is it possible to change via AXI lite?or any other mean? Any suggestions is appreciated.
IP core generation example.
https://www.mathworks.com/help/supportpkg/xilinxzynq7000/ug/generate-an-ip-core-for-zynq-7000-platform-from-matlab.html#bujzgzw
Thank you
0 commentaires
Réponse acceptée
JT Ferrara
le 8 Sep 2021
Hi Anoop,
This can be accomplished in two different ways:
1) Define a tunable parameter for your gain block, then map this tunable parameter to an AXI4-Lite interface. Instructions on how to define a tunable parameter in a gain block can be found here:
Once you have defined the tunable parameter, you will see a new row in the Target Interface Table for this parameter. You can map this parameter to AXI4-Lite.
2) Use a multiply block instead of a gain block, where the second input to the multiple block acts as the gain value. You can then map this input to AXI4-Lite in the Target Interface Table.
Based on your description above, it sounds like #1 will be the best option for you.
-- JT
0 commentaires
Plus de réponses (1)
Kiran Kintali
le 7 Sep 2021
please review this example
Getting Started with Targeting Xilinx Zynq Platform
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!