Signal mark setting device and signal mark setting method

By mapping signal marks to multiple addresses and judging the occupancy status based on the address, the problem that the signal mark occupation status in a multi-core processor cannot be instantly known, and the operation efficiency and real-timeness of the signal mark are improved.

CN120020727APending Publication Date: 2025-05-20REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311545079.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

In multi-core processor applications, when the process competes for signal standards, it is impossible to instantly know the occupied status of the signal standards, resulting in low operational efficiency and poor real-time performance.

Method used

The mapping circuit maps multiple signal marks to multiple addresses, and the reading setting circuit determines the occupied state of the signal mark based on the address, and sets the signal mark as occupied if necessary.

Benefits of technology

It improves the operation efficiency of the signal target, can instantly know the occupied status of the signal target, and avoids the need to repeatedly read the signal target.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020727A_ABST
    Figure CN120020727A_ABST
Patent Text Reader

Abstract

The invention relates to a signal mark setting device and a signal mark setting method. The signal mark setting device comprises a mapping circuit and a reading setting circuit. The mapping circuit is configured to map at least one of the plurality of signal marks to at least one of the plurality of addresses. The read setting circuit is coupled to the mapping circuit and is used for judging whether the at least one signal mark is occupied or not according to the at least one address when the read request is received. If the reading setting circuit determines that the at least one signal mark is not occupied, the reading setting circuit returns an unoccupied signal and sets the at least one signal mark to be occupied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This case is about a signal flag setting device and a signal flag setting method, and in particular about a signal flag setting device and a signal flag setting method that apply an address mapping method. Background Art

[0002] In resource processing applications, a semaphore can be used as mutual exclusion protection between processes. However, in multi-core processor applications, if there are many processes on each core and each process can compete for the same semaphore, the user will not be able to know which process has competed for and occupied the above semaphore.

[0003] If you want to know whether the semaphore is occupied, you need to first read the value of the register corresponding to the semaphore to query whether the above semaphore is occupied. If the above semaphore is not occupied, multiple processes will compete for the above semaphore. In addition, if you want to know which process has competed for the above semaphore, you still need to read the value of the register corresponding to the semaphore again. It can be seen that the above operations require repeated reading of the semaphore, resulting in low efficiency. Moreover, the real-time performance of the above operations is poor, and it is impossible to efficiently and immediately know the occupancy status of the semaphore. Summary of the Invention

[0004] In view of the deficiencies of the prior art, one of the purposes of this case (but not limited to) is to provide a signal flag setting device and a signal flag setting method to improve the deficiencies of the prior art.

[0005] In some embodiments, the signal flag setting device includes a mapping circuit and a read setting circuit. The mapping circuit is used to map at least one signal flag among a plurality of signal flags to at least one address among a plurality of addresses. The read setting circuit is coupled to the mapping circuit and is used to, when receiving a read request, determine whether at least one signal flag is occupied according to at least one address. If the read setting circuit determines that at least one signal flag is not occupied, the read setting circuit returns an unoccupied signal and sets at least one signal flag as occupied.

[0006] In some embodiments, the signal flag setting method includes the following steps: mapping at least one signal flag among a plurality of signal flags to at least one address among a plurality of addresses through a mapping circuit; when the read setting circuit receives a read request, determining whether at least one signal flag is occupied according to at least one address; and if the read setting circuit determines that at least one signal flag is not occupied, the read setting circuit returns an unoccupied signal and sets at least one signal flag as occupied.

[0007] The technical means embodied in the embodiments of this case can improve at least one of the disadvantages of the prior art. Therefore, compared with the prior art, the signal beacon setting device and the signal beacon setting method of this case can improve the operation efficiency of the signal beacon and effectively and immediately know the occupancy status of the signal beacon.

[0008] Regarding the features, implementation, and effects of this case, the following provides a detailed description of the preferred embodiments in conjunction with the drawings. Brief Description of the Drawings

[0009] Figure 1 FIG. is a schematic diagram of a signal beacon setting device and a signal beacon device drawn according to some embodiments of this case;

[0010] Figure 2 FIG. is a schematic diagram of a mapping method between a signal beacon and an address drawn according to some embodiments of this case; and

[0011] Figure 3 FIG. is a flowchart of a signal beacon setting method drawn according to some embodiments of this case. Detailed Description of the Preferred Embodiments

[0012] All terms used herein have their ordinary meanings. The definitions of the above terms in commonly used dictionaries are only examples of the use of any of the terms discussed herein and should not limit the scope and meaning of this case. Similarly, this case is not limited to the various embodiments shown in this specification.

[0013] Regarding the use of "coupled" or "connected" herein, it can refer to two or more elements making direct physical or electrical contact with each other, or making indirect physical or electrical contact with each other, and can also refer to two or more elements operating or acting on each other. As used herein, the term "circuit" can be a device that processes signals by connecting at least one transistor and / or at least one passive or active element in a certain manner.

[0014] Figure 1 FIG. is a schematic diagram of a signal beacon setting device 100 and a signal beacon device 200 drawn according to some embodiments of this case. As shown in the figure, the signal beacon setting device 100 includes a mapping circuit 110, a read setting circuit 120, a write setting circuit 130, and a status query circuit 140. The signal beacon device 200 includes a plurality of signal beacons (hardware semaphore) S0 to S63. In some embodiments, the mapping circuit 110 is coupled to the read setting circuit 120, the write setting circuit 130, and the signal beacon device 200. In addition, the status query circuit 140 is coupled to the signal beacon device 200.

[0015] In this case, signal flags are used as mutual exclusion protection between processing processes, so that resources can be used individually only at the same time. Furthermore, to improve the operating efficiency of the signal flags and effectively and immediately know the occupancy status of the signal flags, mapping circuit 110 is adopted in this case to map multiple signal flags to multiple addresses, so as to improve the operating efficiency of the signal flags by reading the corresponding addresses of the signal flags. The detailed description is as follows.

[0016] To make the mapping method between the above-mentioned signal flags and addresses easy to understand, please also refer to Figure 1 and Figure 2 , Figure 2 To draw a schematic diagram of a mapping method between a signal flag and an address according to some embodiments of this case. As Figure 1 and Figure 2 shown, mapping circuit 110 can map multiple signal flags S0 to S63 to addresses in an address space respectively. For example, mapping circuit 110 can map signal flag S0 to multiple addresses B0 to B31 in the address space, map signal flag S1 to multiple addresses B0 to B31 in the address space... and so on, until all signal flags S0 to S63 are mapped to the corresponding addresses. In some embodiments, the address space and multiple addresses B0 to B31 can be stored in mapping circuit 110.

[0017] In some embodiments, reading and setting circuit 120 is used to determine whether the above-mentioned signal flag is occupied according to the corresponding address of the signal flag when receiving a read request. If reading and setting circuit 120 determines that the above-mentioned signal flag is not occupied, reading and setting circuit 120 returns an unoccupied signal and sets the above-mentioned signal flag as occupied. For example, when reading and setting circuit 120 receives a read request for signal flag S0, it determines whether signal flag S0 is occupied according to the corresponding addresses B0 to B31 of signal flag S0. If reading and setting circuit 120 determines that signal flag S0 is not occupied, reading and setting circuit 120 returns an unoccupied signal (for example, returns 0) to the requester of the read request, and can pre-set signal flag S0 as occupied to ensure that the requester of the read request can indeed compete for signal flag S0.

[0018] Compared with the prior art that after reading the signal flag to determine whether it can be occupied, it is necessary to read the signal flag again to determine whether the above-mentioned signal flag can be competed for, the signal flag setting device 100 of this case can use mapping circuit 110 to map the state of the signal flag to the corresponding address, and reading and setting circuit 120 reads the corresponding address to immediately obtain the state of the signal flag and whether the above-mentioned signal flag can be competed for. Thus, it can be seen that the signal flag setting device 100 of this case does not need to repeatedly read the state of the signal flag. Therefore, the operating efficiency of the signal flag setting device 100 of this case is relatively high.

[0019] In some embodiments, to pre-set the signal flag as occupied to ensure that the requester who issues a read request can indeed compete for the signal flag, the read setting circuit 120 can set the setting value of the corresponding address to a high level value so as to set the signal flag as occupied. For example, the read setting circuit 120 can set the setting values of the corresponding addresses B0 - B31 of the signal flag S0 to 1 so as to set the signal flag S0 as occupied, such that the signal flag S0 cannot be occupied by other processes, to ensure that the requester who issues a read request can indeed compete for the signal flag S0.

[0020] In some embodiments, when the read setting circuit 120 receives a read request, it reads the setting value of the corresponding address to determine whether the above-mentioned signal flag is occupied. If the setting value of the above address contains a low level value, the read setting circuit 120 determines that the above-mentioned signal flag is not occupied and returns an unoccupied signal. For example, when the read setting circuit 120 receives a read request for the signal flag S0, it reads the setting values of the corresponding addresses B0 - B31 of the signal flag S0 to determine whether the signal flag S0 is occupied. If the setting values of the corresponding addresses B0 - B31 are 0, the read setting circuit 120 determines that the signal flag S0 is not occupied and returns an unoccupied signal (for example, returns 0) to the requester who issues the read request.

[0021] In some embodiments, if the read setting circuit 120 determines that the signal flag (such as the signal flag S0) is occupied, the read setting circuit 120 returns an occupied signal (for example, returns 1) to the requester who issues the read request.

[0022] In some embodiments, when the read setting circuit 120 receives a read request, it reads the setting value of the corresponding address to determine whether the signal flag is occupied. If the setting value of the corresponding address contains a high level value, the read setting circuit 120 determines that the above-mentioned signal flag is occupied and returns an occupied signal to the requester who issues the read request. For example, when the read setting circuit 120 receives a read request for the signal flag S0, it reads the setting values of the corresponding addresses B0 - B31 of the signal flag S0 to determine whether the signal flag S0 is occupied. If the setting values of the corresponding addresses B0 - B31 are 1, the read setting circuit 120 determines that the signal flag S0 is occupied and returns an occupied signal (for example, returns 1) to the requester who issues the read request.

[0023] In some embodiments, the write setting circuit 130 is configured to set the signal flag to unoccupied according to the corresponding address when a write request is received. For example, when releasing the signal flag S0, the write setting circuit 130 sets the signal flag S0 to unoccupied according to the corresponding addresses B0 to B31 of the signal flag S0 when receiving the write request of the signal flag S0. Further, when receiving the write request of the signal flag S0, the write setting circuit 130 writes 0 to the corresponding addresses B0 to B31 of the signal flag S0 to set the signal flag S0 to unoccupied, so as to release the signal flag S0.

[0024] In some embodiments, the status query circuit 140 queries whether the signal flag is occupied according to the stored value of the corresponding signal flag. If the status query circuit 140 determines that the signal flag is unoccupied, the status query circuit 140 returns an unoccupied signal. If the status query circuit 140 determines that the signal flag is occupied, the status query circuit 140 returns an occupied signal. For example, the status query circuit 140 can be implemented by registers. For example, the status query circuit 140 can be composed of two 32-bit registers to correspondingly store 64 signal flags S0 to S63. When querying the occupancy status of the signal flags S0 to S63, the stored values of the registers of the status query circuit 140 can be used to effectively and instantaneously obtain the occupancy status of the signal flags S0 to S63.

[0025] This case is not limited to Figure 1 and Figure 2 the embodiments shown, which are only used to illustratively show one of the implementation manners of this case, so that the technology of this case is easy to understand. The patent scope of this case shall be subject to the scope of the invention patent application. Those skilled in the art, without departing from the spirit of this case, the modifications and refinements made to the embodiments of this case still fall within the scope of the invention patent application of this case.

[0026] Figure 3 The flowchart of a signal flag setting method 300 is drawn according to some embodiments of this case. To make the signal flag setting method 300 easy to understand, please refer to Figure 1 and Figure 3 together. As shown in the figure, the signal flag setting method 300 includes steps 310 to 330, which are described in detail as follows.

[0027] In step 310, at least one signal flag among a plurality of signal flags can be mapped to at least one address among a plurality of addresses through the mapping circuit 110. For example, the signal flag S0 among the plurality of signal flags S0 to S63 can be mapped to a plurality of addresses B0 to B31 in the address space through the mapping circuit 110, the signal flag S1 among the plurality of signal flags S0 to S63 can be mapped to a plurality of addresses B0 to B31 in the address space... and so on, until all the signal flags S0 to S63 are mapped to the corresponding addresses in the address space.

[0028] In step 320, when the reading setting circuit 120 receives a reading request, at least one address is used to determine whether at least one signal flag is occupied. For example, when the reading setting circuit 120 receives a reading request for the signal flag S0, the corresponding addresses B0 to B31 of the signal flag S0 are used to determine whether the signal flag S0 is occupied.

[0029] In step 330, if the reading setting circuit 120 determines that at least one signal flag is not occupied, the reading setting circuit 120 returns an unoccupied signal to the requester who issues the reading request, and can set at least one signal flag as occupied. For example, if the reading setting circuit 120 determines that the signal flag S0 is not occupied, the reading setting circuit 120 returns an unoccupied signal (for example, returns 0) to the requester who issues the reading request, and can pre-set the signal flag S0 as occupied to ensure that the requester who issues the reading request can indeed compete for the signal flag S0.

[0030] In one embodiment, referring to step 320, the signal flag setting method 300 can further, when the reading setting circuit 120 receives a reading request for the signal flag S0, read the setting values of the corresponding addresses B0 to B31 of the signal flag S0 through the reading setting circuit 120 to determine whether the signal flag S0 is occupied. If the setting values of the corresponding addresses B0 to B31 are 0, the reading setting circuit 120 determines that the signal flag S0 is not occupied, and returns an unoccupied signal (for example, returns 0) to the requester who issues the reading request.

[0031] In one embodiment, referring to step 330, the signal flag setting method 300 can further set the setting values of the corresponding addresses B0 to B31 of the signal flag S0 to 1 through the reading setting circuit 120, so as to set the signal flag S0 as occupied, so that the signal flag S0 cannot be occupied by other processes, to ensure that the requester who issues the reading request can indeed compete for the signal flag S0.

[0032] In one embodiment, the signal flag setting method 300 further includes subsequent steps. If the reading setting circuit 120 determines that the signal flag S0 is occupied, the reading setting circuit 120 returns an occupied signal to the requester who issues the reading request. For example, when the reading setting circuit 120 receives a reading request for the signal flag S0, the setting values of the corresponding addresses B0 to B31 of the signal flag S0 are read to determine whether the signal flag S0 is occupied. If the setting values of the corresponding addresses B0 to B31 are 1, the reading setting circuit 120 determines that the signal flag S0 is occupied, and returns an occupied signal (for example, returns 1) to the requester who issues the reading request.

[0033] In one embodiment, the signal flag setting method 300 further includes subsequent steps. When the signal flag S0 is to be released, when the write setting circuit 130 receives a write request for the signal flag S0, the signal flag S0 is set to unoccupied according to the corresponding addresses B0 to B31 of the signal flag S0. Further, when the write setting circuit 130 receives a write request for the signal flag S0, the write setting circuit 130 writes 0 to the corresponding addresses B0 to B31 of the signal flag S0 to set the signal flag S0 to unoccupied, so as to release the signal flag S0.

[0034] In one embodiment, the signal flag setting method 300 further includes subsequent steps. When the occupancy status of the signal flag S0 is to be queried, the status query circuit 140 can effectively and immediately know the occupancy status of the signal flag S0 according to the temporary value corresponding to the signal flag S0. If the status query circuit 140 determines that the signal flag S0 is unoccupied, the status query circuit 140 returns an unoccupied signal (for example, returns 0). If the status query circuit 140 determines that the signal flag S0 is occupied, the status query circuit 140 returns an occupied signal (for example, returns 1).

[0035] This case is not limited to Figure 3 the embodiments shown, which are only used to illustratively show one of the implementation manners of this case, so that the technology of this case is easy to understand. The patent scope of this case shall be subject to the scope of the invention patent application. Those skilled in the art, without departing from the spirit of this case, the modifications and refinements made to the embodiments of this case still fall within the scope of the invention patent application of this case.

[0036] In summary, compared with the prior art that after reading the signal flag to determine whether it can be occupied, it is necessary to read the signal flag again to determine whether the above signal flag is competed for. The signal flag setting device 100 and the signal flag setting method 300 of this case can map the status of the signal flag to the corresponding address through the mapping circuit 110, and read the corresponding address through the read setting circuit 120 to immediately obtain the status of the signal flag and whether the above signal flag can be competed for. Thus, it can be seen that the signal flag setting device 100 and the signal flag setting method 300 of this case do not need to repeatedly read the signal flag status. Therefore, the operation efficiency of the signal flag setting device 100 and the signal flag setting method 300 of this case is relatively high. Furthermore, when the occupancy status of the signal flag is to be queried, the signal flag setting device 100 and the signal flag setting method 300 of this case can effectively and immediately know the occupancy status of the signal flag according to the temporary value of the register of the status query circuit 140.

[0037] Although the embodiments of this case are described above, these embodiments are not intended to limit this case. Those with ordinary knowledge in the technical field can make changes to the technical features of this case based on the explicit or implicit content of this case. All such changes may fall within the scope of patent protection sought in this case. In other words, the scope of patent protection of this case shall be determined by what is defined in the scope of patent application in this specification.

[0038]

Symbol Explanation

[0039] 100: Signal Mark Setting Device

[0040] 110: Mapping Circuit

[0041] 120: Reading Setting Circuit

[0042] 130: Writing Setting Circuit

[0043] 140: Status Query Circuit

[0044] 200: Signal Mark Device

[0045] B0~B31: Address

[0046] S0~S63: Signal Mark

[0047] 300: Method

[0048] 310~330: Steps.

Claims

1. A signal beacon setting device, comprising: a mapping circuit for mapping at least one semaphore of the plurality of semaphores to at least one address of the plurality of addresses; and A read setting circuit is coupled to the mapping circuit and is used to determine whether the at least one signal marker is occupied according to the at least one address when receiving a read request, wherein If the read setting circuit determines that the at least one signal flag is not occupied, the read setting circuit returns an unoccupied signal and sets the at least one signal flag as occupied.

2. The signal beacon setting device according to claim 1, wherein: When receiving the read request, the read setting circuit reads a setting value of the at least one address to determine whether the at least one signal marker is occupied. If the setting value of the at least one address includes a low level value, the read setting circuit determines that the at least one signal marker is not occupied and returns the unoccupied signal.

3. The signal beacon setting device according to claim 2, wherein: The read setting circuit sets the setting value of the at least one address to a high level value so as to set the at least one signal flag to be occupied.

4. The signal beacon setting device according to claim 1, wherein: If the read setting circuit determines that the at least one signal flag is occupied, the read setting circuit returns an occupied signal.

5. The signal beacon setting device according to claim 4, wherein: When receiving the read request, the read setting circuit reads a setting value of the at least one address to determine whether the at least one signal marker is occupied. If the setting value of the at least one address includes a high level value, the read setting circuit determines that the at least one signal marker is occupied and returns the occupied signal.

6. The signal beacon setting device according to claim 1, further comprising: A write setting circuit is coupled to the mapping circuit and is used for setting the at least one semaphore to be unoccupied according to the at least one address when receiving a write request.

7. The signal beacon setting device according to claim 6, wherein: When receiving the write request, the write setting circuit writes a low level value to the at least one address to set the at least one signal flag as unoccupied.

8. The signal beacon setting device according to claim 1, further comprising: A status query circuit is used to query whether the at least one semaphore is occupied according to at least one temporary value corresponding to the at least one semaphore, wherein: If the state query circuit determines that the at least one signal marker is not occupied, the state query circuit returns the unoccupied signal.

9. The signal beacon setting device according to claim 8, wherein: If the state query circuit determines that the at least one signal marker is occupied, the state query circuit returns an occupied signal.

10. A signal beacon setting method, comprising: Mapping at least one semaphore among the plurality of semaphores to at least one address among the plurality of addresses by a mapping circuit; When a read setting circuit receives a read request, determining whether the at least one semaphore is occupied according to the at least one address; and If the read setting circuit determines that the at least one signal flag is not occupied, the read setting circuit returns an unoccupied signal and sets the at least one signal flag as occupied.