[go: up one dir, main page]

CN101739370B - Bus system and its method of operation - Google Patents

Bus system and its method of operation Download PDF

Info

Publication number
CN101739370B
CN101739370B CN 200810174827 CN200810174827A CN101739370B CN 101739370 B CN101739370 B CN 101739370B CN 200810174827 CN200810174827 CN 200810174827 CN 200810174827 A CN200810174827 A CN 200810174827A CN 101739370 B CN101739370 B CN 101739370B
Authority
CN
China
Prior art keywords
instruction
link
dependent
initial
new
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.)
Active
Application number
CN 200810174827
Other languages
Chinese (zh)
Other versions
CN101739370A (en
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.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
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 Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN 200810174827 priority Critical patent/CN101739370B/en
Publication of CN101739370A publication Critical patent/CN101739370A/en
Application granted granted Critical
Publication of CN101739370B publication Critical patent/CN101739370B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)

Abstract

一种应用于非依序执行的总线系统的操作方法,包含有:依据相依限制条件将使用总线系统的指令链接成具有先后顺序的相依链接;以及依据各相依链接对该些指令进行先后顺序的处理。

Figure 200810174827

An operation method for a bus system used for non-sequential execution includes: linking instructions using the bus system into dependent links with a sequence according to dependent restriction conditions; and processing the instructions in sequence according to each dependent link.

Figure 200810174827

Description

总线系统以及其操作方法Bus system and its method of operation

技术领域 technical field

本发明是关于非依序(out-of-order)执行的总线系统的操作方法,且尤其是关于在非依序执行的总线系统中依据相依限制条件建立相依链接的方法。The present invention relates to an operation method of an out-of-order bus system, and more particularly to a method for establishing a dependent link according to a dependency constraint in the out-of-order bus system.

背景技术 Background technique

传统的总线协议均以依序(in-order)的方式执行,例如先进高效能总线(AHB,Advanced High performance BUS),即依据各指令的先后顺序来依序执行。然而,这样的执行方式会有个缺点,就是当有一笔较大的数据交易(transaction)时会延误后续许多笔数据交易,而当系统越来越庞大时,依序执行的总线架构将不敷使用。因此,目前大型的系统转而采用非依序(out-of-order)执行的总线系统,例如先进延伸接口(AXI,AdvancedeXtensible Interface)与开放核心协议(OCP,Open Core Protocol)总线系统。这些非依序执行的总线系统可以使总线上的主控装置(master)与从属装置(slave)能有更多的空间去处理传送自总线的指令。在非依序执行的总线系统中,数据的顺序并非依序排列,例如通过总线系统的指令通道(commandchannel)传送的指令,与通过总线系统的写入数据通道(write-data channel)传送而相应于该指令的写入数据并非依序进入从属装置中,因此,线程识别码(threadID)或标签识别码(tagID)便经常被用来处理这些非依序进入而又互相关联的指令。然而,当这些线程识别码或标签识别码不依序地在总线上传送时,将无法使相关的指令被依序执行,因而容易产生错误。Traditional bus protocols are executed in an in-order manner, such as Advanced High Performance Bus (AHB, Advanced High Performance BUS), which executes sequentially according to the order of each instruction. However, such an execution method has a disadvantage, that is, when there is a large data transaction (transaction), many subsequent data transactions will be delayed, and when the system becomes larger and larger, the bus architecture for sequential execution will not be sufficient use. Therefore, the current large-scale systems turn to out-of-order bus systems, such as Advanced Extended Interface (AXI, AdvancedeXtensible Interface) and Open Core Protocol (OCP, Open Core Protocol) bus systems. These non-sequential execution bus systems can enable the master and slave devices on the bus to have more space to process instructions transmitted from the bus. In a non-sequentially executed bus system, the order of data is not in order. For example, the command transmitted through the command channel of the bus system corresponds to the transmission through the write-data channel of the bus system. The data written in this command is not sequentially entered into the slave device, therefore, thread ID (threadID) or tag ID (tagID) is often used to process these non-sequentially entered but interrelated commands. However, when these thread IDs or tag IDs are transmitted out of order on the bus, related instructions cannot be executed sequentially, and errors are likely to occur.

美国公开专利第2007/0067549号案(此后简称为549号专利案)中曾提出相关的解决方法,其采用传统的先进先出概念解决。为了避免未完成(outstanding)的写入指令与其后的读取指令可能发生数据危障(datahazard),549号专利案将该未完成的写入指令的相关信息暂存在先进先出存储器中,当检查出其后续的读取操作会有数据危障发生时,则暂停该读取操作,直到该未完成写入指令已被完成后再执行暂停中的读取操作,以避免数据危障发生。此方法仍存在一些问题,例如当该读取操作暂停时,该读取操作之后的所有读取操作亦暂停执行,即便先执行它们亦不会发生数据危障。从而,可得知若采用549号专利的方法将使系统整体的效能降低。A related solution has been proposed in US Patent Publication No. 2007/0067549 (hereinafter referred to as Patent No. 549), which adopts the traditional first-in-first-out concept. In order to avoid possible data hazard (data hazard) between the outstanding write command and the subsequent read command, the '549 patent temporarily stores the relevant information of the outstanding write command in the first-in-first-out memory. When it is detected that there will be a data hazard in the subsequent read operation, the read operation is suspended until the unfinished write command is completed before the suspended read operation is executed to avoid data hazards. There are still some problems with this method, for example, when the read operation is suspended, all the read operations after the read operation are also suspended, even if they are executed first, data corruption will not occur. Therefore, it can be seen that if the method of the '549 patent is adopted, the overall performance of the system will be reduced.

发明内容 Contents of the invention

为解决上述问题,本发明提出一种应用于非依序(out-of-order)执行的总线系统的操作方法,以提升系统的整体效能、避免数据危障。该方法包括:依据相依限制条件将使用总线系统的指令链接成具有先后顺序的相依链接;以及依据各相依链接对该些指令进行先后顺序的处理。In order to solve the above problems, the present invention proposes an operation method applied to an out-of-order bus system, so as to improve the overall performance of the system and avoid data corruption. The method includes: linking the instructions using the bus system into dependent links with a sequence according to the dependent constraints; and processing the instructions in sequence according to the dependent links.

本发明还提出一种总线系统,包括:指令暂存器,接收并暂存新进指令,其中该新进指令至少包括一链接标记;以及相依链接产生器,耦接至该指令暂存器,依据该新进指令N个链接标记的相依限制条件产生N个相依链接,且N为任意正整数;其中,该新进指令所包括的每一链接标记皆是用以表示该新进指令与多个先前尚未执行的新进指令之间的先后顺序的链接关系。The present invention also proposes a bus system, comprising: a command register for receiving and temporarily storing a new incoming command, wherein the new incoming command includes at least a link flag; and a dependency link generator coupled to the command register, Generate N dependent links according to the dependency constraints of the N link tags of the new instruction, and N is any positive integer; wherein, each link tag included in the new instruction is used to indicate that the new instruction is related to multiple The sequential link relationship between the previously unexecuted incoming instructions.

附图说明 Description of drawings

图1是依据本发明的一实施例的总线系统的操作方法的流程图。FIG. 1 is a flowchart of an operating method of a bus system according to an embodiment of the present invention.

图2是依据本发明的一实施例的存储器调度器的方块图。FIG. 2 is a block diagram of a memory scheduler according to an embodiment of the invention.

图3是显示利用单一相依限制条件所建立的相依指令链接中一指令的结构。FIG. 3 shows the structure of an instruction in a chain of dependent instructions established using a single dependency constraint.

图4是说明存储器调度器在不同时间接收到的各指令之间的链接关系。FIG. 4 is a diagram illustrating the link relationship between instructions received by the memory scheduler at different times.

图5是显示利用单一相依限制条件所建立的相依指令链接中一指令的另一结构。FIG. 5 shows another structure of an instruction in a chain of dependent instructions established using a single dependency constraint.

图6是显示利用单一相依限制条件所建立的相依指令链接中一指令的又另一结构。FIG. 6 shows yet another structure of an instruction in a chain of dependent instructions established using a single dependency constraint.

图7是显示利用两个相依限制条件所建立的相依指令链接中各指令的结构。FIG. 7 shows the structure of each instruction in the dependent instruction chain established by using two dependent constraints.

图8是说明存储器调度器200在不同时间接收到的各指令之间的链接关系。FIG. 8 illustrates the link relationship between instructions received by the memory scheduler 200 at different times.

图9是依据本发明的一实施例来对总线上传输的数据进行追踪除错的示意图。FIG. 9 is a schematic diagram of tracking and debugging data transmitted on the bus according to an embodiment of the present invention.

[主要元件标号说明][Description of main component labels]

  110、120、130 步骤 200 存储器调度器 210 指令暂存器 220 相依链接产生器 230 指令选择器 240 链接关系移除器 300、500、600、700 指令 310、710、720 末端标记 320、520、620、730 指令内容 330、530、740、750 链接标记 510 起始标记 610 优先权标记 110, 120, 130 step 200 memory scheduler 210 instruction register 220 Dependency Link Generator 230 command selector 240 Link Relationship Remover 300, 500, 600, 700 instruction 310, 710, 720 end tag 320, 520, 620, 730 command content 330, 530, 740, 750 link tag 510 start tag 610 priority mark

具体实施方式 Detailed ways

图1是依据本发明的一实施例的总线系统的操作方法的流程图。总线系统的操作方法100包含下列步骤:FIG. 1 is a flowchart of an operating method of a bus system according to an embodiment of the present invention. The method 100 for operating a bus system comprises the following steps:

步骤110:依据至少一相依限制条件将使用该总线系统的多个指令链接成具有先后顺序的至少一相依链接;Step 110: Link the multiple instructions using the bus system into at least one dependent link with sequence according to at least one dependent constraint condition;

步骤120:依据每一相依链接对该些指令进行该先后顺序的处理;以及Step 120: Process the instructions in the sequence according to each dependent link; and

步骤130:依据相关链接标记重设已执行的指令所属的相依链接。Step 130: Reset the dependent link to which the executed instruction belongs according to the related link flag.

总线系统的操作方法100将搭配以下各图与各实施例详细说明如下。The operation method 100 of the bus system will be described in detail in conjunction with the following figures and embodiments.

图2是依据本发明的一实施例的存储器调度器的方块图。存储器调度器200包含指令暂存器(request queue)210、相依链接产生器220、指令选择器230以及链接关系移除器240。其中,相依链接产生器220是耦接至指令暂存器210,指令选择器230是耦接至指令暂存器210,而链接关系移除器240是耦接至指令暂存器210与指令选择器230。存储器调度器200是耦接至非依序执行总线(未显示于图2),依据至少一相依限制条件将使用该总线系统的多个指令彼此链接成具有先后顺序的至少一个相依链接,再依据各相依链接选出有资格被执行(serve)的指令,以使得可依据该先后顺序对该些指令进行处理。FIG. 2 is a block diagram of a memory scheduler according to an embodiment of the invention. The memory scheduler 200 includes a request queue 210 , a dependency link generator 220 , a command selector 230 and a link relationship remover 240 . Wherein, the dependent link generator 220 is coupled to the command register 210, the command selector 230 is coupled to the command register 210, and the link relationship remover 240 is coupled to the command register 210 and the command selector device 230. The memory scheduler 200 is coupled to a non-sequential execution bus (not shown in FIG. 2 ), links multiple instructions using the bus system to each other into at least one dependent link with a sequence according to at least one dependency constraint, and then according to Each dependent link selects instructions that are eligible to be served, so that these instructions can be processed according to the sequence.

总线上的指令是非依序地被传递,为了避免发生数据危障等错误,一些有相依性(dependency)的指令应依序地被执行,而各指令彼此之间是否有相依性,得从各指令的线程识别码(threadID)、存储器页码(memory pagenumber)等消息来判断。例如,根据总线协议(bus protocol),具有相同线程识别码(例如线程识别码均为0)的各指令具有相依性,又如存取同一存储器页码的各指令间亦有相依性,此规定可避免数据危障的发生。因此,得以根据线程识别码或存储器页码作为相依限制条件以建立相依链接,请注意到,上述仅作为范例说明之用,而本领域技术人员当得以采用其它相依限制条件以判断各指令间的相依性。The instructions on the bus are transmitted non-sequentially. In order to avoid errors such as data hazards, some instructions with dependencies should be executed sequentially. Instruction thread identification code (threadID), memory page number (memory page number) and other information to judge. For example, according to the bus protocol, instructions with the same thread identification code (for example, the thread identification codes are all 0) have dependencies, and there are also dependencies between instructions that access the same memory page number. Avoid data hazards. Therefore, the dependency link can be established according to the thread identification code or the memory page number as the dependency restriction condition. Please note that the above is only used as an example, and those skilled in the art can use other dependency restriction conditions to determine the dependency between instructions. sex.

指令暂存器210自总线上接收并储存指令R。图3是显示利用单一相依限制条件所建立的相依指令链接中一指令的结构。储存在指令暂存器210的指令300具有多个字段,分别用以记录末端标记310、指令内容320与链接标记330,请注意到图3所示的指令300的各字段顺序仅为说明之用,不应视为本发明的限制。末端标记310用以说明该指令是否为所属相依链接的末端,指令内容320储存该指令欲执行的内容,链接标记330用以指示该指令与储存在指令暂存器210的多个先前尚未执行的指令之间的依先后顺序的链接关系,在一实施例中,当链接标记330显示指令300与其它指令皆无链接关系时,则指令300是至少一相依链接的起始端。The command register 210 receives and stores the command R from the bus. FIG. 3 shows the structure of an instruction in a chain of dependent instructions established using a single dependency constraint. The command 300 stored in the command register 210 has a plurality of fields, which are respectively used to record the end mark 310, the command content 320 and the link mark 330. Please note that the order of the fields of the command 300 shown in FIG. 3 is for illustration only , should not be considered as a limitation of the present invention. The end mark 310 is used to indicate whether the instruction is the end of the dependent link, the instruction content 320 stores the content to be executed by the instruction, and the link mark 330 is used to indicate that the instruction is stored in the instruction register 210 and has not yet been executed before. The sequential link relationship among the instructions, in one embodiment, when the link mark 330 shows that the instruction 300 has no link relationship with other instructions, then the instruction 300 is the starting end of at least one dependent link.

图4是说明存储器调度器200在不同时间接收到的各指令之间的链接关系。假设在时间T5时,指令暂存器210中已经储存了线程识别码为0且分别在时间T0、T1、T3收到的指令R0(0)、R1(0)、R3(0),以及储存了线程识别码为1且分别在时间T2、T4收到的指令R2(1)、R4(1),其中指令R0(0)的链接标记是说明其并不向前链接至任何指令,换言之,其为线程识别码为0的相依链接(简称为第一链接)的起始端,R1(0)的链接标记是说明其是链接在指令R0(0)之后,R3(0)的链接标记是说明其是链接在指令R1(0)之后,而R3(0)的末端标记是说明其是其为第一链接的末端;此外,指令R2(1)的链接标记是说明其并不向前链接至任何指令,亦即,其为线程识别码为1的相依链接(简称为第二链接)的起始端,R4(1)的链接标记是说明其是链接在指令R2(1)之后,而R2(1)的末端标记是说明其是其为第二链接的末端。在时间T5时,存储器调度器200又接收到线程识别码为0的新进指令R5,并将其储存在指令暂存器210之中。依据相依限制条件(如线程识别码0、1),相依链接产生器220寻找线程识别码为0的链接的末端,即指令R3(0),使新进指令R5链接于第一链接的末端,设定指令R5的链接标记为链接至指令R3(0)(如步骤110),并设定其末端标记为第一链接的末端,且更改指令R3(0)的末端标记使其不再为第一链接的末端。请注意到,若指令R5的线程识别码为1,则相依链接产生器220以类似于上述的方法将其链接至第二链接的末端;若指令暂存器210中并无任何指令与指令R5的线程识别码相同,即新进指令R5不符任一相依限制条件时,相依链接产生器220设定指令R5的链接标记使其成为新建链接的起始端,并设定指令R5的末端标记使其同时成为新建链接的末端。FIG. 4 illustrates the link relationship between instructions received by the memory scheduler 200 at different times. Assume that at time T5, instructions R0(0), R1(0), and R3(0) with a thread identification code of 0 and received at times T0, T1, and T3 have been stored in the instruction register 210, and stored Instructions R2(1) and R4(1) received at time T2 and T4 with thread identification code 1 respectively, the link mark of instruction R0(0) indicates that it does not link forward to any instruction, in other words, It is the starting end of the dependent link whose thread identification code is 0 (abbreviated as the first link). The link mark of R1(0) indicates that it is linked after the instruction R0(0), and the link mark of R3(0) indicates that It is chained after instruction R1(0), and R3(0)'s end-marker indicates that it is the end of the first link; furthermore, instruction R2(1)'s link-marker indicates that it does not link forward to Any instruction, that is, it is the starting end of the dependent link (abbreviated as the second link) whose thread identification code is 1, the link mark of R4(1) is to illustrate that it is linked after the instruction R2(1), and R2( The end marker of 1) is to indicate that it is the end of the second linkage. At time T5 , the memory scheduler 200 receives the incoming instruction R5 with the thread identification code being 0, and stores it in the instruction register 210 . According to the dependent constraint condition (such as thread identification code 0, 1), the dependent link generator 220 searches for the end of the link whose thread identification code is 0, that is, instruction R3(0), so that the new incoming instruction R5 is linked to the end of the first link, Set the link label of instruction R5 to be linked to instruction R3(0) (as in step 110), and set its end label to be the end of the first link, and change the end label of instruction R3(0) so that it is no longer the first link end of a link. Please note that if the thread ID of the instruction R5 is 1, the dependent link generator 220 links it to the end of the second link in a similar manner to the above; if there is no instruction and instruction R5 in the instruction register 210 The thread identification codes of all threads are the same, that is, when the new instruction R5 does not meet any dependency restriction condition, the dependency link generator 220 sets the link tag of the instruction R5 to make it the start of the new link, and sets the end tag of the instruction R5 to make it Also becomes the end of the newly created link.

至于执行指令方面,指令选择器230依据储存在指令暂存器210中尚未被执行的各指令与相应的相依链接选出有资格被执行的指令,指令选择器230必须从各个链接的起始指令当中,挑选出一个予以执行,如指令R0(0),指令选择器230输出有资格被执行的指令R0(0),代表指令R0(0)已得以被执行(如步骤120),而链接关系移除器240则依据各指令的链接标记寻找链接至指令R0(0)的指令R1(0),如指令R1(0)的链接标记是指出其是链接在指令R(0)之后,则链接关系移除器240移除指令R1(0)并重设指令R1(0)的链接标记,使其取代指令选择器230已执行的指令R0(0)而递补成为第一链接的起始指令(如步骤130)。当指令选择器230再次挑选得被执行的指令时,则指令选择器230得依据指令R1(0)的链接标记将指令R1(0)选为得被执行的指令,并输出指令R1(0)以供执行。As for the execution instructions, the instruction selector 230 selects the instructions that are eligible to be executed according to the instructions stored in the instruction register 210 that have not yet been executed and the corresponding dependent links. Among them, one is selected to be executed, such as the instruction R0(0), and the instruction selector 230 outputs the instruction R0(0) qualified to be executed, which means that the instruction R0(0) has been executed (such as step 120), and the link relationship The remover 240 searches for the instruction R1(0) linked to the instruction R0(0) according to the link mark of each instruction. If the link mark of the instruction R1(0) indicates that it is linked after the instruction R(0), then the link The relationship remover 240 removes the instruction R1(0) and resets the link flag of the instruction R1(0), so that it replaces the instruction R0(0) executed by the instruction selector 230 and becomes the initial instruction of the first link (such as Step 130). When the instruction selector 230 selects the instruction to be executed again, the instruction selector 230 selects the instruction R1(0) as the instruction to be executed according to the link mark of the instruction R1(0), and outputs the instruction R1(0) for execution.

图5是显示利用单一相依限制条件所建立的相依指令链接中一指令的另一结构。储存在指令暂存器210的指令500具有多个字段,分别记录起始标记510、指令内容520与链接标记530,请注意到,图5所示的指令500的各字段顺序仅为说明之用,不应视为本发明的限制。起始标记510是用以说明该指令是否为相依链接的起始指令,指令内容520则储存该指令欲执行的内容,而链接标记530是用以指示该指令与储存在指令暂存器210的其它指令的链接关系,例如总线系统中有第一指令与第二指令,而该第一指令的链接标记是指出该第一指令是链接在该第二指令之前。本领域技术人员当可在前述指令300的相依链接建立与选择执行指令的相关说明的教导之下,以指令500形式的指令进行相依链接建立与选择执行指令,因此为求简洁起见,于此将不再赘述。FIG. 5 shows another structure of an instruction in a chain of dependent instructions established using a single dependency constraint. The instruction 500 stored in the instruction register 210 has a plurality of fields, respectively recording the start tag 510, the instruction content 520 and the link tag 530. Please note that the order of the fields of the instruction 500 shown in FIG. 5 is for illustration only , should not be considered as a limitation of the present invention. The start mark 510 is used to indicate whether the command is the start command of a dependent link, the command content 520 stores the content to be executed by the command, and the link mark 530 is used to indicate that the command is stored in the command register 210 Linkage relationship of other instructions, for example, there are first instruction and second instruction in the bus system, and the link mark of the first instruction indicates that the first instruction is linked before the second instruction. Those skilled in the art can use instructions in the form of instruction 500 to establish dependent links and select and execute instructions under the guidance of the relevant descriptions of the above-mentioned instruction 300 for establishing dependent links and selecting and executing instructions. Therefore, for the sake of brevity, hereby No longer.

图6是显示利用单一相依限制条件所建立的相依指令链接中一指令的又另一结构。储存在指令暂存器210的指令600具有多个字段,分别记录优先权标记610与指令内容620,请注意到图6所示的指令600的各字段顺序仅为说明之用,不应视为本发明的限制。优先权标记610是用以说明该指令在所属的任一相依链接中的该先后顺序,而指令内容620为该指令欲执行的内容。本领域技术人员当可在前述指令300的相依链接建立与选择执行指令的相关说明的教导之下,以具有指令600形式的指令进行相依链接建立与选择执行指令,因此为求简洁起见,于此将不再赘述。FIG. 6 shows yet another structure of an instruction in a chain of dependent instructions established using a single dependency constraint. The instruction 600 stored in the instruction register 210 has a plurality of fields, which respectively record the priority flag 610 and the instruction content 620. Please note that the order of the fields of the instruction 600 shown in FIG. Limitations of the Invention. The priority mark 610 is used to describe the sequence of the instruction in any dependent link, and the instruction content 620 is the content to be executed by the instruction. Those skilled in the art can use the instructions in the form of instruction 600 to establish dependent links and select and execute instructions under the teaching of the relevant descriptions of the above-mentioned instruction 300 for establishing dependent links and selecting and executing instructions. Therefore, for the sake of brevity, hereby Will not repeat them.

除了使用单一个相依限制条件建立使用总线系统的各指令间的相依性之外,亦可使用多个相依限制条件来建立相依性,例如一并依据线程识别码与存储器页码来建立相依性。图7是显示利用两个相依限制条件所建立的相依指令链接中各指令的结构。储存在指令暂存器210的指令700具有多个字段,分别记录第一末端标记710、第二末端标记720、指令内容730、第一链接标记740与第二链接标记750,请注意到,图7所示的指令700的各字段顺序仅为说明之用,不应视为本发明的限制。第一末端标记710是用以说明该指令是否为依据第一相依限制条件(例如线程识别码)而建立的第一相依链接的第一末端指令,第二末端标记720是用以说明该指令是否为依据第二相依限制条件(例如存储器页码)而建立的第二相依链接的第二末端指令,指令内容730是储存该指令欲执行的内容,第一链接标记740是用以说明该指令与储存在指令暂存器210的其它指令的在第一相依限制条件方面的链接关系,以及第二链接标记750是用以说明该指令与储存在指令暂存器210的其它指令的在第二相依限制条件方面的链接关系。In addition to using a single dependency constraint to establish dependencies between instructions using the bus system, multiple dependency constraints can also be used to establish dependencies, for example, to establish dependencies based on thread IDs and memory page numbers. FIG. 7 shows the structure of each instruction in the dependent instruction chain established by using two dependent constraints. The instruction 700 stored in the instruction register 210 has a plurality of fields, respectively recording the first end tag 710, the second end tag 720, the instruction content 730, the first link tag 740 and the second link tag 750, please note that the The order of the fields of the instruction 700 shown in 7 is for illustration only, and should not be considered as a limitation of the present invention. The first end mark 710 is used to indicate whether the instruction is the first end instruction of the first dependent link established according to the first dependency restriction condition (such as a thread identification code), and the second end mark 720 is used to indicate whether the instruction is It is the second end instruction of the second interdependence link established according to the second interdependence restriction condition (for example, the memory page number), the instruction content 730 is to store the content to be executed by the instruction, and the first link mark 740 is used to illustrate the instruction and storage The link relationship of other instructions in the instruction register 210 in terms of the first dependency constraint, and the second link label 750 is used to illustrate the instruction and other instructions stored in the instruction register 210 in the second dependency constraint Conditional link relationship.

图8是说明存储器调度器200在不同时间接收到的各指令之间的链接关系。假设在时间T3时,指令暂存器210中已经储存了分别在时间T0、T1、T2收到的指令R0(0)P0、R1(0)P1、R2(1)P0。指令R0(0)P0、R1(0)P1的线程识别码为0,指令R0(0)P1、R2(1)P1的存储器页码为0,而指令R1(0)P1的存储器页码为1,其中指令R0(0)P0的第一链接标记是说明其先前并无链接任何线程识别码为0的指令,故其为线程识别码为0的相依链接(简称为第一链接)的起始指令,而指令R0(0)P0的第二链接标记说明其先前并无链接任何存储器页码为0的指令,其为存储器页码为0的相依链接(简称为第二链接)的起始指令。FIG. 8 illustrates the link relationship between instructions received by the memory scheduler 200 at different times. Assume that at time T3, the command register 210 has stored the commands R0(0)P0, R1(0)P1, and R2(1)P0 received at times T0, T1, and T2 respectively. The thread identification code of the instruction R0(0)P0, R1(0)P1 is 0, the memory page number of the instruction R0(0)P1, R2(1)P1 is 0, and the memory page number of the instruction R1(0)P1 is 1, Among them, the first link mark of instruction R0(0)P0 is to indicate that it has not previously linked any instruction whose thread identification code is 0, so it is the initial instruction of the dependent link (abbreviated as the first link) whose thread identification code is 0 , and the second link flag of instruction R0(0)P0 indicates that it is not linked to any instruction with memory page number 0 before, which is the initial instruction of the dependent link with memory page number 0 (referred to as the second link for short).

指令R1(0)P1的第一链接标记指出,在线程识别码的相依限制条件方面,其是链接在指令R0(0)P0之后,而指令R1(0)P1的第一末端标记说明其亦为第一链接的末端指令;而指令R1(0)P1的第二链接标记指出,在存储器页码的相依限制条件方面,其先前并无链接任何存储器页码为1的指令,其为存储器页码为1的相依链接(简称为第三链接)的起始指令,而指令R1(0)P1的第二末端标记说明其亦为第三链接的末端指令。The first link label of instruction R1(0)P1 indicates that it is chained after instruction R0(0)P0 in terms of the dependency constraints of the thread ID, and the first end label of instruction R1(0)P1 indicates that it is also chained after instruction R0(0)P0. is the end instruction of the first link; and the second link tag of instruction R1(0)P1 indicates that it has not previously linked any instruction with a memory page number of 1 in terms of memory page dependency constraints, which is a memory page number of 1 The start instruction of the dependent link (referred to as the third link for short), and the second end tag of the instruction R1(0)P1 indicates that it is also the end instruction of the third link.

指令R2(1)P0的第一链接标记是说明其先前并无链接任何线程识别码为1的指令,故其为线程识别码为1的相依链接(简称为第四链接)的起始指令,而指令R2(1)P0的第一末端标记说明其亦为第四链接的末端指令。而指令R2(1)P0的第二链接标记说明在存储器页码的相依限制条件方面,其是链接在指令R0(0)P0之后,而指令R2(1)P2的第二末端标记说明其亦为第二链接的末端指令。The first link mark of instruction R2(1)P0 is to explain that it has not linked any instruction whose thread identification code is 1 before, so it is the initial instruction of the dependent link (abbreviated as the fourth link) whose thread identification code is 1, The first end tag of instruction R2(1)P0 indicates that it is also the end instruction of the fourth chain. And the second link mark of instruction R2(1)P0 shows that it is chained after instruction R0(0)P0 in terms of the dependency constraints of the memory page number, and the second end mark of instruction R2(1)P2 shows that it is also End directive for the second link.

第一、二、三、四链接是相依链接产生器220依据新进指令链接标记的相依限制条件所产生的四个相依链接,请注意到,相依链接产生器220得依据新进指令N个链接标记的相依限制条件产生N个相依链接,且N为任意正整数,而相依链接产生器220更得依据该新进指令所包括的N个末端标记来表示该新进指令为该N个相依链接的末端指令,以下将以新进指令详细说明之。The first, second, third, and fourth links are the four dependent links generated by the dependent link generator 220 according to the dependent restriction conditions of the new incoming instruction link mark. Please note that the dependent link generator 220 has N links according to the new incoming instruction The dependent constraint condition of the tag generates N dependent links, and N is any positive integer, and the dependent link generator 220 has to indicate that the new instruction is the N dependent links according to the N end tags included in the new instruction. The terminal command of the command will be described in detail as a new command below.

在时间T3时,存储器调度器200又接收到线程识别码为0且存储器页码为0的指令R3(0)P0,并将其储存在指令暂存器210之中。依据各相依限制条件(如线程识别码0、1),相依链接产生器220寻找线程识别码为0的链接的末端指令,即指令R1(0)P1,使新进指令R3(0)P0链接于第一链接的末端,设定指令R3(0)P0的第一链接标记为链接至指令R1(0)P1,并设定其第一末端标记为第一链接的末端指令,且更改指令R1(0)P1的第一末端标记使其不再为第一链接的末端指令。依据各相依限制条件(如存储器页码0、1),相依链接产生器220寻找存储器页码为0的链接的末端指令,即指令R2(1)P0,使新进指令R3(0)P0链接于第二链接的末端,设定指令R3(0)P0第二链接标记为链接至指令R2(1)P0,并设定其第二末端标记为第二链接的末端指令,且更改指令R2(1)P2的第二末端标记使其不再为第二链接的末端指令。At time T3 , the memory scheduler 200 receives the instruction R3(0)P0 whose thread ID is 0 and memory page number is 0, and stores it in the instruction register 210 . According to each dependent constraint condition (such as thread identification code 0, 1), the dependent link generator 220 searches for the end instruction of the link whose thread identification code is 0, that is, instruction R1(0)P1, so that the new incoming instruction R3(0)P0 is linked At the end of the first link, set the first link tag of instruction R3(0)P0 to be linked to instruction R1(0)P1, and set its first end tag to be the end instruction of the first link, and change instruction R1 (0) The first end of P1 marks such that it is no longer the end instruction of the first chain. According to each dependent constraint condition (such as memory page number 0, 1), the dependent link generator 220 searches for the end instruction of the link whose memory page number is 0, that is, instruction R2(1)P0, so that the new incoming instruction R3(0)P0 is linked to the first At the end of the second link, set instruction R3(0)P0 the second link label to be linked to instruction R2(1)P0, and set its second end label to be the end instruction of the second link, and change instruction R2(1) The second end mark of P2 makes it no longer the end instruction of the second chain.

请注意到,若指令暂存器210中并无任何指令与新进指令的线程识别码相同,即该新进指令不符任一相依限制条件时,则相依链接产生器220设定新进指令的第一链接标记以使其在线程识别码的相依限制条件方面成为新建链接的起始端,并设定新进指令的第一末端标记以使其成为该新建链接的末端;若指令暂存器210中并无任何指令与新进指令的存储器页码相同,则相依链接产生器220设定新进指令的第二链接标记使其在存储器页码的相依限制条件方面成为新建链接的起始端,并设定新进指令的第二末端标记使其成为该新建链接的末端。Please note that if there is no instruction in the instruction register 210 that has the same thread identification code as the incoming instruction, that is, when the incoming instruction does not meet any dependency constraint condition, then the dependency link generator 220 sets the thread ID of the incoming instruction. The first link mark makes it the beginning of the new link in terms of the dependency constraints of the thread ID, and sets the first end mark of the new incoming instruction to make it the end of the new link; if the instruction register 210 If there is no instruction with the same memory page number as the new incoming instruction, the dependent link generator 220 sets the second link flag of the new incoming instruction to be the start of the new link in terms of the dependency constraint on the memory page number, and sets The second end marker of the incoming instruction makes it the end of the newly created link.

至于执行指令方面,指令选择器230依据储存在指令暂存器210中尚未被执行的各指令与多个相依链接选出有资格被执行的指令,指令选择器230判读多个(如N个)相依链接所包含的N个链接标记,根据所属的链接标记判断该指令是否为起始指令,并找出N个相依链接起始端的M个起始指令,并挑选出其中之一予以执行,其中M个起始指令皆至少包含一链接标记表示其为已可被执行的起始指令,且M、N为正整数,M小于N。例如,指令R0(0)P0在各相依限制条件方面(线程识别码与存储器页码)的链接标记均指出其为起始指令,则指令R0(0)P0即为有资格被执行的指令,而指令R1(0)P1在存储器页码方面则为起始指令,但是在线程识别码方面并非是起始指令,故指令R1(0)P1不是有资格被执行的指令。在另一实施例中,若指令R1(0)P1在各相依限制条件方面的链接标记有多数指出其为起始指令,则指令R0(0)P0亦为有资格被执行的指令。在又一实施例中,若指令R1(0)P1在各相依限制条件方面的链接标记至少一个链接标记指出其为起始指令,则指令R0(0)P0亦为有资格被执行的指令。假设指令选择器230输出有资格被执行的指令R0(0)P0,而链接关系移除器240则依据各指令的各链接标记寻找在各相依限制条件方面链接在指令R0(0)P0后的指令,在线程识别码方面,指令R1(0)P1的第一链接标记是指出其是链接在指令R0(0)P0之后,链接关系移除器240重设指令R1(0)P1的第一链接标记,使其取代已执行的指令R0(0)P0成为第一链接的起始指令;在存储器页码方面,指令R2(1)P0的第二链接标记是指出其是链接在指令R0(0)P0之后,链接关系移除器240重设指令R2(1)P0的第二链接标记,使其取代已执行的指令R0(0)P0成为第二链接的起始指令。As for the execution instructions, the instruction selector 230 selects instructions that are eligible to be executed according to the instructions stored in the instruction temporary register 210 that have not yet been executed and a plurality of dependent links, and the instruction selector 230 interprets multiple (such as N) According to the N link tags contained in the dependent link, judge whether the instruction is an initial instruction according to the link tag to which it belongs, and find out the M initial instructions at the starting ends of the N dependent links, and select one of them to execute, among which Each of the M initial instructions includes at least one link flag indicating that it is an executable initial instruction, and M and N are positive integers, and M is smaller than N. For example, the link marks of the instruction R0(0)P0 in terms of the dependent constraints (thread identification code and memory page number) all indicate that it is the initial instruction, then the instruction R0(0)P0 is the instruction eligible to be executed, and Instruction R1(0)P1 is an initial instruction in terms of memory page number, but not an initial instruction in terms of thread ID, so instruction R1(0)P1 is not an instruction eligible to be executed. In another embodiment, if the link marks of the instruction R1(0)P1 in each dependency condition have a majority indicating that it is the initial instruction, then the instruction R0(0)P0 is also an instruction eligible to be executed. In yet another embodiment, the instruction R0(0)P0 is also an instruction eligible to be executed if at least one linking flag of the instruction R1(0)P1 in terms of each dependency constraint indicates that it is the initial instruction. Assume that the instruction selector 230 outputs the instruction R0(0)P0 that is qualified to be executed, and the link relationship remover 240 searches for the instruction R0(0)P0 that is linked after the instruction R0(0)P0 in terms of the dependency constraints according to each link flag of each instruction. Instructions, in terms of thread identification codes, the first link flag of instruction R1(0)P1 is to indicate that it is linked after instruction R0(0)P0, and the link relationship remover 240 resets the first link of instruction R1(0)P1. The link mark makes it replace the executed instruction R0(0)P0 as the initial instruction of the first link; in terms of memory page number, the second link mark of the instruction R2(1)P0 is to point out that it is linked in the instruction R0(0) ) P0, the link relation remover 240 resets the second link flag of the instruction R2(1)P0, so that it replaces the executed instruction R0(0)P0 as the start instruction of the second link.

此外,指令700得具有类似于指令500的形式,即具有对应多个相依限制条件的多个起始标记以及对应多个相依限制条件的多个链接标记,而其中的链接标记是说明该指令是链接在哪些指令之前,本领域技术人员当可在前述实施例的教导之下,轻易地了解此种形式的指令要如何建立相依链接与执行,因此为求简洁起见,于此将不再赘述。In addition, instruction 700 has a form similar to instruction 500, that is, it has a plurality of start tags corresponding to a plurality of dependent constraints and a plurality of link tags corresponding to a plurality of dependent constraints, and the link tags indicate that the instruction is Those skilled in the art can easily understand how to establish dependent links and execute instructions in this form under the teachings of the above-mentioned embodiments. Therefore, for the sake of brevity, details will not be repeated here.

再者,指令700得具有类似于指令600的形式,即具有对应多个相依限制条件的多个优先权标记,而其中的优先权标记是说明该指令在各相依限制条件方面所建立的相依链接中的先后顺序,本领域技术人员当可在前述实施例的教导之下,轻易地了解此种形式的指令要如何建立相依链接与执行,因此为求简洁起见,于此将不再赘述。Furthermore, the instruction 700 has a form similar to that of the instruction 600, that is, it has a plurality of priority tags corresponding to a plurality of dependent constraints, and wherein the priority tags indicate the dependency link established by the instruction in terms of each dependent constraint According to the sequence in the above-mentioned embodiment, those skilled in the art can easily understand how to establish a dependency link and execute instructions in this form under the teaching of the above-mentioned embodiments. Therefore, for the sake of brevity, details will not be repeated here.

要在多线程且非依序执行的总线上进行传输对齐(transfer alignment)也是一项很困难的工作,然而,若欲对总线上传输的数据进行除错追踪(debugtracing),又非得进行传输对齐不可。本发明的一实施例是利用建立指令间相依性的技术来对总线上传输的数据进行除错追踪。图9是依据本发明的一实施例对总线上传输的数据进行除错追踪的示意图。如图所示,总线具有指令通道(command channel)CC、写入数据通道(write data channel)WC与响应通道(response channel)DC。在指令通道CC上,从时间T0到T5分别出现了指令R0到R5,其中指令R0(0)、R5(0)的线程识别码均为0,指令R1(1)、R2(1)、R4(1)的线程识别码均为1,以及指令R3(2)的线程识别码为2。线程识别码相同的指令必须依序执行,因而将线程识别码作为相依限制条件,在时间T2时,除错追踪模块(未显示于图9)发现总线上的指令R2(1)与指令R1(1)有相同的线程识别码,故在其指令暂存器(未显示于图9)中设定指令R2(1)的链接标记以说明其是链接至指令R1(1),设定R2(1)的末端标记以说明其是线程识别码为1的相依链接(简称为第一链接)的末端指令,并重设指令R1(1)的末端标记以说明其不再是第一链接的末端指令;在时间T4时,除错追踪模块发现总线上的指令R4(1)与指令R1(1)、指令R2(1)的线程识别码均为1,便根据上述的类似操作来使指令R4(1)成为第一链接的末端指令,并修改第一链接的链接关系。It is also very difficult to perform transfer alignment on a multi-threaded and non-sequentially executed bus. However, if you want to debug and trace the data transferred on the bus, you must perform transfer alignment. No. An embodiment of the present invention utilizes the technique of establishing inter-command dependencies to debug and trace the data transmitted on the bus. FIG. 9 is a schematic diagram of debugging and tracking data transmitted on the bus according to an embodiment of the present invention. As shown in the figure, the bus has a command channel (command channel) CC, a write data channel (write data channel) WC, and a response channel (response channel) DC. On the instruction channel CC, instructions R0 to R5 appear from time T0 to T5 respectively, among which the thread identification codes of instructions R0(0) and R5(0) are both 0, and instructions R1(1), R2(1), and R4 The thread identification codes of (1) are all 1, and the thread identification code of instruction R3(2) is 2. Instructions with the same thread identification code must be executed in sequence, so the thread identification code is used as a dependent constraint condition. At time T2, the debug tracking module (not shown in FIG. 9 ) finds that instruction R2(1) and instruction R1( 1) have the same thread ID, so set the link flag of instruction R2(1) in its instruction register (not shown in Figure 9) to illustrate that it is linked to instruction R1(1), set R2( 1) to indicate that it is the end instruction of a dependent link with thread ID 1 (abbreviated as the first link), and reset the end label of instruction R1(1) to indicate that it is no longer the end instruction of the first link ; At time T4, the debugging tracking module finds that the thread identification codes of instruction R4(1), instruction R1(1) and instruction R2(1) on the bus are both 1, and then make instruction R4( 1) Become the end command of the first link, and modify the link relationship of the first link.

在时间T5时,响应通道DC出现一笔响应数据D1(1),其线程识别码为1,且总线中未完成(outstanding)的指令R1(1)、指令R2(1)、指令R4(1)的线程识别码均为1,而依据前述关于利用末端标记与链接标记的方法得以判定出这三个指令中只得执行起始指令R1(1),因此可以判定指令R1(1)与响应数据D1(1)为同一笔交易,故通过上述方法即可完成追踪并记录总线的数据交易。请注意到,本领域技术人员当可在前述各实施例的教导下,利用多个相依限制条件对总线进行除错追踪,或者利用有关起始标记、链接标记、优先权标记等方法对总线进行除错追踪,于此不再赘述。At time T5, a piece of response data D1(1) appears in the response channel DC, its thread identification code is 1, and there are outstanding commands R1(1), R2(1), R4(1) in the bus )’s thread identification codes are all 1, and according to the above-mentioned method of using the end mark and the link mark, it can be determined that only the start command R1(1) can be executed among the three commands, so it can be determined that the command R1(1) and the response data D1(1) is the same transaction, so the data transaction of the bus can be tracked and recorded by the above method. Please note that those skilled in the art can, under the teachings of the above-mentioned embodiments, use multiple dependent constraints to debug and track the bus, or use methods such as start flags, link flags, and priority flags to trace the bus. Debugging and tracking will not be repeated here.

综上所述,本发明的实施例提供了利用至少一相依限制条件在非依序执行的多线程总线系统中建立各指令间相依性的方法,从而在对各指令进行相关处理时,得以依据各指令间的相依性进行,以减少数据危障发生的机率。To sum up, the embodiments of the present invention provide a method for establishing dependencies between instructions in a non-sequentially executed multithreaded bus system by using at least one dependency constraint, so that when performing related processing on each instruction, it can be based on The dependencies among the commands are implemented to reduce the probability of data hazards.

以上所述仅为本发明的较佳实施例,凡依本发明权利要求范围所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.

Claims (18)

1.一种总线系统的操作方法,包含有:1. A method of operating a bus system, comprising: 接收并暂存新进指令,其中该新进指令至少包括一链接标记;receiving and temporarily storing a new incoming order, wherein the new incoming order includes at least a link mark; 依据该新进指令N个链接标记的相依限制条件产生N个相依链接,且N为任意正整数;Generate N dependent links according to the dependent restriction conditions of the N link tags of the new instruction, and N is any positive integer; 从尚未执行的新进指令中找出该N个相依链接起始端的M个起始指令,并挑选出其中之一予以执行,其中该M个起始指令皆至少包括一链接标记表示该M个起始指令已可执行,且M为小于等于N的正整数;以及Find out the M initial instructions of the start ends of the N dependent links from the unexecuted new instructions, and select one of them to execute, wherein the M initial instructions all include at least one link flag to indicate the M The initial instruction is executable, and M is a positive integer less than or equal to N; and 移除所执行的第一起始指令,并依据该第一起始指令的相依限制条件递补至少一新的起始指令,removing the executed first initial instruction, and supplementing at least one new initial instruction according to the dependent constraint condition of the first initial instruction, 其中,该新进指令所包括的每一链接标记皆是用以表示该新进指令与多个先前尚未执行的新进指令之间的先后顺序的链接关系。Wherein, each link tag included in the new instruction is used to represent the sequential link relationship between the new instruction and a plurality of previously unexecuted new instructions. 2.根据权利要求1所述的方法,还包括:2. The method of claim 1, further comprising: 依据每一相依限制条件,使新进指令链接于至少一相依链接的末端,或在该新进指令不符任一相依限制条件时,将该新进指令设定为新建链接的起始端,而该新进指令亦同时为该新建链接的末端。linking the incoming instruction at the end of at least one dependent link according to each dependency constraint, or setting the incoming instruction as the start of a newly created link if the incoming instruction does not meet any of the dependency constraints, and the incoming instruction The incoming command is also the end of the newly created link. 3.根据权利要求1所述的方法,其中该些指令各自至少包含一末端标记,用以代表每一指令是否为所属相依链接的末端。3. The method according to claim 1, wherein each of the instructions includes at least one end flag, which is used to represent whether each instruction is the end of the dependent link to which it belongs. 4.根据权利要求1所述的方法,其中当该链接标记显示第一起始指令与其它指令皆无链接关系时,该第一起始指令则是至少一相依链接的起始端。4. The method as claimed in claim 1, wherein when the link mark shows that the first start command has no link relationship with other commands, the first start command is the start end of at least one dependent link. 5.根据权利要求3所述的方法,其中该第一起始指令至少包含一第一链接标记,用以指出该第一起始指令链接在该至少一新的起始指令之前,或该至少一新的起始指令至少包含一第二链接标记,用以指出该至少一新的起始指令链接在该第一起始指令之后。5. The method according to claim 3 , wherein the first start instruction includes at least a first link flag to indicate that the first start instruction is linked before the at least one new start instruction, or that the at least one new start instruction The initial instruction includes at least a second link flag, which is used to indicate that the at least one new initial instruction is linked after the first initial instruction. 6.根据权利要求1所述的方法,其中该些指令各自至少包含一优先级标记,用以代表每一指令在所属的任一相依链接中的该先后顺序。6. The method according to claim 1, wherein each of the instructions includes at least one priority flag, which is used to represent the sequence of each instruction in any dependent link to which it belongs. 7.根据权利要求5所述的方法,其中依据该新进指令N个链接标记的相依限制条件产生N个相依链接,包括:7. The method according to claim 5, wherein generating N dependent links according to the dependent restriction conditions of the N link tags of the new instruction, comprising: 寻找第一起始指令,其中该第一起始指令所包含的第一末端标记表示该第一起始指令位于第一相依链接的末端;Finding a first start instruction, wherein the first end mark included in the first start instruction indicates that the first start instruction is located at the end of the first dependent link; 将对应于该第一相依链接的新进指令链接至该第一起始指令之后;linking an incoming instruction corresponding to the first dependent link after the first initiating instruction; 设定该新进指令的标记为该第一相依链接的末端。Set the tag of the incoming instruction to be the end of the first dependent link. 8.根据权利要求7所述的方法,其中当该第一链接标记或该第二链接标记表示该第一起始指令为该第一相依链接的起始指令时,执行该第一起始指令。8. The method as claimed in claim 7, wherein the first initiating instruction is executed when the first linking flag or the second linking flag indicates that the first initiating instruction is the initiating instruction of the first dependent link. 9.根据权利要求7所述的方法,还包括:9. The method of claim 7, further comprising: 寻找表示该第一起始指令为该第一相依链接的起始指令的起始标记。Find a start tag indicating that the first start instruction is the start instruction of the first dependent link. 10.根据权利要求7所述的方法,从该些尚未执行的新进指令中找出该N个相依链接起始端的M个起始指令,并挑选出其中之一予以执行,包括:10. The method according to claim 7, finding the M initial instructions of the N dependent link origins from the unexecuted new incoming instructions, and selecting one of them to execute, including: 判读多个相依链接所包含的多个链接标记;以及interpreting a plurality of link tokens contained in a plurality of dependent links; and 根据该些链接标记判断该第一起始指令是否执行;judging whether the first initial instruction is executed according to the link marks; 其中,该些链接标记是用以表示该第一起始指令是否为该些相依链接的起始指令,且该些相依链接包括该第一相依链接。Wherein, the link flags are used to indicate whether the first initial command is the initial command of the dependent links, and the dependent links include the first dependent link. 11.根据权利要求10所述的方法,其中若该些链接标记均表示该第一起始指令为该第一相依链接的起始指令,则执行该第一起始指令。11. The method according to claim 10, wherein if the link flags all indicate that the first initial instruction is an initial instruction of the first dependent link, then the first initial instruction is executed. 12.根据权利要求10所述的方法,其中若该些链接标记多数表示该第一起始指令为该第一相依链接的起始指令,则执行该第一起始指令。12. The method according to claim 10, wherein if a majority of the link flags indicate that the first initial instruction is an initial instruction of the first dependent link, then the first initial instruction is executed. 13.根据权利要求1所述的方法,其中该相依限制条件包括线程识别码、存储器页码以及数据危障等至少其中之一。13. The method according to claim 1, wherein the dependency constraint condition comprises at least one of a thread ID, a memory page number, and a data failure. 14.根据权利要求1所述的方法,其中该总线系统依据该先后顺序对该些指令进行存储器调度以及进行除错追踪等至少其中之一。14. The method according to claim 1, wherein the bus system performs at least one of memory scheduling and debugging and tracking for the instructions according to the sequence. 15.根据权利要求1所述的方法,应用于非依序执行的总线系统。15. The method according to claim 1, applied to a non-sequentially executed bus system. 16.一种总线系统,包括:16. A bus system comprising: 指令暂存器,接收并暂存新进指令,其中该新进指令至少包括一链接标记;an instruction register for receiving and temporarily storing a new incoming instruction, wherein the incoming instruction at least includes a link mark; 相依链接产生器,耦接至该指令暂存器,依据该新进指令N个链接标记的相依限制条件产生N个相依链接,且N为任意正整数;A dependent link generator, coupled to the instruction register, generates N dependent links according to the dependency constraints of the N link flags of the new instruction, and N is any positive integer; 指令选择器,耦接至该指令暂存器,用以从尚未执行的新进指令中找出该N个相依链接起始端的M个起始指令,并挑选出其中之一予以执行,其中该M个起始指令皆至少包括一链接标记表示该M个起始指令已可执行,且M为小于等于N的正整数;以及An instruction selector, coupled to the instruction register, is used to find out the M initial instructions at the start ends of the N dependent links from the unexecuted new instructions, and select one of them to execute, wherein the Each of the M initial instructions includes at least one link flag indicating that the M initial instructions are executable, and M is a positive integer less than or equal to N; and 链接关系移除器,耦接至该指令暂存器以及该指令选择器,用以移除该指令选择器所执行的第一起始指令,并依据该第一起始指令的相依限制条件递补至少一新的起始指令,A link relationship remover, coupled to the instruction register and the instruction selector, is used to remove the first initial instruction executed by the instruction selector, and supplement at least one new start command, 其中,该新进指令所包括的每一链接标记皆是用以表示该新进指令与多个先前尚未执行的新进指令之间的先后顺序的链接关系。Wherein, each link tag included in the new instruction is used to represent the sequential link relationship between the new instruction and a plurality of previously unexecuted new instructions. 17.根据权利要求16所述的总线系统,其中该相依链接产生器还依据该新进指令所包括的N个末端标记来表示该新进指令为该N个相依链接的末端指令。17. The bus system according to claim 16, wherein the dependent link generator further indicates that the incoming instruction is an end instruction of the N dependent links according to the N end tags included in the incoming instruction. 18.根据权利要求16所述的总线系统,是非依序执行的总线系统。18. The bus system according to claim 16, being a non-sequential execution bus system.
CN 200810174827 2008-11-05 2008-11-05 Bus system and its method of operation Active CN101739370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810174827 CN101739370B (en) 2008-11-05 2008-11-05 Bus system and its method of operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810174827 CN101739370B (en) 2008-11-05 2008-11-05 Bus system and its method of operation

Publications (2)

Publication Number Publication Date
CN101739370A CN101739370A (en) 2010-06-16
CN101739370B true CN101739370B (en) 2013-04-24

Family

ID=42462873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810174827 Active CN101739370B (en) 2008-11-05 2008-11-05 Bus system and its method of operation

Country Status (1)

Country Link
CN (1) CN101739370B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725245B (en) * 2017-10-30 2021-10-08 瑞昱半导体股份有限公司 Integrated circuit testing device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7320100B2 (en) * 2003-05-20 2008-01-15 Cray Inc. Apparatus and method for memory with bit swapping on the fly and testing

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7320100B2 (en) * 2003-05-20 2008-01-15 Cray Inc. Apparatus and method for memory with bit swapping on the fly and testing

Also Published As

Publication number Publication date
CN101739370A (en) 2010-06-16

Similar Documents

Publication Publication Date Title
US10552163B2 (en) Method and apparatus for efficient scheduling for asymmetrical execution units
CN100538736C (en) Method and apparatus for storing and restoring state context in a graphics processing unit
CN100435172C (en) Method for processing multiple programs by interruptible graphics processing unit and graphics processing unit
US8578216B2 (en) Execution history tracing method
CN111611120B (en) On-chip multi-core processor Cache consistency protocol verification method, system and medium
US8856706B2 (en) System and method for metastability verification of circuits of an integrated circuit
TWI294573B (en) Apparatus and method for controlling establishing command order in an out of order dma command queue, and computer readable medium recording with related instructions
US20140281409A1 (en) Method and apparatus for nearest potential store tagging
US11868780B2 (en) Central processor-coprocessor synchronization
CN101281460B (en) Method and system for procesing multi threads
CN110888727A (en) Method, device and storage medium for realizing concurrent lock-free queue
CN102103482B (en) Adaptive optimized compare-exchange operation
TW200910096A (en) Reordering data responses
WO2023093334A1 (en) System for executing atomic operation, and atomic operation method and apparatus
TWI385529B (en) Bus system and operation method thereof
CN101739370B (en) Bus system and its method of operation
CN117806706B (en) Storage order violation processing method, storage order violation processing device, electronic equipment and medium
CN116841614A (en) Sequential vector scheduling method under disordered access mechanism
CN105068877B (en) Data consistency transmission method between a kind of multipriority task
CN105242905B (en) The treating method and apparatus that data false appearance is closed
CN112685191B (en) Message processing method and device
CN120029674A (en) A GPGPU instruction pre-analysis out-of-order scheduling method, system, device, and medium
CN106777503A (en) Higher synthesis optimization method based on code conversion
CN119512626A (en) Command processing method, controller and computer system
CN118363916A (en) Computing cluster message processing method, device and electronic device based on instruction set

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant