summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-09-24 00:33:16 -0400
committerAlan Mishchenko <alanmi@berkeley.edu>2014-09-24 00:33:16 -0400
commitad079f7207029626d3fe030e2c6554d0854db13d (patch)
treebc12e4901d0168cf0dc94dea5d3797677225330b
parentea9c1c0bffaaab84fcff24272b9b5788c63d9a58 (diff)
downloadabc-ad079f7207029626d3fe030e2c6554d0854db13d.tar.gz
abc-ad079f7207029626d3fe030e2c6554d0854db13d.tar.bz2
abc-ad079f7207029626d3fe030e2c6554d0854db13d.zip
Added switch -t to &flow2.
-rw-r--r--src/aig/gia/giaScript.c10
-rw-r--r--src/base/abci/abc.c13
2 files changed, 14 insertions, 9 deletions
diff --git a/src/aig/gia/giaScript.c b/src/aig/gia/giaScript.c
index 60be82f6..714843ce 100644
--- a/src/aig/gia/giaScript.c
+++ b/src/aig/gia/giaScript.c
@@ -491,13 +491,13 @@ void Gia_ManPerformFlow( int fIsMapped, int nAnds, int nLevels, int nLutSize, in
SeeAlso []
***********************************************************************/
-void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fVerbose )
+void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fMinAve, int fVerbose )
{
char Comm1[100], Comm2[100], Comm3[100], Comm4[100];
- sprintf( Comm1, "&synch2 -K %d; &if -m -K %d -C %d; &save", nLutSize, nLutSize, nCutNum );
- sprintf( Comm2, "&dch -f; &if -m -K %d -C %d; &save", nLutSize, nCutNum+4 );
- sprintf( Comm3, "&synch2 -K %d; &lf -m -E 5 -K %d -C %d; &save", nLutSize, nLutSize, nCutNum );
- sprintf( Comm4, "&dch -f; &lf -mk -E 5 -K %d -C %d; &save", nLutSize, nCutNum+4 );
+ sprintf( Comm1, "&synch2 -K %d; &if -m%s -K %d -C %d; &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum );
+ sprintf( Comm2, "&dch -f; &if -m%s -K %d -C %d; &save", fMinAve?"t":"", nLutSize, nCutNum+4 );
+ sprintf( Comm3, "&synch2 -K %d; &lf -m%s -E 5 -K %d -C %d; &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum );
+ sprintf( Comm4, "&dch -f; &lf -m%sk -E 5 -K %d -C %d; &save", fMinAve?"t":"", nLutSize, nCutNum+4 );
// perform synthesis
if ( fVerbose )
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index c05b8af6..1a25829c 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -30992,13 +30992,14 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Flow2( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- extern void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fVerbose );
+ extern void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fMinAve, int fVerbose );
int nLutSize = 6;
int nCutNum = 8;
int fBalance = 0;
+ int fMinAve = 0;
int c, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "KCbvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "KCbtvh" ) ) != EOF )
{
switch ( c )
{
@@ -31027,6 +31028,9 @@ int Abc_CommandAbc9Flow2( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'b':
fBalance ^= 1;
break;
+ case 't':
+ fMinAve ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -31041,15 +31045,16 @@ int Abc_CommandAbc9Flow2( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Flow2(): There is no AIG.\n" );
return 1;
}
- Gia_ManPerformFlow2( Gia_ManHasMapping(pAbc->pGia), Gia_ManAndNum(pAbc->pGia), Gia_ManLevelNum(pAbc->pGia), nLutSize, nCutNum, fBalance, fVerbose );
+ Gia_ManPerformFlow2( Gia_ManHasMapping(pAbc->pGia), Gia_ManAndNum(pAbc->pGia), Gia_ManLevelNum(pAbc->pGia), nLutSize, nCutNum, fBalance, fMinAve, fVerbose );
return 0;
usage:
- Abc_Print( -2, "usage: &flow2 [-KC num] [-bvh]\n" );
+ Abc_Print( -2, "usage: &flow2 [-KC num] [-btvh]\n" );
Abc_Print( -2, "\t integration optimization and mapping flow\n" );
Abc_Print( -2, "\t-K num : the number of LUT inputs (LUT size) [default = %d]\n", nLutSize );
Abc_Print( -2, "\t-C num : the number of cuts at a node [default = %d]\n", nCutNum );
Abc_Print( -2, "\t-b : toggle using SOP balancing during synthesis [default = %s]\n", fBalance? "yes": "no" );
+ Abc_Print( -2, "\t-t : toggle minimizing average (not maximum) level [default = %s]\n", fMinAve? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
'n306' href='#n306'>306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524