Nothing Special   »   [go: up one dir, main page]

WO2014147769A1 - Control apparatus, device access method, device access program, and information processing apparatus - Google Patents

Control apparatus, device access method, device access program, and information processing apparatus Download PDF

Info

Publication number
WO2014147769A1
WO2014147769A1 PCT/JP2013/057911 JP2013057911W WO2014147769A1 WO 2014147769 A1 WO2014147769 A1 WO 2014147769A1 JP 2013057911 W JP2013057911 W JP 2013057911W WO 2014147769 A1 WO2014147769 A1 WO 2014147769A1
Authority
WO
WIPO (PCT)
Prior art keywords
access
learning
access order
multiplexer
library
Prior art date
Application number
PCT/JP2013/057911
Other languages
French (fr)
Japanese (ja)
Inventor
智里 福井
修司 小川
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to PCT/JP2013/057911 priority Critical patent/WO2014147769A1/en
Publication of WO2014147769A1 publication Critical patent/WO2014147769A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Definitions

  • the present invention relates to a control apparatus, a device access method, a device access program, and an information processing apparatus.
  • an I2C bus has been used as a method of connecting an MPU (Micro-Processing Unit) and a device.
  • MPU Micro-Processing Unit
  • I2C bus there are a case where an I2C controller on the MPU side and a device are directly connected by a bus, and a case where an I2C multiplexer is sandwiched in the middle of the bus.
  • the I2C library used to access the I2C device switches the I2C multiplexer bus before accessing the I2C device.
  • the stop condition is data transmitted after the last data is transmitted when the controller transmits a plurality of data to the device.
  • an application that accesses an I2C device is unaware of whether or not an I2C multiplexer is included in the middle of a bus path when continuously accessing a plurality of I2C devices by monitoring or reset processing. For this reason, depending on the access order of applications, there is a problem that the number of bus switching times of the I2C multiplexer increases and the access time to the I2C device increases.
  • the disclosed technique has been made in view of the above, and an object thereof is to provide a control device, a device access method, a device access program, and an information processing device that prevent an increase in access time due to bus switching of an I2C multiplexer.
  • control device disclosed in the present application includes an access order storage unit that stores an access order determined based on the number of switching of multiplexers when accessing a plurality of devices via a multiplexer. Further, the control device disclosed in the present application includes an execution unit that executes access to the plurality of devices in accordance with the access order stored in the access order storage unit.
  • control device the device access method, the device access program, and the information processing device disclosed in the present application, it is possible to prevent an increase in access time due to I2C multiplexer bus switching.
  • FIG. 1 is a diagram illustrating the information processing apparatus according to the embodiment.
  • FIG. 2 is a functional block diagram illustrating the configuration of the I2C library according to the embodiment.
  • FIG. 3 is a diagram illustrating an example of the data structure of the learning table.
  • FIG. 4 is a diagram illustrating an example of the data structure of the decision table.
  • FIG. 5 is a diagram for explaining the operation of the I2C library during the learning and speculative execution period.
  • FIG. 6 is a diagram illustrating a connection example of the I2C device.
  • FIG. 7 is a diagram showing the difference in the number of switching times of the I2C multiplexer between the conventional device access in which learning is not performed for the connection example in FIG. 6 and the device access in the present embodiment in which learning is performed.
  • FIG. 1 is a diagram illustrating the information processing apparatus according to the embodiment.
  • FIG. 2 is a functional block diagram illustrating the configuration of the I2C library according to the embodiment.
  • FIG. 3 is a diagram
  • FIG. 8 is a diagram for explaining the details of the access order learning process by the learning mechanism for the connection example of FIG.
  • FIG. 9 is a diagram for explaining the details of the speculative execution process by the learning mechanism for the connection example of FIG.
  • FIG. 10 is a flowchart showing the processing procedure of the I2C library.
  • FIG. 11 is a flowchart showing the processing procedure of the function processing of the I2C library.
  • FIG. 12A is a flowchart illustrating a processing procedure of learning and speculative execution by the learning mechanism.
  • FIG. 12B is a flowchart illustrating a processing procedure of learning and speculative execution by the learning mechanism.
  • FIG. 13 is a flowchart showing the procedure of the confirmation process.
  • FIG. 14 is a diagram illustrating a configuration of a 5V power sensor and a 10V power sensor under the I2C multiplexer.
  • FIG. 15 is a diagram showing a learning table before and after optimization.
  • FIG. 16 is a diagram showing a determination table after learning.
  • FIG. 17A is a sequence diagram illustrating the operation of the firmware during learning.
  • FIG. 17B is a sequence diagram illustrating the operation of the firmware during speculative execution.
  • FIG. 1 is a diagram illustrating the information processing apparatus according to the embodiment. As shown in FIG. 1, the information processing apparatus 1 includes a control board 100 and target boards 200 to 400.
  • the target boards 200 to 400 are server boards and the like, and are equipped with a CPU and a memory.
  • the control board 100 monitors and controls the target boards 200 to 400. Although three target boards are shown here for convenience of explanation, the information processing apparatus 1 may include an arbitrary number of target boards.
  • the control board 100 includes an MPU 101, a memory 102, a control FPGA 103, an IC2 multiplexer 104, six I2C devices 105, and three I2C buses 106.
  • the control board 100 may include any number of I2C devices and any number of I2C buses.
  • the MPU 101 is an arithmetic processing device that executes a program stored in the memory 102, and includes two I2C controllers 110.
  • the I2C controller accesses the I2C device 105 by controlling the I2C bus 106.
  • the memory 102 stores firmware 120 that is a program executed by the MPU 101 and data used by the MPU 101 for calculation.
  • the firmware 120 includes an application 130, an I2C library 140, and a driver 150.
  • the application 130 calls a READ / WRITE function together with data such as a device address to the I2C library 140.
  • the I2C library 140 activates the driver 150 based on the data received by the function call from the application 130 and accesses the I2C devices 105 and 205.
  • the driver 150 drives the hardware to control access to the I2C devices 105 and 205.
  • the I2C library 140 activates different drivers 150 for different types of I2C devices.
  • the I2C library 140 accesses the I2C device 105 after switching the bus of the I2C multiplexer 104.
  • the I2C library 140 accesses the I2C device 205 mounted on the target boards 200 to 400 via the control FPGA 103 using an FPGA driver. That is, the I2C library 140 absorbs the difference in the instruction procedure for each I2C device 105 and 205 by using the driver 150 and the procedure according to the type and connection of the I2C devices 105 and 205 to be accessed.
  • the control FPGA 103 performs direct memory access (DMA) control on the control FPGA 203 mounted on the target boards 200 to 400 to control access to the I2C device 205 on the target boards 200 to 400.
  • DMA direct memory access
  • the IC2 multiplexer 104 is connected to the two I2C buses 106, and enables switching to the I2C devices 105 connected to the I2C buses 106 by switching the internal buses.
  • the I2C device 105 is a device connected to the MPU 101 via the I2C bus 106.
  • Examples of the I2C device 105 include a power supply sensor and an EPROM (Erasable Programmable Read Only Memory).
  • the I2C bus 106 is a bus that connects the MPU 101 and the I2C device 105.
  • the target board 200 includes a control FPGA 203, four I2C devices 205, and two I2C buses 206.
  • the control FPGA 203 has two I2C controllers 210 and drives the I2C controller 210 under the DMA control of the control FPGA 103 to control the I2C device 205.
  • the I2C device 205 is a device connected to the MPU 101 via the I2C bus 206 and the control FPGAs 203 and 103. Examples of the I2C device 205 include a power supply sensor and an EPROM.
  • the I2C bus 206 is a bus that connects the control FPGA 203 and the I2C device 205.
  • FIG. 2 is a functional block diagram illustrating the configuration of the I2C library 140 according to the embodiment.
  • an I2C driver 151 is a driver used when accessing the I2C device 105
  • an FPGA driver 152 is a driver used when accessing the I2C device 205 via the control FPGA 203.
  • the I2C library 140 includes a learning table 141, a determination table 142, a learning mechanism 143, and a command issuing unit 144.
  • the learning table 141 stores the access order learned by the learning mechanism 143 for the I2C devices 105 and 205.
  • FIG. 3 is a diagram illustrating an example of the data structure of the learning table 141. As shown in FIG. 3, the learning table 141 stores an access number, an I2C library device address, a header, and prefetch information in association with each other.
  • the access number is information indicating the number of device access after the start of learning
  • the I2C library device address is a device address passed from the application 130 to the I2C library 140.
  • the format of the I2C library device address is 0xAABCCDDD.
  • 0x indicates a hexadecimal number
  • AA is an I2C controller number
  • BB is an I2C multiplexer address
  • CC is a multiplexer port number
  • DD is an I2C device address. Therefore, it is determined whether or not switching of the I2C multiplexer 104 is necessary in the upper 3 bytes of the I2C library device address.
  • the header is offset information of the I2C devices 105 and 205.
  • the I2C devices 105 and 205 are EPROMs
  • the EPROM is specified by the device address
  • each byte in the EPROM is specified by the offset.
  • the prefetch information is data read when the learning mechanism 143 executes speculation based on the learning content.
  • speculative execution means that the learning mechanism 143 accesses the device in the access order stored in the learning table 141 when an access request having an access number of 1 is received from the application 130. Details of speculative execution will be described later.
  • the determination table 142 stores information used for determining whether to access the I2C devices 105 and 205 using the access order learned by the learning mechanism 143.
  • FIG. 4 is a diagram illustrating an example of the data structure of the determination table 142. As illustrated in FIG. 4, the determination table 142 stores an I2C library device address, a header, a counter, and a pointer in association with each other.
  • the pointer is a pointer to the learning table 141, and the I2C library device address is the same information as the I2C library device address whose access number of the learning table 141 designated by the pointer is 1.
  • the header is the same information as the header whose access number is 1 in the learning table 141 specified by the pointer.
  • the counter is information used for evaluating the weight of the learning table 141 designated by the pointer.
  • the weight of the learning table 141 being large indicates that there is a high possibility that the I2C devices 105 and 205 are accessed in the access order recorded in the learning table 141.
  • the learning mechanism 143 determines that the I2C devices 105 and 205 are likely to be accessed in the access order recorded in the learning table 141, and overwrites the learning table 141. Not performed. On the other hand, if the value of the counter is smaller than the threshold value, the learning mechanism 143 is not learning, or is unlikely to be accessed by the I2C devices 105 and 205 in the access order recorded in the learning table 141. And the learning contents are overwritten in a new order.
  • the counter is “0” when the decision table 142 is in the initial state, and is initialized with a threshold when the association with the learning table 141 is performed.
  • the counter is counted up when the speculative execution is successful, and is counted down when the speculative execution fails.
  • the decision table 142 is accessed using the lower 4 bits of the I2C library device address as an index. Therefore, the number of entries in the decision table 142 is 16. Note that the number of bits used as an index may be other than 4, and the number of entries in the determination table 142 varies depending on the number of bits.
  • the learning mechanism 143 determines whether to access the I2C devices 105 and 205 in the order stored in the learning table 141. When the learning mechanism 143 accesses in the order stored in the learning table 141, the learning mechanism 143 accesses the I2C devices 105 and 205. Execute speculation.
  • the learning mechanism 143 determines whether to learn the access order to the I2C devices 105 and 205, and if so, learns the learning result. Record in Table 141. When learning is completed, the learning mechanism 143 optimizes the access order recorded in the learning table 141 so that the number of times of switching of the I2C multiplexer 104 is minimized. Details of learning by the learning mechanism 143 will be described later.
  • the application 130 accesses the I2C devices 105 and 205 in order by monitoring the control board 100 and the target boards 200 to 400. Therefore, the application 130 can efficiently access the I2C devices 105 and 205 by optimizing the access order recorded in the learning table 141 by the learning mechanism 143 so that the switching frequency of the I2C multiplexer 104 is minimized. .
  • the learning mechanism 143 accesses the I2C devices 105 and 205 as in the conventional case. Note that the period during which the learning mechanism 143 performs learning and speculative execution is specified by the application 130.
  • the command issuing unit 144 issues a command corresponding to the function call from the application 130 to the I2C devices 105 and 205.
  • FIG. 5 is a diagram for explaining the operation of the I2C library 140 during the learning and speculative execution period.
  • dotted arrows indicate processing without learning
  • dashed arrows indicate access order learning processing
  • solid arrows indicate speculative execution processing.
  • the application 130 controls the I2C library 140 including whether or not the I2C library 140 performs learning and speculative execution.
  • the learning mechanism 143 When receiving an access request to the device from the application 130, the learning mechanism 143 refers to the determination table 142 and determines whether or not speculative execution is possible. As a result, when speculative execution is not possible, the learning mechanism 143 refers to the determination table 142 and determines whether to newly learn the access order to the I2C devices 105 and 205. As a result, when learning is not performed, the learning mechanism 143 causes the command issuing unit 144 to issue a command so as to access the I2C devices 105 and 205 as in the prior art (1).
  • the learning mechanism 143 causes the command issuing unit 144 to issue a command and performs a learning process (2).
  • the learning mechanism 143 registers (3) the decision table 142 and associates the decision table 142 with the learning table 141 (4).
  • the learning mechanism 143 records the access order to the learning table 141 for the access to the I2C devices 105 and 205 (5). Then, the learning mechanism 143 optimizes the access order after learning so that the number of times of switching of the I2C multiplexer 104 is minimized.
  • the learning mechanism 143 performs speculative execution (6). That is, the learning mechanism 143 refers to the decision table 142 (7) and acquires a pointer to the learning table 141. Then, the learning mechanism 143 causes the command issuing unit 144 to issue access requests to the I2C devices 105 and 205 in the order stored in the learning table 141 (8).
  • FIG. 6 is a diagram illustrating a connection example of the I2C device.
  • devices A to T are I2C devices
  • MUX 1 and MUX 2 are I2C multiplexers.
  • Device A to Device D are connected to MUX 1 at port 1
  • Device E to Device H are connected to MUX 1 at port 2
  • Device I is connected to MUX 1 at port 3
  • Device J is connected to MUX 1 at port 4 Connected with.
  • MUX 1 is connected to the I2C controller 1 .
  • the I2C device addresses of the devices A to D are “0xA0” to “0xA3”, and the I2C device addresses of the devices E to H are “0xA0” to “0xA3”.
  • the I2C device address of device I is “0xAC”, and the I2C device address of device J is “0x30”.
  • the multiplexer port number of port 1 is “0x01”, and the multiplexer port number of port 2 is “0x02”.
  • the multiplexer port number of port 3 is “0x04”, and the multiplexer port number of port 4 is “0x08”.
  • the multiplexer address of MUX 1 is “0xE0”, and the I2C controller number of I2C controller 1 is “0x01”.
  • device K to device N are connected to MUX 2 at port 1
  • device O to device R are connected to MUX 2 at port 2
  • device S is connected to MUX 2 at port 3
  • device T is connected to MUX 2 Connected to port 4 .
  • the MUX 2 is connected to the I2C controller 2 .
  • the I2C device addresses of the devices K to N are “0xA4”, “0x42”, “0xC4”, and “0x5C”, respectively, and the I2C device addresses of the devices O to R are “0xA4”, “0x42”, and “0xC4”, respectively. ",” 0x5C “.
  • the I2C device address of the device S is “0x5A”, and the I2C device address of the device T is “0x5A”.
  • the multiplexer port number of port 1 is “0x01”, and the multiplexer port number of port 2 is “0x02”.
  • the multiplexer port number of port 3 is “0x04”, and the multiplexer port number of port 4 is “0x08”.
  • the multiplexer address of MUX 2 is “0xE0”, and the I2C controller number of I2C controller 2 is “0x02”.
  • FIG. 7 is a diagram showing a difference in the number of switching times of the I2C multiplexer between the conventional device access in which learning is not performed with respect to the connection example in FIG. 6 and the device access in this embodiment in which learning is performed.
  • the connection example of FIG. 6 when access is performed in the order of devices A ⁇ E ⁇ J ⁇ B ⁇ F ⁇ I ⁇ C ⁇ G ⁇ D ⁇ H, switching of the I2C multiplexer to access all devices The number of times is the highest.
  • the learning mechanism 143 learns this access example and accesses devices A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J so that the number of times of switching of the I2C multiplexer is minimized. Optimize access order. As a result, in the second access after the learning process, as shown in FIG. 7, the switching frequency of the I2C multiplexer is reduced from 10 times to 6 times to improve access performance.
  • FIG. 8 is a diagram for explaining the details of the access order learning process by the learning mechanism 143 for the connection example of FIG. In FIG. 8, it is assumed that the determination table 142 is in an initial state. That is, for all entries, the I2C library device address is empty (EMPTY), the header is empty, the counter is “0”, and the pointer is empty.
  • EMPY the I2C library device address
  • the header is empty
  • the counter is “0”
  • the pointer is empty.
  • the learning mechanism 143 executes the access order learning process (1) and is accessed. Registered in the learning table 141 in the order of access. That is, the learning mechanism 143 registers the device A in the learning table 141 with the access number “1”, and registers the device E in the learning table 141 with the access number “2”. Similarly, the learning mechanism 143 registers devices in the learning table 141 in the order of J ⁇ B ⁇ F ⁇ I ⁇ C ⁇ G ⁇ D ⁇ H.
  • the learning mechanism 143 registers a new entry in the index “0” of the decision table 142. Specifically, the learning mechanism 143 determines, as a new entry, an entry in which the I2C library device address is “0x01E001A0”, the header is “0xF0”, the counter is “2”, and the pointer is the start address of the learning table 141. 142. The reason for registering in the index “0” of the decision table 142 is that the lower 4 bits of the I2C device address of the device A accessed first is “0”.
  • the learning mechanism 143 optimizes the learning table 141 (2). That is, the learning mechanism 143 sorts the access order recorded in the learning table 141 so that the number of times of multiplexer switching is minimized.
  • the I2C library device address is identified by the upper 3 bytes of the I2C controller number, multiplexer address, and multiplexer port number. For this reason, the learning mechanism 143 can optimize the learning table 141 in an order that minimizes the number of times of switching of the I2C multiplexer by sorting the information by the upper 3 bytes of the I2C library device address.
  • the learning table 142 is optimized so that access is performed in the order of devices A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J.
  • FIG. 9 is a diagram for explaining the details of the speculative execution processing by the learning mechanism 143 for the connection example of FIG. In FIG. 9, it is assumed that the learning process 141 shown in FIG. 8 is registered in the learning table 141 and the decision table 142.
  • the learning mechanism 143 refers to the corresponding index of the decision table 142, that is, the index “0” (1). Then, since the I2C library device address and the header information in the decision table 142 match the access instruction from the application 130, the learning mechanism 143 performs speculative execution processing (2).
  • the learning mechanism 143 uses the learning table 141 to issue in advance an access command to the device in the order optimized by the access order learning process. Then, the learning mechanism 143 records the information obtained from each device by the pre-issuance in the prefetch information of the learning table 141.
  • commands are issued in the order of device A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J. For example, “1” is obtained from device A, and device B “2” is obtained from the record, and the obtained value is recorded in the learning table 141 as the respective prefetch information.
  • the learning mechanism 143 performs speculative execution processing when the first access from the application 130 is executed, and returns the prefetch information of the entry whose access number in the learning table 141 is “1” to the application 130 (3). Then, the learning mechanism 143 does not perform actual device access when the I2C library device address and the header information recorded in the learning table 141 in the second and subsequent accesses match the information given from the application 130. Returns prefetch information obtained in advance issue. On the other hand, if the information does not match the information from the application 130, the learning mechanism 143 discards the pre-read information of the subsequent access numbers and executes the conventional device access process.
  • the application 130 accesses devices A ⁇ E ⁇ J ⁇ B ⁇ F ⁇ I ⁇ C ⁇ G ⁇ D ⁇ H in this order, but the I2C library 140 is changed to the device A ⁇ B by speculative execution processing. Access is made in the order of C ⁇ D ⁇ E ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J.
  • the WRITE access changes the state of the hardware and has a high risk of being unrecoverable, so the speculative execution target is the READ access.
  • the I2C library issues an I2CWRITE to a register that indicates some hardware operation based on the prediction, and an operation different from the prediction is detected later, the started operation is not recovered.
  • the status latch is set or the retained data is written to the I2C storage device, the data can be recovered by overwriting again.
  • writing to them is a store of some state / data change, and only the upper side of the I2C library knows how it changes (what WRITE data is issued). The value after change is unpredictable. Therefore, speculative execution is not performed for WRITE access.
  • FIG. 10 is a flowchart showing the processing procedure of the I2C library 140.
  • the I2C library 140 receives a function call for accessing the I2C devices 105 and 205 in a state where the learning mechanism start instruction is received from the application 130.
  • the I2C library 140 acquires the I2C library device address specified by the function call (step S1). Then, the I2C library 140 focuses on the I2C library device address and refers to the determination table 142 (step S2).
  • the I2C library 140 determines whether or not speculative execution is possible (step S3). If not, it determines whether or not to learn the access order to the I2C devices 105 and 205 (step S4). . As a result, when the access order is not learned, the I2C library 140 performs a process without learning as in the prior art (step S5).
  • the I2C library 140 when learning the access order, performs a learning process, that is, an access order recording process. Specifically, the I2C library 140 receives a function call from the application 130 and performs processing, and records the access order to the I2C devices 105 and 205 in the learning table 141 (step S6).
  • the I2C library 140 When receiving an instruction to end the learning mechanism from the application 130, the I2C library 140 registers an entry in the determination table 142, and determines the order in which the number of times of switching the I2C multiplexer 104 is minimized. That is, the I2C library 140 sorts the recorded contents of the learning table 141 based on the I2C library device address (step S7). Note that the entry may be registered in the decision table 142 at the start of learning.
  • the I2C library 140 performs speculative execution (step S8) and determines whether or not speculative execution is successful (step S9).
  • the counter value of the determination table 142 is counted up (step S10), and when the speculative execution is not successful, the counter value of the determination table 142 is counted down (step S11). ).
  • the I2C library 140 performs learning and speculative execution using the learning table 141 and the decision table 142, thereby shortening the access time when sequentially accessing the I2C devices 105 and 205. it can.
  • FIG. 11 is a flowchart showing the processing procedure of the function processing of the I2C library 140.
  • the function process is a process performed in step S5 in FIG. 10, and is also performed as a part of the process in step S6.
  • the I2C library 140 determines whether or not the accepted function call is WRITE (step S31). As a result, when the accepted function call is WRITE, the I2C library 140 determines whether or not there is MUX switching, that is, whether or not switching of the I2C multiplexer 104 is necessary (step S32), and is necessary. In this case, MUX switching is performed.
  • the I2C library 140 performs a WRITE activation process for MUX switching as the MUX switching process (step S33), and waits for completion of WRITE (step S34). When WRITE is completed, the I2C library 140 performs WRITE completion processing (step S35).
  • the I2C library 140 performs a WRITE process. That is, the I2C library 140 performs WRITE activation processing as WRITE processing (step S36), and waits for completion of WRITE (step S37). When WRITE is completed, the I2C library 140 performs WRITE completion processing (step S38).
  • the I2C library 140 determines whether or not the accepted function call is READ (step S39). As a result, if the accepted function call is not READ, the I2C library 140 terminates the processing. If it is READ, it determines whether or not there is MUX switching (step S40). Performs MUX switching.
  • the I2C library 140 performs WRITE activation processing for MUX switching (step S41) as MUX switching processing, and waits for completion of WRITE (step S42). Then, when the WRITE is completed, the I2C library 140 performs a WRITE completion process (step S43).
  • the I2C library 140 performs a READ process. That is, the I2C library 140 performs a READ activation process as a READ process (step S44) and waits for completion of the READ (step S45). When the READ is completed, the I2C library 140 performs a READ completion process (step S46).
  • the I2C library 140 performs MUX switching processing when there is MUX switching. Therefore, when accessing the I2C devices 105 and 205 in order, the I2C library 140 can shorten the access time by reducing the number of MUX switching.
  • FIG. 12A and FIG. 12B are flowcharts showing the processing procedure of learning and speculative execution by the learning mechanism 143.
  • the learning mechanism 143 determines the index of the determination table 142 from the first I2C device address designated by the application 130 (step S51). Then, the learning mechanism 143 compares the first device access specified by the application 130 with the device access specified by the index in the determination table 142 (step S52), and determines whether or not they match.
  • the learning mechanism 143 uses the weight of the recording information corresponding to the index in the decision table 142. Is determined (step S53). Specifically, the learning mechanism 143 determines whether or not the value of the counter specified by the index in the determination table 142 is greater than or equal to a threshold value.
  • the learning mechanism 143 determines that the weight of the recorded information is small and the learning table 141 should be overwritten, and performs learning. That is, the learning mechanism 143 records device access in the learning table 141 (step S54), performs MUX switching as necessary (step S55), and performs device access (step S56).
  • the learning mechanism 143 determines whether or not the device access has ended (step S57), and if not completed, returns to step S54 to process the next device access. On the other hand, if completed, the learning mechanism 143 performs registration in the determination table 142 (step S58), and sorts the learning contents based on the I2C device library address to optimize the learning table 141 (step S59). .
  • the learning mechanism 143 receives the learning mechanism end instruction from the application 130 and determines that the device access has ended.
  • the learning mechanism 143 determines that the weight of the recorded information is large and that the learning table 141 is not overwritten, and performs a conventional process that does not perform learning. Specifically, the learning mechanism 143 performs MUX switching as necessary (step S60) and performs device access (step S61).
  • step S62 the learning mechanism 143 determines whether or not the device access has ended. If it has not ended, the learning mechanism 143 returns to step S60 to process the next device access, and when the device access has ended. Ends the process.
  • step S52 If it is determined in step S52 that the first device access specified by the application 130 matches the device access specified by the index in the determination table 142, the learning mechanism 143 performs the process shown in FIG. 12B. That is, the learning mechanism 143 compares the counter values (step S63). If the counter value is smaller than the threshold value, the learning table 141 has a small weight, and learning is performed for temporary recording in order to perform overwriting by learning. A table is prepared (step S64).
  • the learning mechanism 143 starts issuing commands in advance from the information in the learning table 141 (step S65). That is, the learning mechanism 143 performs MUX switching (step S66) and accesses the device (step S67). Then, the learning mechanism 143 stores the read contents in the corresponding prefetch information field of the learning table 141 (step S68), and determines whether all addresses have been accessed based on the learning table 141 (step S69).
  • the learning mechanism 143 ends the command issuance, and performs a confirmation process (step S70).
  • the learning mechanism 143 compares the MUX address, that is, compares the multiplexer address (step S71). Then, the learning mechanism 143 returns to step S66 if they do not match, and returns to step S67 if they match because the MUX switching is unnecessary.
  • the learning mechanism 143 can shorten the access time when accessing the I2C devices 105 and 205 in order by performing learning and speculative execution processing using the learning table 141 and the decision table 142. it can.
  • FIG. 13 is a flowchart showing the procedure of the confirmation process.
  • the learning mechanism 143 accepts a device access function call of the application 130 after the command issuance is completed (step S81), and determines whether or not a temporary recording learning table is prepared. (Step S82). As a result, when the learning table for temporary recording is prepared, the learning mechanism 143 records the access information in the learning table for temporary recording (step S83).
  • the learning mechanism 143 compares the n-th access with the n-th access in the learning table 141 (step S84) and determines whether or not they match. judge.
  • step S85 it is determined whether or not all accesses have been completed. If there is an access that has not been completed, the learning mechanism 143 returns to step S81 to process the next device access function call.
  • the learning mechanism 143 determines whether or not all access information has been returned from the prefetch information (step S87). When all the access information is returned from the prefetch information, the learning mechanism 143 increments the corresponding counter of the decision table 142 because the device access function call has been completed in the learned order (step S89). ). On the other hand, when the prefetch information not returned is in the learning table 141, the learning mechanism 143 decrements the corresponding counter of the determination table 142 (step S88), and proceeds to step S97.
  • step S84 if the nth access does not match the nth access in the learning table 141, the learning mechanism 143 decrements the corresponding counter in the decision table 142 (step S90).
  • the case where the n-th access and the n-th access in the learning table 141 do not match each other is a case where the application 130 is accessing differently from the learning table 141.
  • the learning mechanism 143 receives the device access function call of the application 130 (step S91), and determines whether or not a temporary recording learning table is prepared (step S92). As a result, when a learning table for temporary recording is prepared, the learning mechanism 143 records access information in the learning table for temporary recording (step S93).
  • the learning mechanism 143 performs MUX switching as necessary (step S94) and performs device access (step S95). Then, the learning mechanism 143 determines whether or not all device accesses have been completed (step S96). If not completed, the learning mechanism 143 returns to step S91 to process the next device access.
  • the learning mechanism 143 compares the counter value with the threshold value (step S97). If the counter value is smaller than the threshold value, the learning mechanism 143 replaces the learning table 141 with the temporary recording learning table (step S98), sorts the learning contents by the I2C library device address, and stores the learning table 141. Optimize (step S99).
  • the learning mechanism 143 can correctly respond when the function call corresponding to the previously issued command is performed from the application 130 by performing the confirmation process.
  • FIG. 14 is a diagram illustrating an example of a 5V power supply sensor and a 10V power supply sensor under the I2C multiplexer. As shown in FIG. 14, 5V power sensor A and 10V power sensor A are connected to port 1 of I2C multiplexer 501, and 5V power sensor B and 10V power sensor B are connected to port 2 of I2C multiplexer 501. .
  • the I2C multiplexer 501 is connected to the I2C controller 502.
  • the I2C device address of the 5V power supply sensor A is “0x01”, and the I2C device address of the 10V power supply sensor A is “0x02”.
  • the I2C device address of the 5V power supply sensor B is “0x01”, and the I2C device address of the 10V power supply sensor A is “0x02”.
  • the multiplexer address of the I2C multiplexer is “0x01”, the multiplexer port number of port 1 is “0x01”, and the multiplexer port number of port 2 is “0x02”.
  • the I2C controller number of the I2C controller 502 is “0x01”.
  • the I2C library 140 reads the values of the 5V power sensor and the 10V power sensor by driving the I2C controller 502 based on an instruction from the monitoring application. Since the monitoring application performs monitoring in the order of the 5V power sensor and the 10V power sensor, the device access function of the I2C library 140 is called in the order of 5V power sensor A ⁇ 5V power sensor B ⁇ 10V power sensor A ⁇ 10V power sensor B. In addition, the monitoring application issues a learning mechanism start and end instruction to the I2C library 140.
  • FIG. 15 is a diagram showing the learning table 141 before and after optimization.
  • the pre-optimal learning table 141 records device accesses in the order of 5V power sensor A ⁇ 5V power sensor B ⁇ 10V power sensor A ⁇ 10V power sensor B accessed by the monitoring application.
  • device access is performed in the order sorted using the I2C library device address, that is, in the order of 5 V power sensor A ⁇ 10 V power sensor A ⁇ 5 V power sensor B ⁇ 10 V power sensor B. Is recorded.
  • FIG. 16 is a diagram showing the determination table 142 after learning.
  • the I2C library 140 records the I2C library device address, header, counter, and pointer of the 5V power supply sensor A that is accessed first.
  • the counter value is initialized to “2” which is a threshold value, and “0x80000000” which is the address of the learning table 141 is stored in the pointer.
  • the I2C library 140 performs I2C multiplexer switching and device access while recording the access number, device address, and header in the learning table 141.
  • the decision table 142 is entered when all device accesses are completed. May be registered.
  • FIG. 17A is a sequence diagram illustrating the operation of the firmware 120 during learning
  • FIG. 17B is a sequence diagram illustrating the operation of the firmware 120 during speculative execution.
  • the monitoring application performs a learning mechanism start operation on the I2C library 140 (step S201), and the I2C library 140 responds to the monitoring application to start the learning mechanism (step S202).
  • the monitoring application calls the READ function with the I2C library device address “0x01010101” as an argument (step S203). Then, the I2C library 140 determines the index of the determination table 142, registers it in the determination table 142 (step S204), and associates it with the learning table 141 (step S205).
  • the I2C library 140 records the access order in the learning table 141 (step S206), and switches to port 1 (step S207). Then, the I2C library 140 reads the value of the 5V power supply sensor A (step S208) and returns the value to the monitoring application (step S209).
  • the monitoring application calls the READ function with the I2C library device address “0x01010201” as an argument (step S210). Then, the I2C library 140 records the access order in the learning table 141 (step S211), and switches to port 2 (step S212). Then, the I2C library 140 reads the value of the 5V power supply sensor B (step S213) and returns the value to the monitoring application (step S214).
  • the monitoring application calls the READ function with the I2C library device address “0x01010102” as an argument (step S215). Then, the I2C library 140 records the access order in the learning table 141 (step S216), and switches to port 1 (step S217). Then, the I2C library 140 reads the value of the 10V power supply sensor A (step S218) and returns the value to the monitoring application (step S219).
  • the monitoring application calls the READ function with the I2C library device address “0x01010202” as an argument (step S220). Then, the I2C library 140 records the access order in the learning table 141 (step S221), and switches to port 2 (step S222). Then, the I2C library 140 reads the value of the 10V power supply sensor B (step S223) and returns the value to the monitoring application (step S224). Then, the monitoring application performs a learning mechanism end operation on the I2C library 140 (step S225). Then, the I2C library 140 optimizes the learning table 141 (step S226), and returns a learning mechanism end response to the monitoring application (step S227).
  • the monitoring application performs a learning mechanism start operation on the I2C library 140 (step S261), and the I2C library 140 responds to the monitoring application to start the learning mechanism (step S262).
  • the monitoring application calls the READ function with the I2C library device address “0x01010101” as an argument (step S263). Then, the I2C library 140 determines the index of the determination table 142, refers to the determination table 142 (step S264), and acquires a pointer to the learning table 141 (step S265).
  • the I2C library 140 switches to port 1 (step S266), reads the value of the 5V power supply sensor A based on the learning table 141 (step S267), and reads the value of the 10V power supply sensor A (step S268). ).
  • the I2C library 140 then switches to port 2 based on the learning table 141 (step S269), reads the value of the 5V power supply sensor B (step S270), and reads the value of the 10V power supply sensor B (step S271). ).
  • the I2C library 140 returns the value of the 5V power supply sensor A to the monitoring application (step S272).
  • the monitoring application calls the READ function with the I2C library device address “0x01010201” as an argument (step S273). Then, the I2C library 140 refers to the learning table 141 (step S274) and acquires prefetch information (step S275). Then, the I2C library 140 returns the acquired prefetch information to the monitoring application (step S276).
  • the monitoring application calls the READ function with the I2C library device address “0x01010102” as an argument (step S277). Then, the I2C library 140 refers to the learning table 141 (step S278) and acquires prefetch information (step S279). Then, the I2C library 140 returns the acquired prefetch information to the monitoring application (step S280).
  • the monitoring application calls the READ function with the I2C library device address “0x01010202” as an argument (step S281). Then, the I2C library 140 refers to the learning table 141 (step S282) and acquires prefetch information (step S283). Then, the I2C library 140 returns the acquired prefetch information to the monitoring application (step S284).
  • the monitoring application performs a learning mechanism end operation on the I2C library 140 (step S285).
  • the I2C library 140 sends a learning mechanism end response to the monitoring application (step S286).
  • the learning table 141 stores the device access order so that the number of times of switching the I2C multiplexer 104 is minimized.
  • the learning mechanism 143 performs speculative execution of device access in the order stored in the learning table 141. Therefore, the I2C library 140 can prevent an increase in access time due to the bus switching of the I2C multiplexer 104.
  • the learning mechanism 143 learns device access by the application 130, optimizes the switching frequency of the I2C multiplexer 104, and stores it in the learning table 141. Therefore, the I2C library 140 can automatically create the learning table 141.
  • the determination table 142 stores information related to the first device access in the learned device access order. Therefore, when the device 130 is first accessed by the application 130, the learning mechanism 143 can easily determine whether or not speculative execution is possible with reference to the determination table 142.
  • the learning mechanism 143 determines whether or not the prior issue of the access command to the device matches the actual access from the application 130. Then, the determination table 142 stores the weight that is increased or decreased based on the determination result by the learning mechanism 143 for each device access order. Therefore, the learning mechanism 143 can evaluate the reproducibility of the learned device access order using the weight, and can control the update of the learning table 141 based on the evaluation result.
  • the I2C bus has been described.
  • the present invention is not limited to this, and can be similarly applied to a bus that connects a controller and a device with a multiplexer interposed therebetween.
  • the learning mechanism 143 performs speculative execution has been described.
  • the present invention is not limited to this, and can be similarly applied to a case where device access is executed when a function call from the application 130 is received without performing speculative execution.
  • the information processing apparatus 1 having the control board 100 and the target boards 200 to 400 has been described.
  • the present invention is not limited to this. That is, the present invention can be similarly applied to an information processing apparatus that includes a CPU, a memory, a controller, a multiplexer, and a device, and the device is bus-connected to the controller via the multiplexer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A learning table (141) stores a device access sequence such that a 12C multiplexer (104) is switched a minimum number of times. When an application (130) performs a device access initially stored in the learning table (141), a learning mechanism (143) executes speculative device access in the sequence stored in learning table (141). In addition, the learning mechanism (143) learns the device access performed by the application (130), and stores this in the learning table (141), which has been optimized such that the 12C multiplexer (104) is switched a minimum number of times. A decision table (142) stores information related to the first device access in the learned device access sequence.

Description

制御装置、デバイスアクセス方法、デバイスアクセスプログラム及び情報処理装置Control apparatus, device access method, device access program, and information processing apparatus
 本発明は、制御装置、デバイスアクセス方法、デバイスアクセスプログラム及び情報処理装置に関する。 The present invention relates to a control apparatus, a device access method, a device access program, and an information processing apparatus.
 従来、MPU(Micro-Processing Unit)とデバイスを接続する方法としてI2Cバスが利用されている。I2Cバスでは、MPU側のI2Cコントローラとデバイスがバスで直接接続される場合と、バスの途中にI2Cマルチプレクサを挟む場合がある。 Conventionally, an I2C bus has been used as a method of connecting an MPU (Micro-Processing Unit) and a device. In the I2C bus, there are a case where an I2C controller on the MPU side and a device are directly connected by a bus, and a case where an I2C multiplexer is sandwiched in the middle of the bus.
 バスの途中にI2Cマルチプレクサを挟む場合、I2Cデバイスにアクセスするために用いられるI2Cライブラリは、I2Cマルチプレクサのバスを切り替えてから、I2Cデバイスにアクセスする。 When the I2C multiplexer is sandwiched in the middle of the bus, the I2C library used to access the I2C device switches the I2C multiplexer bus before accessing the I2C device.
 なお、I2Cバスに関する技術として、同一のI2Cバスに接続されたデバイスごとにストップコンディションの生成タイミングを最適化する技術が開発されている(例えば、特許文献1参照)。ここで、ストップコンディションとは、コントローラが複数のデータをデバイスに送信する場合に、最後のデータの送信後に送信するデータである。 As a technique related to the I2C bus, a technique for optimizing the generation timing of the stop condition for each device connected to the same I2C bus has been developed (for example, see Patent Document 1). Here, the stop condition is data transmitted after the last data is transmitted when the controller transmits a plurality of data to the device.
特開2008-242884号公報JP 2008-242848 A
 しかしながら、I2Cデバイスにアクセスするアプリケーションは、監視やリセット処理で連続して複数のI2Cデバイスにアクセスする場合、バス経路の途中にI2Cマルチプレクサが含まれるか否かを意識していない。このため、アプリケーションのアクセス順序によっては、I2Cマルチプレクサのバス切り替え回数が増え、I2Cデバイスへのアクセス時間が増加するという問題がある。 However, an application that accesses an I2C device is unaware of whether or not an I2C multiplexer is included in the middle of a bus path when continuously accessing a plurality of I2C devices by monitoring or reset processing. For this reason, depending on the access order of applications, there is a problem that the number of bus switching times of the I2C multiplexer increases and the access time to the I2C device increases.
 開示の技術は、上記に鑑みてなされたものであって、I2Cマルチプレクサのバス切り替えに起因するアクセス時間の増加を防ぐ制御装置、デバイスアクセス方法、デバイスアクセスプログラム及び情報処理装置を提供することを目的とする。 The disclosed technique has been made in view of the above, and an object thereof is to provide a control device, a device access method, a device access program, and an information processing device that prevent an increase in access time due to bus switching of an I2C multiplexer. And
 本願の開示する制御装置は、一つの態様において、マルチプレクサを経由した複数のデバイスへのアクセスにおいてマルチプレクサの切り替え数に基づいて決定されたアクセス順序を記憶したアクセス順序記憶部を有する。また、本願の開示する制御装置は、前記アクセス順序記憶部が記憶するアクセス順序に従って前記複数のデバイスへのアクセスを実行する実行部を有する。 In one aspect, the control device disclosed in the present application includes an access order storage unit that stores an access order determined based on the number of switching of multiplexers when accessing a plurality of devices via a multiplexer. Further, the control device disclosed in the present application includes an execution unit that executes access to the plurality of devices in accordance with the access order stored in the access order storage unit.
 本願の開示する制御装置、デバイスアクセス方法、デバイスアクセスプログラム及び情報処理装置の一つの態様によれば、I2Cマルチプレクサのバス切り替えに起因するアクセス時間の増加を防ぐことができる。 According to one aspect of the control device, the device access method, the device access program, and the information processing device disclosed in the present application, it is possible to prevent an increase in access time due to I2C multiplexer bus switching.
図1は、実施例に係る情報処理装置を示す図である。FIG. 1 is a diagram illustrating the information processing apparatus according to the embodiment. 図2は、実施例に係るI2Cライブラリの構成を示す機能ブロック図である。FIG. 2 is a functional block diagram illustrating the configuration of the I2C library according to the embodiment. 図3は、学習表のデータ構造の一例を示す図である。FIG. 3 is a diagram illustrating an example of the data structure of the learning table. 図4は、決定表のデータ構造の一例を示す図である。FIG. 4 is a diagram illustrating an example of the data structure of the decision table. 図5は、学習及び投機実行期間のI2Cライブラリの動作を説明するための図である。FIG. 5 is a diagram for explaining the operation of the I2C library during the learning and speculative execution period. 図6は、I2Cデバイスの接続例を示す図である。FIG. 6 is a diagram illustrating a connection example of the I2C device. 図7は、図6の接続例に対して学習を行わない従来のデバイスアクセスと学習を行う本実施例のデバイスアクセスとでI2Cマルチプレクサの切り替え回数の差を示す図である。FIG. 7 is a diagram showing the difference in the number of switching times of the I2C multiplexer between the conventional device access in which learning is not performed for the connection example in FIG. 6 and the device access in the present embodiment in which learning is performed. 図8は、図6の接続例に対する学習機構によるアクセス順序学習処理の詳細を説明するための図である。FIG. 8 is a diagram for explaining the details of the access order learning process by the learning mechanism for the connection example of FIG. 図9は、図6の接続例に対する学習機構による投機実行処理の詳細を説明するための図である。FIG. 9 is a diagram for explaining the details of the speculative execution process by the learning mechanism for the connection example of FIG. 図10は、I2Cライブラリの処理手順を示すフローチャートである。FIG. 10 is a flowchart showing the processing procedure of the I2C library. 図11は、I2Cライブラリの関数処理の処理手順を示すフローチャートである。FIG. 11 is a flowchart showing the processing procedure of the function processing of the I2C library. 図12Aは、学習機構による学習及び投機実行の処理手順を示すフローチャートである。FIG. 12A is a flowchart illustrating a processing procedure of learning and speculative execution by the learning mechanism. 図12Bは、学習機構による学習及び投機実行の処理手順を示すフローチャートである。FIG. 12B is a flowchart illustrating a processing procedure of learning and speculative execution by the learning mechanism. 図13は、確定処理の処理手順を示すフローチャートである。FIG. 13 is a flowchart showing the procedure of the confirmation process. 図14は、I2Cマルチプレクサ配下の5V電源センサ及び10V電源センサの構成を示す図である。FIG. 14 is a diagram illustrating a configuration of a 5V power sensor and a 10V power sensor under the I2C multiplexer. 図15は、最適化前後での学習表を示す図である。FIG. 15 is a diagram showing a learning table before and after optimization. 図16は、学習後の決定表を示す図である。FIG. 16 is a diagram showing a determination table after learning. 図17Aは、学習時のファームウェアの動作を示すシーケンス図である。FIG. 17A is a sequence diagram illustrating the operation of the firmware during learning. 図17Bは、投機実行時のファームウェアの動作を示すシーケンス図である。FIG. 17B is a sequence diagram illustrating the operation of the firmware during speculative execution.
 以下に、本願の開示する制御装置、デバイスアクセス方法、デバイスアクセスプログラム及び情報処理装置の実施例を図面に基づいて詳細に説明する。なお、この実施例は開示の技術を限定するものではない。 Hereinafter, embodiments of a control device, a device access method, a device access program, and an information processing device disclosed in the present application will be described in detail with reference to the drawings. Note that this embodiment does not limit the disclosed technology.
 まず、実施例に係る情報処理装置について説明する。図1は、実施例に係る情報処理装置を示す図である。図1に示すように、情報処理装置1は、制御ボード100と、ターゲットボード200~400を有する。 First, an information processing apparatus according to an embodiment will be described. FIG. 1 is a diagram illustrating the information processing apparatus according to the embodiment. As shown in FIG. 1, the information processing apparatus 1 includes a control board 100 and target boards 200 to 400.
 ターゲットボード200~400は、サーバーボード等であり、CPU、メモリを搭載する。制御ボード100は、ターゲットボード200~400の監視、制御を行う。なお、ここでは説明の便宜上、3台のターゲットボードを示したが、情報処理装置1には、任意の台数のターゲットボードが含まれてよい。 The target boards 200 to 400 are server boards and the like, and are equipped with a CPU and a memory. The control board 100 monitors and controls the target boards 200 to 400. Although three target boards are shown here for convenience of explanation, the information processing apparatus 1 may include an arbitrary number of target boards.
 制御ボード100は、MPU101と、メモリ102と、制御FPGA103と、IC2マルチプレクサ104と、6つのI2Cデバイス105と、3本のI2Cバス106とを有する。なお、ここでは説明の便宜上、6つのI2Cデバイス105と3本のI2Cバス106を示したが、制御ボード100には、任意の個数のI2Cデバイス、任意の本数のI2Cバスが含まれてよい。 The control board 100 includes an MPU 101, a memory 102, a control FPGA 103, an IC2 multiplexer 104, six I2C devices 105, and three I2C buses 106. For convenience of explanation, six I2C devices 105 and three I2C buses 106 are shown here, but the control board 100 may include any number of I2C devices and any number of I2C buses.
 MPU101は、メモリ102に記憶されたプログラムを実行する演算処理装置であり、2つのI2Cコントローラ110を有する。I2Cコントローラは、I2Cバス106を制御してI2Cデバイス105にアクセスする。 The MPU 101 is an arithmetic processing device that executes a program stored in the memory 102, and includes two I2C controllers 110. The I2C controller accesses the I2C device 105 by controlling the I2C bus 106.
 メモリ102は、MPU101で実行されるプログラムであるファームウェア120やMPU101が演算に用いるデータを記憶する。ファームウェア120には、アプリケーション130と、I2Cライブラリ140と、ドライバ150とが含まれる。 The memory 102 stores firmware 120 that is a program executed by the MPU 101 and data used by the MPU 101 for calculation. The firmware 120 includes an application 130, an I2C library 140, and a driver 150.
 アプリケーション130は、I2Cデバイス105を制御するために、I2Cライブラリ140へデバイスアドレス等のデータと共に、READ/WRITE関数を呼び出す。I2Cライブラリ140は、アプリケーション130からの関数呼び出しで受け取ったデータを元にドライバ150を起動し、I2Cデバイス105及び205へアクセスする。ドライバ150は、ハードウェアを駆動してI2Cデバイス105及び205へのアクセスを制御する。 In order to control the I2C device 105, the application 130 calls a READ / WRITE function together with data such as a device address to the I2C library 140. The I2C library 140 activates the driver 150 based on the data received by the function call from the application 130 and accesses the I2C devices 105 and 205. The driver 150 drives the hardware to control access to the I2C devices 105 and 205.
 I2Cライブラリ140は、異なる種類のI2Cデバイスに対しては異なるドライバ150を起動する。また、I2Cライブラリ140は、I2Cマルチプレクサ104を経由してI2Cデバイス105にアクセスする場合には、I2Cマルチプレクサ104のバスを切り替えてからI2Cデバイス105にアクセスする。また、I2Cライブラリ140は、ターゲットボード200~400に搭載されたI2Cデバイス205にはFPGAドライバを用いて制御FPGA103経由でアクセスする。すなわち、I2Cライブラリ140は、アクセスするI2Cデバイス105及び205の種類や接続に応じた手順とドライバ150を用いることにより、I2Cデバイス105及び205毎の指示手順の差異を吸収する。 The I2C library 140 activates different drivers 150 for different types of I2C devices. When accessing the I2C device 105 via the I2C multiplexer 104, the I2C library 140 accesses the I2C device 105 after switching the bus of the I2C multiplexer 104. The I2C library 140 accesses the I2C device 205 mounted on the target boards 200 to 400 via the control FPGA 103 using an FPGA driver. That is, the I2C library 140 absorbs the difference in the instruction procedure for each I2C device 105 and 205 by using the driver 150 and the procedure according to the type and connection of the I2C devices 105 and 205 to be accessed.
 制御FPGA103は、ターゲットボード200~400に搭載された制御FPGA203をDMA(Direct Memory Access)制御して、ターゲットボード200~400上のI2Cデバイス205へのアクセスを制御する。 The control FPGA 103 performs direct memory access (DMA) control on the control FPGA 203 mounted on the target boards 200 to 400 to control access to the I2C device 205 on the target boards 200 to 400.
 IC2マルチプレクサ104は、2本のI2Cバス106に接続され、内部のバスを切り替えることにより、各I2Cバス106に接続されるI2Cデバイス105へのアクセスを可能とする。 The IC2 multiplexer 104 is connected to the two I2C buses 106, and enables switching to the I2C devices 105 connected to the I2C buses 106 by switching the internal buses.
 I2Cデバイス105は、I2Cバス106を介してMPU101と接続されるデバイスである。I2Cデバイス105としては、電源センサやEPROM(Erasable Programmable Read Only Memory)などがある。I2Cバス106は、MPU101とI2Cデバイス105を接続するバスである。 The I2C device 105 is a device connected to the MPU 101 via the I2C bus 106. Examples of the I2C device 105 include a power supply sensor and an EPROM (Erasable Programmable Read Only Memory). The I2C bus 106 is a bus that connects the MPU 101 and the I2C device 105.
 ターゲットボード200~400は、搭載するI2Cデバイスの数やI2Cバスの本数を除いて同様の構成を有するので、ここでは、ターゲットボード200を例にとって説明する。ターゲットボード200は、制御FPGA203と、4つのI2Cデバイス205と、2本のI2Cバス206とを有する。 Since the target boards 200 to 400 have the same configuration except for the number of mounted I2C devices and the number of I2C buses, the target board 200 will be described as an example here. The target board 200 includes a control FPGA 203, four I2C devices 205, and two I2C buses 206.
 制御FPGA203は、2台のI2Cコントローラ210を有し、制御FPGA103のDMA制御の下、I2Cコントローラ210を駆動してI2Cデバイス205を制御する。I2Cデバイス205は、I2Cバス206、制御FPGA203及び103を介してMPU101と接続されるデバイスである。I2Cデバイス205としては、電源センサやEPROMなどがある。I2Cバス206は、制御FPGA203とI2Cデバイス205を接続するバスである。 The control FPGA 203 has two I2C controllers 210 and drives the I2C controller 210 under the DMA control of the control FPGA 103 to control the I2C device 205. The I2C device 205 is a device connected to the MPU 101 via the I2C bus 206 and the control FPGAs 203 and 103. Examples of the I2C device 205 include a power supply sensor and an EPROM. The I2C bus 206 is a bus that connects the control FPGA 203 and the I2C device 205.
 次に、実施例に係るI2Cライブラリ140の構成について説明する。図2は、実施例に係るI2Cライブラリ140の構成を示す機能ブロック図である。なお、図2において、I2Cドライバ151はI2Cデバイス105にアクセスする場合に用いられるドライバであり、FPGAドライバ152は制御FPGA203を介してI2Cデバイス205にアクセスする場合に用いられるドライバである。 Next, the configuration of the I2C library 140 according to the embodiment will be described. FIG. 2 is a functional block diagram illustrating the configuration of the I2C library 140 according to the embodiment. In FIG. 2, an I2C driver 151 is a driver used when accessing the I2C device 105, and an FPGA driver 152 is a driver used when accessing the I2C device 205 via the control FPGA 203.
 図2に示すように、I2Cライブラリ140は、学習表141と、決定表142と、学習機構143と、コマンド発行部144とを有する。 2, the I2C library 140 includes a learning table 141, a determination table 142, a learning mechanism 143, and a command issuing unit 144.
 学習表141は、学習機構143がI2Cデバイス105及び205について学習したアクセス順序を記憶する。図3は、学習表141のデータ構造の一例を示す図である。図3に示すように、学習表141は、アクセス番号と、I2Cライブラリデバイスアドレスと、ヘッダと、先読み情報を対応付けて記憶する。 The learning table 141 stores the access order learned by the learning mechanism 143 for the I2C devices 105 and 205. FIG. 3 is a diagram illustrating an example of the data structure of the learning table 141. As shown in FIG. 3, the learning table 141 stores an access number, an I2C library device address, a header, and prefetch information in association with each other.
 アクセス番号は、学習開始後の何番目のデバイスアクセスかを示す情報であり、I2Cライブラリデバイスアドレスは、アプリケーション130からI2Cライブラリ140に渡されるデバイスアドレスである。I2Cライブラリデバイスアドレスのフォーマットは0xAABBCCDDである。ここで、0xは16進数であることを示し、AAはI2Cコントローラ番号であり、BBはI2Cマルチプレクサアドレスであり、CCはマルチプレクサポート番号であり、DDはI2Cデバイスアドレスである。したがって、I2Cライブラリデバイスアドレスの上位3バイトでI2Cマルチプレクサ104の切り替えが必要か否かが判断される。 The access number is information indicating the number of device access after the start of learning, and the I2C library device address is a device address passed from the application 130 to the I2C library 140. The format of the I2C library device address is 0xAABCCDDD. Here, 0x indicates a hexadecimal number, AA is an I2C controller number, BB is an I2C multiplexer address, CC is a multiplexer port number, and DD is an I2C device address. Therefore, it is determined whether or not switching of the I2C multiplexer 104 is necessary in the upper 3 bytes of the I2C library device address.
 また、ヘッダは、I2Cデバイス105及び205のオフセット情報である。例えば、I2Cデバイス105及び205がEPROMの場合、デバイスアドレスでEPROMが特定され、オフセットでEPROM内の各バイトが特定される。先読み情報は、学習内容に基づき、学習機構143が投機実行した際に読み出したデータである。ここで、投機実行とは、アプリケーション130からアクセス番号が1のアクセス要求を受け取った時点で、学習表141に記憶されたアクセス順序で学習機構143がデバイスへのアクセスを行うことである。なお、投機実行の詳細については後述する。 The header is offset information of the I2C devices 105 and 205. For example, when the I2C devices 105 and 205 are EPROMs, the EPROM is specified by the device address, and each byte in the EPROM is specified by the offset. The prefetch information is data read when the learning mechanism 143 executes speculation based on the learning content. Here, speculative execution means that the learning mechanism 143 accesses the device in the access order stored in the learning table 141 when an access request having an access number of 1 is received from the application 130. Details of speculative execution will be described later.
 決定表142は、学習機構143が学習したアクセス順序を用いてI2Cデバイス105及び205にアクセスするか否かの判定に用いる情報を記憶する。図4は、決定表142のデータ構造の一例を示す図である。図4に示すように、決定表142は、I2Cライブラリデバイスアドレスと、ヘッダと、カウンタと、ポインタとを対応付けて記憶する。 The determination table 142 stores information used for determining whether to access the I2C devices 105 and 205 using the access order learned by the learning mechanism 143. FIG. 4 is a diagram illustrating an example of the data structure of the determination table 142. As illustrated in FIG. 4, the determination table 142 stores an I2C library device address, a header, a counter, and a pointer in association with each other.
 ポインタは、学習表141へのポインタであり、I2Cライブラリデバイスアドレスは、ポインタにより指定された学習表141のアクセス番号が1であるI2Cライブラリデバイスアドレスと同じ情報である。へッダは、ポインタにより指定された学習表141のアクセス番号が1であるヘッダと同じ情報である。 The pointer is a pointer to the learning table 141, and the I2C library device address is the same information as the I2C library device address whose access number of the learning table 141 designated by the pointer is 1. The header is the same information as the header whose access number is 1 in the learning table 141 specified by the pointer.
 カウンタは、ポインタにより指定された学習表141の重みを評価するために用いられる情報である。ここで、学習表141の重みが大きいとは、学習表141に記録されたアクセス順序でI2Cデバイス105及び205がアクセスされる可能性が高いことを示す。 The counter is information used for evaluating the weight of the learning table 141 designated by the pointer. Here, the weight of the learning table 141 being large indicates that there is a high possibility that the I2C devices 105 and 205 are accessed in the access order recorded in the learning table 141.
 カウンタの値が閾値以上である場合には、学習機構143は、学習表141に記録されたアクセス順序でI2Cデバイス105及び205がアクセスされる可能性が高いと判断し、学習表141の上書きを行わない。一方、カウンタの値が閾値より小さい場合には、学習機構143は、学習が行われていない、もしくは、学習表141に記録されたアクセス順序でI2Cデバイス105及び205がアクセスされる可能性が低いと判断し、新たな順序で学習内容を上書きする。 If the counter value is equal to or greater than the threshold value, the learning mechanism 143 determines that the I2C devices 105 and 205 are likely to be accessed in the access order recorded in the learning table 141, and overwrites the learning table 141. Not performed. On the other hand, if the value of the counter is smaller than the threshold value, the learning mechanism 143 is not learning, or is unlikely to be accessed by the I2C devices 105 and 205 in the access order recorded in the learning table 141. And the learning contents are overwritten in a new order.
 カウンタは、決定表142が初期状態にあるときは「0」であり、学習表141への関連付けが行われた時に閾値で初期化される。また、カウンタは、投機実行が成功した時にカウントアップされ、投機実行が失敗した時にカウントダウンされる。 The counter is “0” when the decision table 142 is in the initial state, and is initialized with a threshold when the association with the learning table 141 is performed. The counter is counted up when the speculative execution is successful, and is counted down when the speculative execution fails.
 決定表142は、I2Cライブラリデバイスアドレスの下位4ビットをインデックスとしてアクセスされる。したがって、決定表142のエントリー数は16である。なお、インデックスとして用いるビット数は4以外でもよく、決定表142のエントリー数はビット数により変わる。 The decision table 142 is accessed using the lower 4 bits of the I2C library device address as an index. Therefore, the number of entries in the decision table 142 is 16. Note that the number of bits used as an index may be other than 4, and the number of entries in the determination table 142 varies depending on the number of bits.
 学習機構143は、学習表141に記憶した順序でI2Cデバイス105及び205へアクセスするか否かを判断し、学習表141に記憶した順序でアクセスする場合には、I2Cデバイス105及び205へのアクセスを投機実行する。 The learning mechanism 143 determines whether to access the I2C devices 105 and 205 in the order stored in the learning table 141. When the learning mechanism 143 accesses in the order stored in the learning table 141, the learning mechanism 143 accesses the I2C devices 105 and 205. Execute speculation.
 一方、学習表141に記憶した順序でアクセスしない場合には、学習機構143は、I2Cデバイス105及び205へのアクセス順序を学習するか否かを判断し、学習する場合には、学習結果を学習表141に記録する。そして、学習が終了した時点で、学習機構143は、学習表141に記録されたアクセス順序をI2Cマルチプレクサ104の切り替え回数が最小になるように最適化する。なお、学習機構143による学習の詳細については後述する。 On the other hand, if the access is not performed in the order stored in the learning table 141, the learning mechanism 143 determines whether to learn the access order to the I2C devices 105 and 205, and if so, learns the learning result. Record in Table 141. When learning is completed, the learning mechanism 143 optimizes the access order recorded in the learning table 141 so that the number of times of switching of the I2C multiplexer 104 is minimized. Details of learning by the learning mechanism 143 will be described later.
 アプリケーション130は、制御ボード100及びターゲットボード200~400の監視などで、I2Cデバイス105及び205に順番にアクセスする。したがって、学習機構143が学習表141に記録されたアクセス順序をI2Cマルチプレクサ104の切り替え回数が最小になるように最適化することによって、アプリケーション130はI2Cデバイス105及び205に効率良くアクセスすることができる。 The application 130 accesses the I2C devices 105 and 205 in order by monitoring the control board 100 and the target boards 200 to 400. Therefore, the application 130 can efficiently access the I2C devices 105 and 205 by optimizing the access order recorded in the learning table 141 by the learning mechanism 143 so that the switching frequency of the I2C multiplexer 104 is minimized. .
 一方、学習しない場合には、学習機構143は、従来と同様にI2Cデバイス105及び205にアクセスする。なお、学習機構143が学習及び投機実行を行う期間はアプリケーション130により指定される。 On the other hand, when learning is not performed, the learning mechanism 143 accesses the I2C devices 105 and 205 as in the conventional case. Note that the period during which the learning mechanism 143 performs learning and speculative execution is specified by the application 130.
 コマンド発行部144は、I2Cデバイス105及び205へアプリケーション130からの関数呼び出しに対応するコマンドを発行する。 The command issuing unit 144 issues a command corresponding to the function call from the application 130 to the I2C devices 105 and 205.
 図5は、学習及び投機実行期間のI2Cライブラリ140の動作を説明するための図である。図5において、点線の矢印は学習のない処理を示し、破線の矢印はアクセス順序の学習処理を示し、実線の矢印は投機実行処理を示す。図5に示すように、アプリケーション130は、I2Cライブラリ140が学習及び投機実行するか否かを含めてI2Cライブラリ140を制御する。 FIG. 5 is a diagram for explaining the operation of the I2C library 140 during the learning and speculative execution period. In FIG. 5, dotted arrows indicate processing without learning, dashed arrows indicate access order learning processing, and solid arrows indicate speculative execution processing. As shown in FIG. 5, the application 130 controls the I2C library 140 including whether or not the I2C library 140 performs learning and speculative execution.
 そして、アプリケーション130からデバイスへのアクセス要求を受け取ると、学習機構143が、決定表142を参照し、投機実行が可能か否かを判定する。その結果、投機実行が可能でない場合には、学習機構143は、決定表142を参照し、新たにI2Cデバイス105及び205へのアクセス順序を学習するか否かを判定する。その結果、学習しない場合には、学習機構143は、従来と同様にI2Cデバイス105及び205へのアクセスを行うよう、コマンド発行部144にコマンドを発行させる(1)。 When receiving an access request to the device from the application 130, the learning mechanism 143 refers to the determination table 142 and determines whether or not speculative execution is possible. As a result, when speculative execution is not possible, the learning mechanism 143 refers to the determination table 142 and determines whether to newly learn the access order to the I2C devices 105 and 205. As a result, when learning is not performed, the learning mechanism 143 causes the command issuing unit 144 to issue a command so as to access the I2C devices 105 and 205 as in the prior art (1).
 一方、学習する場合には、学習機構143は、コマンド発行部144にコマンドを発行させるとともに、学習処理(2)を行う。学習処理としては、学習機構143は、決定表142への登録(3)、決定表142と学習表141との関連付けを行う(4)。また、学習機構143は、I2Cデバイス105及び205へのアクセスについて、学習表141へのアクセス順序記録を行う(5)。そして、学習機構143は、学習終了後アクセス順序をI2Cマルチプレクサ104の切り替え回数が最小になるように最適化する。 On the other hand, in the case of learning, the learning mechanism 143 causes the command issuing unit 144 to issue a command and performs a learning process (2). As a learning process, the learning mechanism 143 registers (3) the decision table 142 and associates the decision table 142 with the learning table 141 (4). The learning mechanism 143 records the access order to the learning table 141 for the access to the I2C devices 105 and 205 (5). Then, the learning mechanism 143 optimizes the access order after learning so that the number of times of switching of the I2C multiplexer 104 is minimized.
 これに対して、投機実行が可能である場合には、学習機構143は、投機実行を行う(6)。すなわち、学習機構143は、決定表142を参照し(7)、学習表141へのポインタを取得する。そして、学習機構143は、学習表141に記憶された順序でI2Cデバイス105及び205へのアクセス要求をコマンド発行部144に先行発行させる(8)。 On the other hand, when speculative execution is possible, the learning mechanism 143 performs speculative execution (6). That is, the learning mechanism 143 refers to the decision table 142 (7) and acquires a pointer to the learning table 141. Then, the learning mechanism 143 causes the command issuing unit 144 to issue access requests to the I2C devices 105 and 205 in the order stored in the learning table 141 (8).
 次に、学習及び投機実行の例について図6~図9を用いて説明する。図6は、I2Cデバイスの接続例を示す図である。図6において、デバイスA~デバイスTはI2Cデバイスであり、MUX1及びMUX2はI2Cマルチプレクサである。 Next, examples of learning and speculative execution will be described with reference to FIGS. FIG. 6 is a diagram illustrating a connection example of the I2C device. In FIG. 6, devices A to T are I2C devices, and MUX 1 and MUX 2 are I2C multiplexers.
 デバイスA~デバイスDはMUX1にポート1で接続され、デバイスE~デバイスHはMUX1にポート2で接続され、デバイスIはMUX1にポート3で接続され、デバイスJはMUX1にポート4で接続されている。また、MUX1はI2Cコントローラ1に接続されている。 Device A to Device D are connected to MUX 1 at port 1 , Device E to Device H are connected to MUX 1 at port 2 , Device I is connected to MUX 1 at port 3 , and Device J is connected to MUX 1 at port 4 Connected with. MUX 1 is connected to the I2C controller 1 .
 デバイスA~デバイスDのI2Cデバイスアドレスは「0xA0」~「0xA3」であり、デバイスE~デバイスHのI2Cデバイスアドレスは「0xA0」~「0xA3」である。デバイスIのI2Cデバイスアドレスは「0xAC」であり、デバイスJのI2Cデバイスアドレスは「0x30」である。MUX1のポートについては、ポート1のマルチプレクサポート番号は「0x01」であり、ポート2のマルチプレクサポート番号は「0x02」である。また、ポート3のマルチプレクサポート番号は「0x04」であり、ポート4のマルチプレクサポート番号は「0x08」である。MUX1のマルチプレクサアドレスは「0xE0」であり、I2Cコントローラ1のI2Cコントローラ番号は「0x01」である。 The I2C device addresses of the devices A to D are “0xA0” to “0xA3”, and the I2C device addresses of the devices E to H are “0xA0” to “0xA3”. The I2C device address of device I is “0xAC”, and the I2C device address of device J is “0x30”. For the port of MUX 1 , the multiplexer port number of port 1 is “0x01”, and the multiplexer port number of port 2 is “0x02”. The multiplexer port number of port 3 is “0x04”, and the multiplexer port number of port 4 is “0x08”. The multiplexer address of MUX 1 is “0xE0”, and the I2C controller number of I2C controller 1 is “0x01”.
 同様に、デバイスK~デバイスNはMUX2にポート1で接続され、デバイスO~デバイスRはMUX2にポート2で接続され、デバイスSはMUX2にポート3で接続され、デバイスTはMUX2にポート4で接続されている。また、MUX2はI2Cコントローラ2に接続されている。 Similarly, device K to device N are connected to MUX 2 at port 1 , device O to device R are connected to MUX 2 at port 2 , device S is connected to MUX 2 at port 3 , and device T is connected to MUX 2 Connected to port 4 . The MUX 2 is connected to the I2C controller 2 .
 デバイスK~デバイスNのI2Cデバイスアドレスはそれぞれ「0xA4」、「0x42」、「0xC4」、「0x5C」であり、デバイスO~デバイスRのI2Cデバイスアドレスはそれぞれ「0xA4」、「0x42」、「0xC4」、「0x5C」である。デバイスSのI2Cデバイスアドレスは「0x5A」であり、デバイスTのI2Cデバイスアドレスは「0x5A」である。MUX2のポートについては、ポート1のマルチプレクサポート番号は「0x01」であり、ポート2のマルチプレクサポート番号は「0x02」である。また、ポート3のマルチプレクサポート番号は「0x04」であり、ポート4のマルチプレクサポート番号は「0x08」である。MUX2のマルチプレクサアドレスは「0xE0」であり、I2Cコントローラ2のI2Cコントローラ番号は「0x02」である。 The I2C device addresses of the devices K to N are “0xA4”, “0x42”, “0xC4”, and “0x5C”, respectively, and the I2C device addresses of the devices O to R are “0xA4”, “0x42”, and “0xC4”, respectively. "," 0x5C ". The I2C device address of the device S is “0x5A”, and the I2C device address of the device T is “0x5A”. For the port of MUX 2 , the multiplexer port number of port 1 is “0x01”, and the multiplexer port number of port 2 is “0x02”. The multiplexer port number of port 3 is “0x04”, and the multiplexer port number of port 4 is “0x08”. The multiplexer address of MUX 2 is “0xE0”, and the I2C controller number of I2C controller 2 is “0x02”.
 図7は、図6の接続例に対して学習を行わない従来のデバイスアクセスと学習を行う本実施例のデバイスアクセスとでI2Cマルチプレクサの切り替え回数の差を示す図である。例えば、図6の接続例において、デバイスA→E→J→B→F→I→C→G→D→Hの順でアクセスが行われた場合、全デバイスにアクセスするためのI2Cマルチプレクサの切り替え回数が最も多くなる。 FIG. 7 is a diagram showing a difference in the number of switching times of the I2C multiplexer between the conventional device access in which learning is not performed with respect to the connection example in FIG. 6 and the device access in this embodiment in which learning is performed. For example, in the connection example of FIG. 6, when access is performed in the order of devices A → E → J → B → F → I → C → G → D → H, switching of the I2C multiplexer to access all devices The number of times is the highest.
 学習機構143は、このアクセス例を学習し、I2Cマルチプレクサの切り替え回数が最小となるように、デバイスA→B→C→D→E→F→G→H→I→Jの順にアクセスするようにアクセス順序を最適化する。その結果として、学習処理後の2度目のアクセスでは、図7に示すようにI2Cマルチプレクサの切り替え回数が10回から4回に6回減少し、アクセス性能が向上する。 The learning mechanism 143 learns this access example and accesses devices A → B → C → D → E → F → G → H → I → J so that the number of times of switching of the I2C multiplexer is minimized. Optimize access order. As a result, in the second access after the learning process, as shown in FIG. 7, the switching frequency of the I2C multiplexer is reduced from 10 times to 6 times to improve access performance.
 図8は、図6の接続例に対する学習機構143によるアクセス順序学習処理の詳細を説明するための図である。図8において、決定表142は初期状態にあるものとする。すなわち、全てのエントリーについて、I2Cライブラリデバイスアドレスは空(EMPTY)であり、ヘッダは空であり、カウンタは「0」であり、ポインタは空であるとする。 FIG. 8 is a diagram for explaining the details of the access order learning process by the learning mechanism 143 for the connection example of FIG. In FIG. 8, it is assumed that the determination table 142 is in an initial state. That is, for all entries, the I2C library device address is empty (EMPTY), the header is empty, the counter is “0”, and the pointer is empty.
 そして、デバイスA→E→J→B→F→I→C→G→D→Hの順でアクセスが行われたとすると、学習機構143は、アクセス順序学習処理を実行し(1)、アクセスされたデバイスをアクセスされた順序で学習表141に登録する。すなわち、学習機構143は、デバイスAをアクセス番号を「1」として学習表141に登録し、デバイスEをアクセス番号を「2」として学習表141に登録する。以下同様に、学習機構143は、J→B→F→I→C→G→D→Hの順で学習表141にデバイスを登録する。 If access is performed in the order of device A → E → J → B → F → I → C → G → D → H, the learning mechanism 143 executes the access order learning process (1) and is accessed. Registered in the learning table 141 in the order of access. That is, the learning mechanism 143 registers the device A in the learning table 141 with the access number “1”, and registers the device E in the learning table 141 with the access number “2”. Similarly, the learning mechanism 143 registers devices in the learning table 141 in the order of J → B → F → I → C → G → D → H.
 そして、最後にアクセスされたデバイスHをアクセス番号を「10」として学習表141に登録した後、学習機構143は、決定表142のインデックス「0」に新たなエントリーを登録する。具体的には、学習機構143は、新たなエントリーとして、I2Cライブラリデバイスアドレスが「0x01E001A0」、ヘッダが「0xF0」、カウンタが「2」、ポインタが学習表141の先頭アドレスであるエントリーを決定表142に登録する。なお、決定表142のインデックス「0」に登録する理由は、最初にアクセスされたデバイスAのI2Cデバイスアドレスの下位4ビットが「0」であるためである。 Then, after registering the last accessed device H in the learning table 141 with the access number as “10”, the learning mechanism 143 registers a new entry in the index “0” of the decision table 142. Specifically, the learning mechanism 143 determines, as a new entry, an entry in which the I2C library device address is “0x01E001A0”, the header is “0xF0”, the counter is “2”, and the pointer is the start address of the learning table 141. 142. The reason for registering in the index “0” of the decision table 142 is that the lower 4 bits of the I2C device address of the device A accessed first is “0”.
 その後、学習機構143は、学習表141の最適化を行う(2)。すなわち、学習機構143は、マルチプレクサの切り替え回数が最小となるよう、学習表141に記録されたアクセス順序をソートする。I2Cライブラリデバイスアドレスは、上位3バイトでI2Cコントローラ番号、マルチプレクサアドレス、マルチプレクサポート番号が識別される。このため、I2Cライブラリデバイスアドレスの上位3バイトの情報でソートすることで、学習機構143は、I2Cマルチプレクサの切り替え回数が最小となる順序に学習表141を最適化できる。図8では、デバイスA→B→C→D→E→F→G→H→I→Jの順でアクセスが行われるように学習表142が最適化されている。 Thereafter, the learning mechanism 143 optimizes the learning table 141 (2). That is, the learning mechanism 143 sorts the access order recorded in the learning table 141 so that the number of times of multiplexer switching is minimized. The I2C library device address is identified by the upper 3 bytes of the I2C controller number, multiplexer address, and multiplexer port number. For this reason, the learning mechanism 143 can optimize the learning table 141 in an order that minimizes the number of times of switching of the I2C multiplexer by sorting the information by the upper 3 bytes of the I2C library device address. In FIG. 8, the learning table 142 is optimized so that access is performed in the order of devices A → B → C → D → E → F → G → H → I → J.
 図9は、図6の接続例に対する学習機構143による投機実行処理の詳細を説明するための図である。図9において、学習表141及び決定表142には、図8に示した学習処理の結果が登録されているとする。 FIG. 9 is a diagram for explaining the details of the speculative execution processing by the learning mechanism 143 for the connection example of FIG. In FIG. 9, it is assumed that the learning process 141 shown in FIG. 8 is registered in the learning table 141 and the decision table 142.
 アプリケーション130からデバイスAへのアクセスが行われると、学習機構143は決定表142の該当インデックスすなわちインデックス「0」を参照する(1)。すると、決定表142のI2Cライブラリデバイスアドレスとヘッダ情報がアプリケーション130からのアクセス指示と一致するので、学習機構143は、投機実行処理を行う(2)。 When the application 130 accesses the device A, the learning mechanism 143 refers to the corresponding index of the decision table 142, that is, the index “0” (1). Then, since the I2C library device address and the header information in the decision table 142 match the access instruction from the application 130, the learning mechanism 143 performs speculative execution processing (2).
 投機実行処理では、学習機構143は、学習表141を用いて、アクセス順序学習処理で最適化した順序でデバイスへのアクセスコマンドを先行発行する。そして、学習機構143は、先行発行で各デバイスから得た情報は、学習表141の先読み情報に記録する。図9では、デバイスA→B→C→D→E→F→G→H→I→Jの順でコマンドの先行発行が行われ、例えば、デバイスAからは「1」が得られ、デバイスBからは「2」が得られ、得られた値はそれぞれの先読み情報として学習表141に記録される。 In the speculative execution process, the learning mechanism 143 uses the learning table 141 to issue in advance an access command to the device in the order optimized by the access order learning process. Then, the learning mechanism 143 records the information obtained from each device by the pre-issuance in the prefetch information of the learning table 141. In FIG. 9, commands are issued in the order of device A → B → C → D → E → F → G → H → I → J. For example, “1” is obtained from device A, and device B “2” is obtained from the record, and the obtained value is recorded in the learning table 141 as the respective prefetch information.
 学習機構143は、アプリケーション130からの1番目のアクセスが実行された時点で投機実行処理を行い、学習表141のアクセス番号が「1」であるエントリーの先読み情報をアプリケーション130に返す(3)。そして、学習機構143は、2番目以降のアクセスで学習表141に記録されたI2Cライブラリデバイスアドレスとヘッダ情報がアプリケーション130から与えられた情報と一致する場合には、実際のデバイスアクセスは行わず、先行発行で得た先読み情報を返す。一方、アプリケーション130からの情報と一致しない場合には、学習機構143は、以降のアクセス番号の先読み情報は破棄し、従来のデバイスアクセス処理を実施する。 The learning mechanism 143 performs speculative execution processing when the first access from the application 130 is executed, and returns the prefetch information of the entry whose access number in the learning table 141 is “1” to the application 130 (3). Then, the learning mechanism 143 does not perform actual device access when the I2C library device address and the header information recorded in the learning table 141 in the second and subsequent accesses match the information given from the application 130. Returns prefetch information obtained in advance issue. On the other hand, if the information does not match the information from the application 130, the learning mechanism 143 discards the pre-read information of the subsequent access numbers and executes the conventional device access process.
 図9では、アプリケーション130はデバイスA→E→J→B→F→I→C→G→D→Hの順でアクセスを行っているが、投機実行処理により、I2Cライブラリ140はデバイスA→B→C→D→E→F→G→H→I→Jの順でアクセスを行っている。 In FIG. 9, the application 130 accesses devices A → E → J → B → F → I → C → G → D → H in this order, but the I2C library 140 is changed to the device A → B by speculative execution processing. Access is made in the order of C → D → E → F → G → H → I → J.
 なお、WRITE系のアクセスはハードウェアの状態を変えてしまい、リカバリ出来ないリスクが高いので、投機実行の対象はREAD系のアクセスである。例えば、何らかのハードウェア動作を指示するレジスタへのI2CWRITEをI2Cライブラリが予測に基づき発行し、後で予測とは異なった動作が検出された場合、開始された動作はリカバリされない。WRITE系のデータでも、状態ラッチのセットや、I2Cストレージデバイスへの保持データの書き込みであれば、再度上書きでWRITEすることでリカバリが可能ではある。しかしながら、一般的にそれらへの書き込みは何らかの状態/データ変化のストアであり、どのように変化するか(どのようなWRITEデータが発行されるか)はI2Cライブラリの上位側しか認識していないので、変化後の値は予測不可である。したがって、WRITE系のアクセスに対しては投機実行は行われない。 Note that the WRITE access changes the state of the hardware and has a high risk of being unrecoverable, so the speculative execution target is the READ access. For example, if the I2C library issues an I2CWRITE to a register that indicates some hardware operation based on the prediction, and an operation different from the prediction is detected later, the started operation is not recovered. Even for WRITE data, if the status latch is set or the retained data is written to the I2C storage device, the data can be recovered by overwriting again. However, generally, writing to them is a store of some state / data change, and only the upper side of the I2C library knows how it changes (what WRITE data is issued). The value after change is unpredictable. Therefore, speculative execution is not performed for WRITE access.
 次に、I2Cライブラリ140の処理手順について説明する。図10は、I2Cライブラリ140の処理手順を示すフローチャートである。なお、ここでは、I2Cライブラリ140は、アプリケーション130から学習機構開始指示を受け取った状態で、I2Cデバイス105及び205へのアクセスを行う関数呼び出しを受け付けたとする。 Next, the processing procedure of the I2C library 140 will be described. FIG. 10 is a flowchart showing the processing procedure of the I2C library 140. Here, it is assumed that the I2C library 140 receives a function call for accessing the I2C devices 105 and 205 in a state where the learning mechanism start instruction is received from the application 130.
 図10に示すように、I2Cライブラリ140は、関数呼び出しで指定されたI2Cライブラリデバイスアドレスを取得する(ステップS1)。そして、I2Cライブラリ140は、I2Cライブラリデバイスアドレスに着目し、決定表142を参照する(ステップS2)。 As shown in FIG. 10, the I2C library 140 acquires the I2C library device address specified by the function call (step S1). Then, the I2C library 140 focuses on the I2C library device address and refers to the determination table 142 (step S2).
 そして、I2Cライブラリ140は、投機実行が可能か否かを判定し(ステップS3)、可能でない場合には、I2Cデバイス105及び205へのアクセス順序を学習するか否かを判定する(ステップS4)。その結果、アクセス順序を学習しない場合には、I2Cライブラリ140は、従来と同様に学習のない処理を行う(ステップS5)。 Then, the I2C library 140 determines whether or not speculative execution is possible (step S3). If not, it determines whether or not to learn the access order to the I2C devices 105 and 205 (step S4). . As a result, when the access order is not learned, the I2C library 140 performs a process without learning as in the prior art (step S5).
 一方、アクセス順序を学習する場合には、I2Cライブラリ140は、学習処理、すなわち、アクセス順序記録処理を行う。具体的には、I2Cライブラリ140は、アプリケーション130から関数呼び出しを受け付けて処理を行うとともに、学習表141にI2Cデバイス105及び205へのアクセス順序を記録する(ステップS6)。 On the other hand, when learning the access order, the I2C library 140 performs a learning process, that is, an access order recording process. Specifically, the I2C library 140 receives a function call from the application 130 and performs processing, and records the access order to the I2C devices 105 and 205 in the learning table 141 (step S6).
 そして、アプリケーション130から、学習機構の終了指示を受け取ると、I2Cライブラリ140は、決定表142へのエントリーの登録を行い、I2Cマルチプレクサ104の切り替え回数が最小となる順序を決定する。すなわち、I2Cライブラリ140は、学習表141の記録内容をI2Cライブラリデバイスアドレスに基づいてソートする(ステップS7)。なお、決定表142へのエントリーの登録は学習開始時でもよい。 When receiving an instruction to end the learning mechanism from the application 130, the I2C library 140 registers an entry in the determination table 142, and determines the order in which the number of times of switching the I2C multiplexer 104 is minimized. That is, the I2C library 140 sorts the recorded contents of the learning table 141 based on the I2C library device address (step S7). Note that the entry may be registered in the decision table 142 at the start of learning.
 これに対して、投機実行が可能である場合には、I2Cライブラリ140は、投機実行を行い(ステップS8)、投機実行が成功したか否かを判定する(ステップS9)。その結果、投機実行が成功した場合には、決定表142のカウンタ値をカウントアップし(ステップS10)、投機実行が成功しなかった場合には、決定表142のカウンタ値をカウントダウンする(ステップS11)。 On the other hand, if speculative execution is possible, the I2C library 140 performs speculative execution (step S8) and determines whether or not speculative execution is successful (step S9). As a result, when the speculative execution is successful, the counter value of the determination table 142 is counted up (step S10), and when the speculative execution is not successful, the counter value of the determination table 142 is counted down (step S11). ).
 このように、I2Cライブラリ140が、学習表141及び決定表142を用いて、学習及び投機実行を行うことによって、I2Cデバイス105及び205へ順番にアクセスしていく場合のアクセス時間を短縮することができる。 As described above, the I2C library 140 performs learning and speculative execution using the learning table 141 and the decision table 142, thereby shortening the access time when sequentially accessing the I2C devices 105 and 205. it can.
 次に、I2Cライブラリ140の関数処理について説明する。図11は、I2Cライブラリ140の関数処理の処理手順を示すフローチャートである。なお、関数処理は、図10のステップS5で行われる処理であり、ステップS6でも処理の一部として行われる。 Next, the function processing of the I2C library 140 will be described. FIG. 11 is a flowchart showing the processing procedure of the function processing of the I2C library 140. The function process is a process performed in step S5 in FIG. 10, and is also performed as a part of the process in step S6.
 図11に示すように、I2Cライブラリ140は、受け付けた関数呼び出しがWRITEであるか否かを判定する(ステップS31)。その結果、受け付けた関数呼び出しがWRITEである場合には、I2Cライブラリ140は、MUX切り替えありか否か、すなわち、I2Cマルチプレクサ104の切り替えが必要か否かを判定し(ステップS32)、必要である場合には、MUX切り替えを行う。 As shown in FIG. 11, the I2C library 140 determines whether or not the accepted function call is WRITE (step S31). As a result, when the accepted function call is WRITE, the I2C library 140 determines whether or not there is MUX switching, that is, whether or not switching of the I2C multiplexer 104 is necessary (step S32), and is necessary. In this case, MUX switching is performed.
 具体的には、I2Cライブラリ140は、MUX切り替え処理として、MUX切り替えのためのWRITE起動処理を行い(ステップS33)、WRITEの完了を待つ(ステップS34)。そして、WRITEが完了すると、I2Cライブラリ140は、WRITE完了処理を行う(ステップS35)。 Specifically, the I2C library 140 performs a WRITE activation process for MUX switching as the MUX switching process (step S33), and waits for completion of WRITE (step S34). When WRITE is completed, the I2C library 140 performs WRITE completion processing (step S35).
 そして、I2Cライブラリ140は、WRITE処理を行う。すなわち、I2Cライブラリ140は、WRITE処理として、WRITE起動処理を行い(ステップS36)、WRITEの完了を待つ(ステップS37)。そして、WRITEが完了すると、I2Cライブラリ140は、WRITE完了処理を行う(ステップS38)。 Then, the I2C library 140 performs a WRITE process. That is, the I2C library 140 performs WRITE activation processing as WRITE processing (step S36), and waits for completion of WRITE (step S37). When WRITE is completed, the I2C library 140 performs WRITE completion processing (step S38).
 一方、受け付けた関数呼び出しがWRITEでない場合には、I2Cライブラリ140は、受け付けた関数呼び出しがREADであるか否かを判定する(ステップS39)。その結果、受け付けた関数呼び出しがREADでない場合には、I2Cライブラリ140は、処理を終了し、READである場合には、MUX切り替えありか否かを判定し(ステップS40)、必要である場合には、MUX切り替えを行う。 On the other hand, if the accepted function call is not WRITE, the I2C library 140 determines whether or not the accepted function call is READ (step S39). As a result, if the accepted function call is not READ, the I2C library 140 terminates the processing. If it is READ, it determines whether or not there is MUX switching (step S40). Performs MUX switching.
 具体的には、I2Cライブラリ140は、MUX切り替え処理として、MUX切り替えのためのWRITE起動処理を行い(ステップS41)、WRITEの完了を待つ(ステップS42)。そして、I2Cライブラリ140は、WRITEが完了すると、WRITE完了処理を行う(ステップS43)。 Specifically, the I2C library 140 performs WRITE activation processing for MUX switching (step S41) as MUX switching processing, and waits for completion of WRITE (step S42). Then, when the WRITE is completed, the I2C library 140 performs a WRITE completion process (step S43).
 そして、I2Cライブラリ140は、READ処理を行う。すなわち、I2Cライブラリ140は、READ処理として、READ起動処理を行い(ステップS44)、READの完了を待つ(ステップS45)。そして、READが完了すると、I2Cライブラリ140は、READ完了処理を行う(ステップS46)。 Then, the I2C library 140 performs a READ process. That is, the I2C library 140 performs a READ activation process as a READ process (step S44) and waits for completion of the READ (step S45). When the READ is completed, the I2C library 140 performs a READ completion process (step S46).
 このように、I2Cライブラリ140は、MUX切り替えがある場合にはMUX切り替え処理を行う。したがって、I2Cデバイス105及び205に順番にアクセスする場合、MUX切り替えの数を減らすことによって、I2Cライブラリ140は、アクセス時間を短縮することができる。 Thus, the I2C library 140 performs MUX switching processing when there is MUX switching. Therefore, when accessing the I2C devices 105 and 205 in order, the I2C library 140 can shorten the access time by reducing the number of MUX switching.
 次に、学習機構143による学習及び投機実行の処理手順について説明する。図12A及び図12Bは、学習機構143による学習及び投機実行の処理手順を示すフローチャートである。 Next, processing procedures for learning and speculative execution by the learning mechanism 143 will be described. FIG. 12A and FIG. 12B are flowcharts showing the processing procedure of learning and speculative execution by the learning mechanism 143.
 図12Aに示すように、学習機構143は、アプリケーション130が指定する1番目のI2Cデバイスアドレスから決定表142のインデックスを決定する(ステップS51)。そして、学習機構143は、アプリケーション130が指定する1番目のデバイスアクセスと決定表142でインデックスで特定されるデバイスアクセスを比較し(ステップS52)、一致するか否かを判定する。 As shown in FIG. 12A, the learning mechanism 143 determines the index of the determination table 142 from the first I2C device address designated by the application 130 (step S51). Then, the learning mechanism 143 compares the first device access specified by the application 130 with the device access specified by the index in the determination table 142 (step S52), and determines whether or not they match.
 その結果、一致しない場合、すなわち、他のデバイスへのアクセスが登録されているか、あるいは、学習が行われていない場合には、学習機構143は、決定表142でインデックスに対応する記録情報の重みを判定する(ステップS53)。具体的には、学習機構143は、決定表142でインデックスで特定されるカウンタの値が閾値以上であるか否かを判定する。 As a result, if they do not match, that is, if access to another device is registered or learning is not performed, the learning mechanism 143 uses the weight of the recording information corresponding to the index in the decision table 142. Is determined (step S53). Specifically, the learning mechanism 143 determines whether or not the value of the counter specified by the index in the determination table 142 is greater than or equal to a threshold value.
 その結果、カウンタの値が閾値以上でない場合は、学習機構143は、記録情報の重みが小さく学習表141の上書きを行うべきと判断し、学習を行う。すなわち、学習機構143は、デバイスアクセスを学習表141に記録し(ステップS54)、必要に応じてMUXの切り替えを行って(ステップS55)、デバイスアクセスを行う(ステップS56)。 As a result, when the value of the counter is not equal to or greater than the threshold value, the learning mechanism 143 determines that the weight of the recorded information is small and the learning table 141 should be overwritten, and performs learning. That is, the learning mechanism 143 records device access in the learning table 141 (step S54), performs MUX switching as necessary (step S55), and performs device access (step S56).
 そして、学習機構143は、デバイスアクセスが終了したか否かを判定し(ステップS57)、終了しない場合には、ステップS54に戻り次のデバイスアクセスを処理する。一方、終了した場合には、学習機構143は、決定表142への登録を行い(ステップS58)、学習内容をI2Cデバイスライブラリアドレスに基づいてソートして学習表141を最適化する(ステップS59)。なお、学習機構143は、アプリケーション130から学習機構終了指示を受け取ることによって、デバイスアクセスが終了したと判定する。 Then, the learning mechanism 143 determines whether or not the device access has ended (step S57), and if not completed, returns to step S54 to process the next device access. On the other hand, if completed, the learning mechanism 143 performs registration in the determination table 142 (step S58), and sorts the learning contents based on the I2C device library address to optimize the learning table 141 (step S59). . The learning mechanism 143 receives the learning mechanism end instruction from the application 130 and determines that the device access has ended.
 これに対して、カウンタの値が閾値以上である場合は、学習機構143は、記録情報の重みが大きく学習表141の上書きは不要と判断し、学習を行わない従来の処理を行う。具体的には、学習機構143は、必要に応じてMUXの切り替えを行って(ステップS60)、デバイスアクセスを行う(ステップS61)。 On the other hand, when the value of the counter is equal to or greater than the threshold value, the learning mechanism 143 determines that the weight of the recorded information is large and that the learning table 141 is not overwritten, and performs a conventional process that does not perform learning. Specifically, the learning mechanism 143 performs MUX switching as necessary (step S60) and performs device access (step S61).
 そして、学習機構143は、デバイスアクセスが終了したか否かを判定し(ステップS62)、終了していない場合には、ステップS60に戻り次のデバイスアクセスを処理し、デバイスアクセスが終了した場合には、処理を終了する。 Then, the learning mechanism 143 determines whether or not the device access has ended (step S62). If it has not ended, the learning mechanism 143 returns to step S60 to process the next device access, and when the device access has ended. Ends the process.
 また、ステップS52において、アプリケーション130が指定する1番目のデバイスアクセスと決定表142でインデックスで特定されるデバイスアクセスが一致すると判定した場合には、学習機構143は、図12Bに示す処理を行う。すなわち、学習機構143は、カウンタの値を比較し(ステップS63)、カウンタの値が閾値よりも小さい場合は、学習表141の重みが小さく、学習によって上書きを行うために、一時記録用の学習表を用意する(ステップS64)。 If it is determined in step S52 that the first device access specified by the application 130 matches the device access specified by the index in the determination table 142, the learning mechanism 143 performs the process shown in FIG. 12B. That is, the learning mechanism 143 compares the counter values (step S63). If the counter value is smaller than the threshold value, the learning table 141 has a small weight, and learning is performed for temporary recording in order to perform overwriting by learning. A table is prepared (step S64).
 そして、学習機構143は、学習表141の情報からコマンドの先行発行を開始する(ステップS65)。すなわち、学習機構143は、MUX切り替えを行い(ステップS66)、デバイスにアクセスする(ステップS67)。そして、学習機構143は、読み取り内容を学習表141の対応する先読み情報フィールドに保存し(ステップS68)、学習表141に基づき全アドレスにアクセス済か否かを判定する(ステップS69)。 Then, the learning mechanism 143 starts issuing commands in advance from the information in the learning table 141 (step S65). That is, the learning mechanism 143 performs MUX switching (step S66) and accesses the device (step S67). Then, the learning mechanism 143 stores the read contents in the corresponding prefetch information field of the learning table 141 (step S68), and determines whether all addresses have been accessed based on the learning table 141 (step S69).
 その結果、全アドレスにアクセス済である場合には、学習機構143は、コマンドの先行発行を終了し、確定処理を行う(ステップS70)。一方、アクセス済でないアドレスがある場合には、学習機構143は、MUXアドレスの比較、すなわち、マルチプレクサアドレスの比較を行う(ステップS71)。そして、学習機構143は、一致しない場合には、ステップS66に戻り、一致する場合には、MUX切り替えは不要なので、ステップS67に戻る。 As a result, when all addresses have been accessed, the learning mechanism 143 ends the command issuance, and performs a confirmation process (step S70). On the other hand, if there is an address that has not been accessed, the learning mechanism 143 compares the MUX address, that is, compares the multiplexer address (step S71). Then, the learning mechanism 143 returns to step S66 if they do not match, and returns to step S67 if they match because the MUX switching is unnecessary.
 このように、学習機構143は、学習表141及び決定表142を用いて、学習及び投機実行の処理を行うことで、I2Cデバイス105及び205に順番にアクセスする場合のアクセス時間を短縮することができる。 In this way, the learning mechanism 143 can shorten the access time when accessing the I2C devices 105 and 205 in order by performing learning and speculative execution processing using the learning table 141 and the decision table 142. it can.
 次に、確定処理の処理手順について説明する。図13は、確定処理の処理手順を示すフローチャートである。図13に示すように、学習機構143は、コマンドの先行発行が終了後に、アプリケーション130のデバイスアクセス関数呼び出しを受け付ける(ステップS81)と、一時記録用の学習表が用意されているか否かを判定する(ステップS82)。その結果、一時記録用の学習表が用意されている場合には、学習機構143は、一時記録用の学習表にアクセス情報を記録する(ステップS83)。 Next, the processing procedure of the confirmation process will be described. FIG. 13 is a flowchart showing the procedure of the confirmation process. As shown in FIG. 13, the learning mechanism 143 accepts a device access function call of the application 130 after the command issuance is completed (step S81), and determines whether or not a temporary recording learning table is prepared. (Step S82). As a result, when the learning table for temporary recording is prepared, the learning mechanism 143 records the access information in the learning table for temporary recording (step S83).
 そして、学習機構143は、アプリケーション130からのデバイスアクセス関数呼び出しがn番目であるとすると、n番目のアクセスと学習表141のn番目のアクセスを比較し(ステップS84)、一致するか否かを判定する。 Then, if the device access function call from the application 130 is n-th, the learning mechanism 143 compares the n-th access with the n-th access in the learning table 141 (step S84) and determines whether or not they match. judge.
 その結果、一致する場合には、学習したとおりの順番でデバイスアクセス関数の呼び出しが行われているので、学習機構143は、コマンドの先行発行で学習表141に記録した先読み情報を返す(ステップS85)。そして、全てのアクセスが終了したか否かを判定し(ステップS86)、終了していないアクセスがある場合には、学習機構143は、ステップS81に戻って次のデバイスアクセス関数呼び出しを処理する。 As a result, if they match, the device access functions are called in the learned order, so that the learning mechanism 143 returns the prefetch information recorded in the learning table 141 by the prior issue of the command (step S85). ). Then, it is determined whether or not all accesses have been completed (step S86). If there is an access that has not been completed, the learning mechanism 143 returns to step S81 to process the next device access function call.
 一方、全てのアクセスが終了した場合には、学習機構143は、全アクセス情報が先読み情報から返されたか否かを判定する(ステップS87)。そして、全アクセス情報が先読み情報から返された場合には、学習したとおりの順番でデバイスアクセス関数の呼び出しが完了したので、学習機構143は、決定表142の対応するカウンタをインクリメントする(ステップS89)。これに対して、返されていない先読み情報が学習表141にある場合、学習機構143は、決定表142の対応するカウンタをデクリメントし(ステップS88)、ステップS97へ進む。 On the other hand, if all accesses have been completed, the learning mechanism 143 determines whether or not all access information has been returned from the prefetch information (step S87). When all the access information is returned from the prefetch information, the learning mechanism 143 increments the corresponding counter of the decision table 142 because the device access function call has been completed in the learned order (step S89). ). On the other hand, when the prefetch information not returned is in the learning table 141, the learning mechanism 143 decrements the corresponding counter of the determination table 142 (step S88), and proceeds to step S97.
 また、ステップS84において、n番目のアクセスと学習表141のn番目のアクセスが一致しない場合は、学習機構143は、決定表142の対応するカウンタをデクリメントする(ステップS90)。ここで、n番目のアクセスと学習表141のn番目のアクセスが一致しない場合とは、アプリケーション130が学習表141と異なるアクセスを行っている場合である。 In step S84, if the nth access does not match the nth access in the learning table 141, the learning mechanism 143 decrements the corresponding counter in the decision table 142 (step S90). Here, the case where the n-th access and the n-th access in the learning table 141 do not match each other is a case where the application 130 is accessing differently from the learning table 141.
 そして、学習機構143は、アプリケーション130のデバイスアクセス関数呼び出しを受け付け(ステップS91)、一時記録用の学習表が用意されているか否かを判定する(ステップS92)。その結果、一時記録用の学習表が用意されている場合には、学習機構143は、一時記録用の学習表にアクセス情報を記録する(ステップS93)。 Then, the learning mechanism 143 receives the device access function call of the application 130 (step S91), and determines whether or not a temporary recording learning table is prepared (step S92). As a result, when a learning table for temporary recording is prepared, the learning mechanism 143 records access information in the learning table for temporary recording (step S93).
 そして、学習機構143は、必要に応じてMUXの切り替えを行って(ステップS94)、デバイスアクセスを行う(ステップS95)。そして、学習機構143は、全てのデバイスアクセスが終了したか否かを判定し(ステップS96)、終了していない場合には、ステップS91に戻り次のデバイスアクセスを処理する。 The learning mechanism 143 performs MUX switching as necessary (step S94) and performs device access (step S95). Then, the learning mechanism 143 determines whether or not all device accesses have been completed (step S96). If not completed, the learning mechanism 143 returns to step S91 to process the next device access.
 一方、全てのデバイスアクセスが終了した場合には、学習機構143はカウンタの値と閾値を比較する(ステップS97)。そして、カウンタの値が閾値より小さい場合には、学習機構143は、学習表141を一時記録用の学習表で差し替え(ステップS98)、学習内容をI2Cライブラリデバイスアドレスでソートし、学習表141を最適化する(ステップS99)。 On the other hand, when all the device accesses are completed, the learning mechanism 143 compares the counter value with the threshold value (step S97). If the counter value is smaller than the threshold value, the learning mechanism 143 replaces the learning table 141 with the temporary recording learning table (step S98), sorts the learning contents by the I2C library device address, and stores the learning table 141. Optimize (step S99).
 このように、学習機構143は、確定処理を行うことで、先行発行したコマンドに対応する関数呼び出しがアプリケーション130から行われたときに、正しく応答することができる。 As described above, the learning mechanism 143 can correctly respond when the function call corresponding to the previously issued command is performed from the application 130 by performing the confirmation process.
 次に、監視アプリケーションがI2Cマルチプレクサ配下の5V電源センサ及び10V電源センサの値を読み出す場合の学習及び投機実行について、図14~図17Bを用いて説明する。 Next, learning and speculative execution when the monitoring application reads the values of the 5V power sensor and the 10V power sensor under the I2C multiplexer will be described with reference to FIGS. 14 to 17B.
 図14は、I2Cマルチプレクサ配下の5V電源センサ及び10V電源センサの例を示す図である。図14に示すように、I2Cマルチプレクサ501のポート1には5V電源センサAと10V電源センサAが接続され、I2Cマルチプレクサ501のポート2には5V電源センサBと10V電源センサBが接続されている。また、I2Cマルチプレクサ501はI2Cコントローラ502に接続されている。 FIG. 14 is a diagram illustrating an example of a 5V power supply sensor and a 10V power supply sensor under the I2C multiplexer. As shown in FIG. 14, 5V power sensor A and 10V power sensor A are connected to port 1 of I2C multiplexer 501, and 5V power sensor B and 10V power sensor B are connected to port 2 of I2C multiplexer 501. . The I2C multiplexer 501 is connected to the I2C controller 502.
 また、5V電源センサAのI2Cデバイスアドレスは「0x01」であり、10V電源センサAのI2Cデバイスアドレスは「0x02」である。5V電源センサBのI2Cデバイスアドレスは「0x01」であり、10V電源センサAのI2Cデバイスアドレスは「0x02」である。I2Cマルチプレクサのマルチプレクサアドレスは「0x01」であり、ポート1のマルチプレクサポート番号は「0x01」であり、ポート2のマルチプレクサポート番号は「0x02」である。I2Cコントローラ502のI2Cコントローラ番号は「0x01」である。 Further, the I2C device address of the 5V power supply sensor A is “0x01”, and the I2C device address of the 10V power supply sensor A is “0x02”. The I2C device address of the 5V power supply sensor B is “0x01”, and the I2C device address of the 10V power supply sensor A is “0x02”. The multiplexer address of the I2C multiplexer is “0x01”, the multiplexer port number of port 1 is “0x01”, and the multiplexer port number of port 2 is “0x02”. The I2C controller number of the I2C controller 502 is “0x01”.
 I2Cライブラリ140は、監視アプリケーションからの指示に基づいてI2Cコントローラ502を駆動することにより、5V電源センサ及び10V電源センサの値を読み出す。監視アプリケーションは5V電源センサ、10V電源センサの順で監視を行うため、5V電源センサA→5V電源センサB→10V電源センサA→10V電源センサBの順でI2Cライブラリ140のデバイスアクセス関数を呼び出す。また、監視アプリケーションは、I2Cライブラリ140に対して学習機構の開始及び終了の指示を出す。 The I2C library 140 reads the values of the 5V power sensor and the 10V power sensor by driving the I2C controller 502 based on an instruction from the monitoring application. Since the monitoring application performs monitoring in the order of the 5V power sensor and the 10V power sensor, the device access function of the I2C library 140 is called in the order of 5V power sensor A → 5V power sensor B → 10V power sensor A → 10V power sensor B. In addition, the monitoring application issues a learning mechanism start and end instruction to the I2C library 140.
 図15は、最適化前後での学習表141を示す図である。図15に示すように、最適前の学習表141には、監視アプリケーションがアクセスする5V電源センサA→5V電源センサB→10V電源センサA→10V電源センサBの順にデバイスアクセスが記録される。一方、最適後の学習表141には、I2Cライブラリデバイスアドレスを用いてソートされた順序で、すなわち、5V電源センサA→10V電源センサA→5V電源センサB→10V電源センサBの順序でデバイスアクセスが記録される。 FIG. 15 is a diagram showing the learning table 141 before and after optimization. As shown in FIG. 15, the pre-optimal learning table 141 records device accesses in the order of 5V power sensor A → 5V power sensor B → 10V power sensor A → 10V power sensor B accessed by the monitoring application. On the other hand, in the learning table 141 after optimization, device access is performed in the order sorted using the I2C library device address, that is, in the order of 5 V power sensor A → 10 V power sensor A → 5 V power sensor B → 10 V power sensor B. Is recorded.
 図16は、学習後の決定表142を示す図である。図16に示すように、I2Cライブラリ140は、一番目にアクセスされる5V電源センサAのI2Cライブラリデバイスアドレス、ヘッダ、カウンタ及びポインタを記録する。カウンタの値は閾値である「2」に初期化され、ポインタには学習表141のアドレスである「0x80000000」が格納される。 FIG. 16 is a diagram showing the determination table 142 after learning. As shown in FIG. 16, the I2C library 140 records the I2C library device address, header, counter, and pointer of the 5V power supply sensor A that is accessed first. The counter value is initialized to “2” which is a threshold value, and “0x80000000” which is the address of the learning table 141 is stored in the pointer.
 そして、I2Cライブラリ140は、図15に示したように、学習表141にアクセス番号、デバイスアドレス、ヘッダを記録しながらI2Cマルチプレクサ切り替えとデバイスアクセスを行う。なお、ここでは、最初のデバイスアクセスが行われたときに決定表142への登録が行われる場合を示すが、図12Aに示したように、全てのデバイスアクセスが終了した時点で決定表142への登録が行われてもよい。 Then, as shown in FIG. 15, the I2C library 140 performs I2C multiplexer switching and device access while recording the access number, device address, and header in the learning table 141. Here, the case where registration to the decision table 142 is performed when the first device access is performed is shown, but as shown in FIG. 12A, the decision table 142 is entered when all device accesses are completed. May be registered.
 図17Aは、学習時のファームウェア120の動作を示すシーケンス図であり、図17Bは、投機実行時のファームウェア120の動作を示すシーケンス図である。 FIG. 17A is a sequence diagram illustrating the operation of the firmware 120 during learning, and FIG. 17B is a sequence diagram illustrating the operation of the firmware 120 during speculative execution.
 図17Aに示すように、監視アプリケーションはI2Cライブラリ140に対して学習機構開始操作を行い(ステップS201)、I2Cライブラリ140は監視アプリケーションに学習機構開始を応答する(ステップS202)。 As shown in FIG. 17A, the monitoring application performs a learning mechanism start operation on the I2C library 140 (step S201), and the I2C library 140 responds to the monitoring application to start the learning mechanism (step S202).
 そして、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010101」を引数としてREAD関数を呼び出す(ステップS203)。すると、I2Cライブラリ140は、決定表142のインデックス決め、決定表142への登録を行い(ステップS204)、学習表141との関連づけを行う(ステップS205)。 Then, the monitoring application calls the READ function with the I2C library device address “0x01010101” as an argument (step S203). Then, the I2C library 140 determines the index of the determination table 142, registers it in the determination table 142 (step S204), and associates it with the learning table 141 (step S205).
 そして、I2Cライブラリ140は、学習表141にアクセス順序を記録し(ステップS206)、ポート1への切り替えを行う(ステップS207)。そして、I2Cライブラリ140は、5V電源センサAの値を読み込み(ステップS208)、値を監視アプリケーションに返す(ステップS209)。 Then, the I2C library 140 records the access order in the learning table 141 (step S206), and switches to port 1 (step S207). Then, the I2C library 140 reads the value of the 5V power supply sensor A (step S208) and returns the value to the monitoring application (step S209).
 その後、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010201」を引数としてREAD関数を呼び出す(ステップS210)。すると、I2Cライブラリ140は、学習表141にアクセス順序を記録し(ステップS211)、ポートへの切り替えを行う(ステップS212)。そして、I2Cライブラリ140は、5V電源センサBの値を読み込み(ステップS213)、値を監視アプリケーションに返す(ステップS214)。 Thereafter, the monitoring application calls the READ function with the I2C library device address “0x01010201” as an argument (step S210). Then, the I2C library 140 records the access order in the learning table 141 (step S211), and switches to port 2 (step S212). Then, the I2C library 140 reads the value of the 5V power supply sensor B (step S213) and returns the value to the monitoring application (step S214).
 その後、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010102」を引数としてREAD関数を呼び出す(ステップS215)。すると、I2Cライブラリ140は、学習表141にアクセス順序を記録し(ステップS216)、ポート1への切り替えを行う(ステップS217)。そして、I2Cライブラリ140は、10V電源センサAの値を読み込み(ステップS218)、値を監視アプリケーションに返す(ステップS219)。 Thereafter, the monitoring application calls the READ function with the I2C library device address “0x01010102” as an argument (step S215). Then, the I2C library 140 records the access order in the learning table 141 (step S216), and switches to port 1 (step S217). Then, the I2C library 140 reads the value of the 10V power supply sensor A (step S218) and returns the value to the monitoring application (step S219).
 その後、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010202」を引数としてREAD関数を呼び出す(ステップS220)。すると、I2Cライブラリ140は、学習表141にアクセス順序を記録し(ステップS221)、ポート2への切り替えを行う(ステップS222)。そして、I2Cライブラリ140は、10V電源センサBの値を読み込み(ステップS223)、値を監視アプリケーションに返す(ステップS224)。そして、監視アプリケーションは、I2Cライブラリ140に対して学習機構終了操作を行う(ステップS225)。すると、I2Cライブラリ140は、学習表141の最適化を行い(ステップS226)、監視アプリケーションに学習機構終了を応答する(ステップS227)。 Thereafter, the monitoring application calls the READ function with the I2C library device address “0x01010202” as an argument (step S220). Then, the I2C library 140 records the access order in the learning table 141 (step S221), and switches to port 2 (step S222). Then, the I2C library 140 reads the value of the 10V power supply sensor B (step S223) and returns the value to the monitoring application (step S224). Then, the monitoring application performs a learning mechanism end operation on the I2C library 140 (step S225). Then, the I2C library 140 optimizes the learning table 141 (step S226), and returns a learning mechanism end response to the monitoring application (step S227).
 また、図17Bに示すように、監視アプリケーションはI2Cライブラリ140に対して学習機構開始操作を行い(ステップS261)、I2Cライブラリ140は監視アプリケーションに学習機構開始を応答する(ステップS262)。 Further, as shown in FIG. 17B, the monitoring application performs a learning mechanism start operation on the I2C library 140 (step S261), and the I2C library 140 responds to the monitoring application to start the learning mechanism (step S262).
 そして、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010101」を引数としてREAD関数を呼び出す(ステップS263)。すると、I2Cライブラリ140は、決定表142のインデックス決め、決定表142の参照を行い(ステップS264)、学習表141へのポインタを取得する(ステップS265)。 Then, the monitoring application calls the READ function with the I2C library device address “0x01010101” as an argument (step S263). Then, the I2C library 140 determines the index of the determination table 142, refers to the determination table 142 (step S264), and acquires a pointer to the learning table 141 (step S265).
 そして、I2Cライブラリ140は、ポート1への切り替えを行い(ステップS266)、学習表141に基づいて、5V電源センサAの値を読み込み(ステップS267)、10V電源センサAの値を読み込む(ステップS268)。そして、I2Cライブラリ140は、学習表141に基づいて、ポート2への切り替えを行い(ステップS269)、5V電源センサBの値を読み込み(ステップS270)、10V電源センサBの値を読み込む(ステップS271)。そして、I2Cライブラリ140は、5V電源センサAの値を監視アプリケーションに返す(ステップS272)。 Then, the I2C library 140 switches to port 1 (step S266), reads the value of the 5V power supply sensor A based on the learning table 141 (step S267), and reads the value of the 10V power supply sensor A (step S268). ). The I2C library 140 then switches to port 2 based on the learning table 141 (step S269), reads the value of the 5V power supply sensor B (step S270), and reads the value of the 10V power supply sensor B (step S271). ). Then, the I2C library 140 returns the value of the 5V power supply sensor A to the monitoring application (step S272).
 その後、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010201」を引数としてREAD関数を呼び出す(ステップS273)。すると、I2Cライブラリ140は、学習表141を参照し(ステップS274)、先読み情報を取得する(ステップS275)。そして、I2Cライブラリ140は、取得した先読み情報を監視アプリケーションに返す(ステップS276)。 Thereafter, the monitoring application calls the READ function with the I2C library device address “0x01010201” as an argument (step S273). Then, the I2C library 140 refers to the learning table 141 (step S274) and acquires prefetch information (step S275). Then, the I2C library 140 returns the acquired prefetch information to the monitoring application (step S276).
 その後、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010102」を引数としてREAD関数を呼び出す(ステップS277)。すると、I2Cライブラリ140は、学習表141を参照し(ステップS278)、先読み情報を取得する(ステップS279)。そして、I2Cライブラリ140は、取得した先読み情報を監視アプリケーションに返す(ステップS280)。 Thereafter, the monitoring application calls the READ function with the I2C library device address “0x01010102” as an argument (step S277). Then, the I2C library 140 refers to the learning table 141 (step S278) and acquires prefetch information (step S279). Then, the I2C library 140 returns the acquired prefetch information to the monitoring application (step S280).
 その後、監視アプリケーションは、I2Cライブラリデバイスアドレス「0x01010202」を引数としてREAD関数を呼び出す(ステップS281)。すると、I2Cライブラリ140は、学習表141を参照し(ステップS282)、先読み情報を取得する(ステップS283)。そして、I2Cライブラリ140は、取得した先読み情報を監視アプリケーションに返す(ステップS284)。 Thereafter, the monitoring application calls the READ function with the I2C library device address “0x01010202” as an argument (step S281). Then, the I2C library 140 refers to the learning table 141 (step S282) and acquires prefetch information (step S283). Then, the I2C library 140 returns the acquired prefetch information to the monitoring application (step S284).
 そして、監視アプリケーションは、I2Cライブラリ140に対して学習機構終了操作を行う(ステップS285)。すると、I2Cライブラリ140は、監視アプリケーションに学習機構終了を応答する(ステップS286)。 Then, the monitoring application performs a learning mechanism end operation on the I2C library 140 (step S285). Then, the I2C library 140 sends a learning mechanism end response to the monitoring application (step S286).
 上述してきたように、本実施例では、学習表141が、I2Cマルチプレクサ104の切り替え回数が最小になるようにデバイスアクセス順序を記憶する。そして、学習機構143は、アプリケーション130によって学習表141の最初に記憶されたデバイスアクセスが行われると、学習表141に記憶された順序でデバイスアクセスの投機実行を行う。したがって、I2Cライブラリ140は、I2Cマルチプレクサ104のバス切り替えに起因するアクセス時間の増加を防ぐことができる。 As described above, in this embodiment, the learning table 141 stores the device access order so that the number of times of switching the I2C multiplexer 104 is minimized. When the device access stored in the learning table 141 is first performed by the application 130, the learning mechanism 143 performs speculative execution of device access in the order stored in the learning table 141. Therefore, the I2C library 140 can prevent an increase in access time due to the bus switching of the I2C multiplexer 104.
 また、本実施例では、学習機構143は、アプリケーション130によるデバイスアクセスを学習し、I2Cマルチプレクサ104の切り替え回数が最小になるように最適化して学習表141に格納する。したがって、I2Cライブラリ140は、自動で学習表141を作成することができる。 Also, in this embodiment, the learning mechanism 143 learns device access by the application 130, optimizes the switching frequency of the I2C multiplexer 104, and stores it in the learning table 141. Therefore, the I2C library 140 can automatically create the learning table 141.
 また、本実施例では、決定表142が、学習されたデバイスアクセス順序の先頭のデバイスアクセスに関する情報を記憶する。したがって、学習機構143は、アプリケーション130によって最初にデバイスアクセスが行われた際に、決定表142を参照して、投機実行が可能か否かを簡単に判定することができる。 In this embodiment, the determination table 142 stores information related to the first device access in the learned device access order. Therefore, when the device 130 is first accessed by the application 130, the learning mechanism 143 can easily determine whether or not speculative execution is possible with reference to the determination table 142.
 また、本実施例では、学習機構143は、デバイスへのアクセスコマンドの先行発行がアプリケーション130からの実際のアクセスと一致するか否かを判定する。そして、学習機構143による判定結果に基づいて増減される重みを決定表142がデバイスアクセス順序毎に記憶する。したがって、学習機構143は、学習されたデバイスアクセス順序の再現性を重みを用いて評価し、評価結果に基づいて学習表141の更新を制御することができる。 Also, in this embodiment, the learning mechanism 143 determines whether or not the prior issue of the access command to the device matches the actual access from the application 130. Then, the determination table 142 stores the weight that is increased or decreased based on the determination result by the learning mechanism 143 for each device access order. Therefore, the learning mechanism 143 can evaluate the reproducibility of the learned device access order using the weight, and can control the update of the learning table 141 based on the evaluation result.
 なお、本実施例では、I2Cバスについて説明したが、本発明はこれに限定されるものではなく、マルチプレクサを挟んでコントローラとデバイスとを接続するバスに同様に適用することができる。 In this embodiment, the I2C bus has been described. However, the present invention is not limited to this, and can be similarly applied to a bus that connects a controller and a device with a multiplexer interposed therebetween.
 また、本実施例では、学習機構143が投機実行を行う場合について説明した。しかしながら、本発明はこれに限定されるものではなく、投機実行を行うことなく、アプリケーション130からの関数呼び出しを受け付けた際にデバイスアクセスを実行する場合にも同様に適用することができる。 In the present embodiment, the case where the learning mechanism 143 performs speculative execution has been described. However, the present invention is not limited to this, and can be similarly applied to a case where device access is executed when a function call from the application 130 is received without performing speculative execution.
 また、本実施例では、制御ボード100とターゲットボード200~400を有する情報処理装置1について説明したが、本発明はこれに限定されるものではない。すなわち、本発明は、CPUとメモリとコントローラとマルチプレクサとデバイスとを有し、マルチプレクサを挟んでコントローラにデバイスがバス接続される情報処理装置にも同様に適用することができる。 In this embodiment, the information processing apparatus 1 having the control board 100 and the target boards 200 to 400 has been described. However, the present invention is not limited to this. That is, the present invention can be similarly applied to an information processing apparatus that includes a CPU, a memory, a controller, a multiplexer, and a device, and the device is bus-connected to the controller via the multiplexer.
  1  情報処理装置
100  制御ボード
101  MPU
102  メモリ
103,203  制御FPGA
104  I2Cマルチプレクサ
105,205  I2Cデバイス
106,206  I2Cバス
110,210  I2Cコントローラ
120  ファームウェア
130  アプリケーション
140  I2Cライブラリ
141  学習表
142  決定表
143  学習機構
144  コマンド発行部
150  ドライバ
151  I2Cドライバ
152  FPGAドライバ
200~400  ターゲットボード
501  I2Cマルチプレクサ
502  I2Cコントローラ
1 Information processing apparatus 100 Control board 101 MPU
102 Memory 103, 203 Control FPGA
104 I2C multiplexer 105, 205 I2C device 106, 206 I2C bus 110, 210 I2C controller 120 Firmware 130 Application 140 I2C library 141 Learning table 142 Decision table 143 Learning mechanism 144 Command issuing unit 150 Driver 151 I2C driver 152 FPGA driver 200-400 Target Board 501 I2C multiplexer 502 I2C controller

Claims (8)

  1.  マルチプレクサを経由した複数のデバイスへのアクセスにおいてマルチプレクサの切り替え数に基づいて決定されたアクセス順序を記憶したアクセス順序記憶部と、
     前記アクセス順序記憶部が記憶するアクセス順序に従って前記複数のデバイスへのアクセスを実行する実行部と
     を有することを特徴とする制御装置。
    An access order storage unit that stores an access order determined based on the number of switching multiplexers in accessing a plurality of devices via the multiplexer;
    And an execution unit that executes access to the plurality of devices according to an access order stored in the access order storage unit.
  2.  前記複数のデバイスに対して行われたアクセス順序を学習し、該学習したアクセス順序をマルチプレクサの切り替え数が最小になるように入れ替えて前記アクセス順序記憶部に格納する学習部をさらに有することを特徴とする請求項1に記載の制御装置。 It further comprises a learning unit that learns the access order performed on the plurality of devices, replaces the learned access order so that the number of multiplexer switching is minimized, and stores the learning order in the access order storage unit. The control device according to claim 1.
  3.  前記学習部により前記アクセス順序記憶部に格納されたアクセス順序の有無を判定する判定部をさらに備え、
     前記実行部は、前記判定部により前記アクセス順序があると判定された場合に、前記アクセス順序に従って前記複数のデバイスへのアクセスを実行し、
     前記学習部は、前記判定部により前記アクセス順序がないと判定された場合に前記アクセス順序を学習し、該学習したアクセス順序をマルチプレクサの切り替え数が最小になるように入れ替えて前記アクセス順序記憶部に格納することを特徴とする請求項2に記載の制御装置。
    A determination unit for determining the presence or absence of an access order stored in the access order storage unit by the learning unit;
    The execution unit executes access to the plurality of devices according to the access order when the determination unit determines that the access order is present,
    The learning unit learns the access order when the determination unit determines that the access order is not present, and replaces the learned access order so that the number of multiplexer switching is minimized, and the access order storage unit The control device according to claim 2, wherein the control device is stored in the control device.
  4.  前記判定部は、最初のデバイスへのアクセスが要求された場合に前記有無を判定し、
     前記実行部は、前記アクセス順序に従って前記複数のデバイスへのアクセスを投機的に実行して実行結果を記憶し、投機的にアクセスを実行したデバイスについてのアクセス要求をアプリケーションから投機実行後に受け付けて、記憶した実行結果を応答することを特徴とする請求項3に記載の制御装置。
    The determination unit determines the presence or absence when access to the first device is requested,
    The execution unit speculatively executes access to the plurality of devices according to the access order, stores an execution result, accepts an access request for a device that has speculatively accessed from the application after speculative execution, The control apparatus according to claim 3, wherein the stored execution result is responded.
  5.  前記実行部は、投機的な実行の順序がアプリケーションからのアクセス要求の順序と一致するか否かを判定し、判定結果に基づいて前記アクセス順序記憶部の更新を制御することを特徴とする請求項4に記載の制御装置。 The execution unit determines whether or not a speculative execution order matches an access request order from an application, and controls updating of the access order storage unit based on a determination result. Item 5. The control device according to Item 4.
  6.  マルチプレクサを経由した複数のデバイスへのアクセスにおいてマルチプレクサの切り替え数に基づいて決定されたアクセス順序をアクセス順序記憶部に格納し、
     前記アクセス順序記憶部に格納したアクセス順序に従って前記複数のデバイスへのアクセスを行う
     処理を実行することを特徴とするデバイスアクセス方法。
    In an access to a plurality of devices via the multiplexer, the access order determined based on the switching number of the multiplexer is stored in the access order storage unit,
    A device access method comprising: performing a process of accessing the plurality of devices according to an access order stored in the access order storage unit.
  7.  マルチプレクサを経由した複数のデバイスへのアクセスにおいてマルチプレクサの切り替え数に基づいて決定されたアクセス順序をアクセス順序記憶部に格納し、
     前記アクセス順序記憶部に格納したアクセス順序に従って前記複数のデバイスへのアクセスを行う
     処理をコンピュータに実行させることを特徴とするデバイスアクセスプログラム。
    In an access to a plurality of devices via the multiplexer, the access order determined based on the switching number of the multiplexer is stored in the access order storage unit,
    A device access program for causing a computer to execute a process of accessing the plurality of devices in accordance with an access order stored in the access order storage unit.
  8.  制御対象である対象装置と、該対象装置を制御する制御装置を備えた情報処理装置において、
     前記制御装置は、
     マルチプレクサを経由した複数のデバイスへのアクセスにおいてマルチプレクサの切り替え数に基づいて決定されたアクセス順序を記憶したアクセス順序記憶部と、
     前記アクセス順序記憶部が記憶するアクセス順序に従って前記複数のデバイスへのアクセスを実行する実行部と
     を有することを特徴とする情報処理装置。
    In an information processing apparatus including a target device that is a control target and a control device that controls the target device,
    The controller is
    An access order storage unit that stores an access order determined based on the number of switching multiplexers in accessing a plurality of devices via the multiplexer;
    An information processing apparatus comprising: an execution unit that executes access to the plurality of devices according to an access order stored in the access order storage unit.
PCT/JP2013/057911 2013-03-19 2013-03-19 Control apparatus, device access method, device access program, and information processing apparatus WO2014147769A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/057911 WO2014147769A1 (en) 2013-03-19 2013-03-19 Control apparatus, device access method, device access program, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/057911 WO2014147769A1 (en) 2013-03-19 2013-03-19 Control apparatus, device access method, device access program, and information processing apparatus

Publications (1)

Publication Number Publication Date
WO2014147769A1 true WO2014147769A1 (en) 2014-09-25

Family

ID=51579501

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/057911 WO2014147769A1 (en) 2013-03-19 2013-03-19 Control apparatus, device access method, device access program, and information processing apparatus

Country Status (1)

Country Link
WO (1) WO2014147769A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0561805A (en) * 1991-09-02 1993-03-12 Toshiba Corp Access order adjustment system for information processing system
JP2009518753A (en) * 2005-12-09 2009-05-07 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Arbitration of memory access requests

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0561805A (en) * 1991-09-02 1993-03-12 Toshiba Corp Access order adjustment system for information processing system
JP2009518753A (en) * 2005-12-09 2009-05-07 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Arbitration of memory access requests

Similar Documents

Publication Publication Date Title
JP4592814B2 (en) Information processing device
US8024496B2 (en) Enhanced memory migration descriptor format and method
US7757055B2 (en) Storage system and data migration method for the same
US10775754B2 (en) Method for creating prototype and apparatus therefor
US8549491B2 (en) Apparatus and method for application testing of embedded system
US9184991B2 (en) Method and apparatus for developing service processor solutions
US7921230B2 (en) USB devices pre-configuration for KVM switch
US20200026673A1 (en) Systems And Methods For Device Communications
JP7088897B2 (en) Data access methods, data access devices, equipment and storage media
US20170140497A1 (en) Display operation system
US9946592B2 (en) Dump data collection management for a storage area network
US20240028354A1 (en) Image pattern matching to robotic process automations
US8972667B2 (en) Exchanging data between memory controllers
WO2014147769A1 (en) Control apparatus, device access method, device access program, and information processing apparatus
WO2022126711A1 (en) Webpage forensics method, apparatus and device
US10877744B2 (en) Read/write method and read/write system for FRU
US20170371771A1 (en) Adaptive testing using dynamically determined system resources of a computer system
JP2007011720A (en) System simulator, system simulation method, control program, and readable recording medium
CN114610557A (en) Method and device for testing equipment driving unit
JP5627506B2 (en) Data processing device
US20190354273A1 (en) Prototype storing method
JP2006065833A (en) Electronic apparatus, information processing system, and control method thereof
JP2020170403A (en) Simulation system, collection device, collection method, and simulation method
CN109491870A (en) A kind of detection method and device of the access state of sensor
KR102417677B1 (en) Similar circuit searching method and apparatus for verifing circuit

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13879011

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13879011

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP