4 ms·
Using ASCII waveforms to test hardware designs (2020)
- bradrn 5y agoI’ve used these sorts of tests before, but under the name of ‘golden’ rather than ‘expect tests’. To complement the post’s OCaml example, here’s an article on how to use them in Haskell: https://ro-che.info/articles/2017-12-04-golden-tests https://ro-che.info/articles/2017-12-04-golden-tests
- v-yadli 5y agoYeah, the term "golden" is common in the hardware world, which corresponds to expected signal level traces either captured from a physical device with a logic analyzer, or generated with an ideal model.
- anitil 5y agoJane street has certainly been doing a good job of getting across my radar lately, but because they produce good content I'm actually quite happy to see it. They've been sponsoring a few Youtube creators (like Matt Parker of Stand-Up Maths) and featured a bit on HN. It's interesting that they seem to do it as a recruitment mechanism rather than for publicity's sake.
- ktpsns 5y agoSo what again is the difference for instance against testing scientific codes on a "data-level"? For instance the way how the popular scipy/numpy python packages are tested: https://numpy.org/doc/stable/reference/testing.html#creating-many-similar-tests https://numpy.org/doc/stable/reference/testing.html#creating... (with assertions checking two numerical arrays for similarity) or for instance https://docs.scipy.org/doc/scipy/reference/generated/scipy.fft.fft.html#scipy.fft.fft https://docs.scipy.org/doc/scipy/reference/generated/scipy.f... (Example section where the output of an exemplaric fft run is printed as a 1D array which can be automatically checked by means of https://docs.python.org/3/library/doctest.html https://docs.python.org/3/library/doctest.html). Just to play the devil's advocate: Their ASCII representation of 1d data is error prone and violates minimalistic principles. It is nice to view at and surely easier to read compared to a binary digit sequence, but has little advantage compared to present day testing infrastructure.