Predication Support in CGRAs

Predication is the process of connecting data or an operation that facilitates the selection or execution of an operand with a predicate (true/false value). Consider an if-then-else (ITE) structure as an illustration, where the "if" statement's associated operations are chosen to be executed if the condition (predicate) is true. The operations linked to the "else" statements are chosen to be carried out if the condition is false (the predicate is false). The ITE statements are used frequently in applications, which makes them a barrier to the expansion of applications that could be mapped onto CGRAs. The ITE statements are realized through predication techniques in both the hardware and software, which makes predication a crucial component that CGRAs require in order to execute applications with a control flow.

Creating Architecture With Predication Support

To support predication there are two main additions needed. 1. A 1-bit network that could move predicates from one PE to another. The network could include functional unit to merge predicates. 2. Changing the multiplexers to select multiplexers that are connected to the 1-bit network.

Generating Verilog

To generate verilog for the predication CGRA architecture, you would need to add the pred flag for to the existing architectures. So the following command can be used to generate the verilog for predication CGRA:

$"$CGRA_MAPPER" -c adres --arch-opts "rows=2 cols=2 pred=1" --gen-verilog .

The above command generated the CGRA verilog file with the filename cgrame.v

Generating Configuration Bitstream

To generate configuration bitstream for the CGRA architecture that supports predication, you need to use the cluster mapper. The following command generates the configuration bitstream for multi-contect CGRA:

$ "$CGRA_MAPPER" -m ClusteredMapper -g graph_loop.dot -c adres --arch-opts "rows=2 cols=2 pred=1" --gen-testbench .

A verilog file named testbench.v is generated with the configuration bitstream for mapping the application onto the predicated CGRA.