<div dir="ltr">On Mon, Aug 26, 2019 at 9:29 AM Jonathan Thornburg <<a href="mailto:jthorn4242@gmail.com">jthorn4242@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, Aug 25, 2019 at 06:14:11AM -0700, Bill Cox wrote:<br>
> The best, but patented IIRC, architecture for a TRNG is super simple.<br>
> <br>
[[ring oscillator with an even number of inversions in the loop,<br>
and two NAND gates at opposite points in the loop]]<br>
> <br>
> In real life, you probably want to add more inverters than this.  This is<br>
> like a traditional ring oscillator, but with an *even* number of<br>
> inverters.  You take two inverters at opposite ends of the ring and turn<br>
> them into NAND gates.  The other inputs of both NAND gates are tied<br>
> together to make the ENABLE input.  When ENABLE is low, OUT is low.  When<br>
> ENABLE goes high, two edges in the ring oscillator chase each other.<br>
> Eventually, due to thermal or other noise, one edge catches the other, and<br>
> they annihilate each other.  The oscillator stops oscillating at this point.<br>
<br>
Problem: what if the layout (& hence 0->1 and 1->0 propagation times)<br>
is such that (say) inverter #3 in the loop is a lot slower than the<br>
others *and* has asymmetric rise/fall?  The result could well be that<br>
when the first edge reaches inverter #3, it's slow to propagate, so<br>
the second edge catches up with it right there (inverter #3) resulting<br>
in the "TRNG" outputting a stream of constant values.  :(<br></blockquote><div><br></div><div>Good point.   It is OK for rise/fall to be different, but the lower chain needs to match the upper chain well.  This requires some manual constraints in an FPGA/CPLD.  It is possible in some systems (the P&R tools I worked on for Triad Semiconductor) to copy the place and rout result from instance A to instance B, translated by some distance in the fabric.  That generally causes the routing to match well.  I'm not sure if the major FPGA/CPLD providers offer this functionality.<br></div></div></div>