Embed Design
Embed Design
Title:
Key Words
Authors:
Carsten Nitsch (principal author) Karlheinz Weiss Thorsten Steckstor FZI Embedded System Design Group
Address:
Forschungszentrum Informatik (FZI) at the University of Karlsruhe Haid-und-Neu-Str. 10-14 76131 Karlsruhe Germany Phone: ++49-721-9654-464 Fax: ++49-721-9654-409 E-mail: [email protected], [email protected], [email protected]
FZI and University of Tbingen Lehrstuhl fr Technische Informatik Am Sand 13 72076 Tbingen Germany Phone: ++49-7071-29-75482 Fax: ++49-7071-29-5062 E-mail: [email protected]
Abstract
This paper presents a new approach to the design of embedded systems. Due to restrictions that state-ofthe-art methodologies contain for hardware/software partitioning, we have developed an emulation based method using the facilities of reconfigurable hardware components, like Field Programmable Gate Arrays (FPGA). Our own emulation environment called the SPYDER tool set was used; it is best suited for the emulation of hardware designs for embedded systems.
specification specification
1 Introduction
Most of today s existing technical applications are controlled by so-called embedded systems1. Many different application areas which demands their own specific embedded system architecture exist. Therefore, a common definition of embedded systems cannot find wide acceptance.[1] In this domain, an embedded system architecture consists of an application-specific hardware part, which interacts with the environment. At the same time, an application specific software part runs on a microcontroller. In the last few years, rapid progress in microelectronic technology has reduced component costs, while simultaneously increasing the complexity of microcontrollers and application specific hardware. Nevertheless, developers of embedded systems have to design low cost, high performance systems and reduce the timeto-market to a minimum. The most important taste a specification must complete is the partitioning of the system into 2 parts.The first part is the software which runs on a microcontroller. Powerful on-chip features, like data and instruction caches, programmable bus interfaces and higher clock frequencies, speed up performance significantly and simplify system design. These hardware fundamentals allow Real-time Operating Systems (RTOS) to be implemented, which leads to the rapid increase of total system performance and functional complexity. Nevertheless, if fast reaction times must be guaranteed, the software overhead due to task switching becomes a limiting performance factor and application-specific hardware must be implemented. This can be done by developing ASICs. Due to the decreasing life cycles of many high-end electronic products, there is a gap between the enormous development costs and limited reuse of an ASIC. In the last few years, so-called IPCore components became more and more popular. They offer the possibility of reusing hardware components in the same way as software libraries. In order to create such IP-Core components, the system designer uses Field Programmable Gate Arrays instead of ASICs. The designer still must partition the system design into a hardware specific part and a microcontroller based part.
2 mile stones 3
implementation implementation
4
SW-architecture SW-architecture
5
implementation implementation
6
end
This work was supported in part with funds from the Deutsche Forschungsgemeinschaft under reference number 3221040 within the priority program Design and Design Methodology of Embedded Systems.
sible to start software development before the design and test of the hardware architecture has finished. Software developers have to wait until a bug-free hardware architecture is available. This time (and cost) intensive delay is graphically displayed in Figure 1 between milestone two and four. Once again, the disadvantages of this methodology are: complete redesign in case of design faults, reduced degrees of freedom in selection of components (due to reuse of knowledge and experiences) and time delays. Nonetheless, the hardwarefirst approach is still a valueable approach to system design with low or medium complexity, because the initial step of partitioning is less time-consuming than in other approaches. For high-end embedded systems new methods are needed to recognize errors during an early phase of the design process.
HW/SWHW/SWPartitioning Partitioning Interface Interface Synthesis Synthesis System System Integration Integration Hardware Hardware Synthesis Synthesis
all hardware and software components together and evaluates if this composition complies with the system specification, done in step one. If not, the hardware/software partitioning process starts again. An essential goal of today s research is to find and optimize algorithms for the evaluation of a partitioning. Using these algorithms, it is theoretically possible to implement hardware / software co-design as an automated process. Due to the algorithm-based concept of hardware/software co-design there are many advantages to this approach. The system design can be verified and modified at an early stage in the design flow process. Nevertheless, there are some basic restrictions which apply to the use of this methodology: Insufficient knowledge: As described in this section, hardware/software codesign is based on the formal description of the system and a decomposition of its functionality. In order to commit to real applications, the system developer has to use available components, like IP-cores. Using this approach, it is necessary to describe the behavior and the attributes of these components completely. Due to the blackbox nature of IP-cores, this is not possible in all cases. Degrees of freedom: Another of the building blocks of hardware/software codesign is the unrestricted substitution of hardware components by software components and vice versa. For real applications, there are only a few degrees of freedom in regards to the microcontroller, but for ASIC or IP-core components, there is a much greater degree of freedom.This is due to the fact that there are many more IPcores than microcontrollers which can be used for dedicated applications, available. Due to the limitations that have been mentioned, the hardware-software co-design approach is not suitable for some design projects, like very complex systems used in automotive, aeroplane or space technologies.
technologies. Our design methodology tries to benefit from the advantages of rapid system design, without the disadvantages of the restrictions described in the previous section. The methodology can be described as a two-stage process: Stage One - System design by evaluation: The basic goal of this stage is the evaluation of components that can be used in the system design. In contrast to the classical hardwarefirst approach, this procedure is not restricted to known or already used hardware or software components. All potentially available components will be analyzed using criteria like functionality, technological complexity, or testability. The source of the criteria used can be data sheets, manuals, etc. The result of this stage is a set of components for potential use, together with a ranking of them. Stage Two: Validation by Emulation: Although stage one is based on functional and non-functional criteria, the knowledge and experience of the system designer still exerts a large influence on decisions. In order to avoid fatal design errors, stage two validates the decisions made in stage one. The basic methodology for this validation is system emulation. In contrast to other approaches like computer simulation, emulation can check serious problems, like real time behavior. It is highly essential to verify the criteria used in stage one, for example, the correctness of data sheet specifications. functional specification library initial partitioning and preselection
tion. After these introductory steps, the first stage of our methodology follows. The evaluation and selection process focuses on a set of criteria, like testability. The output is a set of components which satisfy such special criteria in the best possible manner. Refer to [6] for a detailed description of this process. After establishing the criteria, the already described validation stage follows. Only if a component passes this test phase, it will be used in the final system design.
functionality
number of pins
bus interface Software Partition Hardware Partition Stage Two: Emulation Stage Two: Emulation
technology
initializing
testability
pass ? yes
pass ? yes
no
no System Integration
driver availibility
final ranking
ASIC integration
System Test
controller an the newly added component. In regards to the contents of this chapter, it is possible to construct a ranking system to choose the most suitable component using the criteria businterface. The evaluation of the other criteria, like initialization, testability, the complexity of adding a component to a printed circuit board, etc., follows a analogical way. For detailed information refer to [6].
external download
the package type BG432. Therefore, FPGA chips with a range of XCV300 up to XCV800 can be implemented. The architecture of SPYDER-VIRTEX-X2 is depicted in Figure 5. The Virtex FPGA is closely coupled via a dedicated PCIInterface-chip (PLX9080) to a PC. This feature enables both simple downloading bit images onto the Virtex chip and communication between the PC and the application operating on the Virtex FPGA via the PCI-bus, which provides a high performance bandwidth. The communication makes it possible to evaluate a running application, e.g., a dedicated IP-Core, before its integration into an embedded system. Using the PC with its entire periphery, (e.g. , display, hard disk, keyboard) instead of a specialized micro controller makes the evaluation process much easier. Two powerful extension headers make it possible to connect the Virtex FPGA with further application specific hardware units, e.g., a micro controller and its core environment, as well as to assemble a complete embedded system architecture for emulation purposes. These ports are compatible with the other tools of the SPYDER-System mentioned above via backplane, which provides different micro-controller types. A further significant feature is the ability to connect all on-board signals via up to nine high density connectors to a logic analyzer. These connectors provide a powerful support during the debugging process. A power supply unit provides the Virtex FPGA with the necessary voltages: VCore = 2.5V with a current of up to 10 A and VIO with a current of up to 4 A. Two current measurement instruments can be connected inside the different current path systems for ICore and IIO to measure the power consumption. An arbiter controls the local side of the PCI-bus between PLX9080 and three different download modes, which can be summarized as follows: download via PCI-bus, set Virtex in slave mode download via external master, e.g. a micro controller-unit, set Virtex in slave mode download via serial EEPROMs, set Virtex in master mode, used for stand-alone mode Additionally, two on board 128kx32 SSRAM-devices enable the emulation of applications, which need a large extension memory for, such things as graphic or large filter applications. For more information, refer to the corresponding user manual and data sheet in [2].
PCI-SLOT
PCI-Interface
PLX9080 30 32
Xilinx Virtex-FPGA
XCV300..XCV800 86 BG432
power supply
SSRAM 128kx32
configuration EEPROM
3,3V/4A 2,5V/10A
The new high performance SPYDER-CORE-P2 board has been created for rapid, cost-effective development of software and hardware of the embedded system, mainly in the spheres of industrial automation, communication and automotive industries. The board is designed to run, test and evaluate application-specific software components, as well as software developed by the systems designer company itself or third party IP-cores. Referring to our design methodology shown in Figure 3, SPYDER-CORE-P2 covers the software portion of the design flow process. Figure 6 shows the basic system architecture of the board. The core part is based on a novel 32-bit Hitachi-SH3 RISC micro controller with an optional on-chip Digital Signal Processing (DSP) module. Together with 1 MB of EPROM bootspace, 4 MB SDRAM and 1 MB of flash memory, the system offers all features to run state-of-the-art software components. Due to the availability of a VxWorks board support package, a wide range of RTOS based software can be tested. SPYDER-CORE-P2 offers the most important interfaces to communicate with the surrounding environment. A standard serial interface, a CAN compliant controller and an ethernet 10Base2 / 10BaseT interface are available. This ethernet feature allows the integration of the board in a fast ethernet-based development environment, for example the Tornado Toolkit.1 Two VG96 extension headers can be used to integrate additional hardware components. This feature allows the addition of application specific hardware, like additional memory, graphic controllers or other I/O facilities. All bus signals can be put through logic analyzer measurement by connectors of mictor type. Together with SPYDER-VIRTEX or separately, SPYDERCORE-P2 can be efficiently used in increasingly wider application areas. The board has been carefully optimized for high performance and low power consumption. It contains universal communication facilities which enable its usage in great variety of operational and development configurations. Supporting innovative design approaches and tools, SPYDER-CORE-P2 allows development, modification and the testing of new designs in shorter time frames, achieving high-quality characteristics.
nological and testing problems for ballgrid chips with hundreds of pins, this approach is not suitable as emulation environment, which could be put into common use. 2. Increase the virtual gate capacity of the FPGA by using an approach called run-time-reconfiguration (RTC). Run-time reconfiguration is a methodology focusing to a temporal partitioning of a hardware design. The result of this process is a set of time-exclusive functional components. Only one of these components will be active at the time t0. The goal of RTC is to load design parts on demand. Using RTC allows the implementation of designs larger than the physical gate capacity of the FPGA, because not all parts are active at the same time. One important restriction of RTC is the necessity of the existence of time exclusive design components. 3. design a scalable emulation system The new generation of our emulation system uses the third variant. Although the existing SPYDER-VIRTEX System can be scaled by connecting up to five boards by a backplane, there are some limitations regarding the configuration of the FPGAs. To make the FPGAs in-system-programmable, it is necessary to connect the boards with the PCI bus of a host PC. Due to the use of a PC there are restrictions in scalability (number of PCI slots). When dealing with automotive environments, aircraft etc., developers often have to test an embedded system without any additional equipment such as host PCs. They need a scalable and powerful emulation environment that also works in stand alone mode. Considering this we have decided to develop a scalable emulation platform with a TCP/IP based interface for configuration and communication.
scalable in size
backplanes 86 86
6 IV IV
86
III
III
86 86 86 86 86
II II I I
Internet
4.1 Scaleability
In order to emulate an embedded system design, it is necessary to test several components and their communication with each other at the same time. Although the SPYDER System is highly qualified for validating hardware or IP-core components, there is a limitation given by the complexity of the FPGA chip used. In principle there are three ways to remove this barrier: 1. Use FPGAs with a higher gate density: This solution can be used for special designs needing a fixed number of gates for emulation. Due to increasing cost and tech1 Tornado
are a ftp server running on the real-time operating system VxWorks and a flash based DOS file system. Both the server and the flash drivers were developed by us to offer an easy-touse reconfiguration environment. The software architecture is shown in Figure 8.
Flash Memory
Flash Driver, DOS file system
FPGA device. This feature offers the ability to reconfigure FPGAs simply by using drag and drop. Due to the use of the FTP protocol, the developer can work with any host architecture he wants, such as windows based PCs as well as Unix workstations or Macintosh computers.
SDRAM
RAM Driver, DOS file system
Ethernet
Ethernet Driver, TCP/IP stack
Application
FPGA Driver
FPGA
5 Results
After the introduction of an emulation-based design methodology and the SPYDER tool set, which was developed by our
team, it is necessary to document our results and record our experiences with the system. The past three years were marked by the development of innovative embedded systems in the area of industrial automation, communication and automotive. This was done in cooperation with several companies in which these embedded systems were used for industrial applications.
by connecting it to a standard logic analyzer. It was possible to detect some tricky bugs and to fix them. Because the emulation system itself was tested, developers can focus on debugging their own applications, without regard for the problems of newly available prototypes. To gain from the benefits of an emulation-based design methodology, our partner company has decieded to use this approach in the future by using the SPYDER tool set.
6 Summary
We started with the introduction of state-of-the-art methodologies for designing embedded systems, focussing on hardware-software partitioning. We have shown the basic restrictions of these classical approaches. Our solution to overcome these restriction is a new design methodology, which consists of two stages: preselection of available components validation by emulation The major advantages of our methodology is a parallel design flow for hardware and software, rapid prototyping and the avoidance of dangerous design risks. We have developed an emulation system called SPYDER to use our approach with real system designs. The methodology and the SPYDER tool set are successfully applied in industrial OEM development projects. Our future work will focus on the internet integration of our emulation environment. The basic goal of our research activities is a world wide distributed development environment as introduced in section 4.2.
References
[1] W. Wolf: Hardware-Software Co-Design of Embedded Systems Proceedings of the IEEE, Vol. 82, No.7, July 1994 I. Katchan, C. Oetker, T. Steckstor, K. Wei: SPYDERVIRTEX-X2 user manual, version 1.0, http://www.fzi.de/ sim/spyder.html, september 1999. K. Wei, T. Steckstor, C. Nitsch, W. Rosenstiel: Performance Analysis of Real-Time-Operation Systems by Emulation of an Embedded System. 10th IEEE International Workshop on Rapid System Prototyping (RSP), Clearwater, Florida, USA, 1999. K. Weiss, T. Steckstor, W. Rosenstiel: Exploiting FPGAFeatures during the Emulation of a Fast Reactive Embedded System. ACM/SIGDA International Symposium on Field Programmable Gate Arrays (FPGA), Monterey, CA, USA, 1999 K. Weiss, C. Oetker, I. Katchan, T. Steckstor, W. Rosenstiel: Power Estimation Approach for SRAM-based FPGAs. International Symposium on Field Programmable Gate Arrays (FPGA), USA 2000 K. Wei: Architekturentwurf und Emulation eingebetteter Systeme. Ph-D. Thesis, University of Tbingen 15.Oktober 1999
[2]
[3]
[4]
[6]
[7]
A. Hergenhan, C. Weiler, K. Wei, W. Rosenstiel: Value-Added Services in the Industrial Automation. ACoS 98, Lisabon Portugal, April 1998