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
4b89b515
"...composable_kernel_rocm.git" did not exist on "bfc997a7e69de42ac471f56c001725c9c438ac20"
Commit
4b89b515
authored
Jun 09, 2020
by
Antoine Kaufmann
Browse files
corundum: send packets out via ethernet protocol
parent
b13660a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
corundum/corundum_verilator.cpp
corundum/corundum_verilator.cpp
+17
-1
No files found.
corundum/corundum_verilator.cpp
View file @
4b89b515
...
...
@@ -562,6 +562,20 @@ class EthernetTx {
void
packet_done
()
{
volatile
union
cosim_eth_proto_d2n
*
msg
=
nicsim_d2n_alloc
();
volatile
struct
cosim_eth_proto_d2n_send
*
send
;
if
(
!
msg
)
throw
"completion alloc failed"
;
send
=
&
msg
->
send
;
memcpy
((
void
*
)
send
->
data
,
packet_buf
,
packet_len
);
send
->
len
=
packet_len
;
//WMB();
send
->
own_type
=
COSIM_ETH_PROTO_D2N_MSG_SEND
|
COSIM_ETH_PROTO_D2N_OWN_NET
;
std
::
cerr
<<
"packet len="
<<
std
::
hex
<<
packet_len
<<
" "
;
for
(
size_t
i
=
0
;
i
<
packet_len
;
i
++
)
{
std
::
cerr
<<
(
unsigned
)
packet_buf
[
i
]
<<
" "
;
...
...
@@ -610,7 +624,9 @@ int main(int argc, char *argv[])
di
.
pci_revision
=
0x00
;
di
.
pci_msi_nvecs
=
32
;
if
(
nicsim_init
(
&
di
,
"/tmp/cosim-pci"
,
NULL
,
"/dev/shm/dummy_nic_shm"
))
{
if
(
nicsim_init
(
&
di
,
"/tmp/cosim-pci"
,
"/tmp/cosim-eth"
,
"/dev/shm/dummy_nic_shm"
))
{
return
EXIT_FAILURE
;
}
...
...
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