Skip to content

Latest commit

 

History

History
200 lines (140 loc) · 7.76 KB

File metadata and controls

200 lines (140 loc) · 7.76 KB

Voltage Measurement Tool

This directory contains the Windows host-side program used for voltage-transition measurement in the VolTune repository.

The program is intended to run from the MSYS2 environment and is used together with the FPGA-side voltage-control designs. It automatically writes the appropriate bitstream, configures the voltage-change parameters, records monitored voltage data, and saves settling-time-related results.

CAUTION

If an error occurs unexpectedly while running the test program, there is most likely a fatal problem with PMBus communication. If the test program is run again without powering off the KC705, the power settings of the KC705 may be corrupted, potentially causing fatal damage to the device.

Always restart the KC705 power before re-running the test.

This tool assumes the board has already completed normal bring-up and that the target rail is already enabled. It performs runtime voltage adjustment and sampled readback for the current prototype flow, not generic regulator initialization.

⚠️ Safety Disclaimer

Incorrect voltage settings or unsafe PMBus operations may permanently damage the target hardware. Users are solely responsible for verifying all rail mappings, voltage limits, and command semantics against the original vendor documentation before running this tool.

How to build

Execute the following command on MSYS2 (C:\msys64\mingw64.exe).

cd <Repository top>
./msys_build.sh

If you want to build them individually, execute the command as follows:

cd <Repository top>
mkdir build
cd build
cmake ../host
make -j voltage-measure

If the build is successful, the executable is generated under:

build/bin/voltage-measure.exe

Input file format

The input file is a configuration file in a CSV-like format. Lines beginning with # and empty lines are ignored.

Each line should contain the following six pieces of information.

  • Lane: Test voltage lane name
    • vccint
    • vccaux
    • vcc3v3
    • vadf
    • vcc2v5
    • vcc1v5
    • mgtavcc
    • mgtavtt
    • accaux_io
    • vccbram
    • mgtvccaux
  • Speed: Transceiver speed
    • none: no transceiver
    • 2.5g: 2.5 Gbps transceiver
    • 5g: 5 Gbps transceiver
    • 7.5g: 7.5 Gbps transceiver
    • 10g: 10 Gbps transceiver
  • Device 0 initial voltage
  • Device 0 target voltage
  • Device 1 initial voltage
  • Device 1 target voltage

Sample files

For example, the following line means that, using bitstreams without transceivers, Device0 changes MGTAVCC from 1.0 V to 0.7 V, and Device1 changes MGTAVCC from 0.8 V to 1.0 V.

mgtavcc, none, 1.0, 0.7, 0.8, 1.0

Output file format

When the program is executed, two types of CSV files are output.

  • Result CSV: a file containing the time taken for each test to change and information about the settings. The output file name can be changed with the -o option.
  • Voltage Monitoring CSV: an information file of the voltage monitored by the FPGA. One CSV file is generated for each test. The output directory can be changed with the -O option.

Example output

The following figure shows an example of the voltage-monitoring CSV output generated during a voltage-transition measurement.

Command line interface

voltage-measure.exe <CONFIG FILE> [OPTIONS]

Arguments

  • <CONFIG FILE>: test configuration CSV file

Options

  • -h: show help
  • -b <directory>: bitstream directory path, default is ./bitstream
  • -c <MHz>: external clock frequency in MHz, default is 125.000
  • -e <error margin>: error margin of voltage to detect settling times, default is 0.04 (= 4%)
  • -f <MHz>: FPGA base clock in MHz, default is 100
  • -n <size>: number of monitored voltage values to be read from the device, maximum is 2048, default is 100
  • -o <file>: output result CSV file, default is v_result.csv
  • -O <directory>: output voltage CSV directory
  • -p <port>: hw_server port
  • -r <repeat>: number of times the same test is run repeatedly
  • -s <speed>: PMBus speed, value is 100k, 400k, or 1m, default is 400k
  • -u <URL>: hw_server URL
  • -x <xsdb path>: xsdb path
  • -y: start test without warning message
  • -w <wait count>: time from setting the initial voltage and setting the target voltage, default is 0.5[s]
  • -sw: test software PowerManager only
  • -hw: test hardware PowerManager only
  • --log: show information-level log

Execution method

This tool supports testing at no transceiver, 2.5 Gbps, 5 Gbps, 7.5 Gbps, and 10 Gbps.

  1. Connect the Windows PC, clock board Si5391, and KC705 boards.
  2. Create test input file input1.csv for no transceiver, 2.5 Gbps, 5 Gbps, and 10 Gbps.
    • The external clock for 2.5 Gbps, 5 Gbps, and 10 Gbps is 125 MHz, so you can test with only one configuration file.
  3. Create test input file input2.csv for 7.5 Gbps.
  4. Set the clock output to 125 MHz in CBPro.
  5. Run:
voltage-measure.exe -b <Bitstream Directory> -o result1.csv -O result1 input1.csv
  1. Set the clock output to 117.188 MHz in CBPro.
  2. Run:
voltage-measure.exe -b <Bitstream Directory> -o result2.csv -O result2 -c 117.188 input2.csv

To run one setting multiple times, use the -r option to specify the number of times to repeat the setting.

Helper script

The following script automates the above steps:

It uses:

Results are output to the results folder.

Validation note

The settling-time values reported by this tool can be cross-checked against external oscilloscope measurements.

In this repository, the primary automated measurement path uses PMBus-based voltage readback recorded by the FPGA and exported as CSV data. For validation, the same voltage transition can also be observed with an oscilloscope. The PMBus-based trace and the oscilloscope waveform reach the same target voltage and show the same overall transition trend. A timing offset can appear because the PMBus-based trace is derived from discrete sampled readback, while the oscilloscope provides higher-time-resolution analog sampling. For consistency across configurations, this repository uses the PMBus-based sampled readback for automated settling-time analysis.

PMBus-based voltage readback

Oscilloscope waveform

Source files

  • args.hpp: CLI argument header
  • config.hpp: CSV-like input file header
  • result.hpp: result data header
  • regs.hpp: register access utility header
  • args.cpp: implementation of args.hpp
  • config.cpp: implementation of config.hpp
  • result.cpp: implementation of result.hpp
  • main.cpp: main program

Related files

Notes

  • Board-specific safe-voltage limits are not enforced generically by this tool and must be defined externally.
  • This tool is intended for controller characterization and voltage-transition measurement rather than BER and power case-study evaluation.
  • The host-side flow depends on the corresponding FPGA bitstreams and board setup being prepared correctly.
  • Clock-board setup is not automated by this tool and must be prepared separately.