Task "Vivado IP Packager" unsucessful in 2023, cannot generate HDL code

6 views (last 30 days)
Hi,
I'm trying to use MATLAB (R2023a) to generate HDL code for a simple neural network.
The code I use comes from this tutorial: https://fr.mathworks.com/help/deeplearning/ug/create-simple-deep-learning-network-for-classification.html Onto which I appended the following lines for HDL generation (from another MATLAB tutorial):
dlQuantObj_FPGA = dlquantizer(net,'ExecutionEnvironment',"FPGA");
%% calibration
[calibrationData, validationData] = splitEachLabel(imds, 0.5,'randomized');
calibrationData_reduced = calibrationData.subset(1:20);
calibrate(dlQuantObj_FPGA,calibrationData_reduced)
%% set target
hPCNew = dlhdl.ProcessorConfig;
hPCNew.SynthesisToolChipFamily = 'Zynq';
hPCNew.TargetFrequency = 300;
hPCNew.TargetPlatform = 'Generic Deep Learning Processor'; % ?
hPCNew.ProcessorDataType = 'int8';
hPCNew.setModuleProperty('conv', 'ConvThreadNumber', 64);
hPCNew.setModuleProperty('fc', 'FCThreadNumber', 16);
hPCNew;
%% build hdl code
hdlsetuptoolpath('ToolName', 'Xilinx Vivado', 'ToolPath', '<myVivadopath>');
After running the command:
dlhdl.buildProcessor(hPCNew);
I am facing the following error:
Error using dnnfpga.build.DLBitstreamBuild/runBitstreamBuild
Failed to generate the HDL code for the deep learning processor with the following error message:
'Task "Vivado IP Packager" unsuccessful. See log for details.'.
Error in dnnfpga.build.buildProcessor
Error in dlhdl.buildProcessor (line 33)
dnnfpga.build.buildProcessor(varargin{:});
It doesn't seem to be generating a log file.
How may I fix this? Thank you so much.
  3 Comments
Emily
Emily on 21 Aug 2023
Edited: Emily on 21 Aug 2023
Hi Daniele,
Thank you for your reply. I am using Vivado 2022.1.
The program always seems to cause an error, but not always while generating the same file. I'm very confused as to why.
Yongjie
Yongjie on 10 Nov 2023
Can I ask how you solved this problem, my Matlab version is 2022b Vivado is 2020.2. I'm experiencing the same problem now.
There are some patches in this link below, but there is no support for Matlab 2022b.

Sign in to comment.

Answers (1)

Garmit Pant
Garmit Pant on 5 Sep 2023
Hello Emily
I understand that you are trying to generate HDL code using MATLAB R2023a.
The error that you are facing is a known issue with HDL IP core generation using Xilinx Vivado. You can follow the following bug report to solve this issue:
Follow the step-by-step workaround given in the bug report to solve the issue. Here’s the summarised version:
  1. Log into an account with appropriate permissions (typically root account on Linux systems).
  2. Locate your MATLAB installation folder using the command `matlabroot` referred to as <MATLAB> in step 4.
  3. Exit MATLAB.
  4. Rename the file `<MATLAB>/toolbox/hdlcoder/hdlcommon/+hdlturnkey/+ip/IPEmitterVivado.p` to "IPEmitterVivado_backup.p". Note: Windows systems may prompt for Administrator privileges.
  5. Download and unzip the attached .ZIP file associated with the Bug Report.
  6. Navigate to the subfolder that matches your MATLAB release, for example - R2023a
  7. Copy the newer version of the `IPEmitterVivado.p` file from the unzipped folder.
  8. Paste the copied file into the location mentioned in step 4. Note: Windows systems may prompt for Administrator privileges.
  9. Restart MATLAB.
I hope you find the above explanation and suggestions useful!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!