CN105335305B - The buffering implementation method and device of a kind of interactive programmable hardware - Google Patents
The buffering implementation method and device of a kind of interactive programmable hardware Download PDFInfo
- Publication number
- CN105335305B CN105335305B CN201510725188.0A CN201510725188A CN105335305B CN 105335305 B CN105335305 B CN 105335305B CN 201510725188 A CN201510725188 A CN 201510725188A CN 105335305 B CN105335305 B CN 105335305B
- Authority
- CN
- China
- Prior art keywords
- instruction
- hardware
- recognize
- buffering area
- buffering
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Small-Scale Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses the buffering implementation method and device of a kind of interactive programmable hardware, comprise the following steps:S1, receives operational order, and the operational order is converted into hardware and can recognize that instruction;S2, the hardware can recognize that the instruction of instruction and instruction buffer storage whether there is similar instruction, if in the presence of the hardware can recognize that the corresponding similar instruction that instruction replacement instruction buffering area stores;If being not present, it is full whether decision instruction buffering area has stored, if storage is full, the hardware can recognize that, first instruction of described instruction buffering area is replaced in instruction, if storage by the hardware less than can recognize that instruction write-in described instruction buffering area.The present invention mitigates the hardware pressure of slave computer, and the instruction transmission rate of control host computer, avoid the hardware device of slave computer causes to paralyse because of too fast command rate by setting instruction buffer mechanism in the communication process of host computer and slave computer.
Description
Technical field
The present invention relates to computer realm, more particularly to a kind of buffering implementation method of interactive programmable hardware and
Device.
Background technology
In the operation of Scratch programs, if there are Infinite Cyclic, the actual motion of this usual Infinite Cyclic in program
Speed will exceed 500Hz, if there is the content with slave computer communication inside Infinite Cyclic, if without buffering, hardware instruction will be with
Speed more than 500Hz is sent to slave computer, in the case where the baud rate that the connection of most hardware uses is only 115200b/s,
Command rate of the host computer more than 500Hz easily leads to slave computer paralysis and can not work on.
The content of the invention
If in order to solve host computer described above with, without buffering, easily leading to slave computer paralysis in slave computer communication process
Paralysis and the problem of can not work on, the present invention provides a kind of the buffering implementation method and device of interactive programmable hardware
Designing scheme.
A kind of buffering implementation method of interactive programmable hardware, comprises the following steps:S1, receives operational order,
And the operational order is converted into hardware and can recognize that instruction;S2, the hardware can recognize that corresponding device number in instruction
Whether corresponding device number is identical in instruction with instruction buffer storage, when the hardware can recognize that corresponding equipment in instruction
Number with instruction buffer storage instruction in corresponding device number it is identical, then there are similar instruction, the hardware be can recognize that into finger
The corresponding similar instruction for making replacement instruction buffering area store;When the hardware can recognize that corresponding device number and instruction in instruction
The corresponding device number of instruction of buffering area storage differs, then there is no similar instruction, then whether decision instruction buffering area is deposited
Storage is full, if storage is full, the hardware can recognize that, first instruction of described instruction buffering area is replaced in instruction, if storage
Less than, then by the hardware can recognize that instruction write-in described instruction buffering area.
Specifically, the method further includes:With pre-set timing enquiry frequency timing inquiry instruction buffering area, if looking into
It is not sky to ask result, then sends all instructions in instruction buffer successively to specified slave computer, and empty described instruction buffering
Area;If query result is sky, waits and inquiring about next time.
More specifically, the timing enquiry frequency is 10~50Hz.
A kind of buffering realization device of interactive programmable hardware, including:Receiving module, for passing through human-computer interaction
Interface receives operational order;Modular converter, instruction is can recognize that for the operational order to be converted into hardware;Comparison module, than
The hardware can recognize that instruction in corresponding device number device number corresponding with the instruction that instruction buffer stores whether phase
Together, when the hardware can recognize that corresponding device number is identical with corresponding device number in the instruction that instruction buffer stores in instruction
When, then there are similar instruction, when the hardware can recognize that in instruction in instruction of the corresponding device number with instruction buffer storage
Corresponding device number differs, then there is no similar instruction;Judgment module, when the hardware can recognize that instruction and instruction buffer
When similar instruction is not present in the instruction of area's storage, whether stored for decision instruction buffering area full;Replacement module, sentences for working as
When disconnected module decision instruction buffering area storage is expired, then the hardware can recognize that the first of described instruction buffering area is replaced in instruction
Bar instructs;Writing module, for when judgment module decision instruction buffering area storage less than when, then the hardware be can recognize that into instruction
Write described instruction buffering area.
Specifically, further include instructions query module, for pre-set timer timing inquiry instruction buffering area, if
Query result is not sky, then sends all instructions in instruction buffer successively to specified slave computer, and empty described instruction and delay
Rush area;If query result is sky, waits and inquiring about next time.
In conclusion the invention has the advantages that:By being set in the communication process of host computer and slave computer
Instruction buffer mechanism, can mitigate the hardware pressure of slave computer, and control the instruction transmission rate of host computer, avoid slave computer
Hardware device causes to paralyse because of too fast command rate.
Brief description of the drawings
Fig. 1 is the flow signal of the buffering implementation method of interactive programmable hardware provided in an embodiment of the present invention
Figure.
Fig. 2 is that the flow of the buffering implementation method of another interactive programmable hardware provided in an embodiment of the present invention is shown
It is intended to.
Fig. 3 is the structure chart of the buffering realization device of interactive programmable hardware provided in an embodiment of the present invention.
Embodiment
In order to allow those skilled in the art to be best understood from technical scheme, below in conjunction with the accompanying drawings to this
Invention is further elaborated.
As shown in Figure 1, present invention is disclosed a kind of buffering implementation method of interactive programmable hardware, including it is following
Step:
S1, receives operational order, and the operational order is converted into hardware and can recognize that instruction.
S2, the hardware can recognize that the instruction of instruction and instruction buffer storage whether there is similar instruction, if depositing
The hardware then can recognize that to the corresponding similar instruction of instruction replacement instruction buffering area storage;If being not present, judgement refers to
Make buffering area whether store full, if storage is full, the hardware can recognize that the of described instruction buffering area is replaced in instruction
One instruction, if storage less than, by the hardware can recognize that instruction write-in described instruction buffering area.
Specifically, in embodiments of the present invention, the hardware can recognize that every of instruction and instruction buffer storage
Whether instruction is there are similar instruction, is specifically included:Compare the hardware and can recognize that corresponding device number and instruction are slow in instruction
Whether identical corresponding device number in the instruction of area's storage is rushed, when the hardware can recognize that corresponding device number and instruction in instruction
Corresponding device number is identical in the instruction of buffering area storage, then there are similar instruction;Corresponded to when the hardware can recognize that in instruction
Device number device number corresponding with the instruction that instruction buffer stores differ, then there is no similar instruction.For same
The distinct device (such as the equipment such as fan on experimental box, tri coloured lantern) of one hardware is both provided with different device numbers, device number
It is indicated with integer, device number can be embodied in hardware and can recognize that in instruction.In this way, the present invention is achieved that hardware can be known
Zhi Ling not be with the judgement and replacement of similar instruction in instruction buffer.
In a kind of another embodiment of the buffering implementation method of interactive programmable hardware of the present invention, such as Fig. 2
It is shown, the described method comprises the following steps (wherein step S11, S22 is identical with step S1, S2 in embodiment one, therefore no longer
It is described in detail):
S11, receives operational order, and the operational order is converted into hardware and can recognize that instruction.
S22, the hardware can recognize that the instruction of instruction and instruction buffer storage whether there is similar instruction, if depositing
The hardware then can recognize that to the corresponding similar instruction of instruction replacement instruction buffering area storage;If being not present, judgement refers to
Make buffering area whether store full, if storage is full, the hardware can recognize that the of described instruction buffering area is replaced in instruction
One instruction, if storage less than, by the hardware can recognize that instruction write-in described instruction buffering area.
S33, with pre-set timing enquiry frequency timing inquiry instruction buffering area, if query result is not sky, according to
All instructions in secondary transmission instruction buffer empties described instruction buffering area to specified slave computer;If query result is sky,
Then wait and inquiring about next time.
Specifically, in the embodiment of the present invention, the timer enquiry frequency generally set is 10~50Hz, but not limited to this look into
Frequency is ask, the time that timer starts inquiry instruction buffering area is slow much smaller than instruction is not provided with every 0.1S, timer frequency
The writing rate of 500Hz when rushing mechanism, can mitigate the hardware pressure of slave computer, and control the instruction transmission speed of host computer
Rate, the hardware device for avoiding slave computer are paralysed because of too fast instruction writing rate.
Compares figure 3, the buffering implementation method of corresponding above-mentioned interactive programmable hardware, the present invention also propose a kind of hand over
The buffering realization device of mutual formula programmable hardware, including:Receiving module, refers to for receiving operation by human-computer interaction interface
Order.
Modular converter, instruction is can recognize that for the operational order to be converted into hardware.
Comparison module, can recognize that every instruction that instruction is stored with instruction buffer whether there is for the hardware
Similar instruction.
Specifically, in embodiments of the present invention, the comparison module also particularly useful for:Compare the hardware and can recognize that instruction
In corresponding device number device number corresponding with the instruction that instruction buffer stores it is whether identical, when the hardware can recognize that finger
Corresponding device number is identical with corresponding device number in the instruction that instruction buffer stores in order, then there are similar instruction;Work as institute
State hardware and can recognize that corresponding device number device number corresponding with the instruction that instruction buffer stores differs in instruction, then
There is no similar instruction.
Replacement module, for can recognize that the instruction that instruction is stored with instruction buffer is deposited when the comparison module hardware
In similar instruction, the hardware can recognize that to the corresponding similar instruction of instruction replacement instruction buffering area storage.
In embodiments of the present invention, replacement module is additionally operable to when the storage of judgment module decision instruction buffering area is expired, then
The hardware can recognize that first instruction of described instruction buffering area is replaced in instruction.
Judgment module, for can recognize that the instruction of instruction and instruction buffer storage when the comparison module hardware not
There are during similar instruction, whether decision instruction buffering area stores full.
Writing module, for when judgment module decision instruction buffering area storage less than when, then the hardware be can recognize that into finger
Order write-in described instruction buffering area.
In embodiments of the present invention, instructions query module is further included, for referring to the timing inquiry of pre-set timer
Buffering area is made, if query result is not sky, sends all instructions in instruction buffer successively to specified slave computer, and empty
Described instruction buffering area;If query result is sky, waits and inquiring about next time.
The present embodiment is the more excellent embodiment of the present invention, and the part not being described in detail uses known maturation
Technology.It should be noted that in the case of without departing substantially from spirit of the invention and its essence, those skilled in the art work as can
Various corresponding changes and deformation are made according to the present invention, but the right that these change and deformation should all belong to appended by the present invention will
The protection domain asked.
Claims (5)
1. a kind of buffering implementation method of interactive programmable hardware, it is characterised in that comprise the following steps:
S1, receives operational order, and the operational order is converted into hardware and can recognize that instruction;
S2, the hardware can recognize that corresponding device number equipment corresponding with the instruction that instruction buffer stores in instruction
It is number whether identical, is set when the hardware can recognize that in instruction that corresponding device number is corresponding with the instruction that instruction buffer stores
Standby number identical, then there are similar instruction, the hardware can recognize that to the corresponding similar finger of instruction replacement instruction buffering area storage
Order;When the hardware can recognize that corresponding device number device number corresponding with the instruction that instruction buffer stores not phase in instruction
Together, then there is no similar instruction, then whether decision instruction buffering area has stored is expired, if storage is full, the hardware can be known
First of described instruction buffering area instruction Zhi Ling not be replaced, if storage by the hardware less than can recognize that instruction write-in institute
State instruction buffer.
2. the buffering implementation method of interactive programmable hardware according to claim 1, it is characterised in that the side
Method further includes:
With pre-set timing enquiry frequency timing inquiry instruction buffering area, if query result is not sky, sends refer to successively
All instructions in buffering area is made to specified slave computer, and empties described instruction buffering area;If query result is sky, under waiting
One query.
3. the buffering implementation method of interactive programmable hardware according to claim 2, it is characterised in that described fixed
When enquiry frequency be 10~50Hz.
A kind of 4. buffering realization device of interactive programmable hardware, it is characterised in that including:
Receiving module, for receiving operational order by human-computer interaction interface;
Modular converter, instruction is can recognize that for the operational order to be converted into hardware;
Comparison module, can recognize that for the hardware in the instruction that corresponding device number is stored with instruction buffer in instruction
Whether corresponding device number is identical, when the hardware can recognize that corresponding device number and the instruction of instruction buffer storage in instruction
In corresponding device number it is identical when, then there are similar instruction, when the hardware can recognize that corresponding device number and instruction in instruction
Corresponding device number differs in the instruction of buffering area storage, then there is no similar instruction;
Judgment module, when similar instruction is not present in the instruction for can recognize that instruction and instruction buffer storage when the hardware,
Whether decision instruction buffering area stores full;
Replacement module, for when the storage of judgment module decision instruction buffering area is expired, then the hardware can recognize that, instruction is replaced
Change first instruction of described instruction buffering area;
Writing module, for when judgment module decision instruction buffering area storage less than when, then the hardware can recognize that instruction is write
Enter described instruction buffering area.
5. the buffering realization device of interactive programmable hardware according to claim 4, it is characterised in that further include
Instructions query module, for pre-set timer timing inquiry instruction buffering area, if query result is not sky, successively
All instructions in instruction buffer is sent to specified slave computer, and empties described instruction buffering area;If query result is sky,
Wait is inquired about next time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510725188.0A CN105335305B (en) | 2015-10-30 | 2015-10-30 | The buffering implementation method and device of a kind of interactive programmable hardware |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510725188.0A CN105335305B (en) | 2015-10-30 | 2015-10-30 | The buffering implementation method and device of a kind of interactive programmable hardware |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105335305A CN105335305A (en) | 2016-02-17 |
CN105335305B true CN105335305B (en) | 2018-05-15 |
Family
ID=55285855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510725188.0A Active CN105335305B (en) | 2015-10-30 | 2015-10-30 | The buffering implementation method and device of a kind of interactive programmable hardware |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105335305B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1853151A (en) * | 2003-09-16 | 2006-10-25 | 皇家飞利浦电子股份有限公司 | Power saving operation of an apparatus with a cache memory |
CN101630269A (en) * | 2009-07-03 | 2010-01-20 | 中国人民解放军国防科学技术大学 | Block-based method for scanning object code and replacing sensitive instruction |
CN101694639A (en) * | 2009-10-15 | 2010-04-14 | 清华大学 | Computer data caching method |
CN101878467A (en) * | 2007-11-02 | 2010-11-03 | 高通股份有限公司 | Predecode repair cache for instructions that cross an instruction cache line |
CN103348333A (en) * | 2011-12-23 | 2013-10-09 | 英特尔公司 | Methods and apparatus for efficient communication between caches in hierarchical caching design |
CN103679039A (en) * | 2012-09-06 | 2014-03-26 | 北京中天安泰信息科技有限公司 | Data security storage method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8041894B2 (en) * | 2008-02-25 | 2011-10-18 | International Business Machines Corporation | Method and system for a multi-level virtual/real cache system with synonym resolution |
JP2011198091A (en) * | 2010-03-19 | 2011-10-06 | Toshiba Corp | Virtual address cache memory, processor, and multiprocessor system |
-
2015
- 2015-10-30 CN CN201510725188.0A patent/CN105335305B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1853151A (en) * | 2003-09-16 | 2006-10-25 | 皇家飞利浦电子股份有限公司 | Power saving operation of an apparatus with a cache memory |
CN101878467A (en) * | 2007-11-02 | 2010-11-03 | 高通股份有限公司 | Predecode repair cache for instructions that cross an instruction cache line |
CN101630269A (en) * | 2009-07-03 | 2010-01-20 | 中国人民解放军国防科学技术大学 | Block-based method for scanning object code and replacing sensitive instruction |
CN101694639A (en) * | 2009-10-15 | 2010-04-14 | 清华大学 | Computer data caching method |
CN103348333A (en) * | 2011-12-23 | 2013-10-09 | 英特尔公司 | Methods and apparatus for efficient communication between caches in hierarchical caching design |
CN103679039A (en) * | 2012-09-06 | 2014-03-26 | 北京中天安泰信息科技有限公司 | Data security storage method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105335305A (en) | 2016-02-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8537123B2 (en) | Touch sensing apparatus and sensing signal processing method thereof | |
EP3693843A1 (en) | Method and apparatus for designating entire area using partial area touch in a portable equipment | |
CN101945013A (en) | System and method for implementing server configuration management | |
CN106445480B (en) | Command Line Interface display methods and device | |
CN103092106A (en) | Remote intelligent interface unit and control method | |
CN102789336A (en) | Multi-screen splicing touch control method and system | |
CN105335305B (en) | The buffering implementation method and device of a kind of interactive programmable hardware | |
CN109995674B (en) | Programmable SDN switch system | |
CN101853170B (en) | Method for automatically running software on computer and USB equipment | |
CN106873796B (en) | A kind of gesture input method and system based on three-stroke digital input method | |
CN112162800A (en) | Page display method and device, electronic equipment and computer readable storage medium | |
CN104468404B (en) | A kind of buffer configuration method and device | |
CN106775114A (en) | The man-machine interaction ring and its exchange method of a kind of use capacitance touch | |
CN206431597U (en) | A kind of man-machine interaction ring of use capacitance touch | |
CN101335610B (en) | ARP synchronization method in high-side Ethernet network switch | |
CN102710356A (en) | Real time redundancy master station data synchronization method | |
CN105812859B (en) | A kind of data processing method and system of module TV incoming event | |
CN101344826B (en) | Touch inductor and its induction signal processing method | |
CN105491183A (en) | Electronic equipment | |
CN106303443A (en) | Home cinema instrument | |
CN104461333A (en) | Switching method of multiple desktop starters | |
CN102364439A (en) | Window rapid movement method and device of distributed processing system | |
CN103902202A (en) | Processing method and electronic device | |
CN207573372U (en) | It is communicated based on host computer RS485 and realizes the communication device of half-duplex simulation full duplex | |
CN102508593A (en) | Method for opening webpage in new webpage tab window by means of double-click of hyperlink by fingers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Longgang District of Shenzhen City, Guangdong province 518000 Bantian street gang snow road No. 2018, Cheonan cloud Valley an industrial park building 3 floor B block 21 unit 2103 Applicant after: Shenzhen Labplus Science and Education Culture Co., Ltd. Address before: 518000 Guangdong city of Shenzhen province Baoan District Longhua streets Hua Ning Road new Wai Industrial Zone second fifth three or four floor Applicant before: Shenzhen Seneasy Industrial Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |