Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b2e029

Browse files
committed
Add a breakpoint in the example simulation testbench.
1 parent5c36aea commit0b2e029

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

‎example/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CXXFLAGS += -g -O0
66
CXXFLAGS += -DCXXRTL_SERVER_TRACE
77

88
design_sim: design_sim.cc design.cc
9-
clang++$(CXXFLAGS) -o$@$^
9+
clang++$(CXXFLAGS) -o$@$(abspath$^)
1010

1111
design.h: design.cc
1212
design.cc: design.v

‎example/design_sim.cc‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ int main(int argc, char **argv) {
2121
agent.step();
2222

2323
size_t steps =0;
24-
while (true) {
24+
do {
2525
agent.advance(1_ns);
2626
top.p_clk.set(false);
2727
agent.step();
2828

2929
agent.advance(1_ns);
3030
top.p_clk.set(true);
3131
agent.step();
32-
}
32+
33+
if (steps ==3)
34+
agent.breakpoint(CXXRTL_LOCATION);
35+
}while (steps++ <1000);
3336

3437
return0;
3538
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp