Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ511
Page ↗
Q511DVASIC interview problem

Semaphores

TechniquesSystemVerilogCommunication primitives
DifficultyEasy
TopicVerification Utilities
LanguageSystemVerilog
Format4 choices
01

Problem

What does ok become?

Starting declarationSystemVerilog
semaphore s = new(2);
int ok;
initial begin
  s.get(2);
  ok = s.try_get(1);
end
02

Answer choices (4)