perl important snippets Get link Facebook X Pinterest Email Other Apps - October 14, 2024 perl important snippets:- ########snippets#########=pod $var="Perl"; $var1='$var'; $var2= "$var"; print "$var1\n"; print "$var2\n";=cut Get link Facebook X Pinterest Email Other Apps Comments
check the value 12321 is pallindrome or not by using constraint - December 27, 2024 module test(); class packet; rand bit [7:0\] a; constraint a{a inside {[0:4]};} constraint a2 { foreach(a[i]) { a[i]==a[(n-1)-i];}} endclass packet p1=new(); assert(p1.ramdomize()); $display("the value is =%p", p1.a); endmodule Read more
print the prime number 0 to 500 by using constraint - December 27, 2024 module test(); class packet; rand bit [15:0] a; constraint a { a inside {[0:500];} constraint a2 { foreach(a[i]) if(i>1) a[i]==prime(i);} endclass packet p1=new(); assert(p1.randomize()); $display("the value is = %p", p1.a); endmodule Read more
print the values 34,24,[23:40], 50, 30 by using constraint - December 27, 2024 module test(); class packet; rand bit [7:0] a; constraint a1 { a inside {[ 34, [23:40], 50, 30]};} endclass packet p1=new(); assert(p1.randomize()); $display("the value is =%p", p1.a); endmodule Read more
Comments
Post a Comment