Embedded Systems Design - July 2008 - (Page 20) cover feature which parts of a video frame may be One of the design goals of these the source code, but in the end, there is safely processed in parallel by a tools was the ability to retain the no silver bullet: either the designer or video encoder application. structure of the original source code the tool (or both) must sufficiently “unTo achieve this goal, a subset of as much as possible when performderstand” the source code to be able to the CleanC rules detail how to use ing transformations. This makes the transform it correctly and efficiently. constructs that reveal the intention transformed code easier to recogHence, it’s crucial that we identify those of the designer more clearly. For innize and understand, which is useful constructs in the source code that hamstance, when processing a video when the designer must edit the per this process. These can be code conframe, it’s easier to analyze the code transformed code. structs at the level of programming lanwhen the designer uses an explicit Undisciplined use of header files guage idioms or even at the level of code construct to represent the and C preprocessor statements design patterns for parallel programframe as a two-dimensional array makes this design goal difficult to ming. Once we’ve identified these conwith explicit indexing to access the achieve. A subset of CleanC rules structs, we may elaborate rules that pixel values, and when the designer detail how to properly use header specify in which circumstances these uses canonical for loops with files and preprocessor statements. constructs should be avoided. Source-code transformations may This is the rationale of IMEC’s soknown bounds to enumerate the also introduce conflicts between called CleanC rules that have been elabpixels. (The IMEC mapping tools variable names; hence, CleanC sugorated during the development of an understand a controlled form of dygests using different names for difMPSoC application-mapping tool suite. namic multidimensional memory ferent things. Other constructs that These rules target ANSI-C language idallocation.) Equivalent code with make source code transformations ioms that make the process of mapping data and function pointers and with more difficult include irregular consequential C programs onto an MPSoC pointer arithmetic often obscures trol flow and expressions with side platform more difficult. They consist of the intentions and makes the analyeffects. a few tens of guidelines and restrictions. sis more difficult. Code restrictions are conSome exceptions to structs that aren’t allowed to this intention-revealUndisciplined use of header files and be present in the input C code ing principle exist, C preprocessor statements makes for the tools to work (on that however. For instance, part of the code). while recursive functhis design goal difficult to achieve. For instance, undiscition definitions often plined use of preprocessing express the intention information in C can make life very hard more clearly than their nonrecursive for any kind of source-code transformacounterparts, they are typically Category 2—Rules to enable and tion tool. Code guidelines describe how harder to analyze by tools. improve data-dependency analycode should be written to give the tools sis. A major challenge in parallelizCategory 3—Rules to minimize maximum accuracy and transformation ing code and optimizing usage of data dependencies. Needless data freedom. The majority of these rules the memory hierarchy consists of dependencies complicate the analytranscends the specific functionality of dealing with data dependencies. sis process and may lower the qualithe IMEC mapping tools and may form Knowing which data are needed by ty of the analysis results. This, in the basis for a standard set of guidelines which parts of the code and underturn, affects the ability to optimize for programming MPSoC platforms in a standing the exact dependencies beand parallelize the source code. “clean” code called CleanC. tween the program parts that upCleanC not only details to avoid date the data and the parts that read global variables and duplicated HOW CLEANC DIFFERS FROM C those data are crucial instruments functionality, but it also imposes We can roughly classify the CleanC rules for parallelizing and optimizing the stricter constraints on the usage of in four different groups. These classificacode. Brute-force approaches for types: types with different names are tions are not completely independent. synchronizing accesses to shared basically considered different. For instance, applying a rule from one data resources may result in worstUsing code constructs like globcategory may strengthen the effects of case assumptions about the proal variables also has more direct rules in other categories. grams behavior. Hence they are typnegative effects, for instance by ically bound to be suboptimal at needlessly increasing the lifecycle of best and highly inefficient at worst. large data structures. Category 1—Rules to enable and Thus, we must be able to analyze improve source-code transformaCategory 4—Rules to avoid the data dependencies in more precise tions. The IMEC mapping tools are dark corners of the C standards. and fine-grained ways: for instance, source-code transformation tools. The C standards contain many ele- • • • • 20 JULY 2008 | embedded systems design | www.embedded.com http://www.embedded.com
Table of Contents Feed for the Digital Edition of Embedded Systems Design - July 2008 Embedded Systems Design - July 2008 Contents #Include Parity Bit Programming Pointers Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design Building a Power Supply for Discontinuous Transmission Wireless Networks An Exception Primer Advertising Index Break Points Marketplace Embedded Systems Design - July 2008 Embedded Systems Design - July 2008 - Embedded Systems Design - July 2008 (Page Cover1) Embedded Systems Design - July 2008 - Embedded Systems Design - July 2008 (Page Cover2) Embedded Systems Design - July 2008 - Embedded Systems Design - July 2008 (Page 1) Embedded Systems Design - July 2008 - Embedded Systems Design - July 2008 (Page 2) Embedded Systems Design - July 2008 - Contents (Page 3) Embedded Systems Design - July 2008 - Contents (Page 4) Embedded Systems Design - July 2008 - Contents (Page 5) Embedded Systems Design - July 2008 - Contents (Page 6) Embedded Systems Design - July 2008 - #Include (Page 7) Embedded Systems Design - July 2008 - #Include (Page 8) Embedded Systems Design - July 2008 - Parity Bit (Page 9) Embedded Systems Design - July 2008 - Programming Pointers (Page 10) Embedded Systems Design - July 2008 - Programming Pointers (Page 11) Embedded Systems Design - July 2008 - Programming Pointers (Page 12) Embedded Systems Design - July 2008 - Programming Pointers (Page 13) Embedded Systems Design - July 2008 - Programming Pointers (Page 14) Embedded Systems Design - July 2008 - Programming Pointers (Page 15) Embedded Systems Design - July 2008 - Programming Pointers (Page 16) Embedded Systems Design - July 2008 - Programming Pointers (Page 17) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 18) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 19) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 20) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 21) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 22) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 23) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 24) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 25) Embedded Systems Design - July 2008 - Interactive C-code Cleaning Tool Supports Multiprocessor SoC Design (Page 26) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 27) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 28) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 29) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 30) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 31) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 32) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 33) Embedded Systems Design - July 2008 - Building a Power Supply for Discontinuous Transmission Wireless Networks (Page 34) Embedded Systems Design - July 2008 - An Exception Primer (Page 35) Embedded Systems Design - July 2008 - An Exception Primer (Page 36) Embedded Systems Design - July 2008 - An Exception Primer (Page 37) Embedded Systems Design - July 2008 - An Exception Primer (Page 38) Embedded Systems Design - July 2008 - An Exception Primer (Page 39) Embedded Systems Design - July 2008 - An Exception Primer (Page 40) Embedded Systems Design - July 2008 - An Exception Primer (Page 41) Embedded Systems Design - July 2008 - An Exception Primer (Page 42) Embedded Systems Design - July 2008 - An Exception Primer (Page 43) Embedded Systems Design - July 2008 - Advertising Index (Page 44) Embedded Systems Design - July 2008 - Break Points (Page 45) Embedded Systems Design - July 2008 - Break Points (Page 46) Embedded Systems Design - July 2008 - Marketplace (Page 47) Embedded Systems Design - July 2008 - Marketplace (Page 48) Embedded Systems Design - July 2008 - Marketplace (Page Cover3) Embedded Systems Design - July 2008 - Marketplace (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.