<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Constrained Random Verification on PRBS23</title>
    <link>https://prbs23.com/blog/tags/constrained-random-verification/</link>
    <description>Recent content in Constrained Random Verification on PRBS23</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 25 May 2023 23:32:04 -0600</lastBuildDate>
    <atom:link href="https://prbs23.com/blog/tags/constrained-random-verification/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Combining Dist Constarints in SystemVerilog</title>
      <link>https://prbs23.com/blog/posts/combining-dist-constraints-in-system-verilog/</link>
      <pubDate>Thu, 25 May 2023 23:32:04 -0600</pubDate>
      <guid>https://prbs23.com/blog/posts/combining-dist-constraints-in-system-verilog/</guid>
      <description>&lt;h2 id=&#34;basic-distribution-constraints&#34;&gt;Basic Distribution Constraints&lt;/h2&gt;&#xA;&lt;p&gt;In SystemVerilog, almost all constraints are some form of boolean expression. The constraint solver&amp;rsquo;s job is to satisfy all these boolean expression when choosing random values. The two exceptions to this are &lt;code&gt;solve before&lt;/code&gt; constraints, which control the order of value resolution, and &lt;code&gt;dist&lt;/code&gt; constraints, witch control the distribution of values chosen. This latter type of constraint is what we are looking at in this post.&lt;/p&gt;&#xA;&lt;p&gt;At a high level the distribution constraint provides a syntax for defining the &lt;a href=&#34;https://en.wikipedia.org/wiki/Probability_mass_function&#34;&gt;probability mass function&lt;/a&gt; for a random variable over a given range of discrete values. Below are two examples of &lt;code&gt;dist&lt;/code&gt; constraints and the resulting distribution of values over 100k randomizations. The first specifies linearly increasing probability over four values, while the second shows exponentially increasing probability for the same values.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
