WO2023047762A1 - Processor and endian conversion method - Google Patents

Processor and endian conversion method Download PDF

Info

Publication number
WO2023047762A1
WO2023047762A1 PCT/JP2022/026785 JP2022026785W WO2023047762A1 WO 2023047762 A1 WO2023047762 A1 WO 2023047762A1 JP 2022026785 W JP2022026785 W JP 2022026785W WO 2023047762 A1 WO2023047762 A1 WO 2023047762A1
Authority
WO
WIPO (PCT)
Prior art keywords
endian
data
circuit
conversion circuit
signal
Prior art date
Application number
PCT/JP2022/026785
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 GBGB2401725.3A priority Critical patent/GB202401725D0/en
Priority to CN202280053523.5A priority patent/CN117795494A/en
Publication of WO2023047762A1 publication Critical patent/WO2023047762A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/04Addressing variable-length words or parts of words
    • 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/14Handling requests for interconnection or transfer
    • G06F13/36Handling requests for interconnection or transfer for access to common bus or bus system
    • 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
    • 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/40Bus structure
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to a processor having an endian conversion circuit provided between a CPU and peripheral circuits and an endian conversion method.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 8-202646
  • This publication describes an endian conversion circuit (converter) for facilitating connection between a CPU (main processor) and a peripheral circuit (I/O device) when the endian is different.
  • the endian conversion circuit of Patent Document 1 rearranges data when the endian is different between the CPU and the peripheral circuit. For example, when a 4-byte hexadecimal value 00000001 is written from the CPU to the peripheral function, it is converted to 01000000. This corresponds to the fact that how to assign addresses to 4-byte numbers differs between little endian and big endian. Specifically, in little endian, addresses are assigned in order from lower byte to upper byte, while in big endian, addresses are assigned in order from upper byte to lower byte. Therefore, in order to store the same data at the same address when the data is interpreted in units of one byte, it is necessary to change the order of the data.
  • the peripheral interprets the write value as a 4-byte value, it will interpret it differently than the software author intended. This is not limited to the case of 4 bytes, but in general, when interpreting a written value in units larger than 1 byte, it is interpreted as a value different from the value intended by the creator of the software.
  • the present disclosure is a processor having a CPU, a plurality of peripheral circuits, and an endian conversion circuit provided between the CPU and the plurality of peripheral circuits. It is an object of the present invention to provide means for facilitating the creation of software by preventing interpretation as values different from those intended by the creator.
  • an endian conversion circuit has a table indicating the relationship between an address and a connection destination type, and uses type information extracted from the table using an access destination address. separately controls the data conversion circuit and the byte enable conversion circuit in the endian conversion circuit.
  • the byte enable is converted by the byte enable conversion circuit according to the difference in how to assign addresses to the data of multiple bytes, and the peripheral
  • the peripheral By converting the data by the data conversion circuit in consideration of how many bytes the circuit interprets the numerical value, it is possible for the peripheral circuit to correctly interpret the value intended by the creator of the software.
  • FIG. 1 is a first example of a configuration diagram of a processor to which the present invention is applied;
  • FIG. It is an example of a timing chart of buses 111 and 114 in FIG. 2 is an example of the operation of little endian byte enables of buses 111 and 114 of FIG.
  • It is an example of the big endian byte enable operation of bus 111 and bus 114 of FIG. 4 is a diagram showing a first example of an attribute information table of the control circuit 102 of FIG. 1;
  • FIG. FIG. 2 is a diagram showing a first example of control signal generation rules of the control circuit 102 of FIG. 1;
  • 2 is a first example of the control circuit 102 of FIG. 1;
  • It is an example of the byte enable conversion circuit 104 of FIG.
  • FIG. 1 It is an example of the operation of the byte enable conversion circuit 104 of FIG. It is an example of the data conversion circuit 103 of FIG. It is an example of the operation of the data conversion circuit 103 of FIG. 2 is a first example of the operation of buses 111 and 114 in FIG. 1; 4 is a diagram showing a second example of an attribute information table of the control circuit 102 of FIG. 1; FIG. 3 is a diagram showing a second example of a control signal generation rule for the control circuit 102 of FIG. 1; FIG. 2 is a second example of the operation of buses 111 and 114 in FIG. 1; 2 is a second example of the control circuit 102 of FIG. 1; FIG.
  • FIG. 4 is a second example of a configuration diagram of a processor to which the present invention is applied; 15 is a diagram showing an attribute information table of the control circuit 1402 of FIG. 14; FIG. 15 is a diagram showing a control signal generation rule of a control circuit 1402 of FIG. 14; FIG. FIG. 4 is a third example of a configuration diagram of a processor to which the present invention is applied; It is an example of the delay circuit 1601 of FIG. It is an example of a timing chart of buses 111 and 114 in FIG.
  • the processor according to the embodiment has the following configuration.
  • the processor (100) includes a CPU (101), a plurality of peripheral circuits (105-108), and an endian conversion circuit (109) provided between the CPU (101) and the plurality of peripheral circuits (105-108).
  • the endian conversion circuit (109) includes a table (AIT) storing type information (endian attribute, type attribute) indicating the relationship between the address and the type of connection destination, a byte enable conversion circuit (104), and a data conversion circuit. (103) and The endian conversion circuit (109) converts the byte enable conversion circuit (104) using the type information (endian attribute, type attribute) extracted from the table (AIT) using the output address of the access destination output from the CPU (101). and the data conversion circuit (103) are separately controlled.
  • the endian conversion method according to the embodiment has the following configuration.
  • the circuit (109) includes a table (AIT) storing type information (endian attribute, type attribute) indicating the relationship between the address and the type of connection destination, a byte enable conversion circuit (104), and a data conversion circuit (103).
  • an endian conversion method for a processor (100) comprising: a) a step of extracting type information (endian attribute, type attribute) from the table (AIT) using the output address of the access destination output from the CPU (101); b) separately controlling the byte enable conversion circuit (104) and the data conversion circuit (103) based on the extracted type information (endian attribute, type attribute);
  • the byte enable is converted by the byte enable conversion circuit according to the difference in how the addresses are assigned to the data of multiple bytes.
  • the peripheral circuit can correctly interpret the value intended by the creator of the software.
  • FIG. 1 is a first example of a configuration diagram of a processor to which the present invention is applied.
  • the processor 100 of this embodiment includes a CPU 101, an endian conversion circuit 109, a first peripheral circuit (ROM) 105, a second peripheral circuit (RAM) 106, a third peripheral circuit (first IO circuit) 107, a 4 peripheral circuits (second IO circuits) 108 , a first bus (hereinafter referred to as bus) 111 , and a second bus (hereinafter referred to as bus) 114 .
  • the CPU 101 is connected to a bus 111 and includes a first peripheral circuit (ROM) 105, a second peripheral circuit (RAM) 106, a third peripheral circuit (first IO circuit) 107 and a fourth peripheral circuit (second IO circuit) 108 is connected to bus 114 .
  • Endian conversion circuit 109 is connected between bus 111 and bus 114 .
  • ROM is non-volatile memory such as read only memory
  • RAM volatile memory such as random access memory.
  • the endian conversion circuit 109 has a control circuit 102, a data conversion circuit 103, and a byte enable conversion circuit 104.
  • the CPU 101 executes the following processes according to the program stored in the first peripheral circuit (ROM) 105.
  • the CPU 101 first takes in input information from a third peripheral circuit (first IO circuit: IO1) 107 and a fourth peripheral circuit (second IO circuit: IO2) 108 via buses 114 and 111, After performing prescribed processing, output information is written to the third peripheral circuit (first IO circuit) 107 and fourth peripheral circuit (second IO circuit) 108 via buses 111 and 114 .
  • a second peripheral circuit (RAM) 106 is used for saving intermediate progress of processing.
  • the third peripheral circuit (first IO circuit) 107 When the third peripheral circuit (first IO circuit) 107 receives an input information fetch request from the CPU 101 via the buses 111 and 114, the input information fetched from the signal line 115 is sent to the CPU 101 via the buses 114 and 111. Output. When the third peripheral circuit (first IO circuit) 107 receives an output information write request from the CPU 101 via the buses 111 and 114 , it internally holds the write value and outputs it to the signal line 115 .
  • the operation of the fourth peripheral circuit (second IO circuit) 108 is similar to the operation of the third peripheral circuit (first IO circuit) 107.
  • the control circuit 102 receives access address and access size information from the CPU 101 via the bus 111 , generates control signals for the byte enable conversion circuit 104 and the data conversion circuit 103 , and outputs them to signal lines 112 and 113 .
  • the byte enable conversion circuit 104 performs predetermined conversion on the byte enable of the bus 111 according to the control signal (first signal) received from the signal line 112 and outputs it to the bus 114 .
  • the data conversion circuit 103 performs predetermined conversion on the write data on the bus 111 according to the control signal (second signal) received from the signal line 113 and outputs the converted data to the bus 114 .
  • the data conversion circuit 103 also performs predetermined conversion on the read data of the bus 114 according to the control signal received from the signal line 113 and outputs the converted data to the bus 111 .
  • FIG. 2 is an example of a timing chart of buses 111 and 114 in FIG. Since the operations of bus 111 and bus 114 are similar, they are described without distinguishing between them.
  • clk is a clock signal (1 bit), req is a request signal (1 bit), wr is a write signal (1 bit), size[2:0] is a size signal (size information) (3 bits), be[3:0] ] is a byte enable signal (4 bits), adr[31:2] is an address signal (30 bits), wd[31:0] is write data (32 bits), rdv is a read data valid signal (1 bit), rd [31:0] is read data (32 bits).
  • size[2:0] indicates that it consists of a 3-bit signal of size[2], size[1], and size[0], where size[2] is the most significant bit and size[0] is the most significant bit. Lower bits.
  • be[3:0] is 4 bits from be[3] to be[0]
  • adr[31:2] is 30 bits from adr[31] to adr[2]
  • wd[31:0] is 32 bits from wd[31] to wd[0]
  • rd[31:0] consists of 32 bits from rd[31] to rd[0]. is the upper bit.
  • wr, size[2:0], be[3:0], adr[31:2], wd[31:0] are signals from the CPU 101 to the peripheral circuits 105 to 108, rdv, rd[31: 0] are signals from the peripheral circuits 105 to 108 to the CPU 101 .
  • the address space is 32 bits, since the write data and read data are 4 bytes, the lower 2 bits of the address are not transmitted. Instead, which byte of the 4 bytes of data is valid is indicated by byte enable. Byte enable operation will be described later.
  • the size signal is one of three binary numbers 001, 010, and 100, indicating that a transfer of 1 byte, 2 bytes, and 4 bytes (data transfer size) is to be performed, respectively.
  • Buses 111 and 114 each include a data bus including 32 data signal lines for transferring data, eg, wd[31:0] and rd[31:0], and adr[31:2]. is an address bus including 30 address signal lines for transferring address signals, a request signal (req: 1 bit), a write signal (wr: 1 bit), a size signal (size[2:0]: 3 bits ) and a control bus including nine control signal lines for transferring byte enable signals (be[3:0]: 4 bits).
  • req and wr are 1, and valid values (sz1, be1, a1, d1 ) is output.
  • the 3rd to 6th cycles are read data transfer.
  • req is 1 and wr is 0.
  • Effective values (sz2, be2, a2) are output to size[2:0], be[3:0], and adr[31:2] in the first cycle (third cycle).
  • the number of read cycles is not fixed, and the transfer ends in the cycle in which rdv becomes 1.
  • a valid value (d2) is output to rd[31:0] in the cycle in which rdv becomes 1.
  • rdv and rd[31:0] are output by the peripheral circuits 105 to 108, respectively. With respect to rdv, the four peripheral outputs are OR'ed on bus 114 .
  • FIG. 2 shows the state after the OR operation. As for rd[31:0], the output value of the peripheral circuit that outputs 1 to rdv on the bus 114 is selected. FIG. 2 shows the state after selection. If there is no peripheral circuit that outputs 1 to rdv, the value of rd[31:0] is ignored.
  • FIG. 3A and 3B are examples of byte-enable operation of buses 111 and 114 in FIG.
  • FIG. 3A is an example of Little Endian byte enable operation for buses 111 and 114 of FIG.
  • FIG. 3B is an example of the operation of the Big Endian byte enable of buses 111 and 114 of FIG. Little Endian Little Endian and Big Endian are described separately because their operations are different. Little endian can be said to be the first endian, and big endian can be said to be the second endian different from the first endian.
  • FIG. 4A and 4B are a first example of the operation of the control circuit 102 of FIG.
  • FIG. 4A is a diagram showing a first example of the attribute information table AIT of the control circuit 102 of FIG.
  • FIG. 4B is a diagram showing a first example of the control signal generation rule CSGR of the control circuit 102 of FIG.
  • the operation of the control circuit 102 is described by the attribute information table AIT and the control signal generation rule CSGR.
  • the attribute information table AIT stores the address range and attribute information of each peripheral circuit.
  • the attribute information table AIT receives the address of the bus 111 (adr[31:2] with 0 concatenated to the lower two bits) and outputs the attribute information of the corresponding peripheral circuit.
  • the attribute information can also be called peripheral circuit type information.
  • the control signal generation rule CSGR is a rule for generating values to be output to the signal lines 112 and 113 with the endian, type, and size signal (size[2:0]) of the bus 111 output from the attribute information table AIT as inputs. is shown. Although not specified in this table, it is assumed that the endian of the CPU is little endian.
  • the signal line 112 (the value of the control signal) is 0 (first value) when the endian attribute is 0, and 1 (second value) when the endian attribute is 1. This indicates that byte enable conversion is not performed when the endian of the CPU and the peripheral circuit are the same, and byte enable conversion is performed when they are different.
  • the signal line 113 (the value of the control signal) takes three values: 00 (first value) indicates no data conversion, 01 (second value) indicates conversion of data in 1-byte units, and 10 (second value) indicates conversion of data in 1-byte units. A value of 3) indicates that the data should be converted in 2-byte units. The details of the conversion contents will be described later.
  • the signal line 113 becomes 00 when the endian attribute is 0. This indicates that data conversion is not performed when the endian of the CPU and the peripheral circuit are the same.
  • Signal line 113 is also always 01 (conversion in 1-byte units) when the endian attribute is 1 and the type attribute is 0.
  • the output value differs depending on the value of the size signal (size[2:0]) of bus 111 .
  • size[2:0] is 001 (1 byte)
  • the output value is 01 (conversion in 1-byte units)
  • size[2:0] is 010 (2 bytes)
  • the output value is 10 (conversion in 2-byte units).
  • size[2:0] is 100 (4 bytes)
  • the output value is 00 (no conversion).
  • FIG. 5 is a first example of the control circuit 102 of FIG.
  • the control circuit 102 of this embodiment has fixed value output circuits 501, 502, 505, 506 and 507, comparison circuits 503 and 504, AND circuits 508, 509, 510, 513 and 514, and OR circuits 511 and 512.
  • the fixed value output circuit 501 outputs the hexadecimal fixed value F0000000 to the signal line 521 .
  • the fixed value output circuit 502 outputs the hexadecimal fixed value F8000000 to the signal line 522 .
  • the comparison circuit 503 compares the address of the bus 111 (adr[31:2] with 2 bits of 0 concatenated in the lower order) and the value of the signal line 521 and outputs the result to the signal line 523 .
  • the output value is 0 when the address is smaller than the fixed hexadecimal value F0000000, and 1 when the address is greater than the fixed value F0000000.
  • the comparison circuit 504 compares the address of the bus 111 (adr[31:2] with 2 bits of 0 concatenated to the lower order) and the value of the signal line 522 and outputs the result to the signal line 524 .
  • the output value is 0 when the address is smaller than the fixed hexadecimal value F8000000, and 1 when the address is greater than the fixed value F8000000.
  • the fixed value output circuit 505 outputs the binary fixed value 10 to the signal line 525 .
  • the fixed value output circuit 506 outputs the binary fixed value 11 to the signal line 526 .
  • the fixed value output circuit 507 outputs the binary fixed value 01 to the signal line 527 .
  • the AND circuit 508 outputs the value of the signal line 525 to the signal line 528 when the value of the signal line 523 is 0. This corresponds to the first row of the attribute information table AIT in FIG. 4A.
  • the AND circuit 508 also outputs 00 to the signal line 528 when the value of the signal line 523 is 1. In this case, the value of signal line 528 does not affect the output of OR circuit 511 .
  • the AND circuit 509 outputs the value of the signal line 526 to the signal line 529 when the value of the signal line 523 is 1 and the value of the signal line 524 is 0. This corresponds to the second row of the attribute information table AIT in FIG. 4A.
  • the AND circuit 509 also outputs 00 to the signal line 529 when the value of the signal line 523 is 0 or the value of the signal line 524 is 1. In this case, the value of signal line 529 does not affect the output of OR circuit 511 .
  • the AND circuit 510 outputs the value of the signal line 527 to the signal line 530 when the value of the signal line 524 is 1. This corresponds to the third row of the attribute information table AIT in FIG. 4A. AND circuit 510 also outputs 00 to signal line 530 when the value of signal line 524 is 0. FIG. In this case, the value of signal line 530 does not affect the output of OR circuit 511 .
  • the OR circuit 511 ORs the three values of the signal lines 528 , 529 and 530 and outputs the result to the signal line 531 . Since two of the three values on signal lines 528, 529 and 530 are 00, the operation of OR circuit 511 effectively selects one of the three values on signal lines 528, 529 and 530. It will be.
  • the value output to the signal line 531 corresponds to the output of the attribute information table AIT in FIG. 4A.
  • the value of the endian attribute of the signal line 531 is output to the signal line 112 as it is.
  • OR circuit 512 outputs 1 to signal line 532 when the type attribute of signal line 531 is 0 or bit 0 of the size signal (size[2:0]) of bus 111 is 1 (equivalent to 1 byte). , otherwise 0 is output.
  • the AND circuit 513 outputs 1 to bit 0 of the signal line 113 when both the endian attribute of the signal line 531 and the value of the signal line 532 are 1. This operation corresponds to the case of outputting 01 to the signal line 113 in the second and third lines of the control signal generation rule CSGR in FIG. 4B. AND circuit 513 also outputs 0 when the endian attribute of signal line 531 or the value of signal line 532 is 0. FIG.
  • the AND circuit 514 Output 1 to bit 1. This operation corresponds to the case of outputting 10 to the signal line 113 in the fourth line of the control signal generation rule CSGR in FIG. 4B.
  • AND circuit 514 also outputs 0 to bit 1 of signal line 113 when bit 1 of the endian attribute or type attribute of signal line 531 or the size signal (size[2:0]) of bus 111 is 0.
  • FIG. 6 is an example of the byte enable conversion circuit 104 of FIG.
  • the byte enable conversion circuit 104 consists of selection circuits 601, 602, 603, and 604.
  • Selection circuit 601 selects bit 3 (be[3]) of the byte enable signal of bus 111 when the value of signal line 112 is 0, and selects bit 3 (be[3]) of the byte enable signal of bus 114. Output. Selection circuit 601 also selects bit 0 (be[0]) of the byte enable signal on bus 111 when the value on signal line 112 is 1, and selects bit 3 (be[3]) of the byte enable signal on bus 114. , output as a byte enable signal after endian conversion.
  • the operation of the selection circuits 602, 603, and 604 is the same.
  • the left input is selected, and when the signal line 112 is 1, the right input is selected. output as a signal.
  • FIG. 7 is an example of the operation of the byte enable conversion circuit 104 of FIG.
  • the byte enable conversion circuit 104 When the signal line 112 is 0, the byte enable conversion circuit 104 outputs the same value as the input.
  • the byte enable conversion circuit 104 reverses the upper and lower order of the input and outputs it.
  • FIG. 8 is an example of the data conversion circuit 103 of FIG. Data conversion is performed on write data (wd[31:0]) and read data (rd[31:0]), but only the write data conversion circuit is shown in FIG.
  • the read data conversion circuit has the same configuration.
  • the data conversion circuit 103 consists of selection circuits 801, 802, 803, and 804.
  • the selection circuit 801 selects bits 31 to 24 (wd[31:24]) of the write data on the bus 111, and selects bits 31 to 24 (wd[31:24]) of the write data on the bus 114. 31:24]) without endian conversion.
  • the selection circuit 801 also selects bits 7 to 0 (wd[7:0]) of the write data on the bus 111 when the value of the signal line 113 is 01, and selects bits 31 to 24 (wd[7:0]) of the data on the bus 114 . 31:24]) as data after endian conversion.
  • Selection circuit 801 also selects bits 15 to 8 (wd[15:8]) of the write data on bus 111 when the value on signal line 113 is 10, and selects bits 31 to 24 (wd[15:8]) of the write data on bus 114. [31:24]) as data after endian conversion.
  • the operation of the selection circuits 802, 803, and 804 is similar.
  • the left input is selected.
  • FIG. 9 is an example of the operation of the data conversion circuit 103 of FIG.
  • the data conversion circuit 103 When the signal line 113 is 00, the data conversion circuit 103 outputs the same value as the input.
  • the data conversion circuit 103 When the signal line 113 is 01, the data conversion circuit 103 reverses the upper and lower order of the input in units of bytes (8 bits) and outputs it.
  • the data conversion circuit 103 switches the upper 16 bits (bits 31 to 16) and the lower 16 bits (bits 15 to 0) for output.
  • FIG. 10 is a first example of the operation of buses 111 and 114 in FIG. Although FIG. 10 does not describe the operation of read data, it is the same as that of write data.
  • the first peripheral circuit (ROM) 105 and the second peripheral circuit (RAM) 106 interpret the write data in 1-byte units regardless of the access size. Therefore, endian conversion is performed so that data at the same address are the same in byte units. For example, the least significant byte (s) of bus 111 is output to the most significant byte of bus 114 when the access size is 4 bytes. This is because the least significant byte of bus 111 corresponds to address 4n, while the most significant byte of bus 114 corresponds to address 4n.
  • the third peripheral circuit (first IO circuit) 107 interprets data in units of the same size as the access size. Therefore, endian conversion is performed so that the order of data is preserved in units of access size. For example, when the access size is 2 bytes and the address is 4n, the data is shifted from the lower to the upper while maintaining the data arrangement order (rs). This ensures that the interpretation of data by the CPU 101 and the interpretation of data by the third peripheral circuit (first IO circuit) 107 are the same.
  • FIG. 11A and 11B are a second example of the operation of the control circuit 102 of FIG.
  • FIG. 11A is a diagram showing a second example of the attribute information table of control circuit 102 of FIG.
  • FIG. 11B is a diagram showing a second example of control signal generation rules for the control circuit 102 of FIG.
  • the difference between the operation of the control circuit 102 in FIGS. 4A and 4B and FIGS. 11A and 11B is that the output of the register size is added to the attribute information table AIT in FIG. 11A, and the control signal in FIG.
  • the only difference is the output of the rule CSGR.
  • the register size attribute indicates the unit size in which the peripheral circuit to be accessed interprets the write value. As described in the description of FIG. 10, in the case of the operation of the control circuit 102 in FIGS. 4A and 4B, when accessing the third peripheral circuit (first IO circuit) 107, the same size as the access size is used as a unit.
  • the third peripheral circuit (first IO circuit) 107 accesses 2 bytes or 4 bytes to an address that interprets data in units of 1 byte, a difference in interpretation with the CPU 101 occurs. There is a problem. In order to deal with such a problem, in the operation of the control circuit 102 in FIGS. 11A and 11B, the register size attribute of the third peripheral circuit (first IO circuit) 107 (in units of bytes to interpret data) The output of the signal line 113 is determined in accordance with .
  • the area of the third peripheral circuit (first IO circuit) 107 is divided into three areas. 2 bytes are output for the attribute, and 4 bytes are output for the register size attribute at addresses F4000000 to F7FFFFFF.
  • the value of the register size attribute is ignored in the control signal generation rule of FIG. 11B. Therefore, the output value of the register size attribute can be 1 byte, 2 bytes, or 4 bytes.
  • the operation when accessing the third peripheral circuit (first IO circuit) 107 is different from that in FIG. 4B.
  • the register size attribute is 1 byte
  • the output to signal line 113 is 01 regardless of the value of the size signal (size[2:0]) on bus 111 .
  • the register size attribute is 2 bytes
  • the operation when size[2:0] is 001 (1 byte) and 010 (2 bytes) is the same as in FIG. 4B, but when size[2:0] is 100 (4 bytes) differs from FIG. 4B in that 10 is output to the signal line 113 .
  • the operation when the register size attribute is 4 bytes is the same as in FIG. 4B.
  • FIG. 12 is a second example of the operation of buses 111 and 114 in FIG. FIG. 12 corresponds to a second example of the operation of the control circuit 102 of FIGS. 11A and 11B.
  • Operations for accessing the first peripheral circuit (ROM) 105, the second peripheral circuit (RAM) 106, and the fourth peripheral circuit (second IO circuit) 108 are the same as in FIG. , and the third peripheral circuit (first IO circuit) 107 only.
  • the operation differs from that in FIG. 10 when the access size is 2 bytes and 4 bytes. In both cases, the same data is output to bytes with the same address in byte units. For example, if the access size is 4 bytes, the least significant byte (s) of bus 111 is output to the most significant byte of bus 114 . This is because the least significant byte of bus 111 corresponds to address 4n, while the most significant byte of bus 114 corresponds to address 4n.
  • the register size attribute is 1 byte, the third peripheral circuit (first IO circuit) 107 interprets data in 1-byte units. 107 data interpretation is guaranteed to be the same.
  • the operation differs from that in FIG. 10 when the access size is 4 bytes.
  • the lower two bytes (rs) of the bus 111 are output to the upper two bytes of the bus 114 while preserving the order of data arrangement. Since the lower two bytes of the bus 111 correspond to the addresses 4n and 4n+1, the data is shifted to the same address area of the bus 114. It is guaranteed that the interpretation of the data of the first IO circuit) 107 will be the same.
  • the upper 2 bytes (pq) of the bus 111 are output to the lower 2 bytes of the bus 114 while preserving the data arrangement order.
  • FIG. 13 is a second example of the control circuit 102 of FIG.
  • control circuit 102 in FIG. 5 The difference between control circuit 102 in FIG. 5 and control circuit 102A in FIG. 13 is that fixed value output circuits 501, 502, 505, 506 and 507 in FIG. , the value can be rewritten from the bus 111 .
  • the write control circuit 1311 controls the request signal (req) of the bus 111 to be 1, the write signal (wr) to be 1, the size signal (size[2:0]) to be 100 (4 bytes), and the address signal (adr[31 :2]) is a predetermined value, a write control signal for the memory circuits 1301 , 1302 , 1305 , 1306 and 1307 is output to one of the signal lines 1321 , 1322 , 1325 , 1326 and 1327 .
  • the write control signal consists of write enable and write data, and the write data is output by selecting part of the write data (wd[31:0]) on the bus 111 .
  • control circuit 102A of FIG. 13 By adopting the configuration of the control circuit 102A of FIG. 13, it is possible to set the contents (stored values) of the attribute information table AIT of FIG. 4A from the CPU 101.
  • FIG. 14 is a second example of a configuration diagram of a processor to which the present invention is applied.
  • the endian conversion circuit 1409 changes the endian conversion rule according to the information about the endian of the CPU 1401 received from the signal line 1411 .
  • the processor 1400 performs a process of changing the endian of the CPU 1401, a process of transmitting information about the endian of the CPU 1401 to the signal line 1411 between the CPU 1401 and the endian conversion circuit 1409, and a process of transmitting information about the endian of the CPU 1401 received from the signal line 1411. and changing the endian conversion rule of the endian conversion circuit 1409 accordingly.
  • the control circuit 1402 generates signals to be output to the signal lines 112 and 113 in consideration of the endian information of the CPU 1401 taken in from the signal line 1411 in addition to the built-in table AIT. Details will be described later.
  • FIG. 15A and 15B are examples of the operation of the control circuit 1402 in FIG. 15A shows the attribute information table AIT of the control circuit 1402 of FIG. 14.
  • FIG. 15B is a diagram showing the control signal generation rule CSGR of the control circuit 1402 of FIG.
  • the attribute information table AIT in FIG. 15A is the same as the attribute information table AIT in FIG. 4A.
  • control signal generation rule CSRG in FIG. 15B differs from the control signal generation rule CSRG in FIG. 4B in that the value of the signal line 1411 is taken into consideration.
  • the operation when the value of the signal line 1411 is 0 is the same as in FIG. 4B.
  • the signal line 113 is 01 when the type attribute is 0, and 01, 10, 00, or 00 depending on the value of the size signal (size[2:0]) of the bus 111 when the type attribute is 1. becomes.
  • FIG. 16 is a third example of a configuration diagram of a processor to which the present invention is applied.
  • the difference between the processor 100 in FIG. 1 and the processor 1600 in FIG. 16 is that the endian conversion circuit 1609 has a delay circuit 1601 .
  • the processing of the control circuit 102, the data conversion circuit 103, and the byte enable conversion circuit 104 takes time. It may lead to lower operating frequency.
  • this embodiment divides the transfer from the CPU 101 to the peripheral circuits (105, 106, 107, 108) into two clock cycles by the delay circuit 1601 to shorten the transfer time per clock cycle. to prevent the operating frequency from dropping.
  • the transfer of read data from the peripheral circuits (105, 106, 107, 108) to the CPU 101 is delayed by one clock cycle or more from the start of the transfer.
  • the read data transfer is not divided into two clock cycles in this embodiment. However, since the transfer time becomes long due to the processing time of the data conversion circuit 103, the transfer of the read data may also be divided into clock cycles in order to eliminate the effect.
  • the delay circuit 1601 When the value fetched from the signal line 112 is 0, the delay circuit 1601 outputs the byte enable fetched from the signal line 1611 and the write data fetched from the signal line 1612 to the bus 114 as they are.
  • the delay circuit 1601 also delays the byte enable signal received from the signal line 1611 and the write data received from the signal line 1612 by one clock cycle when the value received from the signal line 112 is 1, and outputs the delayed data to the bus 114 .
  • the delay circuit 1601 also outputs the read data fetched from the bus 114 to the signal line 1612 as it is.
  • the delay circuit 1601 also outputs the read data valid signal received from the bus 114 to the bus 111 as it is.
  • the endian conversion circuit 1609 has a function or process of delaying byte enable and data by one clock cycle with the delay circuit 1601 when endian conversion is required.
  • FIG. 17 is an example of the delay circuit 1601 in FIG.
  • the delay circuit 1601 consists of storage circuits 1701, 1702, 1703, 1705, AND circuits 1704, 1709, 1710, 1711, selection circuits 1706, 1707, 1708, and an OR circuit 1712.
  • the storage circuit 1701 delays the byte enable signal received from the signal line 1611 by one clock cycle and outputs it to the signal line 1721 .
  • the storage circuit 1702 delays the write data (wd[31:0]) fetched from the signal line 1612 by one clock cycle and outputs it to the signal line 1722 .
  • the storage circuit 1703 delays the write signal (wr), size signal (size[2:0]), and address signal (adr[31:2]) received from the bus 111 by one clock cycle and outputs them to the signal line 1723 .
  • the AND circuit 1704 ANDs the byte enable conversion valid signal received from the signal line 112 and the request signal (req) received from the bus 111 and outputs the result to the signal line 1724 .
  • the storage circuit 1705 delays the state of the signal line 1724 by one clock cycle and outputs it to the signal line 1725 .
  • the selection circuit 1706 outputs the value of the signal line 1721 as the byte enable signal (be[3:0]) of the bus 114 when the value of the signal line 1725 is 1. Selection circuit 1706 also outputs the byte enable signal (be[3:0]) of bus 111 as the byte enable signal (be[3:0]) of bus 114 when the value of signal line 1725 is 0.
  • the selection circuit 1707 When the value of the signal line 1725 is 1, the selection circuit 1707 outputs the value of the signal line 1722 as write data (wd[31:0]) of the bus 114 .
  • the selection circuit 1707 also outputs the write data (wd[31:0]) of the bus 111 as the write data (wd[31:0]) of the bus 114 when the value of the signal line 1725 is 0.
  • the selection circuit 1708 converts the value of the signal line 1723 to the write signal (wr) of the bus 114, the size signal (size[2:0]), the address signal (adr[31:2] ).
  • the selection circuit 1708 also outputs the write signal (wr), size signal (size[2:0]) and address signal (adr[31:2]) of the bus 111 to the bus 114 when the value of the signal line 1725 is 0. They are output as a write signal (wr), a size signal (size[2:0]), and an address signal (adr[31:2]).
  • the AND circuit 1709 ANDs the write signal (wr) on the signal line 1723 and the value on the signal line 1725 and outputs the result to the signal line 1729 .
  • the AND circuit 1710 takes the AND of the inverted value of the signal line 1725 and the value of the signal line 1724 and outputs it to the signal line 1730 .
  • signal line 1730 is 1 for only one cycle when signal line 1724 rises.
  • the AND circuit 1711 takes the AND of the inverted value of the signal line 1730 and the request signal (req) of the bus 111 and outputs it to the signal line 1731 .
  • the signal line 1731 becomes a signal obtained by delaying the rise of the request signal (req) of the bus 111 by one cycle only when the signal line 112 is 1.
  • the OR circuit 1712 ORs the value of the signal line 1729 and the value of the signal line 1731 and outputs it as a request signal (req) of the bus 114 .
  • FIG. 18 is an example of a timing chart of buses 111 and 114 in FIG.
  • Read data transfer is performed on the bus 111 in the 3rd to 7th cycles. Since the signal line 112 is 1, the start of the same read data transfer on the bus 114 is delayed to the fourth cycle, but the end of the data transfer is the same as the bus 111 on the seventh cycle. This is the request signal (req), write signal (wr), size signal (size[2:0]), byte enable signal (be[3:0]), address signal (adr [31:2]) is delayed by one cycle, but there is no circuit to delay the read data valid signal (rdv) and read data (rd[31:0]) by one cycle.

Abstract

Provided is a means of preventing, in a processor having a CPU, a plurality of peripheral circuits, and an endian conversion circuit provided between the CPU and the plurality of peripheral circuits, a written value from being interpreted as a value different from that intended by a software creator when the peripheral circuits interpret the written value as a multi-byte value, to facilitate the creation of software. The endian conversion circuit has a table indicating a relationship between addresses and types of connection destinations, and a data conversion circuit and a byte-enable conversion circuit in the endian conversion circuit are controlled separately by using type information retrieved from the table through use of the address of the access destination.

Description

プロセッサおよびエンディアン変換方法Processor and endian conversion method
 本開示は、CPUと周辺回路の間に設けられたエンディアン変換回路を有するプロセッサおよびエンディアン変換方法に関する。 The present disclosure relates to a processor having an endian conversion circuit provided between a CPU and peripheral circuits and an endian conversion method.
 本技術分野の背景技術として、特開平8-202646号公報(特許文献1)がある。この公報には、CPU(メインプロセッサ)と周辺回路(I/O装置)でエンディアンが異なる場合に両者の間の接続を容易化するためのエンディアン変換回路(変換器)が記載されている。 As background technology in this technical field, there is Japanese Patent Application Laid-Open No. 8-202646 (Patent Document 1). This publication describes an endian conversion circuit (converter) for facilitating connection between a CPU (main processor) and a peripheral circuit (I/O device) when the endian is different.
特開平8-202646号公報Japanese Patent Application Laid-Open No. 8-202646
 前記特許文献1のエンディアン変換回路は、CPUと周辺回路でエンディアンが異なる場合にデータの並べ替えを行う。例えば、CPUから16進数で4バイトの数値00000001を周辺機能に書き込んだ場合、01000000に変換する。これは、4バイトの数値に対するアドレスの振り方がリトルエンディアンとビッグエンディアンで異なるという事実に対応したものである。具体的には、リトルエンディアンでは下位バイトから上位バイトの順にアドレスを振るのに対し、ビッグエンディアンでは上位バイトから下位バイトの順にアドレスを振る。従って、1バイト単位でデータを解釈した時に同一アドレスに同じデータが格納される様にするためには、データの並び順を入れ替える必要がある。しかしながら、4バイトの数値として解釈した場合には、異なる値が書き込まれることになる。周辺回路が書き込み値を4バイトの値として解釈すると、ソフトウェアの作成者が意図した値と異なる値として解釈されることになる。これは4バイトに場合に限らず、一般に1バイトより大きい単位で書き込み値を解釈する場合には、ソフトウェアの作成者が意図した値と異なる値として解釈される。 The endian conversion circuit of Patent Document 1 rearranges data when the endian is different between the CPU and the peripheral circuit. For example, when a 4-byte hexadecimal value 00000001 is written from the CPU to the peripheral function, it is converted to 01000000. This corresponds to the fact that how to assign addresses to 4-byte numbers differs between little endian and big endian. Specifically, in little endian, addresses are assigned in order from lower byte to upper byte, while in big endian, addresses are assigned in order from upper byte to lower byte. Therefore, in order to store the same data at the same address when the data is interpreted in units of one byte, it is necessary to change the order of the data. However, if interpreted as a 4-byte number, a different value would be written. If the peripheral interprets the write value as a 4-byte value, it will interpret it differently than the software author intended. This is not limited to the case of 4 bytes, but in general, when interpreting a written value in units larger than 1 byte, it is interpreted as a value different from the value intended by the creator of the software.
 本開示は、CPUと複数の周辺回路と、CPUと複数の周辺回路の間に設けられたエンディアン変換回路を有するプロセッサにおいて、周辺回路が書き込み値を複数バイトの値として解釈した場合に、ソフトウェアの作成者が意図した値と異なる値として解釈されることを防止し、ソフトウェアの作成を容易化する手段を提供することを目的とする。 The present disclosure is a processor having a CPU, a plurality of peripheral circuits, and an endian conversion circuit provided between the CPU and the plurality of peripheral circuits. It is an object of the present invention to provide means for facilitating the creation of software by preventing interpretation as values different from those intended by the creator.
 その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。 Other issues and novel features will become apparent from the description and accompanying drawings of this specification.
 本開示のうち代表的なものの概要を簡単に説明すれば下記の通りである。 A brief outline of representative items of the present disclosure is as follows.
 上記課題を解決するため、一実施の形態に係るプロセッサは、エンディアン変換回路がアドレスと接続先の種別の関係を示すテーブルを有し、アクセス先のアドレスを用いてテーブルから取り出した種別情報を用いてエンディアン変換回路内のデータ変換回路とバイトイネーブル変換回路とを別々に制御する。 In order to solve the above problem, in a processor according to one embodiment, an endian conversion circuit has a table indicating the relationship between an address and a connection destination type, and uses type information extracted from the table using an access destination address. separately controls the data conversion circuit and the byte enable conversion circuit in the endian conversion circuit.
 上記一実施の形態に係るプロセッサによれば、CPUと周辺回路のエンディアンが異なる場合に、複数バイトのデータに対するアドレスの振り方の違いに応じてバイトイネーブルをバイトイネーブル変換回路で変換するとともに、周辺回路が数値を何バイト単位で解釈するかを考慮してデータをデータ変換回路で変換することにより、周辺回路がソフトウェアの作成者が意図した値を正しく解釈することが可能となる。 According to the processor according to the above embodiment, when the endian of the CPU and the peripheral circuit are different, the byte enable is converted by the byte enable conversion circuit according to the difference in how to assign addresses to the data of multiple bytes, and the peripheral By converting the data by the data conversion circuit in consideration of how many bytes the circuit interprets the numerical value, it is possible for the peripheral circuit to correctly interpret the value intended by the creator of the software.
 上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。 Problems, configurations, and effects other than those described above will be clarified by the following description of the embodiments.
本発明を適用したプロセッサの構成図の第1の例である。1 is a first example of a configuration diagram of a processor to which the present invention is applied; FIG. 図1のバス111、及びバス114のタイミングチャートの例である。It is an example of a timing chart of buses 111 and 114 in FIG. 図1のバス111、及びバス114のリトルエンディアンのバイトイネーブルの動作の例である。2 is an example of the operation of little endian byte enables of buses 111 and 114 of FIG. 図1のバス111、及びバス114のビッグエンディアンのバイトイネーブルの動作の例である。It is an example of the big endian byte enable operation of bus 111 and bus 114 of FIG. 図1の制御回路102の属性情報テーブルの第1の例を示す図である。4 is a diagram showing a first example of an attribute information table of the control circuit 102 of FIG. 1; FIG. 図1の制御回路102の制御信号生成ルールの第1の例を示す図である。FIG. 2 is a diagram showing a first example of control signal generation rules of the control circuit 102 of FIG. 1; 図1の制御回路102の第1の例である。2 is a first example of the control circuit 102 of FIG. 1; 図1のバイトイネーブル変換回路104の例である。It is an example of the byte enable conversion circuit 104 of FIG. 図1のバイトイネーブル変換回路104の動作の例である。It is an example of the operation of the byte enable conversion circuit 104 of FIG. 図1のデータ変換回路103の例である。It is an example of the data conversion circuit 103 of FIG. 図1のデータ変換回路103の動作の例である。It is an example of the operation of the data conversion circuit 103 of FIG. 図1のバス111、及びバス114の動作の第1の例である。2 is a first example of the operation of buses 111 and 114 in FIG. 1; 図1の制御回路102の属性情報テーブルの第2の例を示す図である。4 is a diagram showing a second example of an attribute information table of the control circuit 102 of FIG. 1; FIG. 図1の制御回路102の制御信号生成ルールの第2の例を示す図である。3 is a diagram showing a second example of a control signal generation rule for the control circuit 102 of FIG. 1; FIG. 図1のバス111、及びバス114の動作の第2の例である。2 is a second example of the operation of buses 111 and 114 in FIG. 1; 図1の制御回路102の第2の例である。2 is a second example of the control circuit 102 of FIG. 1; 本発明を適用したプロセッサの構成図の第2の例である。FIG. 4 is a second example of a configuration diagram of a processor to which the present invention is applied; 図14の制御回路1402の属性情報テーブルを示す図である。15 is a diagram showing an attribute information table of the control circuit 1402 of FIG. 14; FIG. 図14の制御回路1402の制御信号生成ルールを示す図である。15 is a diagram showing a control signal generation rule of a control circuit 1402 of FIG. 14; FIG. 本発明を適用したプロセッサの構成図の第3の例である。FIG. 4 is a third example of a configuration diagram of a processor to which the present invention is applied; 図16の遅延回路1601の例である。It is an example of the delay circuit 1601 of FIG. 図16のバス111、及びバス114のタイミングチャートの例である。It is an example of a timing chart of buses 111 and 114 in FIG.
 以下、実施形態、および、実施例について、図面を用いて説明する。ただし、以下の説明において、同一構成要素には同一符号を付し繰り返しの説明を省略することがある。なお、図面は説明をより明確にするため、実際の態様に比べ、模式的に表される場合があるが、あくまで一例であって、本発明の解釈を限定するものではない。 Hereinafter, embodiments and examples will be described with reference to the drawings. However, in the following description, the same components may be denoted by the same reference numerals, and repeated descriptions may be omitted. In addition, in order to clarify the description, the drawings may be represented schematically as compared with actual embodiments, but they are only examples and do not limit the interpretation of the present invention.
 実施形態に係るプロセッサは、以下の構成とされている。 The processor according to the embodiment has the following configuration.
 すなわち、プロセッサ(100)は、CPU(101)と、複数の周辺回路(105~108)と、CPU(101)と複数の周辺回路(105~108)の間に設けられたエンディアン変換回路(109)と、を有する。そして、エンディアン変換回路(109)は、アドレスと接続先の種別の関係を示す種別情報(エンディアン属性、タイプ属性)を格納するテーブル(AIT)と、バイトイネーブル変換回路(104)と、データ変換回路(103)と、を有する。エンディアン変換回路(109)は、CPU(101)から出力されたアクセス先の出力アドレスを用いてテーブル(AIT)から取り出した種別情報(エンディアン属性、タイプ属性)を用いてバイトイネーブル変換回路(104)とデータ変換回路(103)とを別々に制御する。 That is, the processor (100) includes a CPU (101), a plurality of peripheral circuits (105-108), and an endian conversion circuit (109) provided between the CPU (101) and the plurality of peripheral circuits (105-108). ) and The endian conversion circuit (109) includes a table (AIT) storing type information (endian attribute, type attribute) indicating the relationship between the address and the type of connection destination, a byte enable conversion circuit (104), and a data conversion circuit. (103) and The endian conversion circuit (109) converts the byte enable conversion circuit (104) using the type information (endian attribute, type attribute) extracted from the table (AIT) using the output address of the access destination output from the CPU (101). and the data conversion circuit (103) are separately controlled.
 また、実施形態に係るエンディアン変換方法は、以下の構成とされている。 Also, the endian conversion method according to the embodiment has the following configuration.
 CPU(101)と、複数の周辺回路(105~108)と、CPU(101)と前記複数の周辺回路(105~108)の間に設けられたエンディアン変換回路(109)を有し、エンディアン変換回路(109)は、アドレスと接続先の種別の関係を示す種別情報(エンディアン属性、タイプ属性)を格納するテーブル(AIT)と、バイトイネーブル変換回路(104)と、データ変換回路(103)と、を有するプロセッサ(100)のエンディアン変換方法であって、
 a)CPU(101)から出力されたアクセス先の出力アドレスを用いてテーブル(AIT)から種別情報(エンディアン属性、タイプ属性)を取り出す工程と、
 b)取り出した種別情報(エンディアン属性、タイプ属性)に基づいて、バイトイネーブル変換回路(104)とデータ変換回路(103)とを別々に制御する工程と、を含む。
a CPU (101), a plurality of peripheral circuits (105 to 108), and an endian conversion circuit (109) provided between the CPU (101) and the plurality of peripheral circuits (105 to 108), wherein the endian conversion The circuit (109) includes a table (AIT) storing type information (endian attribute, type attribute) indicating the relationship between the address and the type of connection destination, a byte enable conversion circuit (104), and a data conversion circuit (103). , an endian conversion method for a processor (100) comprising:
a) a step of extracting type information (endian attribute, type attribute) from the table (AIT) using the output address of the access destination output from the CPU (101);
b) separately controlling the byte enable conversion circuit (104) and the data conversion circuit (103) based on the extracted type information (endian attribute, type attribute);
 上記一実施形態に係るプロセッサおよびエンディアン変換方法によれば、CPUと周辺回路のエンディアンが異なる場合に、複数バイトのデータに対するアドレスの振り方の違いに応じてバイトイネーブルをバイトイネーブル変換回路で変換するとともに、周辺回路が数値を何バイト単位で解釈するかを考慮してデータをデータ変換回路で変換することにより、周辺回路がソフトウェアの作成者が意図した値を正しく解釈することが可能となる。 According to the processor and the endian conversion method according to the above-described embodiment, when the endian of the CPU and the peripheral circuit are different, the byte enable is converted by the byte enable conversion circuit according to the difference in how the addresses are assigned to the data of multiple bytes. In addition, by converting the data by the data conversion circuit in consideration of how many bytes the peripheral circuit interprets the numerical value, the peripheral circuit can correctly interpret the value intended by the creator of the software.
 以下、図面を用いて実施例を詳細に説明する。 Examples will be described in detail below with reference to the drawings.
 図1は、本発明を適用したプロセッサの構成図の第1の例である。 FIG. 1 is a first example of a configuration diagram of a processor to which the present invention is applied.
 本実施例のプロセッサ100は、CPU101、エンディアン変換回路109、第1の周辺回路(ROM)105、第2の周辺回路(RAM)106、第3の周辺回路(第1のIO回路)107、第4の周辺回路(第2のIO回路)108、第1バス(以下、バスと言う)111、第2バス(以下、バスと言う)114、を有する。CPU101はバス111に接続され、第1の周辺回路(ROM)105、第2の周辺回路(RAM)106、第3の周辺回路(第1のIO回路)107および第4の周辺回路(第2のIO回路)108はバス114に接続される。エンディアン変換回路109は、バス111とバス114との間に接続される。ROMは、例えば、リードアンリメモリのような不揮発性メモリであり、RAMは、例えば、ランダムアクセスメモリのような揮発性メモリである。 The processor 100 of this embodiment includes a CPU 101, an endian conversion circuit 109, a first peripheral circuit (ROM) 105, a second peripheral circuit (RAM) 106, a third peripheral circuit (first IO circuit) 107, a 4 peripheral circuits (second IO circuits) 108 , a first bus (hereinafter referred to as bus) 111 , and a second bus (hereinafter referred to as bus) 114 . The CPU 101 is connected to a bus 111 and includes a first peripheral circuit (ROM) 105, a second peripheral circuit (RAM) 106, a third peripheral circuit (first IO circuit) 107 and a fourth peripheral circuit (second IO circuit) 108 is connected to bus 114 . Endian conversion circuit 109 is connected between bus 111 and bus 114 . ROM is non-volatile memory such as read only memory, and RAM is volatile memory such as random access memory.
 エンディアン変換回路109は、制御回路102、データ変換回路103、バイトイネーブル変換回路104を有する。 The endian conversion circuit 109 has a control circuit 102, a data conversion circuit 103, and a byte enable conversion circuit 104.
 CPU101は第1の周辺回路(ROM)105に格納されたプログラムに従い、以下の処理を実行する。CPU101はまず、第3の周辺回路(第1のIO回路:IO1)107、及び第4の周辺回路(第2のIO回路:IO2)108からバス114、111を介して入力情報を取り込み、予め定められた処理を行った後、バス111、114を介して第3の周辺回路(第1のIO回路)107、及び第4の周辺回路(第2のIO回路)108に出力情報を書き込む。第2の周辺回路(RAM)106は処理の途中経過の保存に使用される。 The CPU 101 executes the following processes according to the program stored in the first peripheral circuit (ROM) 105. The CPU 101 first takes in input information from a third peripheral circuit (first IO circuit: IO1) 107 and a fourth peripheral circuit (second IO circuit: IO2) 108 via buses 114 and 111, After performing prescribed processing, output information is written to the third peripheral circuit (first IO circuit) 107 and fourth peripheral circuit (second IO circuit) 108 via buses 111 and 114 . A second peripheral circuit (RAM) 106 is used for saving intermediate progress of processing.
 第3の周辺回路(第1のIO回路)107はバス111、114を介してCPU101から入力情報の取り込み要求を受け取ると、信号線115から取り込んだ入力情報をバス114、111を介してCPU101に出力する。第3の周辺回路(第1のIO回路)107はまた、バス111、114を介してCPU101から出力情報の書き込み要求を受け取ると、書き込み値を内部に保持するとともに信号線115に出力する。 When the third peripheral circuit (first IO circuit) 107 receives an input information fetch request from the CPU 101 via the buses 111 and 114, the input information fetched from the signal line 115 is sent to the CPU 101 via the buses 114 and 111. Output. When the third peripheral circuit (first IO circuit) 107 receives an output information write request from the CPU 101 via the buses 111 and 114 , it internally holds the write value and outputs it to the signal line 115 .
 第4の周辺回路(第2のIO回路)108の動作も第3の周辺回路(第1のIO回路)107の動作と同様である。 The operation of the fourth peripheral circuit (second IO circuit) 108 is similar to the operation of the third peripheral circuit (first IO circuit) 107.
 制御回路102は、バス111を介してCPU101からアクセスアドレスとアクセスサイズの情報を受け取り、バイトイネーブル変換回路104とデータ変換回路103の制御信号を生成し、信号線112、113に出力する。 The control circuit 102 receives access address and access size information from the CPU 101 via the bus 111 , generates control signals for the byte enable conversion circuit 104 and the data conversion circuit 103 , and outputs them to signal lines 112 and 113 .
 バイトイネーブル変換回路104は、信号線112から受け取った制御信号(第1信号)に従い、バス111のバイトイネーブルに所定の変換を行ってバス114に出力する。 The byte enable conversion circuit 104 performs predetermined conversion on the byte enable of the bus 111 according to the control signal (first signal) received from the signal line 112 and outputs it to the bus 114 .
 データ変換回路103は、信号線113から受け取った制御信号(第2信号)に従い、バス111のライトデータに所定の変換を行ってバス114に出力する。データ変換回路103はまた、信号線113から受け取った制御信号に従い、バス114のリードデータに所定の変換を行ってバス111に出力する。 The data conversion circuit 103 performs predetermined conversion on the write data on the bus 111 according to the control signal (second signal) received from the signal line 113 and outputs the converted data to the bus 114 . The data conversion circuit 103 also performs predetermined conversion on the read data of the bus 114 according to the control signal received from the signal line 113 and outputs the converted data to the bus 111 .
 図2は、図1のバス111、及びバス114のタイミングチャートの例である。バス111とバス114の動作は同様であるため、両者を区別せずに記載した。 FIG. 2 is an example of a timing chart of buses 111 and 114 in FIG. Since the operations of bus 111 and bus 114 are similar, they are described without distinguishing between them.
 clkはクロック信号(1ビット)、reqはリクエスト信号(1ビット)、wrはライト信号(1ビット)、size[2:0]はサイズ信号(サイズ情報)(3ビット)、be[3:0]はバイトイネーブル信号(4ビット)、adr[31:2]はアドレス信号(30ビット)、wd[31:0]はライトデータ(32ビット)、rdvはリードデータ有効信号(1ビット)、rd[31:0]はリードデータ(32ビット)である。size[2:0]はsize[2]、size[1]、size[0]の3ビットの信号から構成されていることを示し、size[2]が最上位ビット、size[0]が最下位ビットである。同様に、be[3:0]はbe[3]からbe[0]の4ビット、adr[31:2]はadr[31]からadr[2]の30ビット、wd[31:0]はwd[31]からwd[0]の32ビット、rd[31:0]はrd[31]からrd[0]の32ビットの信号から構成されており、いずれも[]内の数値が大きいものが上位ビットである。req、wr、size[2:0]、be[3:0]、adr[31:2]、wd[31:0]はCPU101から周辺回路105~108の方向の信号、rdv、rd[31:0]は周辺回路105~108からCPU101の方向の信号である。アドレス空間は32ビットであるが、ライトデータ、及びリードデータが4バイトであるためアドレスの下位2ビットは伝送されず、代わりに4バイトのデータのうちどのバイトが有効かをバイトイネーブルで示す。バイトイネーブルの動作は後述する。サイズ信号は2進数で001、010、100の3通りのうちのいずれかであり、それぞれ1バイト、2バイト、4バイトの転送(データ転送サイズ)を行うことを示す。 clk is a clock signal (1 bit), req is a request signal (1 bit), wr is a write signal (1 bit), size[2:0] is a size signal (size information) (3 bits), be[3:0] ] is a byte enable signal (4 bits), adr[31:2] is an address signal (30 bits), wd[31:0] is write data (32 bits), rdv is a read data valid signal (1 bit), rd [31:0] is read data (32 bits). size[2:0] indicates that it consists of a 3-bit signal of size[2], size[1], and size[0], where size[2] is the most significant bit and size[0] is the most significant bit. Lower bits. Similarly, be[3:0] is 4 bits from be[3] to be[0], adr[31:2] is 30 bits from adr[31] to adr[2], wd[31:0] is 32 bits from wd[31] to wd[0], and rd[31:0] consists of 32 bits from rd[31] to rd[0]. is the upper bit. req, wr, size[2:0], be[3:0], adr[31:2], wd[31:0] are signals from the CPU 101 to the peripheral circuits 105 to 108, rdv, rd[31: 0] are signals from the peripheral circuits 105 to 108 to the CPU 101 . Although the address space is 32 bits, since the write data and read data are 4 bytes, the lower 2 bits of the address are not transmitted. Instead, which byte of the 4 bytes of data is valid is indicated by byte enable. Byte enable operation will be described later. The size signal is one of three binary numbers 001, 010, and 100, indicating that a transfer of 1 byte, 2 bytes, and 4 bytes (data transfer size) is to be performed, respectively.
 バス111とバス114のおのおのは、例えば、wd[31:0]およびrd[31:0]などのデータを転送するための32本のデータ信号線を含むデータバスと、adr[31:2]はアドレス信号を転送するための30本のアドレス信号線を含むアドレスバスと、リクエスト信号(req:1ビット)、ライト信号(wr:1ビット)、サイズ信号(size[2:0]:3ビット)およびバイトイネーブル信号(be[3:0]:4ビット)を転送するための転送するための9本の制御信号線を含む制御バスと、を含むと見なすことも可能である。 Buses 111 and 114 each include a data bus including 32 data signal lines for transferring data, eg, wd[31:0] and rd[31:0], and adr[31:2]. is an address bus including 30 address signal lines for transferring address signals, a request signal (req: 1 bit), a write signal (wr: 1 bit), a size signal (size[2:0]: 3 bits ) and a control bus including nine control signal lines for transferring byte enable signals (be[3:0]: 4 bits).
 1サイクル目(cycle=1)は書き込みのデータ転送である。書き込み時はreqとwrが1となり、size[2:0]、be[3:0]、adr[31:2]、wd[31:0]にそれぞれ有効な値(sz1、be1、a1、d1)が出力される。 The first cycle (cycle=1) is a write data transfer. When writing, req and wr are 1, and valid values (sz1, be1, a1, d1 ) is output.
 3~6サイクル目は読み出しのデータ転送である。読み出し時はreqが1、wrが0となる。また、最初のサイクル(3サイクル目)にsize[2:0]、be[3:0]、adr[31:2]に有効な値(sz2、be2、a2)が出力される。読み出しのサイクル数は固定ではなく、rdvが1となったサイクルで転送が終了する。rdvが1となったサイクルにrd[31:0]に有効な値(d2)が出力される。なお、図1、図2では省略したが、rdv、rd[31:0]は周辺回路105~108がそれぞれ値を出力する。rdvに関しては、バス114上で4つの周辺回路の出力のORが取られる。図2にはORを取った後の状態を記載した。また、rd[31:0]に関しては、バス114上でrdvに1を出力した周辺回路の出力値が選択される。図2には選択後の状態を記載した。rdvに1を出力した周辺回路が存在しない場合は、rd[31:0]の値は無視される。 The 3rd to 6th cycles are read data transfer. When reading, req is 1 and wr is 0. Effective values (sz2, be2, a2) are output to size[2:0], be[3:0], and adr[31:2] in the first cycle (third cycle). The number of read cycles is not fixed, and the transfer ends in the cycle in which rdv becomes 1. A valid value (d2) is output to rd[31:0] in the cycle in which rdv becomes 1. Although omitted in FIGS. 1 and 2, rdv and rd[31:0] are output by the peripheral circuits 105 to 108, respectively. With respect to rdv, the four peripheral outputs are OR'ed on bus 114 . FIG. 2 shows the state after the OR operation. As for rd[31:0], the output value of the peripheral circuit that outputs 1 to rdv on the bus 114 is selected. FIG. 2 shows the state after selection. If there is no peripheral circuit that outputs 1 to rdv, the value of rd[31:0] is ignored.
 図3A、図3Bは、図1のバス111、及びバス114のバイトイネーブルの動作の例である。図3Aは、図1のバス111、及びバス114のリトルエンディアン(Little Endian)のバイトイネーブルの動作の例である。図3Bは、図1のバス111、及びバス114のビッグエンディアン(Big Endian)のバイトイネーブルの動作の例である。リトルエンディアン(Little Endian)リトルエンディアン(Little Endian)とビッグエンディアン(Big Endian)で動作が異なるため、別々に記載した。リトルエンディアンは第1エンディアン、ビッグエンディアンは第1エンディアンと異なる第2エンディアンと言うことができる。 3A and 3B are examples of byte-enable operation of buses 111 and 114 in FIG. FIG. 3A is an example of Little Endian byte enable operation for buses 111 and 114 of FIG. FIG. 3B is an example of the operation of the Big Endian byte enable of buses 111 and 114 of FIG. Little Endian Little Endian and Big Endian are described separately because their operations are different. Little endian can be said to be the first endian, and big endian can be said to be the second endian different from the first endian.
 前述の通り、転送するデータのサイズは1バイト、2バイト、4バイトの3通りのケースがある。 As mentioned above, there are three cases for the size of data to be transferred: 1 byte, 2 bytes, and 4 bytes.
 1バイト(8ビット)の転送の場合(サイズ信号:size[2:0]が001の場合)は、4バイトのデータのうちのどのバイトにデータが出力されるかによって、4通りの場合(図3A:be[3:0]:0001,0010,0100,1000、図3B:be[3:0]:1000,0100,0010,0001)がある(つまり、バス111及びバス114のおのおのがデータバスとして32本のデータ線DL31-DL0を含む場合、1バイトのデータがデータ線群DL31-DL24,DL23-DL16,DL15-DL8,DL7-DL0のどのデータ線群に出力されるよって、4通りの場合がある)。リトルエンディアンは下位のバイトのアドレスが小さく、上位のバイトのアドレスが大きい。一方、ビッグエンディアンは下位のバイトのアドレスが大きく、上位のバイトのアドレスが小さい。 In the case of 1-byte (8-bit) transfer (when the size signal: size[2:0] is 001), there are four cases ( 3A: be[3:0]:0001,0010,0100,1000, FIG. 3B: be[3:0]:1000,0100,0010,0001) (i.e., bus 111 and bus 114 each have data When 32 data lines DL31 to DL0 are included as a bus, 1-byte data is output to which data line group among the data line groups DL31 to DL24, DL23 to DL16, DL15 to DL8, and DL7 to DL0. may be). Little endian has a lower byte address and a higher byte address. On the other hand, big endian has a large lower byte address and a smaller upper byte address.
 2バイト(16ビット)の転送(サイズ信号:size[2:0]が010の場合)は、アドレスが2の倍数のケースしか許されていない。従って、4バイトのデータのうちの上位2バイトと下位2バイトのどちらにデータがあるかによって2通りの場合(図3A::be[3:0]:0011,1100、図3B:1100,0011)がある(つまり、バス111及びバス114のおのおのがデータバスとして32本のデータ線DL31-DL0を含む場合において、2バイトのデータがデータ線群DL31-DL16,DL15-DL0のどのデータ線群に出力されるよって、2通りの場合がある)。アドレス4nの2バイト転送はアドレス4nと4n+1の1バイト転送の重ね合わせに相当し、アドレス4n+2の2バイト転送はアドレス4n+2と4n+3の1バイト転送の重ね合わせに相当する。  Transfer of 2 bytes (16 bits) (when the size signal: size[2:0] is 010) is allowed only when the address is a multiple of 2. Therefore, there are two cases (Figure 3A::be[3:0]: 0011, 1100, Figure 3B: 1100, 0011 ) (that is, when each of the buses 111 and 114 includes 32 data lines DL31 to DL0 as a data bus, 2-byte data can , there are two cases). A 2-byte transfer at address 4n corresponds to a superposition of 1-byte transfers at addresses 4n and 4n+1, and a 2-byte transfer at address 4n+2 corresponds to a superposition of 1-byte transfers at addresses 4n+2 and 4n+3.
 4バイト(32ビット)の転送(サイズ信号:size[2:0]が100の場合)は、4バイトのデータのすべてが有効となるためバイトイネーブルは全ビットが1となり(be[3:0]:1111)、リトルエンディアンとビッグエンディアンでバイトイネーブルの値は同じである。 When transferring 4 bytes (32 bits) (when the size signal: size[2:0] is 100), all 4 bytes of data are valid, so all bits of byte enable become 1 (be[3:0]). ]:1111), the value of byte enable is the same for little endian and big endian.
 図4A、図4Bは、図1の制御回路102の動作の第1の例である。図4Aは、図1の制御回路102の属性情報テーブルAITの第1の例を示す図である。図4Bは、図1の制御回路102の制御信号生成ルールCSGRの第1の例を示す図である。 4A and 4B are a first example of the operation of the control circuit 102 of FIG. FIG. 4A is a diagram showing a first example of the attribute information table AIT of the control circuit 102 of FIG. FIG. 4B is a diagram showing a first example of the control signal generation rule CSGR of the control circuit 102 of FIG.
 制御回路102の動作は属性情報テーブルAITと制御信号生成ルールCSGRで記述されている。属性情報テーブルAITは、それぞれの周辺回路のアドレス範囲と属性情報とを格納している。 The operation of the control circuit 102 is described by the attribute information table AIT and the control signal generation rule CSGR. The attribute information table AIT stores the address range and attribute information of each peripheral circuit.
 属性情報テーブルAITは、バス111のアドレス(adr[31:2]の下位に2ビットに0を連結したもの)を入力として、対応する周辺回路の属性情報を出力する。属性情報は、周辺回路の種別情報と言い換えることも可能である。属性情報にはエンディアン(Endian)とタイプの2通りがある。エンディアンは0がリトルエンディアン、1がビッグエンディアンである。タイプは0(第1タイプ)の時はバス111のサイズ信号(size[2:0])の値によらず1バイトのデータの集合として解釈されることを示す。タイプが1(第2タイプ)の時は2バイト以上のデータがバス111のサイズ信号(size[2:0])の値で示されたサイズのデータとして解釈されることを示す。 The attribute information table AIT receives the address of the bus 111 (adr[31:2] with 0 concatenated to the lower two bits) and outputs the attribute information of the corresponding peripheral circuit. The attribute information can also be called peripheral circuit type information. There are two types of attribute information: endian and type. 0 is little endian and 1 is big endian. When the type is 0 (first type), it indicates that it is interpreted as a set of 1-byte data regardless of the value of the size signal (size[2:0]) of the bus 111 . When the type is 1 (second type), it indicates that data of 2 bytes or more is interpreted as data of the size indicated by the value of the size signal (size[2:0]) of bus 111 .
 制御信号生成ルールCSGRは、属性情報テーブルAITから出力されたエンディアン、タイプ、及びバス111のサイズ信号(size[2:0])を入力として、信号線112、113に出力する値を生成するルールを示したものである。この表には明記していないが、CPUのエンディアンはリトルエンディアンであることを前提としている。 The control signal generation rule CSGR is a rule for generating values to be output to the signal lines 112 and 113 with the endian, type, and size signal (size[2:0]) of the bus 111 output from the attribute information table AIT as inputs. is shown. Although not specified in this table, it is assumed that the endian of the CPU is little endian.
 信号線112(の制御信号の値)はエンディアン属性が0の時に0(第1の値)、1の時に1(第2の値)となる。これは、CPUと周辺回路のエンディアンが同じ時にはバイトイネーブルの変換を行わず、異なる時にはバイトイネーブルの変換を行うことを示す。 The signal line 112 (the value of the control signal) is 0 (first value) when the endian attribute is 0, and 1 (second value) when the endian attribute is 1. This indicates that byte enable conversion is not performed when the endian of the CPU and the peripheral circuit are the same, and byte enable conversion is performed when they are different.
 信号線113(の制御信号の値)は3通りの値を取り、00(第1の値)がデータの変換なし、01(第2の値)がデータの1バイト単位の変換、10(第3の値)がデータの2バイト単位の変換を行うことを示す。変換内容の詳細は後述する。信号線113は、エンディアン属性が0の時は00となる。これは、CPUと周辺回路のエンディアンが同じ時にはデータの変換を行わないことを示す。信号線113はまた、エンディアン属性が1、タイプ属性が0の時には常に01(1バイト単位の変換)となる。一方、エンディアン属性が1、タイプ属性が1の時にはバス111のサイズ信号(size[2:0])の値によって出力値が異なる。size[2:0]が001(1バイト)の時には出力値は01(1バイト単位の変換)、size[2:0]が010(2バイト)の時には出力値は10(2バイト単位の変換)、size[2:0]が100(4バイト)の時には出力値は00(変換なし)となる。 The signal line 113 (the value of the control signal) takes three values: 00 (first value) indicates no data conversion, 01 (second value) indicates conversion of data in 1-byte units, and 10 (second value) indicates conversion of data in 1-byte units. A value of 3) indicates that the data should be converted in 2-byte units. The details of the conversion contents will be described later. The signal line 113 becomes 00 when the endian attribute is 0. This indicates that data conversion is not performed when the endian of the CPU and the peripheral circuit are the same. Signal line 113 is also always 01 (conversion in 1-byte units) when the endian attribute is 1 and the type attribute is 0. On the other hand, when the endian attribute is 1 and the type attribute is 1, the output value differs depending on the value of the size signal (size[2:0]) of bus 111 . When size[2:0] is 001 (1 byte), the output value is 01 (conversion in 1-byte units), and when size[2:0] is 010 (2 bytes), the output value is 10 (conversion in 2-byte units). ) and size[2:0] is 100 (4 bytes), the output value is 00 (no conversion).
 図5は、図1の制御回路102の第1の例である。 FIG. 5 is a first example of the control circuit 102 of FIG.
 本実施例の制御回路102は、固定値出力回路501、502、505、506、507、比較回路503、504、AND回路508、509、510、513、514、OR回路511、512を有する。 The control circuit 102 of this embodiment has fixed value output circuits 501, 502, 505, 506 and 507, comparison circuits 503 and 504, AND circuits 508, 509, 510, 513 and 514, and OR circuits 511 and 512.
 固定値出力回路501は、16進数の固定値F0000000を信号線521に出力する。 The fixed value output circuit 501 outputs the hexadecimal fixed value F0000000 to the signal line 521 .
 固定値出力回路502は、16進数の固定値F8000000を信号線522に出力する。 The fixed value output circuit 502 outputs the hexadecimal fixed value F8000000 to the signal line 522 .
 比較回路503は、バス111のアドレス(adr[31:2]の下位に2ビットの0を連結したもの)と信号線521の値とを比較し、結果を信号線523に出力する。出力値はアドレスが16進数の固定値F0000000より小さい場合に0、固定値F0000000以上の時に1となる。 The comparison circuit 503 compares the address of the bus 111 (adr[31:2] with 2 bits of 0 concatenated in the lower order) and the value of the signal line 521 and outputs the result to the signal line 523 . The output value is 0 when the address is smaller than the fixed hexadecimal value F0000000, and 1 when the address is greater than the fixed value F0000000.
 比較回路504は、バス111のアドレス(adr[31:2]の下位に2ビットの0を連結したもの)と信号線522の値とを比較し、結果を信号線524に出力する。出力値はアドレスが16進数の固定値F8000000より小さい場合に0、固定値F8000000以上の時に1となる。 The comparison circuit 504 compares the address of the bus 111 (adr[31:2] with 2 bits of 0 concatenated to the lower order) and the value of the signal line 522 and outputs the result to the signal line 524 . The output value is 0 when the address is smaller than the fixed hexadecimal value F8000000, and 1 when the address is greater than the fixed value F8000000.
 固定値出力回路505は、2進数の固定値10を信号線525に出力する。 
 固定値出力回路506は、2進数の固定値11を信号線526に出力する。 
 固定値出力回路507は、2進数の固定値01を信号線527に出力する。 
 AND回路508は、信号線523の値が0の時に信号線525の値を信号線528に出力する。これは図4Aの属性情報テーブルAITの1行目に相当する。AND回路508はまた、信号線523の値が1の時に信号線528に00を出力する。この場合、信号線528の値はOR回路511の出力に影響を与えない。
The fixed value output circuit 505 outputs the binary fixed value 10 to the signal line 525 .
The fixed value output circuit 506 outputs the binary fixed value 11 to the signal line 526 .
The fixed value output circuit 507 outputs the binary fixed value 01 to the signal line 527 .
The AND circuit 508 outputs the value of the signal line 525 to the signal line 528 when the value of the signal line 523 is 0. This corresponds to the first row of the attribute information table AIT in FIG. 4A. The AND circuit 508 also outputs 00 to the signal line 528 when the value of the signal line 523 is 1. In this case, the value of signal line 528 does not affect the output of OR circuit 511 .
 AND回路509は、信号線523の値が1、かつ信号線524の値が0の時に信号線526の値を信号線529に出力する。これは図4Aの属性情報テーブルAITの2行目に相当する。AND回路509はまた、信号線523の値が0、または信号線524の値が1の時に信号線529に00を出力する。この場合、信号線529の値はOR回路511の出力に影響を与えない。 The AND circuit 509 outputs the value of the signal line 526 to the signal line 529 when the value of the signal line 523 is 1 and the value of the signal line 524 is 0. This corresponds to the second row of the attribute information table AIT in FIG. 4A. The AND circuit 509 also outputs 00 to the signal line 529 when the value of the signal line 523 is 0 or the value of the signal line 524 is 1. In this case, the value of signal line 529 does not affect the output of OR circuit 511 .
 AND回路510は、信号線524の値が1の時に信号線527の値を信号線530に出力する。これは図4Aの属性情報テーブルAITの3行目に相当する。AND回路510はまた、信号線524の値が0の時に信号線530に00を出力する。この場合、信号線530の値はOR回路511の出力に影響を与えない。 The AND circuit 510 outputs the value of the signal line 527 to the signal line 530 when the value of the signal line 524 is 1. This corresponds to the third row of the attribute information table AIT in FIG. 4A. AND circuit 510 also outputs 00 to signal line 530 when the value of signal line 524 is 0. FIG. In this case, the value of signal line 530 does not affect the output of OR circuit 511 .
 OR回路511は、信号線528、529、530の3つの値のORを取って信号線531に出力する。信号線528、529、530の3つの値のうち2つは00であるため、OR回路511の動作は実質的には信号線528、529、530の3つの値のうちの1つを選択することになる。信号線531に出力される値は、図4Aの属性情報テーブルAITの出力に相当する。 The OR circuit 511 ORs the three values of the signal lines 528 , 529 and 530 and outputs the result to the signal line 531 . Since two of the three values on signal lines 528, 529 and 530 are 00, the operation of OR circuit 511 effectively selects one of the three values on signal lines 528, 529 and 530. It will be. The value output to the signal line 531 corresponds to the output of the attribute information table AIT in FIG. 4A.
 信号線112には、信号線531のエンディアン属性の値がそのまま出力される。 The value of the endian attribute of the signal line 531 is output to the signal line 112 as it is.
 OR回路512は、信号線531のタイプ属性が0、または、バス111のサイズ信号(size[2:0])のビット0が1(1バイトに相当)の時に信号線532に1を出力し、それ以外の時には0を出力する。 OR circuit 512 outputs 1 to signal line 532 when the type attribute of signal line 531 is 0 or bit 0 of the size signal (size[2:0]) of bus 111 is 1 (equivalent to 1 byte). , otherwise 0 is output.
 AND回路513は、信号線531のエンディアン属性と信号線532の値がともに1の時に信号線113のビット0に1を出力する。この動作は、図4Bの制御信号生成ルールCSGRの2行目と3行目で信号線113に01を出力するケースに相当する。AND回路513はまた、信号線531のエンディアン属性、または信号線532の値が0の時には0を出力する。 The AND circuit 513 outputs 1 to bit 0 of the signal line 113 when both the endian attribute of the signal line 531 and the value of the signal line 532 are 1. This operation corresponds to the case of outputting 01 to the signal line 113 in the second and third lines of the control signal generation rule CSGR in FIG. 4B. AND circuit 513 also outputs 0 when the endian attribute of signal line 531 or the value of signal line 532 is 0. FIG.
 AND回路514は、信号線531のエンディアン属性とタイプ属性が共に1で、かつバス111のサイズ信号(size[2:0])のビット1が1(2バイトに相当)の時に信号線113のビット1に1を出力する。この動作は、図4Bの制御信号生成ルールCSGRの4行目で信号線113に10を出力するケースに相当する。AND回路514はまた、信号線531のエンディアン属性、タイプ属性、または、バス111のサイズ信号(size[2:0])のビット1が0の時に信号線113のビット1に0を出力する。 When the endian attribute and type attribute of the signal line 531 are both 1 and bit 1 of the size signal (size[2:0]) of the bus 111 is 1 (corresponding to 2 bytes), the AND circuit 514 Output 1 to bit 1. This operation corresponds to the case of outputting 10 to the signal line 113 in the fourth line of the control signal generation rule CSGR in FIG. 4B. AND circuit 514 also outputs 0 to bit 1 of signal line 113 when bit 1 of the endian attribute or type attribute of signal line 531 or the size signal (size[2:0]) of bus 111 is 0.
 図6は、図1のバイトイネーブル変換回路104の例である。 FIG. 6 is an example of the byte enable conversion circuit 104 of FIG.
 バイトイネーブル変換回路104は、選択回路601、602、603、604からなる。 The byte enable conversion circuit 104 consists of selection circuits 601, 602, 603, and 604.
 選択回路601は、信号線112の値が0の時はバス111のバイトイネーブル信号のビット3(be[3])を選択し、バス114のバイトイネーブル信号のビット3(be[3])に出力する。選択回路601はまた、信号線112の値が1の時はバス111のバイトイネーブル信号のビット0(be[0])を選択し、バス114のバイトイネーブル信号のビット3(be[3])に、エンディアン変換後バイトイネーブル信号として出力する。 Selection circuit 601 selects bit 3 (be[3]) of the byte enable signal of bus 111 when the value of signal line 112 is 0, and selects bit 3 (be[3]) of the byte enable signal of bus 114. Output. Selection circuit 601 also selects bit 0 (be[0]) of the byte enable signal on bus 111 when the value on signal line 112 is 1, and selects bit 3 (be[3]) of the byte enable signal on bus 114. , output as a byte enable signal after endian conversion.
 選択回路602、603、604の動作も同様であり、信号線112の値が0の時は左側の入力、信号線112の値が1の時は右側の入力を選択してエンディアン変換後バイトイネーブル信号として出力する。 The operation of the selection circuits 602, 603, and 604 is the same. When the value of the signal line 112 is 0, the left input is selected, and when the signal line 112 is 1, the right input is selected. output as a signal.
 図7は、図1のバイトイネーブル変換回路104の動作の例である。 FIG. 7 is an example of the operation of the byte enable conversion circuit 104 of FIG.
 信号線112が0の時は、バイトイネーブル変換回路104は入力と同じ値を出力する。 When the signal line 112 is 0, the byte enable conversion circuit 104 outputs the same value as the input.
 信号線112が1の時は、バイトイネーブル変換回路104は入力の上位と下位を逆順に入れ替えて出力する。 When the signal line 112 is 1, the byte enable conversion circuit 104 reverses the upper and lower order of the input and outputs it.
 図8は、図1のデータ変換回路103の例である。データ変換はライトデータ(wd[31:0])、及びリードデータ(rd[31:0])に対して行われるが、図8にはライトデータの変換回路のみを記載した。リードデータの変換回路も同一の構成である。 FIG. 8 is an example of the data conversion circuit 103 of FIG. Data conversion is performed on write data (wd[31:0]) and read data (rd[31:0]), but only the write data conversion circuit is shown in FIG. The read data conversion circuit has the same configuration.
 データ変換回路103は、選択回路801、802、803、804からなる。 The data conversion circuit 103 consists of selection circuits 801, 802, 803, and 804.
 選択回路801は、信号線113の値が00の時はバス111のライトデータのビット31から24(wd[31:24])を選択し、バス114のライトデータのビット31から24(wd[31:24])にエンディアン変換せずに出力する。選択回路801はまた、信号線113の値が01の時はバス111のライトデータのビット7から0(wd[7:0])を選択し、バス114のデータのビット31から24(wd[31:24])にエンディアン変換後データとして出力する。選択回路801はまた、信号線113の値が10の時はバス111のライトデータのビット15から8(wd[15:8])を選択し、バス114のライトデータのビット31から24(wd[31:24])にエンディアン変換後データとして出力する。 When the value of the signal line 113 is 00, the selection circuit 801 selects bits 31 to 24 (wd[31:24]) of the write data on the bus 111, and selects bits 31 to 24 (wd[31:24]) of the write data on the bus 114. 31:24]) without endian conversion. The selection circuit 801 also selects bits 7 to 0 (wd[7:0]) of the write data on the bus 111 when the value of the signal line 113 is 01, and selects bits 31 to 24 (wd[7:0]) of the data on the bus 114 . 31:24]) as data after endian conversion. Selection circuit 801 also selects bits 15 to 8 (wd[15:8]) of the write data on bus 111 when the value on signal line 113 is 10, and selects bits 31 to 24 (wd[15:8]) of the write data on bus 114. [31:24]) as data after endian conversion.
 選択回路802、803、804の動作も同様であり、信号線113の値が00の時は左側の入力、信号線113の値が01の時は中央の入力、信号線113の値が10の時は右側の入力を選択して出力する。 The operation of the selection circuits 802, 803, and 804 is similar. When the value of the signal line 113 is 00, the left input is selected. Selects the input on the right to output.
 図9は、図1のデータ変換回路103の動作の例である。 FIG. 9 is an example of the operation of the data conversion circuit 103 of FIG.
 信号線113が00の時は、データ変換回路103は入力と同じ値を出力する。 When the signal line 113 is 00, the data conversion circuit 103 outputs the same value as the input.
 信号線113が01の時は、データ変換回路103はバイト(8ビット)単位で入力の上位と下位を逆順に入れ替えて出力する。 When the signal line 113 is 01, the data conversion circuit 103 reverses the upper and lower order of the input in units of bytes (8 bits) and outputs it.
 信号線113が10の時は、データ変換回路103は上位16ビット(ビット31から16)と下位16ビット(ビット15から0)を入れ替えて出力する。 When the signal line 113 is 10, the data conversion circuit 103 switches the upper 16 bits (bits 31 to 16) and the lower 16 bits (bits 15 to 0) for output.
 図10は、図1のバス111、及びバス114の動作の第1の例である。図10にはリードデータの動作が記載していないが、ライトデータと同様である。 FIG. 10 is a first example of the operation of buses 111 and 114 in FIG. Although FIG. 10 does not describe the operation of read data, it is the same as that of write data.
 第1の周辺回路(ROM)105、及び第2の周辺回路(RAM)106はアクセスサイズによらず書き込みデータを1バイト単位で解釈する。そのため、バイト単位で同一アドレスのデータが同一となる様にエンディアン変換が行われる。例えば、アクセスサイズが4バイトの時に、バス111の最下位バイト(s)がバス114の最上位バイトに出力される。これは、バス111では最下位バイトがアドレス4nに対応しているのに対し、バス114では最上位バイトがアドレス4nに対応しているためである。 The first peripheral circuit (ROM) 105 and the second peripheral circuit (RAM) 106 interpret the write data in 1-byte units regardless of the access size. Therefore, endian conversion is performed so that data at the same address are the same in byte units. For example, the least significant byte (s) of bus 111 is output to the most significant byte of bus 114 when the access size is 4 bytes. This is because the least significant byte of bus 111 corresponds to address 4n, while the most significant byte of bus 114 corresponds to address 4n.
 第3の周辺回路(第1のIO回路)107は、アクセスサイズと同じサイズを単位としてデータを解釈する。そのため、アクセスサイズの単位でデータの並び順が保存される様にエンディアン変換が行われる。例えば、アクセスサイズが2バイトでアドレスが4nの場合、データの並び順(rs)を保存したまま、下位から上位にデータがシフトされる。
これによって、CPU101のデータの解釈と第3の周辺回路(第1のIO回路)107のデータの解釈が同一となることが保証される。
The third peripheral circuit (first IO circuit) 107 interprets data in units of the same size as the access size. Therefore, endian conversion is performed so that the order of data is preserved in units of access size. For example, when the access size is 2 bytes and the address is 4n, the data is shifted from the lower to the upper while maintaining the data arrangement order (rs).
This ensures that the interpretation of data by the CPU 101 and the interpretation of data by the third peripheral circuit (first IO circuit) 107 are the same.
 第4の周辺回路(第2のIO回路)108はCPU101とエンディアンが同一であるため、エンディアン変換は行われない。 Since the endian of the fourth peripheral circuit (second IO circuit) 108 is the same as that of the CPU 101, endian conversion is not performed.
 図11A、図11Bは、図1の制御回路102の動作の第2の例である。図11Aは、図1の制御回路102の属性情報テーブルの第2の例を示す図である。図11Bは、図1の制御回路102の制御信号生成ルールの第2の例を示す図である。 11A and 11B are a second example of the operation of the control circuit 102 of FIG. FIG. 11A is a diagram showing a second example of the attribute information table of control circuit 102 of FIG. FIG. 11B is a diagram showing a second example of control signal generation rules for the control circuit 102 of FIG.
 図4A、図4Bの制御回路102の動作と図11A、図11Bの相違点は、図11Aの属性情報テーブルAITにレジスタサイズの出力が追加され、レジスタサイズ属性の値によって図11Bの制御信号生成ルールCSGRの出力が異なる点である。レジスタサイズ属性とは、アクセス先の周辺回路が書き込み値を解釈する単位のサイズを示している。図10の説明に記載した通り、図4A、図4Bの制御回路102の動作の場合、第3の周辺回路(第1のIO回路)107にアクセスする場合には、アクセスサイズと同じサイズを単位としてデータを解釈する。この様な動作の場合、例えば第3の周辺回路(第1のIO回路)107が1バイト単位でデータを解釈するアドレスに2バイトや4バイトのアクセスを行うと、CPU101と解釈の相違が生じるという問題がある。この様な問題に対処するため、図11A、図11Bの制御回路102の動作では、第3の周辺回路(第1のIO回路)107のレジスタサイズ属性(何バイト単位でデータを解釈するか)に応じて信号線113の出力を決定している。 The difference between the operation of the control circuit 102 in FIGS. 4A and 4B and FIGS. 11A and 11B is that the output of the register size is added to the attribute information table AIT in FIG. 11A, and the control signal in FIG. The only difference is the output of the rule CSGR. The register size attribute indicates the unit size in which the peripheral circuit to be accessed interprets the write value. As described in the description of FIG. 10, in the case of the operation of the control circuit 102 in FIGS. 4A and 4B, when accessing the third peripheral circuit (first IO circuit) 107, the same size as the access size is used as a unit. Interpret the data as In the case of such an operation, for example, if the third peripheral circuit (first IO circuit) 107 accesses 2 bytes or 4 bytes to an address that interprets data in units of 1 byte, a difference in interpretation with the CPU 101 occurs. There is a problem. In order to deal with such a problem, in the operation of the control circuit 102 in FIGS. 11A and 11B, the register size attribute of the third peripheral circuit (first IO circuit) 107 (in units of bytes to interpret data) The output of the signal line 113 is determined in accordance with .
 図11Aの属性情報テーブルAITでは、第3の周辺回路(第1のIO回路)107の領域が3つに分割され、アドレスF0000000からF1FFFFFFではレジスタサイズ属性に1バイト、アドレスF2000000からF3FFFFFFではレジスタサイズ属性に2バイト、アドレスF4000000からF7FFFFFFではレジスタサイズ属性に4バイトが出力される。第1の周辺回路(ROM)105、第2の周辺回路(RAM)106、及び第4の周辺回路(第2のIO回路)107では図11Bの制御信号生成ルールでレジスタサイズ属性の値が無視されるため、レジスタサイズ属性の出力値は1バイト、2バイト、4バイトのいずれであっても良い。 In the attribute information table AIT of FIG. 11A, the area of the third peripheral circuit (first IO circuit) 107 is divided into three areas. 2 bytes are output for the attribute, and 4 bytes are output for the register size attribute at addresses F4000000 to F7FFFFFF. In the first peripheral circuit (ROM) 105, the second peripheral circuit (RAM) 106, and the fourth peripheral circuit (second IO circuit) 107, the value of the register size attribute is ignored in the control signal generation rule of FIG. 11B. Therefore, the output value of the register size attribute can be 1 byte, 2 bytes, or 4 bytes.
 図11Bの制御信号生成ルールCSGRでは、第3の周辺回路(第1のIO回路)107へのアクセス時の動作が図4Bとは異なっている。レジスタサイズ属性が1バイトの時は、バス111のサイズ信号(size[2:0])の値によらず信号線113への出力が01となる。これは、size[2:0]が001(1バイト)の時は図4Bと同じであるが、size[2:0]が010(2バイト)、及び100(4バイト)の時の動作が図4Bとは異なっている。レジスタサイズ属性が2バイトの場合は、size[2:0]が001(1バイト)、及び010(2バイト)の時の動作は図4Bと同じであるが、size[2:0]が100(4バイト)の時の動作が図4Bとは異なっており、信号線113への出力が10となる。レジスタサイズ属性が4バイトの時の動作は図4Bと同じである。 In the control signal generation rule CSGR in FIG. 11B, the operation when accessing the third peripheral circuit (first IO circuit) 107 is different from that in FIG. 4B. When the register size attribute is 1 byte, the output to signal line 113 is 01 regardless of the value of the size signal (size[2:0]) on bus 111 . This is the same as FIG. 4B when size[2:0] is 001 (1 byte), but the operation when size[2:0] is 010 (2 bytes) and 100 (4 bytes) is It is different from FIG. 4B. When the register size attribute is 2 bytes, the operation when size[2:0] is 001 (1 byte) and 010 (2 bytes) is the same as in FIG. 4B, but when size[2:0] is 100 (4 bytes) differs from FIG. 4B in that 10 is output to the signal line 113 . The operation when the register size attribute is 4 bytes is the same as in FIG. 4B.
 図12は、図1のバス111、及びバス114の動作の第2の例である。図12は、図11A、図11Bの制御回路102の動作の第2の例に対応している。第1の周辺回路(ROM)105、第2の周辺回路(RAM)106、及び第4の周辺回路(第2のIO回路)108にアクセスするときの動作は図10と同じであるため省略し、第3の周辺回路(第1のIO回路)107へのアクセス時の動作のみ記載した。図12において、サイズ=1はレジスタサイズ属性が1バイト、サイズ=2はレジスタサイズ属性が2バイト、サイズ=4はレジスタサイズ属性が4バイトの時の動作を示している。 FIG. 12 is a second example of the operation of buses 111 and 114 in FIG. FIG. 12 corresponds to a second example of the operation of the control circuit 102 of FIGS. 11A and 11B. Operations for accessing the first peripheral circuit (ROM) 105, the second peripheral circuit (RAM) 106, and the fourth peripheral circuit (second IO circuit) 108 are the same as in FIG. , and the third peripheral circuit (first IO circuit) 107 only. In FIG. 12, size=1 indicates the operation when the register size attribute is 1 byte, size=2 indicates the operation when the register size attribute is 2 bytes, and size=4 indicates the operation when the register size attribute is 4 bytes.
 レジスタサイズ属性が1バイトの時は、アクセスサイズが2バイトと4バイトの時に図10と動作が異なっている。いずれもバイト単位でアドレスが同じバイトに同じデータが出力される。例えばアクセスサイズが4バイトの場合、バス111の最下位バイト(s)はバス114の最上位バイトに出力される。これは、バス111では最下位バイトがアドレス4nに対応しているのに対し、バス114は最上位バイトがアドレス4nに対応しているためである。レジスタサイズ属性が1バイトの時は第3の周辺回路(第1のIO回路)107は1バイト単位でデータを解釈するため、この動作によってCPU101と第3の周辺回路(第1のIO回路)107のデータの解釈が同一となることが保証される。 When the register size attribute is 1 byte, the operation differs from that in FIG. 10 when the access size is 2 bytes and 4 bytes. In both cases, the same data is output to bytes with the same address in byte units. For example, if the access size is 4 bytes, the least significant byte (s) of bus 111 is output to the most significant byte of bus 114 . This is because the least significant byte of bus 111 corresponds to address 4n, while the most significant byte of bus 114 corresponds to address 4n. When the register size attribute is 1 byte, the third peripheral circuit (first IO circuit) 107 interprets data in 1-byte units. 107 data interpretation is guaranteed to be the same.
 レジスタサイズ属性が2バイトの時は、アクセスサイズが4バイトの時に図10と動作が異なっている。バス111の下位2バイト(rs)はデータの並び順を保存したままバス114の上位2バイトに出力される。バス111の下位2バイトはアドレス4nと4n+1に対応するため、バス114の同一アドレスの領域にデータがシフトされるが、データの並び順が保存されているため、CPU101と第3の周辺回路(第1のIO回路)107のデータの解釈が同一となることが保証される。バス111の上位2バイト(pq)も同様に、データの並び順を保存したままバス114の下位2バイトに出力される。 When the register size attribute is 2 bytes, the operation differs from that in FIG. 10 when the access size is 4 bytes. The lower two bytes (rs) of the bus 111 are output to the upper two bytes of the bus 114 while preserving the order of data arrangement. Since the lower two bytes of the bus 111 correspond to the addresses 4n and 4n+1, the data is shifted to the same address area of the bus 114. It is guaranteed that the interpretation of the data of the first IO circuit) 107 will be the same. Similarly, the upper 2 bytes (pq) of the bus 111 are output to the lower 2 bytes of the bus 114 while preserving the data arrangement order.
 図13は、図1の制御回路102の第2の例である。 FIG. 13 is a second example of the control circuit 102 of FIG.
 図5の制御回路102と図13の制御回路102Aとの相違点は、図5の固定値出力回路501、502、505、506、507が記憶回路1301、1302、1305、1306、1307に置き換えられ、バス111から値を書き換えることを可能とした点である。 The difference between control circuit 102 in FIG. 5 and control circuit 102A in FIG. 13 is that fixed value output circuits 501, 502, 505, 506 and 507 in FIG. , the value can be rewritten from the bus 111 .
 書き込み制御回路1311は、バス111のリクエスト信号(req)が1、ライト信号(wr)が1、サイズ信号(size[2:0])が100(4バイト)、かつ、アドレス信号(adr[31:2])が所定の値であった場合に、信号線1321、1322、1325、1326、1327のいずれかに記憶回路1301、1302、1305、1306、1307の書き込み制御信号を出力する。書き込み制御信号は書き込みイネーブルと書き込みデータからなり、書き込みデータはバス111のライトデータ(wd[31:0])のうちの一部が選択されて出力される。 The write control circuit 1311 controls the request signal (req) of the bus 111 to be 1, the write signal (wr) to be 1, the size signal (size[2:0]) to be 100 (4 bytes), and the address signal (adr[31 :2]) is a predetermined value, a write control signal for the memory circuits 1301 , 1302 , 1305 , 1306 and 1307 is output to one of the signal lines 1321 , 1322 , 1325 , 1326 and 1327 . The write control signal consists of write enable and write data, and the write data is output by selecting part of the write data (wd[31:0]) on the bus 111 .
 図13の制御回路102Aの構成とすることによって、図4Aの属性情報テーブルAITの中身(格納値)をCPU101から設定することが可能となる。つまり、CPU101からの要求に従ってテーブルAITの格納値を書き換える機能、または、CPU101からの要求に従ってテーブルAITの格納値を書き換える工程、を有する。これによって、周辺回路の構成が変わった場合でも同一の制御回路102Aを使用することが可能となる。 By adopting the configuration of the control circuit 102A of FIG. 13, it is possible to set the contents (stored values) of the attribute information table AIT of FIG. 4A from the CPU 101. FIG. That is, it has a function of rewriting the stored values of the table AIT according to a request from the CPU 101 or a step of rewriting the stored values of the table AIT according to a request from the CPU 101 . This makes it possible to use the same control circuit 102A even if the configuration of the peripheral circuit is changed.
 図14は、本発明を適用したプロセッサの構成図の第2の例である。 FIG. 14 is a second example of a configuration diagram of a processor to which the present invention is applied.
 図1のプロセッサ100と図14のプロセッサ1400との相違は、CPU1401がリトルエンディアンとビッグエンディアンの両方の動作をサポートし、現在どちらのエンディアンで動作しているかの情報を、信号線1411を介して、制御回路1402に出力する点である。つまり、CPU1401はエンディアンをリトルエンディアンまたはビッグエンディアンへ変更する機能を有する。エンディアン変換回路1409は信号線1411から受け取ったCPU1401のエンディアンに関する情報に応じてエンディアン変換の規則を変更する。プロセッサ1400は、CPU1401のエンディアンを変更する工程と、CPU1401とエンディアン変換回路1409との間の信号線1411にCPU1401のエンディアンに関する情報を伝達する工程と、信号線1411から受け取ったCPU1401のエンディアンに関する情報に応じてエンディアン変換回路1409のエンディアン変換の規則を変更する工程と、を有する。 The difference between processor 100 in FIG. 1 and processor 1400 in FIG. , to the control circuit 1402 . That is, the CPU 1401 has the function of changing the endian to little endian or big endian. The endian conversion circuit 1409 changes the endian conversion rule according to the information about the endian of the CPU 1401 received from the signal line 1411 . The processor 1400 performs a process of changing the endian of the CPU 1401, a process of transmitting information about the endian of the CPU 1401 to the signal line 1411 between the CPU 1401 and the endian conversion circuit 1409, and a process of transmitting information about the endian of the CPU 1401 received from the signal line 1411. and changing the endian conversion rule of the endian conversion circuit 1409 accordingly.
 制御回路1402は内蔵するテーブルAIT以外に信号線1411から取り込んだCPU1401のエンディアンに関する情報を加味して信号線112、113に出力する信号を生成する。詳細は後述する。 The control circuit 1402 generates signals to be output to the signal lines 112 and 113 in consideration of the endian information of the CPU 1401 taken in from the signal line 1411 in addition to the built-in table AIT. Details will be described later.
 図15A、図15Bは、図14の制御回路1402の動作の例である。図15Aは、図14の制御回路1402の属性情報テーブルAITを示す図である。図15Bは、図14の制御回路1402の制御信号生成ルールCSGRを示す図である。 15A and 15B are examples of the operation of the control circuit 1402 in FIG. 15A shows the attribute information table AIT of the control circuit 1402 of FIG. 14. FIG. FIG. 15B is a diagram showing the control signal generation rule CSGR of the control circuit 1402 of FIG.
 図15Aの属性情報テーブルAITは図4Aの属性情報テーブルAITと同一である。 The attribute information table AIT in FIG. 15A is the same as the attribute information table AIT in FIG. 4A.
 一方、図15Bの制御信号生成ルールCSRGは図4Bの制御信号生成ルールCSRGと比べると、信号線1411の値を考慮に入れる点が異なっている。信号線1411の値が0の時の動作は図4Bと同一である。信号線1411の値が1でエンディアン属性が0の場合は、CPU1401と周辺回路のエンディアンが異なるため、バイトイネーブルのエンディアン変換を行う必要があり、信号線112は1となる。一方、信号線113は、タイプ属性が0の時は01となり、タイプ属性が1の時はバス111のサイズ信号(size[2:0])の値に応じて01、10、00、または00となる。なお、図15Aの属性情報テーブルAITではエンディアン属性が0、かつタイプ属性が0のケースは存在しないため、図15Bにはそのケースは記載していない。信号線1411の値が1でエンディアン属性も1の場合は、CPU1401と周辺回路のエンディアンが同一であるため、エンディアン変換を行う必要は無く、信号線112、113に0が出力される。 On the other hand, the control signal generation rule CSRG in FIG. 15B differs from the control signal generation rule CSRG in FIG. 4B in that the value of the signal line 1411 is taken into consideration. The operation when the value of the signal line 1411 is 0 is the same as in FIG. 4B. When the value of the signal line 1411 is 1 and the endian attribute is 0, the endian of the CPU 1401 is different from that of the peripheral circuit. On the other hand, the signal line 113 is 01 when the type attribute is 0, and 01, 10, 00, or 00 depending on the value of the size signal (size[2:0]) of the bus 111 when the type attribute is 1. becomes. Since there is no case where the endian attribute is 0 and the type attribute is 0 in the attribute information table AIT of FIG. 15A, that case is not shown in FIG. 15B. If the value of the signal line 1411 is 1 and the endian attribute is also 1, the endian of the CPU 1401 and the peripheral circuit are the same.
 図16は、本発明を適用したプロセッサの構成図の第3の例である。 FIG. 16 is a third example of a configuration diagram of a processor to which the present invention is applied.
 図1のプロセッサ100と図16のプロセッサ1600との相違は、エンディアン変換回路1609が遅延回路1601を有する点である。図1のプロセッサ100では、制御回路102、データ変換回路103、バイトイネーブル変換回路104の処理に時間がかかるため、CPU101から周辺回路(105、106、107、108)までの転送時間が長くなり、動作周波数の低下につながる可能性がある。本実施例はこの問題に対応するため、遅延回路1601によってCPU101から周辺回路(105、106、107、108)までの転送を2クロックサイクルに分割し、1クロックサイクルあたりの転送時間を短縮することで動作周波数の低下を防止する。なお、周辺回路(105、106、107、108)からCPU101へのリードデータの転送は転送開始より1クロックサイクル以上遅れるため、その時点では制御回路102の動作は完了しており、エンディアン変換回路による動作周波数低下の影響は軽微であるため、本実施例ではリードデータの転送は2クロックサイクルに分割しない構成としている。但し、データ変換回路103の処理時間に起因して転送時間が長くなるため、その影響を無くすためにリードデータの転送もクロックサイクルに分割しても良い。 The difference between the processor 100 in FIG. 1 and the processor 1600 in FIG. 16 is that the endian conversion circuit 1609 has a delay circuit 1601 . In the processor 100 of FIG. 1, the processing of the control circuit 102, the data conversion circuit 103, and the byte enable conversion circuit 104 takes time. It may lead to lower operating frequency. In order to deal with this problem, this embodiment divides the transfer from the CPU 101 to the peripheral circuits (105, 106, 107, 108) into two clock cycles by the delay circuit 1601 to shorten the transfer time per clock cycle. to prevent the operating frequency from dropping. The transfer of read data from the peripheral circuits (105, 106, 107, 108) to the CPU 101 is delayed by one clock cycle or more from the start of the transfer. Since the effect of lowering the operating frequency is negligible, the read data transfer is not divided into two clock cycles in this embodiment. However, since the transfer time becomes long due to the processing time of the data conversion circuit 103, the transfer of the read data may also be divided into clock cycles in order to eliminate the effect.
 遅延回路1601は、信号線112から取り込んだ値が0だった時に、信号線1611から取り込んだバイトイネーブルと、信号線1612から取り込んだライトデータをそのままバス114に出力する。遅延回路1601はまた、信号線112から取り込んだ値が1だった時に、信号線1611から取り込んだバイトイネーブルと、信号線1612から取り込んだライトデータを1クロックサイクル遅らせて、バス114に出力する。遅延回路1601はまた、バス114から取り込んだリードデータをそのまま信号線1612に出力する。遅延回路1601はまた、バス114から取り込んだリードデータ有効信号をそのままバス111に出力する。つまり、エンディアン変換回路1609はエンディアン変換を行う必要がある場合に、遅延回路1601によりバイトイネーブルとデータを1クロックサイクル遅らせる機能ないし工程を有する。 When the value fetched from the signal line 112 is 0, the delay circuit 1601 outputs the byte enable fetched from the signal line 1611 and the write data fetched from the signal line 1612 to the bus 114 as they are. The delay circuit 1601 also delays the byte enable signal received from the signal line 1611 and the write data received from the signal line 1612 by one clock cycle when the value received from the signal line 112 is 1, and outputs the delayed data to the bus 114 . The delay circuit 1601 also outputs the read data fetched from the bus 114 to the signal line 1612 as it is. The delay circuit 1601 also outputs the read data valid signal received from the bus 114 to the bus 111 as it is. In other words, the endian conversion circuit 1609 has a function or process of delaying byte enable and data by one clock cycle with the delay circuit 1601 when endian conversion is required.
 図17は、図16の遅延回路1601の例である。 FIG. 17 is an example of the delay circuit 1601 in FIG.
 遅延回路1601は、記憶回路1701、1702、1703、1705、AND回路1704、1709、1710、1711、選択回路1706、1707、1708、OR回路1712からなる。 The delay circuit 1601 consists of storage circuits 1701, 1702, 1703, 1705, AND circuits 1704, 1709, 1710, 1711, selection circuits 1706, 1707, 1708, and an OR circuit 1712.
 記憶回路1701は、信号線1611から取り込んだバイトイネーブル信号を1クロックサイクル遅らせて信号線1721に出力する。 The storage circuit 1701 delays the byte enable signal received from the signal line 1611 by one clock cycle and outputs it to the signal line 1721 .
 記憶回路1702は、信号線1612から取り込んだライトデータ(wd[31:0])を1クロックサイクル遅らせて信号線1722に出力する。 The storage circuit 1702 delays the write data (wd[31:0]) fetched from the signal line 1612 by one clock cycle and outputs it to the signal line 1722 .
 記憶回路1703は、バス111から取り込んだライト信号(wr)、サイズ信号(size[2:0])、アドレス信号(adr[31:2])を1クロックサイクル遅らせて信号線1723に出力する。 The storage circuit 1703 delays the write signal (wr), size signal (size[2:0]), and address signal (adr[31:2]) received from the bus 111 by one clock cycle and outputs them to the signal line 1723 .
 AND回路1704は信号線112から取り込んだバイトイネーブル変換有効信号とバス111から取り込んだリクエスト信号(req)のANDを取り信号線1724に出力する。 The AND circuit 1704 ANDs the byte enable conversion valid signal received from the signal line 112 and the request signal (req) received from the bus 111 and outputs the result to the signal line 1724 .
 記憶回路1705は、信号線1724の状態を1クロックサイクル遅らせて信号線1725に出力する。 The storage circuit 1705 delays the state of the signal line 1724 by one clock cycle and outputs it to the signal line 1725 .
 選択回路1706は、信号線1725の値が1の時は信号線1721の値をバス114のバイトイネーブル信号(be[3:0])として出力する。選択回路1706はまた、信号線1725の値が0の時はバス111のバイトイネーブル信号(be[3:0])をバス114のバイトイネーブル信号(be[3:0])として出力する。 The selection circuit 1706 outputs the value of the signal line 1721 as the byte enable signal (be[3:0]) of the bus 114 when the value of the signal line 1725 is 1. Selection circuit 1706 also outputs the byte enable signal (be[3:0]) of bus 111 as the byte enable signal (be[3:0]) of bus 114 when the value of signal line 1725 is 0. FIG.
 選択回路1707は、信号線1725の値が1の時は信号線1722の値をバス114のライトデータ(wd[31:0])として出力する。選択回路1707はまた、信号線1725の値が0の時はバス111のライトデータ(wd[31:0])をバス114のライトデータ(wd[31:0])として出力する。 When the value of the signal line 1725 is 1, the selection circuit 1707 outputs the value of the signal line 1722 as write data (wd[31:0]) of the bus 114 . The selection circuit 1707 also outputs the write data (wd[31:0]) of the bus 111 as the write data (wd[31:0]) of the bus 114 when the value of the signal line 1725 is 0.
 選択回路1708は、信号線1725の値が1の時は信号線1723の値をバス114のライト信号(wr)、サイズ信号(size[2:0])、アドレス信号(adr[31:2])として出力する。選択回路1708はまた、信号線1725の値が0の時はバス111のライト信号(wr)、サイズ信号(size[2:0])、アドレス信号(adr[31:2])をバス114のライト信号(wr)、サイズ信号(size[2:0])、アドレス信号(adr[31:2])として出力する。 When the value of the signal line 1725 is 1, the selection circuit 1708 converts the value of the signal line 1723 to the write signal (wr) of the bus 114, the size signal (size[2:0]), the address signal (adr[31:2] ). The selection circuit 1708 also outputs the write signal (wr), size signal (size[2:0]) and address signal (adr[31:2]) of the bus 111 to the bus 114 when the value of the signal line 1725 is 0. They are output as a write signal (wr), a size signal (size[2:0]), and an address signal (adr[31:2]).
 AND回路1709は信号線1723のライト信号(wr)と信号線1725の値のANDを取り信号線1729に出力する。 The AND circuit 1709 ANDs the write signal (wr) on the signal line 1723 and the value on the signal line 1725 and outputs the result to the signal line 1729 .
 AND回路1710は信号線1725の値の反転と信号線1724の値のANDを取り信号線1730に出力する。結果として、信号線1730は信号線1724の立ち上がり時に1サイクルのみ1となる。 The AND circuit 1710 takes the AND of the inverted value of the signal line 1725 and the value of the signal line 1724 and outputs it to the signal line 1730 . As a result, signal line 1730 is 1 for only one cycle when signal line 1724 rises.
 AND回路1711は信号線1730の値の反転とバス111のリクエスト信号(req)のANDを取り信号線1731に出力する。結果として、信号線1731は信号線112が1の時のみバス111のリクエスト信号(req)の立ち上がりを1サイクル遅らせた信号となる。 The AND circuit 1711 takes the AND of the inverted value of the signal line 1730 and the request signal (req) of the bus 111 and outputs it to the signal line 1731 . As a result, the signal line 1731 becomes a signal obtained by delaying the rise of the request signal (req) of the bus 111 by one cycle only when the signal line 112 is 1.
 OR回路1712は信号線1729の値と信号線1731の値のORを取ってバス114のリクエスト信号(req)として出力する。 The OR circuit 1712 ORs the value of the signal line 1729 and the value of the signal line 1731 and outputs it as a request signal (req) of the bus 114 .
 図18は、図16のバス111、及びバス114のタイミングチャートの例である。 FIG. 18 is an example of a timing chart of buses 111 and 114 in FIG.
 1サイクル目(cycle=1)ではバス111において書き込みのデータ転送が行われる。信号線112が1であるため、バス114では同じ書き込みのデータ転送がサイクル2に行われる。 A write data transfer is performed on the bus 111 in the first cycle (cycle=1). Since signal line 112 is 1, the same write data transfer occurs in cycle 2 on bus 114 .
 3~7サイクル目ではバス111において読み出しのデータ転送が行われる。信号線112が1であるため、バス114では同じ読み出しのデータ転送の開始が4サイクル目に遅延するが、データ転送の終了はバス111と同じ7サイクル目となる。これは、図17の遅延回路1601において、リクエスト信号(req)、ライト信号(wr)、サイズ信号(size[2:0])、バイトイネーブル信号(be[3:0])、アドレス信号(adr[31:2])に関しては1サイクル遅らせる回路が存在するが、リードデータ有効信号(rdv)、リードデータ(rd[31:0])に関しては1サイクル遅らせる回路が存在しないためである。 Read data transfer is performed on the bus 111 in the 3rd to 7th cycles. Since the signal line 112 is 1, the start of the same read data transfer on the bus 114 is delayed to the fourth cycle, but the end of the data transfer is the same as the bus 111 on the seventh cycle. This is the request signal (req), write signal (wr), size signal (size[2:0]), byte enable signal (be[3:0]), address signal (adr [31:2]) is delayed by one cycle, but there is no circuit to delay the read data valid signal (rdv) and read data (rd[31:0]) by one cycle.
 以上、本発明者によってなされた発明を実施例に基づき具体的に説明したが、本発明は、上記実施形態および実施例に限定されるものではなく、種々変更可能であることはいうまでもない。 Although the invention made by the present inventor has been specifically described above based on the examples, it goes without saying that the invention is not limited to the above-described embodiments and examples, and can be variously modified. .
100:プロセッサ、101:CPU、103:データ変換回路、104:バイトイネーブル変換回路、105:第1の周辺回路(ROM)、106:第2の周辺回路(RAM)、107:第3の周辺回路(第1のIO回路:IO1)、108:第4の周辺回路(第2のIO回路:IO2)、109:エンディアン変換回路、501、502、505、506、507:固定値出力回路(アドレスと接続先の種別の関係を示すテーブルに相当)、1301、1302、1305、1306、1307:記憶回路(アドレスと接続先の種別の関係を示すテーブルに相当)、1311:書込制御回路、1400:プロセッサ、1401:CPU、1409:エンディアン変換回路、1411:CPUのエンディアンの情報を伝達する信号線、1600:プロセッサ、1601:遅延回路、1609:エンディアン変換回路 100: Processor, 101: CPU, 103: Data Conversion Circuit, 104: Byte Enable Conversion Circuit, 105: First Peripheral Circuit (ROM), 106: Second Peripheral Circuit (RAM), 107: Third Peripheral Circuit (first IO circuit: IO1), 108: fourth peripheral circuit (second IO circuit: IO2), 109: endian conversion circuit, 501, 502, 505, 506, 507: fixed value output circuit (address and 1301, 1302, 1305, 1306, 1307: storage circuit (corresponding to a table showing the relationship between addresses and types of connection destinations), 1311: write control circuit, 1400: Processor 1401: CPU 1409: Endian conversion circuit 1411: Signal line for transmitting endian information of CPU 1600: Processor 1601: Delay circuit 1609: Endian conversion circuit

Claims (13)

  1.  CPUと、
     複数の周辺回路と、
     前記CPUと前記複数の周辺回路の間に設けられたエンディアン変換回路を有し、
     前記エンディアン変換回路は、アドレスと接続先の種別の関係を示す種別情報を格納するテーブルと、バイトイネーブル変換回路と、データ変換回路と、を有し、
     前記エンディアン変換回路は、前記CPUから出力されたアクセス先の出力アドレスを用いて前記テーブルから取り出した前記種別情報を用いて前記バイトイネーブル変換回路と前記データ変換回路とを別々に制御する、
     ことを特徴とするプロセッサ。
    a CPU;
    a plurality of peripheral circuits;
    an endian conversion circuit provided between the CPU and the plurality of peripheral circuits;
    The endian conversion circuit has a table for storing type information indicating the relationship between the types of addresses and connection destinations, a byte enable conversion circuit, and a data conversion circuit,
    The endian conversion circuit separately controls the byte enable conversion circuit and the data conversion circuit using the type information extracted from the table using the output address of the access destination output from the CPU.
    A processor characterized by:
  2.  請求項1に記載のプロセッサにおいて、
     前記テーブルは更に接続先がデータを解釈するサイズに関するサイズ情報を有し、
     前記エンディアン変換回路は前記テーブルから取り出した前記種別情報と前記サイズ情報を用いて前記バイトイネーブル変換回路と前記データ変換回路とを別々に制御する、
     ことを特徴とするプロセッサ。
    2. The processor of claim 1, wherein
    the table further includes size information about the size at which the destination interprets the data;
    The endian conversion circuit separately controls the byte enable conversion circuit and the data conversion circuit using the type information and the size information extracted from the table.
    A processor characterized by:
  3.  請求項1に記載のプロセッサにおいて、
     前記エンディアン変換回路は前記CPUからの要求に従って前記テーブルの格納値を書き換える機能を有する、
     ことを特徴とするプロセッサ。
    2. The processor of claim 1, wherein
    The endian conversion circuit has a function of rewriting the stored values of the table according to a request from the CPU.
    A processor characterized by:
  4.  請求項1に記載のプロセッサにおいて、
     前記CPUはエンディアンを変更する機能を有し、
     前記CPUと前記エンディアン変換回路との間に前記CPUのエンディアンに関する情報を伝達する信号線を有し、
     前記エンディアン変換回路は前記信号線から受け取った前記CPUのエンディアンに関する情報に応じてエンディアン変換の規則を変更する、
     ことを特徴とするプロセッサ。
    2. The processor of claim 1, wherein
    The CPU has a function to change the endian,
    a signal line for transmitting information about the endian of the CPU between the CPU and the endian conversion circuit;
    The endian conversion circuit changes the endian conversion rule according to the information about the endian of the CPU received from the signal line.
    A processor characterized by:
  5.  請求項1に記載のプロセッサにおいて、
     前記エンディアン変換回路はエンディアン変換を行う必要がある場合にバイトイネーブルとデータを1クロックサイクル遅らせる遅延回路を有する、
     ことを特徴とするプロセッサ。
    2. The processor of claim 1, wherein
    The endian conversion circuit has a delay circuit that delays byte enables and data by one clock cycle when endian conversion needs to be performed.
    A processor characterized by:
  6.  請求項1に記載のプロセッサにおいて、
     第1バスと、
     第2バスと、を含み、
     前記CPUは、前記第1バスに接続され、前記第1バスに、第1エンディアンの1バイト又は複数バイトのデータと、アクセス先のアドレス信号と、前記データのサイズを示すサイズ信号と、前記データのどのバイトが有効かを示すバイトイネーブル信号と、を出力し、
     前記複数の周辺回路は、前記第2バスに接続され、
     前記エンディアン変換回路は、前記第1バスと前記第2バスの間に設けられ、
     前記複数の周辺回路は、
      前記第1エンディアンと異なる第2エンディアンのデータを1バイトごとに解釈するメモリと、
      前記第2エンディアンのデータを複数バイトごとに解釈する第1のIO回路と、
      前記第1エンディアンのデータを複数バイトごとに解釈する第2のIO回路と、を含み、
     前記テーブルは、
      前記メモリについて、前記メモリのアドレス範囲と、前記メモリの前記種別情報として、前記第2エンディアンを示すエンディアン属性と、前記サイズ信号の値によらずデータを1バイトごとに解釈する第1タイプを示すタイプ属性と、を含み、
      前記第1のIO回路について、前記第1のIO回路のアドレス範囲と、前記第1のIO回路の前記種別情報として、前記第2エンディアンを示すエンディアン属性と、前記サイズ信号の値で示されたサイズのデータごとに解釈する第2タイプを示すタイプ属性と、を含み、
      前記第2のIO回路について、前記第2のIO回路のアドレス範囲と、前記第2のIO回路の前記種別情報として、前記第1エンディアンを示すエンディアン属性と、前記第2タイプを示すタイプ属性と、を含み、
     前記エンディアン変換回路は、前記CPUから出力された前記アクセス先のアドレス信号を用いて前記テーブルから出力された前記エンディアン属性と前記タイプ属性と、前記サイズ信号とに基づいて、前記バイトイネーブル変換回路を制御する第1信号と、前記データ変換回路を制御する第2信号と、を生成する、プロセッサ。
    2. The processor of claim 1, wherein
    a first bus;
    a second bus;
    The CPU is connected to the first bus, and transmits to the first bus 1-byte or multiple-byte data of a first endian, an address signal of an access destination, a size signal indicating the size of the data, and the data. outputs a byte enable signal indicating which bytes of
    the plurality of peripheral circuits are connected to the second bus;
    The endian conversion circuit is provided between the first bus and the second bus,
    The plurality of peripheral circuits are
    a memory that interprets data in a second endian different from the first endian byte by byte;
    a first IO circuit that interprets the second endian data in units of multiple bytes;
    a second IO circuit that interprets the first endian data in units of multiple bytes;
    The table is
    For the memory, an address range of the memory, an endian attribute indicating the second endian as the type information of the memory, and a first type that interprets data byte by byte regardless of the value of the size signal. including type attributes and
    With respect to the first IO circuit, the address range of the first IO circuit, the endian attribute indicating the second endian as the type information of the first IO circuit, and the value of the size signal are indicated. a type attribute indicating a second type to interpret for each size data,
    With respect to the second IO circuit, an address range of the second IO circuit, and as the type information of the second IO circuit, an endian attribute indicating the first endian and a type attribute indicating the second type. , including
    The endian conversion circuit converts the byte enable conversion circuit based on the endian attribute and the type attribute output from the table using the access destination address signal output from the CPU and the size signal. A processor that generates a first signal to control and a second signal to control the data conversion circuit.
  7.  請求項6に記載のプロセッサにおいて、
     前記第1信号は、前記エンディアン属性が前記第1エンディアンを示す場合、第1の値とされ、前記バイトイネーブル変換回路を用いたエンディアン変換を行わずに前記バイトイネーブル信号を前記第2バスへ出力し、
      前記第1信号は、前記エンディアン属性が前記第2エンディアンを示す場合、第2の値とされ、前記バイトイネーブル変換回路を用いて前記バイトイネーブル信号のエンディアン変換を実施して変換後バイトイネーブル信号を前記第2バスへ出力する、プロセッサ。
    7. The processor of claim 6, wherein
    The first signal has a first value when the endian attribute indicates the first endian, and outputs the byte enable signal to the second bus without endian conversion using the byte enable conversion circuit. death,
    The first signal has a second value when the endian attribute indicates the second endian, and the byte enable conversion circuit converts the endian of the byte enable signal into a converted byte enable signal. A processor that outputs to the second bus.
  8.  請求項6に記載のプロセッサにおいて、
     前記第2信号は、
      a)前記エンディアン属性が前記第1エンディアンを示す場合、第1の値とされ、前記データ変換回路を用いたエンディアン変換を行わずに前記データを前記第2バスへ出力し、
      b)前記エンディアン属性が前記第2エンディアンを示し、かつ、前記タイプ属性が前記第1タイプの場合、第2の値とされ、前記データ変換回路を用いたエンディアン変換を行わずに前記データを前記第2バスへ出力し、
      c)前記エンディアン属性が前記第2エンディアンを示し、かつ、前記タイプ属性が前記第2タイプの場合において、
       c1)前記サイズ信号が1バイトを示す時、前記第2の値とされ、前記データ変換回路を用いて前記データのエンディアン変換を実施して変換後データを前記第2バスへ出力し、
       c2)前記サイズ信号が2バイトを示す時、第3の値とされ、前記データ変換回路を用いて前記データのエンディアン変換を実施して変換後データを前記第2バスへ出力し、
       c3)前記サイズ信号が4バイトを示す時、前記第1の値とされ、前記データ変換回路を用いたエンディアン変換を行わずに前記データを前記第2バスへ出力する、プロセッサ。
    7. The processor of claim 6, wherein
    The second signal is
    a) if the endian attribute indicates the first endian, it is set to a first value and the data is output to the second bus without endian conversion using the data conversion circuit;
    b) when the endian attribute indicates the second endian and the type attribute is the first type, a second value is given, and the data is converted to the data without endian conversion using the data conversion circuit; output to the second bus,
    c) when the endian attribute indicates the second endian and the type attribute is the second type,
    c1) when the size signal indicates 1 byte, it is set to the second value, endian conversion is performed on the data using the data conversion circuit, and the converted data is output to the second bus;
    c2) when the size signal indicates 2 bytes, it is set to a third value, endian conversion is performed on the data using the data conversion circuit, and the converted data is output to the second bus;
    c3) The processor, when the size signal indicates 4 bytes, is set to the first value and outputs the data to the second bus without endian conversion using the data conversion circuit.
  9.  CPUと、複数の周辺回路と、前記CPUと前記複数の周辺回路の間に設けられたエンディアン変換回路を有し、前記エンディアン変換回路は、アドレスと接続先の種別の関係を示す種別情報を格納するテーブルと、バイトイネーブル変換回路と、データ変換回路と、を有するプロセッサのエンディアン変換方法であって、
     a)前記CPUから出力されたアクセス先の出力アドレスを用いて前記テーブルから前記種別情報を取り出す工程と、
     b)取り出した前記種別情報に基づいて、前記バイトイネーブル変換回路と前記データ変換回路とを別々に制御する工程と、を含むエンディアン変換方法。
    A CPU, a plurality of peripheral circuits, and an endian conversion circuit provided between the CPU and the plurality of peripheral circuits, wherein the endian conversion circuit stores type information indicating a relationship between types of addresses and connection destinations. An endian conversion method for a processor having a table that
    a) extracting the type information from the table using the output address of the access destination output from the CPU;
    b) an endian conversion method including the step of separately controlling the byte enable conversion circuit and the data conversion circuit based on the extracted type information.
  10.  請求項9に記載のエンディアン変換方法において、
     前記テーブルは、さらに、接続先がデータを解釈するサイズに関するサイズ情報を有し、
     前記a)工程は、前記テーブルから前記サイズ情報を取り出す工程を含み、
     前記b)工程は、前記種別情報と前記サイズ情報とに基づいて、前記バイトイネーブル変換回路と前記データ変換回路とを別々に制御する、エンディアン変換方法。
    The endian conversion method according to claim 9,
    The table further has size information about the size at which the connection destination interprets the data,
    the step a) includes retrieving the size information from the table;
    The endian conversion method, wherein the step b) separately controls the byte enable conversion circuit and the data conversion circuit based on the type information and the size information.
  11.  請求項9に記載のエンディアン変換方法において、
     前記CPUからの要求に従って前記エンディアン変換回路の前記テーブルの格納値を書き換える工程を有する、エンディアン変換方法。
    The endian conversion method according to claim 9,
    An endian conversion method, comprising the step of rewriting stored values of the table of the endian conversion circuit in accordance with a request from the CPU.
  12.  請求項9に記載のエンディアン変換方法において、
     前記CPUのエンディアンを変更する工程と、
     前記CPUと前記エンディアン変換回路との間の信号線に前記CPUのエンディアンに関する情報を伝達する工程と、
     前記信号線から受け取った前記CPUのエンディアンに関する情報に応じて前記エンディアン変換回路のエンディアン変換の規則を変更する工程と、を有するエンディアン変換方法。
    The endian conversion method according to claim 9,
    changing the endian of the CPU;
    a step of transmitting information regarding the endian of the CPU to a signal line between the CPU and the endian conversion circuit;
    and changing the endian conversion rule of the endian conversion circuit in accordance with information about the endian of the CPU received from the signal line.
  13.  請求項9に記載のエンディアン変換方法において、
     前記エンディアン変換回路はエンディアン変換を行う必要がある場合に遅延回路によりバイトイネーブルとデータを1クロックサイクル遅らせる工程、を有するエンディアン変換方法。
    The endian conversion method according to claim 9,
    A method of endian conversion, comprising the step of delaying byte enable and data by one clock cycle with a delay circuit when said endian conversion circuit needs to perform endian conversion.
PCT/JP2022/026785 2021-09-21 2022-07-06 Processor and endian conversion method WO2023047762A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
GBGB2401725.3A GB202401725D0 (en) 2021-09-21 2022-07-06 Processor and endian conversion method
CN202280053523.5A CN117795494A (en) 2021-09-21 2022-07-06 Processor and byte order conversion method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-153025 2021-09-21
JP2021153025A JP2023044909A (en) 2021-09-21 2021-09-21 Processor and endian conversion method

Publications (1)

Publication Number Publication Date
WO2023047762A1 true WO2023047762A1 (en) 2023-03-30

Family

ID=85720442

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/026785 WO2023047762A1 (en) 2021-09-21 2022-07-06 Processor and endian conversion method

Country Status (4)

Country Link
JP (1) JP2023044909A (en)
CN (1) CN117795494A (en)
GB (1) GB202401725D0 (en)
WO (1) WO2023047762A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202646A (en) * 1995-01-25 1996-08-09 Nec Corp Input and output controller
JP2000003304A (en) * 1998-06-12 2000-01-07 Nec Corp Data processor and data aligner
WO2010029794A1 (en) * 2008-09-12 2010-03-18 株式会社ルネサステクノロジ Data processing device and semiconductor integrated circuit device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202646A (en) * 1995-01-25 1996-08-09 Nec Corp Input and output controller
JP2000003304A (en) * 1998-06-12 2000-01-07 Nec Corp Data processor and data aligner
WO2010029794A1 (en) * 2008-09-12 2010-03-18 株式会社ルネサステクノロジ Data processing device and semiconductor integrated circuit device

Also Published As

Publication number Publication date
JP2023044909A (en) 2023-04-03
GB202401725D0 (en) 2024-03-27
CN117795494A (en) 2024-03-29

Similar Documents

Publication Publication Date Title
US20040107265A1 (en) Shared memory data transfer apparatus
US6587929B2 (en) Apparatus and method for performing write-combining in a pipelined microprocessor using tags
JP6757791B2 (en) Computer device with in-memory processing and narrow data port
US6684267B2 (en) Direct memory access controller, and direct memory access control method
JP2004536417A (en) Memory device for performing addressing with different burst order in read and write operations
WO2003050690A2 (en) Sequential nibble burst ordering for data
TW202022622A (en) Data bit width converter and system on chip thereof
CN101313290B (en) Performing an N-bit write access to an MxN-bit-only peripheral
JP5856434B2 (en) Bus connection circuit, semiconductor device, and operation method of bus connection circuit
US5497466A (en) Universal address generator
KR19990037572A (en) Design of Processor Architecture with Multiple Sources Supplying Bank Address Values and Its Design Method
WO2023047762A1 (en) Processor and endian conversion method
KR100463205B1 (en) Computer system embedded sequantial buffer for improving DSP data access performance and data access method thereof
US7124261B2 (en) Access to bit values within data words stored in a memory
US6483753B1 (en) Endianess independent memory interface
JP2008083827A (en) Data width variable fifo memory, fifo memory and storage device
JP2012014436A (en) Direct memory access control device and method
JP2023044909A5 (en)
JP2011118744A (en) Information processor
Deschamps et al. Input–Output Interfaces
JP2008065377A (en) Information processor
JP3345050B2 (en) Two-dimensional array type memory system
JP2006195810A (en) High-speed data transfer method
JPS6048789B2 (en) Prefix conversion control method
JPH04112251A (en) Microcomputer

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: 22872518

Country of ref document: EP

Kind code of ref document: A1