Hauptinhalt

dlhdl.Bitstream Class

R2026b

Namespace: dlhdl

Bitstream information for deployment

Since R2024b

Description

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

Creation

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

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

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

hB = dlhdl.Bitstream(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.

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: MemoryAddressRange="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 bitstream 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 bitstream.

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

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

Version History

Introduced in R2024b