Method of scheduling system-on-chip including real-time shared interface

A method of scheduling a system-on-chip (SoC) by a scheduler, located between a plurality of masters and a slave, includes receiving a plurality of access requests from the plurality of masters, setting the plurality of access requests in a plurality of registers, and scheduling the plurality of access requests based on the plurality of access requests.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the benefit of Korean Patent Application No. 10-2015-0120438, filed on Aug. 26, 2015, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.

BACKGROUND

The disclosure relates to semiconductor devices, and more particularly, to a method of scheduling a system-on-chip (SoC) including a real-time shared interface.

Recently, as the number of times of driving multimedia and the amount of data to be processed by mobile devices have been increased, high-speed processors and high-capacity media have been widely employed. Also, various application programs may be driven by mobile devices.

In order to drive various application programs by a mobile device, semiconductor devices such as a power management integrated circuit (hereinafter referred to as the ‘PMIC’) and an application processor (hereinafter referred to as the ‘AP’) may be included in the mobile device.

A plurality of central processing units (CPUs) may be included in an AP. In this case, one slave, e.g., a PMIC, may be shared by the plurality of CPUs.

However, when a slave is controlled using one real-time shared interface, each master has a critical time boundary (hereinafter referred to as the ‘CTB’) and the CTB should be guaranteed to operate the system.

By guaranteeing the CTB, the system may be operated in real time.

When scheduling is performed using software according to the related art, the system requires many soft resources and the complexity of the system increases.

SUMMARY

According to an aspect of the disclosure, a scheduling method performed by a scheduler located between a plurality of masters and a slave includes: receiving a plurality of access requests from the plurality of masters; setting the plurality of access requests in a plurality of registers; and scheduling the plurality of access requests based on the plurality of access requests.

The scheduling of the plurality of access requests may include: setting a plurality of time limit values based on the plurality of access requests; determining whether a system satisfies preconditions for operations, based on the plurality of time limit values; when the system satisfies the preconditions for operations, selecting an access request corresponding to a minimum time limit value which is greater than ‘0’ among the plurality of time limit values; transmitting setting data included in the selected access request to an interface; and changing the plurality of time limit values.

The interface may be shared by the plurality of masters.

When the system does not satisfy the preconditions for operations, the method may further include transmitting a schedule uncontrollability message to the plurality of masters.

The setting of the plurality of time limit values may include calculating result values, by dividing a plurality of critical time boundaries of the plurality of respective access requests by a unit operation time, and setting integers which are not less than the result values to be the plurality of time limit values.

The determining of whether the system satisfies the preconditions for operations may include: converting time limit values, e.g., N, which are greater than ‘0’ among the plurality of time limit values into reciprocal numbers, e.g., 1/N, and adding the reciprocal numbers; and determining whether a result of adding the reciprocal numbers is equal to or less than ‘1’.

The selecting of the access request may include: comparing the plurality of time limit values with each other; when two or more access requests correspond to the minimum time limit value which is greater than ‘0’, setting priority values of the respective two or more access requests; and selecting an access request corresponding to a minimum priority value among the two or more access requests corresponding to the minimum time limit value which is greater than ‘0’.

When one access request corresponds to the minimum time limit value which is greater than ‘0’, the selecting of the access request may further include selecting the access request corresponding to the minimum time limit value which is greater than ‘0’.

The changing of the plurality of time limit values may include changing the time limit value of the selected access request to ‘0’ and decreasing the time limit values of the non-selected access requests among the plurality of access requests by ‘1’.

The interface may correspond to at least one protocol among an inter-integrated circuit interface (I2C interface), a universal asynchronous receiver/transmitter (UART), a serial peripheral interface (SPI), and a high-speed inter-chip (HSIC).

The number of the plurality of registers may correspond to the number of the plurality of masters.

The scheduling of the plurality of access requests may further include determining whether all of the plurality of time limit values are ‘0’. When all of the plurality of time limit values are not ‘0’, whether the system satisfies the preconditions for operations may be determined.

The selecting of the access request may include: comparing the plurality of time limit values with each other; and when two or more access requests correspond to the minimum time limit value which is greater than ‘0’, arbitrarily selecting one of the two or more access requests corresponding to the minimum time limit value which is greater than ‘0’.

According to another aspect of the disclosure, a method of scheduling a system-on-chip (SoC) including a plurality of masters, an interface, a slave, and a scheduler includes: the plurality of masters transmitting a plurality of access requests, which are to be transmitted to the slave, to the scheduler; the scheduler receiving the plurality of access requests from the plurality of masters; the scheduler setting the plurality of access requests in a plurality of registers; the scheduler scheduling the plurality of access requests based on the plurality of access requests; and one of the plurality of masters receiving an interrupt transmitted from the slave.

The scheduler may include a first register, a second register, a first down-counter, a second down-counter, a comparator, and a controller. The scheduling of the plurality of access requests may include: the controller setting a plurality of time limit values based on the plurality of access requests and respectively storing the plurality of time limit values in the first down-counter and the second down-counter; the controller determining whether a system satisfies preconditions for operations, based on the plurality of time limit values, when the system satisfies the preconditions for operations, the controller selecting an access request corresponding to a minimum time limit value which is greater than ‘0’ among the plurality of time limit values; the controller transmitting setting data included in the selected access request to the interface; the interface transmitting the setting data to the slave and transmitting an interrupt received from the slave to the scheduler; the controller transmitting the interrupt received from the interface to a master corresponding to the selected access request; the controller changing the plurality of time limit values; and the controller determining whether all of the plurality of time limit values are ‘0’.

When all of the plurality of time limit values are not ‘0’, the controller determines repeatedly whether the system satisfies the preconditions for operations.

The selecting of the access request may include: the controller transmitting a comparison signal to the first down-counter and the second down-counter; the first down-counter and the second down-counter transmitting the plurality of time limit values stored therein to the comparator; the comparator comparing the plurality of time limit values with each other and transmitting a minimum time limit value which is greater than ‘0’ to the controller; and the controller selecting the access request corresponding to the minimum time limit value which is greater than ‘0’.

The changing of the plurality of time limit values may include: the controller transmitting a reset signal to the first down-counter, which stores the time limit value of the selected access request, and a counting pulse to the second down-counter which does not store the time limit value of the selected access request; the first down-counter, which receives the reset signal, changing the time limit value stored therein to ‘0’; and the second down-counter, which receives the counting pulse, decreasing the time limit value stored therein by ‘1’.

According to another aspect of the disclosure, there is provided a method executed by a scheduling circuit. The method includes storing, in each of a plurality of registers of the scheduling circuit, a request to access a slave processor that is received from a master processor, among a plurality of master processors, corresponding to the register. A control circuit determines, for each of the access requests, a time limit for delaying execution of the access request based on information provided by the access request. A comparator circuit determines an access request among the stored access requests having the minimum of the determined time limits. The controller transmits the access request having the determined minimum time limit to the slave processor.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Hereinafter, exemplary embodiments of the disclosure will be described in greater detail with reference to the accompanying drawings.

FIG. 1is a block diagram of a system-on-chip (SoC) according to an embodiment of the disclosure.

The SoC100may include an inter-integrated circuit (I2C) as an interface for sharing one slave by a plurality of masters. In addition to the I2C, various inter-chip interfaces such as a universal asynchronous receiver/transmitter (UART), a serial peripheral interface (SPI), a high-speed inter-chip (HSIC), etc. may be employed.

Referring toFIG. 1, the SoC100may include a first master110, a second master120, a bus matrix130, a scheduler140, and an interface150.

The masters110and120may be a plurality of CPUs included in an application processor (AP). The masters110and120may transmit access requests to the scheduler140via the bus matrix130and receive an interrupt from the scheduler140via the bus matrix130.

The bus matrix130may be a system bus for providing a network to the SoC100but the disclosure is not limited thereto.

The scheduler140may transmit one of the plurality of access requests received via the bus matrix130to the slave160via the interface150, and transmit the interrupt received via the interface150to the masters110and120via the bus matrix130.

The scheduler140may satisfy critical time boundaries (CTBs) of the masters110and120so that the interface150may be shared in real time by the masters110and120.

The sharing of the interface150in real time by the masters110and120may be understood as guaranteeing operations of the masters110and120while satisfying the CTBs of the masters110and120.

The scheduler140may perform scheduling on a basis of an operation of the slave160(hereinafter referred to as a ‘unit operation’) according to an access request from one of the masters110and120.

An operation of the scheduler140will be described in detail with reference toFIG. 4, below.

The interface150may transmit the access requests received from the scheduler140to the slave160. Also, the interface150may transmit the interrupt received from the slave160to the scheduler140.

The interface150may be a real-time shared interface via which the masters110and120may share at least one slave160with each other.

For example, the interface150may be embodied as an I2C interface for interfacing between the SoC100and the slave160.

The I2C interface may be a bus interface which includes one serial data line (SDA) and one serial clock line (SCL) and via which bidirectional communication may be established.

Alternatively, the interface150may be the UART, the SPI, the HSIC, or the like but is not limited thereto.

The slave160may be a semiconductor device connected to the outside of the SoC100. Alternatively, the slave160may be an intellectual property (IP) provided inside the SoC100but is not limited thereto.

The slave160may perform a unit operation according to the access request received from the interface150and transmit an interrupt to the scheduler140via the interface150.

The slave160may communicate with the SoC100via the interface150included in the SoC100.

FIG. 2is a block diagram of the scheduler ofFIG. 1according to an embodiment of the disclosure.

Referring toFIG. 2, the scheduler140may include a first register141-1, a second register142-1, a first down-counter141-2, a second down-counter142-2, a comparator143, and a controller144.

The number of the registers141-1and142-1and the number of the down-counters141-2and142-2may correspond to the number of the masters110and120.

The registers141-1and142-1may be storage devices or buffers in which access requests received from the masters110and120are set.

For example, the access request received from the first master110may be set in the first register141-1and the access request received from the second master120may be set in the second register142-1.

Hereinafter, storing a received access request in a register will be referred to as ‘register setting’.

The access request may include a start bit, setting data, and a CTB. The register may store data corresponding to the start bit, the setting data, and the CTB.

The start bit is 1-bit information representing whether the access request is to be set in the register and may be, for example, ‘1’ or ‘0’. Thus, when the start bit is ‘1’, register setting may be performed.

The setting data may be data including the details of an operation of the slave160requested by one of the masters110and120. For example, when the slave160is a PMIC, the setting data may include information regarding the first or second master110or120which requests the operation, information regarding the supply of power requested, etc.

The CTB may be data representing a maximum standby time until the operation of the slave160, requested by one of the masters110and120, is performed. For example, when the first master110requests the PMIC to supply power and may stand by for 40 μs until power is supplied thereto, the CTB included in the access request transmitted from the first master110may include information representing 40 μs.

The disclosure is not, however, limited thereto and the CTB may be data stored beforehand in the register.

The controller144may receive CTBs from the registers141-1and142-1and set a plurality of time limit values.

The plurality of time limit values may respectively correspond to the CTBs of the masters110and120.

As described above, an operation of a slave according to an access request from one of the masters110and120may be referred to as a unit operation and a time period during which the unit operation is performed may be referred to as a unit operation time. For example, when a time required for the PMIC to perform the operation according to the access request is 20 μs, the unit operation time may be 20 μs.

The unit operation time may be a value which is set beforehand during designing of the system or a value which is set by the controller144but the disclosure is not limited thereto.

In order to set the plurality of time limit values, first, the controller144may divide the plurality of CTBs received from the registers141-1and142-1by the unit operation time. For example, when the CTB stored in the first register141-1is 40 μs and the CTB stored in the second register142-1is 110 μs, the CTBs are divided by the unit operation time of 20 μs to get result values ‘2’ and ‘5.5’.

Then, the controller144may set minimum integers which are not less than the result values ‘2’ and ‘5.5’ to be time limit values. For example, ‘2’ which is a minimum integer which is not less than ‘2’ and ‘6’ which is a minimum integer which is not less than ‘5.5’ are respectively set as the time limit values.

The controller144may determine whether the system satisfies preconditions for operations, based on the set time limit values. In this case, the preconditions for operations may be preconditions that prevent operation time periods of the masters110and120from overlapping when the masters110and120having periodic features communicate with the slave160a plurality of times in a predetermined cycle.

The controller144may add reciprocal numbers of time limit values which are greater than ‘0’ and compare a result of adding the reciprocal numbers with ‘1’ to determine whether the system satisfies the preconditions for operations.

The determining of whether the system satisfies the preconditions for operations by the controller144based on the plurality of time limit values will be described in detail with reference toFIG. 7below.

The controller144may transmit a schedule uncontrollability message (e.g., an error message) to the masters110and120when the system does not satisfy the preconditions for operations.

When the system satisfies the preconditions for operations, the controller144may transmit the plurality of time limit values to the down-counters141-2and142-2.

The controller144may receive a minimum time limit value which is greater than ‘0’ from the comparator143and select an access request corresponding to the minimum time limit value which is greater than ‘0’. For example, when the minimum time limit value received from the comparator143is ‘2’, an access request corresponding to the minimum time limit value which is ‘2’ may be selected.

When only one minimum time limit value is greater than ‘0’, the controller144may directly select an access request corresponding to the minimum time limit value which is greater than ‘0’.

When two or more minimum time limit values are greater than ‘0’, one of the two or more minimum time limit values may be selected by arbitrarily selecting one of the two or more minimum time limit values or by setting priority values of the two or more minimum time limit values.

The selecting of the access request corresponding to the minimum time limit value by the controller144will be described in detail with reference toFIG. 8, below.

The controller144may receive setting data from a register storing the access request selected by the controller144itself and transmit the setting data to the slave160via the interface150.

In addition, the controller144may output control signals to the down-counters141-2and142-2so as to change time limit values stored in the down-counters141-2and142-2.

The control signals may include a reset signal Rst, a counting pulse, and a comparison signal C_sig.

The controller144may output the reset signal Rst to a down-counter storing the time limit value corresponding to the selected access request. At the same time, the controller144may output the counting pulse to at least one down-counter to which the reset signal Rst is not output.

The first down-counter141-2and the second down-counter142-2may each be an n-bit counter. Here, ‘n’ denotes an integer which is greater than or equal to ‘1’. For example, the first down-counter141-2and the second down-counter142-2may each be a 3-bit counter.

The first down-counter141-2and the second down-counter142-2may store time limit values received from the controller144. For example, the first down-counter141-2may store a binary number ‘010’ when the first down-counter141-2receives a time limit value ‘2’, and the second down-counter142-2may store a binary number ‘110’ when the second down-counter142-2receives a time limit value ‘6’.

Each of the first down-counter141-2and the second down-counter142-2may perform down-counting by changing the time limit value stored therein such that a number corresponding to a bit stored therein is decreased by ‘1’ whenever the counting pulse is input thereto. For example, when a counting pulse is input to the first down-counter141-2storing ‘010’, the first down-counter141-2may down-count ‘010’ to ‘001’ representing ‘1’.

When receiving the reset signal Rst, each of the first down-counter141-2and second down-counter142-2may change the time limit value stored therein to a reset value. For example, when receiving the reset signal Rst, the first down-counter141-2may change the time limit value stored therein to a reset value ‘000’.

When receiving the comparison signal C_sig from the controller144, the first down-counter141-2and the second down-counter142-2may output the time limit values stored therein to the comparator143.

The comparator143may compare the time limit values, which are received from the first down-counter141-2and the second down-counter142-2and are greater than ‘0’, with each other and output a minimum time limit value which is greater than ‘0’ to the controller144.

FIG. 3Ais a timing diagram of a scheduling method according to a comparative example of the disclosure.FIG. 3Bis a timing diagram of a scheduling method according to an embodiment of the disclosure.

Referring toFIG. 3A, a method of scheduling a shared interface according to a comparative example may include an arbitration operation, a register setting operation, an operating operation, and instruction synchronization barrier (ISB) operation.

In the arbitration operation, for a relative short time period, a plurality of access requests are received from a plurality of masters and an access request, an operation of which is to be performed, is selected among the plurality of access requests. For example, an access request which is first received may be selected and an operation corresponding thereto may be performed.

In the register setting operation, data included in the access request selected in the arbitration operation is stored in a register.

In the operating operation, a slave performs the operation according to the selected access request. For example, the slave may complete the operation and transmit an interrupt to the master via an interface.

In the ISB operation, the data stored in the register is removed and a preparation for storing data according to a subsequent access request is made after the slave completes the operation.

Referring toFIG. 3A, while a unit operation is performed according to an access request from a first master, a unit operation according to an access request from a second master may stand by.

According to the comparative example ofFIG. 3A, since an access request is set in one register, a process of storing data in the register and deleting the data from the register is repeatedly performed and thus a standby time increases.

When a standby time of a second master increases, CTBs of the plurality of masters are difficult to satisfy, thus making it difficult to realize a real-time shared interface.

Referring toFIG. 3B, a method of scheduling a real-time shared interface according to an embodiment of the disclosure may include a register setting operation, an operating operation, and an ISB operation.

The number of registers in which access requests are set may correspond to the number of a plurality of masters. For example, the registers may respectively correspond to the plurality of masters. Thus, since the plurality of registers are set simultaneously or in parallel, the standby time of the second master decreases.

When the standby time of the second master decreases, the CTBs of the plurality of masters are easy to satisfy. In addition, the access requests which are set in the plurality of registers may be sequentially scheduled based on time limit values and thus the CTBs of the plurality of masters may be satisfied. Accordingly, a real-time shared interface may be realized.

FIG. 4is a flowchart of a method of operating the master110or120included in the SoC100having a scheduling function according to an embodiment of the disclosure.

Referring toFIGS. 1 and 4, the masters110and120may transmit access requests for accessing the slave160to the scheduler140.

Here, for convenience of explanation, an operation of the first master110will be described below. The second master120may be operated similar to the first mater100.

In operation S110, the first master110may transmit an access request for accessing the slave160to the scheduler140via the bus matrix130.

In operation S120, the first master110checks whether the first master110receives an interrupt from the slave160via the scheduler140.

When a unit operation according to the access request from the first master110is completed, the slave160may transmit an interrupt to the first master110.

In this case, the first master110may monitor and detect the interrupt transmitted thereto.

In operation S130, the first master110may determine whether the interrupt from the slave160is received.

When the first master110does not receive the interrupt from the slave160(NO of operation S130), the method returns to operation S120.

When the first master110receives the interrupt from the slave160(YES of operation S130), the method may proceed to operation S140.

In operation S140, the first master110may determine whether an additional access request is received.

When an additional access request is received, the method may return to operation S110.

When an additional access request is not received, the method may be ended.

As described above, the masters110and120may simply transmit access requests to the scheduler140without considering scheduling.

Thus, scheduling of the masters110and120which share the interface150need not be considered at a software level.

FIG. 5is a flowchart of a method of operating the scheduler140ofFIG. 1according to an embodiment of the disclosure.

Hereinafter, it is assumed that the number of the masters110and120is two as illustrated inFIG. 1but embodiments of the disclosure are not limited thereto.

Referring toFIGS. 1, 2 and 5, in operation5210, the scheduler140may receive a plurality of access requests from the masters110and120.

In operation S220, the plurality of access requests received by the scheduler140may be respectively set in the registers141and142.

In operation S230, time limit values of the masters110and120may be set based on CTBs stored in the registers141and142.

Also, the time limit values which are set as described above may be stored in the down-counters141-2and141-2.

The time limit values may be allowable maximum standby times until operations requested by the masters110and120are performed when a real-time interface shared by the masters110and120is operated, i.e., values corresponding to the CTBs.

The CTBs may be determined during designing of the masters110and120according to characteristics of the masters110and120.

When the CTBs of the masters110and120are divided by a unit operation time, time limit values which are greater than ‘0’ may be set.

In operation S240, whether the system satisfies preconditions for operations may be determined based on the set time limit values.

When it is determined in operation S250that the system does not satisfy the preconditions for operations, the method proceeds to operation S255, in which the controller144may transmit a schedule uncontrollability message (e.g., an error message) to the masters110and120.

When it is determined in operation S250that the system satisfies the preconditions for operations, the method proceeds to operation S260.

In operation S260, the controller144included in the scheduler140may select an access request corresponding to a minimum time limit value which is greater than ‘0’.

When one minimum time limit value is greater than ‘0’, an access request corresponding to the minimum time limit value which is greater than ‘0’ may be directly selected.

However, when two or more minimum time limit values are greater than ‘0’, one of the two or more minimum time limit values may be selected by arbitrarily selecting one of the two or more minimum time limit values or by setting priority values of the two or more minimum time limit values.

In operation S270, the controller144included in the scheduler140may transmit setting data to the interface150from a register in which the selected access request is set.

In operation S280, the time limit values may be changed. As described above, the time limit values stored in the down-counters141-2and142-2may be changed according to control signals (e.g., a reset signal Rst, a counting pulse, etc.) output from the controller144.

For example, when the access request which is set in the first register141is selected, the controller144included in the scheduler140may output the reset signal Rst to the first down-counter141-2. Thus, the time limit value stored in the first down-counter141-2is changed to ‘0’.

Also, the controller144may output the counting pulse to the second down-counter142-2so as to decrease the time limit values of the non-selected access requests (e.g., the access request which is set in the second register142) by ‘1’. Thus, the time limit value stored in the second down-counter142-2is decreased by ‘1’.

In operation S290, the controller144included in the scheduler140may determine whether all of the changed time limit values are ‘0’.

When all of the changed time limit values are ‘0’, i.e., when all of unit operations according to the access requests from the masters110and120are completed, the method is ended.

When all of the changed time limit values are not ‘0’, i.e., when there are additional unit operations to be performed, the method returns to operation S240. In this case, operations S240to S290may be repeatedly performed until all of the unit operations according to the access requests from the masters110and120are completed.

FIG. 6is a detailed flowchart of a method of setting time limit values by the scheduler140according to an embodiment of the disclosure.

An operation of a slave according to an access request from one of the masters110and120may be referred to as a unit operation and a time required to perform the unit operation may be referred to as a unit operation time. For example, when a time required to perform an operation of a PMIC according to an access request is 20 μs, a unit operation time may be 20 μs.

The unit operation time may be a value which is set beforehand during designing of the system or a value which is set by the controller144but the disclosure is not limited thereto.

Referring toFIG. 6, in operation S310, in order to set a plurality of time limit values, first, the controller144included in the scheduler140may divide a plurality of CTBs received from the registers141-1and142-1by the unit operation time. For example, when the CTB stored in the first register141-1is 40 μs and the CTB stored in the second register142-1is 110 μs, the CTBs are divided by the unit operation time of 20 μs to respectively get result values ‘2’ and ‘5.5’.

In operation S320, the controller144may set minimum integers which are not less than the result values ‘2’ and ‘5.5’ to be time limit values. For example, ‘2’ which is a minimum integer which is not less than ‘2’ and ‘6’ which is not less than ‘5.5’ may be set to be time limit values.

FIG. 7is a detailed flowchart of a method of determining whether the system satisfies preconditions for operations by the scheduler according to an embodiment of the disclosure.

The controller144included in the scheduler140may determine whether the system satisfies the preconditions for operations.

Referring toFIG. 7, in operation S410, the controller144may convert time limit values, which are greater than ‘0’ and stored in the down-counters141-2and142-2, into reciprocal numbers and add the reciprocal numbers. For example, when a time limit value of an access request which is set in the first down-counter141-2is ‘3’ and a time limit value of an access request which is set in the second down-counter142-2is ‘5’, the controller144may convert the time limit values ‘3’ and ‘5’ into ‘⅓’ an ‘⅕’ which are reciprocal numbers thereof and add ‘⅓’ and ‘⅕’. That is, ⅓+⅕= 8/15=0.5333 . . . .

In operation S420, the controller144may determine whether a result of adding the reciprocal numbers is equal to or less than ‘1’. For example, the scheduler140may determine the result of adding the reciprocal numbers to be equal to or less than ‘1’ when the result of adding the reciprocal numbers is 0.5333 . . . , and determine the result of adding the reciprocal numbers to be greater than ‘1’ when the result of adding the reciprocal numbers is 1.3333 . . . .

FIG. 8is a detailed flowchart of a method of selecting an access request by the scheduler according to an embodiment of the disclosure.

Referring toFIG. 8, in operation S510, the comparator143included in the scheduler140may compare time limit values received from the down-counters141-2and142-2with each other, and transmit a minimum time limit value which is greater than ‘0’ to the controller144.

In operation S520, the controller144included in the scheduler140may determine whether two or more access requests correspond to the minimum time limit value which is greater than ‘0’.

If two or more access requests correspond to the minimum time limit value which is greater than ‘0’, the method proceeds to operation S530.

In operation S530, the controller144may set priority values of the two or more access requests. The priority values may be stored in the registers141-1and142-1or an additional register (not shown). The priority values may be values which are set beforehand but the disclosure is not limited thereto.

In operation S540, the controller144may select an access request corresponding to a minimum priority value among the two or more access requests corresponding to the minimum time limit value which is greater than ‘0’.

When one access request corresponds to the minimum time limit value which is greater than ‘0’, the method proceeds to operation S550.

In operation S550, the controller144may select the access request corresponding to the minimum time limit value which is greater than ‘0’.

For example, when a time limit value of an access request from the first master110is ‘3’ and a time limit value of an access request from the second master120is ‘3’, the controller144may set ‘0’ as a priority value of the access request stored in the first register141-1and ‘1’ as a priority value for the access request stored in the second register142-1, and select the access request corresponding to the minimum priority value ‘0’ and stored in the first register141-1.

When the time limit value of the access request from the first master110is ‘2’ and the time limit value of the access request from the second master120is ‘3’, the controller144may set select the access request corresponding to the minimum time limit value ‘2’ stored in the first register141-1.

The selecting of the access request by the scheduler140according to an embodiment of the disclosure is not, however, limited to the above description and may be embodied in many different forms. For example, the controller144may arbitrarily select one of access requests corresponding to one or more minimum time limit values which are not ‘0’.

FIG. 9is a detailed flowchart of a method of changing time limit values by the scheduler according to an embodiment of the disclosure.

In detail, the controller144included in the scheduler140may transmit control signals (e.g., a reset signal Rst and a counting pulse) to the down-counters141-2and142-2so as to change time limit values.

The time limit values stored in the down-counters141-2and142-2may be changed according to the control signals (e.g., the reset signal Rst and the counting pulse) output from the controller144.

Referring toFIG. 9, in operation S610, the controller144included in the scheduler140may output the reset signal Rst to a down-counter storing a time limit value of a selected access request. Thus, the time limit value stored in the down-counter which receives the reset signal Rst may be changed to ‘0’. For example, when an access request which is set in the first register141is selected, the controller144included in the scheduler140may output the reset signal Rst to the first down-counter141-2and the time limit value stored in the first down-counter141-2may be changed to ‘0’.

In operation S620, the controller144may output the counting pulse to the second down-counter142-2so as to decrease time limit values stored in non-selected access requests (e.g., an access request which is set in the second register142) by ‘1’. Thus, a time limit value stored in a down-counter which receives the counting pulse may be decreased by ‘1’. For example, when the access request which is set in the first register141is selected, the controller144included in the scheduler140may output the counting pulse to the second down-counter142-2and thus the time limit value stored in the second down-counter142-2may be decreased by ‘1’.

According to an embodiment of the disclosure, although in the flowchart ofFIG. 9, operations S610and S620are sequentially illustrated, the disclosure is not limited thereto and the scheduler140may perform operation S620earlier than operation S610, simultaneously perform operations S610and S620, or perform only one of operations S610and S620.

FIG. 10is a flowchart of a scheduling method according to an embodiment of the disclosure.

Here, for convenience of explanation, an operation of the first master110will be described. The second master120may be operated similar to the first master110.

Referring toFIG. 10, interactions among a first master110, a scheduler140, an interface (I/F)150, and a slave160are sequentially illustrated. The first master110may transmit an access request to the scheduler140via a bus matrix (not shown) so as to instruct the slave160to perform a particular operation (S110).

The access request transmitted to the scheduler140may be stored in a register (register setting) (S220).

The scheduler140may set time limit values based on CTBs stored in registers (S230).

The scheduler140may determine whether the system satisfies preconditions for operations, based on the set time limit values (S240).

When the system does not satisfy the preconditions for operations, a schedule uncontrollability message may be transmitted to the first master110(S255). AlthoughFIG. 10illustrates that the schedule uncontrollability message is transmitted only to the first master110, the schedule uncontrollability message may be transmitted to a plurality of masters (not shown), e.g., the second master120.

When the system satisfies the preconditions for operations, the scheduler140may select an access request having a minimum time limit value which is greater than ‘0’ (S260).

The scheduler140may transmit setting data of the selected access request from the register to the interface150(S270).

The interface150may transmit the setting data to the slave160and receive an interrupt from the slave160(S130).

The interface150may transmit the interrupt to the first master110via the scheduler140.

The scheduler140may change the time limit values (S280).

The scheduler140determines whether all of the time limit values are ‘0’ (S290), and determine again whether the system satisfies the preconditions for operations when all of the time limit values are not ‘0’. This process may be repeatedly performed until all of the access requests are completed.

FIG. 11is a block diagram of an SoC400according to another embodiment of the disclosureFIG. 11.

Referring toFIG. 11, the SoC400according to an embodiment of the disclosure may include a plurality of processors410,415, and420serving as a plurality of masters, a bus matrix430, a scheduler440configured to schedule access requests from the plurality of processors410,415, and420, an interface450, and a slave460of the plurality of processors410,415, and420serving as masters.

The plurality of processors410,415, and420may transmit access requests for accessing the slave460to the scheduler440via the bus matrix430without considering scheduling.

The scheduler440may include registers441,442, and443in which the access requests from the plurality of processors410,415, and420are respectively stored.

Although not shown, the scheduler440may include a controller, a plurality of down-counters and a comparator, as illustrated inFIG. 2.

The plurality of registers441,442, and443transmit the access requests from the plurality of processors410,420, and430corresponding thereto to the interface450, under control of the scheduler440.

The interface450may be a path via which the plurality of access requests are transmitted to the slave460.

The scheduler440may perform scheduling on a basis of operations, i.e., unit operations, of the slave460according to the access requests from the plurality of processors410,415, and420.

FIGS. 12A and 12Bare diagrams illustrating a process of operating a plurality of masters according to a scheduling method according to an embodiment of the disclosure.

Here, the process ofFIGS. 12A and 12Bwill be described in detail on an assumption that the SoC400ofFIG. 11includes five masters 0 to 4.

FIGS. 12A and 12Billustrate a process of scheduling unit operations of the five masters 0 to 4 when the five masters 0 to 4 share one real-time interface.

First, when the five masters 0 to 4 transmit access requests to the scheduler440, the scheduler440respectively stores the access requests in five registers corresponding to the five masters 0 to 4 (register setting), and set time limit values based on CTBs included in the respective access requests.

The set time limit values may be stored in five down-counters corresponding to the five masters 0 to 4.

In a table illustrated inFIG. 12A, a first column represents a master which is currently operating, and a second column represents a sequence of operations of the five masters 0 to 4. Third to seventh columns represent a process of changing the time limit values stored in the five down-counters corresponding to the five masters 0 to 4 according to the sequence of the operations of the five masters 0 to 4.

Referring toFIG. 12A, according to an embodiment of the disclosure, in the first operation 0, no access request is received and thus the time limit values stored in the five down-counters may be ‘0’.

In the second operation 1, the time limit values of the masters 0 to 4 may be set to be ‘10’, ‘20’, ‘3’, ‘3’, and ‘6’, respectively.

First, the scheduler440may determine whether the system satisfies preconditions for operations, based on the set time limit values. Referring toFIG. 12A, the sum of reciprocal numbers of the time limit values are calculated to be 1/10+ 1/20+⅓+⅓+⅙=0.984. Since the sum of the reciprocal numbers of the time limit values is less than ‘1’, the scheduler140may determine that the system satisfies the preconditions for operations.

The scheduler440may select an access request corresponding to a minimum time limit value. As illustrated inFIG. 12A, since minimum time limit values which are greater than ‘0’ are ‘3’ and the number of 3 s is two, the scheduler440may set priority values thereof.

As illustrated inFIG. 12B, according to an embodiment of the disclosure, priority values of the masters 0 to 4 may be respectively set to be ‘4’, ‘2’, ‘0’, ‘1’, and ‘3’.

The scheduler440may select an access request of the master2having the lowest priority value among access requests corresponding to the minimum time limit value which is greater than ‘0’.

Thus, setting data included in the access request from the master2may be transmitted to the slave460via the interface450. That is, in the first operation, a unit operation of the slave460according to the access request from the master2may be performed.

The scheduler440may change all of the time limit values. The scheduler440may set a time limit value of a selected access request to be ‘0’ and decrease time limit values of non-selected access requests by ‘1’. Referring toFIG. 12A, the time limit value of the master2corresponding to the selected access request may be changed to ‘0’, and the time limit values of the other masters 0, 1, 3, and 4 may be respectively changed to ‘9’, ‘19’, ‘2’, and ‘5’.

The scheduler440may determine whether all of the time limit values are ‘0’. As illustrated inFIG. 12A, since the time limit values of the access requests of the remaining masters except for the master2are not ‘0’, the scheduler440may determine whether the system satisfies the preconditions for operations, based on the time limit values ‘9’, ‘19’, ‘2’, and ‘5’.

Thereafter, unit operations according to access requests from a plurality of masters may be performed by repeatedly performing the process described above.

According to embodiments of the disclosure, when two or more independent masters are operated according to a real-time shared interface, CTBs of the two or more independent masters are satisfied to efficiently operate the system.

While the disclosure has been particularly shown and described with reference to the exemplary embodiments illustrated in the drawings, these exemplary embodiments are merely examples. It would be obvious to those of ordinary skill in the art that these exemplary embodiments are to cover all modifications, equivalents, and alternatives falling within the scope of the disclosure. Accordingly, the technical scope of the disclosure should be defined based on the technical idea of the appended claims.