Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
62d60bf4
Commit
62d60bf4
authored
Sep 14, 2017
by
hongming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add etherbone module.
parent
228c1ac0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2007 additions
and
1992 deletions
+2007
-1992
devicelist.c
dev/devicelist.c
+2
-0
memlayout.h
include/hw/memlayout.h
+1
-0
ipv4.c
lib/ipv4.c
+8
-0
pfilter-builder.c
tools/pfilter-builder.c
+7
-3
wrc.bram
wrc.bram
+1989
-1989
No files found.
dev/devicelist.c
View file @
62d60bf4
...
...
@@ -18,6 +18,7 @@ unsigned char *BASE_PPS_GEN;
unsigned
char
*
BASE_SYSCON
;
unsigned
char
*
BASE_UART
;
unsigned
char
*
BASE_ONEWIRE
;
unsigned
char
*
BASE_ETHERBONE_CFG
;
unsigned
char
*
BASE_EXT_CFG
;
/* The sdb filesystem itself */
...
...
@@ -72,6 +73,7 @@ struct wrc_device devs[] = {
{
&
BASE_UART
,
VID_CERN
,
0xe2d13d04
},
{
&
BASE_ONEWIRE
,
VID_CERN
,
0x779c5443
},
{
&
BASE_EXT_CFG
,
VID_THU
,
0xc0413599
},
{
&
BASE_ETHERBONE_CFG
,
VID_GSI
,
0x68202b22
},
};
void
sdb_find_devices
(
void
)
...
...
include/hw/memlayout.h
View file @
62d60bf4
...
...
@@ -15,6 +15,7 @@ extern unsigned char *BASE_PPS_GEN;
extern
unsigned
char
*
BASE_SYSCON
;
extern
unsigned
char
*
BASE_UART
;
extern
unsigned
char
*
BASE_ONEWIRE
;
extern
unsigned
char
*
BASE_ETHERBONE_CFG
;
extern
unsigned
char
*
BASE_EXT_CFG
;
#define FMC_EEPROM_ADR 0x50
...
...
lib/ipv4.c
View file @
62d60bf4
...
...
@@ -200,8 +200,16 @@ DEFINE_WRC_TASK(ipv4) = {
void
setIP
(
unsigned
char
*
IP
)
{
volatile
unsigned
int
*
eb_ip
=
(
unsigned
int
*
)(
BASE_ETHERBONE_CFG
+
EB_IPV4
);
unsigned
int
ip
;
memcpy
(
myIP
,
IP
,
4
);
ip
=
(
myIP
[
0
]
<<
24
)
|
(
myIP
[
1
]
<<
16
)
|
(
myIP
[
2
]
<<
8
)
|
(
myIP
[
3
]);
while
(
*
eb_ip
!=
ip
)
*
eb_ip
=
ip
;
ext_config
(
IP
);
bootp_retry
=
0
;
...
...
tools/pfilter-builder.c
View file @
62d60bf4
...
...
@@ -224,6 +224,7 @@ enum pf_symbolic_regs {
FRAME_UDP
,
FRAME_TCP
,
PORT_UDP_HOST
,
PORT_UDP_ETHERBONE
,
R_TMP
,
/* These are results of logic over the previous bits */
...
...
@@ -419,13 +420,16 @@ void pfilter_init_novlan(char *fname)
pfilter_logic2
(
FRAME_UDP
,
FRAME_UDP
,
AND
,
FRAME_IP_OK
);
pfilter_cmp
(
18
,
0x0000
,
0xff00
,
MOV
,
PORT_UDP_HOST
);
/* ports 0-255 */
pfilter_cmp
(
18
,
0x0100
,
0xff00
,
OR
,
PORT_UDP_HOST
);
/* ports 256-511 */
pfilter_cmp
(
18
,
0xebd0
,
0xffff
,
MOV
,
PORT_UDP_ETHERBONE
);
/* ports 60368 */
/* The CPU gets those ports in a proper UDP frame, plus the previous selections */
pfilter_logic2
(
R_CLASS
(
1
),
FRAME_UDP
,
AND
,
PORT_UDP_HOST
);
/* and now copy out fabric selections: 7 etherbone, 6 for anything else */
pfilter_logic3
(
R_CLASS
(
5
),
PORT_UDP_HOST
,
NOT
,
R_ZERO
,
AND
,
FRAME_UDP
);
pfilter_logic2
(
R_CLASS
(
6
),
FRAME_TCP
,
AND
,
FRAME_IP_OK
);
/* and now copy out fabric selections: 4 etherbone, 6 for anything else */
pfilter_logic2
(
R_CLASS
(
4
),
FRAME_UDP
,
AND
,
PORT_UDP_ETHERBONE
);
pfilter_logic3
(
R_CLASS
(
6
),
PORT_UDP_HOST
,
OR
,
PORT_UDP_ETHERBONE
,
NAND
,
FRAME_UDP
);
pfilter_logic2
(
R_CLASS
(
7
),
FRAME_TCP
,
AND
,
FRAME_IP_OK
);
/*
* Note that earlier we used to be more strict in ptp ethtype (only proper multicast),
* but since we want to accept peer-delay sooner than later, we'd better avoid the checks
...
...
wrc.bram
View file @
62d60bf4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment