[go: up one dir, main page]

WO2018120612A1 - Procédé d'echantillonnage de données, puce et support d'information informatique - Google Patents

Procédé d'echantillonnage de données, puce et support d'information informatique Download PDF

Info

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
Application number
PCT/CN2017/085606
Other languages
English (en)
Chinese (zh)
Inventor
张亚国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanechips Technology Co Ltd
Original Assignee
Sanechips Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Publication of WO2018120612A1 publication Critical patent/WO2018120612A1/fr
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus 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

L'invention concerne une puce, comprenant un dispositif de commande (10) et un SPI (11) connecté au dispositif de commande, le dispositif de commande comprenant : un module de génération d'horloge (100), un module d'entrée/sortie (101), un module d'acquisition de configuration (102), un module de retard d'horloge (103), et un module d'échantillonnage (104); le module de génération d'horloge (100) acquiert un signal d'horloge courant, génère un signal d'horloge de sortie en fonction du signal d'horloge courant, et délivre le signal d'horloge de sortie au module d'entrée/sortie (101); le module d'entrée/sortie (101) délivre le signal d'horloge de sortie à partir du SPI (11) à un Flash SPI, et délivre le signal d'horloge de sortie au module de retard d'horloge (103); le module d'acquisition de configuration (102) acquiert un paramètre de configuration et un signal d'activation de retard, et délivre le paramètre de configuration et le signal d'activation de retard au module de retard d'horloge (103); le module de retard d'horloge (103) génère un signal d'horloge d'échantillonnage en fonction du signal d'activation de retard, du signal d'horloge de sortie et du paramètre de configuration, et délivre le signal d'horloge d'échantillonnage au module d'échantillonnage (104); et le module d'échantillonnage (104) reçoit des données SPI au moyen du SPI (11) et échantillonne les données SPI au moyen du signal d'horloge d'échantillonnage.
PCT/CN2017/085606 2016-12-28 2017-05-24 Procédé d'echantillonnage de données, puce et support d'information informatique Ceased WO2018120612A1 (fr)

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 (fr) 2018-07-05

Family

ID=62706861

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/085606 Ceased WO2018120612A1 (fr) 2016-12-28 2017-05-24 Procédé d'echantillonnage de données, puce et support d'information informatique

Country Status (2)

Country Link
CN (1) CN108255231B (fr)
WO (1) WO2018120612A1 (fr)

Cited By (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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自动调整采样相位的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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 (fr) Procédé d'echantillonnage de données, puce et support d'information informatique
US7675439B2 (en) Serial/parallel data conversion apparatus and method thereof
US10756714B2 (en) Skew control
CN105183423B (zh) 一种跨时钟域异步数据处理方法和装置
CN104899165B (zh) 对电子装置执行存储接口控制的方法及其装置
US20180329448A1 (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 (fr) Procédés et appareil de synchronisation de données dans des systèmes ayant de multiples domaines d'horloge et de réinitialisation
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 (fr) Circuit et procédé de modulation de retard, puce et serveur
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