Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
d0d64b5d
Commit
d0d64b5d
authored
Jun 17, 2020
by
Jialin Li
Browse files
Merge branch 'master' of github.com:FreakyPenguin/endhostsim-code
parents
01c6f4cb
649cfa51
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
8 deletions
+53
-8
Makefile
Makefile
+31
-0
corundum/Makefile
corundum/Makefile
+6
-2
proto/cosim_eth_proto.h
proto/cosim_eth_proto.h
+16
-6
No files found.
Makefile
0 → 100644
View file @
d0d64b5d
all
:
\
corundum/corundum_verilator
\
corundum_bm/corundum_bm
\
net_tap/net_tap
\
net_wire/net_wire
clean
:
make
-C
corundum/ clean
make
-C
corundum_bm/ clean
make
-C
net_tap/ clean
make
-C
net_wire/ clean
make
-C
nicsim_common/ clean
make
-C
netsim_common/ clean
corundum/corundum_verilator
:
nicsim_common/libnicsim_common.a
make
-C
corundum/ all
corundum_bm/corundum_bm
:
nicsim_common/libnicsim_common.a
make
-C
corundum_bm/ all
net_tap/net_tap
:
netsim_common/libnetsim_common.a
make
-C
net_tap/
net_wire/net_wire
:
netsim_common/libnetsim_common.a
make
-C
net_wire/
nicsim_common/libnicsim_common.a
:
make
-C
nicsim_common/
netsim_common/libnetsim_common.a
:
make
-C
netsim_common/
corundum/Makefile
View file @
d0d64b5d
...
@@ -7,16 +7,20 @@ VFLAGS = +1364-2005ext+v \
...
@@ -7,16 +7,20 @@ VFLAGS = +1364-2005ext+v \
SRCS
=
corundum_verilator.cpp dma.cpp mem.cpp
SRCS
=
corundum_verilator.cpp dma.cpp mem.cpp
mkfile_path
:=
$(
abspath
$(
lastword
$(MAKEFILE_LIST)
))
BASEDIR
:=
$(
abspath
$(
dir
$(mkfile_path)
)
/../
)
all
:
corundum_verilator
all
:
corundum_verilator
obj_dir/Vinterface.cpp
:
rtl/interface.v
obj_dir/Vinterface.cpp
:
rtl/interface.v
$(VERILATOR)
$(VFLAGS)
--cc
-O3
\
$(VERILATOR)
$(VFLAGS)
--cc
-O3
\
-CFLAGS
"-I
$(
PWD)
/..
/nicsim_common/include -I
$(
PWD)
/..
/proto -O3 -g -Wall"
\
-CFLAGS
"-I
$(
BASEDIR)
/nicsim_common/include -I
$(
BASEDIR)
/proto -O3 -g -Wall"
\
-y
rtl
\
-y
rtl
\
-y
lib/axi/rtl
\
-y
lib/axi/rtl
\
-y
lib/eth/lib/axis/rtl/
\
-y
lib/eth/lib/axis/rtl/
\
-y
./lib/pcie/rtl
\
-y
./lib/pcie/rtl
\
rtl/interface.v
--exe
$(SRCS)
"
$(
PWD)
/..
/nicsim_common/libnicsim_common.a"
rtl/interface.v
--exe
$(SRCS)
"
$(
BASEDIR)
/nicsim_common/libnicsim_common.a"
obj_dir/Vinterface
:
obj_dir/Vinterface.cpp $(SRCS)
obj_dir/Vinterface
:
obj_dir/Vinterface.cpp $(SRCS)
$(MAKE)
-C
obj_dir
-f
Vinterface.mk
$(MAKE)
-C
obj_dir
-f
Vinterface.mk
...
...
proto/cosim_eth_proto.h
View file @
d0d64b5d
...
@@ -58,20 +58,25 @@ struct cosim_eth_proto_net_intro {
...
@@ -58,20 +58,25 @@ struct cosim_eth_proto_net_intro {
#define COSIM_ETH_PROTO_D2N_MSG_SEND 0x2
#define COSIM_ETH_PROTO_D2N_MSG_SEND 0x2
struct
cosim_eth_proto_d2n_dummy
{
struct
cosim_eth_proto_d2n_dummy
{
uint8_t
pad
[
63
];
uint8_t
pad
[
48
];
uint64_t
timestamp
;
uint8_t
pad_
[
7
];
uint8_t
own_type
;
uint8_t
own_type
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
struct
cosim_eth_proto_d2n_sync
{
struct
cosim_eth_proto_d2n_sync
{
uint8_t
pad
[
48
];
uint64_t
timestamp
;
uint64_t
timestamp
;
uint8_t
pad
[
55
];
uint8_t
pad
_
[
7
];
uint8_t
own_type
;
uint8_t
own_type
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
struct
cosim_eth_proto_d2n_send
{
struct
cosim_eth_proto_d2n_send
{
uint16_t
len
;
uint16_t
len
;
uint8_t
port
;
uint8_t
port
;
uint8_t
pad
[
60
];
uint8_t
pad
[
45
];
uint64_t
timestamp
;
uint8_t
pad_
[
7
];
uint8_t
own_type
;
uint8_t
own_type
;
uint8_t
data
[];
uint8_t
data
[];
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
...
@@ -97,20 +102,25 @@ union cosim_eth_proto_d2n {
...
@@ -97,20 +102,25 @@ union cosim_eth_proto_d2n {
#define COSIM_ETH_PROTO_N2D_MSG_RECV 0x2
#define COSIM_ETH_PROTO_N2D_MSG_RECV 0x2
struct
cosim_eth_proto_n2d_dummy
{
struct
cosim_eth_proto_n2d_dummy
{
uint8_t
pad
[
63
];
uint8_t
pad
[
48
];
uint64_t
timestamp
;
uint8_t
pad_
[
7
];
uint8_t
own_type
;
uint8_t
own_type
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
struct
cosim_eth_proto_n2d_sync
{
struct
cosim_eth_proto_n2d_sync
{
uint8_t
pad
[
48
];
uint64_t
timestamp
;
uint64_t
timestamp
;
uint8_t
pad
[
55
];
uint8_t
pad
_
[
7
];
uint8_t
own_type
;
uint8_t
own_type
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
struct
cosim_eth_proto_n2d_recv
{
struct
cosim_eth_proto_n2d_recv
{
uint16_t
len
;
uint16_t
len
;
uint8_t
port
;
uint8_t
port
;
uint8_t
pad
[
60
];
uint8_t
pad
[
45
];
uint64_t
timestamp
;
uint8_t
pad_
[
7
];
uint8_t
own_type
;
uint8_t
own_type
;
uint8_t
data
[];
uint8_t
data
[];
};
};
...
...
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