Crate xvc_client

Crate xvc_client 

Source
Expand description

§XVC Client

A Rust client library for connecting to Xilinx Virtual Cable (XVC) servers and performing remote JTAG operations on FPGA devices.

§Overview

This crate provides a high-level client interface to XVC servers, allowing applications to interact with FPGA debug interfaces over network connections. It handles protocol communication, message serialization, and provides convenient methods for JTAG operations.

§Protocol Support

This implementation supports the XVC 1.0 protocol with the following operations:

  • GetInfo: Query server capabilities (version, max vector size)
  • SetTck: Configure the JTAG Test Clock (TCK) period
  • Shift: Perform JTAG vector shifting (TMS/TDI/TDO)

For detailed protocol information, see the xvc_protocol crate.

§Basic Usage

§Connecting to a Server

use xvc_client::XvcClient;
use std::net::SocketAddr;

let mut client = XvcClient::connect("127.0.0.1:2542")?;

// Query server capabilities
let info = client.get_info()?;
println!("Server version: {}", info.version());
println!("Max vector size: {} bytes", info.max_vector_size());

§Setting Clock Frequency

// Set TCK period to 10 nanoseconds
let actual_period = client.set_tck(10)?;
println!("Set TCK to {} ns", actual_period);

§Performing JTAG Shifts

// Perform a 8-bit JTAG shift
let num_bits = 8;
let tms = vec![0x00]; // Test Mode Select vector
let tdi = vec![0xA5]; // Test Data In vector

let tdo = client.shift(num_bits, tms, tdi)?;
println!("TDO data: {:?}", tdo);

Structs§

XvcClient
XVC client for remote JTAG operations.