Main Content

CLB Logic for Clock Generation

R2026b

After you generate code for a model that uses CLB-based BiSS clock generation, you can use Code Composer Studio (CCS) to update the CLB tile configurations and regenerate the CLB configuration files. This topic describes how to:

  • Update or modify the CLB tile configurations.

  • Generate CLB configuration files.

  • Generate CLB BiSS clock generation HTML file.

CLB Tile Configuration

  1. To generate the code for the model, press Ctrl+B or click Build, Deploy & Start. To follow the build process, open the diagnostic viewer using the link provided at the bottom of the model canvas.

  2. To open the project in CCS, click the project link in the diagnostic viewer.

  3. Right-click the project and select Add files.

    CCS project context menu with Add files option highlighted

  4. Locate the bissc.syscfg file in the \tic2000examples folder of your installed blockset.

    File browser dialog box showing the bissc.syscfg file in the tic2000examples folder

  5. To copy the file, click OK.

    Confirmation dialog box to copy the file into the project

  6. Configure the BiSS system configuration file (bissc.syscfg).

    1. Right-click bissc.syscfg and select Properties.

    2. Under Build, select SysConfig and click Edit Flags.

    3. Update the path to match your C2000Ware installation location, then click Apply and Close.

    Properties dialog box showing Build settings with SysConfig selected and Edit Flags option for updating the C2000Ware path

  7. To view the tile configurations, double-click bissc.syscfg.

    SysConfig editor showing CLB tile configurations for the BiSS protocol

Generate CLB Configuration File

  1. To regenerate the CLB_config.c and CLB_config.h files, first delete the existing CLB_config.c file.

    CCS project explorer showing the CLB_config.c file selected for deletion

  2. Build the project. After a successful build, the new CLB_config.c and CLB_config.h files are generated. You can choose to debug from CCS or use these files in MATLAB®.

    CCS project explorer showing the newly generated CLB_config.c and CLB_config.h files

Generate CLB Configuration in HTML

The CLB tool generates CLB configuration in HTML format in CCS. The HTML file shows the submodule interconnections in diagram form and can be used to verify the design.

  1. Under the project properties, add the path to the CLB tool in your C2000Ware installation. For example:

    C:\ti\c2000\C2000Ware_3_02_00_00\utilities\clb_tool\clb_syscfg\

    Update the version number in the path to match your installed C2000Ware version.

    CCS project properties showing the CLB tool path added to the build configuration

  2. Enter the following command under the post build option as shown:

    ${NODE_TOOL} "${CLB_SYSCFG_ROOT}/dot_file_libraries/clbDotUtility.js"  "${CLB_SYSCFG_ROOT}" 
    "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"

  3. Build the project. After a successful build, the clb.html file is generated.

  4. To view the CLB tile design, double-click clb.html.

    CLB tile design displayed in HTML format showing submodule interconnections

See Also

Topics