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
4e704902
Commit
4e704902
authored
Jun 11, 2020
by
Antoine Kaufmann
Browse files
corundum: enable tracing for debug
parent
23a41e98
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
corundum/Makefile
corundum/Makefile
+1
-1
corundum/corundum_verilator.cpp
corundum/corundum_verilator.cpp
+7
-1
No files found.
corundum/Makefile
View file @
4e704902
...
@@ -10,7 +10,7 @@ SRCS = corundum_verilator.cpp dma.cpp mem.cpp
...
@@ -10,7 +10,7 @@ SRCS = corundum_verilator.cpp dma.cpp mem.cpp
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
--trace
\
-CFLAGS
"-I
$(PWD)
/../nicsim_common/include -I
$(PWD)
/../proto -O3 -g -Wall"
\
-CFLAGS
"-I
$(PWD)
/../nicsim_common/include -I
$(PWD)
/../proto -O3 -g -Wall"
\
-y
rtl
\
-y
rtl
\
-y
lib/axi/rtl
\
-y
lib/axi/rtl
\
...
...
corundum/corundum_verilator.cpp
View file @
4e704902
...
@@ -19,6 +19,7 @@ struct DMAOp;
...
@@ -19,6 +19,7 @@ struct DMAOp;
static
volatile
int
exiting
=
0
;
static
volatile
int
exiting
=
0
;
static
uint64_t
main_time
=
0
;
static
uint64_t
main_time
=
0
;
static
VerilatedVcdC
*
trace
;
...
@@ -660,6 +661,7 @@ class EthernetRx {
...
@@ -660,6 +661,7 @@ class EthernetRx {
}
}
top
.
rx_axis_tlast
=
(
packet_off
==
packet_len
);
top
.
rx_axis_tlast
=
(
packet_off
==
packet_len
);
}
}
trace
->
dump
(
main_time
);
}
else
{
}
else
{
// no data
// no data
top
.
rx_axis_tvalid
=
0
;
top
.
rx_axis_tvalid
=
0
;
...
@@ -728,7 +730,7 @@ static void msi_step(Vinterface &top)
...
@@ -728,7 +730,7 @@ static void msi_step(Vinterface &top)
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
Verilated
::
commandArgs
(
argc
,
argv
);
Verilated
::
commandArgs
(
argc
,
argv
);
//
Verilated::traceEverOn(true);
Verilated
::
traceEverOn
(
true
);
struct
cosim_pcie_proto_dev_intro
di
;
struct
cosim_pcie_proto_dev_intro
di
;
memset
(
&
di
,
0
,
sizeof
(
di
));
memset
(
&
di
,
0
,
sizeof
(
di
));
...
@@ -753,6 +755,9 @@ int main(int argc, char *argv[])
...
@@ -753,6 +755,9 @@ int main(int argc, char *argv[])
Vinterface
*
top
=
new
Vinterface
;
Vinterface
*
top
=
new
Vinterface
;
trace
=
new
VerilatedVcdC
;
top
->
trace
(
trace
,
99
);
trace
->
open
(
"debug.vcd"
);
MemWritePort
p_mem_write_ctrl_dma
(
MemWritePort
p_mem_write_ctrl_dma
(
top
->
ctrl_dma_ram_wr_cmd_sel
,
top
->
ctrl_dma_ram_wr_cmd_sel
,
...
@@ -890,6 +895,7 @@ int main(int argc, char *argv[])
...
@@ -890,6 +895,7 @@ int main(int argc, char *argv[])
}
}
report_outputs
(
top
);
report_outputs
(
top
);
trace
->
close
();
top
->
final
();
top
->
final
();
delete
top
;
delete
top
;
return
0
;
return
0
;
...
...
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