How to create a single dsp model that can be used for different fpga vendors (HDLcoder)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Lars Willeboordse
el 5 de Ag. de 2021
Comentada: Lars Willeboordse
el 16 de Ag. de 2021
Hi All,
First of allmy background is based on pure VHDL and what I would normally do is create different architectures for different vendors and or device famliy and have on top entity which uses a variant based on generics.
Since I just get to know Matlab/Simulink I was wondering if I could use a similar approach in simulink based on the family options you can choose in the HDL coder settings but I can not seem to figure it out.
I was hoping to use this example: https://nl.mathworks.com/help/hdlcoder/ug/modeling-efficient-multiplication-and-division-operations-for-fpga-targeting.html but it won't load in my matlab version R2019b
I think I need to use a variant subsystem? It would be very helpfull if someone could point me into the right direction? Maybe someone has a simple example how to code for different vendors?
Btw I tried to use the "optimized" multiply-add blocks which came with matlab but they don't work like i would expect.
Best Regards,
0 comentarios
Respuesta aceptada
Kiran Kintali
el 10 de Ag. de 2021
You can generate HDL code from variants. Attached is an example of the variant subsystem model using basic variant features.
You can create them using the documentation here
If you would like to connect the variant controls to the model HDL settings, you can use the command line API
hdlget_param(<modelname>, 'HDLOption')
Here are the sample settings stored on the model
>> hdlsaveparams('slow_fast_counter_variant/top')
%% Set Model 'slow_fast_counter_variant' HDL parameters
hdlset_param('slow_fast_counter_variant', 'HDLSubsystem', 'slow_fast_counter_variant');
hdlset_param('slow_fast_counter_variant', 'SynthesisTool', 'Xilinx Vivado');
hdlset_param('slow_fast_counter_variant', 'SynthesisToolChipFamily', 'Artix7');
hdlset_param('slow_fast_counter_variant', 'SynthesisToolDeviceName', 'xa7a100t');
hdlset_param('slow_fast_counter_variant', 'SynthesisToolPackageName', 'csg324');
hdlset_param('slow_fast_counter_variant', 'SynthesisToolSpeedValue', '-1I');
0 comentarios
Más respuestas (1)
Kiran Kintali
el 5 de Ag. de 2021
>> But it won't load in my matlab version R2019b
>> openExample('hdlcoder/DesignForEfficientDSPBlockMappingExample')
Attached 19b version of the example, but recommend upgrading to latest release to take advantage of new HDL Coder features. https://www.mathworks.com/help/hdlcoder/release-notes.html
>> what I would normally do is create different architectures for different vendors and or device famliy...
HDL Coder generates synthesizable HDL and supports multiple FPGA vendors and ASIC.
If you feel there is need to create multiple variants of the same logic you can use of variants subsystems or model references for specific variations that you have in mind.
2 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!