CN106780288B - Hardware acceleration circuit that polygon was filled - Google Patents

Hardware acceleration circuit that polygon was filled Download PDF

Info

Publication number
CN106780288B
CN106780288B CN201611125211.3A CN201611125211A CN106780288B CN 106780288 B CN106780288 B CN 106780288B CN 201611125211 A CN201611125211 A CN 201611125211A CN 106780288 B CN106780288 B CN 106780288B
Authority
CN
China
Prior art keywords
frame memory
pixel
state
state machine
data register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611125211.3A
Other languages
Chinese (zh)
Other versions
CN106780288A (en
Inventor
高伟林
王涛
钟海林
杨粤涛
于小燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Changfeng Aviation Electronics Co Ltd
Original Assignee
Suzhou Changfeng Aviation Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Changfeng Aviation Electronics Co Ltd filed Critical Suzhou Changfeng Aviation Electronics Co Ltd
Priority to CN201611125211.3A priority Critical patent/CN106780288B/en
Publication of CN106780288A publication Critical patent/CN106780288A/en
Application granted granted Critical
Publication of CN106780288B publication Critical patent/CN106780288B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/28Indexing scheme for image data processing or generation, in general involving image processing hardware

Abstract

The invention belongs to the technical field of graphic generation, and relates to a hardware acceleration circuit for polygon filling. The polygon filling hardware acceleration circuit comprises a DSP digital signal processor, an FPGA programmable logic device, a first frame memory and a second frame memory. The FPGA programmable logic device comprises a frame controller, a marking data register, a color data register, a state machine and a time sequence module. The frame controller is connected with the DSP digital signal processor, the first frame memory, the second frame memory, the time sequence module, the state machine, the marking data register and the color data register; the time sequence module, the marking data register and the color data register are simultaneously connected with the state machine. The polygon filling hardware accelerating circuit can obviously improve the polygon filling efficiency and reduce the software algorithm load, thereby improving the whole picture generating efficiency.

Description

Hardware acceleration circuit that polygon was filled
Technical Field
The invention belongs to the technical field of graphic generation, and relates to a hardware acceleration implementation method and circuit for polygon filling.
Background
Polygon fill is an important piece of research in computer graphics, and its function is to modify all pixel elements within a given polygon footprint on the display screen to specified color data. The existing polygon filling algorithm is generally implemented by adopting a software algorithm method, such as a seed filling algorithm, a scanning line filling algorithm, an edge mark filling algorithm and the like. The method is characterized in that software calculates color data of all pixels in a polygon area needing to be filled and writes the color data into a frame memory.
With the development of the technology, the resolution of the liquid crystal display is higher and higher, the requirement for polygon filling is higher and higher, and the content of the picture to be displayed is more and more complex, which puts higher requirements on the polygon filling circuit. The existing software algorithm realization polygon filling method has the following defects: the algorithm is complex, the polygon filling efficiency is low, and the requirements of high resolution and real-time application are difficult to meet.
Disclosure of Invention
The purpose of the invention is as follows: the polygon filling circuit is easy to implement, strong in expandability, high in efficiency and realized by hardware.
In order to adapt to the trend of the airborne cabin liquid crystal display developing towards high resolution and high picture complexity, a high-performance and easy-to-realize polygon filling implementation scheme is provided, a DSP (digital signal processor) 1 and an FPGA (field programmable gate array) programmable logic device 2 are used as main processing devices and perform ping-pong operation on a first frame memory 8 and a second frame memory 9, the DSP 1 writes marking information and color information of a polygon boundary to be filled into the first frame memory 8 or the second frame memory 9, the FPGA programmable logic device 2 reads pixel marks and color information in the first frame memory 8 or the second frame memory 9 point by point and line by line according to a scanning sequence, a state machine 5 performs state conversion processing on the marking information and processes color data at the same time, and the processed color data is written into the first frame memory 8 or the second frame memory 9 by a frame controller 3, thereby realizing the hardware filling of the polygon.
The technical scheme of the invention is as follows: a polygon filled hardware acceleration circuit, the circuit comprising: the device comprises a DSP (digital signal processor) 1, an FPGA (field programmable gate array) programmable logic device 2, a first frame memory 8 and a second frame memory 9;
the FPGA programmable logic device 2 comprises a frame controller 3, a time sequence module 4, a state machine 5, a marking data register 6 and a color data register 7;
the frame controller 3 is respectively connected with the DSP 1, the first frame memory 8, the second frame memory 9, the time sequence module 4, the state machine 5, the marking data register 6 and the color data register 7;
the time sequence module 4, the marking data register 6 and the color data register 7 are also respectively connected with the state machine 5;
the DSP 1 writes pixel data into a first frame memory 8 or a second frame memory 9 through a frame controller 3, wherein the written data is comprehensive data containing pixel color information and marking information;
the DSP digital signal processor 1 and the FPGA programmable logic device 2 adopt a ping-pong operation mode for a first frame memory 8 and a second frame memory 9 through a frame controller 3, and alternately switch by taking a field synchronization signal sent by a time sequence module 4 as a period;
during the operation of the FPGA programmable logic device 2 on the first frame memory 8 or the second frame memory 9, pixel data are processed point by point and line by line according to a screen scanning sequence, and the processing of the pixel data in each address comprises two operations of reading and writing, and is completed within and outside one pixel clock period;
the FPGA programmable logic device 2 operates each address unit of the first frame memory 8 or the second frame memory 9 in two steps, wherein the first step is reading operation, and pixel color data in the frame memory is read out and displayed; writing the processed color data information into the same frame memory address;
when reading the pixel data in the first frame memory 8 or the second frame memory 9, the FPGA programmable logic device 2 registers the color information contained in the read pixel data by the color data register 7, and registers the read mark information by the mark data register 6;
the marking data register 6 sends the pixel marking information to the state machine 5, the color data register 7 sends the pixel color information to the state machine 5, the state machine 5 carries out state transition processing according to the previous marking state, the current marking state information and the previous state, and meanwhile, the processed pixel color information is sent to the frame controller 3 and written into the first frame memory 8 or the second frame memory 9 by the frame controller.
The invention has the beneficial effects that: the polygon filling hardware accelerating circuit takes a DSP (digital signal processor) 1 and an FPGA (field programmable gate array) comprehensive programmable device 2 as main processing chips, adopts a marking data register 6 and a color data register 7 in the FPGA programmable logic device 1 to register a polygon boundary pixel marking signal and a color signal which are pre-placed in a first frame memory 8 or a second frame memory 9 of the DSP digital signal processor 2, uses a state machine 5 to carry out marking state transfer and color data processing on marking and color information, and fills processed colors in corresponding polygon internal areas. The scheme adopts hardware to realize polygonal area filling, is simple and feasible, has high hardware realization efficiency, reduces the complexity of a software algorithm, and improves the polygonal filling efficiency and the graphic generation and display efficiency. The polygon filling hardware accelerating circuit can meet the pixel filling requirements of various irregular polygons and can complete the filling of a plurality of polygons in one picture.
Drawings
FIG. 1 is a functional block diagram of the polygon fill hardware acceleration circuit of the present invention;
the system comprises a 1-DSP digital signal processor, a 2-FPGA programmable logic device, a 3-frame controller, a 4-time sequence module, a 5-state machine, a 6-marking data register, a 7-color data register, an 8-first frame memory and a 9-second frame memory.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
A polygon filled hardware acceleration circuit, the circuit comprising: the device comprises a DSP (digital signal processor) 1, an FPGA (field programmable gate array) programmable logic device 2, a first frame memory 8 and a second frame memory 9;
the FPGA programmable logic device 2 comprises a frame controller 3, a time sequence module 4, a state machine 5, a marking data register 6 and a color data register 7;
the frame controller 3 is respectively connected with the DSP 1, the first frame memory 8, the second frame memory 9, the time sequence module 4, the state machine 5, the marking data register 6 and the color data register 7;
the time sequence module 4, the marking data register 6 and the color data register 7 are also respectively connected with the state machine 5.
The DSP 1 is used for carrying out drawing algorithm operation to obtain pixel data and address data of a polygon boundary, wherein the pixel data is comprehensive data containing mark information and color information, the mark information is two-bit binary data, and the three states are a filling mark, an ending mark and a null mark respectively; the color information is RGB three-color component data. And along the picture scanning direction, setting the polygon boundary pixels at the filling starting position with filling marks, setting the polygon boundary pixels at the filling ending position with ending marks, and setting the remaining pixels at positions which do not need to be filled with filling marks with empty marks.
The frame controller 3 is configured to receive an access request of the DSP digital signal processor 1 and the FPGA programmable logic device 2 for a frame memory device, perform access to the first frame memory 8 and the second frame memory 9 in a ping-pong operation manner, and perform alternate switching with a field synchronization signal generated by the timing module 4 as a period, where when the DSP digital signal processor 1 accesses one of the frame memories in a certain field period, the FPGA programmable logic device 2 accesses the other frame memory, the DSP digital signal processor 1 accesses a frame memory operated by a previous field FPGA in a next field period, and the FPGA programmable logic device 2 accesses a frame memory operated by the previous DSP digital signal processor 1. The DSP digital signal processor 1 writes the pixel address signal and the pixel data signal obtained by operation into a certain frame memory through a frame controller 3, and the FPGA programmable logic device 2 carries out filling acceleration processing on the mark data and the color data written into the DSP digital signal processor 1 in the frame memory in the next field.
The FPGA programmable logic device 2 performs read-write operation on the first frame memory 8 or the second frame memory 9 point by point and line by line according to a scanning sequence. The clock frequency of the FPGA programmable logic device 2 accessing the frame memory is generated by the time sequence module 4 by frequency multiplication of the pixel clock, and is twice of the pixel clock frequency. The FPGA programmable logic device 2 operates the pixel data of each address unit in the first frame memory 8 or the second frame memory 9 into two steps, the first step is reading operation, corresponding to the first frame memory operation clock period of the address unit, the pixel data written into the frame memory by the DSP digital signal processor 1 is read and displayed, meanwhile, the marking information and the color information in the pixel data are respectively registered, the marking information is registered by the marking data register 6, and the color data is registered by the color data register 7; the second step is a write operation, corresponding to the second frame memory operation clock cycle of the address unit, and writing the corresponding color data back to the currently operated frame memory address unit according to the processing result of the state machine 5 on the marking data and the color data.
The state machine 5 includes three states, which are a current pixel output state, a filling state, and an end filling state, and outputs the processed pixel data in each state. The initial state of the state machine 5 is the current pixel output state, and the state transition processing is performed with the pixel clock as a cycle according to the marking information sent by the marking data register 6. When the state machine 5 is in the current pixel output state, if the received pixel mark is an empty mark, the state machine is kept in the current pixel output state, the FPGA programmable logic device 2 reads out the pixel color information of the current address, and writes back all-zero data in the frame memory address unit to empty the pixel color information; if the received pixel mark is a filling mark, the state machine 5 is converted into a filling state, and the FPGA programmable logic device 2 registers the color data while reading out the pixel color information of the current address, and writes the color data back to the current address unit. When the state machine 5 is in a filling state, if the received pixel mark is a null mark, the state machine is kept in the filling state, the FPGA programmable logic device 2 outputs color data registered by the color data register 7, and writes the color data back to the current frame memory address unit; if the received pixel mark is the end mark, the state machine 5 is switched to the end filling state, the FPGA programmable logic device 2 outputs the color data registered by the color data register 7, and writes back all zero data in the frame memory address unit to empty the frame memory address unit. When the state machine 5 is in the end filling state, if the received pixel is marked as the empty mark, the state machine 5 is switched to the current pixel output state, the FPGA programmable logic device 2 reads out the pixel color information of the current address, and writes back all-zero data in the frame memory address unit to empty the pixel.
In summary, the present invention provides a polygon filling hardware accelerating circuit with easy implementation, strong expandability and high efficiency, which adopts a DSP digital signal processor 1 and an FPGA programmable logic device 2 as main processing devices, the DSP digital signal processor 2 performs ping-pong operation on a first frame memory 8 and a second frame memory 9, the DSP digital signal processor 2 writes mark information and color information of a polygon boundary to be filled into the first frame memory 8 or the second frame memory 9, the FPGA programmable logic device 2 reads pixel marks and color information in the frame memory point by point and line by line according to a scanning sequence, a state machine 5 performs state conversion processing according to the mark information, and meanwhile, the color data is processed and the processed color data is written into the first frame memory 8 or the second frame memory 9 by the frame controller 3, so that the hardware filling of the polygon is realized.
The DSP 1 may be implemented by DSP devices of AD company or TI company. When the FPGA programmable logic device 2 is implemented, any series of FPGAs from Altera corporation or Xilinx corporation can be used. After the programmable logic device is selected, the frame controller 3, the mark data register 6, the color data register 7, the timing module 4 and the state machine 5 are realized by programming of a VHDL or Verilog hardware description language, and can also be realized by adopting a graphic input mode. The first frame memory 8 and the second frame memory 9 can be selected from conventional random static or dynamic memories.

Claims (1)

1. A polygon padding hardware acceleration circuit, the circuit comprising: the device comprises a DSP (digital signal processor) (1), an FPGA (field programmable gate array) programmable logic device (2), a first frame memory (8) and a second frame memory (9);
the FPGA programmable logic device (2) comprises a frame controller (3), a time sequence module (4), a state machine (5), a marking data register (6) and a color data register (7);
the frame controller (3) is respectively connected with the DSP digital signal processor (1), the first frame memory (8), the second frame memory (9), the time sequence module (4), the state machine (5), the marking data register (6) and the color data register (7);
the time sequence module (4), the marking data register (6) and the color data register (7) are also respectively connected with the state machine (5);
the DSP digital signal processor (1) writes pixel data into a first frame memory (8) or a second frame memory (9) through a frame controller (3), wherein the written data is comprehensive data containing pixel color information and marking information;
the DSP digital signal processor (1) and the FPGA programmable logic device (2) adopt a ping-pong operation mode for the first frame memory (8) and the second frame memory (9) through the frame controller (3), and alternately switch by taking a field synchronization signal sent by the timing module (4) as a period;
during the operation of the FPGA programmable logic device (2) on the first frame memory (8) or the second frame memory (9), pixel data are processed point by point and line by line according to a screen scanning sequence, and the processing of the pixel data in each address comprises two operations of reading and writing and is completed in one pixel clock period;
the FPGA programmable logic device (2) performs operation on each address unit of a first frame memory (8) or a second frame memory (9) in two steps, wherein the first step is reading operation, and pixel color data in the frame memory is read out and displayed; writing the processed color data information into the same frame memory address;
when reading pixel data in a first frame memory (8) or a second frame memory (9), the FPGA programmable logic device (2) registers color information contained in the read pixel data by a color data register (7) and registers read mark information by a mark data register (6);
the state machine (5) comprises three states, namely a current pixel output state, a filling state and an end filling state, and correspondingly outputs the processed pixel data in each state; the initial state of the state machine (5) is the current pixel output state, and the state transfer processing is carried out by taking a pixel clock as a period according to the marking information sent by the marking data register (6); when the state machine (5) is in the current pixel output state, if the received pixel mark is an empty mark, the state machine is kept in the current pixel output state, the FPGA programmable logic device (2) reads out the pixel color information of the current address, and writes back all-zero data in the frame memory address unit to empty the pixel color information; if the received pixel mark is a filling mark, the state machine (5) is converted into a filling state, and the FPGA programmable logic device (2) registers the color data while reading out the pixel color information of the current address and writes the color data back to the current memory address unit; when the state machine (5) is in a filling state, if the received pixel mark is an empty mark, the state machine is kept in the filling state, the FPGA programmable logic device (2) outputs color data registered by a color data register (7) and writes the color data back to a current memory address unit; if the received pixel mark is an end mark, the state machine (5) is switched to an end filling state, the FPGA programmable logic device (2) outputs color data registered by the color data register (7), and writes back all-zero data in the frame memory address unit to empty the color data; when the state machine (5) is in a filling ending state, if the received pixel is marked as an empty mark, the state machine (5) is converted into a current pixel output state, the FPGA programmable logic device (2) reads out pixel color information of a current address, and writes all-zero data back in the frame memory address unit to empty the pixel color information;
the marking data register (6) sends the pixel marking information to the state machine (5), the color data register (7) sends the pixel color information to the state machine (5), the state machine (5) carries out state transition processing according to the previous marking state, the current marking state information and the previous state, and meanwhile, the processed pixel color information is sent to the frame controller (3) and written into the first frame memory (8) or the second frame memory (9).
CN201611125211.3A 2016-12-08 2016-12-08 Hardware acceleration circuit that polygon was filled Active CN106780288B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611125211.3A CN106780288B (en) 2016-12-08 2016-12-08 Hardware acceleration circuit that polygon was filled

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611125211.3A CN106780288B (en) 2016-12-08 2016-12-08 Hardware acceleration circuit that polygon was filled

Publications (2)

Publication Number Publication Date
CN106780288A CN106780288A (en) 2017-05-31
CN106780288B true CN106780288B (en) 2020-10-20

Family

ID=58881788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611125211.3A Active CN106780288B (en) 2016-12-08 2016-12-08 Hardware acceleration circuit that polygon was filled

Country Status (1)

Country Link
CN (1) CN106780288B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112272122A (en) * 2020-10-14 2021-01-26 北京中科网威信息技术有限公司 FPGA accelerator card detection method and device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505413A (en) * 2009-02-16 2009-08-12 中国科学院长春光学精密机械与物理研究所 Intelligent image compression apparatus combined with television tracking device
CN102184515A (en) * 2011-04-13 2011-09-14 合肥芯硕半导体有限公司 Method for filling ladder diagram in FPGA (Field Programmable Gate Array)
CN104363383A (en) * 2014-10-16 2015-02-18 青岛歌尔声学科技有限公司 Image pre-distortion correction method and device
CN104506786A (en) * 2014-12-02 2015-04-08 苏州长风航空电子有限公司 Character generator based on synchronous dynamic random access memory (SDRAM) frame buffer
CN104881666A (en) * 2014-02-27 2015-09-02 王磊 Real-time binary image connected domain mark realizing method based on FPGA
CN105763878A (en) * 2014-12-14 2016-07-13 陕西三元金泰实业发展有限公司 Picture processing device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505413A (en) * 2009-02-16 2009-08-12 中国科学院长春光学精密机械与物理研究所 Intelligent image compression apparatus combined with television tracking device
CN102184515A (en) * 2011-04-13 2011-09-14 合肥芯硕半导体有限公司 Method for filling ladder diagram in FPGA (Field Programmable Gate Array)
CN104881666A (en) * 2014-02-27 2015-09-02 王磊 Real-time binary image connected domain mark realizing method based on FPGA
CN104363383A (en) * 2014-10-16 2015-02-18 青岛歌尔声学科技有限公司 Image pre-distortion correction method and device
CN104506786A (en) * 2014-12-02 2015-04-08 苏州长风航空电子有限公司 Character generator based on synchronous dynamic random access memory (SDRAM) frame buffer
CN105763878A (en) * 2014-12-14 2016-07-13 陕西三元金泰实业发展有限公司 Picture processing device

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
DSP + FPGA结构的嵌入式图形处理设计;李孟华,牛文生,裴静静;《航空计算技术》;20130131;第43卷(第1期);全文 *
FPGA在飞行仪表字符图形产生器设计中的应用;朱耀东, 张焕春, 经亚枝;《数据采集与处理》;20030630;第18卷(第2期);第185-188页 *
基于FPGA+DSP的飞机座舱综合图形显示技术研究;贾银亮;《中国博士学位论文全文数据库信息科技辑》;20121215;全文 *
基于双处理器系统的图形生成电路研究与应用;高伟林,曹峰,郭超;《电子技术应用》;20160223;第42卷(第2期);第9-13页 *
用FPGA 实现机载全姿态指示仪图形硬件填充;李开宇,张焕春,经亚枝;《计算机辅助设计与图形学学报》;20040229;第16卷(第2期);全文 *
飞机座舱图形生成系统的硬件加速设计;曹峰,高伟林;《电子技术应用》;20150715;第41卷(第7期);第37-39、43页 *

Also Published As

Publication number Publication date
CN106780288A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US9471955B2 (en) Multiple display pipelines driving a divided display
GB2149157A (en) High-speed frame buffer refresh apparatus and method
TWI594220B (en) Display driver integrated circuit, a display system having the same, and a display data processing method therof
CN109658337B (en) FPGA implementation method for real-time electronic despinning of images
US9858635B2 (en) Application processor sharing resource based on image resolution and devices including same
CN105825826A (en) Display driver
TW200300497A (en) Back-end image transformation
CN106780288B (en) Hardware acceleration circuit that polygon was filled
CN101789234A (en) Digital image scaling method and integrated system
CN101127847A (en) A screen display synthesis method and synthesis device
CN101499245B (en) Asynchronous first-in first-out memory, liquid crystal display controller and its control method
Gong et al. Design of high-speed real-time sensor image processing based on FPGA and DDR3
CN104506786B (en) A kind of character generator deposited based on SDRAM frames
JP2000029443A (en) Screen driver provided with animation circuit
JPS62145483A (en) Rotary device for enlargement/reduction of picture
US4707690A (en) Video display control method and apparatus having video data storage
US8717628B1 (en) Flexible image processing apparatus and method
Li et al. An Independent VGA Controller Based on SOPC with Three Pixel-Mapped Schemes
Nagarjuna et al. An FSM Based VGA Controller with 640⨯ 480 Resolution
CN114257758A (en) Efficient human-computer interface superposition method based on FPGA
JPS63101981A (en) Graphic data processor
KR100801317B1 (en) Variable buffer system for processing 3d graphics and method thereof
KR100252648B1 (en) Graphics system and method of graphics drawing
KR101337950B1 (en) Device and method for graphic data output
JPH01239584A (en) Character pattern plotting device and its manufacture

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant