System Level Design Languages:Other Useful Classes and Methods
Other Useful Classes and Methods
This section provides a brief overview of SystemC. There are many predefined classes and functions in SystemC that were not discussed. The following list shows functions not discussed here. The reader is referred to Refs. [6,7] for more details of SystemC and an explanation of functions listed below.
• sc_clock
• sc_time
• sc_event_queue
• sc_report
• sc_spawn
• FORK/JOIN
• sc_event_finder
• sc_attribute
• sc_exception
An Example: System Level Modeling of Sayeh CPU
In this section we will put together all the previously discussed concepts in a comprehensive CPU example. The example is the system level implementation of a simple CPU called Sayeh. Sayeh was first used as a benchmark example in several papers on CPU testing. It was then used in Ref. [8]. The example description of this CPU and its Verilog description appear in this reference. For the sake of completeness, a brief overview will be given in the following paragraph.
Sayeh has a register file that is used for data-processing instructions. It has a 16-bit data bus and a 16-bit address bus. This processor has 8- and 16-bit instructions (it has 29 instructions). Short instructions contain shadow instructions, which effectively pack two 8-bit instructions into a 16-bit word. Long instructions have the Immediate field that short instructions do not. Sayeh uses its register file for most of its data instructions. Addressing modes of this processor also take advantage of this structure. Because of this, the addressing hardware of Sayeh is a simple one and the register file output is used in address calculations. Sayeh components that are used by its instructions include the standard registers such as the Program Counter, Instruction Register, the Arithmetic Logic Unit, and Status Register. In addition, this processor has a register file forming registers R0, R1, R2, and R3 as well as a Window Pointer that defines R0, R1, R2, and R3 within the register file.
The SystemC codes of Sayeh are shown in Figure 86.70 (header file) and Figure 86.71 (implementation file). The testbench is shown in Figure 86.72. The SystemC codes for memory and other parts are not demonstrated.
Our Coverage of SystemC
In this section, a brief overview of SystemC for system level design was given using several examples. An early hardware-oriented specification of hardware parts in a system can be achieved by this language. These hardware prototypes can be cosimulated with software parts of a system. Another important point in developing hardware prototypes, which are also mentioned in this section, is to define an efficient communication between different hardware parts of a system. The next section discusses efficient ways of designing communication protocols using TLM.
Comments
Post a Comment