10 Advanced Topics

Additional reading for advanced users.

10.1 Clocking the Configurable Logic Block

How the CLB relates to clocks.

The CLB peripheral receives clock input from the source specified in the CLK field in the CLBCLK register, written from the CPU. Consult the data sheet for available clock sources.

The CLB also includes a clock divider, which must be configured along with the logic design and incorporated into the bit stream. The clock source can be divided by 1, 2, 4, 8, 16, 32, 64 or 128.

Note: The CLB clock divider is configured in the Easy View window inside MCC and the Global Settings panel in the Web version.

The CLB clock is distributed to all BLE flip-flops, so the logic design runs off the same clock. Although logic design schematics can include various flip-flop types, it is impossible to connect or configure an individual clock source.

10.2 Preferences

The preferences panel is accessed via the main drawer menu.

OptionDescription
Synthesis backend URLThe synthesis server URL must not be changed unless instructed to by Microchip support engineer
Always allow synthesisUsed to bypass Design checker errors by graying out the Synthesize button
Show modelThe right-hand pane will show the “GUI model” of the current design—this is for internal debugging of the GUI
Show HDLThe right-hand pane will show the intermediate HDL of the current design. This content will be sent to the backend for synthesis, for internal debugging of the interface between the GUI and backend
Show outputThe right-hand pane will show output from the synthesis engine—this is for internal debugging of the backend logic-synthesis engine

10.3 Making Use of the Output ZIP

How to use the output.

The synthesis process always returns a ZIP file with outputs.

Note: MCC users do not need to relate to the ZIP file contents.

The ZIP file is intended for the CLB Synthesizer Web version's users who want to convert a logic design into a bit stream.

The ZIP file contains a readme file which provides details about:
  • The resultant bit stream
  • A basic CLB driver for configuring the peripheral
  • Build artifacts

Refer to the readme inside the ZIP for further details.

10.4 Description of Output Files

After synthesis, a ZIP file containing many build artifacts can be downloaded.

The files in the ZIP are intended for bare metal users and/or for debugging purposes:
  • Root folder: Outputs for use in bare metal projects
  • Build folder: Debug artifacts from the build process
  • Input folder: Inputs passed into the server for processing
FilenameDescription
readme.txtInstructions for bare metal users
clb1.c; clb1.hDriver for configuring and enabling the CLB
clb1_output_mappings.hHeader file defining output mappings from the CLB to peripherals
bitstream.sBit stream in assembler format for embedding into a bare metal project
pre-routing.svgDiagrammatic representation output from Yosys (generic)
routed.svgDiagrammatic representation post-routing
build/bitstream.jsonBit stream words in JSON format
build/out.fasmOutput from FASM stage
build/out.netPre-routing acked netlist in XML format
build/out.net.post_routingPost-routing packed netlist in XML format
build/out.netlistBinary form of netlist
build/out.physBinary form of physical netlist
build/out.placePlacer output report
build/out.routeRouter output report
build/packaging_pin_util.rptPacking pin usage report
build/pre-routing.dotInput to pre-routing SVG
build/pre-routing.vVerilog netlist output from Yosys (before place and route)
build/routed.dotInput to post-routing SVG
build/routed.vBels format netlist post-routing
build/stderr.txtBackend stderr log
build/stdout.txtBackend stdout log
build/vpr_stdout.logPlace and route output
build/yosys.logLog from Yosys synthesis stage
build/synth.jsonJSON formatted netlist output from Yosys
input/*.vVerilog representation of input design
input/*.xdcMappings to physical pins
input/project.jsonTop-level description of the design
input/stats.jsonStatistical summary of the design
input/*.clbSave-file for the design

10.5 Synthesis and Place-and-Route Process

What happens behind the scenes?

Once an application has been captured in the CLB Synthesizer GUI, it needs to be converted into a configuration bit stream, which can be loaded into the CLB module. This process is known as “synthesis”, although it also includes place and route steps and is done by Microchip’s online web service.

It is unnecessary for the user to understand how this process works—a brief summary is given here for advanced or curious users.

How It Works

  1. The CLB application schematic drawings are converted to equivalent Verilog descriptions and sent to the backend for processing.
  2. The first stage in the backend process is logic synthesis. Logic synthesis is a process to convert the Verilog textual representation of a logic design into a netlist, which describes the hardware in equivalent logic gates and wires. Logic synthesis is done using Yosys Open SYnthesis Suite, which is equipped with a plug-in describing the actual structure of the logic elements in the CLB module. The output of the synthesis stage is a Verilog netlist.
  3. The next stage is Place-and-Route (PnR). During this stage, the netlist elements are mapped into physical locations in the CLB array (placement), and interconnects are made between them (routing), which is a complex and iterative process and is not ensured to achieve an outcome (e.g., if exceeding space or routing constraints). PnR is done using the VPR provided by Verilog to Routing (VTR), which is equipped with a plug-in that describes the available interconnects within the CLB module. The output of the PnR stage is a FASM file, which specifies the CLB configuration content in a generic, plain-text format.
  4. The final stage is bit stream generation. The bit stream generator parses the FASM file and converts the configuration of generic configurable logic resources into bit patterns in a bit stream according to the actual CLB bit stream implementation. The bit stream generator is a script specific to the Microchip CLB implementation. The output of the bit stream generator is a sequence of bits to be loaded into the CLB during configuration, which embeds as a sequence of data words (DW) stored as constants in Flash by the compiler during application building.