Subprocessor, integrated circuit device, and electronic apparatus

A subprocessor, an integrated circuit device, and an electronic apparatus or the like capable of performing data processing efficiently are provided. A subprocessor is connected to a host processor through a bus controller. The subprocessor includes: a command fetch unit that fetches a command from a subprocessor program; a register unit; a command decoding unit that decodes the command; and an operation unit that performs command execution processing. The host processor sets a program counter value indicating a storage destination of the subprocessor program and a processing start command for, the processing of the subprocessor to the register unit. The command fetch unit fetches a command designated by the program counter value, the command decoding unit decodes the command, and the operation unit performs command execution processing.

The present application claims a priority based on Japanese Patent Application No. 2009-148665 filed on Jun. 23, 2009, the contents of which are incorporated herein by reference.

TECHNICAL FIELD

The invention relates to a subprocessor, an integrated circuit device, and an electronic apparatus or the like.

BACKGROUND ART

In recent years, in the field of digital signal processing, a demand for fast and low power-consuming data processing devices has increased. In particular, in mobile devices (pulse meters, digital cameras, and the like) with a sensor mounted, it is necessary to process the signals output by the sensor in real time and with low power consumption. To solve this problem, a special-purpose processor (subprocessor) for effectively executing operation processing frequently used in digital signal processing such as product-sum operation has been developed.

For example, PTL 1 discloses a data processing device which includes a special-purpose data processing unit that performs operation processing and a general-purpose data processing unit that performs general-purpose processing. However, since a command fetch unit and a data interface are shared by these two units, there is a problem in that this method has a lot of restrictions on collaborative operations.

CITATION LIST

Patent Literature

SUMMARY OF INVENTION

Technical Problem

According to some aspects of the invention, it is possible to provide a subprocessor, an integrated circuit device, and an electronic apparatus or the like capable of performing data processing efficiently.

Solution to Problem

According to an aspect of the invention, there is provided a subprocessor connected to a host processor through a bus controller, including: a command fetch unit that fetches a command from a subprocessor program; a register unit; a command decoding unit that decodes the fetched command; and an operation unit that performs command execution processing based on the decoding result, in which the host processor sets a program counter value indicating a storage destination of the subprocessor program and a processing start command for the processing of the subprocessor to the register unit through the bus controller, the command fetch unit fetches a command designated by the program counter value, the command decoding unit decodes the command, and the operation unit performs the command execution processing.

According to the above aspect of the invention, since the subprocessor includes the command fetch unit that fetches a command through the bus controller, the subprocessor can independently load a program without the intervention of the host processor and perform command execution processing.

Moreover, in the above aspect of the invention, the subprocessor may include a bus controller interface that performs interface processing between the bus controller and the subprocessor.

By doing so, the subprocessor can independently fetch a command from the subprocessor program or independently perform reading or writing of data for execution of a command through the bus controller interface.

Moreover, in the above aspect of the invention, the bus controller interface may include a host interface that performs interface processing between the host processor and the subprocessor.

By doing so, the host processor can access the register unit of the subprocessor through the host interface.

Moreover, in the above aspect of the invention, the bus controller interface may include a data interface for reading or writing data for execution of a command.

By doing so, the subprocessor can independently read and write data without the intervention of the host processor.

Moreover, in the above aspect of the invention, the register unit may include a data register, and the operation unit may perform command execution processing based on data which is written to the data register through the bus controller interface and the command on the basis of the decoding RESULT.

By doing so, the host processor can write necessary data to the data register before the subprocessor starts executing processing.

Moreover, in the above aspect of the invention, the register unit may include an address register that stores address information of data which is read or written through the bus controller interface, and the address information of the address register may be written by the host processor through the bus controller interface.

By doing so, it is possible to read or write necessary data based on the address information stored in the address register. Moreover, the host processor can write the address information before the subprocessor starts executing processing.

Moreover, in the above aspect of the invention, when a processing end command of the subprocessor program is decoded, a processing complete signal may be output.

By doing so, it is possible to notify the host processor of the ending of the execution processing of the subprocessor. Moreover, when the supply of clocks to the host processor is halted during the execution processing of the subprocessor, it is possible to resume the supply of clocks by the processing complete signal.

Moreover, in the above aspect of the invention, the register unit may include a control register that includes a Run bit indicating that the subprocessor is under processing, and the Run bit may be cleared when the processing complete signal is output.

By doing so, it is possible to provide notification that the subprocessor is executing processing when “1” is set to the Run bit of the control register and that the subprocessor has ended the execution processing when “0” is set to the Run bit.

Moreover, in the above aspect of the invention, the register unit may include an operation parameter register, and when an operation parameter is written to the operation parameter register by the host processor, the operation unit may perform operation processing in accordance with the content set by the operation parameter.

By doing so, it is possible to set the initial value for option control of operation processing such as arithmetic right shift control by allowing the host processor to write the operation parameter before the subprocessor starts executing processing.

Moreover, in the above aspect of the invention, the register unit may include an operation parameter register, and when an operation parameter is written to the operation parameter register in accordance with an operation parameter setting command of the subprocessor program, the operation unit may perform operation processing in accordance with the content set by the operation parameter.

By doing so, it is possible to flexibly execute option control of operation processing such as arithmetic right shift control by writing the operation parameter in accordance with a command described in the subprocessor program.

According to another aspect of the invention, there is provided an integrated circuit device including: the subprocessor described above; and the bus controller connected to the subprocessor and the host processor, the bus controller performs bus control between a memory in which the host processor program and the subprocessor program are stored, the host processor, and the subprocessor.

According to the above aspect of the invention, since the subprocessor can execute targeting data processing independently, the host processor can concurrently perform processing that is not directly dependent on the processing during the execution processing of the subprocessor. As a result, the data processing can be executed at a high speed.

Moreover, in the above aspect of the invention, the integrated circuit device may further include the host processor.

Moreover, in the above aspect of the invention, the integrated circuit device may further include a clock generation circuit, and the clock generation circuit may stop supplying clocks to the host processor after a processing start command is executed and resume the supply of clocks to the host processor after the processing of the subprocessor is complete.

By doing so, since the host processor does not need to operate during the execution processing of the subprocessor, it is possible to halt the operation of the host processor to thereby decrease the power consumption of the data processing device (integrated circuit device).

According to another aspect of the invention, there is provided an electronic apparatus having the integrated circuit device described above.

DESCRIPTION OF EMBODIMENTS

Hereinafter, embodiments of the invention will be described with reference to the drawings. It should be noted that the embodiments described below do not disadvantageously restrict the content of the invention described in the scope of the claims and not all of the constructions described with reference to the following embodiments are necessary as the solving means of the invention.

1. Basic Configuration Example of Data Processing Device

FIG. 1shows a basic configuration example of a data processing device (integrated circuit device) of the present embodiment. A data processing device (integrated circuit device)200shown inFIG. 1is a system in which a host processor210and a subprocessor100perform data processing in collaboration with each other, and includes the subprocessor100, the host processor210, a bus controller220, and a memory230. The data processing device200is not limited to the configuration ofFIG. 1, but may be modified in various ways such that a part of the constituent elements may be omitted, other constituent elements may be substituted, or other constituent elements may be added. For example, the host processor210may not be included in the data processing device200(integrated circuit device), but the host processor210may be an external integrated circuit device.

The subprocessor (coprocessor)100fetches a command from a subprocessor program250stored in the memory230, decodes the fetched command, and performs targeting data processing. A command for the targeting data processing is described in the subprocessor program250. The bus controller220is connected to the subprocessor100and the host processor210so as to perform bus control between the memory230, the host processor210, and the subprocessor100.

According to the data processing device shown inFIG. 1, when the subprocessor100receives a processing start command from the host processor210, the subprocessor100can execute data processing independently without the intervention of the host processor210. That is, the subprocessor100fetches a command from the subprocessor program250through the bus controller220, decodes the fetched command, and performs targeting data processing. The subprocessor100can read data necessary for processing from the memory230through the bus controller220and write operation results to the memory230. The ability to execute processing independently is attributable to the fact that the subprocessor100includes a bus controller interface150as will be described later.

As described above, according to the data processing device (integrated circuit device)200of the present embodiment, the subprocessor100can execute the targeting data processing independently. Thus, during the execution processing of the subprocessor100, the host processor210can concurrently perform processing that is not directly dependent on the processing. As a result, the data processing can be executed at a high speed. Moreover, when the processing of the host processor210becomes unnecessary during the execution of the subprocessor100, since the operation of the host processor210can be halted, it is possible to decrease the power consumption of the data processing device (integrated circuit device)200.

Although inFIG. 1, the memory230is included in the data processing device (integrated circuit device)200, it is not essential to provide the memory230at an inner side of the data processing device (integrated circuit device)200. The memory230may be at the outer side of the data processing device (integrated circuit device)200.

2. Configuration Example of Subprocessor

FIG. 2shows a configuration example of the subprocessor100of the present embodiment. The subprocessor100shown inFIG. 2includes the bus controller interface150, a register unit130, a command decoding unit140, and an operation unit160. In addition, the bus controller interface150includes a host interface110, a command fetch unit120, and a data interface. The data interface includes an X-bus read unit170, a Y-bus read unit180, and a Z-bus write unit190. The operation unit160, the X-bus read unit170, the Y-bus read unit180, and the Z-bus write unit190form an operation pipeline unit.

The subprocessor100of the present embodiment is not limited to the configuration ofFIG. 2, but may be modified in various ways such that a part of the constituent elements may be omitted, other constituent elements may be substituted, or other constituent elements may be added. For example, it is not an essential requirement that the bus controller interface150is composed of the host interface110, the command fetch unit120, the X-bus read unit170, the Y-bus read unit180, and the Z-bus write unit190as shown inFIG. 2. Instead of providing the independent host interface110, the function of the host interface may be provided to any one of the other four constituent elements.

The bus controller interface150performs interface processing between the bus controller220and the subprocessor100. Specifically, the bus controller interface150performs interface processing for connecting the subprocessor100and the bus controller220. The bus controller interface150includes the host interface110that performs the interface processing between the host processor210and the subprocessor. Specifically, the host interface110performs the interface processing for allowing the host processor210to write or read a register value to or from the register unit130. Moreover, the bus controller interface150includes the data interface for performing reading or writing of data for execution of commands. Specifically, the data interface includes the X-bus read unit170, the Y-bus read unit180, and the Z-bus write unit190. The X-bus read unit170and the Y-bus read unit180perform reading of data, and the Z-bus write unit190performs writing of data.

The command fetch unit (program interface)120fetches the command from the subprocessor program250, and the command decoding unit140decodes the fetched command. The operation unit160executes the command based on the decoding results.

The register unit130includes a control register CTL, a program counter PC, address register A0to A3, data registers D0and D1, an accumulator register ACC, and an operation parameter register OPR. The register configuration of the register unit130is not limited to this.

The control register CTL has bits related to the control of transmission or the like of the start, halt, and interrupt signals for execution of the subprocessor100. The program counter PC stores an address (program counter value) in which the subprocessor program250is stored. The address registers A0to A3store the address information of data read or written through the data interface. The data necessary for processing are written to the data registers D0and D1through the host interface110(in a broader sense, the bus controller interface150). The accumulator register ACC temporarily stores the intermediate results of the operation in the operation unit160. The operation parameter register OPR stores operation parameters for controlling various options of operation processing.

FIG. 3is a flowchart illustrating a basic operation of the subprocessor100. Moreover,FIGS. 4 to 6are block diagrams illustrating the basic operation of the subprocessor100. Hereinafter, respective steps S1to S7of the operation of the subprocessor100will be described with reference toFIGS. 3 to 6.

First, in step S1, as indicated by E1inFIG. 4, the host processor210sets an address (program counter value) indicating a storage destination of the subprocessor program250to the program counter PC through the host interface110(in a broader sense, the bus controller interface150). Specifically, the host processor210supplies a register address and a program counter value of the program counter PC to the host interface110together with a write control signal, and the host interface110sets the program counter value to the program counter PC.

Subsequently, in step S2, as indicated by B2inFIG. 4, the host processor210sets necessary address information to the address registers A0to A3through the host interface110(in a broader sense, the bus controller interface150). The address information is the address indicating the location of input data and the storage destination of output data, which are processed by the subprocessor100. Furthermore, the host processor210sets data necessary for the data processing performed by the subprocessor100to the data registers D0and D1as necessary.

Subsequently, in step S3, as indicated by B3inFIG. 4, the host processor210issues a processing start command. Specifically, the host processor210writes “1” to the Run bit of the control register CTL through the host interface110(in a broader sense, the bus controller interface150).

Subsequently, in step S4, as indicated by B4inFIG. 5, the subprocessor100fetches the command from the subprocessor program250, decodes the fetched command, and starts executing processing. Specifically, the command fetch unit120outputs the program counter value to the bus controller220as a command address and receives and fetches a command code from the bus controller220. At the same time, the command fetch unit120updates the program counter value with the next command address. In addition, the command decoding unit140decodes the command code to generate a necessary control signal and controls the operation unit160.

The operation pipeline unit performs the following operation processing, for example. The X-bus read unit170and the Y-bus read unit180read data from addresses (addresses on the memory230) indicated by the address registers A0to A3which are designated by the command code based on the control signal supplied from the command decoding unit140and supply the data to the operation unit160. The operation unit160performs an operation based on the command code and outputs the operation results to the Z-bus write unit190. The Z-bus write unit190writes the operation results to the addresses (the addresses on the memory230) indicated by the address registers A0to A3which are designated by the command code.

A value “1” is set to the Run bit of the control register CTL during the period when the subprocessor100performs processing. That is, the value “1” set to the Run bit implies that the subprocessor100is executing processing.

Subsequently, in step S5, as indicated by E5inFIG. 6, the subprocessor100fetches and decodes a processing end command. The processing end command is an EXIT command, or the like, for example, and is a command described in the subprocessor program250as indicated by B6inFIG. 6(for example, the command is described in a program processing end step of the subprocessor program250). When this command is fetched, the subprocessor100ends the operation processing.

Subsequently, in step S6, as indicated by37inFIG. 6, the subprocessor100clears (namely, writes 0 to) a predetermined bit (the Run bit) of the control register CTL.

Subsequently, in step S7, as indicated by B8inFIG. 6, the subprocessor100outputs a processing complete signal. Specifically, when the subprocessor100fetches the processing end command, a value “1” is set to an IRQ bit (interrupt request bit) of the control register CTL. When the value “1” is set to the IRQ bit, the processing complete signal is output.

In this way, due to the presence of the command fetch unit120(in a broader sense, the bus controller interface150) and the data interface (in a broader sense, the bus controller interface150), the subprocessor100can execute data processing independently.

As described above, in the present embodiment, the subprocessor is provided with the host interface110(in a broader sense, the bus controller interface150) for performing interface processing between the host processor210and the subprocessor through the bus controller220or the like. That is, the subprocessor is provided with the host interface110which is generally not provided in a subprocessor of this type. Moreover, the program counter value indicating the storage destination of the subprocessor program and the processing start command of the subprocessor are written to the register unit130through the host interface110. Thus, after the host processor210issues a processing start command, the subprocessor100can independently load the subprocessor program250from the address (the program counter value) that is indicated by the program counter PC and execute targeting data processing. Moreover, the subprocessor100can independently read and write data from and to the address indicated by the address register that is designated by the command code.

As described above, the subprocessor100of the present embodiment can execute targeting data processing independently without the intervention of the host processor210. Thus, during the execution processing of the subprocessor100, the host processor210can perform processing that is not directly dependent on the processing. As a result, the data processing can be executed at a high speed. Moreover, when the processing of the host processor210becomes unnecessary during the execution of the subprocessor100, since the operation of the host processor210can be halted, it is possible to decrease the power consumption of the data processing device (integrated circuit device)200. That is, in the present embodiment, by providing the bus controller interface150to the subprocessor100, independent data processing by the subprocessor100, a reduction in power consumption, and the like are made possible.

3. Configuration Example of Command Code

FIG. 7shows an example of the command code of the subprocessor100of the present embodiment. The command code for operations such as, for example, addition, subtraction, or multiplication has a configuration shown inFIG. 7.

An operation code OPC indicates the type of operation, and an operand indicates an input and output method of data. Furthermore, as shown inFIG. 7, the operand is made up of fields XS, YS, and ZS for designating data input and output address registers and fields XDP, YDP, and ZDP for designating displacements for updating the address registers after accessing.

Specifically, the fields XS and YS designate the address registers A0to A3storing the addresses on the memory when the X-bus read unit170and the Y-bus read unit180read data from the memory230. The field ZS designates the address registers A0to A3storing the destination addresses on the memory to which the Z-bus write unit190writes the operation results. Moreover, the operand fields may designate immediate input data and designate the data registers D0and D1of the register unit130as well as inputting and outputting data to and from the memory230.

4. Configuration Example of Register

FIGS. 8(A) and 8(B)show an example of a bit configuration of the register of the subprocessor100of the present embodiment.FIG. 8(A)shows the configuration of the control register CTL, andFIG. 8(B)shows the configuration of the operation parameter register OPR.

As shown inFIG. 8(A), the control register CTL includes a Run bit and an IRQ bit (interrupt request bit). As described above, the execution of the subprocessor100starts when the host processor210writes “1” to the Run bit of the control register CTL through the host interface110. The value “1” is set to the Run bit during execution of processing. Moreover, when the subprocessor100fetches a processing end command, a value “1” is set to the IRQ bit (interrupt request bit). When the value “1” is set to the IRQ bit, a processing complete signal is output.

These operation parameters are written by the host processor210through the host interface110(in a broader sense, the bus controller interface150), for example. Alternatively, the operation parameters are written by an operation parameter setting command of the subprocessor program250. That is, the content of the operation parameter can be changed by the operation parameter setting command described in the subprocessor program250.

As described above, since the subprocessor100of the present embodiment is provided with the host interface110, it is possible, for example, to set an initial value or the like of the operation parameter through the host interface110. Moreover, the content of the operation parameter can be changed as needed by the operation parameter setting command described in the subprocessor program250. In this way, flexible option control by the operation parameter can be realized.

5. Modified Example of Data Processing Device

FIG. 9shows a modified example of the data processing device (integrated circuit device) of the present embodiment. A data processing device (integrated circuit device)200ofFIG. 9includes a clock generation circuit260in addition to the constituent elements shown inFIG. 1.

As described above, the subprocessor100of the present embodiment can execute targeting data processing independently without the intervention of the host processor210. Thus, the host processor210can halt its operation in a period when the subprocessor100is executing the data processing. Moreover, the host processor210may resume its operation after the subprocessor100completes the processing.

Specifically, after the host processor210issues a processing start command to the subprocessor100through the host interface110(in a broader sense, the bus controller interface150), the subprocessor100operates and executes data processing independently. Thus, during the data processing period of the subprocessor100, when the operation of the host processor210is not necessary, the host processor210issues a HALT command or the like to halt the supply of clocks from the clock generation circuit260, whereby the host processor210can halt its operation. By doing so, during the data processing period, since the host processor210is halted, and only the subprocessor100operates, it is possible to prevent a situation in which unnecessary power is consumed by the host processor210.

On the other hand, after completion of the data processing, since the host processor210is in the halted state, the host processor210is unable to receive a processing complete signal from the subprocessor100. Therefore, the subprocessor100outputs the processing complete signal to the clock generation circuit260rather than to the host processor210, and the clock generation circuit260having received this signal resumes the supply of clocks to the host processor210. By doing so, the host processor210in which the supply of clocks is resumed can restart its operation and execute operation processing or the like using the results of the data processing by the subprocessor100, for example.

By so doing, since the operation of the host processor210can be halted during the execution processing of the subprocessor100, it is possible to decrease the power consumption of the data processing device (integrated circuit device)200.

6. Electronic Apparatus

FIG. 10shows an example of an electronic apparatus including the data processing device (integrated circuit device) of the present embodiment. An electronic apparatus400ofFIG. 10includes a sensor310, a detection circuit320, an A/D converter330, and a processing unit340. The processing unit340is realized by the integrated circuit device200which is the data processing device of the present embodiment. The detection circuit320and the A/D converter330may be integrated into the integrated circuit device200to form one chip.

The electronic apparatus400is a pulse meter, a pedometer, a digital camera, or the like, for example. The sensor310is a gyro sensor, an acceleration sensor, a photo sensor, a pressure sensor, or the like, and a sensor corresponding to the purpose of the electronic apparatus400is used. The detection circuit320amplifies the output signal (sensor signal) from the sensor310and removes noise using a filter. The A/D converter330converts the amplified signal into a digital signal and outputs the digital signal to the processing unit340.

The processing unit340executes necessary digital signal processing on the digital signal from the A/D converter330. Moreover, gain control of the detection circuit320or the like may be performed. Here, the digital signal processing performed by the processing unit340may include Fourier transform or the like, for example.

Since the sensor signal from the sensor310generally is a very small amplitude signal, in order to extract a desired signal from the sensor signal, the detection circuit320needs to perform an operation of detecting the desired signal under a low-noise environment. Moreover, in order to extract the desired signal from a very small amplitude sensor signal, data processing with high processing load such as, for example, fast Fourier transform is required.

In this respect, in the present embodiment, data processing with high processing load for extracting a desired signal from a very small amplitude sensor signal can be executed by the subprocessor100having high operation processing capability at high speed. Moreover, in this case, as shown inFIG. 9, by putting the host processor210into a halted state, it is possible to prevent noise from the host processor210from having an adverse effect on the detection circuit320.

Moreover, it is necessary to suppress unnecessary power consumption in order for the electronic apparatus400such as a pulse meter or a pedometer to operate for a long period just with the power from a battery. In this respect, in the present embodiment, the host processor210can be put into a halted state during the operation of the subprocessor100, or conversely, the subprocessor100can be put into a halted state during the operation of the host processor210. Thus, it is possible to suppress unnecessary power consumption and to make for a long time the electronic apparatus400driven with batteries operate.

Although some embodiments of the invention have been described above in detail, those skilled in the art will readily understand that various modifications may be made without substantially departing from the new items and the effects of the invention. Therefore, such modifications are entirely included within the scope of the invention. For example, any term described at least once together with a broader or synonymous different term in the specification or the drawing may be replaced by the different term at any place in the specification or the drawings. Moreover, the configuration and operation of the subprocessor, the integrated circuit device, and the electronic apparatus are not limited to those described in the present embodiment, but may be modified in various ways.

REFERENCE SIGNS LIST