File tree Expand file tree Collapse file tree 4 files changed +27
-5
lines changed Expand file tree Collapse file tree 4 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -878,6 +878,8 @@ struct ParMYSPass : public Pass {
878
878
global_args.exact_mults = -1 ;
879
879
global_args.mults_ratio = -1.0 ;
880
880
881
+ set_default_config ();
882
+
881
883
log_header (design, " Starting parmys pass.\n " );
882
884
883
885
size_t argidx;
@@ -918,6 +920,10 @@ struct ParMYSPass : public Pass {
918
920
global_args.mults_ratio = atof (args[++argidx].c_str ());
919
921
continue ;
920
922
}
923
+ if (args[argidx] == " -adder_cin_global" ) {
924
+ configuration.adder_cin_global = true ;
925
+ continue ;
926
+ }
921
927
}
922
928
extra_args (args, argidx, design);
923
929
@@ -935,7 +941,6 @@ struct ParMYSPass : public Pass {
935
941
}
936
942
937
943
mixer = new HardSoftLogicMixer ();
938
- set_default_config ();
939
944
940
945
if (global_args.mults_ratio >= 0.0 && global_args.mults_ratio <= 1.0 ) {
941
946
delete mixer->_opts [MULTIPLY];
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ techmap -map +/parmys/aldffe2dff.v
66
66
67
67
opt -full
68
68
69
- parmys -a QQQ -nopass -c CCC YYY
69
+ parmys -a QQQ -nopass -c CCC ADDERCINGLOBAL
70
70
71
71
opt -full
72
72
Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ def init_script_file(
54
54
architecture_file_path ,
55
55
odin_config_full_path ,
56
56
include_dir = '.' ,
57
- top_module = '-auto-top'
57
+ top_module = '-auto-top' ,
58
+ adder_cin_global = False
58
59
):
59
60
"""initializing the raw yosys script file"""
60
61
# specify the input files type
@@ -74,6 +75,7 @@ def init_script_file(
74
75
"QQQ" : architecture_file_path ,
75
76
"SEARCHPATH" : include_dir ,
76
77
"TOPMODULE" : top_module ,
78
+ "ADDERCINGLOBAL" : "-adder_cin_global" if adder_cin_global else ""
77
79
},
78
80
)
79
81
@@ -227,6 +229,11 @@ def run(
227
229
top_module = '-top ' + parmys_args ['topmodule' ]
228
230
del parmys_args ['topmodule' ]
229
231
232
+ adder_cin_global = False
233
+ if ('adder_cin_global' in parmys_args ):
234
+ adder_cin_global = parmys_args ['adder_cin_global' ]
235
+ del parmys_args ['adder_cin_global' ]
236
+
230
237
odin_base_config = str (vtr .paths .odin_cfg_path )
231
238
232
239
# Copy the config file
@@ -251,7 +258,8 @@ def run(
251
258
architecture_file_path ,
252
259
odin_config_full_path ,
253
260
include_dir = include_dir ,
254
- top_module = top_module
261
+ top_module = top_module ,
262
+ adder_cin_global = adder_cin_global
255
263
)
256
264
257
265
# set the parser
Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ def vtr_command_argparser(prog=None):
295
295
help = "Tells ODIN II the adder type used in this configuration" ,
296
296
)
297
297
odin .add_argument (
298
- "-adder_cin_global " ,
298
+ "-adder_cin_global_odin " ,
299
299
default = False ,
300
300
action = "store_true" ,
301
301
dest = "adder_cin_global" ,
@@ -384,6 +384,14 @@ def vtr_command_argparser(prog=None):
384
384
dest = 'searchpath' ,
385
385
help = 'search path for verilog files'
386
386
)
387
+ parmys .add_argument (
388
+ "-adder_cin_global" ,
389
+ default = False ,
390
+ action = "store_true" ,
391
+ dest = "adder_cin_global" ,
392
+ help = "Tells Parmys to connect the first cin in an adder/subtractor"
393
+ + "chain to a global gnd/vdd net." ,
394
+ )
387
395
#
388
396
# VPR arguments
389
397
#
@@ -748,6 +756,7 @@ def process_parmys_args(args):
748
756
parmys_args ["parser" ] = args .parser
749
757
parmys_args ["topmodule" ] = args .topmodule
750
758
parmys_args ['searchpath' ] = args .searchpath
759
+ parmys_args ["adder_cin_global" ] = args .adder_cin_global
751
760
return parmys_args
752
761
753
762
You can’t perform that action at this time.
0 commit comments