SEMICONDUCTOR DEVICE
20220391336 · 2022-12-08
Inventors
Cpc classification
G06F13/124
PHYSICS
International classification
Abstract
A semiconductor device capable of shortening a time required for data transfer and data organizing is provided. The solid state device includes a processor, a memory, an external interface, registers for storing data received by the external interface, a mirror register buffer, a processor, a memory, an external interface, registers, and an internal bus connected to the mirror register buffer. Registers output data to the mirror register buffer without going through the internal bus. Mirror register buffer gives the data input from the registers an address in a mirror register buffer different from the address allocated to the register, and transfers the data to the memory without passing through the internal bus.
Claims
1. A semiconductor device comprising: a processor; a memory; an external interface; a register for storing data received by the external interface; a mirror register buffer; and an internal bus connected to the processor, the memory, the external interface, the register, and the mirror register buffer, wherein the register outputs the data to the mirror register buffer without passing through the internal bus, and wherein the mirror register buffer gives an address in the mirror register buffer to the data input from the register, the address being different from the address assigned to the register, and transfers the data to the memory without passing through the internal bus.
2. The semiconductor device according to claim 1, the mirror register buffer includes a buffer circuit that temporarily holds the data when conflicts with an access via the internal bus when transferring the data to the memory.
3. The semiconductor device according to claim 1, wherein a plurality of the registers are provided, and wherein the mirror register buffer makes a grouping by giving a same group address and consecutive addresses in the group to a plurality of items of the data input from the plurality of registers.
4. The semiconductor device according to claim 3, wherein the addresses of the plurality of registers before the grouping include those that are discontinuous.
5. The semiconductor device according to claim 3, wherein, when an external event occurs, the mirror register buffer selects a group corresponding to the external event, and transfers data belonging to the selected group to the memory.
6. The semiconductor device according to claim 5, wherein the external event is a reception of an interrupt.
7. The semiconductor device according to claim 5, wherein the external event is a reception of server log data.
8. A semiconductor device comprising: a processor; a controller, an external interface; a register for storing data received by the external interface; a mirror register buffer; and an internal bus connected to the processor, the controller, the external interface, the register, and the mirror register buffer, wherein the register outputs the data to the mirror register buffer without passing through the internal bus, and wherein the mirror register buffer gives an address in the mirror register buffer to the data input from the register, and outputs the same to the internal bus.
9. The semiconductor device according to claim 8, wherein a plurality of the registers are provided, the mirror register buffer gives any address in the mirror register buffer to the plurality of registers, respectively.
10. The semiconductor device according to claim 8, wherein the controller is a DMA (Direct Memory Access) controller.
11. The semiconductor device according to claim 8, wherein the controller is a DTC (Data Transfer Controller controller).
Description
BRIEF DESCRIPTIONS OF THE DRAWINGS
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
DETAILED DESCRIPTION
[0036] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In all the drawings for explaining the embodiments, the same portions are denoted by the same reference numerals in principle, and repetitive descriptions thereof are omitted.
First Embodiment
[0037] <Configuration of Semiconductor Device>
[0038]
[0039] Processor 10 is an arithmetic processing unit comprising, for example, a CPU. The processor 10 reads data from the register group 50, for example, through the second internal bus 80 and the first internal bus 70. The processor 10 writes the read data to the main memory 30 through the first internal bus 70. In this manner, the processor 10 transfers the data stored in the register group 50 to the main memory 30.
[0040] The processor 10 reads and executes various kinds of data including various programs and parameters stored in the main memory 30, for example, to realize a function block that performs various functions such as data transfer by software. The processor 10 may realize a function block in which hardware and software are cooperated, or may realize a part of the function block only by hardware.
[0041] DMA/DTC controller 20, instead of the processor 10, transfers data from the register group 50 to the main memory 30 via the second internal bus 80 and the first internal bus 70.
[0042] Main memory 30 is a volatile memory such as, for example, SRAM (Static Random Access Memory). The main memory 30 includes an interface 31 and a memory array 32 that holds various data, as shown in
[0043] The main memory 30 holds data transferred from the register group 50 or the mirror register buffer 60 through the bus (the second internal bus 80 and the first internal bus 70) using the processor 10 or DMA/DTC controller 20 as the master, and data of the register group 50 directly written from the mirror register buffer 60 without going through the bus. The main memory 30 holds various data such as a program, a parameter, and an operation result of the processor 10.
[0044] The semiconductor device 1 may include a storage (not shown). Examples of the storage include a non-volatile memory such as a flash memory and a EEPROM. The nonvolatile memory to be used is appropriately selected according to conditions such as capacity. When the storage is provided, a program, parameters, and the like for operating the semiconductor device 1 are stored in the storage.
[0045] The first internal bus 70 is coupled to the processor 10, DMA/DTC controllers 20, and the main memory 30. The first internal bus 70 is connected to the second internal bus 80 through a bus interface 75.
[0046] The external interface 40, the register group 50, the mirror register buffer 60, the second internal bus 80, and the like constitute a peripheral function in the semiconductor device 1. The external interface 40, register group 50, and mirror register buffer 60 are connected to a second internal bus 80. As described above, the second internal bus 80 is connected to the first internal bus 70 through the bus interface 75.
[0047] The external interface 40 is an interface for transmitting and receiving data to and from an external device. The external interface 40 is connected to an external device such as, for example, a measuring device or a sensor. External device transmits the acquired measurement data to the semiconductor device 1. The external interface 40 receives the measurement data transmitted from the external device. The external interface 40 transfers the received measurement data to a predetermined storage area of the register group 50 via the second internal bus 80.
[0048] The register group 50 is, for example, a storage device that stores various types of data such as measurement data, time data, and peripheral environment data received from an external device by the external interface 40. The register group 50 includes a different register for each type of data to be stored. For example, the register group 50 includes a measurement data register 51 for storing measurement data, a time data register 52 for storing time data, each register such as a peripheral environment data register 53 for storing the peripheral environment data. Data is written to and read from each register via the second internal bus 80 or the like.
[0049] As shown in
[0050]
[0051] The measurement data register 51 stores, for example, measurement data of a plurality of measurement devices X, Y, and Z, all of which are not shown. As shown in
[0052] These measurement data, for example [23:16], [15:8], [7:0], is stored so as to be able to read divided every predetermined number of bits (e.g., 8 bits, 16 bits). In addition, the measurement data of each measuring instrument is the data measured almost simultaneously. Although only the measurement data measured at a certain time is shown in
[0053] The measurement data register 51 may include registers 51a, 51b, and 51c corresponding to the measurement devices X, Y, and Z, respectively. In this instance, the register 51a stores the measurement data Meter X[23:0] of the measurement device X. The register 51b stores measurement data (Meter Y[23:0]) of the measurement device Y. The register 51c stores measurement data (Meter Z[23:0]) of the measurement device Z.
[0054] The time data register 52 stores the measurement time corresponding to the measurement data stored in the measurement data register 51 as the measurement time data. In
[0055] The peripheral environment data register 53 stores peripheral environment data. The ambient environment data includes, for example, temperature and humidity. The ambient data register 53 stores, for example, temperature data (Temperature) and humidity data (Humidity). The peripheral environment data stored in the peripheral environment data register 53 is data indicating the temperature and the humidity at the measurement time described above.
[0056] The peripheral environment data register 53 may include peripheral environment registers 53a and 53b corresponding to the temperature data and the humidity data, respectively. The peripheral environment register 53a stores temperature data. The peripheral environment register 53b stores the humidity data.
[0057] <<Mirror Register Buffer>>
[0058] The mirror register buffer 60 is a circuit that adds consecutive addresses to the data stored in the register group 50 and transfers the data to the main memory 30 without passing through the internal bus 70. The data stored in the register group 50 is addressed to a register or a storage area within the register. However, addresses may not be contiguous between registers or within registers. As a result, because the addresses are not consecutive, extra processing is required for data transfer to the main memory 30, which increases the transfer time. If the addresses of the data are not consecutive, data must be sorted so that data can be written to consecutive addresses.
[0059] Therefore, in the present embodiment, in the mirror register buffer 60, to add a continuous address, by grouping, so as to reduce the time required for data transfer and data reduction. Further, by providing a circuit for transferring the grouped data to the main memory 30, the data can be directly written from the mirror register buffer 60 to the main memory 30.
[0060]
[0061] The address assigning circuit 65 is provided corresponding to each register included in the register group 50 of
[0062] Similarly, the address providing circuits 65c0 to 65c2 are provided corresponding to the measurement data register 51c of
[0063] Each addressing circuit 65, as shown in
[0064] The mirror register address MADR set in the address setting register 61, as shown in
[0065] For example, as illustrated in
[0066] The data write control circuit 69 controls the write destination addresses RADR to the main memories 30 and the write data WDTs based on the setting contents of the interrupt setting register 68 in response to external events, for example, interrupt signals INT from the measurement circuit including the register group 50. External events include reception of server log data in addition to interrupts.
[0067] The interrupt setting register 68, as shown in
[0068] When receiving the interrupt signal INT matching the interrupt number INTN, the data write control circuit 69 outputs the base address RADRb to the main memory 30 and outputs, for example, an 8-bit selected address SADR to each address giving circuit 65. At this time, the data write controller 69 sequentially determines the selected address SADR based on the group address GADR and the number of data NUMs in the interrupt setting register 68.
[0069] More specifically, the data write controller 69 sets the upper 4 bits to the set value of the group address GADR, and outputs the selected address SADR while sequentially incrementing the lower 4 bits until the set value of the number-of-data-NUM is reached. In response to the increment of the selected address SADR, the data write control circuit 69 sequentially increments the write destination address RADR to the main memory 30 from the base address RADRb.
[0070] In
[0071] The data width of the write data WDT can be changed as appropriate, for example, 32 bits or 64 bits. For example, when the data width of the write data WDT is a double word (32 bits), the lower 2 bits ([0], [1]) of the base address RADRb and the write destination address RADR are fixed to “0”. Further, in
[0072] In the address assigning circuit 65 illustrated in
[0073] Data selection circuit 63h, 63l is composed of, for example, a three-input AND gate. The output from the address comparison circuit 62 and the 8-bit data D[7:0] from the corresponding register are input to the data selection circuits 63h and 63l as two inputs among the three inputs. The value of the least significant bit ([0]) of the mirror register address MADR is input to the data selection circuit 63h as the remaining one input among the three inputs, and the inverted value of the least significant bit ([0]) is input to the data selection circuit 63l.
[0074] Thus, when the comparison results of the address comparison circuit 62 match, the data selection circuits 63h and 63l select whether to output the 8-bit data D[7:0] from the corresponding register to the upper 8 bits or the lower 8 bits of the 16-bit write data WDT based on the values of the least significant bits ([0]) of the mirror register address MADR. Specifically, when the value of the least significant bit ([0]) of the mirror register address MADR is “1” level, the data selection circuit 63h outputs the data D[7:0], and when the value of the least significant bit ([0]) is “0” level, the data selection circuit 63l outputs the data D[7:0].
[0075] For example, it is assumed that the same group A is set in the address setting register 61 in the address assigning circuits 65d and 65e, the address in the group A in the address assigning circuit 65d is set to “0x0”, and the address in the group A in the address assigning circuit 65e is set to “0x1”. Further, as the selected address SADR, assume that the group A, and the address “0x0” in the group A is output.
[0076] In this case, the data selection circuit 63l in the address assignment circuit 65d outputs 8-bit data of the peripheral environment register 53a, and in parallel, the data selection circuit 63h in the address assignment circuit 65e outputs 8-bit data of the peripheral environment register 53b. If the selected address SADR following “0x0” is output, the selected address SADR becomes “0x2” on the assumption that the least significant bit [0] is fixed to “0” in accordance with the relationship between the byte data and the word data.
[0077] Data output control circuit 64h, 64l is composed of, for example, an OR gate. Data output control circuit 64h, the output from the data selecting circuit 63h of the upper bit side in the plurality of addressing circuits 65 is input, substantially, and outputs the output from any one of the data selecting circuit 63h to the subsequent stage. On the other hand, the data output control circuit 64l, the output from the data selection circuit 63l of the lower bit side in the plurality of addressing circuits 65 is input, substantially, the output from any one of the data selection circuit 63l to the subsequent stage.
[0078] The buffer circuit 66 is formed of, for example, a flip-flop circuit. The buffer circuit 66 latches a total of 16-bit data with 8-bit data from the data output control circuit 64h as upper bits and 8-bit data from the data output control circuit 64l as lower bits. Then, the buffer circuit 66 outputs the latched 16-bit data as the write data WDT to the main memory 30 in response to a control signal from the data write control circuit 69.
[0079] The buffer circuit 66 is provided to temporarily hold transfer data in case of conflicting with access via the first internal bus 70, for example, when data transfer from the mirror register buffer 60 to the main memory 30, i.e., writing of transfer data is performed. That is, by providing the buffer circuit 66, the write timing of transfer data can be shifted, and access to the main memory 30 via the bus and data transfer from the mirror register buffer 60 to the main memory 30 can be performed.
[0080] As described above, the addressing circuit 65, by the address setting register 61, the data input from each register in the register group 50 (e.g., the peripheral environment register 53a or the like) is assigned an address in the mirror register buffer different from the address assigned to the register, that is, a mirror register address MADR. The mirror register buffer 60 transfers the data input from the register to the memory 30 without passing through the internal bus. Thus, it is possible to significantly reduce the data transfer time. Also in this embodiment, as in the conventional case, data can be transferred from the register to the main memory 30 via the bus.
[0081]
[0082] Address setting register 61A˜61G is included in each of the plurality of addressing circuitry 65 shown in
[0083] The actual register RREG corresponds to a plurality of registers in the measurement circuitry shown in
[0084] The address setting register 61A, 61B, 61D, 61E corresponds to registers “A”, “B”, “D”, and “E”, respectively. As a result, “0xF0721”, “0xF0720”, “0xF0722” and “0xF0723” are assigned as mirror register addresses MADR to mirror registers MREG “A”, “B”, “D” and “E” corresponding to registers “A”, “B”, “D” and “E”, respectively. Incidentally, the portion of the higher 12 bits in the mirror register address MADR “0xF07” is intended to be fixed in advance, the portion of the lower 8 bits is arbitrarily defined by the address setting register 61.
[0085] For example, “0x8123-3050” is set in the interrupt setting register 68. In this case, the base address RADRb is “0x3050”, the group address ADR is “0x2”, the number of data NUM in the group is “3”, the interrupt number ININ is “0x1”. The setting to the address setting register 61A˜61G and interrupt setting register 68 is performed in advance, for example, by the processor 10 or the like.
[0086] When the interrupt signal INT having the interrupt number INTN of “0x1” is generated, the data write control circuit 69 outputs the selected address SADR and the write destination address RADR based on the interrupt setting register 68. In this example, for convenience, the data width of the write data WDT shall be 8 bits for ease of illustration.
[0087] In this case, the data write control circuit 69 outputs the selected address SADR “0x20”, “0x21”, “0x22”, and “0x23” in this order over four cycles in the first transfer period (1st) based on the group address ADR and the number of data NUMs in the group. As a result, in the 4 cycles, as the write data WDT, the data of the register “B”, “A”, “D”, and “E” is output in order.
[0088] In the four cycles, the data write controller 69 outputs the write destination address RADR “0x3050”, “0x3051”, “0x3052”, and “0x3053” in this order based on the base address RADRb. As a result, the data of the registers “B”, “A”, “D” and “E” are transferred to the write destination addresses RADR “0x3050”, “0x3051”, “0x3052” and “0x3053” of the main memory 30, respectively.
[0089] Thereafter, the data write control circuit 69, when the interrupt number ININ receives the interrupt signal INT of “0x1” again, in the same manner as in the case of the first transfer period (1st), the second transfer period (2nd) processing to execute. In this case, unlike the case of the first transfer period (1st), the data write control circuit 69 holds “0x3053” which is the last write destination address RADR outputted in the first transfer period (1st), and sets the next address “0x3054” as the base address.
[0090] In this manner, the mirror register buffer 60 makes a grouping of a plurality of registers “B”, “A”, “D”, a plurality of data input from “E”, by giving the same group address GADR “0x2” and consecutive addresses in the group. In this case, the addresses of the plurality of registers “B”, “A”, “D”, and “E” before grouping may be discontinuous. Then, the mirror register buffer 60, an external event, for example, when the interrupt signal INT is generated, selects a group corresponding to the external event (group address GADR “0x2” group), and transfers the data belonging to the selected group to the main memory 30.
[0091] <<Mirror Register Buffer Operation>>
[0092] Here, a specific example of data transfer by the mirror register buffer 60.
[0093] First, measurement data (Meter X, Meter Y, Meter Z), timing data (Calendar), temperature data (Temperature), and humidity data (Humidity) of the measurement devices X, Y, and Z are stored in the respective registers. The data stored in the register is given a predetermined address for each register (
[0094] Then, the mirror register buffer 60, for example, grouping these data (
[0095] In the case of
[0096] Specifically, measurement data (Meter X) is written to the address (1) (base address), clock data (Calendar) is written to the address (1) and consecutive addresses (2) (
[0097] Next, measurement data (Meter Y) is written to the address (2) and consecutive addresses (3), temperature data (Temperature) is written to the address (3) and consecutive addresses (4) (
[0098] The measurement data (Meter Z) is written to the address (4) and consecutive addresses (5), the humidity data (Humidity) is written to the address (5) and consecutive addresses (6) (
[0099] By repeating these operations, the mirror register buffer 60 continuously writes measurement data and the like measured at different times into the main memory 30 as transfer data (
<<Application Example 1 of Data Reduction>>
[0100] Next, an application example of data reduction will be described.
[0101] In
[0102] <<Application Example 2 of Data Reduction>>
[0103]
[0104] <<Application Example 3 of Data Reduction>>
[0105]
[0106] <Main Effects of the Present Embodiment>
[0107] According to the present embodiment, the mirror register buffer 60 gives an address in another mirror register buffer than the address assigned to the register to data in the register, and writes the data to which the address is gives as transfer data directly from the mirror register buffer 60 to the main memory 30. At this time, the mirror register buffer 60 writes the grouped data to consecutive addresses in the main memory 30. According to this configuration, it is possible to perform data transfer and data reduction from the register to the main memory 30 in a short time.
[0108] In addition, since data is written to consecutive addresses, it is possible to perform data processing efficiently.
Comparative Example
[0109] Here, a comparative example with respect to the present embodiment. The comparative example will be described in comparison with the above-described
[0110]
[0111] In the comparative example, as shown in
[0112] Similarly, DMA/DTC controller 20 transfers the temperature data (Temperature) to the address (4), the humidity data (Humidity) to the address (5), and the timing data (Calendar) to the address (6), respectively (
[0113] The processor reads data from the main memory, organizes the read data, and writes the organized data to the main memory (
[0114] As described above, in the comparative example, data is transferred from the register to the main memory, data is read from the memory, data is reorganized, and data is written to the memory, so that data transfer and data reduction take a long time.
[0115] <Comparison Between the Present Embodiment and the Comparative Example>
[0116]
[0117] In
[0118] In
[0119] In
[0120] Comparing them, the data transfer takes the most time when the DTC controller is used. Further, when using the DMA controller, the data transfer time is only one clock different from the case of using the mirror register buffer 60. However, even if data transfer is performed using the DMA controller, it is necessary to perform data reduction by the processor. Therefore, in consideration of the time until data reduction end, the present embodiment using the mirror register buffer 60, it is possible to end the processing in a very short time.
[0121] In the example of
[0122]
[0123]
[0124] In an intermittent operation, the operating mode of the processor switches between a normal mode, a stop mode, and a snooze mode. Snooze mode is a mode in which a processor is not used and only a peripheral function is operated.
[0125] In this embodiment using the mirror register buffer 60, after the standby release, data transfer is performed in Snooze mode. However, when the CPU is used, data transfer is performed in normal mode because data transfer cannot be performed in Snooze mode. Further, when using the CPU, the data transfer time is longest.
[0126] Therefore, as shown in
Second Embodiment
[0127] Next, a second embodiment will be described. As mentioned earlier, mirror register buffers can be organized by grouping data in registers. In the first embodiment, data is directly transferred from the mirror register buffer to the main memory 30 without passing through the bus, but in the present embodiment, data from the mirror register buffer is output to the bus in response to access from the processor 10 or DMA/DTC controller 20.
[0128]
[0129] The mirror register buffer 160 is accessed, for example, from the processor 10 or DMA/DTC controller 20, and selected address SADR from the processor 10 or DMA/DTC controller 20 is input through the second internal bus 80. Any mirror register address MADR is set in advance in the address setting registers 61 in the plurality of address providing circuits 65 so as to be convenient for data transfers, data organizing, and the like.
[0130] The mirror register buffer 160 compares the mirror register address MADR held by the address setting register 61 with the selected address SADR inputted through the buses in the respective address assigning circuits 65. Then, the data is outputted from the register corresponding to the address assigning circuit 65 in which the mirror register address MADR and the selected address SADR coincide with each other. The output data can be transferred to various locations via the second internal bus 80. That is, the transfer destination is not limited to the main memory 30.
[0131] According to this embodiment, the organized data is output from the mirror register buffer 160 to the bus. According to this configuration, even when the processor 10 or DMA/DTC controller 20 or the like is used, it is possible to reduce the time required for data transfer and data reduction.
[0132] Although the invention made by the present inventor has been specifically described based on the embodiment, the present invention is not limited to the embodiment described above, and it is needless to say that various modifications can be made without departing from the gist thereof.