Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmytro Levit
Software
Commits
62272789
Commit
62272789
authored
5 years ago
by
Patrick Robbe
Browse files
Options
Downloads
Patches
Plain Diff
Add program to read FPGA version
parent
bd74ff44
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
6links
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
Pcie40Applications/Makefile
+7
-0
7 additions, 0 deletions
Pcie40Applications/Makefile
Pcie40Applications/main_pcie40_readFPGAversion.c
+40
-0
40 additions, 0 deletions
Pcie40Applications/main_pcie40_readFPGAversion.c
with
48 additions
and
0 deletions
.gitignore
+
1
−
0
View file @
62272789
...
...
@@ -31,6 +31,7 @@ Pcie40Applications/pcie40_dma
Pcie40Applications/pcie40_b2linkreset
Pcie40Applications/pcie40_daq
Pcie40Applications/pcie40_ul
Pcie40Applications/pcie40_readFPGAversion
*.d
**/pcie40_reload.out
This diff is collapsed.
Click to expand it.
Pcie40Applications/Makefile
+
7
−
0
View file @
62272789
...
...
@@ -51,6 +51,12 @@ PCIE40_UL_CFLAGS =$(CFLAGS) -I$(TOP) -I$(TOP)/../Pcie40Driver
PCIE40_UL_INSTALL
=
$(
PREFIX
)
/bin
PCIE40_UL_LDFLAGS
=
-L
../Pcie40Libraries/lib
-lpcie40
-L
../Pcie40DriverLibraries/
-lpcie40driver_ecs
PCIE40_READFPGAVERSION
:=
pcie40_readFPGAversion
PCIE40_READFPGAVERSION_OBJS
=
main_pcie40_readFPGAversion.o
PCIE40_READFPGAVERSION_CFLAGS
=
$(
CFLAGS
)
-I
$(
TOP
)
-I
$(
TOP
)
/../Pcie40Driver
-I
$(
TOP
)
/../Pcie40DriverLibraries
PCIE40_READFPGAVERSION_INSTALL
=
$(
PREFIX
)
/bin
PCIE40_READFPGAVERSION_LDFLAGS
=
-L
../Pcie40Libraries/lib
-lpcie40
-L
../Pcie40DriverLibraries/
-lpcie40driver_ecs
VPATH
:=
$(
TOP
)
include
$(TOP)/rules.mk
...
...
@@ -62,6 +68,7 @@ $(eval $(call ODIR_template,PCIE40_B2LRESET))
$(
eval
$(
call ODIR_template,PCIE40_DMA
))
$(
eval
$(
call ODIR_template,PCIE40_DAQ
))
$(
eval
$(
call ODIR_template,PCIE40_UL
))
$(
eval
$(
call ODIR_template,PCIE40_READFPGAVERSION
))
$(
eval
$(
call COPY_template,SCRIPTS,755
))
$(
eval
$(
call LINK_template,PCIE40_RELOAD
))
$(
eval
$(
call ODIR_template,PCIE40_RELOAD_SUID
))
...
...
This diff is collapsed.
Click to expand it.
Pcie40Applications/main_pcie40_readFPGAversion.c
0 → 100644
+
40
−
0
View file @
62272789
/****************************************************************************************//**
* \file readFPGAMemoire.c
*
* lecture de la memore du FPGA
* la taille est de x octets
* l'adresse de depart de lecture vaut 0
*//********************************************************************************************/
#include
<stdio.h>
#include
<stdlib.h>
#include
<getopt.h>
#include
"ecs_driverlib.h"
#define SIZE_MEMO_FPGA 220
/* taille max de la memoire interne FPG */
int
main
(
int
argc
,
char
*
argv
[]){
int
board
=
0
;
int
i
;
unsigned
val
;
int
reg
=
0
;
char
contenuMemoireFPGA
[
SIZE_MEMO_FPGA
+
1
];
ecs_openLli
(
board
);
for
(
i
=
0
;
i
<
SIZE_MEMO_FPGA
;
i
++
)
{
if
(
ecs_iordLli
(
board
,
reg
,
&
val
)
!=
0
)
{
printf
(
"LLI bar2 Read fails at 0x%08x
\n
"
,
reg
);
exit
(
0
);
}
contenuMemoireFPGA
[
i
]
=
val
;
reg
+=
4
;
}
contenuMemoireFPGA
[
SIZE_MEMO_FPGA
+
1
]
=
'\0'
;
printf
(
"contenu memoire FPGA %s
\n
"
,
contenuMemoireFPGA
);
ecs_closeLli
(
board
);
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment