100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Question Bank-System Verilog $7.99   Add to cart

Other

Question Bank-System Verilog

 4 views  0 purchase
  • Course
  • Institution

Contains model Questions and programs for system verilog concepts

Preview 2 out of 5  pages

  • September 14, 2022
  • 5
  • 2019/2020
  • Other
  • Unknown
avatar-seller
Q:Create a structure called "st_fruit"

// which to store the fruit's name, count and expiry date in days.

// Note: this structure declaration can also be placed outside the module



module tb;
// Create a structure called "st_fruit"
// which to store the fruit's name, count and expiry date in
days.
// Note: this structure declaration can also be placed
outside the module
struct {
string fruit;
int count;
byte expiry;
} st_fruit;

initial begin
// st_fruit is a structure variable, so let's initialize it
st_fruit = '{"apple", 4, 15};

// Display the structure variable
$display ("st_fruit = %p", st_fruit);

// Change fruit to pineapple, and expiry to 7
st_fruit.fruit = "pineapple";
st_fruit.expiry = 7;
$display ("st_fruit = %p", st_fruit);
end
endmodule




Q Write an assertion check to make sure that a signal is high for a minimum
of 1 cycles and a maximum of 5 cycles.

property a_min_1_max_5: @(posedge clk)
$rose(a) |-> a[*1:5] ##1 (a==0)

, endproperty
assert property (a_min_1_max_5);




///


Signal “a” is asserted high on each clock cycle


b) If “a” is high in a cycle after two clock cycles, signal “b” has to be asserted
high.




For a synchronous FIFO of depth=64, write an assertion for following
scenarios. Assume a clock signal (clk), write and read enable signals, full flag
and a word counter signal.
1) If the word count is >63, FIFO full flag is set.
2) If the word count is 63 and a new write operation happens without a
simultaneous read, then the FIFO full flag gets set.

Answer :

assert property (@(posedge clk) disable iff (rst) (wordcnt>63 |-> fifo_full));
assert property (@(posedge clk) disable iff (rst) (wordcnt==63 && write_en &&
!read_en |=> fifo_full));

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller sandhyasudi. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

77851 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart