azonenberg changed the topic of ##openfpga to: Open source tools for FPGAs, CPLDs, etc. Silicon RE, bitfile RE, synthesis, place-and-route, and JTAG are all on topic. Channel logs: https://libera.irclog.whitequark.org/~h~openfpga
<hammdist> I need to generate randomness in ECP5. it seems the only option is a ring oscillator. however this requires --force to nextpnr. will this negatively impact the place and route of the remainder of the circuit?
Degi_ has joined ##openfpga
Degi has quit [Ping timeout: 272 seconds]
Degi_ is now known as Degi
ZipCPU has quit [Read error: Connection reset by peer]
ZipCPU has joined ##openfpga
_whitelogger has joined ##openfpga
ZipCPU has quit [Ping timeout: 268 seconds]
ZipCPU has joined ##openfpga
<azonenberg> hammdist: FPGAs generally go out of their way to be deterministic
<azonenberg> forcing nondeterminism in them is challenging. Ring oscillators are one of several sources but all of them are hard to get right and susceptible to injection locking through power supply coupling
<azonenberg> Is this for cryptographic purposes or just something like random backoff in some protocol?
<azonenberg> if it's NOT cryptographic, a simple LFSR is sufficient for most stuff
<azonenberg> if it is crypto related, honestly i'd recommend getting a MCU or security chip external to the FPGA that has a built in hardware RNG and using that
<azonenberg> depending on how much randomness you need, either offload all of the generation to the other chip, or use it as a seed for a CSPRNG implemented in the FPGA
<azonenberg> (so you grab one block of hardware randomness at boot then run off the PRNG from then on, perhaps periodically re-seeding with more randomness from the external chip)
ZipCPU has quit [Ping timeout: 268 seconds]
ZipCPU has joined ##openfpga
ZipCPU has quit [Ping timeout: 265 seconds]
ZipCPU has joined ##openfpga
ZipCPU has quit [Ping timeout: 252 seconds]
ZipCPU has joined ##openfpga
ZipCPU has quit [Ping timeout: 252 seconds]
ZipCPU has joined ##openfpga
ZipCPU has quit [Ping timeout: 272 seconds]
ZipCPU has joined ##openfpga
ZipCPU has quit [Ping timeout: 248 seconds]
ZipCPU has joined ##openfpga
<hammdist> it's for cryptographic use, but a large number of bits generated by the ring oscillator will be aggregated by hashing to generate the seed for the CSPRNG. so even only a very low rate of true entropy generation by the ring oscillator will be sufficient. also it is assumed that the attacker does not have physical access which I assume is needed for
<hammdist> injection locking
<hammdist> to partially answer my own question, I've found there is a better option `--ignore-loops` that can be passed to `nextpnr`. the presence of the ring oscillator doesn't seem to affect the rest of the circuit as far as I can tell
<hammdist> how do I determine the ftdi_serial value for a board? I'm trying to set up openocd to be able to flash separate to two boards with the same vid/pid
<hammdist> apparently it's just done with lsusb
Patater has quit [Quit: Explodes into a thousand pieces]
Patater has joined ##openfpga
<hammdist> why does nextpnr use 2 threads for routing and ignores --threads 4, for example?
<hammdist> const int Nq = 4, Nv = 2, Nh = 2; looks like it has a fixed multithreading strategy .. though it's strange that only 2 threads appear in top
<hammdist> I'm tempted to change it to place it in single threaded mode only but sometimes you don't want to know how the sausage is made
<hammdist> well there are bigger problems than multithreading that have cropped up now. I have a design that can run at up to 138MHz on 5g, but when I try to compile the same sources for non-5g variant, the maximum clock drops rather inexplicably to only 74MHz (at least 125MHz is required and specified as a constraint)
<tnt> hammdist: You mean ECP5 ?
<tnt> What speedgrade are you specifying for non-5g variant ?
<tnt> I'd expect a -6 to indeed be half the speed of a 5G or so.
<hammdist> yes ECP5. I'm not specifying a speed grade for either build
<tnt> 5G is a speedgrade in itself.
<tnt> Speed wise it goes -6 -7 -8 5G
<hammdist> uhm ok how do I determine what speed grade a particular chip is? can it be determined from the markings? and how do I specify it to nextpnr?
<tnt> Well depends which chip you bought :)
<tnt> it's part of the part number ... -8 are more expensive :)
<tnt> --speed 8
<hammdist> chip markings are LFE5UM-45F 8BG3811 A1401R20
<tnt> So it's 8
<hammdist> ok I will try with --speed 8
<hammdist> the speed went up to 100MHz or so before routing. let's see what it is after routing but my gut feeling is it won't get to pass
<tnt> if it's only 138 MHz on 5G, I doubt it would do 125M on -8. The 5g are _really_ faster because they power them up with a higher core voltage to speed them up.
<hammdist> it ended up at 107MHz. blast
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined ##openfpga