generate custom bitstream -凯发k8网页登录

main content

generate custom bitstream

to deploy a deep learning network to your custom target device, generate a custom bitstream by using the dlhdl.processorconfig object.

  1. create a dlhdl.processorconfig object.

    hpc = dlhdl.processorconfig;
  2. 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');
  3. generate the custom bitstream.

    dlhdl.buildprocessor(hpc);
  4. locate the bitstream file and associated mat file at cwd\dlhdl_prj\, where cwd is your current working folder. the name of the bitstream file is dlprocessor.bit . the name of the mat file is dlprocessor.mat.

    to use the generated bitstream for the supported xilinx® boards, copy the dlprocessor.bit and dlprocessor.mat files to the present working folder.

    xilinx custom bitstream files

    to use the generated bitstream for the supported intel® boards, copy the dlprocessor.core.rbf, dlprocessor.mat, dlprocessor.periph.rbf, and dlprocessor.sof files to the same present working folder.

    intel custom bitstream files

  5. 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

| |

网站地图