Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ramulator_bazel
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songxinkai
ramulator_bazel
Commits
65570b1c
Commit
65570b1c
authored
Nov 30, 2019
by
songxinkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after isca 2020
parent
3700081a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
25 deletions
+32
-25
configs/DDR4-config.cfg
+1
-1
ramulator/BUILD
+1
-1
ramulator/read_bin_edge.cpp
+27
-21
run.sh
+3
-2
No files found.
configs/DDR4-config.cfg
View file @
65570b1c
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
speed = DDR4_2400R
speed = DDR4_2400R
org = DDR4_4Gb_x8
org = DDR4_4Gb_x8
# record_cmd_trace: (default is off): on, off
# record_cmd_trace: (default is off): on, off
record_cmd_trace = o
n
record_cmd_trace = o
ff
# print_cmd_trace: (default is off): on, off
# print_cmd_trace: (default is off): on, off
print_cmd_trace = off
print_cmd_trace = off
...
...
ramulator/BUILD
View file @
65570b1c
...
@@ -7,7 +7,7 @@ cc_binary(
...
@@ -7,7 +7,7 @@ cc_binary(
"ram",
"ram",
],
],
copts=[
copts=[
"-O
3
",
"-O
0
",
"-std=c++11",
"-std=c++11",
"-g",
"-g",
"-Wall",
"-Wall",
...
...
ramulator/read_bin_edge.cpp
View file @
65570b1c
...
@@ -10,44 +10,50 @@
...
@@ -10,44 +10,50 @@
using
namespace
ramulator
;
using
namespace
ramulator
;
using
namespace
std
;
using
namespace
std
;
#define CHANNEL_NUM 6
// #define CHANNEL_NUM 1
int
main
(
int
argc
,
const
char
*
argv
[]){
int
main
(
int
argc
,
const
char
*
argv
[]){
if
(
argc
<
3
)
{
if
(
argc
<
4
)
{
printf
(
"Usage: %s <configs-file> <bin-edges-file>
\n
"
printf
(
"Usage: %s <configs-file> <bin-edges-file>
\n
"
"Example: %s ramulator-configs.cfg edges.bin
\n
"
,
"Example: %s ramulator-configs.cfg edges.bin
\n
"
,
argv
[
0
],
argv
[
0
]);
argv
[
0
],
argv
[
0
]);
return
0
;
return
0
;
}
}
vector
<
Ram
<
DDR4
>*
>
ram
;
vector
<
Ram
<
DDR4
>*
>
ram
;
vector
<
double
>
last_clock_
;
int
CHANNEL_NUM
=
stoi
(
argv
[
3
]);
for
(
int
i
=
0
;
i
<
CHANNEL_NUM
;
++
i
){
for
(
int
i
=
0
;
i
<
CHANNEL_NUM
;
++
i
){
ram
.
push_back
(
new
Ram
<
DDR4
>
(
argv
[
1
]));
ram
.
push_back
(
new
Ram
<
DDR4
>
(
argv
[
1
]));
last_clock_
.
push_back
(
double
(
0.0
));
}
}
const
int
vertex_unit_len
=
16
;
const
int
vertex_unit_len
=
16
;
ifstream
fedge
(
argv
[
2
],
ios
::
in
|
ios
::
binary
);
int
request_num
=
0
;
int
request_num
=
0
;
int
*
buf
=
new
int
[
4
];
int
*
buf
=
new
int
[
4
];
ifstream
fedge
(
argv
[
2
],
ios
::
in
|
ios
::
binary
);
long
i
=
0
;
long
total_access
=
0
;
long
total_access
=
0
;
cout
<<
"channel_num: "
<<
CHANNEL_NUM
<<
endl
;
while
(
!
fedge
.
eof
()){
while
(
!
fedge
.
eof
()){
fedge
.
read
((
char
*
)
buf
,
4
*
sizeof
(
int
));
fedge
.
read
((
char
*
)
buf
,
4
*
sizeof
(
int
));
if
(
buf
[
2
]
==
0
)
{
if
(
buf
[
2
]
==
0
)
{
continue
;
continue
;
}
else
{
}
else
{
++
total_access
;
++
total_access
;
++
request_num
;
}
}
if
(
i
%
1000000
==
0
){
if
(
total_access
%
1000000
==
0
){
cout
<<
"edge_id: "
<<
i
<<
", request_num: "
<<
request_num
cout
<<
"edge_id: "
<<
total_access
;
<<
", clk_ns: "
<<
ram
[
i
%
CHANNEL_NUM
]
->
GetClockNs
()
cout
<<
", clk_ms: "
;
<<
", clk_us: "
<<
ram
[
i
%
CHANNEL_NUM
]
->
GetClockUs
()
double
total_delta
=
0
;
<<
", clk_ms: "
<<
ram
[
i
%
CHANNEL_NUM
]
->
GetClockMs
()
for
(
int
j
=
0
;
j
<
CHANNEL_NUM
;
++
j
){
<<
", clk_s: "
<<
ram
[
i
%
CHANNEL_NUM
]
->
GetClockS
()
cout
<<
ram
[
j
]
->
GetClockMs
()
<<
", "
;
<<
endl
;
last_clock_
[
j
]
=
ram
[
j
]
->
GetClockMs
();
total_delta
+=
ram
[
j
]
->
GetClockMs
()
-
last_clock_
[
j
];
}
cout
<<
"total_delta: "
<<
total_delta
<<
endl
;
//break;
}
}
i
++
;
request_num
++
;
long
addr
=
0
+
buf
[
1
]
*
vertex_unit_len
*
4
;
long
addr
=
0
+
buf
[
1
]
*
vertex_unit_len
*
4
;
while
(
!
ram
[
(
buf
[
1
])
%
CHANNEL_NUM
]
->
AccessCommand
(
addr
,
Request
::
Type
::
READ
,
while
(
!
ram
[
total_access
%
CHANNEL_NUM
]
->
AccessCommand
(
addr
,
Request
::
Type
::
READ
,
[
&
request_num
](
Request
&
req
){
[
&
request_num
](
Request
&
req
){
request_num
--
;
request_num
--
;
assert
(
request_num
>
0
);
assert
(
request_num
>
0
);
...
@@ -60,12 +66,12 @@ int main(int argc, const char *argv[]){
...
@@ -60,12 +66,12 @@ int main(int argc, const char *argv[]){
ram
[
i
]
->
WaitFor
(
1
);
ram
[
i
]
->
WaitFor
(
1
);
}
}
}
}
cout
<<
"total_data: "
<<
total_access
<<
endl
;
//
cout << "total_data: " << total_access << endl;
for
(
int
i
=
0
;
i
<
CHANNEL_NUM
;
++
i
){
//
for (int i = 0; i < CHANNEL_NUM; ++i){
cout
<<
"Ram["
<<
i
<<
"]"
//
cout << "Ram[" << i << "]"
<<
", total time clk_ms: "
<<
ram
[
i
]
->
GetClockMs
()
//
<< ", total time clk_ms: " << ram[i]->GetClockMs()
<<
endl
;
//
<< endl;
}
//
}
return
0
;
return
0
;
}
}
...
...
run.sh
View file @
65570b1c
#!/bin/bash
#!/bin/bash
#./bazel-bin/ramulator/testram ./configs/DDR4-config.cfg $1
#./bazel-bin/ramulator/testram ./configs/DDR4-config.cfg $1
#./bazel-bin/ramulator/main ./configs/DDR4-config.cfg $1
#./bazel-bin/ramulator/main ./configs/DDR4-config.cfg $1
./bazel-bin/ramulator/testram_break ./configs/DDR4-config.cfg
$1
#
./bazel-bin/ramulator/testram_break ./configs/DDR4-config.cfg $1
#./bazel-bin/ramulator/read_bin_edge ./configs/DDR4-config.cfg /home/songxinkai/bin_edges/edges.reddit.fea16.bin
#./bazel-bin/ramulator/read_bin_edge ./configs/DDR4-config.cfg /home/songxinkai/bin_edges/edges.reddit.fea16.bin
#./bazel-bin/ramulator/read_bin_edge ./configs/HBM-config.cfg /home/songxinkai/bin_edges/edges.reddit.fea16.bin
./bazel-bin/ramulator/read_bin_edge ./configs/DDR4-config.cfg /home/songxinkai/bin_edges/edges.reddit.fea16.bin
$1
#gdb --args ./bazel-bin/ramulator/read_bin_edge ./configs/DDR4-config.cfg /LOG/group_reddit/reddit_group4096.dat
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