-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathREADME
60 lines (49 loc) · 1.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Steps to compile
################
1. Download the latest PCI Utilites source from
https://www.kernel.org/pub/software/utils/pciutils/
(Or) Source can be clone from the GIT repository,
http://git.kernel.org/cgit/utils/pciutils/pciutils.git/
2. Compile the PCI Utilities by the following command,
$pci-utils> make
3. Compile the MCAP Library by the following make command,
$mcap-lib> make PCIUTILS_PATH=<PATH to PCI Utilities Source>
4. Compiling the MCAP library generates 'libmcap.a' and
example elf 'mcap' built on top of generated library.
Steps to Run
############
-> Running the 'mcap.elf' with '-h' lists all the options
that are available to communicate with the underlying
MCAP device,
$Linux> ./mcap -h
Usage: mcap [options]
Options:
-x Specify MCAP Device Id in hex (MANDATORY)
-p <file> Program Bitstream (.bin/.bit/.rbt)
-C <file> Partial Reconfiguration Clear File(.bin/.bit/.rbt)
-r Performs Simple Reset
-m Performs Module Reset
-f Performs Full Reset
-D Read Data Registers
-d Dump all the MCAP Registers
-v Verbose information of MCAP Device
-h/H Help
-a <address> [type [data]] Access Device Configuration Space
here type[data] - b for byte data [8 bits]
here type[data] - h for half word data [16 bits]
here type[data] - w for word data [32 bits]
NOTE: Specifying MCAP Device Id option is mandatory for the application
to run. For example,
$Linux> ./mcap -x 0x8011
Xilinx MCAP Device Found
NOTES
#####
. PCI Extended Capability Registers in Linux will only be
accessible with privileged user access. So, the example elf should
be run with ROOT permissions.
. To access device configuration space, 'type' in the above syntax should
be either b/h/w (byte/half-word/word). For example,
-> Reading a byte
./mcap -x 0x8011 -a 0x354 b
-> Writing a word
./mcap -x 0x8011 -a 0x354 w 0x3