System for data mapping and storing in digital three-dimensional oscilloscope
11486901 · 2022-11-01
Assignee
Inventors
- Yuhua CHENG (Chengdu, CN)
- Bo XU (Chengdu, CN)
- Kai CHEN (Chengdu, CN)
- Songting ZOU (Chengdu, CN)
- Libing BAI (Chengdu, CN)
- Hang GENG (Chengdu, CN)
- Yanjun YAN (Chengdu, CN)
- Jia ZHAO (Chengdu, CN)
Cpc classification
G01R13/206
PHYSICS
International classification
Abstract
A system maps and stores data in digital three-dimensional oscilloscope, wherein an ADC module has four ADC submodules. Four acquired waveform data are sent to an extraction module, and buffered in a FIFO module. When a trigger signal arrives, FIFO module outputs four extracted waveform data to a mapping address calculation module for calculating a mapping address and a RAM serial number for each point data, and the waveform data comparison and control module performs the reading and writing control of the 4×N dual port RAMs. When mapping number reaches a frame number, the RAM array module outputs its waveform probability values to the upper computer module to convert each value into RBG values, and the display module displays the waveforms of input signals of four channels on a screen according the RBG values.
Claims
1. A system for data mapping and storing in digital three-dimensional oscilloscope, comprising: an upper computer module; an Analog-to-Digital Convertor (ADC) module, which comprises four ADC submodules respectively corresponding to four channels, wherein the four ADC submodules respectively acquire the input signals of the four channels and output four waveform data ADC_DATA_1, ADC_DATA_2, ADC_DATA_3, ADC_DATA_4, the resolutions of the four ADC submodules all are M bits, the number of the data points outputted by an ADC submodule in one synchronization period of the data output synchronization clock is N; an extraction module, wherein the extraction module receive the four waveform data ADC_DATA_1, ADC_DATA_2, ADC_DATA_3, ADC_DATA_4 and respectively extract data from them according to a numerical divisor set by the upper computer module, and four extracted waveform data DATA_IN_1, DATA_IN_2, DATA_IN_3, DATA_IN_4 are obtained and denoted by extracted waveform data DATA_IN_i, i=1,2,3,4, i is the serial number of channel; if the divisor is less than N, the extraction mode is denoted by extraction mode A, N points of data of an extracted waveform data DATA_IN_i are combined into one data of an extracted waveform data EXTRACT_DATA_i, the four extracted waveform data DATA_IN_i, i=1,2,3,4, are combined synchronously, and after a combination is complete, the extraction module generates a valid data flag, the continuous valid data flags constitute a valid data flag signal EXTRACT_VALID; if the divisor is equal to N, the extraction mode is denoted by extraction mode B, one point of data of an extracted waveform data DATA_IN_i is taken as one data of an extracted waveform data EXTRACT DATA_i, the four extracted waveform data DATA_IN_i, i=1,2,3,4, are taken synchronously, and after a taking is complete, the extraction module generates a valid data flag, the continuous valid data flags constitute a valid data flag signal EXTRACT_VALID; a trigger module, wherein the extraction module sends the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, and the valid data flag signal EXTRACT_VALID to the trigger module, and the trigger module generates a trigger signal TRIG_OUT according to a plurality of trigger parameters and a trigger channel set by the upper computer module; a first in, first out (FIFO) module, wherein the extraction module delays, and then sends the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, and the valid data flag signal EXTRACT_VALID to the FIFO module, the trigger module sends the trigger signal TRIG_OUT to the FIFO module; the FIFO module comprises four FIFO submodules DTO_FIFO_i, i=1,2,3,4, respectively corresponding to four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, the FIFO module buffers the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, according to the valid data flag signal EXTRACT_VALID and the trigger signal TRIG_OUT: when the valid data flag signal EXTRACT_VALID is turned into high level, the four FIFO modules enter write mode, the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, are respectively written into corresponding FIFO submodules DTO_FIFO_i, i=1,2,3,4, when the amount of the data written into the four FIFO submodules reaches a pre-trigger depth which is set by the upper computer module, the four FIFO modules enter read-while-write mode; when a trigger signal TRIG_OUT arrives, the four FIFO submodules continuously output their extracted waveform data, which are denoted by FIFO output data X.sub.i, i=1,2,3,4, until a frame of extracted waveform data are completely outputted, at the same time, the FIFO module generates a valid output data flag upon one extracted waveform data output, the continuous valid output data flags constitute a valid output data flag signal FIFO_VALID; a mapping address calculation module, wherein the mapping address calculation module receives FIFO output data X.sub.i, i=1,2,3,4, and valid output data flag signal FIFO_VALID, and then calculates a mapping address and a RAM serial number for each point data of FIFO output data X.sub.i, i=1,2,3,4, in parallel: 1): setting valid output data flag number k to 1; 2): monitoring the valid output data flag signal FIFO_VALID, when the valid output data flag signal FIFO_VALID is turned into high level, which means FIFO output data X.sub.i, i=1,2,3,4, are valid, then going to step 3); 3): initializing data serial number n to 1; 4): calculating serial number j.sub.in.sup.k of n.sup.th point data X.sub.in.sup.k, of k.sup.th data X.sub.i.sup.k of FIFO output data X.sub.i in a screen of data points: j.sub.in.sup.k=(k−1)N′+n, where N′=N, if the extraction mode is extraction mode A, N′=1, if the extraction mode is extraction mode B; 5): calculating address A.sub.in.sup.k in 3D waveform database according to point data X.sub.in.sup.k; 6): calculating mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k for point data X.sub.in.sup.k: Ã.sub.in.sup.k=A.sub.in.sup.k+(f−1)H, J.sub.in.sup.k=j.sub.in.sup.k−(f−1)×(4×N), where f is the cycle number at the time of current calculation, where H is the number of vertical points of the screen of DTO; 7): judging whether n<N′, if yes, then letting n=n+1 and returning to step 4), otherwise, going to step 8); 8): judging whether k<K, if yes, then letting k=k+1 and returning to step 2), otherwise, going to step 1), where K=L/N under the circumstance that the extraction mode is extraction mode A, or K=L under the circumstance that the extraction mode is extraction mode B, L is the number of horizontal points of the screen of DTO; a RAM array module, wherein the RAM array module comprises 4×N dual port RAMs, the address depth of each dual port RAM is L×H/(4×N), the bit-width of the storage unit corresponding to an address of dual port RAM is 2+M, where the 2 high bits are used for storing the channel ID, the M low bits are used for storing waveform probability value; a waveform data comparison and control module, wherein the waveform data comparison and control module comprises 4×N waveform data comparison modules, which respectively correspond to the 4×N dual port RAMs, the waveform data comparison and control module performs the parallel reading and writing control of the 4×N dual port RAMs as follows: 1): initializing waveform frame number c to 1; 2): initializing circle number f to 1; 3): comparing and processing the waveform probability values in 4×N dual port RAMs: after each four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, are calculated, the mapping address calculation module reduces the rate of the four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, by 4 times, and send the four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, to the RAM array module and the waveform data comparison and control module in parallel; for each channel, the waveform data comparison and control module determines a channel ID by the channel corresponding to point data X.sub.in.sup.k, then sends the determined channel ID to waveform data comparison module J.sub.in.sup.k; at the same time, the waveform data comparison and control module reads out a channel ID and a waveform probability value from a storage unit of dual port RAM J.sub.in.sup.k according to mapping address Ã.sub.in.sup.k, and then sends the readout channel ID and the readout waveform probability value to waveform data comparison module J.sub.in.sup.k; waveform data comparison module J.sub.in.sup.k processes the readout channel IDs and the waveform probability values according to the following three conditions: if the priority of the read out channel ID is lower than that of the determined channel ID, then the readout waveform probability value is set to 1, the readout channel ID is set to the determined channel ID, then the readout channel ID and the readout waveform probability value are stored back into the storage unit of mapping address Ã.sub.in.sup.k in dual port RAM J.sub.in.sup.k; if the priority of the read out channel ID is equal to that of the determined channel ID, then the readout waveform probability value is added by 1, the readout channel ID and the readout waveform probability value are stored back into the storage unit of mapping address Ã.sub.in.sup.k in dual port RAM J.sub.in.sup.k; if the priority of the read out channel ID is higher than that of the determined channel ID, then the readout waveform probability value is added by 1, the readout channel ID and the readout waveform probability value are stored back into the storage unit of mapping address Ã.sub.in.sup.k in dual port RAM J.sub.in.sup.k; 4) judging whether RAM serial number J.sub.in.sup.k is less than 4×N, if yes, then returning to step 3), otherwise, going to step 5); 5) judging whether f=L/(4×N′), if yes, then returning to step 6), otherwise, letting f=f+1 and returning to step 3); 6) judging whether c<C, if yes, then returning to step 2), otherwise, a waveform storage is completed, and outputting a waveform data output signal, where the C is a frame number for waveform mapping, which is set by the upper computer module; a waveform data output module, when a waveform data output signal is outputted by the waveform data comparison and control module, the waveform data output control module sets waveform frame number c to 0, and then takes the control of the RAM array, sets the read mode of each dual port RAMs in the RAM array module to read_first mode, and then sends the waveform probability values outputted by RAM array module to the upper computer module, the upper computer module converts each waveform probability value into RBG values; a display module, the upper computer module sends the RBG values of each waveform probability value to the display module, the display module displays the waveforms of input signals of four channels on a screen according the RBG values.
2. A system for data mapping and storing in digital three-dimensional oscilloscope of claim 1, further comprising a state machine for processing the parallel data of the four channels, which has 5 states of IDLE, RD_CH12, RD_CH34, WR_CH12, WR_CH34: the state of IDLE is a initial state, when the waveform data comparison and control module receives four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, the state machine goes into the state of RD_CH12; the state of RD_CH12 is a state of parallel reading out channel IDs and waveform probability values of channel 1 and channel 2, under the state of RD_CH12, the waveform data comparison and control module reads out a channel ID and a waveform probability value from a storage unit of dual port RAM J.sub.1n.sup.k according to mapping address Ã.sub.in.sup.k, and reads out a channel ID and a waveform probability value from a storage unit of dual port RAM J.sub.2n.sup.k according to mapping address Ã.sub.in.sup.k; after one clock period, the state machine goes into the state of RD_CH34; the state of RD_CH34 is a state of parallel reading out channel IDs and waveform probability values of channel 3 and channel 4; under the state of RD_CH34, the waveform data comparison and control module reads out a channel ID and a waveform probability value from a storage unit of dual port RAM J.sub.3n.sup.k according to mapping address Ã.sub.in.sup.k, and reads out a channel ID and a waveform probability value from a storage unit of dual port RAM J.sub.4n.sup.k according to mapping address Ã.sub.in.sup.k; at the same time, the waveform data comparison and control module processes the readout channel IDs and the waveform probability values of channel 1 and channel 2 according to the three conditions; after one clock period, the state machine goes into the state of WR_CH12; the state of WR_CH12 is a state of parallel writing back the readout channel IDs and readout waveform probability values of channel 1 and channel 2, under the state of WR_CH12, the waveform data comparison and control module writes back the readout channel IDs and the readout waveform probability values of channel 1 and channel 2 to the storage units of corresponding addresses in dual port RAM; in case of the storage units for channel 1 and channel 2 are the same, only the readout channel ID and the readout waveform probability value of the channel with higher priority are stored back; at the same time, the waveform data comparison and control module processes the readout channel IDs and the waveform probability values of channel 3 and channel 4 according to the three conditions; after one clock period, the state machine goes into the state of WR_CH34; the state of WR_CH34 is a state of parallel writing back the readout channel IDs and the readout waveform probability values of channel 3 and channel 4; under state of WR_CH34, the waveform data comparison and control module writes back the readout channel IDs and the readout waveform probability values of channel 3 and channel 4 to the storage units of corresponding addresses in dual port RAM; in case of the storage units for channel 3 and channel 4 are the same, only the readout channel ID and the readout waveform probability value of the channel with higher priority are stored back; after one clock period, judging whether c<C, if yes, the state machine goes into the state of RD_CH12, otherwise, the state machine returns to the state of IDLE.
Description
BRIEF DESCRIPTION OF THE DRAWING
(1) The above and other objectives, features and advantages of the present invention will be more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
(7) Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the similar modules are designated by similar reference numerals although they are illustrated in different drawings. Also, in the following description, a detailed description of known functions and configurations incorporated herein will be omitted when it may obscure the subject matter of the present invention.
Embodiment
(8)
(9) In one embodiment of the present invention, As shown in
(10) The ADC module 1 comprises four ADC submodules respectively corresponding to four channels. The four ADC submodules are respectively denoted by ADC submodule of channel 1, ADC submodule of channel 2, ADC submodule of channel 3 and ADC submodule of channel 4. The four ADC submodules respectively acquire the input signals of the four channels and output four waveform data ADC_DATA_1, ADC_DATA_2, ADC_DATA_3, ADC_DATA_4, the resolutions of the four ADC submodules all are M bits, the number of the data points outputted by an ADC submodule in one synchronization period of the data output synchronization clock is N.
(11) The extraction module 2 receive the four waveform data ADC_DATA_1, ADC_DATA_2, ADC_DATA_3, ADC_DATA_4 and respectively extract data from them according to a divisor set by the upper computer module 9, and four extracted waveform data DATA_IN_1, DATA_IN_2, DATA_IN_3, DATA_IN_4 are obtained and denoted by extracted waveform data DATA_IN_i, i=1,2, . . . , 4 (they are inside extraction module 2, so not shown in
(12) Each ADC submodule of ADC module 1 outputs N points of data in one synchronization period of the data output synchronization clock f.sub.sys. After extracting, the number of the data points extracted by the extraction module in one synchronization period is W. As shown in Table 1 and Table 2, if the divisor is less than N, W is different in different synchronization period. For the generality of application, N points of data of an extracted waveform data DATA_IN_i are combined into one data of an extracted waveform data EXTRACT_DATA_i.
(13) TABLE-US-00001 TABLE 1 Extracted waveform 5G/divisor = 5 data point Waveform 1 17 33 49 65 5 data point 2 18 34 50 66 10 3 19 35 51 67 15 4 20 36 52 68 20 5 21 37 53 69 25 6 22 38 54 70 30 7 23 39 55 71 35 8 24 40 56 72 40 9 25 41 57 73 45 10 26 42 58 74 50 11 27 43 59 75 55 12 28 44 60 76 60 13 29 45 61 77 65 14 30 46 62 78 70 15 31 47 63 79 75 16 32 48 64 80 80 Synchronization period 1 2 3 4 5 Repositioned extracted Waveform data point 5 20 35 50 65 10 25 40 55 70 15 30 45 60 75 80 W 3 3 3 3 4 ⊚A valid data flag is generated at the interval of 5 synchronization periods
(14) As shown in Table 1, N=16 and the divisor is 5, W is 3, 3, 3, 3, 4 in synchronization period 1, 2, 3, 4, 5, a valid data flag is generated at the interval of 5 synchronization periods.
(15) TABLE-US-00002 TABLE 2 Extracted waveform 5G/divisor =10 data point Waveform 1 17 33 49 65 81 97 113 129 145 10 data point 2 18 34 50 66 82 98 114 130 146 20 3 19 35 51 67 83 99 115 131 147 30 4 20 36 52 68 84 100 116 130 148 40 5 21 37 53 69 85 101 117 133 149 50 6 22 38 54 70 86 102 118 134 150 60 7 23 39 55 71 87 103 119 135 151 70 8 24 40 56 72 88 104 120 136 152 80 9 25 41 57 73 89 105 121 137 153 90 10 26 42 58 74 90 106 122 138 154 100 11 27 43 59 75 91 107 123 139 155 110 12 28 44 60 76 92 108 124 140 156 120 13 29 45 61 77 93 109 125 141 157 130 14 30 46 62 78 94 110 126 142 158 140 15 31 47 63 79 95 111 127 143 169 150 16 32 48 64 80 96 112 128 144 160 160 Synchronization period 1 2 3 4 5 Repositioned extracted Waveform data point 10 20 40 50 70 90 100 120 130 150 30 60 80 110 140 160 W 1 2 1 2 2 1 2 1 2 2 ⊚A valid data flag is generated at the interval of 6 synchronization periods
(16) As shown in Table 2, N=16 and the divisor is 10, W is 1, 2, 1, 2, 2, 1, 2, 1, 2, 2 in synchronization period 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, a valid data flag 5 is generated at the interval of 10 synchronization periods
(17) The extraction module 2 sends the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, which respectively correspond to channel 1, channel 2, channel 3 and channel 4, and the valid data flag signal EXTRACT_VALID to the trigger module 3. And the trigger module 3 generates a trigger signal TRIG_OUT according to a plurality of trigger parameters and a trigger channel set by the upper computer module 9. Take the edge trigger, one of the most common triggers, for example, the upper computer module 9 sends a trigger level and a trigger channel to the trigger module 3. In the embodiment, suppose the trigger channel is channel 2, the trigger module 3 monitors the extracted waveform data EXTRACT_DATA_2, when it varies from the level lower than trigger level to the level higher than trigger level, the trigger module 3 generates a trigger signal TRIG_OUT, and the trigger signal TRIG_OUT will last one clock period, and then turns to lower level.
(18) The extraction module 2 delays, and then sends the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, and the valid data flag signal EXTRACT_VALID to the FIFO module 4. The purpose of the delay is to synchronize the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, and the valid data flag signal EXTRACT_VALID with the trigger signal TRIG_OUT.
(19) the trigger module 3 sends the trigger signal TRIG_OUT to the FIFO module 4. the FIFO module 4 comprises four FIFO submodules DTO_FIFO_i, i=1,2,3,4, respectively corresponding to four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4. The FIFO module 4 buffers the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, according to the valid data flag signal EXTRACT_VALID and the trigger signal TRIG_OUT: when the valid data flag signal EXTRACT_VALID is turned into high level (a valid data flag appears), the four FIFO modules enter write mode, the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, are respectively written into corresponding FIFO submodules DTO_FIFO_i, i=1,2,3,4, when the amount of the data written into the four FIFO submodules reaches a pre-trigger depth which is set by the upper computer module 9. The four FIFO modules enter read-while-write mode; when a trigger signal TRIG_OUT arrives, the four FIFO submodules continuously output their extracted waveform data, which are denoted by FIFO output data X.sub.i, i=1,2,3,4, until a frame of extracted waveform data am completely outputted. At the same time, the FIFO module 4 generates a valid output data flag upon one extracted waveform data output, the continuous valid output data flags constitute a valid output data flag signal FIFO_VALID.
(20) The mapping address calculation module 5 receives FIFO output data X.sub.i, i=1,2,3,4, and valid output data flag signal FIFO_VALID, and then calculates a mapping address and a RAM serial number for each point data of FIFO output data X.sub.i, i=1,2,3,4, in parallel:
(21) 1): setting valid output data flag number k to 1;
(22) 2): monitoring the valid output data flag signal FIFO_VALID, when the valid output data flag signal FIFO_VALID is turned into high level (a valid output data flag appears), which means FIFO output data X.sub.i, i=1,2,3,4, are valid, then going to step 3);
(23) 3): initializing data serial number n to 1;
(24) 4): calculating serial number j.sub.in.sup.k of n.sup.th point data X.sub.in.sup.k of k.sup.th data X.sub.i.sup.k of FIFO output data X.sub.i in a screen of data points: j.sub.in.sup.k=(k−1)N′+n, where N′=N, if the extraction mode is extraction mode A, N′=1, if the extraction mode is extraction mode B; for extraction mode A, k.sup.th data X.sub.i.sup.k of FIFO output data X.sub.i has N point data, so N′=N, for extraction mode B, k.sup.th data X.sub.i.sup.k of FIFO output data X.sub.i has 1 point data, so N′=1; N′ is the number of points data of data of FIFO output data;
(25) 5): calculating address (location) A.sub.in.sup.k in 3D waveform database according to point data X.sub.in.sup.k; the calculation of address (location) in 3D waveform database is a prior art;
(26) 6): calculating mapping address Ã.sub.in.sup.k and a RAM serial number J.sub.in.sup.k for point data X.sub.in.sup.k: Ã.sub.in.sup.k=A.sub.in.sup.k+(f−1)H, J.sub.in.sup.k=j.sub.in.sup.k−(f−1)×(4×N), where f is the cycle number at the time of current calculation, which is sent to the mapping address calculation module 5 by the waveform data comparison and control module 7, where H is the number of vertical points of the screen of DTO;
(27) 7): judging whether n<N′, if yes, then letting n=n+1 and returning to step 4), otherwise, going to step 8);
(28) 8): judging whether k<K, if yes, then letting k=k+1 and returning to step 2), otherwise, going to step 1), where K=L/N under the circumstance that the extraction mode is extraction mode A, or K=L under the circumstance that the extraction mode is extraction mode B, L is the number of horizontal points of the screen of DTO. All mapping address Ã.sub.in.sup.k of channel i constitute a mapping address signal Ã.sub.i, for channel 1, 2, 3, 4, the corresponding mapping address signal are Ã.sub.1, Ã.sub.2, Ã.sub.3, Ã.sub.4, respectively. All RAM serial number J.sub.in.sup.k of channel i constitute a RAM serial number signal J.sub.i, for channel 1, 2, 3, 4, the corresponding RAM serial number signal are J.sub.1, J.sub.2, J.sub.3, J.sub.4 respectively.
(29) The RAM array module 6 comprises N RAM arrays, each RAM array has dual port RAMs, so The RAM array module 6 comprises 4×N dual port RAMs. As shown in
(30) The waveform data comparison and control module 7 comprises 4×N waveform data comparison modules, which respectively correspond to the 4×N dual port RAMs. The waveform data comparison and control module 7 performs the parallel reading and writing control of the 4×N dual port RAMs as follows:
(31) 1): initializing waveform frame number c to 1;
(32) 2): initializing circle number f to 1;
(33) 3): comparing and processing the waveform probability values in 4×N dual port RAMs; after each four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, are calculated, the mapping address calculation module 5 reduces the rate of the four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, by 4 times, and send the four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, to the RAM array module 6 and the waveform data comparison and control module 7 in parallel; for each channel, the waveform data comparison and control module 7 determines a channel ID (determined channel ID) by the channel corresponding to point data X.sub.in.sup.k, then sends the determined channel ID to waveform data comparison module J.sub.in.sup.k; at the same time, the waveform data comparison and control module 7 reads out a channel ID (readout channel ID) and a waveform probability value (readout waveform probability value) from a storage unit of dual port RAM J.sub.in.sup.k according to mapping address Ã.sub.in.sup.k, and then sends the readout channel ID and the readout waveform probability value to waveform data comparison module J.sub.in.sup.k; waveform data comparison module J.sub.in.sup.k processes the readout channel IDs and the readout waveform probability values according to the following three conditions:
(34) if the priority of the read out channel ID is lower than that of the determined channel ID, then the readout waveform probability value is set to 1, the readout channel ID is set to the determined channel ID, then the readout channel ID and the readout waveform probability value are stored back into the storage unit of mapping address Ã.sub.in.sup.k in dual port RAM J.sub.in.sup.k;
(35) if the priority of the read out channel ID is equal to that of the determined channel ID, then the readout waveform probability value is added by 1, the readout channel ID and the readout waveform probability value are stored back into the storage unit of mapping address Ã.sub.in.sup.k in dual port RAM J.sub.in.sup.k;
(36) if the priority of the read out channel ID is higher than that of the determined channel ID, then the readout waveform probability value is added by 1, the readout channel ID and the readout waveform probability value are stored back into the storage unit of mapping address Ã.sub.in.sup.k in dual port RAM J.sub.in.sup.k;
(37) 4) judging whether RAM serial number J.sub.in.sup.k is less than 4×N if yes, then returning to step 3), otherwise, going to step 5);
(38) 5) judging whether f=L/(4×N′), if yes, then returning to step 6), otherwise, letting f=f+1 and returning to step 3);
(39) 6) judging whether c<C, if yes, then returning to step 2), otherwise, a waveform storage is completed, and outputting a waveform data output signal, where the C is a frame number for waveform mapping, which is set by the upper computer module.
(40) When a waveform data output signal is outputted by the waveform data comparison and control module 7, the waveform data output control module 8 sets waveform frame number c to 0, and then takes the control of the RAM array module 6, sets the read mode of each dual port RAMs in the RAM array module 6 to read_first mode (the RAM array module 6 output the waveform probability values), and then sends the waveform probability values outputted by RAM array module 6 to the upper computer module 9. The upper computer module 9 converts each waveform probability value into RBG values.
(41) The upper computer module 9 sends the RBG values of each waveform probability value to display module 10, the display module 10 displays the waveforms of input signals of four channels on a screen according the RBG values.
(42) The waveform data comparison and control module 7 is a very important module in the present invention. In order to make it run more efficiently, a state machine for processing the parallel data of the four channels is developed in the embodiment, which has 5 states of IDLE, RD_CH12, RD_CH34, WR_CH12, WR_CH34. The 5 states are detailed as follows.
(43) The state of IDLE is a initial state. When the waveform data comparison and control module 7 receives four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, the state machine goes into the state of RD_CH12.
(44) The state of RD_CH12 is a state of parallel reading out channel IDs and waveform probability values of channel 1 and channel 2. Under the state of RD_CH12, the waveform data comparison and control module 7 reads out a channel ID (readout channel ID) and a waveform probability value (readout waveform probability value) from a storage unit of dual port RAM J.sub.in.sup.k according to mapping address Ã.sub.in.sup.k, and reads out a channel ID (readout channel ID) and a waveform probability value (readout waveform probability value) from a storage unit of dual port RAM J.sub.2n.sup.k according to mapping address Ã.sub.in.sup.k. After one clock period, the state machine goes into the state of RD_CH34. In the present invention, the four channels operate synchronously, the RAM serial numbers of channel 1 and channel 2 at same time are the same. However, the dual port RAM can read out and write back the data (channel ID and waveform probability value) of the two channels.
(45) The state of RD_CH34 is a state of parallel reading out the channel IDs and waveform probability values of channel 3 and channel 4. Under the state of RD_CH34, the waveform data comparison and control module 7 reads out a channel ID (readout channel ID) and a waveform probability value (readout waveform probability value) from a storage unit of dual port RAM J.sub.3n.sup.k according to mapping address Ã.sub.in.sup.k, and reads out a channel ID (readout channel ID) and a waveform probability value (readout waveform probability value) from a storage unit of dual port RAM J.sub.4n.sup.k according to mapping address Ã.sub.in.sup.k. At the same time, the waveform data comparison and control module 7 processes the readout channel ID and the waveform probability values of channel 1 and channel 2 according to the three conditions. After one clock period, the state machine goes into the state of WR_CH12.
(46) The state of WR_CH12 is a state of parallel writing back the readout channel IDs and the readout waveform probability values of channel 1 and channel 2. Under the state of WR_CH12, the waveform data comparison and control module 7 writes back the readout channel IDs and readout waveform probability values of channel 1 and channel 2 to the storage units of corresponding addresses in dual port RAM. In case of the storage units for channel 1 and channel 2 are the same, only the readout channel ID and the readout waveform probability value of the channel with higher priority are stored back. At the same time, the waveform data comparison and control module 7 processes the readout channel IDs and the waveform probability values of channel 3 and channel 4 according to the three conditions. After one clock period, the state machine goes into the state of WR_CH34.
(47) The state of WR_CH34 is a state of parallel writing back the readout channel IDs and the readout waveform probability values of channel 3 and channel 4. Under state of WR_CH34, the waveform data comparison and control module 7 writes back the readout channel IDs and the readout waveform probability values of channel 3 and channel 4 to the storage units of corresponding addresses in dual port RAM. In case of the storage units for channel 3 and channel 4 are the same, only the readout channel ID and the readout waveform probability value of the channel with higher priority are stored back. After one clock period, judging whether c<C, if yes, the state machine goes into the state of RD_CH12, otherwise, the state machine returns to the state of IDLE.
(48) The operations of processing the parallel data of the four channels are shown in table 1.
(49) TABLE-US-00003 TABLE 3 Clock period 1 2 3 4 State RD_CH12 RD_CH34 WR_CH12 WR_CH34 Operations Parallel Parallel Parallel of reading out processing writing channel the the back the 1 and corresponding corresponding parallel channel 2 data of data of data of channel 1 channel 1 channel 1 and and and channel 2 channel 2 channel 2 Operations Parallel Parallel Parallel of reading out processing writing channel 3 the the back the and corresponding corresponding parallel channel 4 data of data of data of channel 3 channel 1 channel 3 and and and channel 4 channel 2 channel 4
(50) As shown in Table 3, the parallel data of the four channels are processed (read out and written back) repeatedly at the interval of 4 clock periods.
(51) In order to better describe the present invention, a more detailed example are given, and elaborated as follows:
(52) Step 1: user sets a time base by the upper computer module 9. The upper computer module 9 resets the FIFO module 4, the RAM array module 6, the waveform data comparison and control module 7 and the waveform data output control module 8. After the resetting is completed, the upper computer module 9 calculates a divisor according to the time base, and sends the divisor to the extraction module 2. In the present example, the divisor is 5. The upper computer module 9 sets a plurality of trigger parameters and a trigger channel for the trigger module 3. The plurality of trigger parameters include edge trigger and trigger level, the trigger channel is channel 1 in the present example. The upper computer module 9 sends pre-trigger depth of 201 to the FIFO module 4. In the meantime, the upper computer module 9 sets the priorities of the four channels. The bigger the channel ID is, the higher the priority of the corresponding channel is. The upper computer module 9 sends the priorities of the four channels and the frame number for waveform mapping C=255 to the waveform data comparison and control module 7.
(53) In the present example, the resolutions of screen is L×H=512×256, the number L of horizontal points of the screen of DTO is 512, the resolutions of the four ADC submodules all are M=8 bits, the data output synchronization clock f.sub.xyz=312.5 MHz, the number of the data points output by an ADC submodule in one synchronization period of the data output synchronization clock is N=16.
(54) Step 2: The ADC module 1 acquires the input signals of the four channels and output four waveform data ADC_DATA_1, ADC_DATA_2, ADC_DATA_3, ADC_DATA_4 to the extraction module 2. The extraction module 2 extracts data from them according to the divisor of 5, and four extracted waveform data DATA_IN_1, DATA_IN_2, DATA_IN_3, DATA_IN_4 are obtained. The divisor is 5 and less than 16, so the extraction mode is extraction mode A. Then 16 points of data of an extracted waveform data DATA_IN_i are combined into one data of an extracted waveform data EXTRACT_DATA_i, each data of an extracted waveform data is a date of 16×8=128 bits, it comprises 16 point data. After a combination is complete, the extraction module 2 generates a valid data flag, the continuous valid data flags constitute a valid data flag signal EXTRACT_VALID.
(55) Step 3: the trigger module 3 monitors extracted waveform data EXTRACT_DATA_1, which are sent by the extraction module 2, when extracted waveform data EXTRACT_DATA_1 is turned into high level, the trigger module 3 generates a trigger signal TRIG_OUT, and sends it to the FIFO module 4, and the trigger signal TRIG_OUT will last one clock period, and then turns to lower level.
(56) Step 4: the extraction module 2 delays, and then sends the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, and the valid data flag signal EXTRACT_VALID to the FIFO module 4. The purpose of the delay is to synchronize the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, and the valid data flag signal EXTRACT_VALID with the trigger signal TRIG_OUT.
(57) The FIFO module 4 buffers the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, according to the valid data flag signal EXTRACT_VALID and the trigger signal TRIG_OUT: when the valid data flag signal EXTRACT_VALID is turned into high level (a valid data flag appears), the four FIFO modules enter write mode, the four extracted waveform data EXTRACT_DATA_i, i=1,2,3,4, are respectively written into corresponding FIFO submodules DTO_FIFO_i, i=1,2,3,4, when the amount of the data written into the four FIFO submodules reaches a pre-trigger depth which is set by the upper computer module 9. The four FIFO modules enter read-while-write mode; when a trigger signal TRIG_OUT arrives, the four FIFO submodules continuously output their extracted waveform data, which are denoted by FIFO output data X.sub.i, i=1,2,3,4, until a frame of extracted waveform data are completely outputted. At the same time, the FIFO module 4 generates a valid output data flag upon one extracted waveform data output, the continuous valid output data flags constitute a valid output data flag signal FIFO_VALID. The FIFO output data X.sub.i, i=1,2,3,4, along with the valid output data flag signal FIFO_VALID are sent to the mapping address calculation module 5.
(58) Step 5: When the valid output data flag signal FIFO_VALID is turned into high level (a valid output data flag appears), the mapping address calculation module 5 calculates a serial number j.sub.in.sup.k of n.sup.th point data X.sub.in.sup.k of k.sup.th data X.sub.i.sup.k of FIFO output data X.sub.i in a screen of data points: j.sub.in.sup.k=(k−1)N′+n=(k−1)×16+n and an address (location) A.sub.in.sup.k in 3D waveform database according to point data X.sub.in.sup.k, and then calculates a mapping address: Ã.sub.in.sup.k=A.sub.in.sup.k+(f−1)×256 and a RAM serial number: J.sub.in.sup.k=j.sub.in.sup.k−(f−1)×64 according to the cycle number f at the time of current calculation. The mapping address calculation module 5 reduces the rate of the four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4, by 4 times, and send the four pairs of mapping address Ã.sub.in.sup.k and RAM serial number J.sub.in.sup.k, i=1,2,3,4 to the RAM array module 6 and the waveform data comparison and control module 7 in parallel.
(59) Step 6: the waveform data comparison and control module 7 performs the parallel reading and writing control of the 4×N dual port RAMs. Ater 255 frames of waveform mapping are completed. i.e. 255 frames of waveform data are stored into the RAM army module 6, the control of the RAM array module 6 is transferred to the waveform data output control module 8.
(60) In the present example, as shown in
(61) Step 7: The waveform data output control module 8 sets the waveform frame number c to 0, and then takes the control of the RAM array module 6, sets the read mode of each dual port RAMs in the RAM array module 6 to read_first mode, the RAM array module 6 output the waveform probability values, and then sends the waveform probability values outputted by RAM array module 6 to the upper computer module 9. The upper computer module 9 converts each waveform probability value into RBG values, and sends the RBG values of each waveform probability value to display module 10.
(62) Step 8: The display module 10 displays the waveforms of input signals of four channels on a screen according the RBG values
(63) While illustrative embodiments of the invention have been described above, it is, of course, understand that various modifications will be apparent to those of ordinary skill in the art. Such modifications are within the spirit and scope of the invention, which is limited and defined only by the appended claims.