WO2018120612A1 - 一种数据采样方法、芯片和计算机存储介质 - Google Patents
一种数据采样方法、芯片和计算机存储介质 Download PDFInfo
- Publication number
- WO2018120612A1 WO2018120612A1 PCT/CN2017/085606 CN2017085606W WO2018120612A1 WO 2018120612 A1 WO2018120612 A1 WO 2018120612A1 CN 2017085606 W CN2017085606 W CN 2017085606W WO 2018120612 A1 WO2018120612 A1 WO 2018120612A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- module
- selection
- delay
- output
- sub
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Definitions
- the present invention relates to electronic technologies, and more particularly to a data sampling method, a chip, and a computer storage medium.
- the Serial Peripheral Interface is a high-speed, full-duplex, synchronous communication bus that occupies only four wires on the pins of the chip, saving the pins of the chip and printing.
- the layout of the printed circuit board (PCB) saves space and provides convenience. Due to the ease of use of SPI, more and more chips integrate this communication protocol. With the increasing use of SPI flash (SPI Flash), the speed is getting higher and higher, the original chip design can not meet the demand of high-speed sampling data, and need to increase the support for high speed, this is because SPI FLASH only has input.
- FIG. 1 shows the clock and data path delay of the chip and SPI Flash.
- the data path delay of the chip and SPI Flash mainly includes: chip clock output delay, PCB clock trace delay, and particle clock input. Delay, particle data output delay, PCB data trace delay, chip input delay.
- the existing solutions mainly have the following Two kinds:
- the embodiment of the invention provides a data sampling method, a chip and a computer storage medium, which can meet the requirement of sampling SPI data of different rates, realize stable sampling of data, and has the characteristics of strong compatibility and software controllability.
- An embodiment of the present invention provides a chip, where the chip includes: a controller and an SPI connected to the controller, where the controller includes: a clock generation module, an input and output module, a configuration acquisition module, and a clock delay module. a sampling module, the input and output module is connected to the SPI, wherein
- the clock generation module is configured to acquire a current clock signal, generate an output clock signal according to the current clock signal, and output the output clock signal to the input/output module;
- the input/output module is configured to output the output clock signal to the SPI Flash through the SPI, and output the output clock signal to the clock delay module;
- the configuration obtaining module is configured to acquire a configuration parameter and a delay enable signal, and output the configuration parameter and the delay enable signal to the clock delay module;
- the clock delay module is configured to generate a sampling clock signal according to the delay enable signal, the output clock signal, and the configuration parameter, and output the sampling clock signal to the sampling module;
- the sampling module is configured to receive SPI data through the SPI, and sample the SPI data according to the sampling clock signal.
- the configuration obtaining module is configured to configure a delay line level M, a delay unit level N, and the delay enable signal, and the delay line level M, the delay The unit number of stages N and the delay enable signal are output to the clock delay module; wherein, M and N are both natural numbers greater than or equal to one.
- the clock delay module includes: a first selection module, a second selection module, and a delay module; wherein
- the clock delay module is configured to configure a first level according to the delay line level M, the first level is a number of stages of the second selection module, and according to the delay line level M configuring a second level, the second level being the number of stages of the delay module;
- a first input end of the first selection module is connected to the input and output module, a second input end of the first selection module is connected to the second selection module, and a third input end of the first selection module Connected to the configuration acquisition module, the output end of the first selection module is connected to the sampling module;
- the second selection module is composed of an M-level first selection sub-module; wherein, in the k-th stage, there are 2M-k first selection sub-modules; wherein k is a natural number greater than or equal to 1 and less than or equal to M;
- the delay module is composed of a 2M-level delay sub-module.
- the first input of the first selection sub-module of the second selection module is connected to the first-stage delay sub-module; the second input of the first selection sub-module The terminal is connected to the second-stage delay sub-module; the output end of the first selection sub-module is connected to the first selection module.
- the first input end of the ith first selection submodule in the first stage is connected to the 2i-1th delay submodule in the 2M level delay submodule;
- the second input end of the first selection sub-module is connected to the 2i-th delay sub-module of the 2M-level delay sub-module; when i is an even number, the output end of the i-th first selection sub-module Connected to the i/2th first selection submodule of the second stage, or when i is an odd number, the output of the i th first selection submodule and the (i+1)/2 of the second stage
- the first selection sub-modules are connected; wherein i is a natural number greater than or equal to 1 and less than or equal to 2M;
- the first input end of the jth first selection submodule in the kth stage is connected to the 2j-1 first selection submodule in the k-1th stage;
- the second input end of the j first selection sub-modules is connected to the 2j first selection sub-module in the k-1th stage; when j is an even number, the output end of the j-th first selection sub-module
- the j/2th first selection submodule in the k+1th stage is connected, or when j is an odd number, the output of the jth first selection submodule and the (k+th)th 1)/2 first selection sub-modules are connected; wherein j is a natural number greater than or equal to 1 and less than or equal to 2M-k;
- the first input of the first selection submodule in the Mth stage is connected to the first first selection submodule of the M-1th stage; the second input of the first selection submodule The terminal is connected to the second first selection submodule in the M-1th stage; the output end of the first selection submodule is connected to the first selection module.
- the delay sub-module includes: a third selection module and a registration module; wherein
- the clock delay module is configured to configure a third level according to the delay unit number N, the third level is a number of stages of the third selection module, and according to the delay unit level N configuring a fourth level, the fourth level being the number of stages of the registration module;
- the third selection module is composed of an N-level second selection sub-module; wherein, in the h-th stage, there are 2M-h second selection sub-modules; wherein h is a natural number greater than or equal to 1 and less than or equal to N;
- the registration module is composed of a 2N-level registration sub-module.
- the first input end of the second selection sub-module of the third selection module is connected to the first-level registration sub-module; the second input end of the second selection sub-module Connected to the second level storage submodule; the output end of the second selection submodule is connected to the second selection module;
- N is greater than 1, for the second selection sub-module of the h-th level in the third selection module:
- the first input end of the pth second selection submodule in the first stage is connected to the 2p-1 level registration submodule in the 2N level register submodule;
- the second input end of the second selection sub-module is connected to the second p-level registration sub-module of the 2N-level registration sub-module; when p is an even number, the output end of the p-th second selection sub-module a second p/2 second selection module, or an output of the pth second selection submodule and a (p+1)/2 second selection of the second level when p is an odd number a submodule connection; wherein p is a natural number greater than or equal to 1 and less than or equal to 2N;
- the first input end of the qth second selection submodule in the hth stage is connected with the 2q-1 second selection submodule in the h-1th stage;
- the second input end of the q second selection sub-modules is connected to the 2q second second selection sub-module in the h-1th stage; when q is an even number, the output end of the q-th second selection sub-module
- the q/2th second selection submodule in the h+1th stage, or the output of the qth second selection submodule and the (h+)th in the h+1th level when q is an odd number 1)/2 second selection sub-modules are connected; wherein q is a natural number greater than or equal to 1 and less than or equal to 2N-h;
- the first input of the second selection sub-module in the Nth stage is connected to the first second selection sub-module of the N-1th stage; the second input of the second selection sub-module End and The second second selection sub-module of the N-1 stage is connected; the output end of the second selection sub-module is connected to the second selection module.
- the first selection submodule and the second selection submodule are selectors
- the registration sub-module is a register.
- the embodiment of the invention further provides a data sampling method, the method comprising:
- the SPI data is received, and the SPI data is sampled by the sampling clock signal.
- the configuration parameter includes a delay line level M and a delay unit level N; wherein M and N are both natural numbers greater than or equal to 1.
- the method before the receiving the SPI data, the method further includes:
- the determining, according to the sampling data and the check sampling data, whether the configuration parameter meets a preset rule further includes:
- the configuration parameter is adjusted until the adjusted configuration parameter meets the preset rule.
- the adjusting the configuration parameter includes:
- the delay line level M and the delay unit level N are adjusted according to a preset method.
- the method further includes:
- the sampled data is read according to a preset clock domain to obtain updated sample data
- the updated sampled data is used.
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the data sampling method according to the embodiment of the invention.
- the current clock signal is acquired, an output clock signal is generated according to the current clock signal, and the configuration parameter and the delay enable signal are acquired, according to the delay enable signal, the output clock signal, and the configuration.
- the parameter generates a sampling clock signal; receives the SPI data, samples the SPI data by the sampling clock signal, and obtains the sampling data. That is to say, in the technical solution proposed by the present invention, the sampling clock signal can be acquired according to the current clock signal, and then the SPI data is sampled by the sampling clock signal, thereby obtaining sampling data.
- the technical solution of the embodiment of the present invention can meet the requirement of sampling SPI data of different rates, realize stable sampling of data, and has the characteristics of strong compatibility and software controllability.
- Figure 1 is a schematic diagram of the clock and data path delay of the chip and SPI Flash;
- FIG. 2 is a schematic diagram of a first component structure of a chip according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of chip clock signal transmission in an embodiment of the present invention.
- FIG. 4 is a schematic diagram showing a second component structure of a chip according to an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a first connection structure of a clock delay module according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a second connection structure of a clock delay module according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a third component of a chip according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of a first connection structure of a delay sub-module according to an embodiment of the present invention.
- FIG. 9 is a schematic flowchart of an implementation process of a data sampling method according to an embodiment of the present invention.
- FIG. 10 is a schematic flowchart of an implementation process of a method for verifying configuration parameters according to an embodiment of the present invention
- FIG. 11 is a schematic diagram of a delay of a sampling clock signal according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of a first component structure of a chip according to an embodiment of the present invention.
- the chip 1 includes: a controller 10 and an SPI 11 connected to the controller 10, wherein The controller 10 can generate an output clock by using any one of a single data line, two data lines, and four data lines.
- the controller 10 includes a clock generation module 100, an input and output module 101, a configuration acquisition module 102, a clock delay module 103, and a sampling module 104.
- the input and output module 101 is connected to the SPI 11.
- the clock generation module 100 is configured to acquire a current clock signal, generate an output clock signal according to the current clock signal, and output the output clock signal to the input/output module 101.
- the clock generation module 100 can acquire the current clock signal of the current working clock domain, and then generate an output clock signal according to the current clock signal, and output the clock signal to the input/output module 101.
- the clock generating module 100 needs to convert the acquired current clock signal to obtain an output clock signal.
- the clock generation module 100 may output the output clock signal to the input/output module 101 through any one of a single data line, two data lines, and four data lines.
- the clock generation module 100 is configured to output the clock signal At the same time as the input/output module 101, a preset enable signal is output to the input/output module 101, and the preset enable signal is used to control whether the input/output module 101 outputs the output clock signal.
- the input and output module 101 is configured to output an output clock signal to the SPI Flash through the SPI 11 and output the output clock signal to the clock delay module 103.
- the input and output module 101 can simultaneously output the output clock signal to the SPI Flash and the clock delay module 103.
- the input/output module 101 outputs an output clock signal through the SPI 11.
- the input and output module 101 receives the output clock signal sent by the clock generation module 100, and the input and output module 101 further receives the preset enable signal sent by the clock generation module 100.
- the enable signal is used to control whether the input/output module 101 outputs the output clock signal.
- the input and output module 101 when the preset enable signal corresponds to a preset enable signal, the input and output module 101 simultaneously outputs the output clock signal to the SPI Flash and the clock delay module 103; When the enable signal corresponds to a preset off signal, the input/output module 101 will not output the output clock signal.
- the configuration obtaining module 102 is configured to acquire configuration parameters and a delay enable signal, and output the configuration parameters and the delay enable signal to the clock delay module 103.
- the configuration parameter and the delay enable signal are output to the clock delay module 103.
- the configuration parameters and the delay enable signal may be pre-stored in a register in the chip and then sent to the configuration acquisition module 102 by the register.
- the configuration obtaining module 102 is configured to configure a configuration parameter and a delay enable signal, and output the configuration parameter and the delay enable signal to the clock delay module 103.
- the configuration parameters include: a delay line level M and a delay unit level N; wherein, M and N are natural numbers greater than or equal to 1.
- the configuration parameters are used to configure the composition of the clock delay module 103, and the delay enable signal is used to control whether the clock delay module 103 outputs the sampling clock signal.
- the clock delay module 103 is configured to generate a sampling clock signal according to the delay enable signal, the output clock signal, and the configuration parameter, and output the sampling clock signal to the sampling module 104.
- the clock delay module 103 is enabled according to the delay.
- the signal, the output clock signal, and the configuration parameters generate a sampling clock signal, and the sampling clock signal is output to the sampling module 104.
- the sampling module 104 is configured to receive SPI data through the SPI 11 and sample the SPI data according to the sampling clock signal.
- the sampling module 104 can receive the SPI data through the SPI11, and then sample the SPI data according to the sampling clock signal, and finally obtain the sampling data.
- the clock generation module 100 acquires a current clock signal wclk, generates an output clock signal spi_clk_o, and a preset enable signal spi_clk_oe, and outputs the output clock signal and a pre- An enable signal is provided to the input/output module 101; the input/output module 101 outputs the output clock signal spi_clk_o as a communication synchronous clock signal spi_clk to the SPI Flash through the SPI 11, and outputs the output clock signal spi_clk_o as an input clock signal clk_in to the clock delay module 103.
- the clock delay module 103 receives the output clock signal sent by the input/output module 101, the configuration parameters M and N sent by the configuration acquisition module 102, and the delay enable signal tapdly_en, according to the delay enable signal and the output clock. Signal and configuration parameters, generate sampling clock signal clk_sample, output sampling clock signal to sampling module 104; sampling module 104 can receive SPI data spi_dat through SPI11, After that, the SPI data is sampled according to the sampling clock signal, and finally the sampling data is obtained, and the sampling data is output to the first-in first-out queue to_fifo.
- the clock delay module 103 includes a first selection module 1030, a second selection module 1031, and a delay module 1032.
- the module 1031 includes a first selection sub-module 10310
- the delay module 1032 includes a delay sub-module 10320.
- the clock delay module 103 is configured to configure a first level according to the delay line number M, wherein the first level is the number of stages of the second selection module 1031, and according to The delay line level M is configured with a second level, and the second level is the number of stages of the delay module 1032.
- the clock delay module 103 configures the first level to be 3, and the second level is also set to 3.
- the second selection module 1031 is composed of an M-level first selection sub-module 10310; wherein, in the k-th stage, there are 2M-k first selection sub-modules 10310; wherein k is greater than or equal to 1 And the natural number is less than or equal to M; the delay module 1032 is composed of the 2M-level delay sub-module 10320.
- FIG. 5 is a schematic diagram of a first connection structure of a clock delay module according to an embodiment of the present invention.
- a first input end of the first selection module 1030 is connected to the input/output module 101, and a second selection module 1030 is second.
- the input end is connected to the second selection module 1031, the third input end of the first selection module 1030 is connected to the configuration acquisition module 102, and the output end of the first selection module 1030 is connected to the sampling module 104.
- the first selection module 1030 acquires the output clock signal sent by the input and output module 101, and the first selection module 1030 acquires the sampling clock signal sent by the second selection module 1031, and at the same time, the first selection The module 1030 obtains the delay enable signal sent by the configuration acquisition module 102, and the first selection module 1030 selects and outputs the output according to the delay enable signal.
- the clock signal is output, or the sampling clock signal is output.
- the delay enable signal sent by the configuration obtaining module 102 is used to control the output of the first selection module 1030.
- the delay enable signal is configured according to the rate of the output clock signal. of.
- the delay enable signal when the rate of the output clock signal is greater than a preset threshold, the delay enable signal may be set to 1, indicating that the first selection module 1030 is controlled to output the sampling clock signal; when the rate of the clock signal is output When the threshold is less than the preset threshold, the delay enable signal may be set to 0, indicating that the first selection module 1030 is controlled to output a clock signal.
- FIG. 6 is a schematic diagram of a second connection structure of a clock delay module according to an embodiment of the present invention.
- the delay module 1032 is composed of the 2-level delay sub-module 10320.
- the first input end of the first selection submodule 10310 in the second selection module 1031 is connected to the first stage delay submodule 10320; the second input end of the first selection submodule 10310 is connected to the second stage delay submodule 10320.
- the output of the first selection sub-module 10310 is coupled to the first selection module 1030.
- the second selection module 1031 is composed of the M-level first selection sub-module 10310
- the delay module 1032 is composed of the 2M-level delay sub-module 10320.
- the first input of the i-th first selection sub-module 10310 in the first stage is connected to the 2i-1-th delay sub-module 10320 in the 2M-stage delay sub-module 10320; the ith The second input end of the first selection sub-module 10310 is connected to the 2i-th delay sub-module 10320 in the 2M-level delay sub-module 10320; when i is an even number, the output of the i-th first selection sub-module 10310 is The i/2th first selection submodule 10310 of the second stage is connected, or when i is an odd number, the output of the i th first selection submodule 10310 and the (i+1)/2th of the second level
- the first selection sub-module 10310 is connected; wherein i is a natural number greater than or equal to 1 and less than or equal to 2M; when k is greater than 1 and less than M, the first input end of the jth first selection submodule 10310 in the kth stage is
- the first first selection in the first stage The first input end of the sub-module 10310 is connected to the first-stage delay sub-module 10320 in the 8-level delay sub-module 10320; the second input end of the first first selection sub-module 10310 and the 8-level delay sub-module 10320
- the second stage delay sub-module 10320 is connected; the output of the first first selection sub-module 10310 is connected to the second first selection sub-module 10310 of the second stage; the second first in the second stage
- the first input of the selection sub-module 10310 is connected to the third first selection sub-module 10310 of the first stage; the second input of the second first selection sub-module 10310 and the fourth of the first level A selection sub-module 10310 is connected; the output of the second first selection sub-module 10310 is connected to the first first selection sub-module 10310
- FIG. 7 is a schematic diagram of a third component structure of a chip according to an embodiment of the present invention.
- the delay sub-module 10320 includes a third selection module 103200 and a registration module 103201, wherein the third selection module 103200 includes a second selector.
- the clock delay module 103 is configured to configure a third level according to the delay unit level N, wherein the third level is the number of stages of the third selection module 103200, and according to the delay
- the unit number N configures a fourth level, which is the number of stages of the registration module 103201.
- the delay unit number N is 3
- the clock delay module 103 configures the number of stages of the third selection module 103200 to be 3
- the number of stages of the configuration registration module 103201 is also 3.
- the third selection module 103200 is composed of an N-level second selection sub-module 1032000; wherein, in the k-th stage, there are 2N-k second selection sub-modules 1032000; wherein k is greater than or equal to 1 And a natural number less than or equal to M; the registration module 103201 is composed of a 2N-level registration sub-module 1032010.
- FIG. 8 is a schematic diagram of a first connection structure of a delay sub-module according to an embodiment of the present invention.
- the third selection module 10320 is constituted by the 1-stage second selection sub-module 1032000
- the registration module 103201 is constituted by the 2-level registration sub-module 1032010.
- the first input end of the second selection sub-module 1032000 in the third selection module 103200 is connected to the first-level registration sub-module 1032010; the second input end of the second selection sub-module 1032000 is connected to the second-level registration sub-module 1032010;
- the output of the second selection submodule 1032000 is connected to the second selection module 1031;
- the third selection module 103200 is constituted by the N-level second selection sub-module 1032000
- the registration module 103201 is constituted by the 2N-level registration sub-module 1032010.
- the first input of the pth second selection submodule 1032000 in the first stage is connected to the 2p-1 level registration submodule 1032010 in the 2N level registration submodule 1032010; the pth second The second input of the selection sub-module 1032000 is connected to the 2p-level registration sub-module 1032010 in the 2N-level registration sub-module 1032010; when p is an even number, the output of the p-th second selection sub-module 1032000 and the second-level The p/2 second selection modules 1032000 are connected, or when p is an odd number, the output of the pth second selection submodule 1032000 and the (p+1)/2 second selection submodules of the second stage 1032000 connection; wherein p is a natural number greater than or equal to 1 and less than or equal to 2N; when h is greater than 1 and less than N, the first input end and the h-1th of the qth second selection submodule 1032000 in the
- the first one in the first stage The first input end of the second selection sub-module 1032000 is connected to the first-level registration sub-module 1032010 in the 8-level registration sub-module 1032010; the second input end of the first second selection sub-module 1032000 and the 8-level registration sub-module 1032010
- the second level storage sub-module 1032010 is connected; the output of the first second selection sub-module 1032000 is connected to the first second selection sub-module 1032000 of the second level;
- the first input of the second second selection sub-module 1032000 in the second stage is coupled to the third second selection sub-module 1032000 in the first stage; the second input of the second second selection sub-module 1032000 Connected to the fourth second selection sub-module 1032000 in the first stage; the output of the second second selection sub-
- the first selection sub-module 10310 and the second selection sub-module 1032000 may be selectors, and the registration sub-module 1032010 may be a register.
- the chip includes: a controller and an SPI connected to the controller, wherein the controller includes: a clock generation module, an input and output module, a configuration acquisition module, a clock delay module, and a sampling module.
- the input and output modules are connected to the SPI.
- the clock generation module is configured to acquire a current clock signal, generate an output clock signal according to the current clock signal, and output the output clock signal to the input/output module; the input/output module is configured to output the output clock signal to the SPI Flash through the SPI, and output the output The clock signal is output to the clock delay module; the configuration acquisition module is configured to obtain the configuration parameter and the delay enable signal, and output the configuration parameter and the delay enable signal to the clock delay module; the clock delay module is configured to be based on the delay The signal, the output clock signal and the configuration parameters generate a sampling clock signal, and the sampling clock signal is output to the sampling module; the sampling module is configured to receive the SPI data through the SPI, and sample the SPI data according to the sampling clock signal.
- the sampling clock signal can be obtained according to the current clock signal, and then the SPI data is sampled by the sampling clock signal, thereby obtaining sampling data.
- a data sampling method and a chip proposed by the embodiments of the present invention can meet the requirement of sampling SPI data of different rates, and realize data stabilization. Fixed sampling, with strong compatibility and software controllable features; and, it is simple and convenient to implement, easy to popularize, and has a wider application range.
- FIG. 9 is a schematic flowchart of an implementation of a data sampling method according to an embodiment of the present invention. As shown in FIG. 9 , in a specific embodiment of the present invention, a method for data sampling specifically includes the following steps:
- Step 101 Acquire a current clock signal, and generate an output clock signal according to the current clock signal.
- the controller may acquire a current clock signal of the current working clock domain and then generate an output clock signal according to the current clock signal.
- the controller needs to convert the acquired current clock signal to obtain an output clock signal.
- the controller may output the output clock signal by any one of a single data line, two data lines, and four data lines.
- the controller generates the output clock signal and also generates a preset enable signal for controlling whether to output the output clock signal.
- the controller when the preset enable signal corresponds to a preset turn-on signal, the controller outputs the output clock signal; when the preset enable signal corresponds to a preset turn-off signal, the control The output clock signal will not be output.
- Step 102 Acquire a configuration parameter and a delay enable signal, and generate a sampling clock signal according to the delay enable signal, the output clock signal, and the configuration parameter.
- the controller may acquire a configuration parameter and a delay enable signal, and generate a sampling clock signal according to the delay enable signal, the output clock signal, and the configuration parameter.
- the configuration parameters and the delay enable signal can be pre-stored in a register in the chip, and then registered The device is sent to the controller.
- the configuration parameters include: a delay line level M and a delay unit level N; wherein, M and N are both natural numbers greater than or equal to 1.
- the configuration parameters are used to configure the generation of the sampling clock signal, and the delay enable signal is used to control the output of the sampling clock signal.
- Step 103 Receive SPI data, sample the SPI data by using a sampling clock signal, and obtain sampling data.
- the controller may receive the SPI data through the SPI, and then sample the SPI data according to the sampling clock signal, and finally obtain the sampling data.
- the data sampling method proposed by the specific embodiment of the present invention further includes the following steps:
- Step 104 Output the sampled data to a register.
- Step 105 When acquiring a read request, reading the sampled data according to a preset clock domain to obtain updated sample data;
- Step 106 using the updated sample data.
- the controller may synchronize the sampled data obtained by sampling the SPI data into a preset clock domain for reading, thereby obtaining updated sample data, and finally performing the next update data. Level of processing and use.
- FIG. 10 is a schematic flowchart of a method for verifying configuration parameters in an embodiment of the present invention. As shown in FIG. 10, in a specific embodiment of the present invention, a method for verifying configuration parameters specifically includes the following steps:
- Step 201 Acquire preset verification data, and sample preset calibration data by using a sampling clock signal to obtain verification sampling data.
- the controller obtains a preset school before receiving the SPI data.
- the data is verified, and the preset verification data is sampled by the sampling clock signal to obtain the verification sampling data.
- the configuration parameter needs to be verified to determine whether the configuration parameter can be configured to satisfy the sampling requirement of the sampling requirement.
- the method for verifying the configuration parameters by the controller may be: acquiring preset verification data, sampling the preset verification data by using the sampling clock signal, and obtaining verification sampling data.
- Step 202 Determine, according to the sampling data and the verification sampling data, whether the configuration parameter satisfies a preset rule. If the configuration parameter satisfies the preset rule, the SPI data is sampled.
- the controller may determine, according to the sampling data and the verification sampling data, whether the configuration parameter satisfies a preset rule, and if the configuration parameter satisfies the preset rule, The SPI data is sampled.
- the controller after acquiring the verification sampling data, the controller compares the verification sampling data with the verification data to obtain a comparison result, and the controller may determine, according to the comparison, whether the preset rule is met, if the , the above configuration parameters can be considered to meet the preset requirements of the data sampling, and the sampling signal can be configured according to the above configuration parameters.
- the method for verifying configuration parameters further includes:
- Step 203 If the configuration parameter does not meet the preset rule, the configuration parameter is adjusted until the adjusted configuration parameter meets the preset rule.
- the controller adjusts the configuration parameter, generates a sampling signal according to the adjusted configuration parameter, and then resamples the sampled data until the adjusted configuration.
- the parameters satisfy the preset rules.
- the controller may adjust the configuration parameter according to the preset method, that is, the controller may perform the preset method according to the preset method.
- the delay line level M and the delay unit level N are adjusted.
- FIG. 11 is a schematic diagram of a delay of a sampling clock signal according to an embodiment of the present invention.
- the sampling clock signal in the case of not delaying the sampling clock signal in (a), the sampling clock signal can satisfy the sampling time.
- the order relationship, just on the rising edge of clk_sample, can just sample spi_datX (X can be 1, 2 or 4 bits). Since the phase of spi_datX in (b) is shifted later than the phase of (a), if the clk_in is not delayed, it is impossible to effectively sample spi_datX on the rising edge of clk_sample. Therefore, the delay enable signal tapdly_en and the configuration parameter M need to be configured. N. The spi_datX in (c) moves more backward than the phase of (b), so it is necessary to delay the clk_in more.
- the data sampling method provided by the embodiment of the present invention acquires a current clock signal, generates an output clock signal according to the current clock signal, acquires a configuration parameter and a delay enable signal, and generates a sampling according to the delay enable signal, the output clock signal, and the configuration parameter.
- the clock signal ; receiving the SPI data, sampling the SPI data by the sampling clock signal, and obtaining the sampling data. That is to say, in the technical solution proposed by the present invention, the sampling clock signal can be acquired according to the current clock signal, and then the SPI data is sampled by the sampling clock signal, thereby obtaining sampling data.
- a data sampling method and a chip proposed by the embodiments of the present invention can meet the requirement of sampling SPI data of different rates, achieve stable sampling of data, have strong compatibility, and are software controllable.
- the characteristics are; simple, convenient to implement, easy to popularize, and a wider range of applications.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- the technical solution of the embodiment of the present invention can obtain a sampling clock signal according to a current clock signal, and then sample the SPI data by using the sampling clock signal, thereby obtaining sampling data.
- a data sampling method and a chip proposed by the embodiments of the present invention can meet the requirement of sampling SPI data of different rates, achieve stable sampling of data, have strong compatibility, and are software controllable. The characteristics are; simple, convenient to implement, easy to popularize, and a wider range of applications.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Pulse Circuits (AREA)
Abstract
一种芯片,包括控制器(10)、与控制器连接的SPI(11),控制器包括:时钟产生模块(100)、输入输出模块(101)、配置获取模块(102)、时钟延时模块(103)和采样模块(104)。时钟产生模块(100)获取当前时钟信号,根据当前时钟信号生成输出时钟信号,输出输出时钟信号至输入输出模块(101);输入输出模块(101)将输出时钟信号由SPI(11)输出至SPI Flash,将输出时钟信号输出至时钟延时模块(103);配置获取模块(102)获取配置参数和延时使能信号,将配置参数和延时使能信号输出至时钟延时模块(103);时钟延时模块(103)根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号,将采样时钟信号输出至采样模块(104);采样模块(104)由SPI(11)接收SPI数据,由采样时钟信号对SPI数据进行采样。
Description
相关申请的交叉引用
本申请基于申请号为201611239614.0、申请日为2016年12月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本发明涉及电子技术,尤其涉及一种数据采样方法、芯片和计算机存储介质。
串行外设接口(Serial Peripheral Interface,SPI)是一种高速的、全双工、同步的通信总线,并且在芯片的管脚上只占用四根线,节约了芯片的管脚,同时为印刷电路板(PCB,Printed Circuit Board)的布局上节省空间,提供方便。由于SPI具有简单易用的特性,越来越多的芯片集成了这种通信协议。随着SPI闪存(SPI Flash)越来越广泛的应用,速度越来越高,原有的芯片的设计已经无法满足高速采样数据的需求,需要增加对高速的支持,这是由于SPI FLASH只有输入时钟,没有输出时钟,输出的数据送给控制器采样,控制器通过内部的时钟采样,因为不同的Flash厂家输出延时不一样,PCB板级引入延时,可能还有桥接芯片引入更大延时,会降低芯片中控制器进行数据采样的稳定性。图1为芯片与SPI Flash的时钟、数据路径延时示意图,如图1所示,芯片与SPI Flash的数据路径延时主要包括:芯片时钟输出延时、PCB时钟走线延时、颗粒时钟输入延时、颗粒数据输出延时、PCB数据走线延时、芯片输入延时。现有的解决方案主要有以下
两种:
(1)在芯片外部增加环路时钟输入,从而补偿芯片内部输出延时和输入延时。
(2)在芯片内部增加高频时钟去采样。
在实现本发明的过程中,发明人发现现有技术中至少存在如下问题:
(1)在芯片外部增加环路时钟仅仅能补偿芯片内部输出延时和输入延时,但是不能补偿PCB延时和外接电平转换芯片延时,另一方面,每个Flash厂家颗粒延时范围都不一致,因此也无法进行准确补偿。
(2)在芯片内部增加高频时钟,通过高频时钟的不同周期去采样。但是,高频时钟给时钟树带来麻烦,使采样操作变得繁琐。
发明内容
本发明实施例提供一种数据采样方法、芯片和计算机存储介质,能够满足对不同速率的SPI数据进行采样的需求,实现数据的稳定采样,具有兼容性强,软件可控的特点。
为达到上述目的,本发明实施例的技术方案是这样实现的:
本发明实施例提供了一种芯片,所述芯片包括:控制器及与所述控制器连接的SPI,所述控制器包括:时钟产生模块、输入输出模块、配置获取模块、时钟延时模块以及采样模块,所述输入输出模块与所述SPI连接,其中,
所述时钟产生模块,配置为获取当前时钟信号,根据所述当前时钟信号生成输出时钟信号,输出所述输出时钟信号至所述输入输出模块;
所述输入输出模块,配置为将所述输出时钟信号通过所述SPI输出至SPI Flash,以及将所述输出时钟信号输出至所述时钟延时模块;
所述配置获取模块,配置为获取配置参数和延时使能信号,将所述配置参数和所述延时使能信号输出至所述时钟延时模块;
所述时钟延时模块,配置为根据所述延时使能信号、所述输出时钟信号和所述配置参数,生成采样时钟信号,将所述采样时钟信号输出至所述采样模块;
所述采样模块,配置为通过所述SPI接收SPI数据,根据所述采样时钟信号对所述SPI数据进行采样。
在一实施例中,所述配置获取模块,配置为配置延时线级数M、延时单元级数N和所述延时使能信号,将所述延时线级数M、所述延时单元级数N以及所述延时使能信号输出至所述时钟延时模块;其中,M和N均为大于等于1的自然数。
在一实施例中,所述时钟延时模块包括:第一选择模块、第二选择模块和延时模块;其中,
所述时钟延时模块,配置为根据所述延时线级数M配置第一级数,所述第一级数为所述第二选择模块的级数,以及根据所述延时线级数M配置第二级数,所述第二级数为所述延时模块的级数;
所述第一选择模块的第一输入端与所述输入输出模块连接,所述第一选择模块的第二输入端与所述第二选择模块连接,所述第一选择模块的第三输入端与所述配置获取模块连接,所述第一选择模块的输出端与所述采样模块连接;
所述第二选择模块由M级第一选择子模块构成;其中,第k级中有2M-k个第一选择子模块;其中,k为大于等于1且小于等于M的自然数;
所述延时模块由2M级延时子模块构成。
在一实施例中,如果M等于1,所述第二选择模块中的第一选择子模块的第一输入端与第1级延时子模块连接;所述第一选择子模块的第二输入端与第2级延时子模块连接;所述第一选择子模块的输出端与所述第一选择模块连接。
在一实施例中,如果M大于1,对于所述第二选择模块中的第k级第一选择子模块:
当k等于1时,第一级中的第i个第一选择子模块的第一输入端与所述2M级延时子模块中的第2i-1级延时子模块连接;所述第i个第一选择子模块的第二输入端与所述2M级延时子模块中的第2i级延时子模块连接;当i为偶数时,所述第i个第一选择子模块的输出端与第2级的第i/2个第一选择子模块连接,或者当i为奇数时,所述第i个第一选择子模块的输出端与第2级的第(i+1)/2个第一选择子模块连接;其中,i为大于等于1且小于等于2M的自然数;
当k大于1且小于M时,第k级中的第j个第一选择子模块的第一输入端与第k-1级中的第2j-1个第一选择子模块连接;所述第j个第一选择子模块的第二输入端与第k-1级中的第2j个第一选择子模块连接;当j为偶数时,所述第j个第一选择子模块的输出端与第k+1级中的第j/2个第一选择子模块连接,或者当j为奇数时,所述第j个第一选择子模块的输出端与第k+1级的第(j+1)/2个第一选择子模块连接;其中j为大于等于1且小于等于2M-k的自然数;
当k等于M时,第M级中的第一选择子模块的第一输入端与第M-1级中的第一个第一选择子模块连接;所述第一选择子模块的第二输入端与第M-1级中的第二个第一选择子模块连接;所述第一选择子模块的输出端与所述第一选择模块连接。
在一实施例中,所述延时子模块包括:第三选择模块和寄存模块;其中,
所述时钟延时模块,配置为根据所述延时单元级数N配置第三级数,所述第三级数为所述第三选择模块的级数,以及根据所述延时单元级数N配置第四级数,所述第四级数为所述寄存模块的级数;
所述第三选择模块由N级第二选择子模块构成;其中,第h级中有2M-h个第二选择子模块;其中,h为大于等于1且小于等于N的自然数;
所述寄存模块由2N级寄存子模块构成。
在一实施例中,如果N等于1,所述第三选择模块中的第二选择子模块的第一输入端与第一级寄存子模块连接;所述第二选择子模块的第二输入端与第二级寄存子模块连接;所述第二选择子模块的输出端与所述第二选择模块连接;
在一实施例中,如果N大于1,对于所述第三选择模块中的第h级第二选择子模块:
当h等于1时,所述第一级中的第p个第二选择子模块的第一输入端与所述2N级寄存子模块中的第2p-1级寄存子模块连接;所述第p个第二选择子模块的第二输入端与所述2N级寄存子模块中的第2p级寄存子模块连接;当p为偶数时,所述第p个第二选择子模块的输出端与第二级的第p/2个第二选择模块,或者当p为奇数时,所述第p个第二选择子模块的输出端与第二级的第(p+1)/2个第二选择子模块连接;其中,p为大于等于1且小于等于2N的自然数;
当h大于1且小于N时,第h级中的第q个第二选择子模块的第一输入端与第h-1级中的第2q-1个第二选择子模块连接;所述第q个第二选择子模块的第二输入端与第h-1级中的第2q个第二选择子模块连接;当q为偶数时,所述第q个第二选择子模块的输出端与第h+1级中的第q/2个第二选择子模块,或者当q为奇数时,所述第q个第二选择子模块的输出端与第h+1级中的第(q+1)/2个第二选择子模块连接;其中,q为大于等于1且小于等于2N-h的自然数;
当h等于N时,第N级中的第二选择子模块的第一输入端与第N-1级中的第一个第二选择子模块连接;所述第二选择子模块的第二输入端与第
N-1级中的第二个第二选择子模块连接;所述第二选择子模块的输出端与所述第二选择模块连接。
在一实施例中,所述第一选择子模块和第二选择子模块为选择器;
所述寄存子模块为寄存器。
本发明实施例还提供了一种数据采样方法,所述方法包括:
获取当前时钟信号,根据所述当前时钟信号生成输出时钟信号;
获取配置参数和延时使能信号,根据所述延时使能信号、所述输出时钟信号和所述配置参数,生成采样时钟信号;
接收SPI数据,通过所述采样时钟信号对所述SPI数据进行采样。
在一实施例中,所述配置参数包括延时线级数M和延时单元级数N;其中,M和N均为大于等于1的自然数。
在一实施例中,所述接收SPI数据之前,所述方法还包括:
获取预设校验数据,通过所述采样时钟信号对所述预设校验数据进行采样,获得校验采样数据;
根据所述采样数据和所述校验采样数据判断所述配置参数是否满足预设规则,如果所述配置参数满足所述预设规则,则对所述SPI数据进行采样。
在一实施例中,所述根据所述采样数据和所述校验采样数据判断所述配置参数是否满足预设规则,还包括:
如果所述配置参数不满足所述预设规则,则对所述配置参数进行调整,直到调整后的配置参数满足所述预设规则。
在一实施例中,所述对所述配置参数进行调整,包括:
根据预设方法对所述延时线级数M和所述延时单元级数N进行调整。
在一实施例中,所述获得采样数据之后,所述方法还包括:
将所述采样数据输出至寄存器;
当获取读取请求时,将所述采样数据按照预设时钟域进行读取,获得更新的采样数据;
使用所述更新的采样数据。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的数据采样方法。
由此可见,在本发明实施例的技术方案中,获取当前时钟信号,根据当前时钟信号生成输出时钟信号;获取配置参数和延时使能信号,根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号;接收SPI数据,通过采样时钟信号对SPI数据进行采样,获得采样数据。也就是说,在本发明提出的技术方案中,可以根据当前时钟信号获取采样时钟信号,然后通过采样时钟信号对SPI数据进行采样,从而获得采样数据。显然,和现有技术相比,本发明实施例的技术方案,能够满足对不同速率的SPI数据进行采样的需求,实现数据的稳定采样,具有兼容性强,软件可控的特点。
图1为芯片与SPI Flash的时钟、数据路径延时示意图;
图2为本发明实施例中本发明实施例中芯片的第一组成结构示意图;
图3为本发明实施例中芯片时钟信号传输示意图;
图4为本发明实施例中芯片的第二组成结构示意图;
图5为本发明实施例中时钟延时模块的第一连接结构示意图
图6为本发明实施例中时钟延时模块的第二连接结构示意图;
图7为本发明实施例中芯片的第三组成结构示意图;
图8为本发明实施例中延时子模块的第一连接结构示意图;
图9为本发明实施例中数据采样方法的实现流程示意图;
图10为本发明实施例中校验配置参数方法的实现流程示意图;
图11为本发明实施例中采样时钟信号延时示意图。
下面结合附图对本发明实施例提供的一种数据采样方法和芯片进行详细地描述。
实施例一
本发明实施例公开了一种芯片1,图2为本发明实施例中芯片的第一组成结构示意图,如图2所示,芯片1包括:控制器10及与控制器10连接的SPI11,其中,上述控制器10可以通过单根数据线、双根数据线以及四根数据线中的任意一种产生输出时钟。
在本发明的具体实施例中,控制器10包括:时钟产生模块100、输入输出模块101、配置获取模块102、时钟延时模块103以及采样模块104,其中,输入输出模块101与SPI11连接。
时钟产生模块100,配置为获取当前时钟信号,根据当前时钟信号生成输出时钟信号,输出上述输出时钟信号至输入输出模块101。
在本发明的具体实施例中,时钟产生模块100可以获取当前工作时钟域的当前时钟信号,然后根据当前时钟信号生成输出时钟信号,将上述输出时钟信号至输入输出模块101。
在本发明的具体实施例中,由于当前工作时钟域的频率为输出时钟信号的两倍,时钟产生模块100需要对获取的当前时钟信号进行转换,获得输出时钟信号。
在本发明的具体实施例中,时钟产生模块100可以通过单根数据线、双根数据线以及四根数据线中的任意一种将上述输出时钟信号输出至输入输出模块101。
在本发明的具体实施例中,时钟产生模块100在将上述输出时钟信号
至输入输出模块101的同时,还向输入输出模块101输出预设使能信号,该预设使能信号用于控制输入输出模块101是否对上述输出时钟信号进行输出。
输入输出模块101,配置为将输出时钟信号通过SPI11输出至SPI Flash,以及将输出时钟信号输出至时钟延时模块103。
在本发明的具体实施例中,输入输出模块101接收到时钟产生模块100发送的输出时钟信号后,可以将该输出时钟信号同时输出至SPI Flash以及时钟延时模块103。其中,输入输出模块101通过SPI11将输出时钟信号进行输出。
在本发明的具体实施例中,输入输出模块101接收到时钟产生模块100发送的输出时钟信号的同时,输入输出模块101还接收到时钟产生模块100发送的预设使能信号,该预设使能信号用于控制输入输出模块101是否对上述输出时钟信号进行输出。
在本发明的具体实施例中,当预设使能信号对应的为预设的开启信号时,输入输出模块101将该输出时钟信号同时输出至SPI Flash以及时钟延时模块103;当预设使能信号对应的为预设的关闭信号时,输入输出模块101将不对该输出时钟信号进行输出。
所述配置获取模块102,配置为获取配置参数和延时使能信号,将配置参数和延时使能信号输出至时钟延时模块103。
在本发明的具体实施例中,所述配置获取模块102获取配置参数和延时使能信号之后,将配置参数和延时使能信号输出至时钟延时模块103。其中,配置参数和延时使能信号可以预先存储在芯片中的寄存器中,然后由寄存器发送给配置获取模块102。
在本发明的具体实施例中,所述配置获取模块102配置为配置配置参数和延时使能信号,将配置参数和延时使能信号输出至时钟延时模块103。
其中,配置参数包括:延时线级数M和延时单元级数N;其中,M和N均为大于等于1的自然数。
在本发明的具体实施例中,配置参数用于配置时钟延时模块103的组成结构,延时使能信号用于控制时钟延时模块103是否输出采样时钟信号。
所述时钟延时模块103,配置为根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号,将采样时钟信号输出至采样模块104。
在本发明的具体实施例中,时钟延时模块103在接收到由输入输出模块101发送的输出时钟信号、由配置获取模块102发送的配置参数和延时使能信号之后,根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号,将采样时钟信号输出至采样模块104。
所述采样模块104,配置为通过SPI11接收SPI数据,根据采样时钟信号对SPI数据进行采样。
在本发明的具体实施例中,采样模块104在获取由时钟延时模块103发送的采样时钟信号以后,可以通过SPI11接收SPI数据,然后根据采样时钟信号对SPI数据进行采样,最终得到采样数据。
图3为本发明实施例中芯片时钟信号传输示意图,如图3所示,时钟产生模块100获取当前时钟信号wclk,生成输出时钟信号spi_clk_o以及预设使能信号spi_clk_oe,输出上述输出时钟信号以及预设使能信号至输入输出模块101;输入输出模块101将输出时钟信号spi_clk_o作为通讯同步时钟信号spi_clk通过SPI11输出至SPI Flash,以及将输出时钟信号spi_clk_o作为输入时钟信号clk_in输出至时钟延时模块103;时钟延时模块103在接收到由输入输出模块101发送的输出时钟信号、由配置获取模块102发送的配置参数M、N和延时使能信号tapdly_en之后,根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号clk_sample,将采样时钟信号输出至采样模块104;采样模块104可以通过SPI11接收SPI数据spi_dat,然
后根据采样时钟信号对SPI数据进行采样,最终得到采样数据,将采样数据输出至先入先出队列to_fifo。
实施例二
图4为本发明实施例中芯片的第二组成结构示意图,如图4所示,时钟延时模块103包括第一选择模块1030、第二选择模块1031以及延时模块1032,其中,第二选择模块1031包括第一选择子模块10310,延时模块1032包括延时子模块10320。
在本发明的具体实施例中,时钟延时模块103配置为根据上述延时线级数M配置第一级数,所述第一级数为所述第二选择模块1031的级数,同时根据上述延时线级数M配置第二级数,所述第二级数为所述延时模块1032的级数。例如,当延时线级数M为3时,时钟延时模块103配置第一级数为3,同时配置第二级数也为3。
在本发明的具体实施例中,第二选择模块1031由M级第一选择子模块10310构成;其中,第k级中有2M-k个第一选择子模块10310;其中,k为大于等于1且小于等于M的自然数;延时模块1032由2M级延时子模块10320构成。
图5为本发明实施例中时钟延时模块的第一连接结构示意图,如图5所示,第一选择模块1030的第一输入端与输入输出模块101连接,第一选择模块1030的第二输入端与第二选择模块1031连接,第一选择模块1030的第三输入端与配置获取模块102连接,第一选择模块1030的输出端与采样模块104连接。
在本发明的具体实施例中,第一选择模块1030获取由输入输出模块101发送的输出时钟信号,且第一选择模块1030获取由第二选择模块1031发送的采样时钟信号,同时,第一选择模块1030获取由配置获取模块102发送的延时使能信号,第一选择模块1030根据延时使能信号选择输出上述输
出时钟信号,或者,输出上述采样时钟信号。
在本发明的具体实时例中,配置获取模块102发送的延时使能信号用于控制第一选择模块1030的输出,作为一种实施方式,延时使能信号是根据输出时钟信号的速率配置的。
在本发明的具体实施例中,当输出时钟信号的速率大于预设阈值时,可以将延时使能信号置为1,表示控制第一选择模块1030输出采样时钟信号;当输出时钟信号的速率小于预设阈值时,可以将延时使能信号置为0,表示控制第一选择模块1030输出时钟信号。
图6为本发明实施例中时钟延时模块的第二连接结构示意图。
如图6所示,当M等于1,即第二选择模块1031由1级第一选择子模块10310构成,延时模块1032由2级延时子模块10320构成。第二选择模块1031中的第一选择子模块10310的第一输入端与第一级延时子模块10320连接;第一选择子模块10310的第二输入端与第二级延时子模块10320连接;第一选择子模块10310的输出端与第一选择模块1030连接。
如上述图6所示,当M大于1,即第二选择模块1031由M级第一选择子模块10310构成,延时模块1032由2M级延时子模块10320构成。
在本发明的具体实施例中,对于第二选择模块1031中的第k级第一选择子模块10310:
当k等于1时,第1级中的第i个第一选择子模块10310的第一输入端与2M级延时子模块10320中的第2i-1级延时子模块10320连接;第i个第一选择子模块10310的第二输入端与2M级延时子模块10320中的第2i级延时子模块10320连接;当i为偶数时,第i个第一选择子模块10310的输出端与第2级的第i/2个第一选择子模块10310连接,或者当i为奇数时,第i个第一选择子模块10310的输出端与第2级的第(i+1)/2个第一选择子模块10310连接;其中,i为大于等于1且小于等于2M的自然数;当k大于
1且小于M时,第k级中的第j个第一选择子模块10310的第一输入端与第k-1级中的第2j-1个第一选择子模块10310连接;第j个第一选择子模块10310的第二输入端与第k-1级中的第2j个第一选择子模块10310连接;当j为偶数时,第j个第一选择子模块10310的输出端与第k+1级中的第j/2个第一选择子模块10310连接,或者当j为奇数时,第j个第一选择子模块10310的输出端与第k+1级的第(j+1)/2个第一选择子模块10310连接;其中j为大于等于1且小于等于2M-k的自然数;当k等于M时,第M级中的第一选择子模块10310的第一输入端与第M-1级中的第一个第一选择子模块10310连接;第一选择子模块10310的第二输入端与第M-1级中的第二个第一选择子模块10310连接;第一选择子模块10310的输出端与第一选择模块1030连接。
在本发明的具体实施例中,基于上述图6的钟延时模块的第三连接结构示意图,例如,当M=3,i=1,j=2时,第一级中的第一个第一选择子模块10310的第一输入端与8级延时子模块10320中的第一级延时子模块10320连接;第一个第一选择子模块10310的第二输入端与8级延时子模块10320中的第二级延时子模块10320连接;第一个第一选择子模块10310的输出端与第2级的第二个第一选择子模块10310连接;第二级中的第二个第一选择子模块10310的第一输入端与第一级中的第三个第一选择子模块10310连接;第二个第一选择子模块10310的第二输入端与第一级中的第四个第一选择子模块10310连接;第二个第一选择子模块10310的输出端与第三级的第一个第一选择子模块10310连接;第三级中的第一选择子模块10310的第一输入端与第二级中的第一个第一选择子模块10310连接;第一选择子模块10310的第二输入端与第二级中的第二个第一选择子模块10310连接;第一选择子模块10310的输出端与第一选择模块1030连接。
实施例三
图7为本发明实施例中芯片的第三组成结构示意图,如图7所示,延时子模块10320包括第三选择模块103200和寄存模块103201,其中,第三选择模块103200包括第二选择子模块1032000,寄存模块103201包括寄存子模块1032010。
在本发明的具体实施例中,时钟延时模块103配置根据上述延时单元级数N配置第三级数,所述第三级数为第三选择模块103200的级数,以及根据上述延时单元级数N配置第四级数,所述第四级数为所述寄存模块103201的级数。例如,当延时单元级数N为3时,时钟延时模块103配置第三选择模块103200的级数为3,同时配置寄存模块103201的级数也为3。
在本发明的具体实施例中,第三选择模块103200由N级第二选择子模块1032000构成;其中,第k级中有2N-k个第二选择子模块1032000;其中,k为大于等于1且小于等于M的自然数;寄存模块103201由2N级寄存子模块1032010构成。
图8为本发明实施例中延时子模块的第一连接结构示意图。
如图8所示,当N等于1,即第三选择模块103200由1级第二选择子模块1032000构成,寄存模块103201由2级寄存子模块1032010构成。第三选择模块103200中的第二选择子模块1032000的第一输入端与第一级寄存子模块1032010连接;第二选择子模块1032000的第二输入端与第二级寄存子模块1032010连接;第二选择子模块1032000的输出端与第二选择模块1031连接;
如上述图8所示,当N大于1,即第三选择模块103200由N级第二选择子模块1032000构成,寄存模块103201由2N级寄存子模块1032010构成。
在本发明的具体实施例中,对于第三选择模块103200中的第h级第二选择子模块1032000:
当h等于1时,第一级中的第p个第二选择子模块1032000的第一输入端与2N级寄存子模块1032010中的第2p-1级寄存子模块1032010连接;第p个第二选择子模块1032000的第二输入端与2N级寄存子模块1032010中的第2p级寄存子模块1032010连接;当p为偶数时,第p个第二选择子模块1032000的输出端与第2级的第p/2个第二选择模块1032000连接,或者当p为奇数时,第p个第二选择子模块1032000的输出端与第2级的第(p+1)/2个第二选择子模块1032000连接;其中,p为大于等于1且小于等于2N的自然数;当h大于1且小于N时,第h级中的第q个第二选择子模块1032000的第一输入端与第h-1级中的第2q-1个第二选择子模块1032000连接;第q个第二选择子模块1032000的第二输入端与第h-1级中的第2q个第二选择子模块1032000连接;当q为偶数时,所述第q个第二选择子模块1032000的输出端与第h+1级中的第q/2个第二选择子模块1032000连接,或者当q为奇数时,所述第q个第二选择子模块1032000的输出端与第h+1级中的第(q+1)/2个第二选择子模块1032000连接;其中,q为大于等于1且小于等于2N-h的自然数;当h等于N时,第N级中的第二选择子模块1032000的第一输入端与第N-1级中的第一个第二选择子模块1032000连接;第二选择子模块1032000的第二输入端与第N-1级中的第二个第二选择子模块1032000连接;第二选择子模块1032000的输出端与第二选择模块1031连接。
在本发明的具体实施例中,基于上述图8的延时子模块的第一连接结构示意图,例如,当N=3,p=1,q=2时,第一级中的第一个第二选择子模块1032000的第一输入端与8级寄存子模块1032010中的第一级寄存子模块1032010连接;第一个第二选择子模块1032000的第二输入端与8级寄存子模块1032010中的第二级寄存子模块1032010连接;第一个第二选择子模块1032000的输出端与第二级的第一个第二选择子模块1032000连接;
第二级中的第二个第二选择子模块1032000的第一输入端与第一级中的第三个第二选择子模块1032000连接;第二个第二选择子模块1032000的第二输入端与第一级中的第四个第二选择子模块1032000连接;第二个第二选择子模块1032000的输出端与第三级中的第一个第二选择子模块1032000连接;第三级中的第二选择子模块1032000的第一输入端与第二级中的第一个第二选择子模块1032000连接;第二选择子模块1032000的第二输入端与第二级中的第二个第二选择子模块1032000连接;第二选择子模块1032000的输出端与第二选择模块1031连接。
在本发明的具体实施例中,作为一种实施方式,第一选择子模块10310和第二选择子模块1032000可以为选择器,寄存子模块1032010可以为寄存器。
本发明实施例提出的芯片,上述芯片包括:控制器及与控制器连接的SPI,其中,所述控制器包括:时钟产生模块、输入输出模块、配置获取模块、时钟延时模块以及采样模块,输入输出模块与SPI连接。其中,时钟产生模块配置为获取当前时钟信号,根据当前时钟信号生成输出时钟信号,输出上述输出时钟信号至输入输出模块;输入输出模块配置为将输出时钟信号通过SPI输出至SPI Flash,以及将输出时钟信号输出至时钟延时模块;配置获取模块配置为获取配置参数和延时使能信号,将配置参数和延时使能信号输出至时钟延时模块;时钟延时模块配置为根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号,将采样时钟信号输出至采样模块;采样模块配置为通过SPI接收SPI数据,根据采样时钟信号对SPI数据进行采样。在本发明提出的技术方案中,可以根据当前时钟信号获取采样时钟信号,然后通过采样时钟信号对SPI数据进行采样,从而获得采样数据。显然,和现有技术相比,本发明实施例提出的一种数据采样方法和芯片,能够满足对不同速率的SPI数据进行采样的需求,实现数据的稳
定采样,具有兼容性强,软件可控的特点;并且,实现起来简单方便,便于普及,适用范围更广。
实施例四
图9为本发明实施例中数据采样方法的实现流程示意图,如图9所示,本发明具体实施例中,数据采样的方法具体包括以下步骤:
步骤101、获取当前时钟信号,根据所述当前时钟信号生成输出时钟信号。
在本发明的具体实施例中,控制器可以获取当前工作时钟域的当前时钟信号,然后根据当前时钟信号生成输出时钟信号。
在本发明的具体实施例中,由于当前工作时钟域的频率为输出时钟信号的两倍,控制器需要对获取的当前时钟信号进行转换,获得输出时钟信号。
在本发明的具体实施例中,控制器可以通过单根数据线、双根数据线以及四根数据线中的任意一种将上述输出时钟信号输出。
在本发明的具体实施例中,控制器生成上述输出时钟信号的同时,还生产预设使能信号,该预设使能信号用于控制是否对上述输出时钟信号进行输出。
在本发明的具体实施例中,当预设使能信号对应的为预设的开启信号时,控制器输出该输出时钟信号;当预设使能信号对应的为预设的关闭信号时,控制器将不对该输出时钟信号进行输出。
步骤102、获取配置参数和延时使能信号,根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号。
在本发明的具体实施例中,控制器可以获取配置参数和延时使能信号,根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号。其中,配置参数和延时使能信号可以预先存储在芯片中的寄存器中,然后由寄存
器发送给控制器。
在本发明的具体实施例中,配置参数包括:延时线级数M和延时单元级数N;其中,M和N均为大于等于1的自然数。
在本发明的具体实施例中,配置参数用于配置采样时钟信号的生成,延时使能信号用于控制采样时钟信号的输出。
步骤103、接收SPI数据,通过采样时钟信号对SPI数据进行采样,获得采样数据。
在本发明的具体实施例中,控制器在获取由时钟延时模块103发送的采样时钟信号以后,可以通过SPI接收SPI数据,然后根据采样时钟信号对SPI数据进行采样,最终得到采样数据。
如上述图9所示,在获得采样数据之后,本发明具体实施例提出的数据采样方法还包括以下步骤:
步骤104、将所述采样数据输出至寄存器;
步骤105、当获取读取请求时,将采样数据按照预设时钟域进行读取,获得更新的采样数据;
步骤106、使用更新的采样数据。
在本发明的具体实施例中,控制器可以将对SPI数据采样后得到的采样数据同步到预设时钟域中进行读取,从而获得更新的采样数据,最终可以对更新的采样数据进行下一级的处理和使用。
实施例五
图10为本发明实施例中校验配置参数方法的实现流程示意图,如图10所示,本发明具体实施例中,校验配置参数的方法具体包括以下步骤:
步骤201、获取预设校验数据,通过采样时钟信号对预设校验数据进行采样,获得校验采样数据。
在本发明的具体实施例中,控制器在接收SPI数据之前,获取预设校
验数据,通过采样时钟信号对预设校验数据进行采样,获得校验采样数据。
在本发明的具体实施例中,控制器在对SPI数据进行采样之前,需要对配置参数进行校验,从而确定上述配置参数是否可以配置满足采样需求的采样信号。其中,控制器对配置参数进行校验的方法可以为获取预设校验数据,通过采样时钟信号对预设校验数据进行采样,获得校验采样数据。
步骤202、根据采样数据和校验采样数据判断配置参数是否满足预设规则,如果配置参数满足预设规则,则对SPI数据进行采样。
在本发明的具体实施例中,控制器在根据配置参数获得校验采样数据之后,可以根据采样数据和校验采样数据判断配置参数是否满足预设规则,如果配置参数满足预设规则,则对SPI数据进行采样。
在本发明的具体实施例中,控制器获取校验采样数据后,将校验采样数据与校验数据进行比对获取比对结果,控制器可以根据比对判断是否满足预设规则,如果满足,则可以认为上述配置参数符合数据采样的预设要求,便可以根据上述配置参数配置采样信号。
如上述图10所示,校验配置参数的方法还包括:
步骤203、如果配置参数不满足预设规则,则对配置参数进行调整,直到调整后的配置参数满足预设规则。
在本发明的具体实施例中,如果配置参数不满足预设规则,控制器则对配置参数进行调整,根据调整后的配置参数生成采样信号,然后重新对采样数据进行采样,直到调整后的配置参数满足预设规则。
在本发明的具体实施例中,当校验采样数据与校验数据的比对结果不满足预设规则,控制器可以根据预设方法对配置参数进行调整,即控制器可以根据预设方法对延时线级数M和延时单元级数N进行调整。
图11为本发明实施例中采样时钟信号延时示意图,如图11所示,(a)中在不对采样时钟信号进行延时的情况下,采样时钟信号能满足采样的时
序关系,在clk_sample上升沿时,刚好能采样到spi_datX(X可以为1,2或4比特)。由于(b)中的spi_datX比(a)的相位往后移动了,此时如果不对clk_in延时,clk_sample上升沿不可能对spi_datX有效采样,因此需要配置延时使能信号tapdly_en和配置参数M、N。(c)中的spi_datX比(b)的相位更往后移动,因此需要对clk_in延时更大。
本发明实施例提出的数据采样方法,获取当前时钟信号,根据当前时钟信号生成输出时钟信号;获取配置参数和延时使能信号,根据延时使能信号、输出时钟信号和配置参数,生成采样时钟信号;接收SPI数据,通过采样时钟信号对SPI数据进行采样,获得采样数据。也就是说,在本发明提出的技术方案中,可以根据当前时钟信号获取采样时钟信号,然后通过采样时钟信号对SPI数据进行采样,从而获得采样数据。显然,和现有技术相比,本发明实施例提出的一种数据采样方法和芯片,能够满足对不同速率的SPI数据进行采样的需求,实现数据的稳定采样,具有兼容性强,软件可控的特点;并且,实现起来简单方便,便于普及,适用范围更广。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现
在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
本发明实施例的技术方案可以根据当前时钟信号获取采样时钟信号,然后通过采样时钟信号对SPI数据进行采样,从而获得采样数据。显然,和现有技术相比,本发明实施例提出的一种数据采样方法和芯片,能够满足对不同速率的SPI数据进行采样的需求,实现数据的稳定采样,具有兼容性强,软件可控的特点;并且,实现起来简单方便,便于普及,适用范围更广。
Claims (16)
- 一种芯片,所述芯片包括:控制器及与所述控制器连接的串行外设接口SPI,所述控制器包括:时钟产生模块、输入输出模块、配置获取模块、时钟延时模块以及采样模块,所述输入输出模块与所述SPI连接,其中,所述时钟产生模块,配置为获取当前时钟信号,根据所述当前时钟信号生成输出时钟信号,输出所述输出时钟信号至所述输入输出模块;所述输入输出模块,配置为将所述输出时钟信号通过所述SPI输出至SPI Flash,以及将所述输出时钟信号输出至所述时钟延时模块;所述配置获取模块,配置为获取配置参数和延时使能信号,将所述配置参数和所述延时使能信号输出至所述时钟延时模块;所述时钟延时模块,配置为根据所述延时使能信号、所述输出时钟信号和所述配置参数,生成采样时钟信号,将所述采样时钟信号输出至所述采样模块;所述采样模块,配置为通过所述SPI接收SPI数据,根据所述采样时钟信号对所述SPI数据进行采样。
- 根据权利要求1所述的芯片,其中,所述配置获取模块,配置为配置延时线级数M、延时单元级数N和所述延时使能信号,将所述延时线级数M、所述延时单元级数N以及所述延时使能信号输出至所述时钟延时模块;其中,M和N均为大于等于1的自然数。
- 根据权利要求2所述的芯片,其中,所述时钟延时模块包括:第一选择模块、第二选择模块和延时模块;其中,所述时钟延时模块,配置为根据所述延时线级数M配置第一级数,所述第一级数为所述第二选择模块的级数;以及根据所述延时线级数M配置第二级数,所述第二级数为所述延时模块的级数;所述第一选择模块的第一输入端与所述输入输出模块连接,所述第一选择模块的第二输入端与所述第二选择模块连接,所述第一选择模块的第三输入端与所述配置获取模块连接,所述第一选择模块的输出端与所述采样模块连接;所述第二选择模块由M级第一选择子模块构成;其中,第k级中有2M-k个第一选择子模块;其中,k为大于等于1且小于等于M的自然数;所述延时模块由2M级延时子模块构成。
- 根据权利要求3所述的芯片,其中,如果M等于1,所述第二选择模块中的第一选择子模块的第一输入端与第1级延时子模块连接;所述第一选择子模块的第二输入端与第2级延时子模块连接;所述第一选择子模块的输出端与所述第一选择模块连接。
- 根据权利要求3所述的芯片,其中,如果M大于1,对于所述第二选择模块中的第k级第一选择子模块:当k等于1时,第一级中的第i个第一选择子模块的第一输入端与所述2M级延时子模块中的第2i-1级延时子模块连接;所述第i个第一选择子模块的第二输入端与所述2M级延时子模块中的第2i级延时子模块连接;当i为偶数时,所述第i个第一选择子模块的输出端与第2级的第i/2个第一选择子模块连接,或者当i为奇数时,所述第i个第一选择子模块的输出端与第2级的第(i+1)/2个第一选择子模块连接;其中,i为大于等于1且小于等于2M的自然数;当k大于1且小于M时,第k级中的第j个第一选择子模块的第一输入端与第k-1级中的第2j-1个第一选择子模块连接;所述第j个第一选择子模块的第二输入端与第k-1级中的第2j个第一选择子模块连接;当j为偶数时,所述第j个第一选择子模块的输出端与第k+1级中的第j/2个第一选择子模块连接,或者当j为奇数时,所述第j个第一选择子模块的输出端与第 k+1级的第(j+1)/2个第一选择子模块连接;其中j为大于等于1且小于等于2M-k的自然数;当k等于M时,第M级中的第一选择子模块的第一输入端与第M-1级中的第一个第一选择子模块连接;所述第一选择子模块的第二输入端与第M-1级中的第二个第一选择子模块连接;所述第一选择子模块的输出端与所述第一选择模块连接。
- 根据权利要求3所述的芯片,其中,所述延时子模块包括:第三选择模块和寄存模块;其中,所述时钟延时模块,配置为根据所述延时单元级数N配置第三级数,所述第三级数为所述第三选择模块的级数,以及根据所述延时单元级数N配置第四级数,所述第四级数为所述寄存模块的级数;所述第三选择模块由N级第二选择子模块构成;其中,第h级中有2M-h个第二选择子模块;其中,h为大于等于1且小于等于N的自然数;所述寄存模块由2N级寄存子模块构成。
- 根据权利要求6所述的芯片,其中,如果N等于1,所述第三选择模块中的第二选择子模块的第一输入端与第一级寄存子模块连接;所述第二选择子模块的第二输入端与第二级寄存子模块连接;所述第二选择子模块的输出端与所述第二选择模块连接;
- 根据权利要求6所述的芯片,其中,如果N大于1,对于所述第三选择模块中的第h级第二选择子模块:当h等于1时,所述第一级中的第p个第二选择子模块的第一输入端与所述2N级寄存子模块中的第2p-1级寄存子模块连接;所述第p个第二选择子模块的第二输入端与所述2N级寄存子模块中的第2p级寄存子模块连接;当p为偶数时,所述第p个第二选择子模块的输出端与第二级的第p/2个第二选择模块,或者当p为奇数时,所述第p个第二选择子模块的输 出端与第二级的第(p+1)/2个第二选择子模块连接;其中,p为大于等于1且小于等于2N的自然数;当h大于1且小于N时,第h级中的第q个第二选择子模块的第一输入端与第h-1级中的第2q-1个第二选择子模块连接;所述第q个第二选择子模块的第二输入端与第h-1级中的第2q个第二选择子模块连接;当q为偶数时,所述第q个第二选择子模块的输出端与第h+1级中的第q/2个第二选择子模块,或者当q为奇数时,所述第q个第二选择子模块的输出端与第h+1级中的第(q+1)/2个第二选择子模块连接;其中,q为大于等于1且小于等于2N-h的自然数;当h等于N时,第N级中的第二选择子模块的第一输入端与第N-1级中的第一个第二选择子模块连接;所述第二选择子模块的第二输入端与第N-1级中的第二个第二选择子模块连接;所述第二选择子模块的输出端与所述第二选择模块连接。
- 根据权利要求3或5所述的芯片,其中,所述第一选择子模块和第二选择子模块为选择器;所述寄存子模块为寄存器。
- 一种数据采样方法,所述方法包括:获取当前时钟信号,根据所述当前时钟信号生成输出时钟信号;获取配置参数和延时使能信号,根据所述延时使能信号、所述输出时钟信号和所述配置参数,生成采样时钟信号;接收SPI数据,通过所述采样时钟信号对所述SPI数据进行采样。
- 根据权利要求10所述的方法,其中,所述配置参数包括延时线级数M和延时单元级数N;其中,M和N均为大于等于1的自然数。
- 根据权利要求10所述的方法,其中,所述接收SPI数据之前,所述方法还包括:获取预设校验数据,通过所述采样时钟信号对所述预设校验数据进行采样,获得校验采样数据;根据所述采样数据和所述校验采样数据判断所述配置参数是否满足预设规则,如果所述配置参数满足所述预设规则,则对所述SPI数据进行采样。
- 根据权利要求12所述的方法,其中,所述方法还包括:如果所述配置参数不满足所述预设规则,则对所述配置参数进行调整,直到调整后的配置参数满足所述预设规则。
- 根据权利要求13所述的方法,其中,所述对所述配置参数进行调整,包括:根据预设方法对所述延时线级数M和所述延时单元级数N进行调整。
- 根据权利10所述的方法,其中,所述获得采样数据之后,所述方法还包括:将所述采样数据输出至寄存器;当获取读取请求时,将所述采样数据按照预设时钟域进行读取,获得更新的采样数据;使用所述更新的采样数据。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求10至15任一项所述的数据采样方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611239614.0 | 2016-12-28 | ||
| CN201611239614.0A CN108255231B (zh) | 2016-12-28 | 2016-12-28 | 一种数据采样方法和芯片 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018120612A1 true WO2018120612A1 (zh) | 2018-07-05 |
Family
ID=62706861
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/085606 Ceased WO2018120612A1 (zh) | 2016-12-28 | 2017-05-24 | 一种数据采样方法、芯片和计算机存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108255231B (zh) |
| WO (1) | WO2018120612A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111800109A (zh) * | 2020-06-12 | 2020-10-20 | 烽火通信科技股份有限公司 | 一种多通道高速数据对齐的方法及装置 |
| CN111801656A (zh) * | 2018-10-29 | 2020-10-20 | 深圳配天智能技术研究院有限公司 | 机器人控制系统、心跳监测方法及监测模块、存储介质 |
| CN114048470A (zh) * | 2022-01-13 | 2022-02-15 | 浙江大学 | 基于tdc模块的硬件攻击的防御方法及装置、电子设备 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110673524B (zh) * | 2019-09-27 | 2020-09-22 | 安凯(广州)微电子技术有限公司 | 一种高速spi主模式控制器 |
| TWI767234B (zh) * | 2020-05-21 | 2022-06-11 | 大陸商北京集創北方科技股份有限公司 | 串行周邊介面的傳輸速率提升方法、資料傳輸電路及資訊處理裝置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102866979A (zh) * | 2012-09-05 | 2013-01-09 | 四川省绵阳西南自动化研究所 | 一种同步串行接口信号传感器数据采集装置 |
| US20140297922A1 (en) * | 2013-03-29 | 2014-10-02 | Nitin V. Sarangdhar | Method and apparatus for managing serial peripheral interface (spi) flash |
| CN104809094A (zh) * | 2015-05-25 | 2015-07-29 | 中国电子科技集团公司第四十七研究所 | Spi控制器及其通信方法 |
| CN105335322A (zh) * | 2015-10-28 | 2016-02-17 | 上海斐讯数据通信技术有限公司 | 一种spi接口转换i2c总线接口的方法及转换器 |
| CN105550147A (zh) * | 2015-12-11 | 2016-05-04 | 上海华冠电子设备有限责任公司 | 一种spi总线扩展系统及其通讯方法 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100587653C (zh) * | 2007-08-03 | 2010-02-03 | 上海摩波彼克半导体有限公司 | Soc系统处理器芯片中的高速同步外设时钟相位控制装置 |
| CN105634493A (zh) * | 2014-10-29 | 2016-06-01 | 中兴通讯股份有限公司 | 一种数据采样方法及装置 |
| CN204423111U (zh) * | 2015-01-26 | 2015-06-24 | 北京神州龙芯集成电路设计有限公司 | 一种应用于智能电网集中器中的片上系统 |
| CN105591650B (zh) * | 2015-12-18 | 2019-01-18 | 豪威科技(上海)有限公司 | 模数转换器及其自校正方法 |
| CN105975691B (zh) * | 2016-05-05 | 2018-08-07 | 福州瑞芯微电子股份有限公司 | Spi自动调整采样相位的方法及装置 |
-
2016
- 2016-12-28 CN CN201611239614.0A patent/CN108255231B/zh active Active
-
2017
- 2017-05-24 WO PCT/CN2017/085606 patent/WO2018120612A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102866979A (zh) * | 2012-09-05 | 2013-01-09 | 四川省绵阳西南自动化研究所 | 一种同步串行接口信号传感器数据采集装置 |
| US20140297922A1 (en) * | 2013-03-29 | 2014-10-02 | Nitin V. Sarangdhar | Method and apparatus for managing serial peripheral interface (spi) flash |
| CN104809094A (zh) * | 2015-05-25 | 2015-07-29 | 中国电子科技集团公司第四十七研究所 | Spi控制器及其通信方法 |
| CN105335322A (zh) * | 2015-10-28 | 2016-02-17 | 上海斐讯数据通信技术有限公司 | 一种spi接口转换i2c总线接口的方法及转换器 |
| CN105550147A (zh) * | 2015-12-11 | 2016-05-04 | 上海华冠电子设备有限责任公司 | 一种spi总线扩展系统及其通讯方法 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111801656A (zh) * | 2018-10-29 | 2020-10-20 | 深圳配天智能技术研究院有限公司 | 机器人控制系统、心跳监测方法及监测模块、存储介质 |
| CN111801656B (zh) * | 2018-10-29 | 2023-12-22 | 深圳配天机器人技术有限公司 | 机器人控制系统、心跳监测方法及监测模块、存储介质 |
| CN111800109A (zh) * | 2020-06-12 | 2020-10-20 | 烽火通信科技股份有限公司 | 一种多通道高速数据对齐的方法及装置 |
| CN114048470A (zh) * | 2022-01-13 | 2022-02-15 | 浙江大学 | 基于tdc模块的硬件攻击的防御方法及装置、电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108255231B (zh) | 2020-10-02 |
| CN108255231A (zh) | 2018-07-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018120612A1 (zh) | 一种数据采样方法、芯片和计算机存储介质 | |
| US7675439B2 (en) | Serial/parallel data conversion apparatus and method thereof | |
| US10756714B2 (en) | Skew control | |
| CN105183423B (zh) | 一种跨时钟域异步数据处理方法和装置 | |
| CN104899165B (zh) | 对电子装置执行存储接口控制的方法及其装置 | |
| US10564664B2 (en) | Integrated skew control | |
| US9722590B1 (en) | Skew adjustment circuit, semiconductor device, and skew calibration method | |
| US20150102846A1 (en) | Distributing multiplexing logic to remove multiplexor latency on the output path for variable clock cycle, delayed signals | |
| EP3907886A3 (en) | Methods and apparatus for data synchronization in systems having multiple clock and reset domains | |
| US8578074B2 (en) | First in first out device and method thereof | |
| CN107171657A (zh) | 一种序列脉冲部分上升沿加抖的装置 | |
| US8692600B1 (en) | Multi-protocol driver slew rate calibration system for calibration slew rate control signal values | |
| KR101172270B1 (ko) | 지연고정루프에서의 듀티 사이클 보정 | |
| JP2013109637A (ja) | メモリインターフェース回路、および、そのメモリインターフェース回路の動作方法 | |
| CN108227828A (zh) | 一种序列信号发生器及序列信号产生方法 | |
| JP6201401B2 (ja) | タイミング制御回路 | |
| WO2022247681A1 (zh) | 延时调制电路、方法、芯片及服务器 | |
| CN107271890A (zh) | 一种序列脉冲部分下降沿加抖的装置 | |
| US20080247496A1 (en) | Early HSS Rx Data Sampling | |
| CN103595670B (zh) | 一种信号偏移校准方法和装置 | |
| US9537618B2 (en) | Systems and methods for differential pair in-pair skew determination and compensation | |
| US9378175B2 (en) | Data transfer between a master and slave | |
| CN106897233B (zh) | 数据传输接口的源同步电路 | |
| Romoth et al. | Optimizing inter-FPGA communication by automatic channel adaptation | |
| CN101478513B (zh) | 一种兼容多速率的数字中频实现装置及方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17889366 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17889366 Country of ref document: EP Kind code of ref document: A1 |