Calculation processing apparatus, and method for controlling calculation processing apparatus
11355212 · 2022-06-07
Assignee
Inventors
Cpc classification
G06F9/44589
PHYSICS
G11C29/18
PHYSICS
International classification
G11C29/18
PHYSICS
G06F11/34
PHYSICS
Abstract
An offset address generator generates a plurality of offset addresses at an interval of a basic processing unit size on the basis of an access destination address from a calculating circuit, partitions an access destination memory region from the calculating circuit to set a plurality of verification address ranges. A determiner sequentially determines whether the plurality of set verification address ranges are matched with a monitoring target address. With this configuration, it is possible to simplify the configuration of a debug function in a processor.
Claims
1. A calculation processing apparatus, comprising: a calculating circuit; and a monitoring circuit which monitors data access from the calculating circuit to a monitoring target address, wherein the monitoring circuit includes an offset address generator configured to generate a plurality of offset addresses at a pitch of a basic processing unit size on the basis of an access destination address from the calculating circuit, and configured to set a plurality of verification address ranges by partitioning an access destination memory region to be accessed from the calculating circuit at the plurality of offset addresses; and a determiner configured to determine sequentially whether the plurality of set verification address ranges are matched with the monitoring target address.
2. The calculation processing apparatus according to claim 1, further comprising: a memory which stores the monitoring target address and a byte mask to extract a verification target bit position in a bit string of a verification address included in one of the plurality of set verification address range ranges; a byte valid bit generator which generates byte valid bit position information indicating a valid bit position of the data access at the access destination address from the calculating circuit; and a byte access position generator which generates byte access position information indicating an access verification position at the verification address on the basis of the offset address, the monitoring target address, and the byte mask, wherein the determiner determines whether the byte valid bit position information matches the byte access position information.
3. The calculation processing apparatus according to claim 2, further comprising: a notificator which issues a detection notification to the calculating circuit in a case where the determiner determines that the byte valid bit position information matches the byte access position information.
4. The calculation processing apparatus according to claim 2, wherein, in a case where the determiner determines that the byte valid bit position information does not match the byte access position information, the byte access position generator and the determiner perform a process on an unprocessed verification address range among the plurality of verification address ranges.
5. A method for controlling a calculation processing apparatus which includes a calculating circuit, and a monitoring circuit which monitors data access from the calculating circuit to a monitoring target address, the method comprising: generating, by the monitoring circuit, a plurality of offset addresses at a pitch of a basic processing unit size on the basis of an access destination address from the calculating circuit; setting, by the monitoring circuit, a plurality of verification address ranges by partitioning an access destination memory region to be accessed from the calculating circuit at the plurality of offset addresses; and determining, by the monitoring circuit, sequentially whether the plurality of set verification address ranges are matched with the monitoring target address.
6. The method for controlling the calculation processing apparatus according to claim 5, further comprising: generating byte valid bit position information indicating a valid bit position of the data access at the access destination address from the calculating circuit; generating byte access position information indicating an access verification position at a verification address on the basis of a byte mask for extracting a verification target bit position in a bit string which includes the offset address, the monitoring target address, and the verification address included in one of the plurality of set verification address range ranges; and determining whether the byte valid bit position information matches the byte access position information.
7. The method for controlling the calculation processing apparatus according to claim 6, further comprising: issuing a detection notification to the calculating circuit in a case where it is determined that the byte valid bit position information matches the byte access position information.
8. The method for controlling the calculation processing apparatus according to claim 6, wherein, in a case where the byte valid bit position information does not match the byte access position information, a process is performed on an unprocessed verification address range among the plurality of verification address ranges.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
DESCRIPTION OF EMBODIMENT(S)
(16) Hereinafter, embodiments of a calculation processing apparatus and a method for controlling the calculation processing apparatus will be described with reference to the drawings. However, the embodiments described below are merely given as examples, and there is no intention to exclude various modifications and applications of the techniques which are not illustrated in the embodiments. In other words, various modifications of the embodiments may be made within a scope not departing from the spirit. In addition, the drawings include not only the components illustrated in the drawings, but may include other functions.
(17) (A) Configurations
(18)
(19) The processor 1 illustrated in
(20) The debug circuit 10 realizes a function of detecting data access from the processor core 101 to a specific memory address (watch point), and of notifying to the processor core 101. The debug circuit 10 verifies whether a watch point address is included in a memory region (access destination memory region; verification address range) of the access destination from the processor core 101.
(21) If the detection of the memory access from the debug circuit 10 to the watch point is notified, the processor core 101 performs, for example, a process of suspending the execution of the program.
(22) The debug circuit 10 includes, as illustrated in
(23) The processor core 101 notifies information (hereinafter, simply referred to as data size information) indicating a command to be executed and a data size of a memory access region generated by executing the command to the lower byte offset address generation circuit 104 and the lower byte valid bit generation circuit 106.
(24) In addition, the processor core 101 notifies an address (hereinafter, this may be referred to as access destination address) of the access destination of the memory access generated by the execution of the command to the upper byte address match circuit 102 and the lower byte offset address generation circuit 104. In addition, the access destination address may be referred to as a verification address or a verification address range.
(25) The watch point register 103 stores an address (monitoring target address; hereinafter, this may be referred to as watch point address) of the watch point which is set by a user. The watch point address is a memory address (monitoring target address) as a target for detecting data access of a program which is executed by the processor core 101. The watch point indicates, for example, a position (address) where the execution of a program is suspended.
(26) The debug circuit 10 determines whether the verification address matches the watch point address.
(27) The watch point address read out of the watch point register 103 is input to the upper byte address match circuit 102 and the lower byte access position generation circuit 105.
(28) In addition, the watch point register 103 stores a byte mask and a detection permission bit.
(29) The detection permission bit is information indicating whether the detection of the watch point address is permitted, and is set by a user in advance. For example, in a case where the detection of the watch point address is performed, the detection permission bit is set to “I”. The detection permission bit read out of the watch point register 103 is input to the AND gate 108.
(30) The byte mask is a mask for extracting a portion (position; bit) to be compared with the watch point address in a data string (bit string) which forms a memory address of an access target (processing target) from the processor core 101. In other words, the byte mask is information for extracting a verification bit position in the bit string which forms an offset address.
(31) The byte mask read out of the watch point register 103 is input to the lower byte access position generation circuit 105.
(32) The byte mask is, for example, a bit string of 8 bits [7:0], and has a processing unit size (8 bytes).
(33) The watch point register 103 serves as a memory which stores the watch point address and the byte mask.
(34) The upper byte address match circuit 102 compares the upper byte in the access destination address notified from the processor core 101 and the upper byte of the watch point address notified from the watch point register 103 (upper byte address match determination).
(35) The upper byte may be a portion other than the byte of the lower portion (lower byte) in a data address as the access destination of the processor core 101, on which the lower byte match determination circuit 107 (described below) performs determination.
(36) In a case where the address of the upper byte matches the upper byte of the watch point address as a result of the comparison of the upper byte address match circuit 102, the upper byte address match circuit 102 outputs “1” (High) indicating “match” as a determination result to the AND gate 108. Hereinafter, the output of the determination result of the upper byte address match circuit 102 may be referred to as an upper byte address match signal.
(37) On the other hand, in a case where the address of the upper byte doesn't match the upper byte of the watch point address as a result of the comparison of the upper byte address match circuit 102, the upper byte address match circuit 102 outputs “0” (Low) indicating “mismatch” as a determination result to the AND gate 108.
(38) The lower byte offset address generation circuit 104 generates (sets) a head address (lower byte offset address) of a watch point search target (verification address range) on the basis of the lower byte of the access destination address. The lower byte offset address generation circuit 104 generates the lower byte offset address on the basis of the type of command and the data size information input from the processor core 101.
(39) The lower byte offset address generation circuit 104 defines the lower byte of access destination address as a base address, and adds a value (adding value) corresponding to a predetermined data width (for example, 8 bytes) to the base address so as to generate the lower byte offset address.
(40) The lower byte offset address generation circuit 104 repeatedly adds a basic processing unit size to the calculated lower byte offset address so as to generate a plurality of lower byte offset addresses (offset address calculation value).
(41) The lower byte offset address generation circuit 104 generates the plurality of lower byte offset addresses (offset address) at an interval of the basic processing unit size on the basis of the access destination address notified from the processor core 101.
(42) With plurality of lower byte offset addresses, the access destination memory region from the processor core 101 is virtually divided (partitioned) into a plurality of regions of the basic processing unit size.
(43) Therefore, the lower byte offset address generation circuit 104 generates (calculates) the plurality of lower byte offset addresses to virtually divide the access destination region (data bus width) of the processor core 101 for each predetermined data width (processing unit size; for example, 8 bytes).
(44) Each region virtually divided by the plurality of lower byte offset addresses generated by the lower byte offset address generation circuit 104 may be referred to as a division process flow (verification address range).
(45) In this way, the lower byte offset address generation circuit 104 generates (calculates) the plurality of lower byte offset addresses, and sets a plurality of division process flows by partitioning the access destination memory region from the processor core 101.
(46) A division process flow number is identification information to specify each generated division process flow, and is set by the increment circuit 110 described below. The division process flow number is set to the division process flow in an order from the head of the access destination memory region as a serial number. In other words, the plurality of division process flows generated by the lower byte offset address generation circuit 104 are ordered by the division process flow number.
(47) With this configuration, the division process flows (verification address ranges) can be switched in order by designating and increasing the division process flow number.
(48) The lower byte offset address generation circuit 104 virtually divides the data bus width at an equal interval to set the plurality of lower byte offset addresses. The plurality of generated lower byte offset addresses serves as a pointer or a boundary to partition the access destination memory region from the processor core 101 by the processing unit size. In addition, each lower byte offset address serves as a head address of each watch point search target (verification address range).
(49) In addition, in a case where a stride width is set, the lower byte offset address generation circuit 104 reflects the stride width on an adding value. Further, the stride width can be obtained through a well-known technique on the basis of the data size information output from the processor core 101.
(50)
(51)
(52)
(53) In the examples illustrated in
(54) In the processor 1, each verification address range having the generated lower byte offset address as the head is subjected to a match determination with respect to the watch point address.
(55) The lower byte offset address generation circuit 104 sets the lower byte offset address from the commanded base address on the basis of the type of command and the data size information input from the processor core 101.
(56) The lower byte offset address generation circuit 104 outputs the generated lower byte offset address to the lower byte access position generation circuit 105.
(57) The lower byte valid bit generation circuit 106 generates lower byte valid bit position information with reference to the lower byte offset address on the basis of the command and the data size information output from the processor core 101.
(58) The lower byte valid bit position information is information indicating whether the position is valid as an access destination from the processor core 101 and, for example, a position (lower byte valid bit position) from which data access can be made in an 8-byte data string of the lower byte offset address.
(59)
(60)
(61) Further, hereinafter, the drawings in this embodiment are represented in a little endian format in which the head address is located on the right side. In other words, in
(62) The lower byte valid bit position information illustrated in
(63) Then, in the drawings, the capital characters 1 B, 2 B, 4 B, and 8 B represent the data size (unit: byte). The bit positions corresponding to the positions of 1 B, 2 B, 4 B, and 8 B represent the lower byte valid bit positions, and a valid bit 1 is set.
(64) It is possible to determine whether data access is made in each position with the offset address as a head with reference to the lower byte valid bit position information illustrated in
(65) Further, the lower byte valid bit position information is used commonly in a unit of division process, and thus not need to be generated for each division process flow.
(66) In this example, the description is described about the example that the unit of division process flow is 8 bytes, but may represent 10 byte positions PT0 to PT9 in consideration of the stride width.
(67) The lower byte access position generation circuit 105 generates byte access position information for each division process flow on the basis of the lower byte offset address, the watch point address, and the byte mask information.
(68) The byte access position information indicates a position (byte access position) which becomes a comparison target with the watch point address of the lower byte match determination circuit 107 (described below) in the verification address.
(69) The lower byte access position generation circuit 105 performs comparison with the byte mask at each bit position with the lower byte offset address as a head to determine whether the bit position is a byte access position, and generates the byte access position information.
(70) Specifically, the lower byte access position generation circuit 105 applies a predefined conditional expression to each of the bit positions PT0 to PT9 with the lower byte offset address as a head to determine whether each bit position is a byte access position.
(71) The byte access position information indicates whether each of the bit positions PT0 to PT9 is a byte access position. For example, “1” or “0” is set to each of the bit positions PT0 to PT9.
(72) The lower byte access position generation circuit 105 set “1” to the bit positions PT0 to PT9 which are determined as a byte access position and sets “0” to the PT0 to PT9 other than the bit positions determined as a byte access position so as to generate the byte access position information.
(73)
(74)
(75) In this example, the description is described about the example that the unit of division process flow is 8 bytes, but may represent 10 byte positions PT0 to PT9 in consideration of the stride width.
(76) In
(77) In addition, in the drawing, the offset address may be expressed as an OS address, and the watch point address may be expressed as a WP address.
(78) For example, the lower byte access position generation circuit 105 determines whether the byte position PT0 is an access byte position using Conditional Expression (1) below.
(79) In other words, the lower byte access position generation circuit 105 sets information (flag: for example, 1) indicating valid to the byte position PT0 in a case where Conditional Expression (1) is satisfied. The byte position PT0 corresponds to the base address.
[Expression 1]
Offset Address[3]==Watch Point Address[3]&(Offset Address[2:0]=000 & byte mask[0]|Offset Address[2:0]=001 & Byte Mask[1]|Offset Address[2:0]=010 & Byte Mask[2]|Offset Address[2:0]=011 & Byte Mask[3]|Offset Address[2:0]=100 & Byte Mask[4]|Offset Address[2:0]=101 & Byte Mask[5]|Offset Address[2:0]=110 & Byte Mask[6]|Offset Address[2:0]=111 & Byte Mask[7]) (1)
(80) In Conditional Expression (1), in a case where the condition “Offset Address[3]==Watch Point Address[3]” is satisfied, and any one of “Offset Address[2:0]=000 & Byte Mask[0]”, “Offset Address[2:0]=001 & Byte Mask[1]”, “Offset Address[2:0]=010 & Byte Mask[2]”, “Offset Address[2:0]=011 & Byte Mask[3]”, “Offset Address[2:0]=100 & Byte Mask[4]”, “Offset Address[2:0]=101 & Byte Mask[5]”, “Offset Address[2:0]=110 & Byte Mask[6]”, and “Offset Address[2:0]=111 & Byte Mask[7]” is satisfied, information (flag; for example, 1) indicating valid is set to the corresponding position PT0.
(81) Herein, “Offset Address[3]==Watch Point Address[3]” indicates that the value of the 3rd bit of the lower byte offset address matches the value of the 3rd bit of the watch point register.
(82) In addition, for example, “Offset Address[2:0]=001 & Byte Mask[1]” indicates that the lower byte offset address of 3 bits is “001”, and Byte Mask[1] is “1”. In the base address, the position of Byte Mask[1] corresponds to Offset Address[2:0] a 001.
(83) At the byte positions PT1 to PT9 subsequent to the byte position PT0, the byte mask is compared with the lower offset address shifted to a lower address direction (toward the tail) by the same number of bits as the distance from the byte position PT0 of the head.
(84) For example, the lower byte access position generation circuit 105 determines whether the byte position PT1 is an access byte position using Conditional Expression (2) below.
(85) In other words, the lower byte access position generation circuit 105 sets information (flag: for example, 1) indicating valid to the byte position PT1 in a case where Conditional Expression (2) is satisfied.
[Expression 2]
Offset Address[3]=Watch Point Address[3]&(Offset Address[2:0]=000 & Byte Mask[1]|Offset Address[2:0]−001 & Byte Mask[2]|Offset Address[2:0]=010 & Byte Mask[3]|Offset Address[2:0]−011 & Byte Mask[4]|Offset Address[2:0]=100 & Byte Mask[5]|Offset Address[2:0]=101 & Byte Mask[6]|Offset Address[2:0]=110 & Byte Mask[7])|Offset Address[3]+1==Watch Point Address[3]& Offset Address[2:0]=111 & Byte Mask[0] (2)
(86) Since the byte position PT1 becomes a position shifted 1 bit to the lower address direction (toward the tail) compared to the byte position PT0, the position in Conditional Expression (2) corresponds to a position of which the offset address corresponding to each byte mask is increased by 1 compared to Conditional Expression (I).
(87) For example, the condition becomes such that “Offset Address[2:0]=001 & Byte Mask[2]” is satisfied, the lower byte offset address of 3 bits is “001”, and Byte Mask[2] is “I”.
(88) In addition, the unit of division process flow is 8 bytes. Therefore, Byte Mask[0] is determined on whether Watch Point Address[3] matches “Offset Address[3+1” which is next 8 bytes subsequent to “Offset Address 3]”.
(89) As illustrated in
(90) In this way, the byte mask is associated to the offset address which can take various values in each conditional expression.
(91) With this configuration, the byte access position information can match the position of the byte mask set in the watch point register to the plurality of generated lower byte offset addresses by the lower byte valid bit generation circuit 106.
(92) The lower byte access position generation circuit 105 associates the byte mask to each offset address using the byte access position information with respect to the byte positions PT0 to PT9 so as to determine (generate) a verification target position with respect to the watch point address in the offset address.
(93) The lower byte access position generation circuit 105 sets “1” to the byte position which satisfying the above conditional expression among the byte positions PT0 to PT9, and sets “0” to the byte position which does not satisfy the conditional expression. The lower byte access position generation circuit 105 generates information “0” or “1” set to the byte positions PT0 to PT9 as the byte access position information.
(94)
(95) In
(96) In the example illustrated in
(97) Further, the byte access position information is not limited to the example illustrated in
(98) The lower byte match determination circuit 107 compares the lower byte access position information of each division process generated by the lower byte access position generation circuit 105 with the lower byte valid bit position information generated by the lower byte valid bit generation circuit 106 (lower byte match determination). The lower byte match determination circuit 107 determines whether there is a position where the lower byte access position information and the lower byte valid bit position information are commonly set to “1”.
(99) The lower byte match determination circuit 107 retrieves the valid bit at the byte positions PT0 to PT9 of the lower byte valid bit position information in a place where the valid bit becomes “1” at the bit positions PT0 to PT9 of the byte access position information, and determines whether there is a place where the valid bit becomes “1”.
(100) If there is a place where the valid bit becomes “1”, the lower byte match determination circuit 107 outputs the determination result “1” to the AND gate 108. For example, in a case where there is a position where the lower byte access position information and the lower byte valid bit position information are commonly set to “1”, the lower byte match determination circuit 107 outputs the determination result “1” to the AND gate 108. On the other hand, in a case where there is no position where the lower byte access position information and the lower byte valid bit position information are commonly set to “1”, the lower byte match determination circuit 107 outputs the determination result “0” to the AND gate 108.
(101)
(102) In the example illustrated in
(103) Herein, the lower byte valid bit position information indicates all the places where the valid bits of
(104) The lower byte match determination circuit 107 illustrated in
(105) Further, in the following description, if there is a need to specify one among the plurality of AND gates as a symbol indicating the AND gate of the lower byte match determination circuit 107, the symbols 71-1 to 71-16 are used, but if any one AND gate is designated, the symbol 71 is used. Similarly, in the following description, if there is a need to specify one among the plurality of OR gates as a symbol indicating the OR gate of the lower byte match determination circuit 107, the symbols 72-1 to 72-5 are used, but if any one OR gate is designated, the symbol 72 is used.
(106) For example, the AND gate 71-4 receives the lower byte access position information PT3 and the output B1[3] corresponding to PT3 in the lower byte valid bit position information B1. In a case where two inputs are either “1”, the AND gate 71-4 inputs “1” to the OR gate 72-1. Each AND gate 71 performs a similar process.
(107) If any one of the AND gates 71-1 to 71-4 is input, the OR gate 72-1 inputs “1” to the OR gate 72-5. Each OR gate 72 performs a similar process.
(108) If “1” is input from any one of the OR gate 72-1 to 72-4, the OR gate 72-5 outputs “1” to the AND gate 108.
(109) The lower byte match determination circuit 107 determines the match with the watch point address using the plurality of division process flows generated by the lower byte offset address generation circuit 104 as one processing unit. Further, the lower byte match determination circuit is not limited to the example illustrated in
(110) The AND gate 108 receives the detection permission bit read out of the watch point register 103, the determination result from the upper byte address match circuit 102, and the determination result from the lower byte match determination circuit 107.
(111) The AND gate 108 outputs the result of a logical product of the three input signals. In other words, in a case where the detection permission bit read out of the watch point register 103, the determination result from the upper byte address match circuit 102, and the determination result from the lower byte match determination circuit 107 all are “1”, “1” is output as a watch point detection.
(112) In the AND gate 108, masking is performed using the detection permission bit read out of the watch point register 103. The output of the AND gate 108 is input to the determination circuit 109.
(113) The determination circuit 109 determines whether the output signal from the AND gate 108 is “1”. In a case where “1” is output from the AND gate 108 as a result of determination, the determination circuit 109 inputs “1” to the processor core 101 as a detection notification.
(114) If the detection notification “1” is input from the debug circuit 10 (the determination circuit 109), the processor core 101 performs a predetermined process such as stopping the program in progress.
(115) In addition, in a case where the detection notification “1” is not output from the AND gate 108, the determination circuit 109 issues a notification to the increment circuit 110 (increment command).
(116) In the processor 1, it is determined the match with the watch point address using the plurality of division process flows generated by the lower byte offset address generation circuit 104 as one processing unit.
(117) If the increment command is input from the determination circuit 109, the increment circuit 110 increases the division process flow number (+1), and notifies the increased division process flow number to the lower byte offset address generation circuit 104.
(118) In other words, in a case where there is no place where the result of the lower byte match determination of the lower byte match determination circuit 107 becomes “1” but becomes “0”, the increment circuit 110 increases the division process flow number (+1).
(119) In the processor 1, in a case where the match to the watch point address is not detected in one division process flow, the match determination to the watch point address is performed on the division process flow specified by the next division process flow number.
(120) The lower byte match determination circuit 107 calculates the byte access position information (see
(121) (B) Operations
(122) The process of the debug circuit 10 of the processor 1 as an example of the embodiment configured as described above will be described according to a flowchart (Steps S1 to S8) illustrated in
(123) In Step S1, the debug circuit 10 acquires an address, a command, and a data size from the processor core 101. In addition, the debug circuit 10 reads and acquires the watch point address and the byte mask from the watch point register 103.
(124) In Step S2, the lower byte offset address generation circuit 104 generates the head address of the watch point retrieval target (lower byte offset address) on the basis of the lower byte of the access destination address. In other words, the lower byte offset address generation circuit 104 sets a plurality of division process flows (verification address range) ordered with the division process flow number.
(125) The lower byte access position generation circuit 105 generates the byte access position information for each division process on the basis of the lower byte offset address, the watch point address, and the byte mask information.
(126) On the other hand, in Step S3, the upper byte address match circuit 102 compares the upper byte in the access destination address notified from the processor core 101 and the upper byte of the watch point address notified from the watch point register 103. In a case where the address of the upper byte matches the upper byte of the watch point address as a result of the comparison, the upper byte address match circuit 102 outputs the upper byte address match signal.
(127) In addition, the lower byte valid bit generation circuit 106 generates lower byte valid bit position information with reference to the lower byte offset address on the basis of the command and the data size information output from the processor core 101.
(128) The processes of Steps S4 to S8 below are sequentially performed on each of the plurality of division process flows (verification target address range) along the division process flow number.
(129) In Step S4, the lower byte match determination circuit 107 compares the lower byte access position information for each division process generated by the lower byte access position generation circuit 105 with the lower byte valid bit position information generated by the lower byte valid bit generation circuit 106. If there is a position where the lower byte access position information and the lower byte valid bit position information are commonly set to “1”, the lower byte match determination circuit 107 outputs the determination result “1” to the AND gate 108.
(130) In a case where the detection permission bit read out of the watch point register 103, the determination result from the upper byte address match circuit 102, and the determination result from the lower byte match determination circuit 107 all are “1”, the AND gate 108 outputs “1”. If “1” is output from the AND gate 108, the determination circuit 109 determines that the watch point is detected.
(131) In Step S5, it is checked whether the detection of the watch point is performed. In a case where the watch point is detected as a result of checking (see YES route of Step S5), the process proceeds to Step S6.
(132) In Step S6, the determination circuit 109 performs the detection notification of the watch point on the processor core 101. The processor core 101 received the detection notification of the watch point performs a process such as stopping a program in progress for example. Thereafter, the debug circuit 10 ends the process.
(133) On the other hand, in a case where the watch point is not detected as a result of checking in Step S5 (see NO route of Step S5), the process proceeds to Step S7.
(134) In Step S7, the determination circuit 109 issues the increment command to the increment circuit 110. When receiving the increment command, the increment circuit 110 increases the division process flow number (+1), and notifies the increased division process flow number to the lower byte offset address generation circuit 104.
(135) In Step S8, the lower byte offset address generation circuit 104 checks whether the division process flow number is a maximum value. For example, whether the division process flow number is a maximum value may be determined on the basis of the data size information notified from the processor core 101.
(136) In a case where the division process flow number is not a maximum value as a result of checking (see NO route of Step S8), the process returns to Step S2. The lower byte offset address specified by the division process flow number increased in Step S7 is processed.
(137) In other words, in the processor 1, the plurality of lower byte offset addresses are generated on the basis of the access destination address from the processor core 101, and it is sequentially verified whether the plurality of offset addresses are matched to the watch point address.
(138) On the other hand, in a case where the division process flow number is a maximum value (see YES route of Step 68), the process ends.
(139) (C) Effects
(140) In this way, according to the processor 1 as an example of the embodiment, the lower byte offset address generation circuit 104 generates (calculates) the plurality of lower byte offset addresses. With this configuration, the access destination region (data bus width) of the processor core 101 can be virtually partitioned into the plurality of verification address ranges for each set processing unit size.
(141) Then, the lower byte access position information is generated by the lower byte access position generation circuit 105 for each generated lower byte offset address (division process flow), and the match determination with respect to the watch point address and the byte mask is performed by the lower byte match determination circuit 107 and the AND gate 108. In other words, the match determination with respect to the watch point address is sequentially performed on the plurality of verification address ranges by the lower byte valid bit generation circuit 106, the lower byte match determination circuit 107, and the AND gate 108. In a case where the match is not determined in the determination on one division process flow, the process proceeds to the next division process flow by the increment circuit 110, and the same match determination is repeatedly performed.
(142) With this configuration, a generation circuit of the lower byte offset address and a comparison circuit (comparator) with respect to the watch point address and the byte mask can be commonly configured in a division unit of the data size without redundantly providing the lower byte valid bit generation circuit 106, the lower byte match determination circuit 107, and the AND gate 108. Therefore, the circuits and the lines are not increased even if the type of commands and the data size width are increased, so that the manufacturing cost can be reduced, and the power consumption can be reduced.
(143) Since the lower byte valid bit generation circuit 106 generates the lower byte valid bit position information with reference to the lower byte offset address, a position valid as the access destination in the lower byte offset address is specified.
(144) Further, the lower byte access position generation circuit 105 generates the byte access position information for each division process on the basis of the lower byte offset address, the watch point address, and the byte mask information. With this configuration, detection determination positions corresponding to the watch point address and the byte mask are specified with respect to the lower byte offset address. The lower byte match determination circuit 107 determines whether there is a position where the lower byte access position information and the lower byte valid bit position information are commonly set to “1”, so that it is possible to efficiently perform the match determination with respect to the watch point address and the byte mask in the lower byte address.
(145) The lower byte offset address generation circuit 104 generates the plurality of lower byte offset addresses on the basis of the access destination address from the processor core 101. Then, the lower byte match determination circuit 107 sequentially performs the match verification on the plurality of offset addresses with respect to the watch point address. With this configuration, it is possible to realize the match verification of the plurality of offset addresses with respect to the watch point address using the lower byte match determination circuit 107 and the AND gate 108 which are commonly configured.
(146) (D) Other Configurations
(147) The disclosed technology is not limited to the above embodiment, and various modifications may be made within a scope not departing from the spirit of the embodiment. The configurations and processes of the embodiment may be optionally selected as needed, or may be appropriately combined.
(148) For example, in the above embodiment, the masking using the detection permission bit read out of the watch point register 103 is performed after the lower byte match determination of the lower byte match determination circuit 107, but the invention is not limited thereto.
(149)
(150) In the example illustrated in
(151) In a case where the upper byte address match signal and the detection permission bit both are “1”, the AND gate 1081 outputs “1” to the AND gate 108.
(152) The AND gate 108 receives an output signal from the lower byte match determination circuit 107, and an output from the AND gate 1081.
(153) In this modification, in a case where the address of the upper byte matches the upper byte of the watch point address as a result of the upper byte address match determination of the upper byte address match circuit 102, the byte access position information is created using the byte mask by the lower byte offset address generation circuit 104.
(154) On the other hand, in a case where the address of the upper byte does not match the upper byte of the watch point address as a result of the upper byte address match determination, a process of detecting the watch point ends without performing the subsequent division process flow.
(155) With this configuration, in a case where the address of the upper byte does not match the upper byte of the watch point address as a result of the upper byte address match determination, the unnecessary subsequent division process flow is not performed, so that the debugging can be efficiently processed.
(156) In addition, a person skilled in the art can perform and manufacture the embodiment through the above disclosure.
(157) According to an embodiment, it is possible to simplify the configuration of a debug function in the processor.
(158) All examples and conditional language recited herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present inventions have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.