WO2020118713A1 - 位宽匹配电路、数据写入装置、数据读出装置和电子设备 - Google Patents

位宽匹配电路、数据写入装置、数据读出装置和电子设备 Download PDF

Info

Publication number
WO2020118713A1
WO2020118713A1 PCT/CN2018/121298 CN2018121298W WO2020118713A1 WO 2020118713 A1 WO2020118713 A1 WO 2020118713A1 CN 2018121298 W CN2018121298 W CN 2018121298W WO 2020118713 A1 WO2020118713 A1 WO 2020118713A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
data
group
read
write
Prior art date
Application number
PCT/CN2018/121298
Other languages
English (en)
French (fr)
Inventor
李耀合
谭波
颜晓东
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to PCT/CN2018/121298 priority Critical patent/WO2020118713A1/zh
Priority to CN201880002827.2A priority patent/CN111566614B/zh
Publication of WO2020118713A1 publication Critical patent/WO2020118713A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/06Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present application relate to the technical field of circuits, and in particular, to a bit width matching circuit, a data writing device, a data reading device, and an electronic device.
  • the data bit widths required by the interacting parties are usually inconsistent, and the variable range of the data width often has a large uncertainty, such as in a scenario ,
  • the data bit width of one circuit board's analog-to-digital conversion chip is 12 bits
  • the data bit width of the memory interface is 16 bits
  • the data bit width of the other circuit board's analog-to-digital conversion chip is 20 bits
  • the data bit of the memory interface The width is 16 bits.
  • the data bit width of the two circuit boards is inconsistent with the data bit width of the memory, which leads to the need to match the data bit width; in addition, in other application scenarios, in order to reduce the clock frequency of the logic circuit , You need to match the data bit width, such as converting data with a smaller data bit width to data with a larger data bit width.
  • one of the technical problems solved by the embodiments of the present application is to provide a bit width matching circuit, a data writing device, a data reading device, and an electronic device to overcome the above-mentioned defects in the prior art.
  • An embodiment of the present application provides a bit width matching circuit, which includes a cache array, a write control unit, and a read control unit.
  • the cache array includes multiple cache modules, and each cache module includes n cache units, each The cache unit is used to cache one bit of data, and n is a non-zero integer; when writing data to the cache array, the multiple cache modules are divided into a1 groups, where each group includes b1 cache modules, the The write control unit is used to control the writing of data to the i-th cache module in group a1, the bit width of the written data is b1*n bits, a1, b1 are non-zero integers, and i is a non-zero integer less than or equal to a1 ;
  • the plurality of cache modules are divided into a2 groups, where each group includes b2 cache modules, the readout control unit is used to control the jth cache from the a2 group The module reads the data, the bit width of the read data is b2*n
  • An embodiment of the present application provides a data writing device, including: a cache array and a write control unit, the cache array includes a plurality of cache modules, each cache module includes n cache units, and each cache unit is used for caching One bit of data, n is a non-zero integer; when writing data to the cache array, the multiple cache modules are divided into a1 groups, where each group includes b1 cache modules, the write control unit uses In order to control the writing of data to the i-th cache module in group a1, the bit width of the written data is b1*n bits, a1, b1 are non-zero integers, and i is a non-zero integer less than or equal to a1.
  • An embodiment of the present application provides a data readout device, which includes: a cache array and a readout control unit, the cache array includes a plurality of cache modules, each cache module includes n cache units, and each cache unit is used for caching One bit of data, n is a non-zero integer; when reading data from the cache array, the multiple cache modules are divided into a2 groups, where each group includes b2 cache modules, the readout control unit can be used In order to control the reading of data from the jth cache module in group a2 each time, the bit width of the read data is b2*n bits, a2 and b2 are non-zero integers, and j is a non-zero integer less than or equal to a2.
  • An embodiment of the present application provides an electronic device, which includes: any data writing device described in the embodiment of the present application, and/or any data reading device described in the embodiment of the present application.
  • the write control unit includes: a demultiplexer and an input selection unit, the input selection unit is used to enable the i-th cache module in the a1 group, corresponding to The demultiplexer is used to establish a transmission channel for writing data to the i-th cache module in the a1 group.
  • the input selection unit includes: a first multiplexer and a write address register, and the first multiplexer is used to read and write states of all cache modules in the a1 group Filtering out the i-th cache module that can write data, the write address register is used to register the identifier of the i-th cache module, so that the demultiplexer establishes the Transmission channel for writing data in the i-group cache module.
  • each of the cache modules in group a1 is configured with a read-write flag bit, which is determined according to the read-write flag bits of all the cache modules in the i-th cache module The read-write status of the i-th group cache module.
  • any embodiment of the present application further includes: configuring a multi-input NOR gate for the i-th cache module to read and write flags of all the cache modules in the i-th cache module NOR processing to determine the read and write status of the i-th cache module.
  • the address registered in the write address register is reset.
  • the readout control unit includes: a second multiplexer and a readout selection unit, and the readout selection unit is used to enable the jth cache module in the a2 group
  • the second multiplexer is used to establish a transmission channel for reading data from the j-th group cache module in the a2 group.
  • the readout selection unit includes: a third multiplexer and a readout address register, and the third multiplexer is used for reading and writing according to all cache modules in the a2 group
  • the state filters out the jth group of cache modules with readable data
  • the read address register is used to register the address of the jth group of cache modules, so that the second multiplexer establishes the The group buffer module reads the data transmission channel.
  • any embodiment of the present application further includes: a multi-input AND gate configured for the jth cache module to read and write flags of all the cache modules in the jth cache module The bit performs AND logic processing to determine the read and write status of the jth group cache module.
  • the address registered in the read address register is reset.
  • the bit width matching circuit includes: a cache array, a write control unit, and a read control unit
  • the cache array includes multiple cache modules, each cache module includes n cache units, and each cache unit Used to cache one bit of data, n is a non-zero integer
  • the multiple cache modules are divided into a1 groups, where each group includes b1 cache modules, the write The control unit is used to control the writing of data to the i-th cache module in group a1, the bit width of the written data is b1*n bits, a1, b1 are non-zero integers, and i is a non-zero integer less than or equal to a1;
  • the plurality of cache modules are divided into a2 groups, where each group includes b2 cache modules, and the readout control unit is used to control reading from the jth cache module in the a2 group
  • the bit width of the read data is b2*n bits
  • FIG. 1 is a schematic structural diagram of a bit width matching circuit in Embodiment 1 of the present application.
  • Embodiment 2 is a schematic structural diagram of a bit width matching circuit in Embodiment 2 of the present application.
  • Embodiment 3 is a schematic structural diagram of a bit width matching circuit in Embodiment 3 of the present application.
  • Embodiment 4 is a schematic structural diagram of a bit width matching circuit in Embodiment 4 of the present application.
  • FIG. 1 is a schematic structural diagram of a bit width matching circuit according to Embodiment 1 of the present application; as shown in FIG. 1, it includes: a cache array 101, a write control unit 102, and a read control unit 103.
  • the cache array 101 includes a plurality of Cache modules, each cache module includes n cache units, each cache unit is used to cache one bit of data, n is a non-zero integer, and the write control unit 102 is used to control writing data to the i-th group of cache modules,
  • the i-th cache module includes b1 of the cache modules, the bit width of the written data is b1*n bits, i is a non-zero integer not greater than a1, a1 represents the number of groups of multiple cache modules when writing data, ie
  • the plurality of cache modules are divided into a1 groups, where each group includes b1 cache modules, and a1 and b1 are non-zero integers; when reading data from the cache array 101, the readout
  • the jth group includes b2 cache modules.
  • the bit width of the read data is b2*n bits, j is a non-zero integer less than or equal to a2, and j is not greater than a2 Non-zero integer, a2 represents the number of groups of multiple cache modules when reading data, that is, the multiple cache modules are divided into a2 groups, where each group includes b2 cache modules, and a2 and b2 are non-zero integers.
  • FIG. 2 is a schematic structural diagram of a bit width matching circuit in Embodiment 2 of the present application; As shown in FIG. 2, in this implementation, the bit width matching circuit includes the cache array 101 and the write control unit 102, which are the same as the above embodiments. 2.
  • the readout control unit 103 is different from the above-mentioned embodiment in that this embodiment provides exemplary structures of the write control unit 102 and the readout control unit 103, as described in detail below.
  • the write control unit 102 may specifically include: a demultiplexer 112 and an input selection unit 122; the input selection unit 122 is used to enable the i-th group cache module 111 in group a1 Correspondingly, the demultiplexer 112 is used to establish a transmission channel for writing data to the i-th group cache module 111 in the a1 group.
  • the splitter in this embodiment can also be replaced by other components or circuit combinations, as long as it can achieve the same or similar functions as the splitter.
  • the input selection unit 122 may include: a first multiplexer 1221 and a write address register 1222.
  • the first multiplexer 1221 is used to filter out the available data according to the read and write states of all cache modules 111 in the a1 group
  • the write address register 1222 is used to register the address of the i-th group cache module 111, so that the demultiplexer 112 is established into the a1 group
  • the transmission channel in which data is written in the i-th group cache module 111 may also be replaced by other components or circuit combinations, as long as it can perform the same or similar functions as the first multiplexer.
  • each of the cache modules 111 in the a1 group is configured with a read-write flag bit, and the read-write flag bits of all the cache modules 111 in the i-th group cache module 111 are used to determine the The read and write status of the i-th cache module 111.
  • the realization of the read-write flag bit can be realized by any physical unit that can store data, including but not limited to a latch, a register, and an electrically erasable programmable unit.
  • NOR gate configured in the i-th group cache module 111, corresponding to the plurality of the cache modules 111 included in the i-th group cache module 111
  • the read and write flags of the data are NOR processed and the result of the NOR processing is output to the first multiplexer 1221 to determine the read and write status of the i-th group cache module 111.
  • the NOR gate may be configured in the write control unit 102. Since there are multiple sets of cache modules, there are corresponding multiple NOR gates, which form a NOR gate array 132. In other embodiments, it may be independent of the write control unit 102, that is, the NOR gate array 132 is independent of the write control unit 102. It should be noted that, in other embodiments, the NOR gate may also be replaced by other components or circuit structures, as long as it can perform the same or similar functions as the NOR gate.
  • the address registered in the write address register 1222 is reset.
  • the readout control unit 103 may specifically include: a second multiplexer 113 and a readout selection unit 123.
  • the readout selection unit 123 is used to enable the jth group of caches in the a2 group Module 111, correspondingly, the second multiplexer 113 is used to establish a transmission channel for reading data from the j-th group buffer module 111 in the a2 group.
  • the second multiplexer may also be replaced by other components or circuit combinations, as long as it can perform the same or similar functions as the second multiplexer.
  • the readout selection unit may specifically include: a third multiplexer 1231 and a readout address register 1232.
  • the third multiplexer 1231 is used for reading and writing according to all the cache modules 111 in the a2 group
  • the state filters out the jth group of cache modules 111 with readable data
  • the read address register 1232 is used to register the address of the jth group of cache modules 111, so that the second multiplexer 113 establishes the slave
  • the j-th group buffer module 111 reads out the data transmission channel.
  • the third multiplexer may also be replaced by other components or circuit combinations, as long as it can perform the same or similar functions as the third multiplexer.
  • it further includes: a multi-input AND gate configured for the j-th cache module to perform logical processing on the read and write flags of the multiple cache modules 111 in the j-th cache module 111
  • the logical processing result is output to the third multiplexer to determine the read-write status of the j-th group cache module 111.
  • the AND gate may be configured in the readout control unit 103. Since there are multiple sets of cache modules, there are corresponding multiple AND gates, and the multiple AND gates form an AND gate array 133. It should be noted that, in other embodiments, the AND gate may also be independent of the readout control unit 103, that is, the AND gate array 133 is independent of the readout control unit 103. It should be noted that, in other embodiments, the AND gate may also be replaced by other components or circuit structures, as long as it can perform the same or similar function as the AND gate.
  • the address registered in the read address register 1232 is reset.
  • FIG. 3 is a schematic structural diagram of a bit width matching circuit in Embodiment 3 of the present application; as shown in FIG. 3, a specific structure of a bit width matching circuit is provided; different from the above embodiment, in this embodiment, a Related control signals to control the entire read and write process.
  • four control signals are exemplarily set, specifically: "write enable output flag” signal, "read enable output flag” signal, The “write data valid input flag” signal and the “read data valid input flag” signal.
  • the "write enable output flag” signal is valid, it means that there is free buffer space in the cache array for writing data. Only then can the data be written, and when the write data is valid, the "write data is valid” The “input flag” signal is valid.
  • the "read enable output flag” signal When the "read enable output flag” signal is valid, it means that there is unread data in the cache space in the cache array that can be read, and the data can only be read at this time, and when the read data is valid, the "read data” is set “Valid input flag” signal is valid.
  • the read/write flag bit corresponding to any cache module 111 when the read/write flag bit corresponding to any cache module 111 is 1, it means that the data of this cache module 111 is valid and there is readable data; when the read/write flag bit corresponding to the cache module 111 is Set to 0, indicating that the data of the cache module 111 is invalid, and no data can be read. It should be noted that in other embodiments, the flag bit can also be designed to be 0, indicating that the data of the cache module is valid and there is readable data; at this time, the corresponding 1 indicates that the cache data is invalid, and no data can be read Out.
  • the b1 read-write flag bits of the cache module 111 in the set are generated after the NOR gate is processed by NOR
  • the write enable output flag signal (write enable) corresponding to this group of cache modules 111, so only when the data of all cache modules 111 of the i-th cache module 111 is invalid (all read and write flag bits are 0), the first The write enable output flag bit signal of the i-group cache module 111 is valid before data can be written. For example, when the value of the write enable output flag bit signal is 1, it indicates that the write enable output flag bit signal is valid.
  • the transmission channel for writing data in the i-th cache module 111 in the a1 group is also used to select the write enable output flag signal of the i-th cache module 111 to be output to the data interaction for writing data into the entire column of the cache
  • the group number of the i-th cache module 111 is used to indicate its identification (or its address), and when writing, the selection is made in order of the group number from small to large, the corresponding
  • the value of the identifier of the i-th group cache module 111 is the same as the number of times the data is written.
  • the corresponding group numbers are 1, 2, each group includes two cache modules, when writing data, Only after the first group of cache modules with group number 1 has written data, will the next group of cache modules with group number 2 write data to the next group of data, or in other words, when the corresponding group number is 1.
  • the first group of cache modules will not write data to the corresponding second group of cache modules before the data is written. Therefore, the number of times the data is written after the first group of cache modules has finished writing data It is 1, which is the same as the group number 1 of the first group of cache modules.
  • the number of data writes is 2, which is the same as the group number 2 of the second group of cache modules.
  • each cache module when data needs to be written, multiple cache modules are divided into a1 groups, where each group includes b1 cache modules, and each cache module is configured with a read-write flag (flag).
  • write_data[b1*n-1:0] is the general term for writing data
  • [b1*n-1:0] indicates that its bit width is b1*n
  • DI_1[b1*n-1:0] Represents the first write data, the corresponding bit width is b1*n
  • DI_2[b1*n-1:0] represents the second write data, and so on
  • the address Raddr of the jth group cache module 111 output from the address register 1232 is used as the selection signal of the second multiplexer 113 to select the data in the jth group cache module 111 to be read out and also used to select the
  • the read-enable output flag signal of the j-group cache module 111 is output to the data interaction subject to read data from the cache array; only when the read-enable output flag signal readenable is valid, it can be cached from the j-th group Module 111 reads the data, otherwise invalid data will be read; every time the data is read, the read data valid input flag signal read valid is valid, each time the read data valid input flag signal is valid, it will make the read The number of read data is registered in the address register 1232.
  • the number of read data registered in the address register 1232 is reset to 0, so that the count will be restarted when the data is read again .
  • the group number of the jth group of cache modules 111 is used to represent its identification, then correspondingly, when reading data, the identification of the jth group of cache modules 111 The value is the same as the number of times the data is written.
  • a variable may be defined at this time to directly record the number of times the data is read, once every time the data is read, The value of this variable is increased by 1 until it is equal to the number of packets of the read-out buffer module 111.
  • FIG. 4 is a schematic structural diagram of a bit width matching circuit in Embodiment 4 of the present application; as shown in FIG. 4, a structure of a bit width matching circuit in an application scenario is provided; as shown in FIG. 4, the cache array 101 includes 6 caches Module 111, each cache module 111 includes four cache units 1111.
  • the six cache modules 111 are divided into three groups, and each group includes two cache modules 111. Since each cache module 111 includes four cache units 1111, the bit width of the written data is 2* 4, that is, 8 bits, so each time data is written to the cache array 101, the bit width is 8 bits, or each time data with a bit width of 8 bits can be written to the cache array 101, the structure of the 8-bit data is, for example, [ b0, b1, b2, b3, b4, b5, b6, b7].
  • each write data is 8bit data. If the group number of each cache module 111 is used to indicate its address, the address Waddr of the first group cache module 111 is 1, the address Waddr of the second group cache module 111 is 2, and the address Waddr of the third group cache module 111 It is 3, and if the selection is made in the order of the group number from small to large when writing, the corresponding number of times of writing data registered in the address register 1222 may be 1 or 2 or 3.
  • the determination process of determining which group of cache modules 111 can write data and the control process of actually writing data to them please refer to the description of the embodiment of FIG. 3 above.
  • the 6 cache modules 111 are divided into 2 groups, each group includes 3 cache modules 111, because each cache module 111 includes 4 cache units 1111, therefore, the bit width of the read data It is 3*4, that is, 12 bits, so every time data is read from the cache array 101, 12 bits of data can be read. Since there are 2 sets of cache modules, the maximum number of times to perform data read is 2 times. If the first The read data of the second time is recorded as D1, the read data of the second time is recorded as D2, and the read data of the third time is recorded as D3, and each read data is 12-bit data.
  • the group number of each cache module 111 is used to represent its address, then the address Raddr of the first group cache module 111 is 1, and the address Raddr of the second group cache module 111 is 2, and if read, it is If the group number is selected in the order from small to large, the number of times of reading data registered in the corresponding reading address register 1232 may be 1 or 2.
  • the determination process of how to determine which group of cache modules 111 can read out the data and the control process from which the data is actually read out please refer to the description in the embodiment of FIG. 3 above.
  • bit width 8 bits
  • bit width 12 bits
  • the cache array 101 includes 12 cache modules 111, and each cache module 111 includes 2 cache units 1111.
  • each group includes 4 cache modules 111, different from the above embodiment of FIG. 4 is that each The cache module 111 includes two cache units 1111, and the bit width of the written data is 2*4, that is, 8 bits. Therefore, each time data is written into the cache array 101, the bit width is 8 bits, or each time the cache array can be written to the cache array In 101, data with a bit width of 8 bits is written, and the structure of the 8-bit data is, for example, [b0, b1, b2, b3, b4, b5, b6, b7].
  • each write data is 8bit data. If the group number of each cache module 111 is used to indicate its address, the address Waddr of the first group cache module 111 is 1, the address Waddr of the second group cache module 111 is 2, and the address Waddr of the third group cache module 111 It is 3, and if the selection is made in the order of the group number from small to large when writing, the corresponding number of times of writing data registered in the address register 1222 may be 1 or 2 or 3.
  • the determination process of determining which group of cache modules 111 can write data and the control process of actually writing data to them please refer to the description of the embodiment of FIG. 3 above.
  • the 12 cache modules 111 are divided into 4 groups, each group includes 3 cache modules 111. Since each cache module 111 includes 2 cache units 1111, the bit width of the read data It is 3*2, that is, 6 bits, so every time data is read from the cache array 101, 6 bits of data can be read. Since there are 4 sets of cache modules, the maximum number of times to execute the data read is 4 times, if the first The read data for the second time is recorded as D1, the read data for the second time is recorded as D2, the read data for the third time is recorded as D3, and the read data for the fourth time is recorded as D4. 6bit data.
  • the address Raddr of the first group cache module 111 is 1
  • the address Raddr of the second group cache module 111 is 2, and so on, and if read out
  • the number of times of reading data registered in the corresponding reading address register 1232 may be 1 or 2 or 3 or 4.
  • bit width 8 bits
  • bit width 6 bits
  • the cache unit may specifically include a flip-flop or a latch.
  • reading and writing flag bits may also be implemented by a flip-flop or a latch.
  • the two circuits for data bit width matching can be designed according to the needs.
  • the above bit width matching circuit grouping numbers a1 and a2 can be used to achieve any bit width matching, which can meet any task of data buffering, data splicing, data decomposition, etc. One demand.
  • the above-mentioned cache array and writing control unit in the embodiment of the present application may also constitute a data writing device; similarly, the above-mentioned cache array and reading control unit may also constitute a data reading device.
  • An embodiment of the present application further provides an electronic device, which includes: the data writing device described in any embodiment of the present application, and/or the data reading device described in any embodiment of the present application.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, the instructions
  • the device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, which is executed on the computer or other programmable device
  • the instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in computer-readable media, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash random access memory
  • Computer-readable media including permanent and non-permanent, removable and non-removable media, can store information by any method or technology.
  • the information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific transactions or implement specific abstract data types.
  • the present application can also be practiced in a distributed computing environment in which remote processing devices connected through a communication network perform transactions.
  • program modules may be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

一种位宽匹配电路、数据写入装置、数据读出装置以及电子设备,位宽匹配电路包括:缓存阵列(101)、写入控制单元(102)、读出控制单元(103),所述缓存阵列(101)包括多个缓存模块(111),每个缓存模块(111)包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在向所述缓存阵列(101)写入数据时,所述多个缓存模块(111)被分成a1组,其中每组包括b1个所述缓存模块(111),所述写入控制单元(102)用于控制向a1组中的第i组缓存模块写入数据,写入数据的位宽为b1*n位,a1、b1为非零整数,i为小于等于a1的非零整数;在从所述缓存阵列(101)中读出数据时,所述多个缓存模块(111)被分成a2组,其中每组包括b2个缓存模块(111),所述读出控制单元(103)用于控制从a2组中第j组缓存模块读出数据,读出数据的位宽为b2*n位,a2、b2为非零整数,j为小于等于a2的非零整数。位宽匹配电路可实现位宽任意匹配的解决方案。

Description

位宽匹配电路、数据写入装置、数据读出装置和电子设备 技术领域
本申请实施例涉及电路技术领域,尤其涉及一种位宽匹配电路、数据写入装置、数据读出装置和电子设备。
背景技术
数字电路系统中的各个子系统之间存在各种各样的数据交互,交互双方需求的数据位宽通常也不一致,数据宽度的可变范围往往有较大的不确定性,比如一种场景中,其中一块电路板的模数转换芯片的数据位宽为12位,存储器接口的数据位宽为16位,另外一块电路板的模数转换芯片的数据位宽为20位,存储器接口的数据位宽为16位。由此可见,两块电路板的数据位宽均与存储器的数据位宽不一致,由此导致需要进行数据位宽的匹配;除此之外,在其他应用场景中,为了降低逻辑电路的时钟频率,需要进行数据位宽的匹配,比如将数据位宽较小的数据转换为数据位宽较大的数据。
由此,亟待提供一种实现上述数据位宽匹配的技术方案。
发明内容
有鉴于此,本申请实施例所解决的技术问题之一在于提供一种位宽匹配电路、数据写入装置、数据读出装置以及电子设备,用以克服现有技术中上述缺陷。
本申请实施例提供一种位宽匹配电路,其包括:缓存阵列、写入控制单元、读出控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在向所述缓存阵列写入数据时,所述多个缓存模块被分成a1组,其中每组包括b1个所述缓存模块,所述写入控制单元用于控制向a1组中的第i组缓存模块写入数据,写入数据的位宽为b1*n位,a1、b1为非零整数,i为小于等于a1的非零整数;在从所述缓存阵列中读出数据时,所述多个缓存模块被分成a2组,其中每组包括b2个缓存模块,所述读出控制单元用于控制从a2组中第j组缓存模块读出数据,读出数据的位宽为b2*n位,a2、b2为非零整数,j为小于等于a2的非零整数。
本申请实施例提供一种数据写入装置,其包括:缓存阵列、写入控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在向所述缓存阵列写入数据时,所述多个缓存模块被分成a1组,其中每组包括b1个所述缓存模块,所述写入控制单元用于控制向a1组中的第i组缓存模块写入数据,写入数据的位宽为b1*n位,a1、b1为非零整数,i为小于等于a1的非零整数。
本申请实施例提供一种数据读出装置,其包括:缓存阵列、读出控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在从所述缓存阵列中读出数据时,所述多个缓存模块被分成a2组,其中每组包括b2个缓存模块,所述读出控制单元能用于控制每次从a2组中第j组缓存模块读出数据,读出数据的位宽为b2*n位,a2、b2为非零整数,j为小于等于a2的非零整数。
本申请实施例提供一种电子设备,其包括:任一本申请实施例中所述的数据写入装置,和/或,任一本申请实施例中所述的数据读出装置。
可选地,本申请的任一实施例中,所述写入控制单元包括:解复用器以及输入选择单元,所述输入选择单元用于使能a1组中的第i组缓存模块,对应地,所述解复用器用于建立向所述a1组中第i组缓存模块中写入数据的传输通道。
可选地,本申请的任一实施例中,所述输入选择单元包括:第一复用器以及写入地址寄存器,第一复用器用于根据所述a1组中所有缓存模块的读写状态筛选出可写入数据的第i组缓存模块,所述写入地址寄存器用于对所述第i组缓存模块的标识进行寄存,以使所述解复用器建立向所述a1组中第i组缓存模块中写入数据的传输通道。
可选地,本申请的任一实施例中,a1组中的每个所述缓存模块配置有读写标志位,根据所述第i组缓存模块中所有所述缓存模块的读写标志位确定所述第i组缓存模块的读写状态。
可选地,本申请的任一实施例中,还包括:为第i组缓存模块配置一个多输入的或非门,以对所述第i组缓存模块中所有所述缓存模块的读写标志位进行或非处理以确定所述第i组缓存模块的读写状态。
可选地,本申请的任一实施例中,在经过a1次写入数据之后,所述写入地址寄存器中寄存的地址被复位。
可选地,本申请的任一实施例中,所述读出控制单元包括:第二复用器以及读出选择单元,所述读出选择单元用于使能a2组中第j组缓存模块,对应地, 所述第二复用器用于建立从所述a2组中第j组缓存模块读出数据的传输通道。
可选地,本申请的任一实施例中,所述读出选择单元包括:第三复用器以及读出地址寄存器,第三复用器用于根据所述a2组中所有缓存模块的读写状态筛选出可读出数据的第j组缓存模块,所述读出地址寄存器用于对所述第j组缓存模块的地址进行寄存,以使所述第二复用器建立从所述第j组缓存模块读出数据的传输通道。
可选地,本申请的任一实施例中,还包括:为第j组缓存模块配置的一个多输入的与门,以对所述第j组缓存模块中所有所述缓存模块的读写标志位进行与逻辑处理以确定所述第j组缓存模块的读写状态。
可选地,本申请的任一实施例中,在经过a2次读出数据之后,所述读出地址寄存器中寄存的地址被复位。
本申请实施例中,由于位宽匹配电路包括:缓存阵列、写入控制单元、读出控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在向所述缓存阵列写入数据时,所述多个缓存模块被分成a1组,其中每组包括b1个所述缓存模块,所述写入控制单元用于控制向a1组中的第i组缓存模块写入数据,写入数据的位宽为b1*n位,a1、b1为非零整数,i为小于等于a1的非零整数;在从所述缓存阵列中读出数据时,所述多个缓存模块被分成a2组,其中每组包括b2个缓存模块,所述读出控制单元用于控制从a2组中第j组缓存模块读出数据,读出数据的位宽为b2*n位,a2、b2为非零整数,j为小于等于a2的非零整数,从而提供了一种可实现位宽任意匹配的解决方案。
附图说明
后文将参照附图以示例性而非限制性的方式详细描述本申请实施例的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:
图1为本申请实施例一中位宽匹配电路的结构示意图;
图2为本申请实施例二中位宽匹配电路的结构示意图;
图3为本申请实施例三中位宽匹配电路的结构示意图;
图4为本申请实施例四中位宽匹配电路的结构示意图。
具体实施方式
实施本申请实施例的任一技术方案并不一定需要同时达到以上的所有优点。
为了使本领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请实施例一部分实施例,而不是全部的实施例。基于本申请实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本申请实施例保护的范围。
下面结合本申请实施例附图进一步说明本申请实施例的具体实现。
图1为本申请实施例一中位宽匹配电路的结构示意图;如图1所示,其包括:缓存阵列101、写入控制单元102、读出控制单元103,所述缓存阵列101包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数,所述写入控制单元102用于控制向第i组缓存模块写入数据,第i组缓存模块包括b1个所述缓存模块,写入数据的位宽为b1*n位,i为不大于a1的非零整数,a1表示写入数据时多个缓存模块的分组数,即所述多个缓存模块被分成a1组,其中每组包括b1个所述缓存模块,a1、b1为非零整数;在从所述缓存阵列101中读出数据时,所述读出控制单元103用于控制从第j组缓存模块读出数据,第j组包括b2个缓存模块,读出数据的位宽为b2*n位,j为小于等于a2的非零整数,j为不大于a2的非零整数,a2表示读出数据时多个缓存模块的分组数,即所述多个缓存模块被分成a2组,其中每组包括b2个缓存模块,a2、b2为非零整数。
图2为本申请实施例二中位宽匹配电路的结构示意图;如图2所示,本实施中,与上述实施例相同的是,位宽匹配电路包括:缓存阵列101、写入控制单元102、读出控制单元103,与上述实施例不同的是,本实施例中提供了写入控制单元102、读出控制单元103的示例性结构,详细如下。
具体地,本实施例中,所述写入控制单元102具体可以包括:解复用器112以及输入选择单元122;所述输入选择单元122用于使能a1组中的第i组缓存模块111,对应地,所述解复用器112用于建立向所述a1组中第i组缓存模块111中写入数据的传输通道。需要说明的是,本实施例中的分路器也可以被其他元器件或者电路组合代替,只要可以与分路器实现相同或者相似的功能即可。
进一步地,所述输入选择单元122可以包括:第一复用器1221以及写入地址寄存器1222,第一复用器1221用于根据所述a1组中所有缓存模块111的读写状态筛选出可写入数据的第i组缓存模块111,所述写入地址寄存器1222用于对所述第i组缓存模块111的地址进行寄存,以使所述解复用器112建立向所述a1组中第i组缓存模块111中写入数据的传输通道。需要说明的是,在其他实施例中,第一复用器也可以被其他元器件或者电路组合代替,只要可以起到与第一复用器相同或者相似的功能即可。
进一步地,本实施例中,a1组中的每个所述缓存模块111配置有读写标志位,根据所述第i组缓存模块111中所有所述缓存模块111的读写标志位确定所述第i组缓存模块111的读写状态。所述读写标志位的实现可以通过任何可储存数据的物理单元来实现,包括但不限于锁存器,寄存器,电可擦可编程单元。
进一步地,本实施例中,还包括:为第i组缓存模块111中配置的一个多输入或非门,对应地,以对所述第i组缓存模块中包括的多个所述缓存模块111的读写标志位进行或非处理并将或非处理的结果输出到第一复用器1221以确定所述第i组缓存模块111的读写状态。所述或非门可以配置在所述写入控制单元102中。由于有多组缓存模块,因此就存在对应的多个或非门,该多个或非门组成或非门阵列132。在其他实施例中,也可以独立于所述写入控制单元102,即或非门阵列132独立于所述写入控制单元102。需要说明的是,在其他实施例中,所述或非门也可以被其他元器件或者电路结构代替,只要可以起到与或非门相同或者相似的功能即可。
进一步地,本实施例中,在经过a1次写操作之后,即缓存阵列经过a1次写操作之后处于写满状态,则所述写入地址寄存器1222中寄存的地址被复位。
具体地,本实施例中,所述读出控制单元103具体可以包括:第二复用器113以及读出选择单元123,所述读出选择单元123用于使能a2组中第j组缓存模块111,对应地,所述第二复用器113用于建立从所述a2组中第j组缓存模块111读出数据的传输通道。需要说明的是,在其他实施例中,第二复用器也可以被其他元器件或者电路组合代替,只要可以起到与第二复用器相同或者相似的功能即可。
进一步地,本实施例中,读出选择单元具体可以包括:第三复用器1231以及读出地址寄存器1232,第三复用器1231用于根据所述a2组中所有缓存模块111的读写状态筛选出可读出数据的第j组缓存模块111,所述读出地址寄 存器1232用于对所述第j组缓存模块111的地址进行寄存,以使所述第二复用器113建立从所述第j组缓存模块111读出数据的传输通道。需要说明的是,在其他实施例中,第三复用器也可以被其他元器件或者电路组合代替,只要可以起到与第三复用器相同或者相似的功能即可。
进一步地,本实施例中,还包括:为第j组缓存模块配置的一个多输入与门,以对所述第j组缓存模块111中多个缓存模块111的读写标志位进行与逻辑处理并将与逻辑处理的结果输出到第三复用器以确定所述第j组缓存模块111的读写状态。所述与门可以配置在所述读出控制单元103中。由于有多组缓存模块,因此就存在对应的多个与门,该多个与门组成与门阵列133。需要说明的是,在其他实施例中,与门也可以独立于所述读出控制单元103,即与门阵列133独立于所述读出控制单元103。需要说明的是,在其他实施例中,所述与门也可以被其他元器件或者电路结构代替,只要可以起到与与门相同或者相似的功能即可。
可选地,本申请的一实施例中,在经过a2次读操作之后,所述读出地址寄存器1232中寄存的地址被复位。
图3为本申请实施例三中位宽匹配电路的结构示意图;如图3所示,提供了一具体的位宽匹配电路的结构;与上述实施例不同的是,本实施例中,提供了相关的控制信号,以实现对整个读写过程的控制,具体地,示例性地设置四个控制信号,具体为:“写使能输出标志位”信号、“读使能输出标志位”信号、“写数据有效输入标志”信号以及“读数据有效输入标志”信号。当“写使能输出标志位”信号有效的时候,表示缓存阵列中有空余的缓存空间可供写入数据,此时才能写入数据,并且当写入数据有效的时候,置“写数据有效输入标志”信号有效。当“读使能输出标志位”信号有效的时候,表示缓存阵列中的缓存空间中有未读数据可读出,此时才能读出数据,并且当读出数据有效的时候,置“读数据有效输入标志”信号有效。
本实施例中,当任一缓存模块(buffer)111对应的读写标志位为1,表示此缓存模块111的数据有效,有可读出的数据;当缓存模块111对应的读写标志位被置0,表示此缓存模块111的数据无效,无数据可以读出。需要说明的是,在其他实施例中,也可以设计成标志位为0,表示缓存模块的数据有效,有可读出的数据;此时与之对应的1表示缓存数据无效,无数据可以读出。
下面对如何利用上述四个控制信号实现位宽匹配电路的工作进行示例性说 明。
当需要写入时,对于a1组缓存模块111中的第i组缓存模块111来说,该一组中的b1个所述缓存模块111的读写标志位被或非门经过或非处理后生成对应本组缓存模块111的写使能输出标志位信号(write enable),因此只有当第i组缓存模块111的所有缓存模块111的数据都无效时候(所有读写标志位都为0),第i组缓存模块111的写使能输出标志位信号才有效,才可以被写入数据,比如当写使能输出标志位信号的值为1则表明所述写使能输出标志位信号有效。
写入地址寄存器1222输出所述第i组缓存模块111的地址Waddr=i作为解复用器112的选择信号,用于选择第i组缓存模块111将会被写入数据,从而建立向所述a1组中第i组缓存模块111中写入数据的传输通道,也用于选择第i组缓存模块111的写使能输出标志位信号被输出至向所述缓存整列中写入数据的数据交互主体,如前所述,只有当写使能输出标志位信号有效(=1)时候才实际上向第i组缓存模块111写入数据,否则,第i组缓存模块111之前已经写入的数据将会被冲刷掉而造成丢失;每次向其中一组缓存模块111写入数据时,通过外部控制电路控制写数据有效输入标志信号write valid有效并将该写数据有效输入标志信号传输至该组缓存模块111中所有缓存模块,每次该写数据有效输入标志信号write valid有效,将使得写入地址寄存器1222中同时寄存写入数据的次数,当该写入数据的次数达到a1次之后,写入地址寄存器1222中寄存的写入数据的次数在复位驱动信号的作用下复位到0,以便当下次再写入数据时重新开始计数。在一具体应用场景中,如果用第i组缓存模块111的分组号表示其标识(或者其地址),且,在写入的时候,是按照分组号从小到大的顺序进行选择的话,则对应的,当完成向第i组缓存模块写入数据时,所述第i组缓存模块111的标识的值与写入数据的次数相同。举例来说,对于写入数据来说,如果缓存阵列总共有4个缓存模块,被分成两组,对应的分组号分别为1、2,每组包括两个缓存模块,在写入数据时,只有当分组号为1的第一组缓存模块写入数据后,在下次写入数据时才会向分组号为2的第二组缓存模块写入数据,或者换言之,在对应分组号为1的第一组缓存模块没有被写入数据前是不会向对应分组号为2的第二组缓存模块写入数据,因此,当向第一组缓存模块完成数据写入后,写入数据的次数为1,与第一组缓存模块的分组号1相同,当向第二组缓存模块完成数据写入后,写入数据的次数为2,与第二组缓存模块的分组号2相同。
本实施例中,当需要写入数据时,多个缓存模块被分成a1组,其中每组包括b1个缓存模块,其中的每个缓存模块配置有读写标志位(flag),由此,由图3可见,其中write_data[b1*n-1:0]为写入数据的统称,[b1*n-1:0]表示其位宽为b1*n,DI_1[b1*n-1:0]表示第一次的写入数据,其对应位宽为b1*n,DI_2[b1*n-1:0]表示第二次的写入数据,以此类推,DI_a1[b1*n-1:0]表示第a1次的写入数据,该a1即为分组数a1;write_enable_0表示第1组缓存模块的写使能输出标志位信号,依次类推,write_enable_a1-1表示第a1组缓存模块的写使能输出标志位信号;Waddr=0,1,2…….a1分别表示第1组缓存模块至第a1组缓存模块的地址。
当需要读出数据时,第j组的缓存模块111中的所有读写标志位被与门进行与处理后生成对应本组缓存模块111的读出使能输出标志位信号(read enable),因此只有当第j组中的所有缓存模块111的数据都有效时候(所有的读写标志位都为1),读出使能输出标志位信号read enable才有效,才可以从中读出数据。
读出地址寄存器1232输出的第j组缓存模块111的地址Raddr作为第二复用器113的选择信号,用于选择第j组缓存模块111中的数据将会被读出,也用于选择第j组缓存模块111的读出使能输出标志位信号被输出至要从缓存阵列中读出数据的数据交互主体;只有当读出使能输出标志位信号read enable有效时候才能从第j组缓存模块111读出数据,否则将会读到无效的数据;每次读出数据时候,让读出数据有效输入标志信号read valid有效,每次该读出数据有效输入标志信号有效,将使得读出地址寄存器1232中寄存读出数据的次数,当该读出数据的次数达到a2之后,读出地址寄存器1232中寄存的读出数据的次数复位到0,以便下次再读出数据时重新开始计数。类似上述写入数据时,在一具体应用场景中,如果用第j组缓存模块111的分组号表示其标识,则对应的,在读出数据时,所述第j组缓存模块111的标识的值与写入数据的次数相同。
当然,如果在其他实施例中,在写入的时候,如果随机确定向其中一组缓存模块写入数据的话,则此时可定义一变量,直接记录写入数据的次数,每写入数据一次,该变量的值加1,直至与为写入配置的缓存模块111的分组数相等。
当然,如果在其他实施例中,在读出的时候,如果随机确定从其中一组缓存模块读出数据的话,此时可定义一变量,直接记录读出数据的次数,每读出数据一次,该变量的值加1,直至与读出配置的缓存模块111的分组数相等。
图4为本申请实施例四中位宽匹配电路的结构示意图;如图4所示,提供了一应用场景中的位宽匹配电路的结构;如图4所示,缓存阵列101包括6个缓存模块111,每个缓存模块111包括4个缓存单元1111。
当需要写入数据时,该6个缓存模块111被分成3组,每组包括2个缓存模块111,由于每个缓存模块111包括4个缓存单元1111,则写入数据的位宽为2*4,即8bits,因此每次向缓存阵列101中写入数据时,位宽为8bits,或者每次可向缓存阵列101中写入位宽为8bits的数据,该8bit的数据的结构比如为[b0,b1,b2,b3,b4,b5,b6,b7]。由于存在3组缓存模块,因此执行写入数据的次数最大为3次,假如第1次的写入数据记为W1,第2次的写入数据记为W2,第3次的写入数据记为W3,每次的写入数据均为8bit的数据。当如果用每组缓存模块111的分组号表示其地址的话,则第1组缓存模块111的地址Waddr为1,第2组缓存模块111的地址Waddr为2,第3组缓存模块111的地址Waddr为3,且如在写入的时候,是按照分组号从小到大的顺序进行选择的话,对应写入地址寄存器1222中寄存的写入数据的次数可以为1或者2或者3。对于如何确定那一组缓存模块111可以写入数据的判断过程以及实际上向其写入数据的控制过程可参见上述图3实施例的记载。
当需要读出数据时,该6个缓存模块111被分成了2组,每组包括3个缓存模块111,由于每个缓存模块111包括4个缓存单元1111,因此,则读出数据的位宽为3*4,即12bits,因此每次从缓存阵列101中读出数据时,可读出12bits的数据,由于存在2组缓存模块,因此执行读出数据的次数最大为2次,假如第1次的读出数据记为D1,第2次的读出数据记为D2,第3次的读出数据记为D3,每次的读出数据均为12bit的数据。当如果用每组缓存模块111的分组号表示其地址的话,则第1组缓存模块111的地址Raddr为1,第2组缓存模块111的地址Raddr为2,且如在读出的时候,是按照分组号从小到大的顺序进行选择的话,对应读出地址寄存器1232中寄存的读出数据的次数可以为1或者2。对于如何确定那一组缓存模块111可以读出数据的判断过程以及实际上从中读出数据的控制过程可参见上述图3实施例的记载。
由上述可见,当写入数据时位宽为8bits,而当读出数据时位宽是12bits。
参照上述图4的结构,假如在另外一应用场景中的位宽匹配电路的结构中,缓存阵列101包括12个缓存模块111,每个缓存模块111包括2个缓存单元1111。
与上述实施例四类似,当需要写入数据时,该12个缓存模块111被分成3组,每组包括4个缓存模块111,与上述图4实施例不同的是,本实施例中每个缓存模块111包括2个缓存单元1111,则写入数据的位宽为2*4,即8bits,因此每次向缓存阵列101中写入数据时,位宽为8bits,或者每次可向缓存阵列101中写入位宽为8bits的数据,该8bit的数据的结构比如为[b0,b1,b2,b3,b4,b5,b6,b7]。由于存在3组缓存模块,因此执行写入数据的次数最大为3次,假如第1次的写入数据记为W1,第2次的写入数据记为W2,第3次的写入数据记为W3,每次的写入数据均为8bit的数据。当如果用每组缓存模块111的分组号表示其地址的话,则第1组缓存模块111的地址Waddr为1,第2组缓存模块111的地址Waddr为2,第3组缓存模块111的地址Waddr为3,且如在写入的时候,是按照分组号从小到大的顺序进行选择的话,对应写入地址寄存器1222中寄存的写入数据的次数可以为1或者2或者3。对于如何确定那一组缓存模块111可以写入数据的判断过程以及实际上向其写入数据的控制过程可参见上述图3实施例的记载。
当需要读出数据时,该12个缓存模块111被分成了4组,每组包括3个缓存模块111,由于每个缓存模块111包括2个缓存单元1111,因此,则读出数据的位宽为3*2,即6bits,因此每次从缓存阵列101中读出数据时,可读出6bits的数据,由于存在4组缓存模块,因此执行读出数据的次数最大为4次,假如第1次的读出数据记为D1,第2次的读出数据记为D2,第3次的读出数据记为D3,第4次的读出数据记为D4,每次的读出数据均为6bit的数据。当如果用每组缓存模块111的分组号表示其地址的话,则第1组缓存模块111的地址Raddr为1,第2组缓存模块111的地址Raddr为2,以此类推,且如在读出的时候,是按照分组号从小到大的顺序进行选择的话,对应读出地址寄存器1232中寄存的读出数据的次数可以为1或者2或者3或者4。对于如何确定那一组缓存模块111可以读出数据的判断过程以及实际上从中读出数据的控制过程可参见上述图3实施例的记载。
由上述可见,当写入数据时位宽为8bits,而当读出数据时位宽是6bits。
上述实施例中,缓存单元具体可以包括触发器或者锁存器,另外,读写标 志位的实现也可以通过触发器或者锁存器。
具体可以在电路设计阶段,可以根据需要进行数据位宽匹配的两个电路设计上述位宽匹配电路分组数a1以及a2,从而实现位宽的任意匹配,满足数据缓冲、数据拼接、数据分解等任一需求。
本申请实施例中的上述缓存阵列、写入控制单元还可以组成一种数据写入装置;类似地,上述缓存阵列、读出控制单元还可以组成一种数据读出装置。
本申请实施例还提供一种电子设备,其包括:本申请任一实施例中所述的数据写入装置,和/或,本申请任一实施例中所述的数据读出装置。
至此,已经对本主题的特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作可以按照不同的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序,以实现期望的结果。在某些实施方式中,多任务处理和并行处理可以是有利的。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使 得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个位宽匹配电路”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定事务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本 申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行事务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (22)

  1. 一种位宽匹配电路,其特征在于,包括:缓存阵列、写入控制单元、读出控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在向所述缓存阵列写入数据时,所述多个缓存模块被分成a1组,其中每组包括b1个所述缓存模块,所述写入控制单元用于控制向a1组中的第i组缓存模块写入数据,写入数据的位宽为b1*n位,a1、b1为非零整数,i为小于等于a1的非零整数;在从所述缓存阵列中读出数据时,所述多个缓存模块被分成a2组,其中每组包括b2个缓存模块,所述读出控制单元用于控制从a2组中第j组缓存模块读出数据,读出数据的位宽为b2*n位,a2、b2为非零整数,j为小于等于a2的非零整数。
  2. 根据权利要求1所述的电路,其特征在于,所述写入控制单元包括:解复用器以及输入选择单元,所述输入选择单元用于使能a1组中的第i组缓存模块,对应地,所述解复用器用于建立向所述a1组中第i组缓存模块中写入数据的传输通道。
  3. 根据权利要求2所述的电路,其特征在于,所述输入选择单元包括:第一复用器以及写入地址寄存器,第一复用器用于根据所述a1组中所有缓存模块的读写状态筛选出可写入数据的第i组缓存模块,所述写入地址寄存器用于对所述第i组缓存模块的标识进行寄存,以使所述解复用器建立向所述a1组中第i组缓存模块中写入数据的传输通道。
  4. 根据权利要求1所述的电路,其特征在于,a1组中的每个所述缓存模块配置有读写标志位,根据所述第i组缓存模块中所有所述缓存模块的读写标志位确定所述第i组缓存模块的读写状态。
  5. 根据权利要求4所述的电路,其特征在于,还包括:为第i组缓存模块配置一个多输入的或非门,以对所述第i组缓存模块中所有所述缓存模块的读写标志位进行或非处理以确定所述第i组缓存模块的读写状态。
  6. 根据权利要求3所述的电路,其特征在于,在经过a1次写入数据之后,所述写入地址寄存器中寄存的地址被复位。
  7. 根据权利要求1所述的电路,其特征在于,所述读出控制单元包括:第二复用器以及读出选择单元,所述读出选择单元用于使能a2组中第j组缓存模块,对应地,所述第二复用器用于建立从所述a2组中第j组缓存模块读出数据的传输通道。
  8. 根据权利要求7述的电路,其特征在于,所述读出选择单元包括:第三复用器以及读出地址寄存器,第三复用器用于根据所述a2组中所有缓存模块的读写状态筛选出可读出数据的第j组缓存模块,所述读出地址寄存器用于对所述第j组缓存模块的地址进行寄存,以使所述第二复用器建立从所述第j组缓存模块读出数据的传输通道。
  9. 根据权利要求1所述的电路,其特征在于,还包括:为第j组缓存模块配置的一个多输入的与门,以对所述第j组缓存模块中所有所述缓存模块的读写标志位进行与逻辑处理以确定所述第j组缓存模块的读写状态。
  10. 根据权利要求8述的电路,其特征在于,在经过a2次读出数据之后,所述读出地址寄存器中寄存的地址被复位。
  11. 一种数据写入装置,其特征在于,包括:缓存阵列、写入控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在向所述缓存阵列写入数据时,所述多个缓存模块被分成a1组,其中每组包括b1个所述缓存模块,所述写入控制单元用于控制向a1组中的第i组缓存模块写入数据,写入数据的位宽为b1*n位,a1、b1为非零整数,i为小于等于a1的非零整数。
  12. 根据权利要求11所述的装置,其特征在于,所述写入控制单元包括:解复用器以及输入选择单元,所述输入选择单元用于使能a1组中的第i组缓存模块,对应地,所述解复用器用于建立向所述a1组中第i组缓存模块中写入数据的传输通道。
  13. 根据权利要求12所述的装置,其特征在于,所述输入选择单元包括:第一复用器以及写入地址寄存器,第一复用器用于根据所述a1组中所有缓存模块的读写状态筛选出可写入数据的第i组缓存模块,所述写入地址寄存器用于对所述第i组缓存模块的标识进行寄存,以使所述分路器建立向所述a1组中第i组缓存模块中写入数据的传输通道。
  14. 根据权利要求11所述的装置,其特征在于,a1组中的每个所述缓存模块配置有读写标志位,根据所述第i组缓存模块中所有所述缓存模块的读写标志位确定所述第i组缓存模块的读写状态。
  15. 根据权利要求14所述的装置,其特征在于,还包括:为第i组缓存模块配置的一个多输入的或非门,以对所述第i组缓存模块中所有所述缓存模块的读写标志位进行或非处理以确定所述第i组缓存模块的读写状态。
  16. 根据权利要求13所述的装置,其特征在于,在经过a1次写入数据之 后,所述写入地址寄存器中寄存的地址被复位。
  17. 一种数据读出装置,其特征在于,包括:缓存阵列、读出控制单元,所述缓存阵列包括多个缓存模块,每个缓存模块包括n个缓存单元,每个缓存单元用于缓存一位数据,n为非零整数;在从所述缓存阵列中读出数据时,所述多个缓存模块被分成a2组,其中每组包括b2个缓存模块,所述读出控制单元能用于控制每次从a2组中第j组缓存模块读出数据,读出数据的位宽为b2*n位,a2、b2为非零整数,j为小于等于a2的非零整数。
  18. 根据权利要求17所述的装置,其特征在于,所述读出控制单元包括:第二复用器以及读出选择单元,所述读出选择单元用于使能a2组中第j组缓存模块,对应地,所述第二复用器用于建立从所述a2组中第j组缓存模块读出数据的传输通道。
  19. 根据权利要求18述的装置,其特征在于,所述读出选择单元包括:第三复用器以及读出地址寄存器,第一复用器用于根据所述a2组中所有缓存模块的读写状态筛选出可读出数据的第j组缓存模块,所述读出地址寄存器用于对所述第j组缓存模块的地址进行寄存,以使所述第二复用器建立从所述第j组缓存模块读出数据的传输通道。
  20. 根据权利要求17所述的装置,其特征在于,还包括:为第j组缓存模块配置的一个多输入的与门,以对所述第j组缓存模块中所有所述缓存模块的读写标志位进行与逻辑处理以确定所述第j组缓存模块的读写状态。
  21. 根据权利要求19述的装置,其特征在于,在经过a2次读出数据之后,所述读出地址寄存器中寄存的地址被复位。
  22. 一种电子设备,其特征在于,包括:权利要求11-16任一项所述的数据写入装置,和/或,权利要求17-21任一项所述的数据读出装置。
PCT/CN2018/121298 2018-12-14 2018-12-14 位宽匹配电路、数据写入装置、数据读出装置和电子设备 WO2020118713A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/121298 WO2020118713A1 (zh) 2018-12-14 2018-12-14 位宽匹配电路、数据写入装置、数据读出装置和电子设备
CN201880002827.2A CN111566614B (zh) 2018-12-14 2018-12-14 位宽匹配电路、数据写入装置、数据读出装置和电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/121298 WO2020118713A1 (zh) 2018-12-14 2018-12-14 位宽匹配电路、数据写入装置、数据读出装置和电子设备

Publications (1)

Publication Number Publication Date
WO2020118713A1 true WO2020118713A1 (zh) 2020-06-18

Family

ID=71075584

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121298 WO2020118713A1 (zh) 2018-12-14 2018-12-14 位宽匹配电路、数据写入装置、数据读出装置和电子设备

Country Status (2)

Country Link
CN (1) CN111566614B (zh)
WO (1) WO2020118713A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986792A (zh) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 一种数据位宽转换方法及通信设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073316B (zh) * 2020-09-09 2022-08-26 南京盛科通信有限公司 多通道位宽变化的数据传输系统、方法、设备和存储介质
CN114527953B (zh) * 2022-04-24 2022-07-08 深圳云豹智能有限公司 存储器数据处理系统、方法、装置、计算机设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261575A (zh) * 2008-02-26 2008-09-10 北京天碁科技有限公司 一种实现不等宽数据传输的异步先进先出存储器及方法
CN101825997A (zh) * 2010-01-28 2010-09-08 北京天碁科技有限公司 一种异步先入先出存储器
CN102654827A (zh) * 2011-03-02 2012-09-05 安凯(广州)微电子技术有限公司 一种先进先出缓冲器及缓存数据的方法
WO2017157110A1 (zh) * 2016-03-18 2017-09-21 深圳市中兴微电子技术有限公司 高速访问双倍速率同步动态随机存储器的控制方法及装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061545A1 (en) * 1994-09-30 2003-03-27 Chandrashekhar S. Patwardhan Method and apparatus for providing test mode access to an instruction cache and microcode rom
US6112268A (en) * 1997-06-16 2000-08-29 Matsushita Electric Industrial Co., Ltd. System for indicating status of a buffer based on a write address of the buffer and generating an abort signal before buffer overflows
JP2006190402A (ja) * 2005-01-07 2006-07-20 Renesas Technology Corp 半導体装置
US7558941B2 (en) * 2005-06-30 2009-07-07 Intel Corporation Automatic detection of micro-tile enabled memory
US8977790B2 (en) * 2008-02-15 2015-03-10 Freescale Semiconductor, Inc. Peripheral module register access methods and apparatus
CN101667451B (zh) * 2009-09-11 2012-05-09 西安电子科技大学 高速数据交换接口的数据缓存器及其数据缓存控制方法
CN106663055B (zh) * 2014-06-05 2020-07-31 Gsi科技公司 涉及多存储体存储器电路系统的系统和方法
CN104407809B (zh) * 2014-11-04 2018-03-30 盛科网络(苏州)有限公司 多通道fifo缓冲器的控制方法
CN104951412B (zh) * 2015-06-06 2018-01-02 华为技术有限公司 一种通过内存总线访问的存储装置
US10725934B2 (en) * 2015-10-08 2020-07-28 Shanghai Zhaoxin Semiconductor Co., Ltd. Processor with selective data storage (of accelerator) operable as either victim cache data storage or accelerator memory and having victim cache tags in lower level cache wherein evicted cache line is stored in said data storage when said data storage is in a first mode and said cache line is stored in system memory rather then said data store when said data storage is in a second mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261575A (zh) * 2008-02-26 2008-09-10 北京天碁科技有限公司 一种实现不等宽数据传输的异步先进先出存储器及方法
CN101825997A (zh) * 2010-01-28 2010-09-08 北京天碁科技有限公司 一种异步先入先出存储器
CN102654827A (zh) * 2011-03-02 2012-09-05 安凯(广州)微电子技术有限公司 一种先进先出缓冲器及缓存数据的方法
WO2017157110A1 (zh) * 2016-03-18 2017-09-21 深圳市中兴微电子技术有限公司 高速访问双倍速率同步动态随机存储器的控制方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986792A (zh) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 一种数据位宽转换方法及通信设备

Also Published As

Publication number Publication date
CN111566614B (zh) 2023-09-08
CN111566614A (zh) 2020-08-21

Similar Documents

Publication Publication Date Title
WO2020118713A1 (zh) 位宽匹配电路、数据写入装置、数据读出装置和电子设备
CN105843775A (zh) 片上数据划分读写方法、系统及其装置
US20190361631A1 (en) Storage device, chip and method for controlling storage device
CN106302260A (zh) 4r4w全共享报文的数据缓存处理方法及数据处理系统
JPH01500377A (ja) 2個のシステムクロックサイクルを利用する書込み動作をもったキャッシュメモリユニットを供与する装置及び方法
CN112905365B (zh) 一种数据处理方法、装置、设备及介质
US11693663B2 (en) Circular queue management with split indexes
CN101825997A (zh) 一种异步先入先出存储器
CN105205012A (zh) 一种数据读取方法和装置
CN104681082A (zh) 单端口存储器件中的读和写冲突避免方法及其半导体芯片
WO2021115002A1 (zh) 一种区块链交易记录的处理方法及装置
CN108701102A (zh) 直接存储器访问控制器、数据读取方法和数据写入方法
CN110968538A (zh) 一种数据缓冲方法和装置
EP3234768B1 (en) System and method for fast modification of register content
CN111142808B (zh) 存取设备及存取方法
US10997087B2 (en) Direct memory access
US20160140034A1 (en) Devices and methods for linked list array hardware implementation
CN106528598B (zh) 一种链的管理方法及物理设备
CN117118523B (zh) 一种信息传输系统、方法、装置、存储介质及电子设备
TWI793676B (zh) 應用於類神經網路之填充架構
US9251100B2 (en) Bitmap locking using a nodal lock
CN113849867B (zh) 一种加密芯片
JPH0256048A (ja) データ転送方法及びデータバッファ装置
WO2017024873A1 (zh) 一种存储单元和处理系统
KR20130069350A (ko) 듀얼 포트 메모리 및 그 방법

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: 18942759

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: 18942759

Country of ref document: EP

Kind code of ref document: A1