Gnt crypto

Comment

Author: Admin | 2025-04-28

Binary Operators Binary operators take two operands or two sequence and produce a new sequence. Following are binary sequences operators. and : When both sequence are expected to match, and both the sequence start at same time, but are not expected to finish at same time. Then and operator is used.intersect : When both sequence are expected to match, and both the sequence start and end at same time. Then intersect operator is used.or : When one of the both sequence are expected to match. Then or operator is used. Example : Binary Operators 1 //+++++++++++++++++++++++++++++++++++++++++++++++++ 2 // DUT With assertions 3 //+++++++++++++++++++++++++++++++++++++++++++++++++ 4 module binary_assertion(); 5 6 logic clk = 0; 7 always #1 clk ++; 8 9 logic req,gnt,busy; 10 //================================================= 11 // Sequence Specification Layer 12 //================================================= 13 sequence s1; 14 $past( ! req,1) ##1 ($rose(gnt) and $past( ! gnt,1)); 15 endsequence 16 17 sequence s2; 18 $past( ! req,1) ##1 $rose(gnt) ##1 $fell(gnt); 19 endsequence 20 21 sequence s3; 22 req ##1 gnt ##1 busy ##1 ( ! req and ! gnt and ! busy); 23 endsequence 24 25 sequence s4; 26 req ##[1:3] gnt; 27 endsequence 28 //================================================= 29 // Property Specification Layer 30 //================================================= 31 property and_prop; 32 @ (posedge clk) 33 req |-> s1 and s2; 34 endproperty 35 36 property intersect_prop; 37 @ (posedge clk) 38 req |-> s1 intersect s3; 39 endproperty 40 41 property or_prop; 42 @ (posedge clk) 43 req |-> s1 or s4; 44 endproperty 45 //================================================= 46

Add Comment