NEC startWARE-GHS-Ravin-E User manual

User’s Manual
startWARE-GHS-Ravin-E
Ravin-E Add-on Board for
startWARE-GHS-VR4131 and
startWARE-GHS-VR4133
Document No. U17316EE1V0UM00
Date Published September 2004
NEC Corporation 2004
Printed in Germany

2Preliminary User’s Manual U17316EE1V0UM00
NOTES FOR CMOS DEVICES
1 PRECAUTION AGAINST ESD FOR SEMICONDUCTORS
Note:
Strong electric field, when exposed to a MOS device, can cause destruction of the gate oxide and
ultimatelydegradethedeviceoperation. Stepsmustbetakentostopgenerationofstaticelectricity
as much as possible, and quickly dissipate it once, when it has occurred. Environmental control
must be adequate. When it is dry, humidifier should be used. It is recommended to avoid using
insulatorsthateasilybuildstaticelectricity. Semiconductordevicesmustbestoredandtransported
in an anti-static container, static shielding bag or conductive material. All test and measurement
tools including work bench and floor should be grounded. The operator should be grounded using
wriststrap. Semiconductordevicesmust notbetouchedwithbarehands. Similarprecautions need
to be taken for PW boards with semiconductor devices on it.
2 HANDLING OF UNUSED INPUT PINS FOR CMOS
Note:
No connection for CMOS device inputs can be cause of malfunction. If no connection is provided
totheinput pins, it is possible that aninternalinputlevelmaybegenerated due to noise, etc., hence
causingmalfunction. CMOSdevicesbehave differentlythanBipolarorNMOSdevices. Inputlevels
of CMOS devices must be fixed high or low by using a pull-up or pull-down circuitry. Each unused
pin should be connected to V
DD
or GND with a resistor, if it is considered to have a possibility of
being an output pin. All handling related to the unused pins must be judged device by device and
related specifications governing the devices.
3 STATUS BEFORE INITIALIZATION OF MOS DEVICES
Note:
Power-on does not necessarily define initial status of MOS device. Production process of MOS
does not define the initial operation status of the device. Immediately after the power source is
turned ON, the devices with reset function have not yet been initialized. Hence, power-on does
not guarantee out-pin levels, I/O settings or contents of registers. Device is not initialized until the
reset signal is received. Reset operation must be executed immediately after power-on for devices
having reset function.

3
Preliminary User’s Manual U17316EE1V0UM00
•The information in this document is current as of 14.09.2004. The information is subject to change
without notice. For actual design-in, refer to the latest publications of NEC Electronics data sheets or
data books, etc., for the most up-to-date specifications of NEC Electronics products. Not all products
and/or types are available in every country. Please check with an NEC sales representative for
availability and additional information.
•No part of this document may be copied or reproduced in any form or by any means without prior
written consent of NEC Electronics. NEC Electronics assumes no responsibility for any errors that
may appear in this document.
•NEC Electronics does not assume any liability for infringement of patents, copyrights or other
intellectual property rights of third parties by or arising from the use of NEC Electronics products
listed in this document or any other liability arising from the use of such NEC Electronics products.
No license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual
property rights of NEC Electronics or others.
•Descriptions of circuits, software and other related information in this document are provided for
illustrative purposes in semiconductor product operation and application examples. The incorporation
of these circuits, software and information in the design of customer's equipment shall be done
under the full responsibility of customer. NEC Electronics no responsibility for any losses incurred by
customers or third parties arising from the use of these circuits, software and information.
•While NEC Electronics endeavors to enhance the quality, reliability and safety of NEC Electronics
products, customers agree and acknowledge that the possibility of defects thereof cannot be eliminated
entirely. To minimize risks of damage to property or injury (including death) to persons arising from
defects in NEC Electronics products, customers must incorporate sufficient safety measures in their
design, such as redundancy, fire-containment and anti-failure features.
•NEC Electronics products are classified into the following three quality grades: “Standard”, “Special”
and “Specific”.
The "Specific" quality grade applies only to NEC Electronics products developed based on a customer-
designated “quality assurance program” for a specific application. The recommended applications of
NEC Electronics product depend on its quality grade, as indicated below. Customers must check the
quality grade of each NEC Electronics product before using it in a particular application.
"Standard": Computers, office equipment, communications equipment, test and measurement
equipment, audio and visual equipment, home electronic appliances, machine tools,
personal electronic equipment and industrial robots.
"Special": Transportation equipment (automobiles, trains, ships, etc.), traffic control systems,
anti-disaster systems, anti-crime systems, safety equipment and medical equipment
(not specifically designed for life support).
"Specific": Aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems,
life support systems and medical equipment for life support, etc.
The quality grade of NEC Electronics products is “Standard” unless otherwise expressly specified in
NEC Electronics data sheets or data books, etc. If customers wish to use NEC Electronics products in
applications not intended by NEC Electronics, they must contact NEC Electronics sales representative
in advance to determine NEC Electronics 's willingness to support a given application.
Notes: 1. " NEC Electronics" as used in this statement means NEC Electronics Corporation and
also includes its majority-owned subsidiaries.
2. " NEC Electronics products" means any product developed or manufactured by or for
NEC Electronics (as defined above).
M8E 02.10

4Preliminary User’s Manual U17316EE1V0UM00
Regional Information
Some information contained in this document may vary from country to country. Before using any NEC
product in your application, please contact the NEC office in your country to obtain a list of authorized
representatives and distributors. They will verify:
• Device availability
Ordering information
Product release schedule
Availability of related technical literature
Development environment specifications (for example, specifications for third-party tools and
components, host computers, power plugs, AC supply voltages, and so forth)
Network requirements
In addition, trademarks, registered trademarks, export restrictions, and other legal issues may also vary
from country to country.
NEC Electronics America Inc.
Santa Clara, California
T
el: 408-588-6000
800-366-9782
Fax: 408-588-6130
800-729-9288
NEC Electronics (Europe) GmbH
Duesseldorf, Germany
T
el: 0211-65 03 1101
Fax: 0211-65 03 1327
Sucursal en España
Madrid, Spain
Tel: 091- 504 27 87
Fax: 091- 504 28 60
Succursale Française
Vélizy-Villacoublay, France
Tel: 01-30-67 58 00
Fax: 01-30-67 58 99
NEC Electronics Hong Kong Ltd.
Hong Kong
Tel: 2886-9318
Fax: 2886-9022/9044
NEC Electronics Hong Kong Ltd.
Seoul Branch
Seoul, Korea
Tel: 02-528-0303
Fax: 02-528-4411
NEC Electronics Singapore Pte. Ltd.
Singapore
Tel: 65-6253-8311
Fax: 65-6250-3583
NEC Electronics Taiwan Ltd.
Taipei, Taiwan
Tel: 02-2719-2377
Fax: 02-2719-5951
Filiale Italiana
Milano, Italy
Tel: 02-66 75 41
Fax: 02-66 75 42 99
Branch The Netherlands
Eindhoven, The Netherlands
Tel: 040-244 58 45
Fax: 040-244 45 80
Branch Sweden
Taeby, Sweden
Tel: 08-63 80 820
Fax: 08-63 80 388
United Kingdom Branch
Milton Keynes, UK
Tel: 01908-691-133
Fax: 01908-670-290
•
•
•
•
•

5
User’s Manual U17316EE1V0UM00
Preface
Readers This manual is intented for users who want to understand the functions of the
startWARE-GHS-Ravin-E.
Purpose This manual presents the hardware manual of startWARE-GHS-Ravin-E.
Organization This system specification describes the following sections:
•Pin function
•CPU function
•Internal peripheral function
•Flash memory
Legend Symbols and notation are used as follows:
Weight in data notation : Left is high-order column, right is low order column
Active low notation : xxx (pin or signal name is over-scored) or
/xxx (slash before signal name)
Memory map address: : High order at high stage and low order at low stage
Note : Explanation of (Note) in the text
Caution : Item deserving extra attention
Remark : Supplementary explanation to the text
Numeric notation : Binary . . . XXXX or XXXB
Decimal . . . XXXX
Hexadecimal . . . XXXXH or 0x XXXX
Prefixes representing powers of 2 (address space, memory capacity)
K (kilo) : 210 = 1024
M (mega) : 220 = 10242= 1,048,576
G (giga) : 230 = 10243= 1,073,741,824

6User’s Manual U17316EE1V0UM00

7
User’s Manual U17316EE1V0UM00
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Package Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3 Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 2 Board Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.1 Summary of Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Picture of startWARE-GHS-Ravin-E Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 3 Functional Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1 Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 4 Software Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.1 Ravin-E Graphics Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 Display of PNG Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3 Bin2C: Converting Binary Files to C-Source Code. . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Demonstration Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4.1 Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
4.4.2 Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
4.4.3 Datalogger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
4.4.4 HW-Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Chapter 5 Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1 Description of Connectors and Jumpers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.1.1 Host Connector CN1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
5.1.2 Video Connectors CN8 and CN9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.1.3 VGA Connector CN12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.1.4 Digital video output connector CN13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.1.5 JTAG interface connector CN14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.1.6 Disable Video Processor with JP1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.1.7 Select CS input with JP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.1.8 Select digital video signal voltage with JP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
5.1.9 Enable DOTCLK for VGA interface with JP4 . . . . . . . . . . . . . . . . . . . . . . . . . . .33
5.2 Address Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
5.3 startWARE-GHS-Ravin-E Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.4 PCI Adapter Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

8User’s Manual U17316EE1V0UM00

9
User’s Manual U17316EE1V0UM00
List of Figures
Figure 2-1: startWARE-GHS-Ravin-E Board................................................................................. 16
Figure 3-1: startWARE-GHS-Ravin-E Block Diagram ................................................................... 17
Figure 5-1: Board Outline and Component Placement.................................................................. 23
Figure 5-2: Host Connector CN1 ...................................................................................................24
Figure 5-3: Video Connectors CN8 and CN9 ................................................................................ 27
Figure 5-4: VGA Connector CN12.................................................................................................28
Figure 5-5: Digital video output connector CN13........................................................................... 29
Figure 5-6: JTAG interface connector CN14 ................................................................................. 31
Figure 5-7: Jumper JP1 ................................................................................................................. 32
Figure 5-8: Jumper JP2 ................................................................................................................. 32
Figure 5-9: Jumper JP3 ................................................................................................................. 33
Figure 5-10: Jumper JP4 ................................................................................................................. 33
Figure 5-11: Ravin-E........................................................................................................................ 35
Figure 5-12: Connectors.................................................................................................................. 36
Figure 5-13: VME-PCI Adapter........................................................................................................ 37

10 User’s Manual U17316EE1V0UM00

11
User’s Manual U17316EE1V0UM00
List of Tables
Table 3-1: Operating Currents under typical operating conditions .................................................. 18
Table 5-1: Technical Data of the Ravin-E Board............................................................................. 23
Table 5-2: Host Connector CN1 ......................................................................................................24
Table 5-3: VGA Connector CN12....................................................................................................28
Table 5-4: Digital video output connector CN13.............................................................................. 30
Table 5-5: JTAG interface connector CN14..................................................................................... 31
Table 5-6: Jumper Settings with JP2...............................................................................................32
Table 5-7: Jumper Settings with JP3...............................................................................................33

12 User’s Manual U17316EE1V0UM00

13
User’s Manual U17316EE1V0UM00
Chapter 1 Introduction
1.1 System Requirements
1.2 Package Contents
Please verify that you have received all parts listed in the package contents list attached to the
startWARE-GHS-Ravin-E package. If any part is missing or seems to be damaged, please contact the
dealer from whom you purchased your startWARE-GHS-Ravin-E.
Note: Updates to this User Manual, additional documentation and/or utilities for
startWARE-GHS-Ravin-E, if available, may be downloaded from the NEC WEB page(s):
http://www.nec.de/support.
1.3 Related Documents
Ravin-E Preliminary Data Sheet, NEC Doc. Number S15521EJ1V0DS00
startWARE-GHS-VR4131 User’s Manual, NEC Doc. Number U16417EE1V0UM00
startWARE-GHS-VR4133 User’s Manual, NEC Doc. Number U16916EE2V0UM00
Application Note: Operation of Ravin-E with V850 Devices
NEC Doc. Number S17194EE1V0AN00
Motherboard:startWARE-GHS-Ravin-E is an add-on board designed for the startWARE-GHS-
VR4131/33 boards. Running the startWARE-GHS-Ravin-E board with other mother-
boards will require a suitable adapter, which is not part of this package. Such adapters
are not available from NEC and therefore have to be provided by the user.
Alternatively the startWARE-GHS-Ravin-E board can be operated via its PCI interface.
That will require a suitable adapter whose schematics are included in chapter 5.4 of
this document. Note that the PCI interface uses 3 V signaling only and it can therefore
not be operated in a normal PC.

14 User’s Manual U17316EE1V0UM00
[MEMO]

15
User’s Manual U17316EE1V0UM00
Chapter 2 Board Features
As the name implies, the startWARE-GHS-Ravin-E board employs the Ravin-E display controller
(µPD72255) as its centrepiece. Also implemented is an SAA7113H or SAF7113H video processor,
which is used to digitize a PAL or NTSC standard video signal and optionally overlay it on the graphics.
An analogue display can be connected via a standard 15-pin high density DSUB connector, while a dig-
ital display connects through a 30-pin row connector.
The startWARE-GHS-Ravin-E board has been designed as an add-on board for the
startWARE-GHS-VR4131 or startWARE-GHS-VR4133 boards. It connects to these boards through a
96-pin male DIN connector CN1, which also carries the 5 V DC power supply.
2.1 Summary of Features
•Ravin-E (µPD72255) graphics display controller
•64 MB on board SDRAM frame buffer
•Enhanced SAA7113 video processor for video capture
•Analogue (0.7 VPP) and digital (3.3 V or 5 V) video outputs
•All Ravin-E signals available on standard logic analyzer connectors
•Single 5 V power supply (provided from main board)
•JTAG boundary scan implemented

16
Chapter 2 Board Features
User’s Manual U17316EE1V0UM00
2.2 Picture of startWARE-GHS-Ravin-E Board
Figure 2-1: startWARE-GHS-Ravin-E Board

17
User’s Manual U17316EE1V0UM00
Chapter 3 Functional Description
Ravin-E (µPD72255Y) is the successor of the Ravin (µPD72254Y) display controller, designed for use
in car navigation, multimedia and passenger entertainment systems. In addition to the original display
control and drawing functions of µPD72254Y, Ravin-E supports high quality alpha blending for all win-
dow layers. This alpha blending feature is also employed for anti-aliased line drawing. Ravin-E also pro-
vides a function for capturing and displaying external video signals as well as a built-in D/A converter for
analogue CRT or TFT displays. Ravin-E can be connected to virtually any 32-bit host CPU with an
asynchronous SRAM-like bus interface. A second 32-bit wide data bus connects to standard SDRAMs
which serve as the frame buffer for the graphics and the video.
Figure 3-1: startWARE-GHS-Ravin-E Block Diagram
As shown in the above block diagram, Ravin-E connects through a 96-pin DIN connector to the host
CPU platform. This platform will be typically equipped with a VR41xx MIPS-RISC CPU, but it may be
adapted to any other CPU with a suitable SRAM-like interface. The signal levels are 3.3 V LVTTL and
the pinout is defined in “Host Connector CN1” on page 24 of the appendix.
Ravin-E is connected to two 256 Mbit SDRAMs, each one of them being 16-bit wide. These SDRAMs
are primarily employed as frame buffer for the graphics, as video buffer for the overlaid video and also
to store bitmaps, which can then be transferred quickly to the active screen location. The SDRAM also
holds the alpha values when alpha blending is used and the z-values in case of 3-D applications. Even
though the interface is not bandwidth optimized, the CPU has direct access to all locations in the
SDRAM and therefore it might make use of any otherwise unused memory locations.
The SAA7113H or SAF7113H enhanced video processor digitizes one of two incoming analogue com-
posite video signals (PAL or NTSC standard) and converts it to a standard 8-bit wide ITU 656 compliant
YUV 4:2:2 signal. That signal can be captured by Ravin-E, optionally scaled up or down and then
stored in the SDRAM. In the video output path, the format can be converted on the fly from YUV to
RGB. See the SAA7113H Product Specification from Philips and the Ravin-E Data Sheet for details.
Ravin-E
µPD72255
SAA7113H
digital
3 V / 5 V buffers analogue
video drivers
96-pin DIN
256 Mb x 16
256 Mb x 16
8-bit
analogue
RGB
digital
RGB
to host
CPU board

18
Chapter 3 Functional Description
User’s Manual U17316EE1V0UM00
The startWARE-GHS-Ravin-E board provides two display outputs, each of which conveys the same dis-
play contents. 75 ΩRGB video drivers are provided on board, so that a 0.7 VPP monitor can be directly
connected to CN12. 5 V TTL compatible sync signals are provided as well on this connector. The dot
clock can optionally be enabled on this connector via jumper JP4. Note that this connection is not
required for standard VGA monitors and it might even cause problems. Therefore JP4 is normally
unconnected. Check your monitor specification before setting JP4. JP4 may be useful when connecting
an analog TFT display to this connector.
CN13 connects to a digital display, usually a TFT. Along with the digital colour, CN13 provides the sync
and the dot clock signals, as well as a few control signals for the TFT display. JP3 switches the interface
voltage between 3.3 V LVTTL and 5.0 V TTL. CN13 also provides the 5 V and 3.3 V operating voltages.
See the chapter on power consumption below for details on the current ratings.
Three LEDs are provided to quickly check the operating voltages. D1 connects to the externally
supplied 5 V, D2 to the 3.3 V and D3 to the 2.5 V. The 3.3 V and the 2.5 V are locally generated on the
startWARE-GHS-Ravin-E board. When power is supplied, then all these LEDs should light up with
about the same intensity.
CN14 is a connector for JTAG boundary scan equipment. The SAF7113H is the first device in the scan
chain, while Ravin-E is the second one.
3.1 Power Consumption
The startWARE-GHS-Ravin-E board is supplied with a single +5 V DC operating voltage from the main
board. The internally required 3.3 V and 2.5 V are generated by linear voltage regulators on the
Ravin-E board. The following table shows the operating currents that have been measured under typi-
cal operating conditions (capturing video input and displaying it along with graphics). Note that these
are reference values of just one board and that other boards may show slightly different current con-
sumption, even if the conditions are the same.
Notes: 1. Estimated, not measured (includes current for VCC3.3, VCC2.5 and AVDD2)
2. Do not permanently exceed these limits (e.g. by external loads)
The measured values include the power consumption of the respective voltage regulator, which is neg-
ligible. The voltage regulators have shunt resistors at their input voltage pin. These resistors can serve
well for current consumption measurements, but their other purpose is to burn away some of the power,
so that only part of it is dissipated in the regulator itself.
The VCC3.3 voltage regulator (IC8) along with its shunt resistors and its heat sink on the PCB is
designed to source up to 400 mA. Therefore it can supply external circuits (e.g. a suitable TFT Display)
as long as they do not draw more than about 250 mA. Take care not to couple external noise onto this
supply rail.
Table 3-1: Operating Currents under typical operating conditions
Voltage Measured current Design limitNote 2
5 V 500 mANote 1 1000 mA
VCC3.3 160 mA 400 mA
VCC2.5 230 mA 300 mA
AVDD2 36 mA 100 mA

19
User’s Manual U17316EE1V0UM00
Chapter 4 Software Description
We have written a few demo programs, which can be found in the “Software\Ravin-E” directory of the
startWARE-GHS-Ravin-E CD. The programs can be compiled for MIPS RISC devices or for V850E
devices. Build files for each of these environments are supplied. We have used Green Hills version
3.5.1 for V850 and version 3.6.1 for MIPS. Make sure to issue a “build all” command, if you change
between these tool chains. Otherwise the tools may mix modules of different architectures, which may
lead to some weird error messages.
Here is the directory structure of Software\Ravin-E:
Animation
Benchmarks
Bin2C
Datalogger
HW-Test
Include
LibV850
LibVR
MyLib
png
rgl
StartupVR
The individual demo programs and their build files are found in Animation, Benchmarks, Datalogger
and HW-Test. Bin2C contains a Windows application program, which converts a file to C-Source code.
These programs are described later in this chapter. The Include directory contains a few include files,
which are required by the demo programs and the libraries. LibV850 and LibVR contain the compiled
libraries for the respective tool chain. MyLib holds the sources of the CPU initialization code and the
interface code for the PNG library. png contains the sources of the png library (libpng) and the zlib,
which is required for libpng. Both are third party software packages. See http://www.libpng.org/ for the
latest sources. rgl contains the Ravin Graphics Library and StartupVR contains startup code for MIPS
devices and defines for the VR4131.
All libraries can be built automatically by the build files in LibVR or LibV850. The libraries are supplied
on the CD and ready to use, but it may be useful to download the latest libpng and zlib sources from the
internet and recompile them.
All temporary files during the build process are stored in the Tmp subdirectories of the respective mod-
ule. The files in this path can be deleted after the build process.
4.1 Ravin-E Graphics Library
The Ravin-E graphics library (RGL) provides higher level functions to initialize and operate Ravin-E.
Only the function ghs\rgl_custom.c needs to be adapted, when rgl is ported to another target. It defines
the addresses of the Ravin-E registers (PhysReg) and of the Ravin-E frame buffer (PhysFB). An
os_sleep(n) function is required for delays and timeouts, which delays by roughly n milliseconds. It
needs not be very precise. For the V850E/ME2, we have implemented a simple active delay, which
delays roundabout 1 ms for a 150 MHz device. If the CPU core frequency differs much from that, it
should be adapted accordingly. A built-in timer is used for the VR4131, which generates 1 ms interrupts.
The respective code is located in StartupVR\iqueue.c, start.mip and isr.mip.
A detailed description of the RGL can be found in the “Ravin-E Graphics Library Manual” in the rgl\doc
directory.

20
Chapter 4 Software Description
User’s Manual U17316EE1V0UM00
4.2 Display of PNG Files
In order to display png files (Portable Network Graphics), we have ported the free PNG Reference
Library libpng (www.libpng.org) to the V850. This library requires the zlib compression library
(www.gzip.org), which has also been ported. These two libraries are documented on their respective
websites. Calls to zlib functions are transparent and the libpng user need not bother too much about
that zlib library. It should be noted, however, that a certain amount of heap space is required for both lib-
png and zlib. Also the stack size should not be too small, as these functions seem to use it extensively.
They have clearly been written with personal computers in mind and are not optimized for the limited
memory resources of embedded applications. Nevertheless there is a limited number of tuning possibil-
ities by defining certain variables that control compilation of the libraries. See the respective documen-
tation for details.
4.3 Bin2C: Converting Binary Files to C-Source Code
A binary file cannot be directly copied to an embedded system. At least it must be converted to a down-
loadable ASCII file of Intel-Hex or Motorola S-Record format. A slightly more complicated conversion
seems to offer the best possible flexibility: converting the binary file to C-Source code. That is exactly
what the bin2c utility was made for. The generated C-Source code can be embedded into any project
and be located to any required address. bin2c was written for the conversion of .png files, but it does not
perform any structural analysis and so it may be used with any file, not just with binary png-files.
bin2c inserts a pragma for the Green Hills compiler to emit the subsequent data into the segment
.images. That allows for relocation of that data to any target address. bin2c defines an array of unsigned
char and names the array with the file name of the input file. A few characters are converted if they are
incompatible with the C naming conventions. The best idea is probably to avoid file names, which do
not comply with C variable names.
bin2c can convert multiple files at once. For each input file it creates its own array with a name as
described before. When the “Generate table of contents” checkbox is enabled, then an array of pointers
to unsigned char is allocated and that array is initialized with pointers to the individual arrays. The name
of this table is toc and the variable toc_size is initialized with the number of arrays (=number of files).
Animated sequences are usually created with index numbers in their file names. When the “Sort Input
Files” checkbox is enabled, then the files are automatically sorted in ascending file name order.
bin2c was compiled with the free OpenWatcom tool chain, which is downloadable from
http://www.openwatcom.org/. The sources of bin2c are provided on the CD and may be modified as
required.
Table of contents
Other NEC Computer Hardware manuals

NEC
NEC SX-Aurora TSUBA300-8ASA User manual

NEC
NEC IE-784915-R-EM1 User manual

NEC
NEC IE-178048-NS-EM1 User manual

NEC
NEC N8151-78A User guide

NEC
NEC IE-703017-MC-EM1 User manual

NEC
NEC IE-178098-NS-EM1 User manual

NEC
NEC NEC PD78081(A) User manual

NEC
NEC IE-703116-MC-EM1 User manual

NEC
NEC VR4181 mPD30181 User manual

NEC
NEC IE-78K0-NS-P04 User manual