Automatic Identification of Concurrency in Handel-C Joseph C Libby, Kenneth B Kent, Farnaz Gharibian Faculty of Computer Science University of New Brunswick Introduction The goal of this project was to implement a compiler framework capable of identifying concurrency within a Handel C hardware description. Background Hardware systems are inherently concurrent systems. Multiple components of a hardware system can perform their computations at the same time. Handel C is a hardware description language based on the ANSI C specification. Handel C does not implement the entire ANSI C specification, but adds some hardware specific support. Dependence analysis is the process by which data and control dependencies between statements in a software program or hardware description are identified. Motivation High level hardware description languages were created in order to simplify hardware design and make it accessible to software developers. One major issue with software developers transitioning to hardware design is the identification of concurrency in systems. Many software developers have little to no training or experience in concurrent systems. A system capable of identifying concurrency in a hardware description would allow hardware developers to take full advantage of hardware platforms even without the necessary skills or experience. System Flow Description Parse Tree Generation: Java CC is used to generate a parse tree of the Handel C description. Parse Tree Processing: The parse tree is searched for variable instantiation, variable assignments, variable types and variable widths. Array index expressions and control flow data is also extracted. This data is stored in lookup tables for the next stage. Control Data Flow Graph Generation: Using the variable assignment and array index data, a control data flow graph is generated. Variable and control dependencies are computed using the lookup table and array dependencies are computed pair wise using array indices. Concurrency Extraction: Using the completed control dataflow graph concurrency is extracted. Nodes with no dependencies are combined into groups that can be performed concurrently. End User Reporting: A report is generated showing the required modifications to the Handel C source file to exploit the identified concurrency. The end user report can be seen below. Results BenchmarkPar Blocks Manual Par Blocks Automatic Percentage Found AES % LZ % Benchmark Results Conclusions Source Line#SourceAction *Par {Add 1Statement 1None 2Statement 2None 3Statement 3None 7Statement 6Move - 8Statement 7Move – *}Add 4While Move + 5Statement 4Move + 6Statement 5 Move + 9Statement 8Move + End User Report Experimental Results Based on the results gathered from running the tool on the benchmark applications it can be said that the tool performs well. The tool is capable of automatically identifying a large portion of available concurrency in a given Handel-C file, which was the initial goal of the project. The tool provides valuable feedback for designers that are not well versed in creating Handel-C designs that exploit concurrency and may possibly become a valuable tool in a learning setting. The tool could be used to facilitate teaching how to best design hardware by exploiting concurrency that is inherent in the design. BenchmarkResource Freq. (Mhz) Throughput (Mbits) FF’sMem (Bits) AES+LZ77 (Original) AES+LZ77 (Optimized)