@@ -49,13 +49,14 @@ placement_grid_y = 0.048 * MOCK_ARRAY_SCALE
4949#
5050# pitch_x, pitch_y - placement pitch for each Element, in x and y direction
5151# specification are in unit of placement grid
52- rows = 8
52+ rows = 4
5353
54- cols = 8
54+ cols = 4
5555
56- ce_x = 20
56+ # Use smallest working value for minimum area of test-case
57+ ce_x = 8
5758
58- ce_y = 20
59+ ce_y = 8
5960
6061# Element size is set to multiple of placement grid above
6162ce_width = ce_x * placement_grid_x
@@ -69,19 +70,19 @@ pitch_x = ce_width
6970pitch_y = ce_height + (placement_grid_y * 2 )
7071
7172# top level core offset
72- margin_x = placement_grid_x
73+ margin_x = placement_grid_x * 2
7374
74- margin_y = placement_grid_y
75+ margin_y = placement_grid_y * 2
7576
7677# Element core margin
7778ce_margin_x = placement_grid_x * 0.5
7879
7980ce_margin_y = placement_grid_y * 0.5
8081
8182# PDN problems if it is smaller. Not investigated.
82- array_spacing_x = margin_x * 2
83+ array_spacing_x = placement_grid_x * 4
8384
84- array_spacing_y = margin_y * 2
85+ array_spacing_y = placement_grid_y * 4
8586
8687# top level core and die size, we need some space around the
8788# array to put some flip flops and buffers for top level io pins
@@ -90,7 +91,7 @@ core_width = (
9091)
9192
9293core_height = (
93- pitch_y * (rows - 1 ) + ce_height + margin_x * 2
94+ pitch_y * (rows - 1 ) + ce_height + margin_y * 2
9495)
9596
9697die_width = core_width + (array_spacing_x * 2 )
@@ -371,6 +372,21 @@ MACROS = [
371372 srcs = [
372373 "simulate.cpp" ,
373374 ],
375+ # Best way to refer to static names in Verilator generated code?
376+ copts = [
377+ "-DARRAY_COLS=\" {}\" " .format (
378+ "," .join ([
379+ "&top->io_ins_down_{col}, &top->io_ins_up_{col}" .format (col = col )
380+ for col in range (cols )
381+ ]),
382+ ),
383+ "-DARRAY_ROWS=\" {}\" " .format (
384+ "," .join ([
385+ "&top->io_ins_left_{row}, &top->io_ins_right_{row}" .format (row = row )
386+ for row in range (rows )
387+ ]),
388+ ),
389+ ],
374390 cxxopts = [
375391 "-std=c++23" ,
376392 ],
@@ -429,6 +445,8 @@ POWER_TESTS = [
429445 ),
430446 ],
431447 arguments = {
448+ "ARRAY_COLS" : str (cols ),
449+ "ARRAY_ROWS" : str (rows ),
432450 "LOAD_POWER_TCL" : "$(location :load_power.tcl)" ,
433451 "OPENROAD_EXE" : "$(location //src/sta:opensta)" ,
434452 "OUTPUT" : "$(location :{name}_{stage}.txt)" .format (
0 commit comments