whether regressionenseblepredict block can be used in hdl coder?
5 views (last 30 days)
Kiran Kintali on 6 Oct 2023
Edited: Kiran Kintali on 6 Oct 2023
In general the code you posted cannot be directly be used to generate HDL.
You need to break the code into design.m (DUT) and testbench.m (Testbench around Design under Test) files. See design patterns for MATLAB Coding here https://www.mathworks.com/matlabcentral/fileexchange/50098-hdlcoder-design-patterns-and-examples
In general functions from Stats and Machine Learning Toolbox are not supported out of the box.
You may want to consider writing the DUT / design.m from first principles using supported subset of MATLAB for HDL Code generation and use HDL Coder for code generation from the MATLAB Code.
HDL Coder enables high-level design for FPGAs, SoCs, and ASICs by generating portable, synthesizable Verilog®, SystemVerilog, and VHDL® code from MATLAB functions, Simulink models, and Stateflow charts. You can use the generated HDL code for FPGA programming, ASIC prototyping, and production design.
You may also find this HDL Coder compatible product helpful for your Machine Learning application.
Deep Learning HDL Toolbox
Prototype and deploy deep learning networks on FPGAs and SoCs
Deep Learning HDL Toolbox provides functions and tools to prototype and implement deep learning networks on FPGAs and SoCs. It provides pre-built bitstreams for running a variety of deep learning networks on supported Xilinx® and Intel® FPGA and SoC devices. Profiling and estimation tools let you customize a deep learning network by exploring design, performance, and resource utilization tradeoffs.
Deep Learning HDL Toolbox enables you to customize the hardware implementation of your deep learning network and generate portable, synthesizable Verilog® and VHDL® code for deployment on any FPGA or SoC (with HDL Coder and Simulink).
Hamid Satarboroujeni on 14 Dec 2023
The code you pasted is for training the ensemble model. If you want to use the model in the RegressionEnsemble Predict block and generate HDL code from the block, you can follow the steps in the following question and use my answer to fix the error:
I hope this helps,