CN107102921A - It is a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC - Google Patents

It is a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC Download PDF

Info

Publication number
CN107102921A
CN107102921A CN201710179456.2A CN201710179456A CN107102921A CN 107102921 A CN107102921 A CN 107102921A CN 201710179456 A CN201710179456 A CN 201710179456A CN 107102921 A CN107102921 A CN 107102921A
Authority
CN
China
Prior art keywords
digital quantity
type digital
port
asynchronous
status
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.)
Granted
Application number
CN201710179456.2A
Other languages
Chinese (zh)
Other versions
CN107102921B (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.)
China Academy of Launch Vehicle Technology CALT
Beijing Aerospace Automatic Control Research Institute
Original Assignee
China Academy of Launch Vehicle Technology CALT
Beijing Aerospace Automatic Control Research Institute
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 China Academy of Launch Vehicle Technology CALT, Beijing Aerospace Automatic Control Research Institute filed Critical China Academy of Launch Vehicle Technology CALT
Priority to CN201710179456.2A priority Critical patent/CN107102921B/en
Publication of CN107102921A publication Critical patent/CN107102921A/en
Application granted granted Critical
Publication of CN107102921B publication Critical patent/CN107102921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC, I/O type digital quantity states are recorded using I/O type digital quantity status ports in real time;Using the nearest I/O types digital quantity status port value of the most n times of I/O type digital quantity asynchronous data port real-time storages and change frequency;The change of I/O type digital quantity status ports is responded using interrupt response program, the nearest nCount upset situation of change of each I/O types digital quantity described in analysis I/O type digital quantity asynchronous datas port.The present invention is using I/O types digital quantity change record and the asynchronous system read, it is ensured that the performance requirement to processor is reduced on the basis of high real-time, improves the sensitiveness of I/O types digital quantity change;The problem of overcoming same port software and hardware asynchronous read and write is compared using multiple read repeatedly, the reliability being monitored to the variable condition of the I/O type digital quantities of input and fidelity is improved.

Description

It is a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC
Technical field
The present invention relates to a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous datas port SoC, for pair I/O type digital quantities in flush type circuit system are monitored in real time, belong to real-time inspection and control field.
Background technology
I/O type digital quantities are the class signals usually monitored in embedded system.It is usually as in embedded system Switching signal, conversion of the control system from a state to another state in the running of system.Therefore, to I/O types Digital quantity, which carries out monitoring in real time, can help to be best understood from the running status of system and operation process, be easy to timely correcting system Deviation is run, system operation rhythm is adjusted, running efficiency of system is improved.
The digital quantity monitoring method of common I/O types can be divided into two classes:Circulating sampling method and change detection method.Circulating sampling The basic ideas of method are the I/O type digital quantities being detected by high-density sampling, and record the result sampled every time, by adopting Sample result is counted to be distributed to obtain I/O types digital quantity in the time domain of low and high level.The advantage of this method is can be square It is easy to know in real time the level state of each moment I/O type digital quantities, the minimum for the I/O type digital quantities that this method can be monitored Pulsewidth depends on sampling processing efficiency, for real-time statistics I/O type digital quantity historical variations rules, level duration and electricity The flat change moment just seems that some are unable to do what one wishes, obtains preferable noise monitoring result and usually requires more complicated hardware and soft Part, which coordinates, to be completed;Another kind of change detection method responds the upper lower edge of I/O types digital quantity change by interrupting, and passes through detection The rising edge and trailing edge of I/O type digital quantities differentiates the state change moment of I/O type digital quantities, above and below this method is only recorded The variable condition on edge, the information of each sampling instant is not counted, will so as to the appropriate reduction sample frequency in error range Ask, it is allowed to multitask crossing operation, but the minimum pulse width of I/O type digital quantities that can monitor of this method is larger dependent on interrupting The time of service processing.If the change of first I/O types digital quantity also it is untreated finish when new I/O type digital quantities occur again, The loss of new change state can caused.
The content of the invention
The technology of the present invention solves problem:Overcome prior art not enough different towards band I/O type digital quantities there is provided one kind Port SoC digital quantity monitoring method is walked, asynchronous change detection method is overcome in asynchronous parsing digital quantity change information and record number Digital information caused by the read/write conflict of word amount change information, which is lost, or transformation period information record is incorrect is brought Technical difficulty, realize height reliably the change information of I/O types digital quantity in system is monitored in real time.
The present invention technical solution be:It is a kind of towards the digital quantity monitoring side with I/O type digital quantity asynchronous ports SoC Method, the band I/O type digital quantities asynchronous port includes I/O type digital quantity status ports and I/O type digital quantity asynchronous datas port, The I/O types digital quantity status port, for recording M parallel I/O type digital quantity states, M >=1, the I/O types number in real time Word amount asynchronous data port, the I/O type digital quantity status port value nearest for the most n times of real-time storage and change frequency, when When I/O type digital quantity status ports change, I/O type digital quantity asynchronous datas port updates immediately, and produces interrupt requests, SoC response interrupt requests perform following steps:
(1), by reading I/O type digital quantity asynchronous datas port, while obtaining the nearest I/O type digital quantities of most n times Status port value and change frequency, nCount is designated as by the change frequency, and SoC enters to I/O type digital quantity asynchronous datas port Row read operation has " reading " function to the change frequency stored in I/O type digital quantity asynchronous datas port, and described reset is grasped Make write operation when priority updates higher than I/O type digital quantity asynchronous datas port;
(2) I/O type digital quantity status ports, are read, I/O type digital quantity status port values are obtained;
(3), according to the nearest I/O type numbers of most n times described in the I/O type digital quantity asynchronous datas port that obtains recently Word amount status port value and current nCount values, each I/O types number described in analysis I/O type digital quantity asynchronous datas port The nearest nCount upset situation of change of word amount;
(4) the newest I/O type digital quantity shapes described in I/O type digital quantity asynchronous datas port, obtained more recently Whether state port value is consistent with the I/O type digital quantity status port values obtained recently from I/O type digital quantities status port, if one Cause, end interrupt processing procedure;Otherwise, it is transferred to step (5);
(5), by the nearest I/O types numeral of most n times described in the I/O type digital quantity asynchronous datas port obtained recently Measure status port value and nCount is preserved, I/O type digital quantity asynchronous datas end is again read off according to the described mode of step (1) Mouthful, obtain the nearest I/O types digital quantity status port value of most n times described in I/O type digital quantity asynchronous datas ports and change Change number of times;
(6) I/O type digital quantity status ports, are again read off, I/O type digital quantity status port values are obtained;
(7) the nearest I/O type numbers of most n times acquired in nearest twi-read I/O types digital quantity asynchronous data port, are contrasted Word amount status port value, analysis obtains I/O type digital quantities between nearest twi-read I/O types digital quantity asynchronous data port operation The real change number of times of status port value, nCount is designated as by this change frequency, re-executes step (3)~step (7).
I/O types digital quantity status port value is to be filtered processing to I/O type digital quantity asynchronous ports in the step (2) The value gone after flash removed or interference.
The decision method that the I/O types digital quantity status port value changes is:By I/O type digital quantity status port values Xor operation is carried out with the newest I/O type digital quantity status ports value that is stored in I/O type digital quantity asynchronous datas port, if different Or result is not 0, then illustrates that I/O type digital quantity status ports change;Otherwise it is assumed that I/O type digital quantities status port is not Change.
The most n times of the step (3) according to described in the I/O type digital quantity asynchronous datas port obtained recently are nearest I/O types digital quantity status port value and nCount, each I/O types number described in analysis I/O type digital quantity asynchronous datas port Word amount it is nearest nCount times upset situation of change specific method be:In the I/O type digital quantity asynchronous datas port obtained recently In the I/O type digital quantity status port values of described nearest nCount upset, according to order from the old to the new, by each I/O types digital quantity status port value is entered with the I/O type digital quantity status port values before the I/O type digital quantity status port value changes Line position compares, when being changed each time each I/O types digital quantity overturn situation of change, until all nCount times recently I/O type digital quantity status port values, which are all compared, to be finished, and obtains all nCount I/O types digital quantity upset situations of change, first During secondary execution during this step, the value before default I/O type digital quantity status port value changes is I/O type digital quantity original states Value.
Described (7) contrast the at most nearest I/O of n times acquired in nearest twi-read I/O types digital quantity asynchronous data port Type digital quantity status port value, analysis obtains I/O type numbers between nearest twi-read I/O types digital quantity asynchronous data port operation The specific method of the actual change number of times of word amount status port value is:
(7.1) change frequency described in the I/O type digital quantity asynchronous datas port read recently, is extracted, this is changed Number of times is actual as I/O type digital quantity status ports value between nearest twi-read I/O types digital quantity asynchronous data port operation Change frequency valuation C;
(7.2), the I/O type digital quantity status port numbers recorded in the I/O type digital quantity asynchronous datas port read recently In, the newest I/O type digital quantity status port values before C change of I/O type digital quantities status port generation are found, and sentence The value of breaking and the newest I/O type digital quantity status port values described in the secondary I/O type digital quantity asynchronous datas port closely read It is whether identical, if identical, then it is assumed that currently practical change frequency valuation C is exactly twi-read I/O type digital quantity asynchronous datas The change frequency that I/O types digital quantity status port value is actually occurred between port, terminates;Otherwise, step (7.3) is performed;
(7.3), add 1 using currently practical change frequency valuation C, update actual change number of times valuation C, reality after renewal When change frequency valuation C in border is equal to N, N is regard as I/O between nearest twi-read I/O types digital quantity asynchronous data port operation The actual change number of times of type digital quantity status port value, terminates;When the actual change number of times valuation C after the renewal is less than N, Repeat step (7.2)~step (7.3).
Compared with the prior art, the invention has the advantages that:
(1) it, can realize that the I/O variable conditions having occurred and that are read on SoC sides, while side records occurent I/O shapes State changes, and observation or logger task can only be performed by logically thoroughly solving synchronization in conventional monitoring methods, be caused Frequently the I/O type digital quantities change information of the generation between response observation and logger task in handoff procedure loses problem, so as to protect The real-time of record has been demonstrate,proved, the sensitiveness of I/O types digital quantity change is improved;
(2), the digital quantity monitoring method of traditional I/O types is often only capable of responding one-shot change, this hair within the extremely short time Bright methods described can record multiple change simultaneously by I/O type digital quantity asynchronous datas port, it is to avoid the I/O arrived in short-term The loss of lower edge on type digital quantity;
(3), in the digital quantity monitoring method of described asynchronous I/O type, the critical resource scope between asynchronous task is minimized, The resolution policy of critical resource competition is proposed simultaneously, it is to avoid the digital quantitative change of small probability I/O type caused by critical resource competition Change record loss problem.
(4), the present invention is filtered processing for I/O type digital quantity asynchronous ports and goes after flash removed or interference to enter again Row state change is adjudicated, and can prevent influence of the external disturbance to judgement, increases the complexity of judgement, extends time decision.
Brief description of the drawings
Fig. 1 is the embodiment of the present invention towards digital quantity monitoring method flow with I/O type digital quantity asynchronous ports SoC Figure;
Fig. 2 is the process chart of analysis I/O types digital quantity upset situation of change in the embodiment of the present invention.
Embodiment
The present invention will be described in detail with specific embodiment below in conjunction with the accompanying drawings.
I/O type digital quantities are common a kind of information representations in electronic equipment, embedded with regard to being directed in electronic system I/O type digital quantities enter line asynchronous, and monitoring can easily understand the state change of embedded system in the process of running in real time.
The invention provides a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC, real-time statistics I/O type digital quantity historical variations rules, using specific embodiment, the present invention is described in detail below.
Embodiment
The present embodiment is monitored using the method for the invention to 64 road I/O type digital quantities, the road I/O types numerals of Jiang Gai 64 Amount is divided into 8 groups, and every group includes 8 parallel I/O type digital quantities, so, one asynchronous end of I/O type digital quantities of each group of correspondence Mouthful.SOC is independently monitored to each I/O types digital quantity asynchronous port.
One I/O type digital quantities asynchronous port one I/O type digital quantity status port of correspondence and an I/O type digital quantity are different Step data port.I/O type digital quantities status port is used to record 8 parallel I/O type digital quantity states in real time;For the side of expression Just, I/O types digital quantity asynchronous data port (is designated as IO_DATA_BUF by two 32 bit registers2iAnd IO_DATA_BUF2i+1) Come real-time storage most 7 times nearest I/O types digital quantity status port values and change frequency.8 I/O type digital quantity asynchronous datas Realized using 16 32 bit register IO_DATA_BUF0~IO_DATA_BUF15 port.8 I/O type digital quantity status ports It can be realized using two 32 bit registers (being designated as IO_STATUS and IO_STATUS 1).
Each corresponding register format in I/O type digital quantity asynchronous datas port is defined as follows:
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
IO_DATA_BUF2i Data2 Data1 Data0 n_Count
IO_DATA_BUF2i+1 Data6 Data5 Data4 Data3
Wherein IO_DATA_BUF2iPort from low to high four eight respectively are:Eight I/O types digital quantity changes Number of times, the state after eight newest one-shot changes of I/O type digital quantities, the shape after eight new one-shot changes of I/O types digital quantities time The state of state, eight I/O types digital quantities again after new one-shot change;IO_DATA_BUF2i+1Port from low to high four eight It respectively is in IO_DATA_BUF2iBefore the three I/O types digital quantities change recorded:Eight I/O type digital quantities newest one State after secondary change, the state after eight new one-shot changes of I/O types digital quantities time, eight I/O types digital quantities again it is new once State after the oldest one-shot change of state after change, the eight I/O type digital quantities recorded;IO_DATA_BUF0's is low by eight Position n_Count, for the position of the number of times for recording eight I/O types digital quantity changes.I=1~8, represent i-th of I/O types numeral Measure asynchronous port.
I/O types digital quantity status port register and its position packet and I/O type digital quantity asynchronous data port registers Correspondence situation is as follows:
The situation of change using least-significant byte I/O state is described in more detail as embodiment below, the IO of other groups Quantity of state situation of change is handled with low eight state change situations.
In order to prevent external disturbance or burr from causing I/O type digital quantities unstable state, I/s of the SOC all to outside input occur O-shaped digital quantity is filtered processing to go flash removed or interference, and therefore, I/O type digital quantity status port values are to I/O type numbers Word amount asynchronous port is filtered the value that processing is gone after flash removed or interference, and reflection is that current I/O types digital quantity is current Input state.
The present embodiment is by I/O type digital quantity status port value Data and I/O type digital quantity asynchronous datas port IO_DATA_ The newest I/O type digital quantity status port values Data0 stored in BUF0 takes xor operation, judges I/O type digital quantities successively Whether status port value changes.
If XOR result is not 0, illustrate that I/O type digital quantity status ports change;Otherwise it is assumed that I/O types are digital Amount status port does not change.
If XOR result is not 0, i.e., filtered input data and current data mode are inconsistent, illustrate I/O type numbers Word amount status port changes;
If or result is 0, i.e., filtered input data is consistent with current data mode, then it is assumed that I/O types numeral Amount status port does not change, does not process.
When I/O type digital quantity status ports are one or more to change, I/O type digital quantity asynchronous datas port is stood Update, detailed process is:N-th data are entered as the N-1 data, and the N-2 data is the N-1 data, successively class Push away, the 1st data are entered as the 0th data, and the 0th data is after the newest one-shot changes in I/O type digital quantity asynchronous data ports I/O states, plus 1 for recording the change frequency n_Count of number of times of W I/O types digital quantity changes.I.e. by IO_DATA_BUF0 High 24 and give Data0 fields by newest Data to moving to left 8, while complete Jia 1 to n_Count to operate, and to SoC lifts breakout service request signal.
If the IO_DATA_BUF0 and IO_DATA_BUF1 of original state state are as follows,
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
IO_DATA_BUF0 1111 1110b 1101 1010b 0101 1010b 0
IO_DATA_BUF1 0000 1000b 0000 1100b 1000 1100b 1000 1110b
If the Data now read is 01011010b, because the value of Data0 in the value and current IO_DATA_BUF0 is one Sample, IO_DATA_BUF0 and IO_DATA_BUF1 state do not change.
If it is 01011011b to test the Data read, due to the XOR knot of Data0 in the value and current IO_DATA_BUF0 Fruit is 0000 0001b, is not 0, therefore Data values are charged at Data0, and it is 1, amended IO_ to change n_Count values DATA_BUF0 and IO_DATA_BUF1 values are as follows:
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
IO_DATA_BUF0 1101 1010b 0101 1010b 0101 1011b 1
IO_DATA_BUF1 0000 1100b 1000 1100b 1000 1110b 1111 1110b
Now, because the value in n_Count is 1, so lifting interruption to SoC, SoC responses are waited.SoC responses are interrupted please Ask, the interrupt service routine operated in SoC starts execution after interrupt requests are received, as shown in figure 1, interrupt service routine is held Row step is as follows:
(1) I/O type digital quantity asynchronous datas port IO_DATA_BUF0 and IO_DATA_BUF1 value, is successively read to becoming Measure in Buf_New0 and Buf_New1;
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
Buf_New0 1101 1010b 0101 1010b 0101 1011b 1
Buf_New1 0000 1100b 1000 1100b 1000 1110b 1111 1110b
SoC carries out read operation to I/O type digital quantity asynchronous datas port to being stored in I/O type digital quantity asynchronous datas port Change frequency there is " reading " function, i.e., in read data register, n_Count fields in data register are by while clear Zero, and the clear operation priority is higher than write operation when I/O type digital quantity asynchronous datas port updates, now, deposit Device IO_DATA_BUF0 and IO_DATA_BUF1 value are changed into:
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
IO_DATA_BUF0 1101 1010b 0101 1010b 0101 1011b 0
IO_DATA_BUF1 0000 1100b 1000 1100b 1000 1110b 1111 1110b
(2) I/O type digital quantity status port IO_STATUS, are read, I/O type digital quantity status port values are obtained, by assignment To in variable i oStatus;
If now IO_STATUS states do not change, ioStatus value is changed into 01011011b, in order to illustrate this The effect of algorithm, it is assumed that at this moment, the filtered values of IO_STATUS change again, it is assumed that be changed into 0101 1001b, now The changing value is write into register IO_DATA_BUF0 and IO_DATA_BUF1 process and SoC interrupt handling routine enters simultaneously OK, when being updated n_Count, SoC interrupt service routines are reading register IO_DATA_BUF0 and IO_DATA_ BUF1 value, now SoC trigger n_Count clearing write operation, and external hardware triggering n_Count Jia one operate, now The n_Count resource contention write conflicts of generation, in order to ensure that clearing process operations of the SoC when reading data is normal so that program Operation is correct, and the priority of writing of SoC interrupt service routines writes priority higher than external hardware, therefore in the feelings of resource write conflict N_Count values are 0 under condition.The value that now ioStatus is read is 0101 1001b, and register IO_DATA_BUF0 and IO_ DATA_BUF1 value is changed into following state:
(3), according to the nearest I/O type numbers of most n times described in the I/O type digital quantity asynchronous datas port that obtains recently Word amount status port value and nCount, now nCount is 1, each described in analysis I/O type digital quantity asynchronous datas port The nearest nCount upset situation of change of I/O type digital quantities, be specially:, will according to order from the old to the new or from the new to the old Each I/O types digital quantity status port value and the I/O type digital quantity states before the I/O type digital quantity status port value changes Port value carries out bit comparison, and each I/O types digital quantity overturns situation of change when being changed each time, until all nCount Secondary nearest I/O type digital quantity status port values, which are all compared, to be finished, and obtains all nCount I/O types digital quantity upset change feelings Condition, when performing for the first time during this step, at the beginning of the value before default I/O type digital quantity status port value changes is I/O type digital quantities Beginning state value.
In the present embodiment, when being compared every time using maintenance variable i o_old records, I/O type digital quantity status ports value becomes I/O type digital quantity status port values before change, specific steps are as shown in Figure 2.
(3.1) when, performing for the first time during this step, initialization maintenance variable i o_old is I/O type digital quantity initial shapes State value, under current state, io_old value is 0101 1010b;
(3.2) field of the number of times of eight I/O types digital quantities of record change in Buf_New0, is read to variable nCursor In, now nCursor is 1.
(3.3) state after I/O types digital quantity change oldest in Buf_New0 or Buf_New1, is read to assign io_new;
Io_new variables are assigned to due to there was only one-shot change, therefore by Data0 field portions.Io_new after then replicating Variable is 0101 1011b.
(3.4), compare position changes of the io_new relative to io_old, and changed according to corresponding position, i.e., it is upper along or under Along between at the beginning of record I/O types digital quantity change respectively and the end time;
It can be obtained after the 1010b of value 0101 and io_new that now compare the io_old 1011b of value 0101, lowest order pair The I/O state answered becomes 1 by 0, therefore corresponding IO is remembered on once along information.
(3.5) new nCursor is obtained after, subtracting 1 by nCursor values;
(3.6) if, nCursor not be 0, repeat step (3.3)~step (3.6);Tied if nCursor is 0 Beam processing.Because now nCount is 0, so being performed without jumping to step 3 again.
(4) the newest I/O type digital quantity shapes described in I/O type digital quantity asynchronous datas port, obtained more recently State port value (Bit15~Bit8 in Buf_New0) and the I/O type digital quantities obtained recently from I/O type digital quantities status port Whether status port value (variable i oStatus) is consistent:
If consistent, the processing procedure of end interrupt request;
If inconsistent, step 5 is carried out.
Now the variable in ioStatus is 0101 1001b, and the last state in Buf_New0 is 01011011b, two Person is different, it is therefore desirable to perform step 5.
N_Count this field in I/O type digital quantity asynchronous datas port IO_DATA_BUF0 is external hardware part With a critical resource of SoC interrupt handling routines, it is in the case of concurrent working, it may occur that competition situation about writing, i.e., same The problem of port software and hardware asynchronous read and write.When some I/O type digital quantity changes, interrupt service processing logic and start to hold OK, I/O type digital quantity asynchronous datas port can be read out during its execution, and if this stylish I/O type digital quantity Change causes the renewal of new state in I/O type digital quantity asynchronous datas port, now the number of times meeting of eight I/O types digital quantity changes The change frequency of new change can not be recorded, the situation for causing possible I/O types digital quantity change to lose occurs.This step be in order to Examine and whether conflict phenomenon occur when reading I/O type digital quantity asynchronous data ports, digital quantity occurs if there is conflict Information is lost or the incorrect problem of transformation period information record, is further detected using subsequent step.
(5), preserve in Buf_New0 to Buf_Old0, preserve in Buf_New1 to Buf_Old1, according to the institute of step (1) The mode stated again reads off I/O type digital quantity asynchronous datas port, obtains described in I/O type digital quantity asynchronous datas port most The nearest I/O types digital quantity status port value of many n times and change frequency.
Buf_Old0 and Buf_Old1 has backed up the value in Buf_New0 and Buf_New1 one time.I.e.:
I/O type digital quantity asynchronous datas port IO_DATA_BUF0 and IO_DATA_BUF1 value is successively read again to becoming Measure in Buf_New0 and Buf_New1;
If before this step process, the filtered values of I/O type digital quantity status port IO_STATUS are become twice again Change, I/O type digital quantity status ports IO_STATUS value, which experienced from 0101 1001b, is changed into 0111 1001b, then again It is changed into 0011 1001b process.Then now I/O types digital quantity asynchronous data port IO_DATA_BUF0 and IO_DATA_BUF1 In value become be as follows:
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
IO_DATA_BUF0 0101 1001b 0111 1001b 0011 1001b 2
IO_DATA_BUF1 1111 1110b 1101 1010b 0101 1010b 0101 1011b
Above-mentioned steps are due to no read-write I/O type digital quantity asynchronous datas port IO_DATA_BUF0 and IO_DATA_BUF1 Process, therefore read/write conflict will not be caused, n_Count fields are correctly written in by external hardware processing equipment.
After this step, the value in Buf_Old0, Buf_Old1, Buf_New0 and Buf_New1 is as follows:
Bit31~Bit24 Bit23~Bit16 Bit15~Bit8 Bit7~Bit0
Buf_New0 0101 1001b 0111 1001b 0011 1001b 2
Buf_Old0 1101 1010b 0101 1010b 0101 1011b 1
Buf_New1 0000 1100b 1000 1100b 1000 1110b 1111 1110b
Buf_Old1 1111 1110b 1101 1010b 0101 1010b 0101 1011b
Buf_New0 and Buf_New1 reflect current newest IO_DATA_BUF0 and IO_DATA_BUF1 state.
(6) I/O type digital quantity status ports, are again read off, I/O type digital quantity status port values are obtained;
Because IO_STATUS now does not change, therefore, ioStatus is read or 00111001b.
(7) the nearest I/O type numbers of most n times acquired in nearest twi-read I/O types digital quantity asynchronous data port, are contrasted Word amount status port value, analysis obtains I/O type digital quantities between nearest twi-read I/O types digital quantity asynchronous data port operation The real change number of times of status port value, nCount is designated as by this change frequency, re-executes step (3)~step (7).Specifically For:
(7.1) change frequency described in the I/O type digital quantity asynchronous datas port read recently, is extracted, this is changed Number of times is actual as I/O type digital quantity status ports value between nearest twi-read I/O types digital quantity asynchronous data port operation Change frequency valuation C;
(7.2), the I/O type digital quantity status port numbers recorded in the I/O type digital quantity asynchronous datas port read recently In, the newest I/O type digital quantity status port values before C change of I/O type digital quantities status port generation are found, and sentence The value of breaking and the newest I/O type digital quantity status port values described in the secondary I/O type digital quantity asynchronous datas port closely read It is whether identical, if identical, then it is assumed that currently practical change frequency valuation C is exactly twi-read I/O type digital quantity asynchronous datas The change frequency that I/O types digital quantity status port value is actually occurred between port, terminates;Otherwise, step (7.3) is performed;
(7.3), add 1 using currently practical change frequency valuation C, update actual change number of times valuation C, reality after renewal When change frequency valuation C in border is equal to N, N is regard as I/O between nearest twi-read I/O types digital quantity asynchronous data port operation The actual change number of times of type digital quantity status port value, terminates;When the actual change number of times valuation C after the renewal is less than N, Repeat step (7.2)~step (7.3).
In the present embodiment, in above-mentioned processing procedure, I/O type digital quantity status ports IO_STATUS state change 3 It is secondary, but due to read/write conflict, the record of one-shot change is lost, so value current n_Count is 2, it is true as what is assumed using 2 Real change frequency.
The value of n_Count in Buf_New0, the Data from Buf_New0 or Buf_New1n_CountStart, To old data field direction finding first and the state consistency after eight newest one-shot changes of I/O type digital quantities in Buf_Old0 Data, until finding target or beyond data field;
Because current n_Count value is 2, so since Buf_New0 Data2, searching Buf_New0's successively Data2, Buf_New1 Data3, Data4, Data5, Data6, find the position equal with Buf_Old0 Data0 values.
If terminating to find target, the subscript of Buf_New0 current datas is regard as new nCount;If not find Target terminates Step2, then is used as new nCount using 7.
Now Buf_New1 Data3 and Buf_Old0 Data0 are equal, under the Buf_New1 corresponding data of Data3 It is designated as 3.Therefore nCount is entered as 3.
In summary, the present invention can realize that the I/O variable conditions having occurred and that are read on SoC sides, while side record is The I/O state changes of generation, observation can only be performed or record by logically thoroughly solving synchronization in conventional monitoring methods Task, causes the I/O types digital quantity of the generation between frequent response observation and logger task in handoff procedure to change loss problem, So as to ensure that the real-time of record.And in the digital quantity monitoring method of described asynchronous I/O type, minimize between asynchronous task Critical resource scope, while proposing the resolution policy of critical resource competition, it is to avoid small general caused by critical resource competition Rate I/O types digital quantity change record loss problem, realizes high change information in real time reliably to I/O types digital quantity in system It is monitored.
The real-time monitoring that the present invention can be used to solving I/O type digital quantities in the embedded system of a variety of application fields is asked Topic.
The non-detailed description of the present invention is known to the skilled person technology.

Claims (5)

1. it is a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC, it is characterised in that:The band I/O types Digital quantity asynchronous port includes I/O type digital quantity status ports and I/O type digital quantity asynchronous datas port, the I/O types numeral Status port is measured, for recording M parallel I/O type digital quantity states, M >=1, the I/O types digital quantity asynchronous data in real time Port, the I/O type digital quantity status port value nearest for the most n times of real-time storage and change frequency, when I/O type digital quantity shapes When state port changes, I/O type digital quantity asynchronous datas port updates immediately, and produces interrupt requests, and SoC responses are interrupted please Seek execution following steps:
(1), by reading I/O type digital quantity asynchronous datas port, while obtaining the nearest I/O type digital quantity states of most n times Port value and change frequency, nCount is designated as by the change frequency, and SoC is read I/O type digital quantity asynchronous datas port Operate has " reading " function to the change frequency stored in I/O type digital quantity asynchronous datas port, and the clear operation is excellent Write operation when first level updates higher than I/O type digital quantity asynchronous datas port;
(2) I/O type digital quantity status ports, are read, I/O type digital quantity status port values are obtained;
(3), according to the nearest I/O type digital quantities of most n times described in the I/O type digital quantity asynchronous datas port that obtains recently Status port value and current nCount values, each I/O types digital quantity described in analysis I/O type digital quantity asynchronous datas port Nearest nCount upset situation of change;
(4) the newest I/O type digital quantity states end described in the I/O type digital quantity asynchronous datas port, obtained more recently Whether mouth value is consistent with the I/O type digital quantity status port values obtained recently from I/O type digital quantities status port, if unanimously, End interrupt processing procedure;Otherwise, it is transferred to step (5);
(5), by the nearest I/O type digital quantity shapes of most n times described in the I/O type digital quantity asynchronous datas port obtained recently State port value and nCount are preserved, and I/O type digital quantity asynchronous datas port is again read off according to the described mode of step (1), Obtain the nearest I/O types digital quantity status port value of most n times described in I/O type digital quantity asynchronous datas port and change secondary Number;
(6) I/O type digital quantity status ports, are again read off, I/O type digital quantity status port values are obtained;
(7) the nearest I/O type digital quantities of most n times acquired in nearest twi-read I/O types digital quantity asynchronous data port, are contrasted Status port value, analysis obtains I/O type digital quantity states between nearest twi-read I/O types digital quantity asynchronous data port operation The real change number of times of port value, nCount is designated as by this change frequency, re-executes step (3)~step (7).
2. it is according to claim 1 a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC, its It is characterised by:I/O types digital quantity status port value is to be filtered place to I/O type digital quantity asynchronous ports in the step (2) The value that reason is gone after flash removed or interference.
3. it is according to claim 2 a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC, its It is characterised by:The decision method that the I/O types digital quantity status port value changes is:By I/O type digital quantity status ports Value carries out xor operation with the newest I/O type digital quantity status ports value stored in I/O type digital quantity asynchronous datas port, if XOR result is not 0, then illustrates that I/O type digital quantity status ports change;Otherwise it is assumed that I/O type digital quantity status ports Do not change.
4. it is according to claim 1 a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC, its It is characterised by:Most n times of the step (3) according to described in the I/O type digital quantity asynchronous datas port obtained recently are nearest I/O types digital quantity status port value and nCount, each I/O types described in analysis I/O type digital quantity asynchronous datas port Digital quantity it is nearest nCount times upset situation of change specific method be:At the I/O type digital quantity asynchronous datas end obtained recently , will be each according to order from the old to the new in the I/O type digital quantity status port values of nearest nCount upset described in mouthful Individual I/O types digital quantity status port value and the I/O type digital quantity status port values before the I/O type digital quantity status port value changes Bit comparison is carried out, each I/O types digital quantity overturns situation of change when being changed each time, until all nCount times nearest I/O type digital quantity status port values all compare and finish, obtain all nCount I/O types digital quantities upset situations of change, the When once performing during this step, the value before default I/O type digital quantity status port value changes is I/O type digital quantity original states Value.
5. it is according to claim 1 a kind of towards the digital quantity monitoring side with I/O type digital quantity asynchronous datas port SoC Method, it is characterised in that:It is nearest that described (7) contrast at most n times acquired in nearest twi-read I/O types digital quantity asynchronous data port I/O type digital quantity status port values, analysis obtain I/ between nearest twi-read I/O types digital quantity asynchronous data port operation The specific method of the actual change number of times of O-shaped digital quantity status port value is:
(7.1) change frequency described in the I/O type digital quantity asynchronous datas port read recently, is extracted, by the change frequency It is used as I/O types digital quantity status port value actual change between nearest twi-read I/O types digital quantity asynchronous data port operation Number of times valuation C;
(7.2), in the I/O type digital quantity status port data that the I/O type digital quantity asynchronous datas port read recently is recorded, The newest I/O type digital quantity status port values before C change of I/O type digital quantities status port generation are found, and judge to be somebody's turn to do Whether the newest I/O type digital quantity status ports value described in value and the secondary I/O type digital quantity asynchronous datas port closely read It is identical, if identical, then it is assumed that currently practical change frequency valuation C is exactly twi-read I/O type digital quantity asynchronous datas port Between the change frequency that actually occurs of I/O type digital quantity status port values, terminate;Otherwise, step (7.3) is performed;
(7.3), add 1 using currently practical change frequency valuation C, update actual change number of times valuation C, actual change after renewal When changing number of times valuation C equal to N, N is regard as I/O type numbers between nearest twi-read I/O types digital quantity asynchronous data port operation The actual change number of times of word amount status port value, terminates;When the actual change number of times valuation C after the renewal is less than N, repeat Perform step (7.2)~step (7.3).
CN201710179456.2A 2017-03-23 2017-03-23 Digital quantity monitoring method for SoC (system on chip) with I/O (input/output) type digital quantity asynchronous port Active CN107102921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710179456.2A CN107102921B (en) 2017-03-23 2017-03-23 Digital quantity monitoring method for SoC (system on chip) with I/O (input/output) type digital quantity asynchronous port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710179456.2A CN107102921B (en) 2017-03-23 2017-03-23 Digital quantity monitoring method for SoC (system on chip) with I/O (input/output) type digital quantity asynchronous port

Publications (2)

Publication Number Publication Date
CN107102921A true CN107102921A (en) 2017-08-29
CN107102921B CN107102921B (en) 2020-05-12

Family

ID=59675657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710179456.2A Active CN107102921B (en) 2017-03-23 2017-03-23 Digital quantity monitoring method for SoC (system on chip) with I/O (input/output) type digital quantity asynchronous port

Country Status (1)

Country Link
CN (1) CN107102921B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030544A (en) * 2022-12-30 2023-04-28 深圳科瑞技术股份有限公司 Method and device for recording debugging data of automation equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796720A (en) * 1995-07-05 1998-08-18 Fujitsu Limited Control method of asynchronous data communications
WO2004049159A2 (en) * 2002-11-22 2004-06-10 Continental Teves Ag & Co. Ohg Device and method for analysing embedded systems
CN1845028A (en) * 2005-09-19 2006-10-11 上海电器科学研究所(集团)有限公司 Long-distance IO digital value module with Profibus-DP bus interface
CN2896347Y (en) * 2005-09-19 2007-05-02 上海电器科学研究所(集团)有限公司 Remote 10 number-quantity module with Profibus DP bus interface
CN201576371U (en) * 2009-12-23 2010-09-08 西华大学 Remote-control teaching training system based on wide area network
CN105183688A (en) * 2015-08-28 2015-12-23 北京航天自动控制研究所 Serial port network based IO digital quantity monitoring port extension method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796720A (en) * 1995-07-05 1998-08-18 Fujitsu Limited Control method of asynchronous data communications
WO2004049159A2 (en) * 2002-11-22 2004-06-10 Continental Teves Ag & Co. Ohg Device and method for analysing embedded systems
CN1845028A (en) * 2005-09-19 2006-10-11 上海电器科学研究所(集团)有限公司 Long-distance IO digital value module with Profibus-DP bus interface
CN2896347Y (en) * 2005-09-19 2007-05-02 上海电器科学研究所(集团)有限公司 Remote 10 number-quantity module with Profibus DP bus interface
CN201576371U (en) * 2009-12-23 2010-09-08 西华大学 Remote-control teaching training system based on wide area network
CN105183688A (en) * 2015-08-28 2015-12-23 北京航天自动控制研究所 Serial port network based IO digital quantity monitoring port extension method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无: "24765-2010 - ISO/IEC/IEEE International Standard - Systems and software engineering -- Vocabulary", 《IEEE》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030544A (en) * 2022-12-30 2023-04-28 深圳科瑞技术股份有限公司 Method and device for recording debugging data of automation equipment

Also Published As

Publication number Publication date
CN107102921B (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN110135985B (en) Parallel execution method and system for transactions on block chain
CN106354590A (en) Method and apparatus for disk detection
CN105022694B (en) Method for generating test case and system for mobile terminal test
CN103488563A (en) Data race detection method and device for parallel programs and multi-core processing system
CN106776095A (en) SSD solid state hard disc data reliability intelligent detecting methods and detection means
CN104850480A (en) Method and device for testing performance of hard disk of high-density storage server
CN106910528A (en) A kind of optimization method and device of solid state hard disc data routing inspection
CN107608627A (en) A kind of remote data classification storage method, electronic equipment and storage medium
CN108170366A (en) Storage medium management method, device and storage device in storage device
US20230153189A1 (en) Visualization system for debug or performance analysis of soc systems
CN109669635A (en) Order LBA for solid-state storage main control chip is overlapped detection method and device
US9852291B2 (en) Computer system and signature verification server
CN107193738A (en) A kind of verification method that dynamic adjustment random constraints are covered based on function point
CN107290654A (en) A kind of fpga logic test structure and method
CN107102921A (en) It is a kind of towards the digital quantity monitoring method with I/O type digital quantity asynchronous ports SoC
CN102880467A (en) Method for verifying Cache coherence protocol and multi-core processor system
CN108628694A (en) A kind of data processing method and device based on programmable hardware
CN117034855B (en) Verification method and platform of hash interleaving algorithm based on UVM
CN109740335A (en) The classification method and device of identifying code operation trace
CN110457133A (en) A kind of processing method and system of operating-system resources exception
CN109298953A (en) A kind of device and method of shared drive reading and writing data
CN115966237A (en) Screening method and device for bad blocks of hard disk, storage medium and electronic device
CN109710547A (en) It is a kind of industry Internet of Things in buffer memory management design and implementation method
CN110442474A (en) A kind of data consistency checking method, system and data verification end
US20170192878A1 (en) Separating Test Coverage In Software Processes Using Shared Memory

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