Software Design and Application of DC-618C Digital TV Receiver Top Box Based on STi5518

introduction

This article refers to the address: http://

Digital TV is one of the most talked about topics. Because digital TV is a new kind of thing, some related reports and philosophical concepts appear in the introduction of articles, such as "digital TV", "all-digital TV", "all-media TV", "multimedia TV", etc., causing confusion to the public. Overwhelmed. In fact, the meaning of "digital television" does not refer to the television set in our general family, but to the television system or television equipment that uses digital signals in the processing, transmission, transmission and reception of television signals. The specific transmission process is: the image and sound signals sent by the TV station are digitally compressed and digitally modulated to form a digital television signal, which is transmitted via satellite, terrestrial radio or cable, etc., after being received by the digital television, through digital solution. Harmonic digital video and audio decoding processing restores the original image and accompanying sound.

Set Top Box, in a broad sense, any network terminal device connected to a TV set can be called a set-top box. Analog channel adder based on cable TV network, analog channel decoder, "Vilas" Internet access set-top box connecting digital telephone line and TV set, integrated receiver decoder (IRD) for digital satellite, digital terrestrial set-top box and cable TV digital set-top boxes can be called set-top boxes. In a narrow sense, if only digital devices are used, they are divided into digital satellite set-top boxes (DVB-S), European standard digital terrestrial set-top boxes (DVB-T), national standard digital terrestrial set-top boxes (DMB-TH), and cable digital set-top boxes. (DVB-C). According to the function, it can be divided into one-way set-top box, two-way set-top box, and IPTV set-top box.

Set Top Box is one of the information appliances. It is a consumer electronics product that allows users to watch digital TV programs, interactive digital entertainment, education and commercialization activities on existing analog TVs. Digital Video Converter (English: Set Top Box, STB for short), commonly referred to as a set-top box or set-top box, is a device that connects a TV to an external source. It converts compressed digital signals into TV content and displays them on the TV. Signals can come from cable, satellite antennas, broadband networks, and terrestrial broadcasts. The content received by the set top box is in addition to the images and sounds that the analog TV can provide, and is capable of receiving data content, including electronic program guides, Internet web pages, subtitles, and the like.

Here we introduce a software design for a DC-618C digital TV receiver set-top box based on the STi5518 chip.

Software Design of 2DC-618C Digital TV Receiver Top Box

2.1 Basic principles of real-time operating systems

The performance of the Sti5518 decoder chip itself is relatively powerful, which can meet the hardware requirements of the application. The key lies in the software management of the hardware. With the complexity of the application, an embedded control system may have to control and monitor many peripherals at the same time. Real-time response, there are many processing tasks, and there is a variety of information transfer between tasks. If there are still two problems with the original programming method, one is that the interrupt may not get a timely response. The processing time is too long, which is not allowed for some control situations, and reduces the overall information flow of the system for network communication. Second, there are many system tasks, and there are many possibilities to be considered. If various resources are improperly scheduled, deadlocks will occur, software reliability will be reduced, and the number of programming tasks will increase substantially.

A system in which a real-time system can complete system functions and respond to external or internal, synchronous, or asynchronous time within a specified or determined time. Its correctness depends not only on the logical results of system calculations, but also on the time at which this result is produced. Therefore, the real-time system should be able to identify and process discrete events within a previously defined time range; the system can process and store the large amount of data required by the control system. To facilitate understanding, the airport ticketing system is a typical real-time system. Real-time systems usually run under certain circumstances, and the external environment is an integral part of real-time systems. The computer subsystem is typically a control system that must react to external requests within a specified time. The external physical environment is often the controlled subsystem, and the two interact to form a complete real-time system. Most control subsystems must operate continuously to ensure that the subsystem is functioning properly or is ready to take action on any anomalous behavior.

The real-time multitasking operating system runs multiple tasks in a time-sharing manner, and the macro performance is that multiple tasks run simultaneously. The switching between tasks is based on priority. Only the RTOS with priority service mode is the real real-time operating system. The RTOS of time slicing mode and collaborative mode is not real real-time. The main functional modules of RTOS are scheduled and interrupted. Processing (for optimization in assembly), task management, event management, timer management, message management, loop queue management, resource management, fixed block management, standardized UART management, and automatic power-down management are also standard The basic functions that an RTOS should have. RTOS also embodies a new system design idea and an open software framework. Engineers can add or remove a task without greatly changing other tasks of the system. In the process of project development, multiple engineers can simultaneously perform The software development of the system, as long as the establishment of good procedures and agreements between individuals, not only shortens the development time, but also reduces the dependence of the final software product on a specific developer. The mature and versatile tasks designed for the RTOS can be used by others in the form of library functions, which is consistent with the design philosophy of the C language.

2.2 OS20 operating system applied to DC-618C set-top box

Embedded in the STI5518 internal CPU--ST20, using ST's unique embedded real-time operating system OS20.

OS20 operating system is a modular high-performance real-time operating system. It has strong real-time and multi-tasking capabilities, which depends mainly on its task scheduling mechanism. From the perspective of scheduling strategy, OS20 adopts a prioritized scheduling strategy. (The default is 16) and the time slice rotation scheduling policy--that is, the multi-task processing under the same priority uses the time slice rotation processing mode.

The memory overhead of the OS20 system is also small. The core overhead is about: 600 bytes internally, and the memory occupied by each task: internal 24 bytes, external 36 bytes.

In addition, the OS20 operating system also features short task switching time.

2.3DC-618C set-top box software architecture design

According to the principle of software engineering, the DC-618C set-top box software adopts the hierarchical design from top to bottom, which is from easy to difficult, from concrete to abstract and from software to hardware, mainly including the following layers:

1) Application layer: The application layer is the high-level code that controls the operation of the entire set-top box, and is also the code that needs to be fully implemented by the programmer himself. A variety of functions are implemented in this layer, including initializing various peripherals, creating tasks, setting program frequency points, and implementing user input and output operations. For cooperation with third-party software, including web browsers, also embedded in the application layer, applications can directly call the driver layer's application programming interface (API). Third-party middleware can invoke the application interface by driving the usage layer. All application layer components are functionally accessible to the real-time operating system through the operating system porting layer.

2) Driver layer: The driver layer manages various peripherals and internal subsystem modules by calling the hardware abstraction layer, abstracts and masks the functions of these modules, and provides an application layer program interface to the upper layer to make the operation of the application layer. Intuitive and concise. Application layer components control system hardware functions and services by calling the driver layer API. These drivers perform common low-level tasks such as control transport demultiplexing and audio and video decoding.

3) Hardware abstraction layer: All hardware operations of DC-618C must be implemented by modifying registers. DC-618C addresses all registers and interfaces uniformly, making the operation of registers through software very simple, and the hardware abstraction layer is completed. This feature. It can be said that HAL is a subset of the driver layer and is responsible for directly editing the hardware. The driver layer provides common low-level functionality while the HAL implements these functions in hardware. In response to the driver layer call, the HAL executes a specific chip function and edits the chip registers to perform a specific function. It only corresponds to a specific chip, so when changing the hardware platform, only the corresponding hardware abstraction layer needs to be changed. .

2.4DC-618C set-top box application layer design

In addition to receiving digital TV signals from wired networks, set-top boxes should also have EPG (Electronic Program Guide), software online upgrades, etc. We are here to talk about the implementation of these functions.

2.4.1 Implementation of the EPG (Electronic Program Guide):

2.4.1.1 Introduction to EPG

EPG is the English abbreviation of Electronic Program Guide, which means electronic program menu. The indexing and navigation of various services provided by IPTV are completed by the EPG system. IPTV EPG is actually a portal system for IPTV. The interface of the EPG system is similar to the web page. On the EPG interface, various menus, buttons, links, etc. are provided for the user to directly select the program. The EPG interface can also contain various types of dynamics for the user to browse or Static multimedia content.

The main function of EPG is that users can use the menu provided by EPG to choose their favorite multicast channel; order their favorite video programs; sing their favorite songs online; find all kinds of information provided by IPTV, including life information, entertainment information, Educational information, sports information, etc.; users can also use the menus provided by EPG to order their favorite programs; even the menus provided by EPG can pay for water, electricity, e-commerce transactions, and so on. Users can also use the EPG menu to view additional information about the program, such as introductions to the content of the program, introductions by actors and directors, and more. At the same time, through the parental control function provided in the EPG menu, parents can restrict certain programs without giving them all viewing rights.

EPG provides a simple and convenient operating platform for the basic services provided by IPTV (such as VOD on demand/KTV/song) and various value-added services. It provides a good opportunity for IPTV users to watch TV programs, enjoy multimedia programs on demand and conduct information services. Navigation mechanism. Using the EPG system allows users to quickly and easily find the programs they care about. Using the EPG system, users can log in to the Internet through the TV terminal and the IP set-top box. More importantly, users can interact with the TV using the EPG system, so that users no longer passively receive information, and users can publish in a timely and proactive manner. Your own opinions and opinions, and feedback these opinions and opinions to the content producers in a timely manner. Therefore, EPG plays an important role in the IPTV system. China's IPTV is still in its infancy. Some TV stations, operators and set-top box manufacturers have developed some EPGs, but they are just a certain network or a set-top box. They lack extensive applicability. In practical applications, the following aspects exist. Problem: EPG content information lacks a unified data format, which brings great complexity to the exchange of EPG between each network and network; each digital TV platform must design and develop EPG system, resulting in a lot of repetitive labor; poor compatibility, Set-top box manufacturers have to repeatedly develop EPG applications for each platform.

2.4.1.2 PSI/SI information and its functions

The transport stream in MPEG-2 is based on ITU-TRecH220, ISO/IECDIS13818-2 and ISO

A data stream defined by the /IEC13818-3 protocol for the purpose of transmitting and storing encoded data of one or more programs in an environment where serious errors are likely to occur. This error manifests as a bit value error or a packet loss. The rate at which the stream is transmitted can be variable or fixed. The original stream composed in any case can be changed or fixed, and the grammatical and semantic constraints in these cases are interrogated. The transport stream rate is determined by the location and value of the Program Reference Clock (PCR) field and typically has its own PCR field for each program. The information about the PID in the transport stream and the relationship between the PIDs are included in the PSI (ProgramSpecificInformation), and the MPEG-2 decoder will use the PSI information to automatically set various parameters required for decoding. The PSI information defines the structure of the code stream using four tables: PAT (Program Association Table), PMT (Program Map Table), NIT (Network Information Table), and CAT (Conditional Access Table).

MPEG-2 provides a lot of information about the composition and interrelationship of programs in PSI, so that the TS stream can be demultiplexed correctly at the receiving end. However, this information is still insufficient in actual use. For this reason, SI (ServiceInformation) is used to further extend the PSI information in the DVB standard. The information in the PSI is basically related to the current code stream, that is, the content they are related to is related to some information in the current code stream; and the SI information may include some services and events not in the current code stream, allowing the user to perform More choices and learn more about other services. The SI information sheet mainly has the following contents:

BAT (Bouquet AssociationTable: Service Group Association Table), SDT (ServiceDescriptionTable: Service Description Table), EIT (EventInformationTable: Event Information Table), RST (RunningStatusTable: Operation Status Table), TDT (TimeandDateTable: Time and Date Table), TOT (TimeOffsetTable) : time offset value table), ST (StuffingTable: fill table)

Service Information (SI) is data used to describe the transmission system, transmission content, broadcast data stream schedule, etc., and is additional data supplementing MPEG-2 Program Description Information (PSI), which helps the Integrated Receiver Decoder (IRD) automatically. Tuning provides the user with additional information so that the IRD can automatically set up the available services.

The head-end system will repeatedly transmit SI information every certain period. For a transport stream with a maximum rate of 100 Mbits/s, the minimum interval for repeatedly transmitting SI information is 25 milliseconds. In this way, for newly booted users, SI (Business Information) can be received in a short period of time, constituting the terms required for the EPG (Electronic Program Guide).

2.4.1.3 Extraction of EPG information

In general, the PID number of the PAT table is "0x00", and the demultiplexer work always starts by looking for the PAT table. The PAT gives the PID of the PMT (Program Map Table) constituting each program service in the transport stream, and also gives the PID number of the NIT (Network Information Table). According to the PID value and the corresponding TableID value, the corresponding information such as PMT, NIT, SDT, EIT, etc. can be solved from the stream. The resolution of the receiving end of the set top box is mainly responsible for the reconstruction of these SI data information. The information content should correspond to the information in the PSI and SI tables. It can be described in the hierarchical order of Network-TransportStream-Service-Event, and the hierarchical order of TransportStream-Program(Service)-ElementStream is embedded. SI data information must be stored according to a certain data structure, so that it can be retrieved and extracted easily and quickly. Especially for the EPG running in the real-time operating system of the set-top box, the user interaction needs to be performed in real time, so the response speed is very high, and the quality of the SI database has an important impact on its performance. The SI data mainly includes: network information, transport stream information, service (program) information, business event information, etc., and a large amount of information is transmitted through descriptors, so a tree-like linked list can be used to store data, which constitutes a network, The tree structure of transport streams, services, and events, and descriptors that convey different information are represented by descriptor subclasses that inherit from the same base class.

The network information table conveys some information about the network and other networks associated with it. Each network has a unique identifier. For network coding, please refer to ETR162. The network information table mainly carries: network identifier (network_id), network name, transmission system parameters (including: frequency, modulation mode, FEC outer code, symbol rate, FEC internal code) and other information, if the NIT table has a correct description of the transmission system parameters, as long as tuning to the transport stream carrying the NIT table, the parameters of other networks can be extracted, and the general decoder can extract the information according to the information. , automatically search for channels.

Each sub-table of the program service description table describes the program service in a particular transport stream. These program services may be part of their actual transport stream or other transport streams, which can be identified by table_id (table identifier). The program service description table provides the following information: which program service group belongs to; the type of program service, such as PAL, NTSC, SECAM, FM radio, teletext, quasi-video on demand, etc.; provider of program service; can receive the program service provider; The country of the program service and the country that cannot receive the program service; the link information pointing to the specific information; the guide information for realizing the quasi-video on demand; the control information for realizing the multi-picture; the encryption system for indicating the use; the implementation of the interactive return channel Phone number; provides multilingual program business name and broadcaster as well as private data.

The event information table provides information of program segments included in each program service in chronological order. The event information table provides the following information: the identification number of the program segment, the start time, the length of the program, the playback status, whether it is encrypted, the link information to the specific information, the short introduction of the multi-language of the program segment, and the detailed description of the program segment; The time offset of the program segment; the basic stream type, such as the aspect ratio of the video, the type of the sound, the type of the subtitle, etc.; the encryption system used; the type of program, such as movies/drama, news, variety, sports, children, music , art, social politics, culture and education, etc.; program-defined age level; given the telephone number to implement the interactive return channel; cache size information and private data provided to meet the bit rate of each program segment.

2.4.1.4 Display Technology of EPG System

When the TV program and the EPG application are started at the same time, the user may see the superposition of the program picture and the EPG interface. The TV picture seen by the user can be divided into three layers from front to back, followed by the graphics layer, the video layer and the background layer. . The graphics layer is the OSD (OnScreenDisplay) layer. The OSD interface display technology refers to superimposing text display on the image screen, so that the screen provides more additional information for the user. The video layer is the program currently being viewed (the decoded moving image); the background layer is the screen image when the TV program is not played and the EPG menu is activated. The EPG screen is built on the graphics layer, and the EPG screen is superimposed by a number of EPG graphics elements (such as buttons, text boxes, selection buttons, component containers, etc.). The state transition of the interface is implemented by a message-driven mechanism for message processing in the message response function. What I see is that the screen image is the image after the three layers are blended.

The SI data retrieval module quickly retrieves the local SI database and provides the data information required for the current input focus of the EPG interface; the OSD layer graphic element library provides the graphic elements required for the interface, which is stored in the ROM of the local set top box; the state transfer controller receives The input of the user's remote controller provides the active focus required for the current display, and controls the flow of the state transition; the OSD layer image refers to the image synthesized by the EPG interface graphic elements; the OSD rendering engine determines the corresponding algorithm displayed, and receives the data provided by each module. , complete the drawing of the OSD layer graphics, and finally the overlay operation of the OSD layer, the video layer and the background layer.

2.4.2 Implementation of software online upgrade function

There are two software upgrade methods for DC-618C. One is to use the software upgrade function of the serial port, and the other is to use the online upgrade mode of the network. The former method is to download the software from the PC to the set-top box through the RS232 serial port, and the user operates it by itself, which is an individual behavior; the latter method is that the operator places the software on the server, by the user or the operation. The quotient triggers a software upgrade to the set-top box.

We mainly introduce the online upgrade method using the network. Considering the compatibility with different network environments (one-way network), we use the method of broadcasting the software, receiving it by the set-top box, and then replacing the original software. The online upgrade method adopted follows DVB. Defined system software upgrade specifications.

2.4.2.1 Overview:

The DVB standard defines two software upgrade services, each for simple and enhanced software upgrades. The former uses NIT, BAT, and PMT and does not require an upgrade notification table (UNT), which uses UNT to transmit scheduling, positioning, and other information that NIT, BAT, and PMT cannot carry.

The DC-618C currently supports a simple software upgrade service. In fact, a simple software upgrade service is a subset of the enhanced software upgrade service.

DC-618C adopts the mechanism defined by DVB to locate a software upgrade service through SI and PSI. The basic way is to locate the transport stream containing the system software upgrade service in a network through NIT or BAT, and then locate the system in the transport stream through PMT. The basic flow of the software upgrade service.

First, the DC-618C set-top box determines whether the network or service group contains software upgrade services by detecting whether the NIT and the system software upgrade BAT contain the Linkage descriptor in the first loop. A Linkage descriptor with a connection type of 0x09 carries information about a transport stream that locates a system software upgrade service in a network or service group.

DVB defines a system software upgrade connection structure for the private data field in the Linkage descriptor for the system software upgrade service, which includes a 24-bit IEEEOUI (OrganizationUniqueIdentifier) ​​and a selector. The OUI can be used to identify The manufacturer of the DC-618C set-top box, the selector is used to identify the model of the DC-618C set-top box.

The DC-618C set-top box also uses another DVB-defined system software upgrade service to scan the Linkage descriptor to define a pointer to the system software upgrade BAT or NIT. The descriptor has a connection type of 0x0A and can be transmitted in BAT or NIT. This descriptor is different from the Linkage descriptor of type 0x09 and does not contain OUI. The purpose is to enable the set-top box to obtain BAT or NIT describing the system software upgrade service without scanning all the multiplexers. In fact, the descriptor is a Linkage descriptor. A supplement, and optional.

There are multiple Linkage descriptors in the NIT or System Software Upgrade BAT that identify multiple system software upgrade services. These descriptors may not be deleted from the NIT or BAT when there is no upgrade service.

For the transport stream containing the system software upgrade elementary stream, the corresponding PMT includes a data-broadcast-id descriptor, where data-broadcast-id is equal to 0x000A, and the selector field is defined by DVB as a system software upgrade information structure (system-software-update) -info), which contains the OUI, upgrade type, upgrade version, and manufacturer-defined selector fields. For a proprietary stream, the descriptor provides an entry point; for a standard two-layer data carousel, the descriptor also provides an entry point; in addition, the descriptor provides a reference to the UNT table, pointing to the enhanced System software upgrade service. When there is currently no system software upgrade service, the headend software will not remove the identifier of the system software upgrade service from the descriptor of the PMT.

A data-broadcast-id descriptor defines only one elementary stream. A program can contain multiple elementary streams. In this way, there are multiple system software upgrade streams (carousels), each stream being its own data-broadcast- Id descriptor description. In addition, a system software upgrade service can also be one of the components of a service.

2.4.2.2 DC-618C data carousel structure for upgrading services

The DC-618C system software service uses the two-layer data carousel protocol of the DVB standard to transmit multiple upgrade software data. Multiple system software upgrade services form a two-tier data carousel service, and DSI is the entry point for this data carousel. The DC-618C software upgrade system has multiple upgrade services, each of which constitutes a separate group. All groups and modules are transmitted in one elementary stream.

Like the standard DVB data carousel, the DSI message contains the GroupInfoIndication structure, where the GroupCompaibility field uses IEEEOUI to identify our company, this field is also used to describe the model and version number of the set-top box; the GroupInfoByte (gi) field consists of a descriptor loop Describes various information about the upgrade service group, which are descriptors defined by the DVB standard data carousel.

In order to independently generate multiple software upgrade service data and integrate these independently generated data into the same data carousel service, the DC-618C set-top box software upgrade service system also adopts DVB special for some specific fields in DII. The two bytes of the transactionId are between 0X0002-0XFFFF and are equal to the groupid in the groupInfo structure of the corresponding DSI; the downloadId is equal to the transactionId; the value of the upper 8 bits of the moduleId is the same as the lower 8 bits of the groupId, and the lower 8 Bits represent a specific software upgrade service moduleId that supports up to 256 modules and should be sufficient for software upgrade applications.

3 Conclusion

Hardware is the platform for software operation. In the final analysis, the software part is the soul and core of the whole set-top box. With the rapid development of the information network, the broadband beauty has been clearly displayed in front of us, and the colorful service puts higher on the terminal receiving equipment. The requirements, only to constantly improve the functionality and performance of the set-top box software and hardware can keep up with the pace of the market.

Air Filter: Prevents harmful debris, dirt and contaminants from entering your engine.

Engine protection is the name of the game.So is engine performance. Acceleration can improve up to after an old, dirty air filter is replaced. Our Pennzoil air filters are engineered to trap harmful contaminants that can damage your engine.

Old and dirty air filters lead to reduced engine power, decreased throttle response, weaker acceleration and increased engine wear. Sounds ugly. Well, it is, and you should have it replaced when it gets bad.


Air Filter

Automotive Air Filter,Car Air Filter,Air Filter Cartridge

Donguan Bronco Filter Co., Ltd , https://www.broncofilter-cn.com

This entry was posted in on