System Level Design Languages:C/C++

C/C++

The C language was developed in early 1970s (1969–1973) by Dennis Ritchie at Bell Labs. The base of this language was the B language. It also has several features from Algol68. This language was developed when the UNIX operating system was designed. After developing C, almost the whole UNIX operating system was written by this language. Until late 1980s (1989), when C became a standard by ANSI (this version of C is called ANSI C), several versions of this language were developed and used by programmers. This language is a procedural language, which means that a system is broken into smaller and simpler subsystems (hierarchically) and each subsystem is implemented by a function in C. Therefore it is used for top-down design methodology.

In early 1980s (1983–1985) Bjarne Stroustrup proposed object-oriented version of the C language, which was called C++, at Bell Labs. In this language, several concepts like classes and objects, inheritance, operator overloading, etc. were added to the original C language. A number of these features were derived from Simula67 and Algol68 languages.

C is a subset of C++ but the philosophy of programming with C++ is different from that of C. As stated earlier, C is a procedural language, while C++ is a modular language. In other words, as the building blocks of a system are designed with classes in C++, the language can also be used for bottom-up design methodology.

In the next section, the role of high-level languages like C and C++ in hardware design will be discussed. Then, the basic concepts and features of C and C++ will be listed. Various advanced features of the C language for modeling concurrency in a design will be discussed subsequently. These features can be useful for hardware/software codesign and hardware modeling. At the end of this section, we will demonstrate a simple example to show a design flow with C/C++.

The Role of C/C++ in Hardware Design

As C and C++ are high-level languages with several features, they can also be appropriate for system level designs with hardware components as well as software modules, or hardware/software codesign. These languages are usually used to implement a system at the early stages of the design. When the designer has the specification of a system, he or she can implement the whole design with C or C++. At this stage, system parts are described in a high level of abstraction and details are not implemented. They are developed in a way that the functionality of the whole system can be verified. In this stage of design, the designer has no limitations or constrains as to what parts of the design are hardware or software.

In this stage the important task of performance analysis must be done. There are several tools that do performance analysis on a design. By this analysis, a designer understands the efficiency of his or her hardware/software partitioning, design efforts, and system’s bottlenecks. With this information, the designer can decide on a good hardware/software partitioning. With performance analysis, the designer can also decide on the characteristics and requirements of the processor (or processors) needed for the implementation of software part(s).

When partitioning is known, the designer can perform C-synthesis (also known as behavioral synthesis) to convert high-level hardware parts into lower-level RTL modules. Figure 86.38 shows the design flow using C/C++. It is important to note that the diagram in Figure 86.38 is not the only possible C/C++ design methodology.

System behavior level in C/C++ is usually higher than RT or gate level. While these lower levels generally involve timings and events, higher-level descriptions see design at a more abstract level. In general, for RT or lower-level descriptions, VHDL, Verilog, or other such HDLs are more appropriate. In system level designs, the number of modules and events are fewer than those in RTL, and modules can also commu- nicate by more abstract message passing mechanisms. In system level design with C/C++, we can partition the design into several tasks, develop each task by a function or develop classes and use their methods and attributes to perform each task and then continue the design step as illustrated in Figure 86.38.

System Level Design Languages-0220

Since C++ is an object-oriented and a more complete language than C for the design of hardware, it is recommended to use C++ and its corresponding libraries like SystemC or Handel-C. These libraries are geared toward hardware and provide a good interface between hardware thinking in a software environment.

Comments

Popular posts from this blog

SRAM:Decoder and Word-Line Decoding Circuit [10–13].

ASIC and Custom IC Cell Information Representation:GDS2

Timing Description Languages:SDF