generate custom bitstream
to deploy a deep learning network to your custom target device, generate a custom
bitstream by using the dlhdl.processorconfig object.
create a
dlhdl.processorconfigobject.hpc = dlhdl.processorconfig;
set up the tool path to your design tool. for example, to set up the path to the vivado® design tool, enter:
hdlsetuptoolpath('toolname','xilinx vivado','toolpath','c:\xilinx\vivado\2020.2\bin\vivado.bat');
generate the custom bitstream.
dlhdl.buildprocessor(hpc);
locate the bitstream file and associated mat file at
cwd\dlhdl_prj\, wherecwdis your current working folder. the name of the bitstream file isdlprocessor.bit. the name of the mat file isdlprocessor.mat.to use the generated bitstream for the supported xilinx® boards, copy the
dlprocessor.bitanddlprocessor.matfiles to the present working folder.
to use the generated bitstream for the supported intel® boards, copy the
dlprocessor.core.rbf,dlprocessor.mat,dlprocessor.periph.rbf, anddlprocessor.soffiles to the same present working folder.
deploy the custom bitstream and deep learning network to your target device.
htarget = dlhdl.target('xilinx'); net = resnet18; hw = dlhdl.workflow('network',net,'bitstream','dlprocessor.bit','target',htarget); % if your custom bitstream files are in a different folder, use: % hw = dlhdl.workflow('network',snet,'bitstream',... % 'c:\yourfolder\dlprocessor.bit','target',htarget); hw.compile; hw.deploy;
see also
| |