Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Question Bank-System Verilog

Rating
-
Sold
-
Pages
5
Uploaded on
14-09-2022
Written in
2019/2020

Contains model Questions and programs for system verilog concepts

Institution
Course

Content preview

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));

Written for

Institution
Course

Document information

Uploaded on
September 14, 2022
Number of pages
5
Written in
2019/2020
Type
OTHER
Person
Unknown

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sandhyasudi

Get to know the seller

Seller avatar
sandhyasudi Engineering college
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
7
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions