Let's understand what's UVM Seq item, Sequence & Sequencer in a brief way: Sequence item: It holds the collection of variables (that is, inputs & outputs) Sequence: This is used to create series of sequence items (that is, more scenarios) Sequencer: To arbitrate the sequence to driver For more detailed explanation, you can watch the video I've shared below:
CODE: module tb; string s1 = "madam"; string s2; initial begin s2 = {<<8{s1}}; //Storing each character as 8-bits using Streaming Op. if(s1 == s2) $display("\n %s is a Palindrome \n", s1); else $display("\n %s is NOT a Palindrome \n", s1); end endmodule SAMPLE OUTPUT: With Different String match: module tb; string s1 = "jolly"; string s2; initial begin s2 = {<<8{s1}}; //Storing each character as 8-bits $display("\nReversal of gn. string is: %s",s2); if(s1 == s2) $display("%s is a Palindrome \n", s1); else $display("(Given String)%s != %s(Reversed String)",s1,s2); $display("Therefore, %s is NOT a Palindrome \n", s1); end endmodule SAMPLE OUTPUT: You can buy me a coffee! https://www.buymeacoffee.com/ch...
Comments
Post a Comment