100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
Question Bank-System Verilog €7,62   In winkelwagen

Overig

Question Bank-System Verilog

 4 keer bekeken  0 keer verkocht
  • Vak
  • Instelling

Contains model Questions and programs for system verilog concepts

Voorbeeld 2 van de 5  pagina's

  • 14 september 2022
  • 5
  • 2019/2020
  • Overig
  • Onbekend
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));

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

√  	Verzekerd van kwaliteit door reviews

√ Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, Bancontact of creditcard voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper sandhyasudi. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €7,62. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 85073 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€7,62
  • (0)
  Kopen