Main Content

dlhdl.Bitstream Class

Namespace: dlhdl

Bitstream information for deployment

Since R2024b

Description

Use dlhdl.Bitstream objects to register and load your custom bitstream information.

Creation

hB = dlhdl.Bistream(Path) creates a bitstream object and sets the Path property.

hB = dlhdl.Bistream(Name) creates a bitstream object and sets the Name and Path properties.

hB = dlhdl.Bistream(Path,Name=Value) sets optional properties using one or more name-value arguments.

hB = dlhdl.Bistream(Name,Name=Value) sets optional properties using one or more name-value arguments.

Properties

expand all

Path to the folder containing the bitstream files or MAT file, specified as a string or character vector.

Example: Path="\user\Bitstream\dlprocessor.bit"

Name of the bitstream, specified as a string or character vector.

Example: Name="custom_zcu_single"

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Base address of memory that the design uses, specified as a string or character vector.

Example: MemoryBaseAddress="C0000000"

Memory address range to use, specified as a string or character vector.

Example: MemoryBaseAddressRange="20000"

Base address of the deep learning processor, specified as a string or character vector.

Example: ProcessorBaseAddress="A0000000"

This property is read-only.

Address range for deep learning processor to use, returned as a character vector.

Methods

expand all

Examples

collapse all

Create a generic deep learning processor configuration object. To generate the bistream faster, turn off the conv and fc modules. Save the object in the variable hPC.

hPC = dlhdl.ProcessorConfig;
hPC.TargetPlatform  = 'Generic Deep Learning Processor';
hPC.SynthesisTool = '';
hPC.setModuleProperty("conv",ModuleGeneration="off");
hPC.setModuleProperty("fc",ModuleGeneration="off");

Generate a deep learning processor IP core. Name the processor myProcessor and save it in the folder myProject.

dlhdl.buildProcessor(hPC,ProjectFolder='myProject', ...
ProcessorName="myProcessor");

Create a bitstream object using the information from the deep learning processor MAT file myProcessor.mat.

path = fullfile("myProject","myProcessor.mat");
hB = dlhdl.Bitstream(path)
hB = 
  Bitstream with properties:

                     Name: ''
                     Path: 'myProcessor.mat'
        MemoryBaseAddress: '0'
       MemoryAddressRange: '0'
     ProcessorBaseAddress: '0'
    ProcessorAddressRange: '0x10000'

Update the Name, MemoryBaseAddress, MemoryAddressRange, and ProcessorBaseAddress properties of the bistream.

hB = dlhdl.Bitstream(path,Name="myBitstream",MemoryBaseAddress="C0000000",...
MemoryAddressRange="20000",ProcessorBaseAddress="A0000000");
hB
hB = 
  Bitstream with properties:

                     Name: 'myBitstream'
                     Path: 'myProcessor.mat'
        MemoryBaseAddress: 'C0000000'
       MemoryAddressRange: '20000'
     ProcessorBaseAddress: 'A0000000'
    ProcessorAddressRange: '0x10000'

Version History

Introduced in R2024b