Semiconductor apparatus and control method thereof
By implementing a bus arbiter and frequency circuit to manage memory access in a semiconductor device with a DR processor, the device maintains high performance by optimizing bus usage and preventing memory access waits, ensuring smooth operation of AI and image processing.
Patent Information
- Application Number
- JP2023047642
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2043-03-24
AI Technical Summary
The semiconductor device experiences performance degradation due to insufficient common bus bandwidth during simultaneous execution of AI processing and image processing, leading to memory access waits and inability to maintain a desired frame rate for image display.
The semiconductor device incorporates a bus arbiter that prioritizes memory access requests, a DMA controller, and a frequency circuit to calculate and adjust the frequency of memory access by the DR processor, allowing for dynamic reconfiguration of the DR processor's operation based on the rejection frequency to optimize bus usage.
This approach effectively suppresses performance deterioration by ensuring that memory access demands are managed efficiently, allowing the device to maintain high frame rates for image display and AI inference operations.
Smart Images

Figure 2024136506000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a semiconductor device and a control method thereof, and more particularly to a semiconductor device including a dynamically reconfigurable processor (hereinafter also referred to as a DR processor) that can be dynamically reconfigured, and a control method thereof. [Background technology]
[0002] A semiconductor device including a DR processor is described, for example, in Patent Document 1. Patent Document 1 describes a technique for implementing efficient arithmetic processing using a DR processor and an accelerator. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-219753 A Summary of the Invention [Problem to be solved by the invention]
[0004] The present inventor has considered realizing a semiconductor device capable of executing image processing and AI (Artificial Intelligence) inference in parallel using a central processor (hereinafter simply referred to as a processor), a DR processor, and an image processing circuit. An example of an application of such a semiconductor device is an in-vehicle semiconductor device. By using such a semiconductor device, it becomes possible to determine by AI inference whether or not a person is present in an image captured by an in-vehicle camera while displaying the image on a display.
[0005] In such a semiconductor device, the processor, the DR processor, and the image processing circuit are connected to, for example, a common bus. When performing AI processing and image processing, the processor, the DR processor, and the image processing circuit function as bus masters that access (memory access) the system memory connected to the common bus.
[0006] In AI processing and image processing, a large amount of memory access occurs, so in order to perform these processes at high speed, it is necessary to make the bandwidth of the common bus sufficiently high. For example, when an image processing circuit inputs an image from an in-vehicle camera and displays the image on a display at 30 frames per second (30 fps), while a DR processor performs AI inference, if the bandwidth of the common bus is insufficient, memory access waiting occurs in the image processing circuit, the DR processor, or the processor. The present inventor has found a problem that when memory access waiting occurs, the performance of the semiconductor device decreases, making it difficult to continue displaying images on the display at, for example, 30 fps.
[0007] Patent Document 1 does not recognize the bandwidth of the common bus, nor does it address the problems discussed above. [Means for solving the problem]
[0008] A brief outline of a representative embodiment of the present invention will be described below.
[0009] That is, the semiconductor device includes a processor, a DR processor having a DMA controller, a memory, a bus connecting the processor, the DR processor, and the memory, and a bus arbiter connected to the processor and the DR processor for arbitrating access to the memory by the processor and access to the memory by the DMA controller in accordance with a predetermined priority order. Here, the DR processor includes a frequency circuit for determining the frequency with which access to the memory by the DMA controller was not granted through arbitration by the bus arbiter.
[0010] Other objects and novel features will become apparent from the description of this specification and the accompanying drawings. Effect of the Invention
[0011] According to one embodiment, it is possible to provide a semiconductor device capable of suppressing degradation in performance. [Brief description of the drawings]
[0012] [Figure 1] 1 is a block diagram showing a configuration of a semiconductor device according to a first embodiment. [Diagram 2] 2A and 2B are block diagrams showing a configuration of a DR processor according to a first embodiment. [Diagram 3] FIG. 2 is a diagram for explaining the operation of the DR processor according to the first embodiment. [Figure 4] FIG. 2 is a diagram for explaining three pieces of state information according to the first embodiment. [Diagram 5] 4 is a diagram illustrating an example of the operation of the semiconductor device according to the first embodiment. FIG. [Figure 6] FIG. 2 is a diagram illustrating memory access in the semiconductor device according to the first embodiment. [Figure 7] 13(A) and 13(B) are diagrams for explaining a comparative example. [Figure 8] 5 is a flowchart showing a selection operation of state information according to the first embodiment. [Figure 9] FIG. 2 is a diagram illustrating memory access in the semiconductor device according to the first embodiment. [Figure 10] FIG. 11 is a diagram illustrating an example of the operation of the semiconductor device according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, each embodiment of the present invention will be described with reference to the drawings. Note that the disclosure is merely an example, and any appropriate modification that a person skilled in the art can easily conceive while maintaining the gist of the invention is naturally included within the scope of the present invention.
[0014] In addition, in this specification and each figure, elements similar to those described above with respect to the previous figures are given the same reference numerals, and detailed descriptions may be omitted as appropriate.
[0015] (Embodiment 1) <Configuration of Semiconductor Device> Fig. 1 is a block diagram showing the configuration of a semiconductor device according to a first embodiment. In Fig. 1, the symbol LSI indicated by a dashed line indicates a semiconductor device. Although not particularly limited, the semiconductor device LSI according to the first embodiment is formed on one semiconductor chip by a well-known semiconductor manufacturing technique. The semiconductor device LSI includes various circuit blocks, but Fig. 1 shows only the circuit blocks necessary for explanation.
[0016] The semiconductor device LSI includes a processor CPU, a DR processor DRP, a bus arbiter BUS-AB, image processing circuits IP1 and IP2, an internal bus (common bus) Int-BUS, and a system memory S-MEM. As shown in Fig. 1, the processor CPU, the DR processor DRP, the image processing circuits IP1 and IP2, and the system memory S-MEM are commonly connected to the internal bus Int-BUS. The processor CPU, the DR processor DRP, and the image processing circuits IP1 and IP2 function as bus masters, and access (memory access) the system memory S-MEM via the internal bus Int-BUS to write data to or read data from the system memory S-MEM.
[0017] For example, the processor CPU operates according to a program (not shown) In this operation, the processor CPU accesses the system memory S-MEM via the internal bus Int-BUS and writes or reads data to or from the system memory S-MEM.
[0018] When performing image processing such as image input and output, the image processing circuits IP1 and IP2 also access the system memory S-MEM via the internal bus Int-BUS to write or read data. Although not particularly limited, in the first embodiment, the image processing circuits IP1 and IP2 are configured with IP (Intellectual Property) cores, the image processing circuit IP1 is an IP core that performs processing related to image input, and the image processing circuit IP2 is an IP core that performs processing related to image output.
[0019] The DR processor DRP will be explained later using drawings, so a detailed explanation will be omitted here, but when the DR processor DRP executes processing, it accesses the system memory S-MEM via the internal bus Int-BUS to write or read data.
[0020] As described above, since the processor CPU, the DR processor DRP, and the image processing circuits IP1 and IP2 each function as a bus master, the semiconductor device LSI is provided with a bus arbiter BUS-AB that arbitrates when these circuits access the system memory S-MEM. The bus arbiter BUS-AB receives bus request signals RQ_CP, RQ_DR, RQ_IP1, and RQ_IP2 from the processor CPU, the DR processor DRP, and the image processing circuits IP1 and IP2, respectively, and outputs bus permission signals AC_CP, AC_DR, AC_IP1, and AC_IP2 to the processor CPU, the DR processor DRP, and the image processing circuits IP1 and IP2 according to a predetermined priority order.
[0021] That is, when the processor CPU accesses the system memory S-MEM, it outputs a bus request signal RQ_CP to the bus arbiter BUS-AB. In response to this bus request signal RQ_CP, the bus arbiter BUS-AB outputs a bus grant signal AC_CP. When the output bus grant signal AC_CP indicates access permission, the processor CPU accesses the system memory S-MEM. When the output bus grant signal AC_CP indicates access denial (access is not permitted), the processor CPU waits to access the system memory S-MEM until the bus grant signal AC_CP indicates access permission.
[0022] Similarly, when the DR processor DRP accesses the system memory S-MEM, it outputs a bus request signal RQ_DR to the bus arbiter BUS-AB. In response to this bus request signal RQ_DR, the bus arbiter BUS-AB outputs a bus grant signal AC_DR. When the output bus grant signal AC_DR indicates access permission, the DR processor DRP accesses the system memory S-MEM. On the contrary, when the output bus grant signal AC_DR indicates access denial (access is not permitted), the DR processor DRP waits to access the system memory S-MEM until the bus grant signal AC_DR indicates access permission.
[0023] Similarly, the image processing circuits IP1 and IP2 request access to the bus arbiter BUS-AB by bus request signals RQ_IP1 and RQ_IP2, and perform access when access permission is indicated by the bus grant signals AC_IP1 and AC_IP2 from the bus arbiter BUS-AB, just like the processor CPU and the DR processor DRP.
[0024] In FIG. 1, the reference numeral FPC shown in the DR processor DRP indicates a frequency circuit. Since the frequency circuit FPC will be described later, the description is omitted here.
[0025] <Configuration of the DR Processor> Next, the configuration of the DR processor DRP shown in Fig. 1 will be described with reference to the drawings. Fig. 2 is a block diagram showing the configuration of the DR processor according to the first embodiment. Here, Fig. 2(A) is a block diagram showing the configuration of the DR processor, and Fig. 2(B) is a block diagram showing the configuration of a programmable circuit used in the DR processor.
[0026] As shown in Fig. 2(A), the DR processor DRP includes a program array PE-ARRY consisting of a plurality of programmable circuits PE arranged in an array, a state memory ST-MEM for storing state information, a DMA (Direct Memory Access) controller DMAC, and a control circuit CTL. In Fig. 2(A), in order to avoid complicating the drawing, the symbol PE is attached to only one programmable circuit arranged in the program array PE-ARRY.
[0027] The programmable circuits PE arranged in the program array PE-ARRY are connected to each other via switches (not shown).
[0028] The multiple programmable circuits PE have the same configuration as each other. That is, each programmable circuit PE has multiple arithmetic units ALU and registers REG as shown in Fig. 2(B), and the arithmetic units ALU are connected to each other and the arithmetic units ALU and the registers REG are connected to each other by switches (not shown).
[0029] The switches between the programmable circuits PE arranged in the program array PE-ARRY and the switches arranged in each programmable circuit PE (switches between the arithmetic units ALU and between the arithmetic units ALU and registers) are controlled by state information, which will be explained later. The function of the arithmetic units ALU is also specified by the state information.
[0030] A plurality of pieces of state information are stored in the state memory ST-MEM. A control circuit CTL selects a piece of state information from the plurality of pieces of state information in a predetermined order. The selected state information controls the switches connected between the programmable circuits PE and the switches within the programmable circuit PE. The selected state information also specifies the function of the arithmetic unit ALU arranged within the programmable circuit PE.
[0031] The selected state information represents a state during a certain period of time of the circuit realized by the program array PE-ARRY. In other words, the selected state information represents one state in the state (state transition) of the circuit that changes over time. When the control circuit CTL sequentially selects a plurality of pieces of state information stored in the state memory ST-MEM, a circuit according to the state transition is configured by the plurality of programmable circuits PE arranged in the program array PE-ARRY.
[0032] The DMA controller DMAC transfers data between the program array PE-ARRY and the system memory S-MEM via the internal bus Int-BUS. To transfer data, the DMA controller DMAC outputs the bus request signal RQ_DR described in Figure 1 to the bus arbiter BUS-AB (Figure 1) and inputs the bus grant signal AC_DR from the bus arbiter BUS-AB.
[0033] For example, when realizing a circuit that performs a predetermined arithmetic operation in the program array PE-ARRY, data for performing the predetermined arithmetic operation is transferred from the system memory S-MEM to the program array PE-ARRY by the DMA controller DMAC. Also, when a predetermined arithmetic operation is being executed, intermediate data generated in the program array PE-ARRY is transferred between the system memory S-MEM and the program array PE-ARRY by the DMA controller DMAC. Furthermore, when the predetermined arithmetic operation is completed, data of the arithmetic operation result obtained in the program array PE-ARRY is transferred from the program array PE-ARRY to the system memory S-MEM by the DMA controller DMAC. When transferring such data, arbitration by the bus arbiter BUS-AB is performed as described in FIG. 1. Therefore, the DMAC controller DMAC transfers data (including intermediate data) between the program array PE-ARRY and the system memory S-MEM only when the bus arbiter BUS-AB permits access to the DR processor DRP, in other words, the DMA controller DMAC.
[0034] Although not particularly limited, a plurality of state information stored in the state memory ST-MEM is stored in the system memory S-MEM in advance, and the processor CPU (FIG. 1) reads the plurality of state information from the system memory S-MEM and stores it in the state memory ST-MEM. Of course, instead of the processor CPU, the DMAC controller DMAC may transfer a plurality of state information stored in the system memory S-MEM in advance to the state memory ST-MEM and store it in the state memory ST-MEM.
[0035] Note that the frequency circuit FPC shown in FIG. 1 is not shown in FIG. 2(A). In Embodiment 1, the frequency circuit FPC is realized by the program array PE-ARRY according to the selected state information.
[0036] <Operation of DR Processor> Next, the operation of the DR processor DRP will be described with reference to Fig. 3. Fig. 3 is a diagram for explaining the operation of the DR processor according to the first embodiment.
[0037] Here, an example is shown in which circuit information AA_AP to YY_AP is stored in the system memory S-MEM so that circuits AA to YY with different configurations can be realized by the DR processor DRP. The circuit information AA_AP is composed of a plurality of state information for realizing functions A to Z that transition over time. Although not shown, the same is true for each of the circuit information BB_AP to YY_AP, so the circuit information AA_AP will be used as an example for explanation.
[0038] In the first embodiment, three types of circuits are prepared to realize function A. That is, three pieces of state information A_L, A_M, and A_S that realize three different types of circuits are prepared as state information to realize one function A. As with function A, three pieces of state information B_L, B_M, and B_S to Z_L, Z_M, and Z_S are prepared for functions B to Z as state information to realize the respective functions.
[0039] When a desired circuit is realized by the DR processor DRP, the processor CPU selects circuit information corresponding to the desired circuit from among the circuit information AA_AP to YY_AP stored in the system memory S-MEM, and transfers (reloads) it to the state memory ST-MEM of the DR processor DRP. Figure 3 shows the case where the circuit information AA_AP is reloaded as the circuit information corresponding to the desired circuit.
[0040] By reloading, the state information A_L, A_M, A_S to Z_L, Z_M, Z_S constituting the circuit information AA_AP stored in the state memory ST-MEM of the DR processor DRP are selected by the control circuit CTL and the frequency circuit FPC (Fig. 1) of the DR processor DRP. That is, in the order of function A to function Z, Z_L, Z_M, Z_S are selected from the state information A_L, A_M, A_S, and further one state information is selected from each of the three state information (for example, the state information A_L, A_M, A_S).
[0041] That is, first, state information A_L, A_M, and A_S corresponding to function A are selected, and one piece of state information (for example, A_L) is further selected from the selected three pieces of state information. According to this selected state information A_L, the states of the switches between the multiple programmable circuits PE arranged in the program array PE-ARRY and the states of the switches in each programmable circuit PE are set. In addition, the functions of the arithmetic unit ALU and the like in each programmable circuit PE are also specified according to the state information A_L. As a result, a circuit (a circuit that realizes function A) according to the state information A_L is realized by the program array PE-ARRY. Next, three pieces of state information B_L, B_M, and B_S corresponding to function B are selected, and one piece of state information (for example, B_L) is further selected from the selected state information. When the state information B_L is selected, a circuit (a circuit that realizes function B) according to the state information B_L is realized by the program array PE-ARRY in the same manner as in the case of the state information A_L. Thereafter, in a similar manner, one piece of state information corresponding to functions C to Z is selected in turn, and circuits realizing functions C to Z are realised in turn by the program array PE-ARRY. In this way, a circuit AA whose configuration transitions from function A to function Z over time is realised by the program array PE-ARRY.
[0042] Hereinafter, each of the state information A_L, A_M, and A_S corresponding to function A will also be referred to as circuit-specific state information, and the circuit-specific state information A_L, A_M, and A_S will also be collectively referred to as first state information. Also, each of the state information B_L, B_M, and B_S corresponding to function B will also be referred to as circuit-specific state information, and the circuit-specific state information B_L, B_M, and B_S will also be collectively referred to as second state information.
[0043] <3 state information> Next, three pieces of state information corresponding to one function will be explained. Fig. 4 is a diagram for explaining the three pieces of state information according to the first embodiment.
[0044] Here, the three pieces of state information A_L, A_M, and A_S that realize the function A will be described as an example, but the remaining pieces of state information are similar.
[0045] The three pieces of state information A_L, A_M, and A_S are state information representing three types of circuits AC_L, AC_M, and AC_S that realize a function A equivalent to each other.
[0046] The state information A_S is state information that realizes in the program array PE-ARRY a circuit in which the amount of access generated by the DMA controller DMAC (Fig. 2) is minimized (small) when the corresponding circuit AC_S operates. On the other hand, the state information A_L is state information that realizes in the program array PE-ARRY a circuit in which the amount of access generated by the DMA controller DMAC is maximized (large) when the corresponding circuit AC_L operates. Also, the state information A_M is state information that realizes in the program array PE-ARRY a circuit in which the amount of access generated by the DMA controller DMAC is between that of the circuits AC_L and AC_S (medium) when the corresponding circuit AC_M operates.
[0047] In the case of the circuit AC_L, the amount of access is the maximum, so the performance is high. In contrast, in the case of the circuit AC_S, the amount of access is the minimum, so the performance is low. In the case of the circuit AC_M, the amount of access is intermediate, so the performance is also medium.
[0048] In this way, the configuration for changing the amount of access is such that the circuit AC_L, which has the highest amount of access, handles the data it processes in double precision (64 bits / data). This means that the circuit AC_L uses a large amount of data, but it is possible to improve performance. In contrast, the circuit AC_S, which has the lowest amount of access, handles the data it processes in half precision (16 bits / data), and is a circuit that uses a small amount of compressed (pruned in the case of AI inference) data. Meanwhile, the circuit AC_M, which has a medium amount of access, handles the data it processes in single precision (32 bits / data).
[0049] In the first embodiment, an example has been described in which three types of circuits are used as circuits that realize the same functions, but the number is not limited to this. For example, two types or four or more types of circuits may be used to realize the same functions. Of course, the number of types of state information that realize the same functions may be, for example, two types or four or more types, depending on the number of types of circuits used.
[0050] <Example of operation of semiconductor device> Next, an operation example of the semiconductor device LSI shown in Fig. 1 will be described with reference to the drawings. Fig. 5 is a diagram showing an operation example of the semiconductor device according to the first embodiment. Fig. 6 is a diagram showing memory access of the semiconductor device according to the first embodiment. Here, an example will be described in which an AI inference is performed to recognize an object such as a person from the captured image (input image) while capturing an image with an on-board camera and displaying the captured image on a display.
[0051] In order to realize a circuit for performing AI inference, it is assumed that the circuit information AA_AP (FIG. 3) has been reloaded in advance from the system memory S-MEM to the state memory ST-MEM of the DR processor DRP.
[0052] Also, for ease of explanation, the circuit information AA_AP is described as being composed of state information A_L, A_M, A_S to C_L, C_M, C_S corresponding to functions A to C, and state information A_L, B_L, C_L corresponding to the highest performance circuits AC_L, BC_L, CC_L are selected.
[0053] In order to perform AI inference, the semiconductor device LSI executes the processes from step ST1 to step ST9 in this order.
[0054] First, in step ST1, the processor CPU executes pre-processing (CPU processing 1) on an input image. In step ST2, the input image data processed by the processor CPU is stored in the system memory S-MEM by the processor CPU.
[0055] In step ST3, the state information A_L is selected in the DR processor DRP, and the circuit AC_L is realized by the program array PE-ARRY. In step ST3, the circuit AC_L and the DMA controller DMAC import input image data for AI inference from the system memory S-MEM into the circuit AC_L. In step ST4, the intermediate data generated by the circuit AC_L during this import is stored in the system memory S-MEM by the DMA controller DMAC. In step ST4, the data obtained by the processing of the circuit AC_L is also transferred from the circuit AC_L to the system memory S-MEM by the DMA controller DMAC and stored there.
[0056] In step ST5, the state information B_L is selected in the DR processor DRP, and the circuit BC_L is realized by the program array PE-ARRY. In step ST5, the data stored in step ST4 is taken from the system memory S-MEM to the circuit BC_L by the circuit BC_L and the DMA controller DMAC. The circuit BC_L performs calculations for AI inference on the taken-in data. In step ST6, intermediate data generated by the circuit BC_L during this calculation is stored in the system memory S-MEM by the DMA controller DMAC. Also, in step ST6, data obtained by the calculation by the circuit BC_L is transferred from the circuit BC_L to the system memory S-MEM by the DMA controller DMAC and stored therein.
[0057] In step ST7, the state information C_L is selected in the DR processor DRP, and the circuit CC_L is realized by the program array PE-ARRY. In step ST7, the data stored in step ST6 is loaded from the system memory S-MEM to the circuit CC_L by the circuit CC_L and the DMA controller DMAC. The circuit CC_L generates an inference result based on the loaded data. In step ST8, the inference result generated by the circuit CC_L is stored in the system memory S-MEM by the DMA controller DMAC.
[0058] After that, in step ST9, the processor CPU retrieves the inference result from the system memory S-MEM, performs post-processing (CPU processing 2), and the result of the post-processing is displayed on, for example, a display.
[0059] In this way, the circuits AC_L, BC_L, and CC_L realized by the DR processor DRP equipped with the DMA controller DMAC and the program array PE-ARRY have accesses to transfer data between the circuits AC_L, BC_L, and CC_L and the system memory S-MEM at each step. Also, the image processing circuits IP1 and IP2 of the semiconductor device LSI (FIG. 1) have accesses to transfer data between the circuits IP1 and IP2 and the system memory S-MEM in order to process images.
[0060] FIG. 6 shows memory access when steps ST1 to ST9 shown in FIG. 5 are executed.
[0061] In the page of Fig. 6, the symbols CPU, circuit AC_L, circuit BC_L, circuit CC_L and CPU shown at the top indicate circuit parts that are operating. Fig. 6 shows the period and amount of access to the system memory S-MEM that occurs when circuit parts such as the processor CPU operate. Here, the period of access is shown horizontally, and the amount of access is shown vertically. Also in Fig. 6, BZ indicates the bandwidth of the internal bus Int-BUS.
[0062] In Fig. 6, the symbol IP1_AT indicates the period during which the image processing circuit IP1 accesses the system memory S-MEM to perform image input processing and the amount of access. The symbol IP2_AT indicates the period during which the image processing circuit IP2 accesses the system memory S-MEM to perform image output processing and the amount of access. Since the image from the vehicle-mounted camera is processed and displayed on the display, the period during which the image processing circuits IP1 and IP2 access the system memory S-MEM is almost the same as the period of one frame (one frame at 30 frames per second (30 fps)), as shown in Fig. 6.
[0063] In Figure 6, the symbol CP_AP indicates the access period and amount of access to the system memory S-MEM generated by the pre-processing (step ST1 in Figure 5) executed by the processor CPU, and the symbol CP_AF indicates the access period and amount of access to the system memory S-MEM generated by the post-processing (step ST9 in Figure 5) executed by the processor CPU.
[0064] 6, the symbol DR_AT indicates the period and amount of access to the system memory S-MEM generated by the circuit AC_L realized by the program array PE-ARRY, the symbol DR_BT indicates the period and amount of access to the system memory S-MEM generated by the circuit BC_L realized by the program array PE-ARRY, and the symbol DR_CT indicates the period and amount of access to the system memory S-MEM generated by the circuit CC_L realized by the program array PE-ARRY.
[0065] As shown in Figure 6, even if accesses generated by the image processing circuits IP1, IP2 and accesses generated by the circuits realized by the program array PE-ARRY occur simultaneously, as long as the amount of access is within the range of the bus bandwidth BZ, as shown in Figure 6, accesses of either circuit will not be restricted and no problems such as performance degradation will occur.
[0066] <Comparative Example> Next, an example of a decrease in performance will be described as a comparative example.
[0067] Fig. 7 is a diagram for explaining a comparative example. Fig. 7(A) is similar to Fig. 6. The difference is that in Fig. 7(A), new processing occurs by the processor CPU during one frame period. This new processing corresponds to processing executed by the processor CPU to execute processing corresponding to an operation performed by a passenger operating the in-vehicle system, for example.
[0068] In order to execute a new process, the processor CPU accesses the system memory S-MEM during one frame period. The period and amount of access for this access are indicated by the symbol CP_AC in FIG. 7(A). As shown in FIG. 7(A), the access period caused by the new process by the processor CPU overlaps with the access period IP1_AT caused by the image input process, the access period IP2_AT caused by the image output process, and the access periods DR_AT, DR_BT, and DR_CT caused by the circuits realized by the program array PE-ARRY, and the amount of access caused by the new process by the processor CPU is also large. Therefore, the amount of access to the system memory S-MEM by the processor CPU, the image processing circuits IP1 and IP2, and the DR processor DRP exceeds the bus bandwidth BZ.
[0069] In practice, the bus arbiter BUS-AB (FIG. 1) arbitrates access between the processor CPU, the image processing circuits IP1, IP2, and the DR processor DRP. As a result of this arbitration, the processor CPU, the image processing circuits IP1, IP2, and the DR processor DRP operate so that the amount of access to the system memory S-MEM by the processor CPU, the image processing circuits IP1, IP2, and the DR processor DRP does not exceed the bus bandwidth BZ, as shown in FIG. 7(B). For example, in the case of an image output process executed by the image processing circuit IP2, the arbitration of the bus arbiter BUS-AB causes access to the system memory S-MEM to be delayed. Similarly, the arbitration of the other circuits causes access to the system memory S-MEM to be delayed. Since access is delayed, a situation occurs in which a series of processes is not completed within one frame period, as shown in FIG. 7(B). For example, the image output process is not completed within one frame period, as shown in FIG. 7(B), and it becomes difficult to perform a desired display on the display. That is, the performance of the semiconductor device is degraded.
[0070] <Select state information> In the first embodiment, the state information to be selected next is determined based on the frequency of access refusal (rejection frequency) by the bus arbiter BUS-AB with respect to the access by the DR processor DRP to the system memory S-MEM. For example, during the period when the circuit realizing the function A is operating, the refusal frequency is obtained in the access by the DR processor DRP to the system memory, and based on the obtained refusal frequency, the state information corresponding to the previously obtained refusal frequency is selected from the three pieces of state information B_L, B_M, and B_S corresponding to the function B to be executed next. As a result, after the circuit corresponding to the function A operates, a circuit (circuit corresponding to the function B) having a configuration corresponding to the refusal frequency when the circuit corresponding to the function A was operating operates. In other words, the refusal frequency obtained when the circuit corresponding to the function A that was previously operating is estimated as the refusal frequency for the circuit to operate next, and a circuit having a configuration suitable for the estimated refusal frequency is used as the circuit corresponding to the function B.
[0071] In the first embodiment, the refusal frequency is calculated by the frequency circuit FPC shown in Fig. 1. The frequency circuit FPC calculates the refusal frequency based on the bus request signal RQ_DR output by the DMA controller DMAC (Fig. 2) and the bus grant signal AC_DR input from the bus arbiter BUS-AB. That is, the frequency circuit FPC calculates the number of bus request signals RQ_DR output by the DMAC controller DMC during the period when the circuit realizing function A is operating as the number of requests, and calculates the number of times access is rejected (access is not granted) by the bus grant signal AC_DR and the waiting state is entered as the number of refusals. The frequency circuit FPC calculates the ratio between the number of refusals and the number of requests (number of refusals / number of requests) as the refusal frequency, and outputs it to the control circuit CTL (Fig. 2).
[0072] Next, the operation of selecting state information will be described with reference to Fig. 8. Fig. 8 is a flowchart showing the operation of selecting state information according to the first embodiment.
[0073] Here, an example will be described in which the control circuit CTL selects state information corresponding to the rejection frequency from three pieces of state information by comparing the input rejection frequency with two thresholds related to the rejection frequency. The two thresholds are a first threshold for a high rejection frequency and a second threshold for a low rejection frequency.
[0074] 8, the DR processor DRP starts its operation in step ST10. Next, in step ST11, the processor CPU reloads the circuit information AA_AP from the system memory S-MEM to the state memory ST-MEM.
[0075] In step ST12, the processor CPU selects the first state information. That is, one piece of state information is selected from the three pieces of state information A_L, A_M, and A_S corresponding to the function A. FIG. 8 shows a case where the processor CPU selects the state information A_L as the state information corresponding to the function A. As for which state information is selected as the first state information, for example, the processor CPU may determine the rejection frequency in advance, or may select fixed state information. The state information A_L selected by the processor CPU is transmitted to the control circuit CTL of the DR processor DRP. As a result, the control circuit CTL selects the state information A_L stored in the state memory ST-MEM. As a result, in step ST13, the DR processor DRP realizes a circuit AC_L corresponding to the state information A_L, and the circuit AC_L operates. Also, in step ST13, the rejection frequency is calculated by the frequency circuit FPC.
[0076] Next, in step ST14, the control circuit CTL selects state information corresponding to function B, and in this selection, it refers to the rejection frequency calculated in step ST13. That is, if the rejection frequency exceeds the first threshold value, the control circuit CTL selects state information B_S that realizes circuit BC_S, which is a circuit with a small amount of access (selection S). In contrast, if the rejection frequency is less than the second threshold value, the control circuit CTL selects state information B_L that realizes circuit BC_L, which is a circuit with a large amount of access (selection L). Also, if the rejection frequency is between the first threshold value and the second threshold value, the control circuit CTL selects state information B_M that realizes circuit BC_M, which is a circuit with a medium amount of access (selection M).
[0077] In the case of selection S, in step ST15, a circuit BC_S corresponding to the state information B_S is realized by the program array PE-ARRY in the DR processor DRP, and the circuit BC_S operates. Also, in step ST15, the frequency circuit FPC calculates the rejection frequency during the period when the circuit BC_S is operating.
[0078] In step ST16, the control circuit CTL compares the rejection frequency calculated in step ST15 with the first threshold value and the second threshold value, and selects state information corresponding to the rejection frequency from the three state information C_L, C_M, and C_S corresponding to function C (selection S, selection M, selection L).
[0079] If the selection is selection S in step ST16, then step ST17 is executed. In step ST17, a circuit CC_S corresponding to the state information C_S is realized in the DR processor DRP, and the circuit CC_S operates. Also, if the selection is selection M in step ST16, then step ST20 is executed. In step ST20, a circuit CC_M corresponding to the state information C_M is realized in the DR processor DRP, and the circuit CC_M operates. Furthermore, if the selection is selection L in step ST16, then step ST23 is executed. In step ST23, a circuit CC_L corresponding to the state information C_L is realized in the DR processor DRP, and the circuit CC_L operates.
[0080] After that, in step ST24, the DR processor DRP ends the operation.
[0081] 8, steps ST18 and ST21 are similar to step ST15. The difference is that in step ST18, a circuit BC_M corresponding to state information B_M is realized in the DR processor DRP, and in step ST21, a circuit BC_L corresponding to state information B_L is realized in the DR processor DRP. Also, steps ST19 and ST22 are similar to step ST16.
[0082] In Fig. 8, an example is shown in which the program array PE-ARRY in the DR processor DRP realizes circuits corresponding to functions A to C, but as shown in Fig. 3, it may realize circuits corresponding to functions D to Z. In this case, step ST17 shown in Fig. 8 is set so that the rejection frequency is calculated in the same manner as step ST15, for example.
[0083] As a result, if the rejection frequency of the first circuit (e.g., circuit AC_L) is high, the circuit (BC_S) with a low amount of access is used as the next circuit to operate (the circuit that realizes function B). Also, if the rejection frequency of the first circuit to operate is low, the circuit (BC_L) with a high amount of access is used as the next circuit to operate. Furthermore, if the rejection frequency of the first circuit to operate is medium, the circuit (BC_M) with a medium amount of access is used as the next circuit to operate. As a result, a circuit with high performance is used next when the rejection frequency is low, and a circuit with a low amount of access is used next when the rejection frequency is high, making it possible to suppress a decrease in performance of the semiconductor device.
[0084] FIG. 9 is a diagram showing memory access in the semiconductor device according to the first embodiment. FIG. 9 is similar to FIG. 7(B). The difference is that state information is selected according to the flowchart shown in FIG. 8, the circuit that realizes function B is configured by the circuit BC_S with a small amount of access, and the circuit that realizes function C is also configured by the circuit CC_S with a small amount of access. This reduces the amount of access in the circuits (BC_S, CC_S) that realize function B and function C, as shown in FIG. 9. As a result, it is possible to reduce the state in which the processor CPU, the DR processor DRP, and the image processing circuits IP1 and IP2 are kept waiting due to arbitration by the bus arbiter BUS-AB, and it is possible to complete a series of processes in one frame period. In addition, since a circuit with a performance corresponding to the estimated rejection frequency is selected, a circuit with an appropriate performance is executed. As a result, it is possible to suppress a decrease in the performance of the semiconductor device.
[0085] In the first embodiment, the frequency circuit FPC is realized by the program array PE-ARRY in the DR processor DRP executing state information corresponding to the frequency circuit FPC. Therefore, the state information A_L selected in step ST12 includes state information corresponding to the circuit AC_L and state information corresponding to the frequency circuit FPC. Similarly, the state information selected in step ST14 includes state information corresponding to the circuit to be realized and state information corresponding to the frequency circuit FPC.
[0086] (Embodiment 2) Fig. 10 is a diagram showing an example of the operation of the semiconductor device according to the second embodiment. Fig. 10 is similar to steps ST2 to ST8 shown in Fig. 5. The main difference is that steps ST3, ST5, and ST7 in Fig. 10 are steps ST3_1, ST5_1, and ST7_1. Also, in Fig. 10, lines connecting the steps are clearly shown.
[0087] In Fig. 10, the input image data stored in the system memory S-MEM in step ST2 is taken into a circuit (AC_L, AC_M, or AC_S) realized by the state information A_L, A_M, or A_S selected by the processor CPU in step ST3_1 and processed. In step ST5_1, based on the rejection frequency of the circuit selected in step ST3_1, a circuit (BC_L, BC_M, BC_S) realized by the state information B_L, B_M, or B_S takes in data from the system memory S-MEM. Furthermore, in step ST7_1, based on the rejection frequency of the circuit selected in step ST5_1, a circuit (CC_L, CC_M, CC_S) realized by the state information C_L, C_M, or C_S takes in data from the system memory S-MEM.
[0088] In the second embodiment, the bit sizes (widths) of data handled by circuits BC_L, BC_M, and BC_S realized by three pieces of state information (e.g., B_L, B_M, and B_S) are set to be different. For example, in the circuit BC_L, one piece of data is represented in double precision (64 bits / data), in the circuit BC_M, one piece of data is represented in single precision (32 bits / data), and in the circuit BC_S, one piece of data is represented in half precision (16 bits / data). As a result, the bit sizes of data supplied to the circuit in step ST7_1 via the system memory S-MEM differ depending on the type of circuit selected in step ST5_1.
[0089] In the second embodiment, the subsequent circuits, i.e., the three types of circuits realized in step ST5_1 and / or step ST7_1, are configured to be able to process a plurality of bit sizes, which makes it possible to combine circuits with different access amounts (for example, circuit BC_S and circuit CC_L).
[0090] 10 shows an example in which each of the circuits CC_L, CC_M, and CC_S can handle a plurality of bit sizes (64 bits, 32 bits, and 16 bits), but the present invention is not limited to this. For example, state information for realizing a circuit corresponding to each bit size may be prepared. In this case, nine pieces of state information are prepared, and the control circuit CTL selects appropriate state information from the nine pieces of state information in consideration of the rejection frequency and the bit size of the circuit in the preceding stage, so that an appropriate circuit can be realized.
[0091] In the embodiment, the program array PE-ARRY in the DR processor DRP executes state information corresponding to the frequency circuit FPC to realize the frequency circuit FPC, but the present invention is not limited to this. That is, a dedicated frequency circuit FPC may be configured by combining logic circuits and the like.
[0092] In addition, an example has been described in which the frequency circuit FPC determines the refusal frequency based on the bus request signal RQ_DR and the bus grant signal AC_DR, but the present invention is not limited to this. For example, the refusal frequency may be determined by counting the number of waits (number of wait occurrences) during access by the DMA controller DMAC. Alternatively, the time difference between the logical value of the data transfer speed of the DMA controller DMAC and the actual data transfer speed may be measured, and the time difference may be used as the refusal frequency.
[0093] Of course, the frequency circuit FPC may be configured to obtain the frequency at which access is permitted, rather than the frequency at which access is denied. In this case, if the permission frequency is low, state information corresponding to a circuit with a small amount of access may be selected, and if the permission frequency is high, state information corresponding to a circuit with a large amount of access may be selected.
[0094] Furthermore, in the embodiment, an example was shown in which state information previously stored in the state memory ST-MEM was selected according to the rejection frequency obtained by the frequency circuit FPC, but the rejection frequency obtained by the frequency circuit FPC may be notified to the processor CPU. In this case, the processor CPU selects circuit information corresponding to the notified rejection frequency, and the processor CPU reloads the selected circuit information into the state memory ST-MEM. This allows the DR processor DRP to realize a circuit according to the rejection frequency, making it possible to suppress a decrease in performance of the semiconductor device LSI.
[0095] The invention made by the inventor has been specifically described above based on an embodiment, but it goes without saying that the present invention is not limited to the above embodiment and can be modified in various ways without departing from the gist of the invention. [Explanation of symbols]
[0096] BUS-AB Bus Arbiter CPU Processor DMAC DMA Controller DRP DR Processor FPC Frequency Circuit Int-BUS internal bus IP1, IP2 image processing circuit LSI Semiconductor Device PE Programmable Circuit PE-ARRY Program Array S-MEM System Memory ST-MEM State Memory
Claims
1. A processor; A dynamically reconfigurable processor including a DMA controller; Memory, an internal bus to which the processor, the dynamically reconfigurable processor, and the memory are connected; a bus arbiter connected to the processor and the dynamically reconfigurable processor, for arbitrating access to the memory by the processor and access to the memory by the DMA controller of the dynamically reconfigurable processor in accordance with a predetermined priority; Equipped with The dynamically reconfigurable processor includes a frequency circuit that determines a frequency at which the DMA controller is not permitted to access the memory through arbitration by the bus arbiter. Semiconductor device.
2. 2. The semiconductor device according to claim 1, The dynamically reconfigurable processor includes a plurality of programmable circuits and a state memory that stores state information that controls the functions of each of the plurality of programmable circuits and connections between the plurality of programmable circuits, and the dynamically reconfigurable processor realizes a circuit according to the state information; a plurality of pieces of state information each of which realizes an equivalent function and has a different amount of access to the memory; state information corresponding to the frequency is selected from the plurality of state information according to the frequency determined by the frequency circuit, and the dynamically reconfigurable processor then realizes a circuit according to the selected state information; Semiconductor device.
3. 3. The semiconductor device according to claim 2, the semiconductor device further includes an image processing circuit capable of acting as a bus master connected to the internal bus and the bus arbiter; the bus arbiter arbitrates, in accordance with a predetermined order of priority, access to the memory by the processor, access to the memory by the DMA controller, and access to the memory by the image processing circuit capable of becoming the bus master. Semiconductor device.
4. 2. The semiconductor device according to claim 1, The dynamically reconfigurable processor includes a plurality of programmable circuits and a state memory that stores first and second state information that controls functions of each of the plurality of programmable circuits and connections between the plurality of programmable circuits; the dynamically reconfigurable processor realizes a circuit according to the first state information, and then realizes a circuit according to the second state information; the second state information includes a plurality of pieces of state information for implementing functions equivalent to each other, the plurality of pieces of state information for each circuit having different amounts of access to the memory; the frequency circuit, when the dynamically reconfigurable processor realizes a circuit according to the first state information, obtains the frequency, and selects circuit-specific state information corresponding to the frequency from the plurality of circuit-specific state information according to the obtained frequency, and the dynamically reconfigurable processor realizes a circuit according to the selected circuit-specific state information. Semiconductor device.
5. 5. The semiconductor device according to claim 4, The width of data handled by the circuits realized by the plurality of pieces of circuit-specific state information is different. Semiconductor device.
6. 5. The semiconductor device according to claim 4, the first state information includes a plurality of pieces of state information for implementing functions equivalent to each other, the plurality of pieces of state information for each circuit having different amounts of access to the memory; the processor selects predetermined circuit-specific state information from the plurality of circuit-specific state information in the first state information, and the dynamically reconfigurable processor realizes a circuit according to the selected circuit-specific state information. Semiconductor device.
7. 7. The semiconductor device according to claim 6, the semiconductor device further includes an image processing circuit capable of acting as a bus master connected to the internal bus and the bus arbiter; the bus arbiter arbitrates, in accordance with a predetermined order of priority, access to the memory by the processor, access to the memory by the DMA controller, and access to the memory by the image processing circuit capable of becoming the bus master. Semiconductor device.
8. A method for controlling a semiconductor device comprising: a processor; a dynamically reconfigurable processor having a DMA controller; a system memory; a bus connecting the processor, the dynamically reconfigurable processor, and the system memory; and a bus arbiter connected to the processor and the dynamically reconfigurable processor, The dynamically reconfigurable processor includes a plurality of programmable circuits and a state memory that stores first and second state information that controls functions of each of the plurality of programmable circuits and connections between the plurality of programmable circuits; the second state information includes a plurality of pieces of state information which realize functions equivalent to each other and which have different amounts of access to the system memory, the dynamically reconfigurable processor determines a frequency at which access to the system memory by the DMA controller of the dynamically reconfigurable processor was not permitted through arbitration by the bus arbiter during a period during which the dynamically reconfigurable processor realizes a function according to the first state information; the dynamically reconfigurable processor selects circuit-specific state information corresponding to the frequency from the plurality of circuit-specific state information according to the obtained frequency, and realizes a circuit according to the selected circuit-specific state information. Control methods.
9. 9. The control method according to claim 8, the first state information includes a plurality of pieces of state information which realize functions equivalent to each other and which have different amounts of access to the system memory, before determining the frequency, the processor selects predetermined circuit-specific state information from the plurality of circuit-specific state information in the first state information, and the dynamically reconfigurable processor realizes a circuit in accordance with the selected circuit-specific state information; Control methods.
10. 9. The control method according to claim 8, The width of data handled by the circuits realized by the plurality of pieces of circuit-specific state information is different. Control methods.
Citation Information
Patent Citations
Reconfigurable parallel computer
JP2000311156A
Data processing system
JP2003122706A
Semiconductor integrated circuit device
JP2007108944A
Reconfigurable arithmetic device, data compression apparatus and program
JP2012049669A
Information processor, control method of information processor, and program
JP2017129951A
