{"id":15790,"date":"2021-02-08T13:48:00","date_gmt":"2021-02-08T18:48:00","guid":{"rendered":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/?p=15790"},"modified":"2026-03-27T08:47:43","modified_gmt":"2026-03-27T12:47:43","slug":"verification-learns-a-new-language","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/2021\/02\/08\/verification-learns-a-new-language\/","title":{"rendered":"Verification Learns a New Language"},"content":{"rendered":"\n<p>Abraham Lincoln once said, \u201cWhat is conservatism? Is it not adherence to the old and tried, against the new and untried?\u201d<\/p>\n\n\n\n<p>By that definition, we engineers are a conservative lot. When I started in engineering in the 80\u2019s I knew an engineering manager who decried the switch to cad software from paper drafting. \u201cIt will take us five weeks to design, ten if you make us use CAD.\u201d<\/p>\n\n\n\n<p>Not soon after that transition had happened the move from drawing circuits to writing RTL. Once again engineers were forced to give up the \u201ctried and true\u201d for the \u201cnew and untried.\u201d&nbsp;<\/p>\n\n\n\n<p>The move to RTL created a language war between Verilog and VHDL. Regardless of which side engineers landed on, most of them used their RTL language as a testbench language. This led to advances in VHDL and the extension of Verilog into SystemVerilog. And that led to the creation of the UVM in SystemVerilog and UVVM in VHDL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Seeing the big picture<\/h2>\n\n\n\n<p>The problem with incrementalism and the tried and true is that we sometimes spend so much energy looking at the next step in front of us that we don\u2019t look up and see where we really want to be going.&nbsp;<\/p>\n\n\n\n<p>If we look at a proxy-driven testbench, that is a testbench in which a proxy provides function calls that control the BFMs, we see something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" src=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2021\/02\/Proxy-Testbench-1.png\" alt=\"A proxy-driven testbench has software, driving a proxy, driving a BFM.\" class=\"wp-image-15808\" width=\"NaN\" height=\"NaN\"\/><figcaption>Proxy-driven Testbench<\/figcaption><\/figure>\n\n\n\n<p>This testbench has software that creates stimulus, checks results, and populates coverage. Today, because of incrementalism, many engineers write that software in SystemVerilog or VHDL. But one has to ask, \u201cWhy are we writing software with the notion of running it in a simulator? It\u2019s not really simulating anything, the RTL is doing that.\u201d<\/p>\n\n\n\n<p>Once we ask that question we realize that we\u2019d be a lot better off writing software in a software language. Which software language? The most popular language in the land: Python<sup>1<\/sup>.<\/p>\n\n\n\n<p>Proxy-driven testbenches written in Python could take advantage of the broad Python ecosystem of modules. Python verification teams could hire from a broader talent base, including newly minted college graduates. It would also be easier to create testbenches for complex applications such as machine learning.<\/p>\n\n\n\n<p>Of course, this raises an immediate question. We all know how our SystemVerilog testbenches communicate with the BFMs because SystemVerilog defines <em>interfaces<\/em> that do that work. How does Python talk to a BFM?<\/p>\n\n\n\n<p>One approach is through programming interfaces such as VPI for SystemVerilog and VHPI for VHDL. And so in the next blog post in this three-post series we\u2019ll turn to an open source Python solution: <a href=\"http:\/\/docs.cocotb.org\" target=\"_blank\" rel=\"noopener\">cocotb<\/a><\/p>\n\n\n\n<p>\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013<\/p>\n\n\n\n<p><sup>1 <\/sup>According to <a href=\"https:\/\/spectrum.ieee.org\/static\/interactive-the-top-programming-languages-2020\" target=\"_blank\" rel=\"noopener\">IEEE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Abraham Lincoln once said, \u201cWhat is conservatism? Is it not adherence to the old and tried, against the new and&#8230;<\/p>\n","protected":false},"author":74314,"featured_media":15808,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[984,1,981,10],"tags":[902,787,819],"industry":[],"product":[],"coauthors":[947],"class_list":["post-15790","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cocotb","category-news","category-pyuvm","category-tips-tricks","tag-python","tag-uvm","tag-verification"],"featured_image_url":"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2021\/02\/Proxy-Testbench-1.png","_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts\/15790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/users\/74314"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/comments?post=15790"}],"version-history":[{"count":5,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts\/15790\/revisions"}],"predecessor-version":[{"id":15812,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts\/15790\/revisions\/15812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/media\/15808"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/media?parent=15790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/categories?post=15790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/tags?post=15790"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/industry?post=15790"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/product?post=15790"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/coauthors?post=15790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}