lerwys / bpm-software-old-bakcup

Repository containing the Beam Position Monitor Software
GNU Lesser General Public License v3.0
0 stars 1 forks source link

[llio:pcie] Allow a generic PCIe device number #1

Open lerwys opened 10 years ago

lerwys commented 10 years ago

Currently, on opening a PCIe device, it's hard-coded to the value "0". This works so far, as we only have a single FPGA board connected to the PCIe.

In the near future, we must support up to 6 FPGA boards (maybe more), so we need to make the device number an initialization parameter.

lerwys commented 10 years ago

Problem: We currectly have 2 options on initializing the PCIe driver:

1) Use a number that is concatenated with the string "/dev/fpga" and passed to the open syscall. 2) Use an arbitrary string that is passed to the open syscall.

We are currently using the second approach, so the device number can be 0, as it is not used. However, the "dev_mngr" must take care of this and format a correct string to be passed to the "dev_io" and eventually to the open syscall.

Solution: Implement a device monitor on "dev_mngr", so it can take care of formatting the correct string to be passed to "dev_io".