# \#semaphore-keys

**URL:** https://verificationacademy.com/forums/tag/semaphore-keys/5002.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [Semaphore put method question](https://verificationacademy.com/forums/t/semaphore-put-method-question/42479)

<div class="topic-metadata">

**Author:** [@Himanshu\_Madnani](https://verificationacademy.com/forums/u/Himanshu_Madnani)\
**Replies:** 5\
**Last updated:** [December 28, 2025, 11:02pm UTC](https://verificationacademy.com/forums/t/semaphore-put-method-question/42479 "2025-12-28T23:02:17Z")

</div>

hI I have a question regarding semaphore. code module semaphore\_ex; semaphore sema; //declaring semaphore sema initial begin sema=new(4); //creating sema with '4' keys fork display("Process 1"); …

---

## [Help in finding better way to restructure the code](https://verificationacademy.com/forums/t/help-in-finding-better-way-to-restructure-the-code/39020)

<div class="topic-metadata">

**Author:** [@RahulkumarBudhwani](https://verificationacademy.com/forums/u/RahulkumarBudhwani)\
**Replies:** 3\
**Last updated:** [April 29, 2021, 12:40am UTC](https://verificationacademy.com/forums/t/help-in-finding-better-way-to-restructure-the-code/39020 "2021-04-29T00:40:12Z")

</div>

I have a logic where a semaphore waits for key only if a particular condition is not set and once I gather the key, I release after clocking block statement one cycle later. However, if a condition is set, therefore, it …

---

## [Semaphore](https://verificationacademy.com/forums/t/semaphore/38242)

<div class="topic-metadata">

**Author:** [@anveshdangeti](https://verificationacademy.com/forums/u/anveshdangeti)\
**Replies:** 3\
**Last updated:** [October 19, 2020, 7:08pm UTC](https://verificationacademy.com/forums/t/semaphore/38242 "2020-10-19T19:08:03Z")

</div>

when i am creating the semaphore with negative number i.e. sema = new(-1).what will happened? the below is the example: module semaphore\_ex; semaphore sema; //declaring semaphore sema initial begin sema=new(-1…

---

## [Does Semaphore PUT with TRY\_GET add more keys to bucket?](https://verificationacademy.com/forums/t/does-semaphore-put-with-try-get-add-more-keys-to-bucket/37958)

<div class="topic-metadata">

**Author:** [@vn\_verif](https://verificationacademy.com/forums/u/vn_verif)\
**Replies:** 1\
**Last updated:** [August 17, 2020, 6:13pm UTC](https://verificationacademy.com/forums/t/does-semaphore-put-with-try-get-add-more-keys-to-bucket/37958 "2020-08-17T18:13:39Z")

</div>

I tried the below sample program to understand semaphores better. At time 45 both process-1 and process-2 get the keys at the same time. Is this because the PUT corresponding to try\_get added a key to the pool even tho…

---

## [Implementing priority in registers access task](https://verificationacademy.com/forums/t/implementing-priority-in-registers-access-task/37351)

<div class="topic-metadata">

**Author:** [@rohitk](https://verificationacademy.com/forums/u/rohitk)\
**Replies:** 3\
**Last updated:** [March 24, 2020, 8:07am UTC](https://verificationacademy.com/forums/t/implementing-priority-in-registers-access-task/37351 "2020-03-24T08:07:34Z")

</div>

Hi, In our ENV so far we are using semaphore to serialize access to AXI bus for register interface of our SOC. Due to a specific need I need to implement priority based selection and give importance to certain caller li…

---

## [Semaphore in a function](https://verificationacademy.com/forums/t/semaphore-in-a-function/31667)

<div class="topic-metadata">

**Author:** [@mseyunni](https://verificationacademy.com/forums/u/mseyunni)\
**Replies:** 4\
**Last updated:** [April 3, 2016, 6:57am UTC](https://verificationacademy.com/forums/t/semaphore-in-a-function/31667 "2016-04-03T06:57:16Z")

</div>

Hi Dave, I have a common resource which I use to add and delete entries from two different functions. But, I cannot use semaphore.get() inside the function as this will be a task, which cannot be called from inside a fu…

---

## [Semaphore: process returning more keys than got for processing](https://verificationacademy.com/forums/t/semaphore-process-returning-more-keys-than-got-for-processing/30212)

<div class="topic-metadata">

**Author:** [@deepa.djdoll](https://verificationacademy.com/forums/u/deepa.djdoll)\
**Replies:** 2\
**Last updated:** [December 11, 2014, 9:24am UTC](https://verificationacademy.com/forums/t/semaphore-process-returning-more-keys-than-got-for-processing/30212 "2014-12-11T09:24:59Z")

</div>

I “new” a semephore with 2 keys Two processes P1, P2. P1 needs two keys also P2 needs two keys for its process to start P1 gets 2 keys but when I returned 5 keys from P1, \[b\]it did not give my any compile/runtime error. …
