Access control method and apparatus, router and chip
Patent Information
- Application Number
- CN202611227218.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-13
AI Technical Summary
由于已停用功能模块无法对访问请求做出任何响应,这些访问请求会持续占用总线资源,访问请求的发送端也会因收不到响应而持续等待,最终触发超时异常甚至导致系统陷入异常等待状态,严重威胁系统的稳定性和可靠性
[0026]本申请实施例提供了一种访问控制方法,通过将访问控制决策权从中央控制单元下沉至片上网络中的各个路由器节点,由各路由器在本地独立维护其所连接功能模块的控制信息,当接收到发往目标功能模块的访问请求时,由接收到该请求的路由器自行查询本地信息并判断目标功能模块是否满足预设停用条件,消除了对单一中央控制单元的依赖,避免了因中央控制单元故障导致整个系统访问管理瘫痪的风险。同时,在判定目标功能模块满足预设停用条件时,路由器直接向发送端返回预设响应以终结当前事务,使发送端无需持续等待即可释放当前事务占用的资源,并将目标功能模块置为停用状态。该方法使得发往已停用功能模块的访问请求能够在路由器本地获得即时处理,访问请求的发送端无需因等待目标模块响应而持续占用总线资源或触发超时异常,有效避免了系统陷入异常等待状态,提高了系统的稳定性和可靠性。
Smart Images

Figure CN122909109A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an access control method, device, router and chip. Background Technology
[0002] In chip design, the scale of on-chip networks is becoming increasingly large, involving more and more functional modules. During chip manufacturing, some functional modules may have physical defects; in addition, under different operating scenarios, some non-core functional modules may not require power-on operation. Therefore, it is necessary to manage the status and control access of these functional modules to ensure that the system can still function normally when functional modules are unavailable.
[0003] Currently, a centralized control scheme is typically adopted, which involves setting up a central control unit in the chip. This central control unit records the status information of whether each functional module is available and makes unified decisions on access requests for all functional modules.
[0004] However, the central control unit needs to handle access requests for all functional modules, including a large number of requests sent to deactivated functional modules. Since deactivated functional modules cannot respond to access requests, these requests continuously occupy bus resources, and the sending end of the access request will continue to wait due to the lack of response, eventually triggering timeout exceptions or even causing the system to fall into an abnormal waiting state, seriously threatening the stability and reliability of the system. Summary of the Invention
[0005] This application provides an access control method, apparatus, router, and chip, enabling access requests to disabled functional modules to be processed immediately on the router, effectively preventing the system from falling into an abnormal waiting state and improving system stability and reliability. The technical solution is as follows: On the one hand, an access control method is provided, applied to a network-on-a-chip (NAT), wherein the NAT comprises multiple routers, each router being connected to at least one functional module, and the method is executed independently by each router, including: When any router receives an access request destined for a target functional module, it obtains module control information, which is used to indicate whether the target functional module connected to the router meets the preset shutdown conditions. When the module control information indicates that the target functional module meets the preset deactivation conditions, a preset response is returned to the sending end of the access request. The preset response is used to terminate the transaction corresponding to the access request. Set the target functional module to a disabled state.
[0006] In some embodiments, setting the target functional module to a disabled state includes at least one of the following: Disconnect the clock signal input of the target functional module; Disconnect the power supply input to the target functional module.
[0007] In some embodiments, the preset deactivation conditions include at least one of the following: The target functional module has a physical unavailability defect; The target functional module is configured to be disabled based on the system's operating scenario.
[0008] In some embodiments, if the access request is a read request, the preset response includes preset return data; if the access request is a write request, the preset response includes a write operation completion identifier.
[0009] In some embodiments, the method further includes: If the module control information indicates that the target functional module does not meet the preset shutdown conditions, in response to the router receiving an access request destined for the target functional module, the access request is forwarded to the target functional module; Receive the target response returned by the target function module and forward the target response to the sender of the access request.
[0010] In some embodiments, the router stores a disabled module identifier table, which records whether each functional module connected to the router is in a disabled state. The method further includes: Receive an externally issued module status update command, and update the disabled module identifier table according to the module status update command. The acquired module control information includes: The module control information of the target functional module is obtained by querying the deactivated module identifier table.
[0011] In some embodiments, the method further includes: If the target functional module is in a disabled state, intercept the abnormal signals sent by the target functional module to the router.
[0012] In some embodiments, the connection relationships between each router and each functional module, as well as the configuration logic of the module control information corresponding to each router, are determined based on the configuration file. The configuration file is parsed by a script tool, and hardware description language code is automatically generated based on the parsing results. The hardware description language code is used to implement the functions of the router.
[0013] On the other hand, an access control device is provided, deployed on a network-on-a-chip (NIC), the NIC comprising multiple routers, each router being connected to at least one functional module, the device being deployed in each router, comprising: The acquisition module is used to acquire module control information when any router receives an access request destined for a target functional module. The module control information is used to indicate whether the target functional module connected to the router meets the preset deactivation conditions. The sending module is used to return a preset response to the sending end of the access request when the module control information indicates that the target functional module meets the preset deactivation conditions. The preset response is used to terminate the transaction corresponding to the access request. The processing module is used to disable the target functional module.
[0014] In some embodiments, the processing module is configured to perform at least one of the following: Disconnect the clock signal input of the target functional module; Disconnect the power supply input to the target functional module.
[0015] In some embodiments, the preset deactivation conditions include at least one of the following: The target functional module has a physical unavailability defect; The target functional module is configured to be disabled based on the system's operating scenario.
[0016] In some embodiments, if the access request is a read request, the preset response includes preset return data; if the access request is a write request, the preset response includes a write operation completion identifier.
[0017] In some embodiments, the sending module is further configured to, in response to the router receiving an access request destined for the target functional module, forward the access request to the target functional module when the module control information indicates that the target functional module has not met the preset deactivation conditions; receive the target response returned by the target functional module and forward the target response to the sending end of the access request.
[0018] In some embodiments, the router stores a disabled module identifier table, which records whether each functional module connected to the router is in a disabled state. The device further includes: The update module is used to receive module status update instructions from external sources and update the disabled module identifier table according to the module status update instructions. The acquisition module is used to query the deactivated module identifier table to obtain the module control information of the target functional module.
[0019] In some embodiments, the apparatus further includes: The interception module is used to intercept abnormal signals sent by the target functional module to the router when the target functional module is in a disabled state.
[0020] In some embodiments, the connection relationships between each router and each functional module, as well as the configuration logic of the module control information corresponding to each router, are determined based on the configuration file. The configuration file is parsed by a script tool, and hardware description language code is automatically generated based on the parsing results. The hardware description language code is used to implement the functions of the router.
[0021] On the other hand, a router is provided, which includes the access control device described in any of the above-described device embodiments, the access control device being used to implement the access control method in the embodiments of this application.
[0022] On the other hand, a chip is provided, characterized in that an on-chip network is integrated on the chip, the on-chip network including a router, the router being used to implement the access control method in the embodiments of this application.
[0023] On the other hand, a computer device is provided, the computer device including a processor, a memory and an on-chip network router, the memory being used to store at least one computer program, the at least one computer program being loaded and executed by the processor to configure the on-chip network router to perform the access control method in the embodiments of this application.
[0024] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, the at least one computer program being loaded and executed by a processor to implement the access control method as described in the embodiments of this application.
[0025] On the other hand, a computer program product is provided, including computer program code stored in a computer-readable storage medium, wherein a processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, causing the computer device to perform the access control methods provided in the above-described aspects or various alternative implementations of the above-described aspects.
[0026] This application provides an access control method that decentralizes access control decision-making power from a central control unit to individual router nodes in an on-chip network. Each router independently maintains the control information of its connected functional modules locally. When an access request to a target functional module is received, the receiving router queries its local information and determines whether the target functional module meets preset deactivation conditions. This eliminates dependence on a single central control unit and avoids the risk of the entire system's access management being paralyzed due to a failure of the central control unit. Simultaneously, when the target functional module is determined to meet the preset deactivation conditions, the router directly returns a preset response to the sending end to terminate the current transaction. This allows the sending end to release the resources occupied by the current transaction without continuous waiting and sets the target functional module to a deactivated state. This method enables access requests to deactivated functional modules to be processed instantly locally on the router. The sending end of the access request does not need to continuously occupy bus resources or trigger timeout exceptions while waiting for a response from the target module, effectively preventing the system from falling into an abnormal waiting state and improving the system's stability and reliability. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a schematic diagram of the implementation environment of an access control method provided according to an embodiment of this application; Figure 2 This is a flowchart of an access control method provided according to an embodiment of this application; Figure 3 This is a flowchart of another access control method provided according to an embodiment of this application; Figure 4 This is a flowchart of another access control method provided according to an embodiment of this application; Figure 5 This is a block diagram of an access control device provided according to an embodiment of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0030] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor are there any restrictions on quantity or execution order.
[0031] In this application, the term "at least one" means one or more, and "multiple" means two or more.
[0032] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the status, access requests, responses, etc. of the various functional modules involved in this application are all obtained under full authorization.
[0033] The access control method provided in this application can be executed by a router in an on-chip network. The implementation environment of the access control method provided in this application is described below. Figure 1 This is a schematic diagram illustrating the implementation environment of an access control method according to an embodiment of this application. See also... Figure 1 The implementation environment includes a router 101 and multiple functional modules 102 in an on-chip network. The router 101 and the functional modules 102 are directly or indirectly connected through on-chip interconnects within the chip, which is not limited herein.
[0034] In some embodiments, router 101 is an independent hardware switching module, or it can be a mesh, ring, tree, or irregular topology structure composed of multiple routers. It can also be a distributed routing node integrated on a chip, providing basic on-chip communication services such as packet routing, traffic arbitration, and congestion control. Each router 101 contains multiple ports, which are connected to local functional modules or other routers. Each router 101 receives access requests from upstream modules, determines the output port based on the target address information carried in the access request, and terminates the transaction corresponding to the access request locally when the target functional module meets preset deactivation conditions, using the access control method provided in this application embodiment, thereby optimizing access processing efficiency and system stability in abnormal scenarios.
[0035] Those skilled in the art will understand that the number of routers described above can be more or less. For example, the router cluster described above may include only two routers, or it may include dozens, hundreds, or even more routers. This application does not limit the number of routers, the connection method, the topology type, or the type of functional modules connected.
[0036] In some embodiments, functional module 102 includes, but is not limited to, at least one of the following: a processor core, an input / output interface, a dynamic random access memory (DRAM) controller, a static random access memory (SRAM) controller, a cache, a hardware accelerator, or a custom functional unit. Each functional module is connected to the on-chip network through its respective router 101 to enable the transmission of data packets, request packets, response packets, or listening packets between them.
[0037] The chip integrating router 101 and functional module 102 can be installed in a computer device, including but not limited to desktop computers, laptops, servers, smartphones, in-vehicle computing platforms, cloud computing servers, network switching equipment, or IoT terminal devices. When the chip operates as a core component of the computer device, the access control method provided in this application embodiment is executed in the on-chip network router inside the chip.
[0038] Figure 2 This is a flowchart of an access control method provided according to an embodiment of this application. See also... Figure 2 In this embodiment, the method is described using a router in a chip network as an example. The access control method includes the following steps: 201. When any router receives an access request destined for a target functional module, the router obtains module control information. The module control information is used to indicate whether the target functional module connected to the router meets the preset deactivation conditions.
[0039] In this embodiment, the on-chip network includes multiple routers, each connected to at least one functional module. Access control is executed independently by each router. The target functional module refers to the functional module accessed by the current access request. Module control information is identification information stored locally by the router to indicate whether each connected functional module meets preset deactivation conditions. Preset deactivation conditions refer to the conditions that a functional module should meet when it is deemed not to continue providing services due to physical defects or operational requirements. When an access request arrives, the router queries the module control information corresponding to the target functional module locally based on the target address carried in the request to determine whether the module is currently in a state that should be deactivated. This query and determination process is completed locally by the router, without needing to consult any central control unit or wait for a unified decision.
[0040] 202. When the module control information indicates that the target functional module meets the preset deactivation conditions, the router returns a preset response to the sender of the access request. The preset response is used to terminate the transaction corresponding to the access request.
[0041] In this embodiment, the preset response is a response data packet generated locally by the router, which serves to respond to the access request on behalf of the target functional module. When the target functional module meets the preset deactivation condition, the module is actually unable to process the access request normally. If the router does not intervene in such requests, the sending end will continue to wait due to not receiving any response, eventually triggering a timeout exception or even causing the system to hang. Therefore, after determining that the target functional module meets the preset deactivation condition, the router actively terminates the transaction corresponding to the access request at the protocol level—that is, it constructs and returns a preset response locally, so that the sending end can know in a timely manner that the transaction has been completed without having to wait continuously or trigger a timeout exception, thereby ensuring the stability and reliability of the system. This process is directly executed by the router hardware logic and does not involve actual access to the target functional module.
[0042] 203. The router disables the target function module.
[0043] In this embodiment, when the router determines that the target functional module meets the preset shutdown conditions, in addition to performing transaction termination processing on the current access request, it also triggers the operation of setting the target functional module to a disabled state. Setting it to a disabled state means causing the target functional module to stop participating in the normal operation of the chip, specifically including preventing the module from responding to external access requests and stopping receiving new work tasks. After setting the target functional module to a disabled state, the module will no longer receive or process any access requests, thereby achieving isolation of the module at the physical or logical level. The above three steps together constitute a complete access control process: first, it determines whether the target functional module meets the shutdown conditions through local query; if it does, it performs transaction termination processing on the current request to ensure that the system does not hang, and sets the module to a disabled state to achieve complete isolation. Throughout the process, the judgment, response, and shutdown operations are all completed independently by the router that receives the request, without relying on any central control unit.
[0044] This application provides an access control method that decentralizes access control decision-making power from a central control unit to individual router nodes in an on-chip network. Each router independently maintains the control information of its connected functional modules locally. When an access request to a target functional module is received, the receiving router queries its local information and determines whether the target functional module meets preset deactivation conditions. This eliminates dependence on a single central control unit and avoids the risk of the entire system's access management being paralyzed due to a failure of the central control unit. Simultaneously, when the target functional module is determined to meet the preset deactivation conditions, the router directly returns a preset response to the sending end to terminate the current transaction. This allows the sending end to release the resources occupied by the current transaction without continuous waiting and sets the target functional module to a deactivated state. This method enables access requests to deactivated functional modules to be processed instantly locally on the router. The sending end of the access request does not need to continuously occupy bus resources or trigger timeout exceptions while waiting for a response from the target module, effectively preventing the system from falling into an abnormal waiting state and significantly improving the system's stability and reliability.
[0045] The above is a brief introduction to the access control method proposed in this application. To make the access control method clearer, a detailed description of the method follows. Figure 3 This is a flowchart of another access control method provided according to an embodiment of this application, see [link / reference]. Figure 3 In this embodiment, the method is described using a router in an on-chip network as an example. The access control method includes the following steps: 301. When any router receives an access request destined for a target functional module, the router obtains module control information. The module control information is used to indicate whether the target functional module connected to the router meets the preset deactivation conditions.
[0046] In this embodiment, when any router in the on-chip network receives an access request from its upstream module (such as a processor core or other router), the router first parses the request and extracts the target address information carried in the request. The router internally maintains address decoding logic, which can determine the functional module to be accessed by the request—that is, the target functional module—based on the target address information. After determining the target functional module, the router needs to know the current state of the module in order to decide how to process the access request. To this end, the router obtains locally stored module control information, which records whether each functional module directly connected to the router meets preset shutdown conditions. Preset shutdown conditions refer to the criteria for determining whether a functional module should be shut down due to physical defects or system operating requirements. By querying this information, the router can determine whether the currently accessed target functional module is in a state that should be shut down.
[0047] In this embodiment, the router's processing of access requests is distributed—each router in the on-chip network independently executes the aforementioned judgment and processing procedures, without any dependency on each other or on the unified decision-making of any central control unit. Each router only needs to focus on the status information of the functional modules directly connected to it, without needing to be aware of the status of modules managed by other routers. This distributed architecture eliminates the single point of failure risk caused by a single control node; when one router fails, other routers can still operate normally independently. The module control information maintained by each router collectively constitutes a distributed view of the status of all chip functional modules. A change in the status of any module only affects the local decision-making of its respective router and will not trigger a global control storm.
[0048] In some embodiments, preset deactivation conditions can be flexibly configured according to the actual application scenario of the chip. Specifically, preset deactivation conditions include at least one of the following: the target functional module has a physical unavailability defect; the target functional module is configured to be in a deactivated state according to the system operating scenario. Here, a physical unavailability defect refers to permanent damage to a functional module caused by process deviations, material defects, or process fluctuations during chip manufacturing. Such defects are usually detected and marked during the chip's factory testing phase. Configuring the system operating scenario to be in a deactivated state means that under specific operating scenarios (such as low-power mode, specific workload mode, etc.), the operating system, firmware, or system management unit actively configures certain non-core functional modules to be in a deactivated state based on current power consumption or functional requirements. That is, the triggering sources of preset deactivation conditions include both hardware defects generated during the manufacturing stage and deactivation decisions dynamically configured according to system requirements during the operating stage; both can trigger subsequent access control processes in this application. Furthermore, for functional modules marked as having physical unavailability defects, access interception and deactivation operations can be controlled by configuring the enable state of specific ports in the register (such as the port_harvest_enable register bit), thereby achieving flexible policy configuration.
[0049] Routers require an internal data structure to store the deactivation status information of various functional modules, enabling rapid lookup upon receiving an access request. In some embodiments, the router stores a deactivation module identifier table. This table records whether each functional module connected to the router is in a deactivation state. Specifically, the deactivation module identifier table can be implemented as a look-up table (LUT), where each entry corresponds to a functional module, and the entry value indicates whether the module is currently deactivated. For example, an entry value of "1" indicates that the corresponding functional module is deactivated, while an entry value of "0" indicates that the corresponding functional module is in a normal state. When the router receives an access request and identifies the target functional module, it directly queries the entry in the deactivation module identifier table corresponding to the target functional module to obtain the module control information. This query process is completed locally on the router, without sending query requests to any external units, thus resulting in extremely low query latency. Furthermore, the contents of the deactivation module identifier table are dynamically updatable—the router also receives externally issued module status update commands and updates the corresponding functional module entry values in the deactivation module identifier table accordingly. The update command can come from the system management unit, the operating system kernel, or a dedicated configuration module, thereby enabling dynamic management and real-time adjustment of the disabled state of functional modules.
[0050] In some embodiments, module control information can be uniformly distributed to each router by the firmware or system management unit during the chip power-on initialization phase, or it can be dynamically updated according to actual needs during chip operation. Specifically, when the system detects a physical defect in a functional module, or when a non-core module needs to be shut down according to the current working scenario, the system management unit generates a module status update instruction and sends the instruction to the corresponding router via the on-chip network. After receiving the instruction, the router updates the value of the corresponding entry in the locally stored disabled module identifier table, so that subsequent access requests to the functional module can be correctly processed based on the updated module control information. The dynamic update mechanism of module control information enables the access control method provided in this application embodiment to flexibly adapt to various changes during chip operation—for example, when the system switches from high-performance mode to low-power mode, multiple non-core functional modules can be dynamically configured to be disabled, and each managing router updates its local module control information separately, without the need for the central control unit to adjudicate access requests for each module individually. Furthermore, module control information can be updated incrementally—that is, only the status information of the modules that have changed is sent, instead of resending the status information of all modules with each update. This reduces the control message traffic in the on-chip network and lowers the communication overhead between the system management unit and each router. When a router receives an incremental update command, it only needs to modify the value of the corresponding entry in the disabled module identifier table, while the remaining entries remain unchanged. This incremental update mechanism is particularly important in large-scale on-chip network systems—when the chip contains dozens or even hundreds of functional modules, a full update will generate a large number of control messages, consuming valuable network bandwidth resources, while incremental updates can effectively avoid this problem.
[0051] 302. When the module control information indicates that the target functional module meets the preset deactivation conditions, the router returns a preset response to the sender of the access request. The preset response is used to terminate the transaction corresponding to the access request.
[0052] In this embodiment, when the router queries the module control information of the target functional module and determines that the information indicates that the target functional module meets the preset shutdown conditions, it means that the target functional module is currently in a state where it cannot process access requests normally (it may have been marked as disabled due to physical defects, or it may have been actively configured to be disabled due to system operating requirements). In this case, the router no longer forwards the access request to the target functional module, but instead generates a preset response directly within the router and returns the preset response to the sender of the access request. This preset response is used to terminate the transaction corresponding to the current access request at the bus protocol level—that is, to let the bus controller of the sender know that the transaction has been completed at the protocol level, thereby releasing the bus resources occupied by the current transaction and the waiting state of the sender. After receiving the preset response, the sender considers that the access operation has been completed and will not continue to occupy bus resources or trigger timeout exceptions due to waiting for the target module's response. This process is directly executed by the router's hardware logic without software intervention, so the response speed is extremely fast, and the transaction termination operation can be completed within nanoseconds.
[0053] It's important to clarify that the pre-set response doesn't "deceive" the sender; rather, it provides a deterministic transaction termination mechanism at the protocol level—its purpose is to prevent the system from crashing due to the target module's lack of response. From a system perspective, the sender of the access request (such as the processor core or DMA (Direct Memory Access) controller) expects a definite response within a finite time, not an indefinite wait for a response that will never arrive. When the target functional module is disabled, it can no longer provide meaningful response data. In this case, the router returns a protocol-level acknowledgment response on its behalf. This is essentially a reasonable trade-off between "system availability" and "data validity"—it's better to terminate the transaction with a pre-set response than to let the entire system crash due to waiting, allowing the system to continue operating. From a data security perspective, the pre-set response is only used to terminate control-type access request transactions (such as reading device IDs, querying status registers, etc.), not to provide user service data—real user data is transmitted through a separate data path (such as DMA) and does not pass through this access request / response path. Therefore, the pre-set response mechanism will not lead to errors or loss of user data. From the perspective of access accuracy, when the sending end receives preset responses continuously, its software driver layer will determine that the target module is unavailable according to the protocol specification and actively stop subsequent access, rather than continuously sending requests.
[0054] In some embodiments, the generation of a preset response is accomplished by a preset response generation circuit within the router. This circuit is independent of the router's data forwarding path. Upon receiving an access request, it selects the corresponding response template from a preset response template library based on the transaction type of the request (read request or write request) and constructs a complete preset response data packet within the router's internal hardware logic. This process is entirely executed by hardware logic without software intervention, thus enabling the generation and transmission of the preset response within nanoseconds, minimizing the waiting time at the sending end. The preset response template library can be predefined through parameterized configuration during the chip design phase or loaded by firmware during power-on initialization. The preset response template library contains different preset response templates for read and write requests—the response template for read requests includes a preset return data field, and the response template for write requests includes a write operation completion identifier field—allowing the router to quickly match and generate a preset response corresponding to the request type when constructing the preset response.
[0055] The specific content of the preset response can differ depending on the type of access request. In some embodiments, if the access request is a read request, the preset response includes preset return data; if the access request is a write request, the preset response includes a write operation completion flag. Specifically, the goal of a read request is to read data from a target functional module. Therefore, if the target module is disabled, the router cannot obtain truly valid read data. In this case, the preset response generated by the router includes preset return data—this preset return data can be all zeros, all ones, or other preset fixed values. Its purpose is to make the bus transaction corresponding to the read request appear as a complete data return operation at the protocol level, preventing the sender from entering an abnormal waiting state due to not receiving data. For a write request, the goal is to write data to a target functional module. If the target module is disabled, the router cannot actually write data to that module. In this case, the preset response generated by the router includes a write operation completion flag—this flag is used to simulate a protocol signal that the write operation has been successfully completed, making the bus transaction corresponding to the write request appear as a successfully completed write operation at the protocol level, preventing the sender from continuously waiting or retrying due to not receiving write completion confirmation. In other words, regardless of whether the access request is a read operation or a write operation, the router returns a preset response that matches the operation type, so that the bus controller at the sending end believes that the transaction has been completed normally at the protocol level, thereby releasing the resources occupied by the current transaction and ensuring the stable operation of the system.
[0056] In some embodiments, the preset response has the same protocol format and handshake timing as the response normally returned by the target functional module at the bus protocol level. That is, from the perspective of the sending bus controller, there is no difference at the protocol level between receiving the preset response and receiving the actual response returned by the target functional module—both response states are "transaction completed normally," and both can trigger the sending bus controller to release the resources occupied by the current transaction and enter the processing of the next transaction. This protocol-level compatibility design allows the access control method provided in this application embodiment to be applied to existing bus protocols and processor architectures without modifying the sending bus controller logic, providing excellent compatibility and portability.
[0057] 303. The router disables the target function module.
[0058] In this embodiment, after determining that the target functional module meets the preset shutdown conditions, the router, in addition to performing transaction termination processing (i.e., returning a preset response) on the current access request, also needs to put the target functional module into a disabled state. Putting it into a disabled state means causing the target functional module to stop participating in the normal operation of the chip from the physical or logical layer—specifically, by cutting off the power supply or clock input of the target functional module, the module no longer consumes power, no longer responds to external access requests, and no longer generates any signals. After the target functional module is put into a disabled state, the module will no longer receive or process any access requests, thereby achieving complete isolation of the module at the physical layer. This operation is usually completed by the router in cooperation with the control unit (such as a remote system management unit) corresponding to the target functional module—the router sends a shutdown instruction to the control unit, which then executes the specific physical layer shutdown action.
[0059] The Remote System Management Unit (RSM) is a proxy control unit located between the router and the functional modules. Its connection to both the router and the functional modules is as follows: one end of the RSM is connected to the router's control port via an on-chip interconnect to receive shutdown instructions from the router; the other end is connected to the clock enable and power enable terminals of the target functional module via separate physical hardwires. The RSM acts as a physical layer proxy between the router and the functional modules—after the router issues a shutdown instruction, the RSM performs the specific clock gating and power gating operations. The router and RSM transmit shutdown instruction signals (such as clock shutdown requests and power shutdown requests), while the RSM and the target functional modules transmit physical level signals (such as pulling the clock enable signal low and pulling the power enable signal low). By setting the RSM as an intermediate proxy layer, the router does not need to directly drive the physical control signals of the functional modules, thus reducing the complexity of the router's port design and physical drive requirements.
[0060] In some embodiments, the shutdown indication transmission between the router and the remote system management unit (RSM) employs an independent control channel, separate from the data path, to ensure that the shutdown indication transmission is unaffected by data path congestion. Specifically, the router sends the shutdown indication as a control message to the RSM via its control port. This control message contains the identification information of the target functional module and the type of shutdown operation to be performed (clock only, power only, or both). Upon receiving the control message, the RSM parses the target module identification and shutdown operation type, and performs corresponding clock gating and / or power gating operations on the target functional module. After the shutdown indication transmission is complete, the RSM can return an acknowledgment message to the router, notifying the router that the target functional module has been successfully disabled. The independent control channel design ensures that even in the event of data path congestion or failure, the shutdown indication can still be reliably transmitted to the RSM, thereby guaranteeing the reliable execution of the shutdown operation.
[0061] In some embodiments, setting a target functional module to a disabled state may include at least one of the following: disconnecting the clock signal input of the target functional module; disconnecting the power supply input of the target functional module. Specifically, disconnecting the clock signal input means turning off the clock gating of the target functional module, causing the timing logic circuits inside the module to stop flipping, thereby eliminating dynamic power consumption. Disconnecting the power supply input means turning off the power gating or power switch corresponding to the target functional module, isolating the module from the main power supply network of the chip, thereby eliminating static power consumption (i.e., leakage power consumption). One of the two methods can be chosen—when only the clock signal input is disconnected, the internal state of the module is frozen but not completely powered off, suitable for temporary function suspension; when only the power supply input is disconnected, the module is completely powered off, suitable for permanent module isolation. Both methods can also be used simultaneously—disconnecting both the clock signal and the power supply to achieve maximum power reduction and physical isolation. The specific method used can be dynamically determined by the system based on the reason for disabling the target functional module (whether it is a permanent physical defect or a temporary scenario configuration) and power management requirements. For example, for modules with physical unavailability defects, the clock and power can be cut off simultaneously to achieve permanent isolation; for modules that are temporarily disabled according to the working scenario, only the clock signal input can be cut off to quickly reduce dynamic power consumption, and the clock signal input can be re-enabled when the module needs to resume operation, thereby achieving a balance between power management and functional flexibility.
[0062] In some embodiments, after the remote system management unit (RSU) performs clock gating and / or power gating operations to disable the target functional module, the router can also confirm whether the target functional module has been successfully disabled by querying the RSU's status register. Specifically, the RSU maintains a status register that records the current clock enable and power enable states of each functional module. After sending a shutdown instruction, the router can verify whether the shutdown operation has been successfully executed by reading this status register. If the read status matches the expectation (e.g., the clock enable signal has been pulled low and the power enable signal has been pulled low), the target functional module is confirmed to have been successfully disabled; if the read status does not match the expectation, the router can resend the shutdown instruction or report an anomaly to the RSU. This confirmation mechanism improves the reliability of the shutdown operation and avoids situations where the target functional module is not successfully disabled due to an anomaly in the remote RSU.
[0063] In some embodiments, when the target functional module is in a disabled state, the router can also intercept abnormal signals sent by the target functional module to the router. Specifically, after the target functional module is disabled, especially during the process of its power supply or clock signal being cut off, the module may generate abnormal electrical signals due to level fluctuations, state instability, or other transient effects—such as error interrupt requests, bus occupancy requests, error status reports, etc. These abnormal signals are sent to the router through the physical connection between the target functional module and the router. If the router does not intervene in such signals, these abnormal signals may be received by the router and spread to other functional modules or system management units through the on-chip network, thereby polluting the control bus and causing system-level misjudgments (such as mistakenly believing that a global hardware error has occurred and triggering a system reset). Therefore, when the target functional module is in a disabled state, the router intercepts the abnormal signals it sends—that is, it directly discards these signals at the router port, prohibiting them from entering the router's internal arbitration logic and on-chip network.
[0064] This interception operation can be implemented through the abnormal signal masking registers corresponding to each port within the router. Specifically, the router configures a corresponding abnormal signal masking register for each port connected to a functional module. When a functional module is marked as disabled, the router automatically enables the abnormal signal masking register for the corresponding port. With the abnormal signal masking register enabled, the router discards all abnormal signals received from that port at the port ingress, preventing them from entering the router's internal arbitration logic and on-chip network. The enabling of this abnormal signal masking register is linked to module control information—that is, when the module control information indicates that a functional module meets the preset disable conditions, the corresponding abnormal signal masking register is automatically enabled; when the module control information is updated to indicate that the functional module no longer meets the preset disable conditions, the corresponding abnormal signal masking register is automatically disabled. This linkage mechanism ensures that the interception of abnormal signals remains consistent with the module's disable state, requiring no additional control logic or software intervention, further reducing system management overhead.
[0065] 304. If the module control information indicates that the target function module does not meet the preset shutdown conditions, in response to the router receiving an access request sent to the target function module, the router will forward the access request to the target function module.
[0066] In this embodiment, when the router queries the module control information of the target functional module and determines that the information indicates that the target functional module does not meet the preset shutdown conditions, it means that the target functional module is currently in a normal and available state and can process external access requests normally. In this case, the router forwards the access request to the target functional module through the port between itself and the target functional module according to the standard packet forwarding procedure. Specifically, the router determines the target output port based on the target address information carried in the access request, sends the access request packet to the transmission queue of the output port, and transmits it to the network interface unit (NIU) of the target functional module via the on-chip interconnect. The NIU then submits the request to the internal logic of the target functional module for processing. This forwarding process follows standard routing protocols and flow control mechanisms to ensure that the access request can reach the target functional module according to the predetermined path and priority.
[0067] In some embodiments, the router can perform a validity check on the access request before forwarding it to the target functional module. Specifically, after parsing the target address information carried in the access request, the router, in addition to querying the module control information to determine whether the target functional module meets the preset deactivation conditions, can also check whether the access request has the necessary permissions to access the target functional module—for example, whether the access request originates from an authorized sender, and whether the access type (read / write) of the access request matches the access permission configuration of the target functional module. If the access request passes the validity check and the target functional module does not meet the preset deactivation conditions, the router forwards the access request normally to the target functional module; if the access request fails the validity check, the router refuses to forward the request and returns an error response (such as a SLVERR or DECERR response in the bus protocol) to the sender. This validity check mechanism provides additional protection for chip access security, preventing unauthorized access requests from illegally operating the functional module.
[0068] In some embodiments, when forwarding access requests to the target functional module, the router can also perform flow control and scheduling based on the current network congestion status and the priority of the access requests. Specifically, the router internally maintains multiple output port transmission queues, each with a different priority level. When the router needs to forward an access request to the target functional module, it sends the request to the corresponding priority transmission queue based on the priority information carried by the access request. The router's internal arbitration logic dynamically schedules the access requests in each queue to be sent to the target port sequentially based on the priority of each transmission queue and the current queue depth. This flow control and scheduling mechanism ensures that high-priority access requests (such as requests with high real-time requirements initiated by the processor core) are forwarded first when the network is congested, while low-priority access requests (such as requests initiated by background diagnostic tasks) can be forwarded when the network is idle, thereby improving the overall bandwidth utilization of the on-chip network while ensuring the system's real-time requirements.
[0069] 305. The router receives the target response returned by the target function module and forwards the target response to the sender of the access request.
[0070] In this embodiment, upon receiving an access request, the target functional module performs the corresponding operation based on the request type (read request or write request): for a read request, it reads data from the specified address and generates a response containing that data; for a write request, it writes the data to the specified address and generates a write operation completion response. This response is called the target response—the actual response data generated after the target functional module actually performs the operation. The target response is returned to the router through the port between the target functional module and the router. After receiving the target response, the router forwards it to the sender of the access request, completing a complete end-to-end access request-response transaction. This step ensures that access requests from normal functional modules can complete end-to-end transmission and response according to the standard path, without affecting the normal communication performance of the system.
[0071] In some embodiments, after the target response returned by the target functional module is returned to the router through the port between the target functional module and the router, the router can also perform a correctness check on the target response before forwarding it to the sender of the access request. Specifically, the router checks whether the protocol format of the target response is correct, whether the response status is valid, and whether there are any abnormalities in the data payload. If the target response passes the correctness check, the router forwards it to the sender of the access request; if the target response fails the correctness check (e.g., the response status is an error status, the data payload check fails, etc.), the router can generate an error response (such as the SLVERR response in the bus protocol) to replace the target response and return the error response to the sender to notify the sender that the access operation has not been successfully completed. This correctness check mechanism can promptly feed back error information to the sender when the target functional module returns an abnormal response, avoiding incorrect data processing or status updates by the sender due to receiving an abnormal response.
[0072] In some embodiments, after forwarding the target response to the sender of the access request, the router can also record the completion status information of this access request-response transaction for system-level performance monitoring and fault diagnosis. Specifically, the router maintains a performance monitoring counter that records statistics such as the number of successfully completed access request-response transactions on each port, the number of transactions that timed out, and the number of transactions that were intercepted and terminated. The system management unit can read the values of these performance monitoring counters to understand the access load of each functional module, the frequency of access requests being intercepted for disabled modules, and the overall health status of the on-chip network. This statistical information provides data support for chip power management, load balancing, and fault prediction—for example, when the frequency of access requests being intercepted for a certain functional module suddenly increases, the system management unit can determine that the module may be abnormal and take appropriate measures in a timely manner.
[0073] The steps 301 to 305 described above together constitute the complete flow of the access control method of this application. When an access request arrives at the router, the router first queries the local module control information to determine the status of the target functional module. If the target functional module meets the preset deactivation conditions, steps 302 to 303 are executed, and the router terminates the transaction locally and sets the target module to a deactivated state. If the target functional module does not meet the preset deactivation conditions (i.e., it is in a normal available state), steps 304 to 305 are executed, and the request is forwarded normally to the target functional module and the response is returned to the sending end. Both paths are decided and executed locally by the same router, without relying on the unified decision-making of any central control unit, thereby achieving distributed and highly efficient access control.
[0074] For example, Figure 4 This is a flowchart of another access control method provided according to an embodiment of this application. See also... Figure 4 During the chip design phase, relevant code and register control logic are generated through parameterized configuration. Specifically, this includes configuring the clock and power gating registers in the Remote System Management Unit (RSMU) and configuring the control registers for each output port in the on-chip network router. Based on the firmware distribution control information and register configuration, the router, at runtime, determines whether the target functional module (e.g., an IP core) meets preset deactivation conditions according to the state of the port control registers and the internal state machine. If it is not marked as meeting the deactivation conditions, normal routing is performed to the corresponding functional module; if it has been marked as meeting the deactivation conditions, hierarchical control is executed—at the higher level (network layer), the router implements access interception and false return; at the lower level (physical layer), the RSMU controls the power gating switch and clock gating to cut off the power and clock of the target functional module, thereby achieving complete isolation of the functional module. The flowchart clearly illustrates the core architecture of "distributed decision-making and hierarchical execution" in this application: the router is responsible for the judgment, interception and false return at the access level, and the remote system management unit is responsible for the power and clock shutdown at the physical level. The two work together to complete the complete isolation control process.
[0075] The implementation of the aforementioned access control method relies on pre-configuration during the chip design phase. In some embodiments, the connection relationships between each router and each functional module, as well as the configuration logic of the module control information corresponding to each router, are determined based on configuration files. The configuration files are parsed by script tools, and hardware description language (HDL) code is automatically generated based on the parsing results. This HDL code is used to implement the router's functions. Specifically, during the chip design phase, designers describe the on-chip network topology (including the interconnection relationships between routers and the connection relationships between each router and each functional module) and the preset deactivation condition configuration information of the functional modules managed by each router in the form of structured configuration files (such as JSON, YAML, or Excel spreadsheets). Subsequently, the script tool reads and parses the configuration file, extracts the connection relationships and module control information configuration logic that each router needs to implement, and automatically generates the corresponding HDL code (such as Verilog or VHDL code). After synthesis, placement, and routing, this code can implement the router and its access control functions in the chip. That is, the router's hardware logic is not manually written for a specific chip specification, but is dynamically generated by automated tools based on the configuration file. When chip product specifications change (such as adding or removing functional modules, adjusting connection topology, or changing deactivation policies), only the configuration file needs to be modified and the script tool re-run to automatically generate hardware code adapted to the new specifications, without the need for manual modification of every piece of hardware description language code. This parametric design approach significantly reduces the workload and error probability in the chip design phase, improves the automation level and maintainability of the design process, and facilitates rapid iteration and customized adaptation of chip products.
[0076] The configuration file can be implemented in various formats, such as JSON, YAML, or Excel spreadsheets, and this application embodiment does not limit this. For example, when the configuration file is in Excel spreadsheet format, the Excel table records the configuration information of each functional module (IP core) in the chip by column, with each row corresponding to a functional module and each column recording the attributes of the module in different dimensions. Specifically, the column fields of the table include, but are not limited to: IP-Name (functional module name), used to identify the unique name of the module; Unit ID (unit identifier), used to uniquely identify the module inside the chip; Tile Name (tile name), used to identify the tile area to which the module belongs in the chip's physical layout; Project0, Project1, etc. (project configuration columns), used to record the enabling or disabling configuration of the module in different product projects—for example, "Y" indicates that the module is enabled in the project, and "N" indicates that the module is disabled in the project; Param1 (parameter column), used to record the specific configuration parameters corresponding to the module; and Ports (port column), used to record the port connection information between the module and the router. This table, as part of the design document, is both human-readable and easy for script tools to parse and extract parameters. After reading the table, the script tool can automatically extract the configuration information of each functional module and generate the corresponding hardware description language code and register control logic based on the connection relationships and project configurations recorded in the table.
[0077] This application provides an access control method that decentralizes access control decision-making power from the central control unit to individual router nodes in the on-chip network. Each router independently maintains the control information of its connected functional modules locally, ensuring that the processing of any access request is independently decided and executed locally by the router receiving the request, without relying on the unified decision of any central control unit. This eliminates the risk of the entire chip access management being paralyzed due to the failure of a single control node, effectively improving the chip's reliability and yield. Simultaneously, when the target functional module meets preset deactivation conditions, the router directly returns a preset response locally to terminate the transaction corresponding to the access request. This allows the sending end to obtain immediate confirmation of transaction completion at the protocol level, releasing the bus resources and waiting state currently occupied by the transaction without continuously waiting for a response from the target functional module. This avoids the continuous occupation of bus resources and the sending end triggering timeout exceptions or even falling into an abnormal waiting state due to the target functional module's lack of response, thereby ensuring the stability and reliability of the system and achieving efficient processing of access requests in abnormal scenarios. Furthermore, the above method is executed independently by each router. Each router only needs to focus on the status information of the functional modules directly connected to it. Each router is independent of the others and does not affect them. When one router fails, the other routers can still work normally independently, which further improves the reliability and scalability of the system.
[0078] Figure 5 This is a block diagram of an access control device according to an embodiment of this application. The access control device is deployed on a network-on-a-chip (NAT), which includes multiple routers. Each router is connected to at least one functional module. The access control device is deployed in each router to execute the steps of the access control method described above. See [link to relevant documentation]. Figure 5 The access control device includes: The acquisition module 501 is used to acquire module control information when any router receives an access request sent to the target functional module. The module control information is used to indicate whether the target functional module connected to the router meets the preset deactivation conditions. The sending module 502 is used to return a preset response to the sending end of the access request when the module control information indicates that the target functional module meets the preset deactivation conditions. The preset response is used to terminate the transaction corresponding to the access request. Processing module 503 is used to disable the target function module.
[0079] In some embodiments, the processing module 503 is configured to perform at least one of the following: Disconnect the clock signal input to the target functional module; Disconnect the power supply input to the target functional module.
[0080] In some embodiments, the preset deactivation conditions include at least one of the following: The target functional module has a physical unavailability defect; The target functional module is configured to be disabled based on the system's operating scenario.
[0081] In some embodiments, if the access request is a read request, the default response includes default return data; if the access request is a write request, the default response includes a write operation completion identifier.
[0082] In some embodiments, the sending module 502 is further configured to, in response to the router receiving an access request sent to the target functional module, forward the access request to the target functional module when the module control information indicates that the target functional module has not met the preset shutdown conditions; receive the target response returned by the target functional module and forward the target response to the sending end of the access request.
[0083] In some embodiments, the router stores a disabled module identifier table, which records whether each functional module connected to the router is in a disabled state. The device also includes: The update module receives module status update commands from external sources and updates the disabled module identifier table accordingly. Module 501 is used to query the disabled module identifier table to obtain the module control information of the target functional module.
[0084] In some embodiments, the apparatus further includes: The interception module is used to intercept abnormal signals sent by the target functional module to the router when the target functional module is in a disabled state.
[0085] In some embodiments, the connection relationships between each router and each functional module, as well as the configuration logic of the module control information corresponding to each router, are determined based on the configuration file. The configuration file is parsed by a script tool, and hardware description language code is automatically generated based on the parsing results. The hardware description language code is used to implement the functions of the router.
[0086] This application provides an access control device that decentralizes access control decision-making power from a central control unit to individual router nodes in an on-chip network. Each router independently maintains the control information of its connected functional modules locally. When it receives an access request destined for a target functional module, the receiving router queries its local information and determines whether the target functional module meets preset deactivation conditions. This eliminates dependence on a single central control unit and avoids the risk of the entire system's access management being paralyzed due to a failure of the central control unit. Simultaneously, when the target functional module is determined to meet the preset deactivation conditions, the router directly returns a preset response to the sending end to terminate the current transaction. This allows the sending end to release the resources occupied by the current transaction without continuous waiting and sets the target functional module to a deactivated state. This method enables access requests to deactivated functional modules to be processed instantly locally on the router. The sending end of the access request does not need to continuously occupy bus resources or trigger timeout exceptions while waiting for a response from the target module, effectively preventing the system from falling into an abnormal waiting state and improving the system's stability and reliability.
[0087] It should be noted that the access control device provided in the above embodiments is only illustrated by the division of the above functional modules during the transmission of access requests by the router. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the access control device and the access control method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0088] This application also provides a router, which includes the access control device described in any of the above-described device embodiments. This access control device is used to implement the access control method in this application. Specifically, the router is applied in a Network-on-Chip (NoC) network as the core switching node of the network-on-chip. The router includes multiple ports, each of which can be connected to a local functional module (e.g., a processor core, input / output interface, memory controller, hardware accelerator, etc.) or other adjacent routers. In terms of hardware implementation, the router internally includes hardware modules such as a register set, a disabled module identifier table, a preset response generation circuit, an exception signal masking register, and a crossbar switch. These hardware modules have a clear correspondence with the various functional modules in the above-described device embodiments.
[0089] In the above-described device embodiments, the storage unit is primarily implemented in hardware through a register set and static random-access memory (SRAM). The storage unit stores module control information, which records whether each functional module connected to the router meets preset deactivation conditions. Specifically, the storage unit is implemented as a deactivated module identifier table—this table can be stored in the register set as a look-up table (LUT). Each entry in the table corresponds to a functional module connected to the router, and the value of the entry indicates whether the module is currently deactivated. The storage unit also stores port control registers, each recording the enable / disable information of the corresponding port, used to configure and update the values of each entry in the deactivated module identifier table. The content of the deactivated module identifier table in the storage unit is dynamically updatable—the router receives module status update commands from external sources through the control port and updates the corresponding functional module entry values in the deactivated module identifier table according to these commands, allowing the module control information to be adjusted in real time according to changes in the chip's operating environment. In this way, the storage unit completes the function of "storing module control information, which is used to indicate whether each functional module connected to the router meets the preset shutdown conditions".
[0090] The judgment unit in the above-described device embodiment is primarily implemented in hardware through the router's control logic and comparison circuitry. The judgment unit is triggered when the router receives an access request destined for a target functional module. This unit obtains the target address information, queries the disabled module identifier table in the storage unit, reads the corresponding entry value of the target functional module, and determines whether the module meets the preset disabled conditions. Specifically, the judgment unit includes an address decoding subunit and a status comparison subunit—the address decoding subunit parses the target address in the access request to determine the target functional module to be accessed; the status comparison subunit searches for the corresponding entry value in the disabled module identifier table based on the identifier of the target functional module, compares the entry value with the preset conditions, and outputs a judgment result. This judgment process is completed locally on the router, without sending query requests to any external units, thus exhibiting extremely low query latency. In this way, the judgment unit fulfills the function of "querying the module control information to determine whether the target functional module meets the preset disabled conditions upon receiving an access request destined for the target functional module."
[0091] The preset response generation unit in the above-described device embodiment is mainly implemented in hardware through a preset response generation circuit and a response template register. The preset response generation circuit is independent of the router's data forwarding path and includes a response template selection sub-circuit and a response construction sub-circuit. The response template selection sub-circuit selects the corresponding response template from the response template register based on the transaction type of the access request (read request or write request). The response construction sub-circuit constructs a complete preset response data packet in the router's internal hardware logic based on the selected response template. Specifically, the response template register pre-sets different response templates for read requests and write requests. The response template for read requests includes a preset return data field (such as all-zero data or all-one data), while the response template for write requests includes a write operation completion flag field. This allows the preset response generation unit to quickly match and generate a preset response corresponding to the request type when constructing the preset response. The preset response has the same protocol format and handshake timing as the response normally returned by the target functional module at the bus protocol level, and can trigger the bus controller at the sending end to release the resources occupied by the current transaction. In this way, the preset response generation unit completes the function of "when it is determined that the target functional module meets the preset deactivation condition, returning a preset response to the sending end of the access request, and the preset response is used to terminate the transaction corresponding to the access request".
[0092] The shutdown execution unit in the above-described device embodiment is primarily implemented in hardware through the router's control port output logic and the Remote System Management Unit (RSMU) interface circuit. The shutdown execution unit is triggered after the judgment unit determines that the target functional module meets the preset shutdown conditions. On one hand, it generates a shutdown indication through the control port output logic. This indication includes the target functional module's identification information and the type of shutdown operation to be performed (clock only, power only, or both). On the other hand, it sends the shutdown indication to the remote system management unit corresponding to the target functional module through the remote system management unit interface circuit. The remote system management unit then performs the specific physical layer shutdown operation—cutting off the target functional module's clock signal input and / or power supply input. The remote system management unit is a proxy control unit located between the router and the functional module. One end of it is connected to the router's control port via an on-chip interconnect to receive the shutdown indication sent by the router; the other end is connected to the target functional module's clock enable and power enable terminals via independent physical hardwires. The router transmits shutdown indication signals (control messages) to the remote system management unit (RSM), while the RSM transmits physical level signals (low-pull clock enable signal and low power enable signal) to the target functional module. By setting the RSM as an intermediate proxy layer, the router does not need to directly drive the physical control signals of the functional module, thereby reducing the port design complexity and physical drive requirements of the router. After the RSM performs the shutdown operation, the disable execution unit can also confirm whether the target functional module has been successfully disabled by reading the status register of the RSM. In this way, the disable execution unit completes the function of "disabling the target functional module".
[0093] The abnormal signal interception unit in the above-described device embodiment is primarily implemented in hardware through an abnormal signal masking register and port input logic. The abnormal signal masking register is located at each port of the router connected to a functional module. When the judgment unit determines that a target functional module meets a preset deactivation condition, the abnormal signal interception unit automatically enables the abnormal signal masking register of the port corresponding to that target functional module. With the abnormal signal masking register enabled, the port input logic directly discards all abnormal signals received from that port at the port inlet, preventing them from entering the router's internal arbitration logic and on-chip network. The enabling of this abnormal signal masking register is linked to the entry value of the deactivated module identifier table in the storage unit—when the entry value indicates that a functional module is in a deactivated state, the corresponding abnormal signal masking register is automatically enabled; when the entry value is updated to indicate that the functional module is no longer in a deactivated state, the corresponding abnormal signal masking register is automatically disabled. This linkage mechanism is directly implemented through hardware logic without software intervention, ensuring that the interception of abnormal signals always remains consistent with the deactivated state of the module. In this way, the abnormal signal interception unit completes the function of "intercepting the abnormal signals sent by the target functional module to the router when the target functional module is in a disabled state".
[0094] Through the one-to-one correspondence between the aforementioned hardware modules and the functional modules in the device embodiment, the router provided in this application embodiment can independently complete all operations, including storing and querying module control information, determining preset deactivation conditions, generating and returning preset responses, sending shutdown instructions from the remote system management unit, and locally intercepting abnormal signals, without the intervention of an external processor, using pure hardware logic. The aforementioned hardware modules operate independently and in parallel—after receiving an access request, the judgment unit queries the deactivation module identifier table in the storage unit and outputs the judgment result; the preset response generation unit generates a preset response locally based on the judgment result; the deactivation execution unit simultaneously sends a shutdown instruction to the remote system management unit; and the abnormal signal interception unit continuously monitors the input signals of each port and locally discards abnormal signals according to the deactivation status. The entire control process is executed in parallel in a pipeline manner at the hardware level, without waiting for unified decision-making from the central control unit or software intervention. It can complete the termination processing of access requests and the deactivation triggering of modules within nanoseconds, effectively avoiding system hangs and bus resource waste caused by the unresponsive target functional module, and significantly improving the chip's access processing efficiency and system stability in abnormal module scenarios.
[0095] This application also provides a chip with an integrated on-chip network, including routers, which are used to implement the access control method described in this application. Specifically, the chip may be a multi-core processor chip, a graphics processor chip, an artificial intelligence accelerator chip, a field-programmable gate array chip, a network processor chip, or a system-on-chip (SoC), and this application does not limit this. The chip integrates multiple functional modules (e.g., processor core, dynamic random access memory controller, static random access memory controller, cache, hardware accelerator, input / output interfaces, etc.) and an on-chip network for connecting these functional modules. The on-chip network includes multiple router nodes and physical links connecting these routers. The routers are interconnected via on-chip interconnects to form a mesh, ring, tree, or irregular topology. Each router on the chip is connected to at least one functional module, and each router manages the access control of the connected functional module. The routers are independent of each other, and there is no centralized control node.
[0096] Each router includes the access control device described in the above-described embodiments, and executes the access control method provided in this application embodiment through this device. For any router, when it receives an access request destined for a target functional module, it queries the module control information locally to determine whether the target functional module meets the preset deactivation conditions. If it does, the router generates a preset response locally and returns it to the sending end, simultaneously triggering the target functional module to be deactivated. If the conditions are not met, the access request is forwarded normally to the target functional module. When the chip is powered on, each functional module accesses the on-chip network through its respective router, enabling the transmission of data packets, request packets, response packets, or listening packets between them. Since each router can independently perform access control operations without relying on the unified decision-making of the central control unit, even if one router fails, other routers can still operate normally independently, effectively avoiding the paralysis of the entire chip's access management due to the failure of a single control node. Simultaneously, since the router can perform local termination processing on access requests destined for deactivated functional modules, system hangs due to the target functional module's lack of response is avoided, significantly improving the chip's reliability and yield. By having each router independently maintain the shutdown status information of its connected functional modules, the chip can still ensure that access requests from other normal functional modules are processed in a timely manner even if some functional modules have physical defects or non-core modules are shut down according to scenario requirements. This effectively improves the overall utilization rate of the chip and the stability of the system.
[0097] This application also provides a computer device, which includes a processor, a memory, and an on-chip network router. The memory stores at least one computer program, which is loaded and executed by the processor to configure the on-chip network router to perform the access control method described in this application.
[0098] In the embodiments of this application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the terminal can act as the execution subject to implement the technical solutions provided in the embodiments of this application. When the computer device is configured as a server, the server can act as the execution subject to implement the technical solutions provided in the embodiments of this application. Alternatively, the technical solutions provided in this application can be implemented through the interaction between the terminal and the server. The embodiments of this application do not limit this.
[0099] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor of a computer device to implement the operations performed by the computer device in the access control method of the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, or optical data storage device, etc.
[0100] This application also provides a computer program product, including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the access control methods provided in the various optional implementations described above.
[0101] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0102] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An access control method, characterized in that, Applied to on-chip networks, the on-chip network includes multiple routers, each router being connected to at least one functional module, and the method is executed independently by each router, including: When any router receives an access request destined for a target functional module, it obtains module control information, which is used to indicate whether the target functional module connected to the router meets the preset shutdown conditions. When the module control information indicates that the target functional module meets the preset deactivation conditions, a preset response is returned to the sending end of the access request. The preset response is used to terminate the transaction corresponding to the access request. Set the target functional module to a disabled state.
2. The method according to claim 1, characterized in that, Setting the target functional module to a disabled state includes at least one of the following: Disconnect the clock signal input of the target functional module; Disconnect the power supply input to the target functional module.
3. The method according to claim 1, characterized in that, The preset deactivation conditions include at least one of the following: The target functional module has a physical unavailability defect; The target functional module is configured to be disabled based on the system's operating scenario.
4. The method according to claim 1, characterized in that, If the access request is a read request, the preset response contains preset return data; if the access request is a write request, the preset response contains a write operation completion identifier.
5. The method according to claim 1, characterized in that, The method further includes: If the module control information indicates that the target functional module does not meet the preset shutdown conditions, in response to the router receiving an access request destined for the target functional module, the access request is forwarded to the target functional module; Receive the target response returned by the target function module and forward the target response to the sender of the access request.
6. The method according to claim 1, characterized in that, The router stores a disabled module identifier table, which records whether each functional module connected to the router is in a disabled state. The method further includes: Receive an externally issued module status update command, and update the disabled module identifier table according to the module status update command. The acquired module control information includes: The module control information of the target functional module is obtained by querying the deactivated module identifier table.
7. The method according to claim 1, characterized in that, The method further includes: If the target functional module is in a disabled state, intercept the abnormal signals sent by the target functional module to the router.
8. The method according to claim 1, characterized in that, The connection relationships between each router and each functional module, as well as the configuration logic of the module control information corresponding to each router, are all determined based on the configuration file. The configuration file is parsed by a script tool, and hardware description language code is automatically generated based on the parsing results. The hardware description language code is used to implement the functions of the router.
9. An access control device, characterized in that, Deployed in an on-chip network, the on-chip network comprising multiple routers, each router being connected to at least one functional module, the device being deployed in each router, comprising: The acquisition module is used to acquire module control information when any router receives an access request destined for a target functional module. The module control information is used to indicate whether the target functional module connected to the router meets the preset deactivation conditions. The sending module is used to return a preset response to the sending end of the access request when the module control information indicates that the target functional module meets the preset deactivation conditions. The preset response is used to terminate the transaction corresponding to the access request. The processing module is used to disable the target functional module.
10. A router, characterized in that, The router includes the access control device of claim 9, the access control device being used to perform the access control method of any one of claims 1 to 8.
11. A chip, characterized in that, The chip integrates an on-chip network, which includes a router for executing the access control method according to any one of claims 1 to 8.