StanfordVLSI / dragonphy2

Open Source PHY v2
Apache License 2.0
21 stars 3 forks source link

Add system-level test of TX, and block-level test of TX data source #139

Closed sgherbst closed 3 years ago

sgherbst commented 3 years ago

Summary

This PR adds three self-checking tests to the regression suite:

  1. System-level loopback test with TX: the on-chip TX sends bits out of DragonPHY through a lossy channel, and they are received by the on-chip RX. DragonPHY recovers the bits using an MM-CDR and the bitstream is verified with the on-chip PRBS checker.
  2. Block-level TX data source test: Added self-checking capabilities to this test to verify CONSTANT, PULSE, SQUARE, and PRBS modes of operation for the TX data source.
  3. Block-level PRBS generator test: Added self-checking capabilities to this test to verify that the output of the synthesizable PRBS generator matches the sequence expected from the PRBS equation. This test and the previous test leverage new Python utility functions for verifying PRBS generators.

Details

  1. I renamed the JTAG register tx_data_gen_semaphore to tx_data_gen_exec, since the original name was confusing.
  2. In creating the system-level TX test, I noticed that the default value for tx_data_gen_exec was wrong (since it caused a bunch of on-chip signals to be X), so I flipped its value. This means that tx_data_gen_exec should initially be set to 0 by the user before modifying TX data generator JTAG registers, and then pulsed high to load the new values. This scheme is needed to avoid synchronization issues on the new clock domain associated with the TX.
  3. I removed the test tx_sim since it is redundant -- tx_top_sim is a superset.
  4. Unrelated to the TX, I noticed that some *.svcf (i.e., SimVision waveform setup) files had references to user-specific directories, so I fixed those.