Skip to content

Commit 6aeaba8

Browse files
committed
[Infra]: - Adding a modified version of ch_intrinsics to benchmarks without `define macros
- Adding header files to cover the ch_intrinsics definitons - Adding the new test to vtr_reg_basic/check_include to test the new feature Signed-off-by: Seyed Alireza Damghani <[email protected]> m
1 parent 890fb59 commit 6aeaba8

File tree

8 files changed

+349
-5
lines changed

8 files changed

+349
-5
lines changed
Lines changed: 284 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
/*
2+
* Definitons is to provide in ./include/generic_definitons.vh
3+
*/
4+
5+
module memory_controller
6+
(
7+
clk,
8+
memory_controller_address,
9+
memory_controller_write_enable,
10+
memory_controller_in,
11+
memory_controller_out
12+
);
13+
input clk;
14+
input [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] memory_controller_address;
15+
input memory_controller_write_enable;
16+
input [`MEMORY_CONTROLLER_DATA_SIZE-1:0] memory_controller_in;
17+
output [`MEMORY_CONTROLLER_DATA_SIZE-1:0] memory_controller_out;
18+
reg [`MEMORY_CONTROLLER_DATA_SIZE-1:0] memory_controller_out;
19+
20+
21+
reg [4:0] str_address;
22+
reg str_write_enable;
23+
reg [7:0] str_in;
24+
wire [7:0] str_out;
25+
26+
single_port_ram _str (
27+
.clk( clk ),
28+
.addr( str_address ),
29+
.we( str_write_enable ),
30+
.data( str_in ),
31+
.out( str_out )
32+
);
33+
34+
35+
wire tag;
36+
37+
//must use all wires inside module.....
38+
assign tag = |memory_controller_address & |memory_controller_address & | memory_controller_in;
39+
reg [`MEMORY_CONTROLLER_TAG_SIZE-1:0] prevTag;
40+
always @(posedge clk)
41+
prevTag <= tag;
42+
always @( tag or memory_controller_address or memory_controller_write_enable or memory_controller_in)
43+
begin
44+
45+
case(tag)
46+
47+
1'b0:
48+
begin
49+
str_address = memory_controller_address[5-1+0:0];
50+
str_write_enable = memory_controller_write_enable;
51+
str_in[8-1:0] = memory_controller_in[8-1:0];
52+
end
53+
endcase
54+
55+
case(prevTag)
56+
57+
1'b0:
58+
memory_controller_out = str_out;
59+
endcase
60+
end
61+
62+
endmodule
63+
64+
65+
module memset
66+
(
67+
clk,
68+
reset,
69+
start,
70+
finish,
71+
return_val,
72+
m,
73+
c,
74+
n,
75+
memory_controller_write_enable,
76+
memory_controller_address,
77+
memory_controller_in,
78+
memory_controller_out
79+
);
80+
81+
output[`MEMORY_CONTROLLER_ADDR_SIZE-1:0] return_val;
82+
reg [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] return_val;
83+
input clk;
84+
input reset;
85+
input start;
86+
87+
output finish;
88+
reg finish;
89+
90+
input [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] m;
91+
input [31:0] c;
92+
input [31:0] n;
93+
94+
output [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] memory_controller_address;
95+
reg [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] memory_controller_address;
96+
97+
output memory_controller_write_enable;
98+
reg memory_controller_write_enable;
99+
100+
output [`MEMORY_CONTROLLER_DATA_SIZE-1:0] memory_controller_in;
101+
reg [`MEMORY_CONTROLLER_DATA_SIZE-1:0] memory_controller_in;
102+
103+
output [`MEMORY_CONTROLLER_DATA_SIZE-1:0] memory_controller_out;
104+
105+
reg [3:0] cur_state;
106+
107+
/*
108+
parameter Wait = 4'd0;
109+
parameter entry = 4'd1;
110+
parameter entry_1 = 4'd2;
111+
parameter entry_2 = 4'd3;
112+
parameter bb = 4'd4;
113+
parameter bb_1 = 4'd5;
114+
parameter bb1 = 4'd6;
115+
parameter bb1_1 = 4'd7;
116+
parameter bb_nph = 4'd8;
117+
parameter bb2 = 4'd9;
118+
parameter bb2_1 = 4'd10;
119+
parameter bb2_2 = 4'd11;
120+
parameter bb2_3 = 4'd12;
121+
parameter bb2_4 = 4'd13;
122+
parameter bb4 = 4'd14;
123+
*/
124+
125+
memory_controller memtroll (clk,memory_controller_address, memory_controller_write_enable, memory_controller_in, memory_controller_out);
126+
127+
128+
reg [31:0] indvar;
129+
reg var1;
130+
reg [31:0] tmp;
131+
reg [31:0] tmp8;
132+
reg var2;
133+
reg [31:0] var0;
134+
reg [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] scevgep;
135+
reg [`MEMORY_CONTROLLER_ADDR_SIZE-1:0] s_07;
136+
reg [31:0] indvar_next;
137+
reg exitcond;
138+
139+
always @(posedge clk)
140+
if (reset)
141+
cur_state <= 4'b0000;
142+
else
143+
case(cur_state)
144+
4'b0000:
145+
begin
146+
finish <= 1'b0;
147+
if (start == 1'b1)
148+
cur_state <= 4'b0001;
149+
else
150+
cur_state <= 4'b0000;
151+
end
152+
4'b0001:
153+
begin
154+
155+
156+
157+
var0 <= n & 32'b00000000000000000000000000000011;
158+
159+
cur_state <= 4'b0010;
160+
end
161+
4'b0010:
162+
begin
163+
164+
var1 <= 1'b0;
165+
var0 <= 32'b00000000000000000000000000000000;
166+
167+
cur_state <= 4'b0011;
168+
end
169+
4'b0011:
170+
begin
171+
172+
173+
if (|var1) begin
174+
cur_state <= 4'b0110;
175+
end
176+
else
177+
begin
178+
179+
cur_state <= 4'b0100;
180+
end
181+
end
182+
4'b0100:
183+
begin
184+
185+
cur_state <= 4'b0101;
186+
end
187+
4'b0101:
188+
begin
189+
cur_state <= 4'b0110;
190+
end
191+
4'b0110:
192+
begin
193+
194+
var2 <= | (n [31:4]);
195+
196+
cur_state <= 4'b0111;
197+
end
198+
4'b0111:
199+
begin
200+
201+
if (|var2)
202+
begin
203+
cur_state <= 4'b1110;
204+
end
205+
else
206+
begin
207+
cur_state <= 4'b1000;
208+
end
209+
end
210+
4'b1000:
211+
begin
212+
213+
tmp <= n ;
214+
215+
indvar <= 32'b00000000000000000000000000000000;
216+
cur_state <= 4'b1001;
217+
end
218+
4'b1001:
219+
begin
220+
221+
cur_state <= 4'b1010;
222+
end
223+
4'b1010:
224+
begin
225+
tmp8 <= indvar;
226+
indvar_next <= indvar;
227+
cur_state <= 4'b1011;
228+
end
229+
4'b1011:
230+
begin
231+
232+
scevgep <= (m & tmp8);
233+
234+
exitcond <= (indvar_next == tmp);
235+
236+
cur_state <= 4'b1100;
237+
end
238+
4'b1100:
239+
begin
240+
241+
s_07 <= scevgep;
242+
243+
cur_state <= 4'b1101;
244+
end
245+
4'b1101:
246+
247+
begin
248+
249+
250+
if (exitcond)
251+
begin
252+
cur_state <= 4'b1110;
253+
end
254+
else
255+
begin
256+
indvar <= indvar_next;
257+
cur_state <= 4'b1001;
258+
end
259+
end
260+
261+
262+
4'b1110:
263+
begin
264+
265+
return_val <= m;
266+
finish <= 1'b1;
267+
cur_state <= 4'b0000;
268+
end
269+
endcase
270+
271+
always @(cur_state)
272+
begin
273+
274+
case(cur_state)
275+
4'b1101:
276+
begin
277+
memory_controller_address = s_07;
278+
memory_controller_write_enable = 1'b1;
279+
memory_controller_in = c;
280+
end
281+
endcase
282+
end
283+
284+
endmodule
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
/*
3+
* DEFINITIONS
4+
*/
5+
`define MEMORY_CONTROLLER_ADDR_SIZE 32
6+
`define MEMORY_CONTROLLER_DATA_SIZE 32
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
/*
3+
* DEFINITIONS
4+
*/
5+
`define MEMORY_CONTROLLER_TAGS 1
6+
`define MEMORY_CONTROLLER_TAG_SIZE 1
7+
`define TAG__str 1'b0

vtr_flow/tasks/regression_tests/vtr_reg_basic/basic_no_timing/config/config.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55
# Path to directory of circuits to use
66
circuits_dir=benchmarks/verilog
77

8+
# Path to directory of includes circuits to use
9+
includes_dir=benchmarks/verilog/include
10+
811
# Path to directory of architectures to use
912
archs_dir=arch/no_timing/memory_sweep
1013

1114
# Add circuits to list to sweep
15+
circuit_list_add=ch_intrinsics_modified.v
1216
circuit_list_add=ch_intrinsics.v
1317
circuit_list_add=diffeq1.v
1418
circuit_list_add=single_wire.v
1519
circuit_list_add=single_ff.v
1620

21+
# Add circuits to includes list to sweep
22+
include_list_add=generic_definitions1.vh
23+
include_list_add=generic_definitions2.vh
24+
1725
# Add architectures to list to sweep
1826
arch_list_add=k4_N10_memSize16384_memData64.xml
1927

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
arch circuit script_params vtr_flow_elapsed_time error odin_synth_time max_odin_mem abc_depth abc_synth_time abc_cec_time abc_sec_time max_abc_mem ace_time max_ace_mem num_clb num_io num_memories num_mult vpr_status vpr_revision vpr_build_info vpr_compiler vpr_compiled hostname rundir max_vpr_mem num_primary_inputs num_primary_outputs num_pre_packed_nets num_pre_packed_blocks num_netlist_clocks num_post_packed_nets num_post_packed_blocks device_width device_height device_grid_tiles device_limiting_resources device_name pack_time placed_wirelength_est place_time place_quench_time min_chan_width routed_wirelength min_chan_width_route_success_iteration logic_block_area_total logic_block_area_used min_chan_width_routing_area_total min_chan_width_routing_area_per_tile min_chan_width_route_time
2-
k4_N10_memSize16384_memData64.xml ch_intrinsics.v common 1.83 0.03 8960 4 0.21 -1 -1 36092 -1 -1 72 99 1 0 success v8.0.0-2985-gac43b6bd1-dirty release IPO VTR_ASSERT_LEVEL=2 GNU 7.5.0 on Linux-4.15.0-60-generic x86_64 2020-11-03T08:54:06 betzgrp-wintermute.eecg.utoronto.ca /home/elgamma8/research/gold/vtr-verilog-to-routing 34468 99 130 378 508 1 260 302 13 13 169 clb auto 0.05 602 0.16 0.00 36 1421 8 3.33e+06 2.28e+06 481319. 2848.04 0.73
3-
k4_N10_memSize16384_memData64.xml diffeq1.v common 2.98 0.04 8784 23 0.24 -1 -1 34032 -1 -1 72 162 0 5 success v8.0.0-2985-gac43b6bd1-dirty release IPO VTR_ASSERT_LEVEL=2 GNU 7.5.0 on Linux-4.15.0-60-generic x86_64 2020-11-03T08:54:06 betzgrp-wintermute.eecg.utoronto.ca /home/elgamma8/research/gold/vtr-verilog-to-routing 37256 162 96 1214 1147 1 676 335 13 13 169 clb auto 0.14 4543 0.24 0.00 50 10225 50 3.33e+06 2.61e+06 641417. 3795.37 1.46
4-
k4_N10_memSize16384_memData64.xml single_wire.v common 0.28 0.01 5576 1 0.01 -1 -1 29552 -1 -1 0 1 0 0 success v8.0.0-2985-gac43b6bd1-dirty release IPO VTR_ASSERT_LEVEL=2 GNU 7.5.0 on Linux-4.15.0-60-generic x86_64 2020-11-03T08:54:06 betzgrp-wintermute.eecg.utoronto.ca /home/elgamma8/research/gold/vtr-verilog-to-routing 22644 1 1 1 2 0 1 2 3 3 9 -1 auto 0.00 2 0.00 0.00 2 1 1 30000 0 1489.46 165.495 0.00
5-
k4_N10_memSize16384_memData64.xml single_ff.v common 0.33 0.01 5472 1 0.01 -1 -1 29636 -1 -1 1 2 0 0 success v8.0.0-2985-gac43b6bd1-dirty release IPO VTR_ASSERT_LEVEL=2 GNU 7.5.0 on Linux-4.15.0-60-generic x86_64 2020-11-03T08:54:06 betzgrp-wintermute.eecg.utoronto.ca /home/elgamma8/research/gold/vtr-verilog-to-routing 22508 2 1 3 4 1 3 4 3 3 9 -1 auto 0.00 4 0.00 0.00 16 5 1 30000 30000 2550.78 283.420 0.01
1+
arch circuit script_params vtr_flow_elapsed_time error odin_synth_time max_odin_mem abc_depth abc_synth_time abc_cec_time abc_sec_time max_abc_mem ace_time max_ace_mem num_clb num_io num_memories num_mult vpr_status vpr_revision vpr_build_info vpr_compiler vpr_compiled hostname rundir max_vpr_mem num_primary_inputs num_primary_outputs num_pre_packed_nets num_pre_packed_blocks num_netlist_clocks num_post_packed_nets num_post_packed_blocks device_width device_height device_grid_tiles device_limiting_resources device_name pack_time placed_wirelength_est place_time place_quench_time min_chan_width routed_wirelength min_chan_width_route_success_iteration logic_block_area_total logic_block_area_used min_chan_width_routing_area_total min_chan_width_routing_area_per_tile min_chan_width_route_time
2+
k4_N10_memSize16384_memData64.xml ch_intrinsics_modified.v common 1.25 0.02 9304 4 0.17 -1 -1 40268 -1 -1 72 99 1 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 29304 99 130 378 508 1 260 302 13 13 169 clb auto 0.03 602 0.13 0.00 36 1421 8 3.33e+06 2.28e+06 481319. 2848.04 0.42
3+
k4_N10_memSize16384_memData64.xml ch_intrinsics.v common 1.07 0.03 9232 4 0.17 -1 -1 40260 -1 -1 72 99 1 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 29276 99 130 378 508 1 260 302 13 13 169 clb auto 0.03 602 0.12 0.00 36 1421 8 3.33e+06 2.28e+06 481319. 2848.04 0.27
4+
k4_N10_memSize16384_memData64.xml diffeq1.v common 3.00 0.02 9076 23 0.22 -1 -1 38816 -1 -1 72 162 0 5 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 34108 162 96 1214 1147 1 676 335 13 13 169 clb auto 0.12 4543 0.20 0.00 52 9173 16 3.33e+06 2.61e+06 671819. 3975.26 1.70
5+
k4_N10_memSize16384_memData64.xml single_wire.v common 0.15 0.01 5700 1 0.00 -1 -1 33572 -1 -1 0 1 0 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 22540 1 1 1 2 0 1 2 3 3 9 -1 auto 0.00 2 0.00 0.00 2 1 1 30000 0 1489.46 165.495 0.00
6+
k4_N10_memSize16384_memData64.xml single_ff.v common 0.16 0.00 5732 1 0.00 -1 -1 33548 -1 -1 1 2 0 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 22516 2 1 3 4 1 3 4 3 3 9 -1 auto 0.00 4 0.00 0.00 16 5 1 30000 30000 2550.78 283.420 0.00
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
##############################################
2+
# Configuration file for running experiments
3+
##############################################
4+
5+
# Path to directory of circuits to use
6+
circuits_dir=benchmarks/check_include
7+
8+
# Path to directory of includes circuits to use
9+
includes_dir=benchmarks/check_include/include
10+
11+
# Path to directory of architectures to use
12+
archs_dir=arch/no_timing/memory_sweep
13+
14+
# Add circuits to list to sweep
15+
circuit_list_add=ch_intrinsics_modified.v
16+
17+
# Add circuits to includes list to sweep
18+
include_list_add=generic_definitions1.vh
19+
include_list_add=generic_definitions2.vh
20+
21+
# Add architectures to list to sweep
22+
arch_list_add=k4_N10_memSize16384_memData64.xml
23+
24+
# Parse info and how to parse
25+
parse_file=vpr_no_timing.txt
26+
27+
# How to parse QoR info
28+
qor_parse_file=qor_no_timing.txt
29+
30+
# Script parameters
31+
script_params_common=-track_memory_usage --timing_analysis off
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
arch circuit script_params vtr_flow_elapsed_time error odin_synth_time max_odin_mem abc_depth abc_synth_time abc_cec_time abc_sec_time max_abc_mem ace_time max_ace_mem num_clb num_io num_memories num_mult vpr_status vpr_revision vpr_build_info vpr_compiler vpr_compiled hostname rundir max_vpr_mem num_primary_inputs num_primary_outputs num_pre_packed_nets num_pre_packed_blocks num_netlist_clocks num_post_packed_nets num_post_packed_blocks device_width device_height device_grid_tiles device_limiting_resources device_name pack_time placed_wirelength_est place_time place_quench_time min_chan_width routed_wirelength min_chan_width_route_success_iteration logic_block_area_total logic_block_area_used min_chan_width_routing_area_total min_chan_width_routing_area_per_tile min_chan_width_route_time
2+
k4_N10_memSize16384_memData64.xml ch_intrinsics_modified.v common 1.25 0.02 9304 4 0.17 -1 -1 40268 -1 -1 72 99 1 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 29304 99 130 378 508 1 260 302 13 13 169 clb auto 0.03 602 0.13 0.00 36 1421 8 3.33e+06 2.28e+06 481319. 2848.04 0.42
3+
k4_N10_memSize16384_memData64.xml ch_intrinsics.v common 1.07 0.03 9232 4 0.17 -1 -1 40260 -1 -1 72 99 1 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 29276 99 130 378 508 1 260 302 13 13 169 clb auto 0.03 602 0.12 0.00 36 1421 8 3.33e+06 2.28e+06 481319. 2848.04 0.27
4+
k4_N10_memSize16384_memData64.xml diffeq1.v common 3.00 0.02 9076 23 0.22 -1 -1 38816 -1 -1 72 162 0 5 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 34108 162 96 1214 1147 1 676 335 13 13 169 clb auto 0.12 4543 0.20 0.00 52 9173 16 3.33e+06 2.61e+06 671819. 3975.26 1.70
5+
k4_N10_memSize16384_memData64.xml single_wire.v common 0.15 0.01 5700 1 0.00 -1 -1 33572 -1 -1 0 1 0 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 22540 1 1 1 2 0 1 2 3 3 9 -1 auto 0.00 2 0.00 0.00 2 1 1 30000 0 1489.46 165.495 0.00
6+
k4_N10_memSize16384_memData64.xml single_ff.v common 0.16 0.00 5732 1 0.00 -1 -1 33548 -1 -1 1 2 0 0 success v8.0.0-3718-g24b43911e release IPO VTR_ASSERT_LEVEL=2 GNU 9.3.0 on Linux-5.8.0-55-generic x86_64 2021-06-09T22:40:32 CASA44 /home/casauser/Desktop/Repos/sdamghan/vtr_flow/scripts 22516 2 1 3 4 1 3 4 3 3 9 -1 auto 0.00 4 0.00 0.00 16 5 1 30000 30000 2550.78 283.420 0.00
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
regression_tests/vtr_reg_basic/basic_no_timing
22
regression_tests/vtr_reg_basic/basic_timing
33
regression_tests/vtr_reg_basic/basic_timing_no_sdc
4+
regression_tests/vtr_reg_basic/check_include

0 commit comments

Comments
 (0)