• Based on GIO/FVID DSP video processing driver - 51rd Chinese electronic net

    The abstract take based on the TI Corporation TMS320F2812 DSP video processing system as an example, designs the GTO/FVID model in the DSP/BIOS foundation the video equipment first floor driver, provides the convenience for the high-level application procedure development personnel the API connection function to operate the first floor video equipment, raised the video processing system’s development efficiency. Elaborated the video equipment driver method of exploitation, has well to the similar video processing platform may profit from the nature.
    Key word video equipment driver TMS320F2812 DSP/BI0S GIO/FVID model

    Introduction
        Along with the time development, the DSP technology in long-distance video processing domains and so on monitoring, videophone, industry examination obtained the widespread application, regarding the different video processing system, will use the different video equipment, will therefore have the necessity not to prepare the design driver for the video frequency, will provide the unification for the high-level application procedure the connection to operate the first floor hardware. So long as is follows this driver interface standard development the high-level application procedure, may in have in the same connection different hardware platform to move, has the very good versatility and the probability. Simultaneously so long as the high-level application programmers will use the API connection which the device driver will provide, does not need to understand that first floor hardware’s concrete realization, may raise the entire video frequency system’s development efficiency greatly.

        Regarding the video equipment, TI Corporation also proposed the corresponding video equipment driver model, but these models mainly aim at 6000 series high-end DSP, even is DM64X such video processing special-purpose DSP design. But TMS320F2812 (i.e. F2812) the DSP such low end processor, the interior storage space is small, and does not have the DM64X such special-purpose video frequency connection. This article in view of this kind of question, proposed carries on simplified and the transformation method to the TI video frequency actuation model, causes the video equipment driver to take as far as possible few system resources, completes to the video frequency hardware equipment’s operation. This video frequency actuation model’s reduction method, regarding uses the low end processor’s video processing system to have taking advantage of may the warning.

    1 based on DSP/BIOS peripheral device actuation development model
        TI Corporation to develop DsP the peripheral device driver, has promoted DSP/BIOS Device Driver kit, defined the standard equipment to actuate the model, and has provided a series of API connection. As shown in Figure 1, the peripheral device driver divides into two:
        ①Kind of actuation (class driver). The kind of driver uses for the application procedure to provide the connection. This subprograms have nothing to do with the equipment, the major function including the service facilities data buffer, provides the API connection to transfer upwardly for the application layer procedure, and is coordinated the application procedure to the peripheral device operation synchronization and blocking; Provides the adaptive level to be connected downward with the miniature actuation level, realizes the API connection function to the miniature actuation level procedure mapping. The kind of driver has nothing to do with the hardware, so long as the peripheral device actuation model has designated, the kind of driver decided down, did not need to make how many revisions.
        ②Miniature actuation (mini driver). The miniature driver and the equipment are related, therefore the design miniature driver is in the peripheral device actuation development key point. The miniature driver with the kind of actuation level’s connection form is unified, but the miniature driver is different changes to the first floor hardware’s operation according to the hardware platform. The miniature actuation receive class actuation level sends out the IOM_Packet order package, decided that what type carries on to the first floor hardware the operation.

        The peripheral device driver model may divide into the following 3 kinds:
        ①PIP/PI0 model. Based on the data pipeline’s I/O model, each pipeline is maintaining an own buffer. When the data reads in the buffer, or when takes out the data from the buffer, will then stimulate notifyReader and the notifyWriter function realizes the data synchronization.
        ②SIO/DIO model. Based on the data stream I/O model, a data stream is unidirectional, either is inputs, either is outputs, moreover the SIO/DIO mold ying use asynchronous system operates I/0, regarding the data read-write, processing may also carry on.
        ③GI0 model. The general I/O model, the flexibility is very strong, and does not have the adaptive level, the direct operation miniature driver, mainly uses for to design the new equipment to actuate the model.

    2 video processing system hardware platform
        Hardware platform as shown in Figure 2. The system takes the central processor by TI Corporation’s F2812 DSP, simulates the camera to carry on video signal gathering, uses the SAA7111 video frequency to decode the chip its transformation is the BT601 form digital video signal again. After DSP digital video signal processing, then reads in output frame buffer AL422, and controls video frequency code chip ADV7177, transforms it into the analog television signal output. The overall system is coordinated between each chip by l piece of CPLD–IspMachLC4128 the succession relations.

    3 video equipment driver development
    3.1 device driver model choice
        If the preceding text said that commonly used driver model including 3 kinds: PIO, SIO and GIO. May know compared with these 3 kind of models: The PIO support first floor’s correspondence, suits the design quite simple peripheral device driver. For example audio frequency gathering which and playbacking board realizes in TI on Corporation’s 6X11DSK, generally is based on the PIO model. But the SIO model has the very good buffer assignment recycling mechanism, compared with suitable to describe the video equipment, but SIO many functions do not use in this system, moreover the GIO pattern layout’s goal aims at the special hardware’s new equipment, therefore considered finally uses the GIO equipment to actuate the model.

        TI Corporation designs at the first GIO model has the flaw actually, mainly in data buffer management question, application procedure after obtaining the buffer carries on the data processing, is actually unable the buffer returns device driver. Therefore TI Corporation while promotes north DM6 this section mainly to use in the video processing DSP chip, has made the improvement to the GIO model, proposed aims at video equipment’s FVID model specially. The FVID model is the establishment above the GIO model, by FVID_alloc, FVID_exchangc, the FVID_free function function carries on the seal to GIO in the model GIO_submit, solved in the GIO model the driver not to be able to recycle the buffer the question. 

        In addition the FVID model specially has also designed the FVID_frame structure. In this structure has contained the commonly used video signal information, like the number of lines, the enumeration, the YUV structure, the field repetition rate and so on, very suitable to describe the video data frame. But FVID is mainly aims at the DM64X system design, DM64X many functions do not have on F2812 DSP. Therefore this design in view of F2812 the DSP video processing system, has carried on certain simplification to the FVID model, retention class driver, but has rewritten the miniature actuation level procedure.

    3.2 video processing program run flow
        Completes in the design in the video frequency driver foundation, develops a typical video processing application procedure, its movement flow as shown in Figure 3. First uses the FVID_create function to establish GIO_capture and the GIO_play two video channels. Function sends out cmd_start again by GIO_capture channel’s FVID_control, gathers to 1 video data. The application procedure by GIO_capture channel’s FVID_alloc function the data frame which gathers to the driver application, after carrying on processing, will again revise after the FVID_exchange function data frame returns driver, finally transfers GI0_play channel’s FVID_control function to issue the cmd_display order again the data frame output. By Figure 3 may see, the application procedure transfers these FVID_XXX connection function layer upon layer downward will map automatically by the kind of driver, arrives at the miniature actuation level procedure; But the miniature level procedure may the direct control first floor hardware equipment, complete the entire video frequency gathering, processing and the demonstration process.

    3.3 miniature driver design
        The miniature level driver foot entire design’s key point is, below introduced in detail it realizes the method. The miniature level driver mainly several functions which arranges in order by Table 1 composes.

        Realizes as follows specifically to each function:
        ①mdBindDev function. When application procedure establishment equipment interface (for example FVID_create function) is transferred, completes to external instrumentation’s initialization. What but with its correspondence is the md_UBindDev function, will use the nadUBindDev function to cause the equipment to be at the invalid condition, cannot use again.
        ②mdCreateChan function. Uses this function for the application procedure and the driver establishment correspondence channel, simultaneously for each channel application buffer. In TI Corporation issued in the FVID model, has assigned 3 buffers for each channel, with the external instrumentation exchange data, each buffer corresponds 1 video data in turn, such design may outside expand capacity SDRAM like this in DM642 in the system is completely feasible. But regarding this system, outside F2812DSP only expanded 512K×16 position SRAM, must make the video input the frame buffer, righteousness must deposit subprograms, such storage space was insufficient. Therefore in this design has carried on the simplification, uses two buffer rotations to the video input equipment the mechanism, as shown in Figure 4(a). But regarding the video output equipment, takes the hardware frame buffer by AL422 FIFO, but not in SRAM again for its assignment buffer. What with the mdCreateChan correspondence is the md-DeleteChan function, uses in deleting the equipment channel, the release buffer resources.
        ③mdSubmitChan function. Is responsible to manage the buffer. Accepts FVID_ALLOC which, FVID_EXCHANGE, FVID_FREE three application procedure sends out to order and to carry on processing separately. And FVID_ALLOC order correspondence chart 4 (a) to the (b) process, the application procedure takes out most new from two buffers to regard the cheekbones data, shi data makes processing, but is only left over a buffer to use for to accept the external instrumentation input the data. FVID_EXCHANGE corresponding chart 4 (b) to the (c) process, the application program processing 1 data, these 1 data returns driver, the preparation uses for to demonstrate that simultaneously reads in the recent l data to carry on processing again. FVID_FREE corresponding chart 4 (c) to the (a) process, the data frame returns driver which the application procedure will process, but no longer applies for the recent data frame to the driver. The above 3 order foot aims at video input connection GIO_capture saying that but regarding output unit connection GIO_play, has not assigned the buffer in SRAM, therefore its nldSubmitChan function interior supposes for the blank letter number.

        ④mdControlChan function. Uses for to operate the exterior video equipment, completes the cross-eyed frequency according to gathering and output. The order which function accepts regarding GIO_capture and GIO_play these two equipment interface’s mdControlChan is different:
        Video input GIO_capture the connection mdControlCham function only accepts the cmd_start order, completes 1 video data gathering; But video output GIO_play the connection mdControlChan function only accepts the cmd_display order. Completes the video signal the output.

    3.4 video frequency actuation model cutting out general method
        TI corporate design’s GIO/FVID video equipment actuates the prototype to be relatively complex, and takes many system resources, must enable its to be possible to apply in the more general low end processor system, must make the transformation and the reduction. Must pay attention to the following several aspects in the transformation:
        ①Blocking I/0 operation. TI Corporation 6000 series DSP has the FDMA function, transmits the data not to need CPU the intervention, but DM64X also has the special-purpose video frequency connection, will transmit the data not to take the exterior expansion main line, therefore video data’s processing and the input output will be may parallel. But the low end processor does not have such function, the video equipment is generally through the exterior expansion bus interfacing, must therefore design to video equipment’s operation for the blocking I/O operation, the video data input/output’s process is completes by CPU, and must guarantee to video equipment’s operation cannot by other operation interrupt.
        ②To video data buffer management. The GIO/FVID video equipment actuates 3 buffer models which in the prototype uses, although the function is very perfect, actually has taken the too many storage spaces, must therefore make the adjustment regarding the actual video processing system, changes two buffers is even the single buffer model. Regarding has the independent hardware buffer output unit, may consider no longer for its assignment dynamic buffer.
        ③To video equipment’s operation. the mdControlChan function mainly uses for to operate the exterior video equipment, so long as retained to the actual system useful operation has been enough, but the GI0/FVID video equipment actuated many operations which in the original plow defined to be possible to abbreviate.

    4 subtotals
        This article introduced based on the DSP/BIOS peripheral device driver model, and aims at based on the F2812DSP video processing system this concrete hardware platform, introduced with emphasis develops flow which and in view of low end processor system’s video frequency actuation model reduction method the GIO/FVID equipment actuates. This video frequency driver to develop each kind of video processing application procedure (for example JPEG in image EPA directed net the ZigBee compression, MPEG video compression, video frequency monitor routine and so on) to provide the powerful support. This article introduced device driver’s method of exploitation, regarding the similar video processing system, specially regarding uses TI2000 is the state DSP such system resources quite limited video processing system, has well may profit from the nature.

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 2008 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3