File structure
This is the file tree of qcrypto as of 29 September 2022.
├───errorcorrection
├───hardware
│ ├───electronics
│ └───timestampfirmware
├───readevents4
├───remotecrypto
│ └───data
│ └───blinding
├───timestamp3
├───timestamp7
│ └───lookuptables
└───usbtimetagdriver
├───designstuff
├───driver
└───hotplug
errorcorrection
Contains all code used in the error correction step of the QKD protocol. See this for an overview of what the code is doing.
hardware
Contains circuit diagrams and firmware for the timestamp.
readevents4
Older version of readevents code.
remotecrypto
Main workhorse of qcrypto. Contains multiple C programs that process timestamp data obtained from readevents program. See this for an overview of what the code is doing.
timestamp3
LEGACY CODE
This is a usb version of the readevents program, used for generating a stream of
consolidated timestamp events from ver. 3 of the timestamp card. This program is the
interface to a timestamp card, cleans up some bitorder issues and allows to
add detector time skews and/or a correction to a system time of the host
PC.
Files contained in this directory:
readevents3.c main code for timestamp card reader
timetag_io2.c functions close to the hardware
timetag_io2.h header definition for main program
usbtimetagio.h definitions of commands used both for ioctls() to the device driver and to the firmware in the USB timestamp card
makefile
Other files and information necessary to understand this better:
Circuit diagram, functional description of the timestamp card
Firmware of the USB interface, based on a Cypress FX2 chip. Code in directory sdcc/test3, program tp_7.c and friends. Needs serious cleanup.
USB device driver for the timestamp card, in usbtimetagdriver directory
timestamp7
Contains latest readevents program, used for generating a stream of consolidated timestamp events from a timestamp card. The files in this directory are listed below with a brief description. View the docstrings in the main code file for a more detailed description.
Files contained in this directory:
makefile
configtmst.h FPGA configuration register for the timestamp test unit
powerplay.c Program to test the power bit (Turns the power supply to the timestamp card on/off)
readevents5.c Reads in events from ver. 5 of the timestamp card
readevents6.c Reads in events from ver. 6 of the timestamp card
readevents7.c Reads in events from ver. 7 of the timestamp card
showdiff.c Test code to show time difference between events
timestampcontrol.h Commands to interface with the test timestamp unit
usbtimetagdriver
Contains usb driver for the timestamp card, some installation scripts and testing software for that driver.