Extending POLIS with User-Defined Data Types

Similar documents
ECL: A SPECIFICATION ENVIRONMENT FOR SYSTEM-LEVEL DESIGN

Codesign Framework. Parts of this lecture are borrowed from lectures of Johan Lilius of TUCS and ASV/LL of UC Berkeley available in their web.

Timing-Based Communication Refinement for CFSMs

Task Response Time Optimization Using Cost-Based Operation Motion

Task Response Time Optimization Using Cost-Based Operation Motion

Intellectual Property Re-use in Embedded System Co-design: an Industrial Case Study

Software Timing Analysis Using HW/SW Cosimulation and Instruction Set Simulator

Hardware/Software Co-design

RTL Coding General Concepts

A Graduate Embedded System Education Program

EE 249 Discussion: Synthesis of Embedded Software using Free- Choice Petri Nets

Outline. SLD challenges Platform Based Design (PBD) Leveraging state of the art CAD Metropolis. Case study: Wireless Sensor Network

High Level Software Cost Estimation

EE595. Part VIII Overall Concept on VHDL. EE 595 EDA / ASIC Design Lab

System-Level Modeling Environment: MLDesigner

Efficient Power Estimation Techniques for HW/SW Systems

Interface-Based Design Introduction

Embedded Software Generation from System Level Design Languages

Hardware and Software Representation, Optimization, and Co-synthesis for Embedded Systems

A case study on modeling shared memory access effects during performance analysis of HW/SW systems

C Language Programming

Digital Systems Design. System on a Programmable Chip

Data Types. Every program uses data, either explicitly or implicitly to arrive at a result.

The Future of the Ptolemy Project

HW/SW Co-design. Design of Embedded Systems Jaap Hofstede Version 3, September 1999

AL8259 Core Application Note

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL)

Synthesis of Software Programs for Embedded Control Applications

Hardware/Software Co-Design of an Avionics Communication Protocol Interface System: an Industrial Case Study

EMBEDDED SOPC DESIGN WITH NIOS II PROCESSOR AND VHDL EXAMPLES

Programmable Logic Devices II

COMPILER DESIGN. For COMPUTER SCIENCE

Part 2: Principles for a System-Level Design Methodology

Hardware/Software Codesign

Anand Raghunathan

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILING

A VARIETY OF ICS ARE POSSIBLE DESIGNING FPGAS & ASICS. APPLICATIONS MAY USE STANDARD ICs or FPGAs/ASICs FAB FOUNDRIES COST BILLIONS

Design Issues in Hardware/Software Co-Design

THE EUROPEAN DESIGN AND TEST CONFERENCE 1995 Paris,France 6-9 March 1995

A Unified Model for Co-simulation and Co-synthesis of Mixed Hardware/Software Systems

VHDL Essentials Simulation & Synthesis

Controller Synthesis for Hardware Accelerator Design

Motivation was to facilitate development of systems software, especially OS development.

EE 4755 Digital Design Using Hardware Description Languages

Observability Analysis of Embedded Software for Coverage-Directed Validation

Observability Analysis of Embedded Software for Coverage-Directed Validation

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

EEL 5722C Field-Programmable Gate Array Design

FPGA Resource and Timing Estimation from Matlab Execution Traces

EE382V: System-on-a-Chip (SoC) Design

A New Approach to Design

A Process Model suitable for defining and programming MpSoCs

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Embedded System Design

Introduction. Design Hierarchy. FPGA Compiler II BLIS & the Quartus II LogicLock Design Flow

Motivation was to facilitate development of systems software, especially OS development.

EE 4755 Digital Design Using Hardware Description Languages

HW/SW Co-Design for Embedded Systems

An Overview of the Ptolemy Project. Organizational

Special Topics for Embedded Programming

Platform Based Reconfigurable Hardware Exploration via Boolean Constraints

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

System Level Design with IBM PowerPC Models

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

EE382V: System-on-a-Chip (SoC) Design

Development of Integrated Hard- and Software Systems: Tasks and Processes

Development of Integrated Hard- and Software Systems: Tasks and Processes

Introduction to Electronic Design Automation. Model of Computation. Model of Computation. Model of Computation

System-level simulation (HW/SW co-simulation) Outline. EE290A: Design of Embedded System ASV/LL 9/10

Short Term Courses (Including Project Work)

COMPILER CONSTRUCTION FOR A NETWORK IDENTIFICATION SUMIT SONI PRAVESH KUMAR

Co-Design and Co-Verification using a Synchronous Language. Satnam Singh Xilinx Research Labs

ECOM 4311 Digital Systems Design

Interface Synthesis using Memory Mapping for an FPGA Platform. CECS Technical Report #03-20 June 2003

Digital Design Methodology

A flow chart is a graphical or symbolic representation of a process.

AL8253 Core Application Note

ECE 448 Lecture 15. Overview of Embedded SoC Systems

RYERSON POLYTECHNIC UNIVERSITY DEPARTMENT OF MATH, PHYSICS, AND COMPUTER SCIENCE CPS 710 FINAL EXAM FALL 96 INSTRUCTIONS

ESL design with the Agility Compiler for SystemC

Transaction-Level Modeling Definitions and Approximations. 2. Definitions of Transaction-Level Modeling

A Brief Survey of the Recent Developments in Hardware-Software Codesign

DESIGN STRATEGIES & TOOLS UTILIZED

Graphical System Design. David Fuller LabVIEW R&D Section Manager

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

Semantic actions for declarations and expressions

TLL5000 Electronic System Design Base Module

INTRODUCTION TO VHDL. Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET

Sunburst Design - Comprehensive SystemVerilog Design & Synthesis by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

A New Approach to Execution Time Estimations in a Hardware/Software Codesign Environment

SpecC Methodology for High-Level Modeling

VHDL simulation and synthesis

Semantic actions for declarations and expressions. Monday, September 28, 15

Alberto Sangiovanni-Vincentelli, Shankar Sastry. University of California at Berkeley. Berkeley, CA 94720

Hardware Software Co-design and SoC. Neeraj Goel IIT Delhi

A Hardware/Software Co-design Flow and IP Library Based on Simulink

Propagating Constants Past Software to Hardware Peripherals in Fixed-Application Embedded Systems

Transcription:

Extending POLIS with User-Defined Data Types EE 249 Final Project by Arvind Thirunarayanan Prof. Alberto Sangiovanni-Vincentelli Mentors: Marco Sgroi, Bassam Tabbara

Introduction POLIS is, by definition, a co-design environment for system design of control dominated embedded systems. It s used for exploration of system architectures and function architecture codesign. The co-design environment of POLIS is used to create mixed systems, such as those involving both hardware and software components. The design process itself includes various steps of design including initial user specification of the system, final synthesis of the system design, as well as estimation and verification of the design. The goal of this project was to modify the POLIS tool, extending it with support for userdefined data types. Since the POLIS tool functions at several levels of abstraction, beginning with user interaction at the top levels, and synthesizable output at the bottom, this support had to be incorporated through each stage of the design. Design Flow in POLIS When designing a system in POLIS, there are two paths to follow: the simulation path and the synthesis path. Simulation allows a design to be tested and explored thoroughly before committing it to the final synthesis path. This allows the user to test various configurations and decide on an optimum design to meet the system objectives. The user develops the initial specification for the embedded system in a high level language. POLIS currently uses Esterel to write each module of the specification. The modules are then compiled into POLIS SHIFT files. SHIFT is the internal POLIS Software Hardware Intermediate FormaT used to specify the model of computation, a set of interacting extended 1

finite state machines, or CFSMs, representing each module, and the CFSM associated with it as files. Simulation Path Once the initial specification is completed and the design compiled into the SHIFT files, the design can then be read into POLIS. The internal S-graph representation of the design is then created and optimized. At this point, the user chooses a target microprocessor to eventually run the software in the final implementation. The user can also run estimation tools, using pre-existing parameter files that describe processor characteristics, to get an idea of the code size and execution speed of the resulting software. Finally, POLIS generates the C-code and Ptolemy code for each module in the design. The generated module code can then be read into a simulator like Ptolemy outside of POLIS to do a functional and performance simulation of the system. This simulation includes validation to analyze a design s performance and efficiency. Within the simulation, the user can also examine the system interconnections and explore the effects of changing design parameters. The user can also re-simulate the system after trying different ways to re-partition the design, choosing a hardware or software implementation for various parts of the system to determine and evaluate performance. Synthesis Path Once the user is satisfied with the simulation, the design can then be read back into POLIS. At this stage, the partitioning decided upon in the simulation stage is actually implemented. 2

For the parts of the design that will be implemented in hardware, POLIS is used to translate and optimize the internal format into a synthesizable hardware format like VHDL or BLIF (Berkeley Logic Interchange Format). These are the netlist files that actually describe the hardware implementation of the FSMs. For the parts of the design that will be implemented in software, POLIS is again used to create and optimize the internal S-graph representation of the design. Similar to the simulation phase, POLIS generates the C-code for each module. POLIS also generates the real time operating system (RTOS) code that will be used on the target microprocessor to run the software portion of the design. The final step in the design flow involves generating the actual hardware and software implementation. At this stage, the user chooses their target hardware, like a Xilinx FPGA, for example. The netlist files generated by POLIS are then mapped onto the hardware. The user also downloads the RTOS and the generated software code onto the target microprocessor or microcontroller. Finally, the two partitions are merged to produce a synthesized embedded system [1]. Project Description One of the motivating factors behind this project is the Two Chip Intercom (TCI) project at the Berkeley Wireless Research Center (BWRC). The intercom project is aimed at creating a network of interconnected remote units and a base station all talking to each other. POLIS is one of the tools used to create the system design for the intercom project, along with Felix VCC. The advantage of using POLIS over VCC is its synthesis path directly to the hardware level. Unlike VCC, POLIS can be used to generate the actual hardware for each module or 3

CFSM. But one of the major stumbling blocks to using POLIS has been the lack of internal support for any user-defined data types. The events used for communication among modules in POLIS are currently capable of carrying data of integer types only. In the case of the intercom project, this is inherently unsuitable. Much of the necessary communication between modules involves data structures that have several fields of information. Using the current implementation of POLIS, the design would involve sending each field individually, then waiting for some form of acknowledgement from the receiving module before transmitting the next field. There is limited support for user-defined types within POLIS [1]. However, this support is limited strictly to the software portions of the design. POLIS achieves this in one of two ways. In the case of numeric non-integer types, such as floats, POLIS allows the user to declare the new type as a special integer at the initial Esterel level. The environment then relies on the implicit conversions and casts provided by the C compiler to allow them to be used correctly. In the case of more involved data types, such as structs and unions, the declarations of the new C type and the type definitions can be entered into an external.c and.h file. These external files are used at simulation time and when the final executable is created for the target processor. While the second method does allow for limited data type support, it still does not allow userdefined types to be used in communication between modules. They can only be used internally within the module they are declared in. Besides, both of these are software-only solutions. Neither of them addresses the hardware synthesis path. This is the driving factor behind this project, namely to come up with an implementation to include support for user-defined data types in the SHIFT files, and then extend this support down to the synthesis levels. 4

Proposed Solution The following diagram shows a graphical overview of the design flow in POLIS. Esterel Auxiliary file SHIFT HW SW Figure 1: POLIS synthesis design flow One solution to implementing user-defined data type support in POLIS is to allow the user to enter type definitions and declarations at the initial specification level. Given the limited support for user-defined types, POLIS uses information in an auxiliary file to determine bit allocation for the new type. The auxiliary file is also the location where a numeric non-integer type, like a float, is re-defined as a special case of an integer. The user can also define new types here that are subranges of the existing integer data type. The idea is to let the user enter the type information in this auxiliary file in a C like format. This information would then be processed by the design environment, converting the information into a form accessible by POLIS at all the levels of the design without the user having to deal with the details of the actual implementation of the type. For example, given a 5

typical struct, like a complex number that has two fields, a real integer and an imaginary integer, the entry in the aux file would resemble the corresponding C construct as shown below. File.aux. typedef struct { int re; int im; } cplx; Figure 2: Type information in aux file When the initial Esterel specification files are compiled into SHIFT, this information can then be added to the SHIFT files as well. The current methods provide no support for data type information to be passed into the hardware synthesis path because they bypass the SHIFT files entirely. The external.c and.h file that currently contain the type information are used directly when generating the simulation files or the synthesized software executable. In the case of numeric integer or non-integer types, the SHIFT files currently carry information about how many bits an instance of the data type occupies. For other user-defined types, however, there is no information in the SHIFT files as shown in Fig 3. File.shift.net net_sender.inputs *i1.outputs *o1(o1).nb o1 0 user-defined....end Figure 3: Current SHIFT implementation 6

By adding the type information into the SHIFT files, POLIS can then extend the userdefined data type support through SHIFT down to the hardware synthesis levels. The modified SHIFT file would look similar to Fig 4. File.shift.net net_sender.type int 16.type struct cplx re im.dt re int.dt im int.inputs *i1.outputs *o1(o1).dt o1 cplx....end Figure 4: Modified SHIFT file The new information added into the SHIFT file describes the new data type, and later declares an instance of the type. With this information now available in the SHIFT file, it is possible to translate the data types into corresponding ones in hardware. For instance, the struct data type might map onto the record construct in VHDL. Current Work The first task in implementing user-defined data type support in POLIS involved testing the changes implemented by Luciano Lavagno. His changes to POLIS and Ptolemy allow the use of the external type declaration and definition files to actually communicate the user-defined 7

types between modules. Again, this is still a software only solution. But it involved implementing a simple sender receiver network as shown below using Esterel. y1 i1 signal Sender o1 cplx Receiver integers y2 Figure 5: Sender/Receiver network The sender module awaits the signal i1, then emits the event o1, which carries data of the cplx user-defined type. The receiver module awaits the o1 event, then extracts the fields and emits them as the two integers, y1 and y2. The design was first simulated in Ptolemy, then compiled into a synthesized software executable. Since the implementation did not support hardware, the entire design was partitioned into software. The real time operating system simulator is shown below, running the software for the sender and receiver modules. Upon the input of the i1 signal, the system outputs y1 and y2, with the values sent to the receiver from the sender. Figure 6: OS simulator running Sender/Receiver software 8

The next step involved the implementation details of the translation from the user edited aux file to the SHIFT files. This meant first deciding on the translation format from the Esterel files to the SHIFT files, and then editing the aux file parser functions to recognize the new user additions and the writeshift functions to correctly translate them to SHIFT. The format of the additions to the SHIFT files was chosen to be similar to existing SHIFT syntax so that the readshift functions that would be used later in the POLIS design flow could easily parse the generated SHIFT files. Conclusion The changes to the aux parsing routines have been completed, but the SHIFT writing routines are still being modified. After the changes to the aux reader and SHIFT writer functions are implemented, there are a few other steps left in making POLIS truly support user-defined data types. First, the external type definition files that are currently hand written by the user should be automatically generated from the information in either the aux or the SHIFT files. This would restrict the user s involvement in the system specification to only the top levels of the design, thus enabling a top down design methodology. Second, the details for the translation from the SHIFT files to the hardware netlist format need to be defined and implemented. And finally, the functions needed to access and manipulate the data types, or their fields in the case of complex types like structs and unions, need to be determined, and generated automatically as a library for use at the synthesis levels. Once POLIS has been modified with these changes to support user-defined data types, the designs for the TCI project can then be simulated and synthesized. 9

References [1] F. Balarin, et al. POLIS User s Manual. ftp://ic.eecs.berkeley.edu/pub/hwsw/polis_man.0.4.ps.gz, UC Berkeley, November 1999. 10