WO2023047762A1 - プロセッサおよびエンディアン変換方法 - Google Patents

プロセッサおよびエンディアン変換方法 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
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2022/026785
Other languages
English (en)
French (fr)
Japanese (ja)
Inventor
光太郎 島村
輝昭 酒田
勇気 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to GB2401725.3A priority Critical patent/GB2626447A/en
Priority to CN202280053523.5A priority patent/CN117795494A/zh
Publication of WO2023047762A1 publication Critical patent/WO2023047762A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00—Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02—Addressing or allocation; Relocation
    • G06F12/04—Addressing variable-length words or parts of words
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14—Handling requests for interconnection or transfer
    • G06F13/36—Handling requests for interconnection or transfer for access to common bus or bus system
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38—Information transfer, e.g. on bus
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38—Information transfer, e.g. on bus
    • G06F13/40—Bus structure
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38—Information transfer, e.g. on bus
    • G06F13/40—Bus structure
    • G06F13/4004—Coupling between buses
    • G06F13/4009—Coupling between buses with data restructuring
    • G06F13/4013—Coupling between buses with data restructuring with data re-ordering, e.g. Endian conversion
    • Y—GENERAL 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
    • Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02D—CLIMATE 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/00—Energy 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Memory System (AREA)
PCT/JP2022/026785 2021-09-21 2022-07-06 プロセッサおよびエンディアン変換方法 Ceased WO2023047762A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
GB2401725.3A GB2626447A (en) 2021-09-21 2022-07-06 Processor and endian conversion method
CN202280053523.5A CN117795494A (zh) 2021-09-21 2022-07-06 处理器以及字节序转换方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-153025 2021-09-21
JP2021153025A JP7776957B2 (ja) 2021-09-21 2021-09-21 プロセッサおよびエンディアン変換方法

Publications (1)

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

Family

ID=85720442

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/026785 Ceased WO2023047762A1 (ja) 2021-09-21 2022-07-06 プロセッサおよびエンディアン変換方法

Country Status (4)

Country Link
JP (1) JP7776957B2 (enExample)
CN (1) CN117795494A (enExample)
GB (1) GB2626447A (enExample)
WO (1) WO2023047762A1 (enExample)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202646A (ja) * 1995-01-25 1996-08-09 Nec Corp I/oコントローラ
JP2000003304A (ja) * 1998-06-12 2000-01-07 Nec Corp データ処理装置とデータアライン装置
WO2010029794A1 (ja) * 2008-09-12 2010-03-18 株式会社ルネサステクノロジ データ処理装置及び半導体集積回路装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4514173B2 (ja) 2000-10-13 2010-07-28 キヤノン株式会社 データ処理方法および画像処理装置
JP2007128275A (ja) * 2005-11-04 2007-05-24 Hitachi Ltd ストレージにおけるデータの自動エンディアン変換読み込み方法、書き込み方法および複製方法
JP2007323491A (ja) * 2006-06-02 2007-12-13 Oki Electric Ind Co Ltd ダイレクトメモリアクセス制御装置および制御方法
WO2010039794A1 (en) * 2008-10-03 2010-04-08 Toliusis Vytautas J Directly piloted valve assembly
JP2011039964A (ja) 2009-08-18 2011-02-24 Fujitsu Semiconductor Ltd エンディアン変換回路、エンディアン変換方法及びマイクロコントローラ
CN102014037B (zh) * 2010-12-07 2013-05-01 深圳市普方科技有限公司 存储转发设备中实现9位数据字节的传输方法及装置
CN110647355B (zh) * 2018-06-27 2021-11-26 上海寒武纪信息科技有限公司 数据处理器和数据处理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202646A (ja) * 1995-01-25 1996-08-09 Nec Corp I/oコントローラ
JP2000003304A (ja) * 1998-06-12 2000-01-07 Nec Corp データ処理装置とデータアライン装置
WO2010029794A1 (ja) * 2008-09-12 2010-03-18 株式会社ルネサステクノロジ データ処理装置及び半導体集積回路装置

Also Published As

Publication number Publication date
GB2626447A (en) 2024-07-24
JP7776957B2 (ja) 2025-11-27
JP2023044909A (ja) 2023-04-03
CN117795494A (zh) 2024-03-29
GB202401725D0 (en) 2024-03-27

Similar Documents

Publication Publication Date Title
US20040107265A1 (en) Shared memory data transfer apparatus
JP6757791B2 (ja) インメモリ処理及び狭幅データポートを備えたコンピュータデバイス
US20050060441A1 (en) Multi-use data access descriptor
US6684267B2 (en) Direct memory access controller, and direct memory access control method
US20030033491A1 (en) Apparatus and method for performing write-combining in a pipelined microprocessor using tags
JP2006507555A (ja) コントローラプログラミングによるハードウェアへのデータマスクマッピング
US5497466A (en) Universal address generator
KR19990037572A (ko) 뱅크 어드레스 값을 공급하는 다중 소스를 구비하는 프로세서구조 설계 및 그 설계방법
JP2013092852A (ja) バス接続回路、半導体装置及びバス接続回路の動作方法
US6633927B1 (en) Device and method to minimize data latency and maximize data throughput using multiple data valid signals
JP2023044909A (ja) プロセッサおよびエンディアン変換方法
US4964037A (en) Memory addressing arrangement
JP2012014436A (ja) ダイレクトメモリアクセス制御装置及び方法
US7124261B2 (en) Access to bit values within data words stored in a memory
US6483753B1 (en) Endianess independent memory interface
US5619658A (en) Method and apparatus for trapping unimplemented operations in input/output devices
US20260252482A1 (en) Controller circuit and method used in controller circuit for performing remapping index setting without interrupting cpu
KR102673748B1 (ko) 다차원 직접 메모리 접근 컨트롤러 및 그것을 포함하는 컴퓨터 시스템
JP2023044909A5 (enExample)
GB2117945A (en) Memory data transfer
JP3345050B2 (ja) 二次元配列型メモリシステム
JPH06274450A (ja) データ転送システム
JP2845746B2 (ja) マイクロプログラム制御装置
JP2008083827A (ja) データ幅可変fifoメモリ、fifoメモリ及び記憶装置
JP2007048090A (ja) シーケンシャルromインターフェース対応nand型フラッシュメモリーデバイス及びそのコントローラ

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

WWE Wipo information: entry into national phase

Ref document number: 202280053523.5

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 202401725

Country of ref document: GB

Kind code of ref document: A

Free format text: PCT FILING DATE = 20220706

WWE Wipo information: entry into national phase

Ref document number: 2401725.3

Country of ref document: GB

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2401725.3

Country of ref document: GB

122 Ep: pct application non-entry in european phase

Ref document number: 22872518

Country of ref document: EP

Kind code of ref document: A1