Abstract: A virtual endpoint-based address allocation scheme for PCIe switches is proposed for the PCIe bus characteristics, combined with the application characteristics of industrial control equipment and the convenience of design, debugging and problem finding. By analyzing the enumeration and resource allocation process of PCIe devices, adding virtual endpoints to the PCIe switch system topology, designing a fixed allocation mechanism for PCIe peripheral address space, and giving a formula for calculating the physical slot number of peripherals, the faulty peripheral can be quickly located at the moment of peripheral interaction failure. Through experimental verification, the address allocation scheme can realize the fixed address space allocated to the valid endpoints accessed under each downstream virtual PCI bridge in the device supporting hot-swapping, regardless of the number, type and location of peripheral board operation changes, and eliminates the traversal query peripheral address link to improve the efficiency of data transmission, which is beneficial to the PCIe bus can be more conveniently applied to the industrial control field.
Key words : PCIe bus,;switch system;virtual endpoint,;topology,;address assignment