{"id":30,"date":"2016-07-08T22:02:00","date_gmt":"2016-07-08T21:02:00","guid":{"rendered":"https:\/\/go2uvm.org\/?p=30"},"modified":"2024-04-01T22:04:27","modified_gmt":"2024-04-01T21:04:27","slug":"open-source-gpu-decode-block-gets-open-source-go2uvm-test","status":"publish","type":"post","link":"https:\/\/go2uvm.org\/index.php\/2016\/07\/08\/open-source-gpu-decode-block-gets-open-source-go2uvm-test\/","title":{"rendered":"Open-source GPU decode block gets open-source Go2UVM Test!"},"content":{"rendered":"\n<p>If you are tracking the GPU industry and academia \u2013 there is a nice open-source GPU named&nbsp;<a href=\"http:\/\/www.miaowgpu.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">MIAOW<\/a>&nbsp;&nbsp;<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.go2uvm.org\/wp-content\/uploads\/2016\/07\/miaow_GPU_logo.jpg\" alt=\"miaow_GPU_logo\" width=\"111\" height=\"78\" srcset=\"http:\/\/www.go2uvm.org\/wp-content\/uploads\/2016\/07\/miaow_GPU_logo.jpg 400w, http:\/\/www.go2uvm.org\/wp-content\/uploads\/2016\/07\/miaow_GPU_logo-300x210.jpg 300w\"><\/p>\n\n\n\n<p>An abstract architecture of this GPU looks as below:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.nextplatform.com\/wp-content\/uploads\/2015\/08\/MIAOW_Overview_slide.png\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/www.nextplatform.com\/wp-content\/uploads\/2015\/08\/MIAOW_Overview_slide.png<\/a><\/p>\n\n\n\n<p>The design seems to be well structured and RTL coded nicely, organized well etc. However, as with many of these open-source hardware models that we find on the web, the verification with a testbench (simulation) is done in a loose manner. For instance we looked at the&nbsp;<em><strong>decode<\/strong><\/em>&nbsp;block in this GPU and the testbench is a simple Linear TB. We decided to port this to UVM via Go2UVM package to demonstrate how easy it really is to migrate to UVM from Verilog.<\/p>\n\n\n\n<p>You can download the open-source GPU\u2019s decode block and Go2UVM test from here:<\/p>\n\n\n\n<p>On top of the recently&nbsp;<a href=\"http:\/\/www.go2uvm.org\/2016\/06\/go2uvm-package-2016-05-now-available\/\" target=\"_blank\" rel=\"noreferrer noopener\">released Go2UVM 2015.06 release,&nbsp;<\/a>we added productivity \u201capps\u201d to generate all the necessary code to get going with UVM in minutes \u2013 given a RTL. For instance we created a DVC_Go2UVM app that runs on popular&nbsp;<strong>Aldec\u2019s Riviera-PRO<\/strong>&nbsp;simulator and generates Go2UVM infrastructure on a push-of-a-button. Specifically this app creates:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SystemVerilog interface for the given RTL top module<\/li>\n\n\n\n<li>Top level TB module with DUT instantiated, connected<\/li>\n\n\n\n<li>Automates standard UVM&nbsp;<em><strong>run_test()<\/strong><\/em>&nbsp;mechanism to automate calling of components\u2019 tasks (also known as Phasing in UVM)<\/li>\n\n\n\n<li>Creates a<em><strong>&nbsp;test.svi<\/strong><\/em>&nbsp;file that user can add the specific test scenario<\/li>\n<\/ul>\n\n\n\n<p>Among these files the only file user needs to bother\/tweak is the\u00a0<em><strong>test.svi<\/strong><\/em>\u00a0to capture necessary test sequence. In a typical RTL DUT, a testcase stimulus has 2 basic parts:\u00a0RESET &amp; MAIN. We managed to port the GPU\u2019s decode tb to Go2UVM reset phase as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"464\" src=\"https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_rst_ph_g2u-1024x464.png\" alt=\"\" class=\"wp-image-34\" srcset=\"https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_rst_ph_g2u-1024x464.png 1024w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_rst_ph_g2u-300x136.png 300w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_rst_ph_g2u-768x348.png 768w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_rst_ph_g2u-1536x697.png 1536w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_rst_ph_g2u.png 1735w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It is useful to appreciate that UVM automates calling of these tasks defined in a class based test provided we follow a standard naming convention \u2013 also known as Phasing in UVM. To get little deeper \u2013 with Go2UVM package, one does NOT have to bother about raising and dropping objections \u2013 the package does that for you! If you are new to this UVM objection mechanism, a good read is at:&nbsp;<a href=\"https:\/\/sv-verif.blogspot.com\/2012\/04\/new-to-system-verilog-uvm-wonder-why-it.html\" target=\"_blank\" rel=\"noreferrer noopener\">New to UVM? Wonder why it exits at time zero?<\/a><\/p>\n\n\n\n<p>Now the main phase looks as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_main_ph_g2u-1024x658.png\" alt=\"\" class=\"wp-image-35\" srcset=\"https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_main_ph_g2u-1024x658.png 1024w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_main_ph_g2u-300x193.png 300w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_main_ph_g2u-768x493.png 768w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_main_ph_g2u.png 1513w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As one can appreciate \u2013 except for minor syntax changes, the original, plain Verilog Test and the corresponding UVM test with Go2UVM look very similar indeed!<\/p>\n\n\n\n<p>If you can start seeing the benefits of moving to UVM with Go2UVM \u2013 great, here is a treat for your eyes:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_g2u_log-1024x583.png\" alt=\"\" class=\"wp-image-36\" srcset=\"https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_g2u_log-1024x583.png 1024w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_g2u_log-300x171.png 300w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_g2u_log-768x437.png 768w, https:\/\/go2uvm.org\/wp-content\/uploads\/2024\/04\/gpu_g2u_log.png 1395w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As you can see above, debugging with UVM becomes lot easier \u2013 as the file name, line number, time of the message etc. come out automatically in UVM!<\/p>\n\n\n\n<p>You can download the open-source GPU\u2019s decode block and Go2UVM test from here:<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are tracking the GPU industry and academia \u2013 there is a nice open-source GPU named&nbsp;MIAOW&nbsp;&nbsp; An abstract architecture of this GPU looks as below: https:\/\/www.nextplatform.com\/wp-content\/uploads\/2015\/08\/MIAOW_Overview_slide.png The design seems to be well structured and RTL coded nicely, organized well etc. However, as with many of these open-source hardware models that we find on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[12,11,6],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-blog","tag-go2uvm","tag-gpu","tag-uvm"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":5,"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/go2uvm.org\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}