Skip to content

Commit f053693

Browse files
committed
[#72335] adjust peak_power.py script to trace2power result and experiment with gcd_tb
1 parent 3557eca commit f053693

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

tools/PeakPower/gcd_tb.v

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,25 @@ module gcd_tb();
4545
#clk_period
4646
#clk_period
4747
#clk_period
48+
49+
#clk_period reset = 1;
50+
#clk_period reset = 0;
51+
52+
#clk_period a = 1053775287; b = 412654; req_val = 1;
53+
#clk_period req_val = 0;
4854
#clk_period
4955
#clk_period
5056
#clk_period
5157
#clk_period
5258
#clk_period
53-
54-
reset = 1;
59+
#clk_period resp_rdy = 1;
60+
#clk_period resp_rdy = 0;
61+
#clk_period
62+
63+
#clk_period reset = 1;
5564
#clk_period reset = 0;
5665

57-
#clk_period a = 6545412886; b = 2158; req_val = 1;
66+
#clk_period a = 16; b = 8; req_val = 1;
5867
#clk_period req_val = 0;
5968
#clk_period
6069
#clk_period
@@ -64,11 +73,25 @@ module gcd_tb();
6473
#clk_period resp_rdy = 1;
6574
#clk_period resp_rdy = 0;
6675
#clk_period
76+
77+
#clk_period reset = 1;
78+
#clk_period reset = 0;
6779

68-
reset = 1;
80+
#clk_period a = 15; b = 12; req_val = 1;
81+
#clk_period req_val = 0;
82+
#clk_period
83+
#clk_period
84+
#clk_period
85+
#clk_period
86+
#clk_period
87+
#clk_period resp_rdy = 1;
88+
#clk_period resp_rdy = 0;
89+
#clk_period
90+
91+
#clk_period reset = 1;
6992
#clk_period reset = 0;
7093

71-
#clk_period a = 15; b = 150; req_val = 1;
94+
#clk_period a = 3873906103; b = 128000; req_val = 1;
7295
#clk_period req_val = 0;
7396
#clk_period
7497
#clk_period

tools/PeakPower/peak_power.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def search_for_total_power(report_power: list[str]):
7171
plt.plot(clock_cycles_indices, power_results, marker='o', linestyle='-', color='g')
7272

7373
plt.title("Power consumption over time")
74-
plt.xlabel("Clock cycles")
75-
plt.ylabel("Power consumption")
74+
plt.xlabel("Clock cycle")
75+
plt.ylabel("Power consumption (Watts)")
7676
plt.grid(True)
7777

7878
plt.show()

0 commit comments

Comments
 (0)