├── .travis.yml ├── CMakeLists.txt ├── COPYING ├── ChangeLog ├── LICENSE ├── README.md ├── config.h.in ├── flow └── flow.noroute │ ├── macro.fdbg │ ├── macro.flow │ ├── macro.fnog │ ├── mixed.flow │ ├── mixed.fnog │ ├── standard.fdbg │ ├── standard.flow │ └── standard.fnog ├── include └── yalecad │ ├── assign.h │ ├── base.h │ ├── bitset.h │ ├── buster.h │ ├── cleanup.h │ ├── colors.h │ ├── dbinary.h │ ├── debug.h │ ├── deck.h │ ├── dialog.h │ ├── draw.h │ ├── dset.h │ ├── edcolors.h │ ├── file.h │ ├── graph.h │ ├── hash.h │ ├── heap.h │ ├── linalg.h │ ├── list.h │ ├── mac.h │ ├── menus.h │ ├── message.h │ ├── okmalloc.h │ ├── plot.h │ ├── program.h │ ├── project.h │ ├── queue.h │ ├── quicksort.h │ ├── radixsort.h │ ├── rand.h │ ├── rbtree.h │ ├── relpos.h │ ├── set.h │ ├── stack.h │ ├── stat.h │ ├── string.h │ ├── system.h │ ├── tech.h │ ├── time.h │ ├── timer.h │ ├── tree.h │ ├── wgraphics.h │ └── yreadpar.h ├── script ├── CMakeLists.txt ├── show_flows.in └── splt_file.a ├── src ├── CMakeLists.txt ├── Ylib │ ├── CMakeLists.txt │ ├── assign.c │ ├── buster.c │ ├── cleanup.c │ ├── colors.c │ ├── deck.c │ ├── dialog.c │ ├── draw.c │ ├── dset.c │ ├── edcolors.c │ ├── file.c │ ├── getftime.c │ ├── graph.c │ ├── grid.c │ ├── hash.c │ ├── heap.c │ ├── info.h │ ├── list.c │ ├── log.c │ ├── menus.c │ ├── message.c │ ├── mst.c │ ├── mytime.c │ ├── okmalloc.c │ ├── path.c │ ├── plot.c │ ├── program.c │ ├── project.c │ ├── queue.c │ ├── quicksort.c │ ├── radixsort.c │ ├── rand.c │ ├── rbtree.c │ ├── relpath.c │ ├── set.c │ ├── stat.c │ ├── stats.c │ ├── string.c │ ├── system.c │ ├── time.c │ ├── timer.c │ ├── trans.c │ ├── wgraphics.c │ ├── ydebug.c │ └── yreadpar.c ├── date │ ├── CMakeLists.txt │ ├── date.c │ └── getdate.c ├── genrows │ ├── CMakeLists.txt │ ├── date.h │ ├── dialog.h │ ├── dialog2.h │ ├── dialog3.h │ ├── draw.c │ ├── genrows.c │ ├── genrows.dialog │ ├── genrows.h │ ├── genrows_menu │ ├── globals.h │ ├── macro.dialog │ ├── main.c │ ├── menus.h │ ├── merge.c │ ├── readpar.c │ ├── readpar.h │ └── row.dialog ├── mc_compact │ ├── CMakeLists.txt │ ├── cdraw.c │ ├── changraph.c │ ├── cmain.c │ ├── compact.h │ ├── compactor.c │ ├── date.h │ ├── debug2.c │ ├── grid.c │ ├── io.c │ ├── menus.h │ ├── movestrat.c │ ├── movestrat2.c │ ├── multi.c │ ├── readcgraph.c │ ├── readcgraph.h │ ├── readcgraph_l.h │ ├── readtiles.c │ ├── readtiles_l.h │ ├── stdmacro.c │ ├── xcompact.c │ └── ycompact.c ├── mincut │ ├── CMakeLists.txt │ ├── date.h │ ├── globals.h │ ├── main.c │ ├── output.c │ ├── output.h │ ├── readcells.c │ └── readcells_l.h ├── syntax │ ├── CMakeLists.txt │ ├── date.h │ ├── globals.h │ ├── main.c │ ├── output.c │ ├── readcells.c │ └── readcells_l.h ├── twflow │ ├── CMakeLists.txt │ ├── autoflow.c │ ├── date.h │ ├── findflow.c │ ├── globals.h │ ├── graphics.c │ ├── io.c │ ├── io.h │ ├── main.c │ ├── menus.h │ ├── program.c │ ├── readobjects.c │ └── readobjects_l.h ├── twmc │ ├── CMakeLists.txt │ ├── acceptt.c │ ├── analog.h │ ├── analyze.c │ ├── compact.c │ ├── config1.c │ ├── config2.c │ ├── configpads.c │ ├── configpads.h │ ├── custom.h │ ├── date.h │ ├── debug.c │ ├── dens.h │ ├── dialog.h │ ├── finalout.c │ ├── finalpin.c │ ├── findcheck.c │ ├── findcost.c │ ├── findloc.c │ ├── findside.c │ ├── findside.h │ ├── fixcell.c │ ├── genorient.c │ ├── gmain.c │ ├── graphics.c │ ├── initialize.c │ ├── initialize.h │ ├── initnets.c │ ├── initnets.h │ ├── loadbins.c │ ├── main.c │ ├── main.h │ ├── makebins.c │ ├── makesite.c │ ├── mc.dialog │ ├── mc_menu │ ├── menus.h │ ├── mergecell.c │ ├── neworient.c │ ├── neworient.h │ ├── newtemp.c │ ├── outgeo.c │ ├── outpin.c │ ├── output.c │ ├── overlap.c │ ├── pads.h │ ├── partition.c │ ├── partition.h │ ├── paths.c │ ├── penalties.c │ ├── perimeter.c │ ├── placepads.c │ ├── placepin.c │ ├── prboard.c │ ├── readcells.c │ ├── readcells.h │ ├── readcells_l.h │ ├── readnets.c │ ├── readnets.h │ ├── readnets_l.h │ ├── readpar.c │ ├── readpar.h │ ├── reconfig.c │ ├── rmain.c │ ├── savewolf.c │ ├── scrapnet.c │ ├── selectpin.c │ ├── setpwates.c │ ├── sortpad.c │ ├── sortpin.c │ ├── temp.h │ ├── tidialog.h │ ├── twstats.c │ ├── uaspect.c │ ├── uinst.c │ ├── uloop.c │ ├── uloop.new │ ├── unbust.c │ ├── unet.c │ ├── upin.c │ ├── upinswap.c │ ├── usite1.c │ ├── usite2.c │ ├── usoftmove.c │ ├── utemp.c │ ├── watesides.c │ ├── window.c │ ├── wirecosts.c │ ├── wireest.c │ ├── wireratio.c │ └── ys.awk └── twsc │ ├── CMakeLists.txt │ ├── acceptt.c │ ├── buildimp.c │ ├── cell_width.c │ ├── cglbroute.c │ ├── changrid.c │ ├── coarseglb.c │ ├── config.h │ ├── configpads.c │ ├── configure.c │ ├── countf.c │ ├── crossbus.c │ ├── date.h │ ├── debug.c │ ├── debug2.c │ ├── dimbox.c │ ├── feedest.c │ ├── feeds.h │ ├── findcost.c │ ├── findcostf.c │ ├── findrcost.c │ ├── findunlap.c │ ├── gateswap.c │ ├── globe.c │ ├── globroute.c │ ├── graphics.c │ ├── groute.h │ ├── main.c │ ├── main.h │ ├── menus.h │ ├── mergeseg.c │ ├── netgraph.c │ ├── newtemp.c │ ├── outcm.c │ ├── outpins.c │ ├── outpins1.c │ ├── output.c │ ├── overlap.c │ ├── pads.h │ ├── parser.c │ ├── parser.h │ ├── paths.c │ ├── placepads.c │ ├── readblck.c │ ├── readblck.h │ ├── readcell.c │ ├── readcell.h │ ├── readcell_l.h │ ├── readnets.c │ ├── readnets.h │ ├── readnets_l.h │ ├── readpar.c │ ├── readpar.h │ ├── reconfig.c │ ├── rmoverlap.c │ ├── rowevener.c │ ├── savewolf.c │ ├── sc_menu │ ├── seagate.c │ ├── sort.c │ ├── sortpad.c │ ├── sortpin.c │ ├── src_list │ ├── standard.h │ ├── steiner.c │ ├── uc0.c │ ├── ucxx1.c │ ├── ucxx2.c │ ├── ucxxglb.h │ ├── ucxxo1.c │ ├── ucxxo2.c │ ├── ucxxp.c │ ├── uloop.c │ ├── unlap.c │ ├── upair.c │ ├── urcost.c │ ├── utemp.c │ └── xpickint.c └── tests ├── CMakeLists.txt ├── install_in_tmp.sh ├── map9v3 ├── expected │ ├── map9v3.blk │ ├── map9v3.out │ ├── map9v3.pin │ ├── map9v3.pl1 │ ├── map9v3.pl2 │ ├── map9v3.pth │ └── map9v3.sav ├── map9v3.cel └── map9v3.par ├── map9v3_other_seed ├── expected │ ├── map9v3_other_seed.pl1 │ └── map9v3_other_seed.pl2 ├── map9v3_other_seed.cel └── map9v3_other_seed.par ├── mincut ├── map9v3 │ ├── expected │ │ ├── map9v3.mcel │ │ ├── map9v3.scel │ │ └── map9v3.stat │ ├── map9v3.cel │ ├── map9v3.par │ └── map9v3.stat └── runtest.sh ├── picosoc ├── picosoc.cel └── picosoc.par ├── runtest.sh ├── twmc ├── map9v3 │ ├── expected │ │ ├── map9v3.blk │ │ ├── map9v3.gen │ │ ├── map9v3.gsav │ │ ├── map9v3.mdat │ │ ├── map9v3.mgeo │ │ ├── map9v3.mpin │ │ ├── map9v3.mpth │ │ ├── map9v3.msav │ │ ├── map9v3.mver │ │ ├── map9v3.mvio │ │ └── map9v3.scel │ ├── map9v3.cel │ ├── map9v3.mcel │ ├── map9v3.par │ ├── map9v3.scel │ └── map9v3.stat └── runtest.sh └── twsc ├── map9v3 ├── expected ├── map9v3.blk ├── map9v3.cel ├── map9v3.par ├── map9v3.scel └── map9v3.stat └── runtest.sh /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | install: 4 | - sudo apt-get update 5 | - sudo apt-get install -y libgsl0-dev libx11-dev cmake 6 | 7 | script: 8 | - mkdir -p build 9 | - cd build 10 | - cmake .. 11 | - make 12 | 13 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8.5) 2 | project (graywolf) 3 | 4 | enable_testing() 5 | 6 | find_package(PkgConfig) 7 | find_package(X11) 8 | INCLUDE(CheckIncludeFiles) 9 | include(GNUInstallDirs) 10 | 11 | 12 | pkg_check_modules(GSL gsl) 13 | 14 | if (NOT GSL_FOUND) 15 | MESSAGE(FATAL_ERROR "The development files for the GNU Scientific Library (libgsl) are required to build graywolf.") 16 | endif() 17 | 18 | if (NOT X11_FOUND) 19 | MESSAGE(FATAL_ERROR "The development files for X11 (libx11-dev) are required to build graywolf.") 20 | endif() 21 | 22 | # Include RPATH in build so that ldconfig is not necessary after install 23 | SET(CMAKE_SKIP_BUILD_RPATH FALSE) 24 | SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 25 | SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") 26 | SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 27 | 28 | MATH(EXPR SIZEOF_VOID_P_BITS "${CMAKE_SIZEOF_VOID_P}*8") 29 | 30 | # Ignore no-implicit-function-declaration warnings for now, since there are so many - and it then becomes 31 | # easier to see other warnings popping up. 32 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSIZEOF_VOID_P=${SIZEOF_VOID_P_BITS} -Wno-implicit-function-declaration") 33 | 34 | 35 | CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config-build.h) 36 | 37 | 38 | install(DIRECTORY flow DESTINATION lib/graywolf/bin) 39 | install(CODE "EXECUTE_PROCESS(COMMAND ln -sf flow.noroute flow WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/graywolf/bin/flow)") 40 | 41 | add_subdirectory(src) 42 | add_subdirectory(script) 43 | add_subdirectory(tests) 44 | 45 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 0.1.2: 2 | Changed the license of src/Ylib/radixsort.c to the 3-clause BSD license 3 | since the 4-clause license was officially rescinded 22 July 1999. 4 | 0.1.1: 5 | More copyright and license info 6 | Renamed shared library 7 | 0.1.0: 8 | Added proper documentation of license 9 | 0.0.3: 10 | Improved algorithm 11 | 0.0.2: 12 | Include RPATH in binaries 13 | 0.0.1: 14 | First version of graywolf 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 1987-1992 Yale University 2 | 3 | This software was originally developed at Yale University (c) 4 | and called TimberWolf. The license text is given below. The text was 5 | received 2015-06-03 from: 6 | 7 | """ 8 | Director of Technology Licensing 9 | Office of Cooperative Research 10 | Yale University School of Medicine 11 | """ 12 | 13 | This work is distributed in the hope that it will be useful; you can 14 | redistribute it and/or modify it under the terms of the 15 | GNU General Public License as published by the Free Software Foundation; 16 | either version 2 of the License, 17 | or any later version, on the following conditions: 18 | 19 | 20 | (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 21 | ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 22 | SALE OR 23 | OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 24 | PATENT OR 25 | OTHER RIGHTS NOT VESTED IN YALE. 26 | 27 | (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 28 | WARRANTIES 29 | WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 30 | INCLUDING, 31 | BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 32 | PARTICULAR 33 | PURPOSE. 34 | 35 | (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 36 | WHATSOEVER TO 37 | ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 38 | ARTICLE 39 | (a) AND (b) above. 40 | 41 | (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 42 | EMPLOYEES AND 43 | AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 44 | INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 45 | ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 46 | POSSIBILITY OF THE FOREGOING. 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is graywolf - a fork of TimberWolf 6.3.5 2 | 3 | TimberWolf was developed at Yale University, and was distributed as open source 4 | for a time until it was taken commercial. The last open-source version of 5 | TimberWolf does not perform detail routing, but is a professional-grade 6 | placement tool. In order to continue improving the open-source version, 7 | graywolf has been forked off from version 6.3.5 of TimberWolf. 8 | 9 | The main improvement in graywolf is that the build process is more streamlined 10 | and that it behaves as a normal linux tool - you can call it from anywhere and 11 | no environment variables must be set first. 12 | 13 | What it does 14 | ------------ 15 | 16 | graywolf is used for placement in VLSI design. It's mainly used together with 17 | qflow. (http://opencircuitdesign.com/qflow/) 18 | 19 | Install procedure 20 | ----------------- 21 | ``` 22 | mkdir build 23 | cd build 24 | cmake .. 25 | make 26 | sudo make install 27 | ``` 28 | 29 | Test 30 | ---- 31 | 32 | After "make", you can run the test suite: (unfortunately, the test will not work on 32-bit architectures yet) 33 | 34 | ``` 35 | make test 36 | ``` 37 | 38 | To dump out log for failing tests: 39 | 40 | ``` 41 | CTEST_OUTPUT_ON_FAILURE=1 make test 42 | ``` 43 | 44 | To run completely verbose tests: 45 | 46 | ``` 47 | make test ARGS="-V" 48 | ``` 49 | 50 | 51 | Contributions 52 | ------------- 53 | 54 | There are two main branches: *master* and *dev*. Since people expect *master* 55 | to be stable in a "production environment", any ground-breaking 56 | changes/refactoring must be merged into *dev*. Please do not open pull-request 57 | towards *master* for these changes. 58 | 59 | Pull requests targeting specific bugfixes need to be merged into both *master* 60 | and *dev*, so it is ok to open a pull request for either of them. 61 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | 2 | #define TWFLOWDIR "${CMAKE_INSTALL_PREFIX}/lib/graywolf" 3 | -------------------------------------------------------------------------------- /flow/flow.noroute/macro.fdbg: -------------------------------------------------------------------------------- 1 | numobjects 2 2 | 3 | pobject edit_mcfiles 1: 0 4 | path : 5 | drawn : 150 550 450 650 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | 11 | pobject TimberWolfMC 2: 1 12 | path : 13 | drawn : 150 350 450 450 14 | edge 1: 15 | ifiles: $.cel $.par $.mpar* $.mnet* $.net* 16 | ofiles: $.mdat 17 | args : -wvd $ @WINDOWID 18 | drawn : 300 450 300 550 19 | 300 450 320 470 20 | 300 450 280 470 21 | -------------------------------------------------------------------------------- /flow/flow.noroute/macro.flow: -------------------------------------------------------------------------------- 1 | numobjects 2 2 | 3 | pobject edit_mcfiles 1: 0 4 | path : 5 | drawn : 150 550 450 650 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | 11 | pobject TimberWolfMC 2: 1 12 | path : 13 | drawn : 150 350 450 450 14 | edge 1: 15 | ifiles: $.cel $.par $.mpar* $.mnet* $.net* 16 | ofiles: $.mdat 17 | args : -w $ @WINDOWID 18 | drawn : 300 450 300 550 19 | 300 450 320 470 20 | 300 450 280 470 21 | -------------------------------------------------------------------------------- /flow/flow.noroute/macro.fnog: -------------------------------------------------------------------------------- 1 | numobjects 2 2 | 3 | pobject edit_mcfiles 1: 0 4 | path : 5 | drawn : 150 550 450 650 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | 11 | pobject TimberWolfMC 2: 1 12 | path : 13 | drawn : 150 350 450 450 14 | edge 1: 15 | ifiles: $.cel $.par $.mpar* $.mnet* $.net* 16 | ofiles: $.mdat 17 | args : -n $ 18 | drawn : 300 450 300 550 19 | 300 450 320 470 20 | 300 450 280 470 21 | -------------------------------------------------------------------------------- /flow/flow.noroute/mixed.flow: -------------------------------------------------------------------------------- 1 | numobjects 4 2 | 3 | pobject edit_twfiles 1: 0 4 | path : 5 | drawn : 450 850 750 950 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | drawn : 600 950 600 1050 11 | 600 950 620 970 12 | 600 950 580 970 13 | 14 | pobject Mincut 2: 1 15 | path : 16 | drawn : 450 650 750 750 17 | edge 1: 18 | ifiles: $.cel $.stat 19 | ofiles: $.mcel $.scel 20 | args : $ 21 | drawn : 600 750 600 850 22 | 600 750 620 770 23 | 600 750 580 770 24 | 25 | pobject TimberWolfMC 3: 2 26 | path : 27 | drawn : 450 450 750 550 28 | edge 2: 29 | ifiles: $.mcel $.mpar 30 | ofiles: $.mdat $.blk 31 | args : -w $ @WINDOWID 32 | drawn : 600 550 600 650 33 | 600 550 620 570 34 | 600 550 580 570 35 | 36 | pobject TimberWolfSC 4: 3 37 | path : 38 | drawn : 450 250 750 350 39 | edge 3: 40 | ifiles: $.blk $.scel $.par $.net 41 | ofiles: $.out $.pin $.pl1 42 | args : -w $ @WINDOWID 43 | drawn : 600 350 600 450 44 | 600 350 620 370 45 | 600 350 580 370 46 | -------------------------------------------------------------------------------- /flow/flow.noroute/mixed.fnog: -------------------------------------------------------------------------------- 1 | numobjects 4 2 | 3 | pobject edit_twfiles 1: 0 4 | path : 5 | drawn : 450 850 750 950 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | drawn : 600 950 600 1050 11 | 600 950 620 970 12 | 600 950 580 970 13 | 14 | pobject Mincut 2: 1 15 | path : 16 | drawn : 450 650 750 750 17 | edge 1: 18 | ifiles: $.cel $.stat 19 | ofiles: $.mcel $.scel 20 | args : $ 21 | drawn : 600 750 600 850 22 | 600 750 620 770 23 | 600 750 580 770 24 | 25 | pobject TimberWolfMC 3: 2 26 | path : 27 | drawn : 450 450 750 550 28 | edge 2: 29 | ifiles: $.mcel $.mpar $.mnet 30 | ofiles: $.mdat $.blk 31 | args : -b $ 32 | drawn : 600 550 600 650 33 | 600 550 620 570 34 | 600 550 580 570 35 | 36 | pobject TimberWolfSC 4: 3 37 | path : 38 | drawn : 450 250 750 350 39 | edge 3: 40 | ifiles: $.blk $.scel $.par $.net 41 | ofiles: $.out $.pin $.pl1 42 | args : -n $ 43 | drawn : 600 350 600 450 44 | 600 350 620 370 45 | 600 350 580 370 46 | -------------------------------------------------------------------------------- /flow/flow.noroute/standard.fdbg: -------------------------------------------------------------------------------- 1 | numobjects 4 2 | 3 | pobject edit_twfiles 1: 0 4 | path : 5 | drawn : 450 850 750 950 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | drawn : 600 950 600 1050 11 | 600 950 620 970 12 | 600 950 580 970 13 | 14 | pobject Mincut 2: 1 15 | path : 16 | drawn : 450 650 750 750 17 | edge 1: 18 | ifiles: $.cel $.stat 19 | ofiles: $.mcel $.scel 20 | args : $ 21 | drawn : 600 750 600 850 22 | 600 750 620 770 23 | 600 750 580 770 24 | 25 | pobject TimberWolfMC 3: 2 26 | path : 27 | drawn : 450 450 750 550 28 | edge 2: 29 | ifiles: $.mcel $.mpar 30 | ofiles: $.mdat $.blk 31 | args : -wd $ @WINDOWID 32 | drawn : 600 550 600 650 33 | 600 550 620 570 34 | 600 550 580 570 35 | 36 | pobject TimberWolfSC 4: 3 37 | path : 38 | drawn : 450 250 750 350 39 | edge 3: 40 | ifiles: $.blk $.scel $.par $.net 41 | ofiles: $.out $.pin $.pl1 42 | args : -wd $ @WINDOWID 43 | drawn : 600 350 600 450 44 | 600 350 620 370 45 | 600 350 580 370 46 | -------------------------------------------------------------------------------- /flow/flow.noroute/standard.flow: -------------------------------------------------------------------------------- 1 | numobjects 4 2 | 3 | pobject edit_twfiles 1: 0 4 | path : 5 | drawn : 450 850 750 950 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | drawn : 600 950 600 1050 11 | 600 950 620 970 12 | 600 950 580 970 13 | 14 | pobject Mincut 2: 1 15 | path : 16 | drawn : 450 650 750 750 17 | edge 1: 18 | ifiles: $.cel $.stat 19 | ofiles: $.mcel $.scel 20 | args : $ 21 | drawn : 600 750 600 850 22 | 600 750 620 770 23 | 600 750 580 770 24 | 25 | pobject TimberWolfMC 3: 2 26 | path : 27 | drawn : 450 450 750 550 28 | edge 2: 29 | ifiles: $.mcel $.mpar 30 | ofiles: $.mdat $.blk 31 | args : -w $ @WINDOWID 32 | drawn : 600 550 600 650 33 | 600 550 620 570 34 | 600 550 580 570 35 | 36 | pobject TimberWolfSC 4: 3 37 | path : 38 | drawn : 450 250 750 350 39 | edge 3: 40 | ifiles: $.blk $.scel $.par $.net 41 | ofiles: $.out $.pin $.pl1 42 | args : -w $ @WINDOWID 43 | drawn : 600 350 600 450 44 | 600 350 620 370 45 | 600 350 580 370 46 | -------------------------------------------------------------------------------- /flow/flow.noroute/standard.fnog: -------------------------------------------------------------------------------- 1 | numobjects 4 2 | 3 | pobject edit_twfiles 1: 0 4 | path : 5 | drawn : 450 850 750 950 6 | edge 0: 7 | ifiles: 8 | ofiles: $.par 9 | args : $ 10 | drawn : 600 950 600 1050 11 | 600 950 620 970 12 | 600 950 580 970 13 | 14 | pobject Mincut 2: 1 15 | path : 16 | drawn : 450 650 750 750 17 | edge 1: 18 | ifiles: $.cel $.stat 19 | ofiles: $.mcel $.scel 20 | args : $ 21 | drawn : 600 750 600 850 22 | 600 750 620 770 23 | 600 750 580 770 24 | 25 | pobject TimberWolfMC 3: 2 26 | path : 27 | drawn : 450 450 750 550 28 | edge 2: 29 | ifiles: $.mcel $.mpar $.mnet 30 | ofiles: $.mdat $.blk 31 | args : -n $ 32 | drawn : 600 550 600 650 33 | 600 550 620 570 34 | 600 550 580 570 35 | 36 | pobject TimberWolfSC 4: 3 37 | path : 38 | drawn : 450 250 750 350 39 | edge 3: 40 | ifiles: $.blk $.scel $.par $.net 41 | ofiles: $.out $.pin $.pl1 42 | args : -n $ 43 | drawn : 600 350 600 450 44 | 600 350 620 370 45 | 600 350 580 370 46 | -------------------------------------------------------------------------------- /include/yalecad/assign.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: assign.h 3 | DESCRIPTION:include file for the linear assignment solver. 4 | DATE: May 15, 1990 - modified mighty code. 5 | REVISIONS: 6 | Wed Apr 15 16:40:01 EDT 1992 7 | - Replaced by new algorithms 8 | ----------------------------------------------------------------- */ 9 | #ifndef YASSIGN_H 10 | #define YASSIGN_H 11 | 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | /* LOW MED HIGH and INFINITY are used for the cost matrix */ 18 | #define ASSIGN_INF 1000000 19 | #define ASSIGN_PREASSIGN 500000 20 | 21 | /* a large number, bigger than any cost */ 22 | #define LAP_HUGE 200000000 23 | 24 | typedef struct { 25 | INT *xmate; /* match array for x's */ 26 | INT *ymate; /* match array for y's */ 27 | INT *udual; /* dual array for u's */ 28 | INT *vdual; /* dual array for v's */ 29 | INT *pred; /* predecessor array for shortest path */ 30 | INT *unassigned; /* unassigned rows */ 31 | INT *shortlen; /* shortest path lengths */ 32 | INT *column; /* array of columns */ 33 | } LAPJV_block; 34 | 35 | 36 | /******** ASSIGNMENT FUNCTIONS *************/ 37 | extern INT **Yassign_init( P2( INT m, INT n ) ) ; 38 | /* 39 | * Arguments: 40 | * INT m, n ; 41 | * Function: 42 | * Initializes the linear assignment solver. 43 | * Bug: Internally alllcate MAX(m,n) by MAX(m,n) square matrix 44 | */ 45 | 46 | extern INT *Yassign( P3( INT **cost_matrix, INT m, INT n ) ) ; 47 | /* 48 | * Arguments: 49 | * INT **cost_matrix ; 50 | * INT m, n; 51 | * Function: 52 | * Solves the linear assignment problem. 53 | * Return: 54 | * A 0..m ans array, ans[0] contain total cost, 55 | * ans[i], 1 <= i <= m, 56 | * means row i going to map column ans[i] 57 | * Bug: 58 | * m must smaller or equal to n. 59 | * Actually, when m < n, cost_matrix will be padded to a 60 | * square matrix, the padding value is ASSIGN_INF. 61 | * Therefore, it might overflow if cost become too large. 62 | */ 63 | 64 | extern void Yassign_reset( P3(INT **cost_matrix, INT m, INT n ) ) ; 65 | /* 66 | * Arguments: 67 | * INT m, n ; 68 | * INT **cost_matrix ; 69 | * Function: 70 | * Do nothing, backward compatiblity. 71 | */ 72 | 73 | extern void Yassign_print( P3(INT **cost_matrix, INT m, INT n ) ) ; 74 | /* 75 | * Arguments: 76 | * INT m, n ; 77 | * INT **cost_matrix ; 78 | * Function: 79 | * Print the state of the linear assignment solver. 80 | */ 81 | 82 | extern void Yassign_free( P3(INT **cost_matrix, INT m, INT n ) ) ; 83 | /* 84 | * Arguments: 85 | * INT **cost_matrix ; 86 | * INT m, n ; 87 | * Function: 88 | * Free the memory associated with the solver. 89 | */ 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /include/yalecad/bitset.h: -------------------------------------------------------------------------------- 1 | #ifndef YBITSET_H 2 | #define YBITSET_H 3 | 4 | #define BITSET_GET( array, index ) (array[index>>5] & (1 <<(index & 0x1F))) 5 | #define BITSET_SET( array, index ) (array[index>>5] |= (1 << (index & 0x1F)) ) 6 | #define BITSET_RESET( array, i ) (array[i>>5] &= (~(1 << (i & 0x1F))) ) 7 | #define BITSET_ALLOC( num ) ( YCALLOC( (num>>5) + 1, UNSIGNED_INT) ) 8 | #define BITSET_ARRYSIZE( num ) ( (num>>5) + 1 ) 9 | 10 | #ifdef TEST 11 | 12 | main() 13 | { 14 | 15 | unsigned int *array ; 16 | int i ; 17 | int max ; 18 | 19 | max = 32 ; 20 | 21 | array = BITSET_ALLOC( max ) ; 22 | 23 | for( i = 0 ; i <= max ; i++ ){ 24 | if( i == 1 || i == 2 || i == 5 || i == 11 || i == 13 || i == 69 ){ 25 | BITSET_SET( array, i ) ; 26 | } else { 27 | BITSET_RESET( array, i ) ; 28 | } 29 | } 30 | 31 | for( i = 0 ; i <= max ; i++ ){ 32 | if( BITSET_GET( array, i ) ){ 33 | fprintf( stderr, "i:%d T\n", i ) ; 34 | } else { 35 | fprintf( stderr, "i:%d F\n", i ) ; 36 | } 37 | } 38 | } 39 | 40 | #endif /* TEST */ 41 | 42 | #endif /* YBITSET_H */ 43 | -------------------------------------------------------------------------------- /include/yalecad/buster.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: buster.h 3 | DESCRIPTION:Include file for the utility routine to break a 4 | rectilinear cell up into tiles. 5 | CONTENTS: YBUSTBOXPTR Ybuster() 6 | BUSTBOXPTR A , R ; 7 | INT Ybuster_init() ; 8 | INT Ybuster_addpt( x, y ) ; 9 | INT x, y ; 10 | DATE: Aug 7, 1988 - rewrote to match new parser. 11 | REVISIONS: May 1, 1990 - made sure we cannot match the 0 12 | record in the redundancy check for points. 13 | May 4, 1990 - moved to the library since it now occurs 14 | in many files. 15 | Thu Apr 18 00:49:05 EDT 1991 - rewrote buster_verify. 16 | ----------------------------------------------------------------- */ 17 | #ifndef YBUSTER_H 18 | #define YBUSTER_H 19 | 20 | 21 | #include 22 | 23 | typedef struct ybustbox { 24 | INT x ; 25 | INT y ; 26 | } YBUSTBOX , *YBUSTBOXPTR ; 27 | 28 | 29 | extern void Ybuster_init() ; 30 | /* 31 | Arguments: 32 | none 33 | Function: 34 | Initialize the buster routines. Must be called first before 35 | any points are added using Ybuster_addpt. 36 | Call this routine before the start of every object to be busted 37 | into tiles. 38 | */ 39 | 40 | extern void Ybuster_addpt( P2( INT x, INT y ) ) ; 41 | /* 42 | Arguments: 43 | INT x, y ; 44 | Function: 45 | Add a point to the current arbitrary figure. 46 | */ 47 | 48 | extern YBUSTBOXPTR Ybuster() ; 49 | /* 50 | Arguments: 51 | none 52 | Function: 53 | Returns a tile of the arbitary figure. Call this function until 54 | it returns null to receive all the tiles of an arbitrary rectilinear 55 | shaped figure. The returning pointer list the four points of the 56 | tile starting at the point llx, lly and proceeding CW. 57 | To access say the urx,ury point use 58 | ptr[3].x, ptr[3].y if ptr is the returned pointer. 59 | */ 60 | 61 | extern void Ybuster_free() ; 62 | /* 63 | Arguments: 64 | none 65 | Function: 66 | Free up the memory associated with buster. 67 | */ 68 | 69 | extern BOOL Ybuster_verify( P1(char *object_name) ) ; 70 | /* 71 | Arguments: 72 | char *object_name 73 | Function: 74 | Sanity checker. Returns TRUE if things look reasonable. It 75 | returns FALSE otherwise and outputs and error message to the 76 | screen. The object_name is a message string which is output 77 | on an error to describe the current object to be busted. 78 | This makes for better user messages. 79 | */ 80 | 81 | #endif /* YBUSTER_H */ 82 | -------------------------------------------------------------------------------- /include/yalecad/cleanup.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) cleanup.h (Yale) version 1.6 11/2/91" 3 | FILE: cleanup.h 4 | DESCRIPTION:This file contains include file for cleanup handler 5 | routines. To use cleanup handler included '' 6 | at the top of main.c and #define CLEANUP_C either by 7 | uncommenting the define in this file or by setting the 8 | variable in the makefile: -DCLEANUP_H. In addition, 9 | the first executable line of the program must be 10 | INITCLEANUP() macro. In order for the handler to work, 11 | the INITCLEANUP call must occur in the top level routine, 12 | ie., main.c . 13 | CONTENTS: MACRO DEFINITIONS 14 | DATE: Feb 2, 1988 15 | REVISIONS: Mar 9, 1989 - modified conditional compiles so you can 16 | avoid compilation on foreign machines. 17 | ----------------------------------------------------------------- */ 18 | /* cleanup.h definitions for cleanup handler system */ 19 | 20 | /* makefile sets this variable automatically but you can manually */ 21 | /* define it here if you want and your system supports UNIX signals */ 22 | /* #define CLEANUP_C - we want a cleanup handler. */ 23 | 24 | #ifndef CLEANUP_H 25 | #define CLEANUP_H 26 | 27 | #define NODUMP 0 28 | #define YESDUMP 1 29 | #define MAYBEDUMP 2 30 | 31 | #ifdef CLEANUP_C 32 | #include 33 | #include 34 | 35 | #ifdef linux 36 | extern void Ycleanup(int); 37 | #else 38 | extern void Ycleanup(int, int, struct sigcontext *); 39 | #endif 40 | 41 | /* initialization cleanup macro */ 42 | /* first argument - argv[0] - program name */ 43 | /* second argument - function - user function that will be executed upon 44 | fault */ 45 | /* third argument - dumpFlag - allows users to control core dump */ 46 | /* signal(SIGQUIT,cleanup); - remove due to dbx bug */ 47 | /* signal(SIGINT,cleanup); - remove due to dbx bug */ 48 | #define YINITCLEANUP( argv, function, dumpFlag ) \ 49 | { \ 50 | signal(SIGHUP,Ycleanup); \ 51 | signal(SIGILL,Ycleanup);\ 52 | signal(SIGFPE,Ycleanup);\ 53 | signal(SIGSEGV,Ycleanup);\ 54 | signal(SIGBUS,Ycleanup);\ 55 | signal(SIGSYS,Ycleanup);\ 56 | signal(SIGTERM,Ycleanup);\ 57 | signal(SIGUSR1,Ycleanup);\ 58 | YinitCleanup( argv, function, dumpFlag ) ; \ 59 | } 60 | 61 | /*--------------------------------------------------------- 62 | initCleanup - sets static variables for cleanup handler. 63 | --------------------------------------------------------*/ 64 | VOID YinitCleanup( P3(char *argv, BOOL (*function)(), int dump) ); 65 | 66 | #else 67 | 68 | /* no cleanup handler - null it out */ 69 | #define YINITCLEANUP( argv, function, dumpFlag ) 70 | 71 | #endif /* CLEANUP_C */ 72 | #endif /* CLEANUP_H */ 73 | -------------------------------------------------------------------------------- /include/yalecad/colors.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: colors.h 3 | DESCRIPTION:Insert file for Timberwolf standard colors. 4 | CONTENTS: 5 | DATE: Jan 25, 1989 - major rewrite of version 1.0 6 | REVISIONS: Jan 27, 1989 - added frame num 7 | Sep 12, 1989 - added cyan to color table. 8 | Oct 5, 1990 - added more colors to color table. 9 | ----------------------------------------------------------------- */ 10 | #ifndef COLOR_H 11 | #define COLOR_H 12 | 13 | 14 | #define TWWHITE 1 15 | #define TWBLACK 2 16 | #define TWGRAY 3 17 | #define TWRED 4 18 | #define TWBLUE 5 19 | #define TWYELLOW 6 20 | #define TWGREEN 7 21 | #define TWVIOLET 8 22 | #define TWORANGE 9 23 | #define TWMEDAQUA 10 24 | #define TWCYAN 11 25 | #define TWLIGHTGREEN 12 26 | #define TWLIGHTBLUE 13 27 | #define TWBROWN 14 28 | #define TWLIGHTBROWN 15 29 | #define TWNAVY 16 30 | #define TWLIGHTVIOLET 17 31 | #define TWKHAKI 18 32 | 33 | /* returns the standard color array */ 34 | extern char **TWstdcolors() ; 35 | 36 | /* returns the number of colors in standard color array */ 37 | extern INT TWnumcolors() ; 38 | 39 | #endif /* COLOR_H */ 40 | 41 | -------------------------------------------------------------------------------- /include/yalecad/dbinary.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) dbinary.h (Yale) version 1.3 8/28/90" 3 | FILE: dbinary.h 4 | DESCRIPTION:include file for binary format for graphics routines 5 | CONTENTS: typedefs for binary format. 6 | DATE: Mar 21, 1989 - moved from draw.h 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | #ifndef DBINARY_H 10 | #define DBINARY_H 11 | 12 | /* data record for draw binary files */ 13 | typedef struct { 14 | INT x1 ; 15 | INT x2 ; 16 | INT y1 ; 17 | INT y2 ; 18 | UNSIGNED_INT ref ; /* may be referenced by this number */ 19 | UNSIGNED_INT color ; 20 | UNSIGNED_INT label ; 21 | } DATABOX, *DATAPTR ; 22 | 23 | #endif /* DBINARY_H */ 24 | -------------------------------------------------------------------------------- /include/yalecad/dialog.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: dialog.h 3 | DESCRIPTION:user insert file for dialog box routines. 4 | CONTENTS: typedefs and definitions 5 | DATE: Sep 16, 1989 - original coding. 6 | REVISIONS: Dec 7, 1990 - added update function to dialog box. 7 | ----------------------------------------------------------------- */ 8 | #ifndef DIALOG_H 9 | 10 | #define DIALOG_H 11 | 12 | 13 | #include 14 | 15 | #define LABELTYPE 0 16 | #define INPUTTYPE 1 17 | #define BUTTONTYPE 2 18 | #define CASETYPE 3 19 | 20 | typedef struct { 21 | INT row, column, len ; 22 | char *string ; 23 | INT type ; 24 | INT color ; 25 | INT group ; /* used for CASETYPE - initial switch */ 26 | /* used for BUTTONTYPE - member of case group */ 27 | } TWDIALOGBOX, *TWDIALOGPTR ; 28 | 29 | typedef struct { 30 | INT type ; 31 | char *string ; 32 | BOOL bool ; 33 | } TWDRETURNBOX, *TWDRETURNPTR ; 34 | 35 | /* build a dialog box and get info */ 36 | extern TWDRETURNPTR TWdialog( P3(TWDIALOGPTR fieldp, char *name, 37 | INT (*user_function)() ) ) ; 38 | /* 39 | Arguments: 40 | TWDIALOGPTR fieldp ; 41 | char *name ; 42 | INT (*user_function)() ; 43 | Function: 44 | Creates a dialog box for user to enter data. Return a pointer 45 | to an array of type TWDRETURNPTR of the same size as input argument. 46 | Name is the name given to the dialogbox for .Xdefault 47 | control over the size of the dialog box upon creation. 48 | The easier way to use this routine is to use the TWread_dialog 49 | routine below to create a dialog.h file which has the necessary 50 | input to create the correct input field array. See a sample 51 | dialog file in graphics/example/example.dialog for more details. 52 | User function allows an incremental calculation update. 53 | */ 54 | 55 | #ifdef DEBUG 56 | extern TWDIALOGPTR TWread_dialog( P1(char *filename) ) ; 57 | /* 58 | Arguments: 59 | char *filename ; 60 | Function: 61 | Reads file and builds correct data structure, output a dialog.h 62 | file for inclusion in user program and then calls TWdialog. 63 | This allows fast development of dialog boxes for the codes yet 64 | the final result is stored in the program itself. 65 | */ 66 | #endif 67 | 68 | #endif /* DIALOG_H */ 69 | -------------------------------------------------------------------------------- /include/yalecad/edcolors.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_EDCOLORS_H 2 | #define INC_EDCOLORS_H 3 | 4 | void TWtoggleColors(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /include/yalecad/file.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) file.h version 1.7 4/21/91" 3 | FILE: file.h - file utility routine insert file 4 | DESCRIPTION:The file utilities open and close files, check to 5 | see if files and directories exist. 6 | NOTE: The define statements are designed so that external users 7 | may customize their I/O routines. 8 | CONTENTS: Definitions for file routines. 9 | DATE: Apr 10, 1989 10 | REVISIONS: Thu Apr 18 00:51:06 EDT 1991 - added lock routines. 11 | Sun Apr 21 21:22:40 EDT 1991 - added Yfile_slink. 12 | ----------------------------------------------------------------- */ 13 | #ifndef FILE_H 14 | #define FILE_H 15 | 16 | #include 17 | 18 | extern FILE *YopenFile( P3(char *filename,char *readwrite, BOOL abort ) ) ; 19 | /* 20 | Function: 21 | Open the given file name for reading and/or writing. Readwrite is 22 | the standard C lib control string. It may be "w", "r", "a", "w+", 23 | etc. If abort is set to TRUE, the program will exit if the file 24 | cannot be found and an appropriate error message will be output. 25 | If abort is set to FALSE, the routine will return a NULL pointer 26 | if the file could not be opened. 27 | */ 28 | 29 | extern BOOL YfileExists( P1(char *pathname ) ) ; 30 | /* 31 | Function: 32 | Returns TRUE if the given file exists. It returns FALSE otherwise. 33 | */ 34 | 35 | extern BOOL YdirectoryExists( P1(char *pathname) ) ; 36 | /* 37 | Function: 38 | Returns TRUE if the given pathname is a directory and it exists. 39 | It returns FALSE otherwise. 40 | */ 41 | 42 | extern FILE *Yfile_create_lock( P2(char *filename, BOOL readNotWrite ) ) ; 43 | /* 44 | Function: 45 | Creates a lock file ready for read or write 46 | */ 47 | 48 | extern BOOL Yfile_test_lock( P1( char *filename ) ) ; 49 | /* 50 | Function: 51 | See if a file is locked. 52 | */ 53 | 54 | extern char *Yfile_slink( P1( char *pathname ) ) ; 55 | /* 56 | Function: 57 | Return symbolic link of a file. 58 | */ 59 | 60 | #define TWOPEN( a_z, b_z, c_z ) YopenFile( a_z, b_z, c_z ) 61 | #define TWCLOSE( a_z ) fclose( a_z ) 62 | 63 | /* I/O MACRO DEFINITIONS */ 64 | #define ABORT 1 65 | #define NOABORT 0 66 | 67 | #endif /* FILE_H */ 68 | -------------------------------------------------------------------------------- /include/yalecad/heap.h: -------------------------------------------------------------------------------- 1 | 2 | /**************************************************************************** 3 | **************************************************************************** 4 | 5 | File : heap.h 6 | Author : Ted Stanion 7 | Date : Mon Apr 30 22:36:17 1990 8 | 9 | Abstract : Include file for heap.c 10 | 11 | Revisions : 12 | 13 | Futures : 14 | 15 | **************************************************************************** 16 | ****************************************************************************/ 17 | 18 | #ifndef HEAP_H 19 | #define HEAP_H 20 | 21 | 22 | #include 23 | 24 | /**************************************************************************** 25 | 26 | Structure : heap 27 | Author : Ted Stanion 28 | Date : Mon Apr 30 22:57:04 1990 29 | 30 | Abstract : Top level data structure for heaps. 31 | 32 | *****************************************************************************/ 33 | 34 | typedef struct heap { 35 | INT (*heap_cmp)(); 36 | struct heap_el *top; 37 | } YHEAP, *YHEAPPTR; 38 | 39 | 40 | /**************************************************************************** 41 | 42 | Macro : heap_empty 43 | Author : Ted Stanion 44 | Date : Tue May 1 16:40:02 1990 45 | 46 | Abstract : Returns TRUE if the heap is empty. 47 | 48 | *****************************************************************************/ 49 | 50 | #define heap_empty(h) (((h)->top) ? FALSE : TRUE) 51 | 52 | 53 | /************************************************************************ 54 | * * 55 | * Global Functions * 56 | * * 57 | ************************************************************************/ 58 | 59 | extern YHEAPPTR Yheap_init(); 60 | extern YHEAPPTR Yheap_init_with_parms(P1(INT (*fn)())); 61 | extern VOID Yheap_empty(P1(YHEAPPTR)); 62 | extern VOID Yheap_free(P1(YHEAPPTR)); 63 | extern VOID Yheap_insert(P2(YHEAPPTR, VOIDPTR)); 64 | extern VOIDPTR Yheap_delete_min(P1(YHEAPPTR)); 65 | extern VOIDPTR Yheap_top(P1(YHEAPPTR)); 66 | extern YHEAPPTR Yheap_meld(P2(YHEAPPTR, YHEAPPTR)); 67 | extern INT Yheap_cmp_num(P2(INT, INT)); 68 | extern INT Yheap_cmp_ptr(P2(VOIDPTR, VOIDPTR)); 69 | extern VOID Yheap_check_mem(); 70 | extern INT Yheap_verify(P1(YHEAPPTR)); 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /include/yalecad/linalg.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: linalg.h 3 | DESCRIPTION:Include file for linear algebra package. 4 | CONTENTS: 5 | DATE: Tue Jan 15 01:29:36 EST 1991 - original coding. 6 | REVISIONS: 7 | ----------------------------------------------------------------- */ 8 | #ifndef YLINALG_H 9 | #define YLINALG_H 10 | 11 | 12 | #define YEPSILON 1.0E-12 13 | #define YMIN -1.0E-38 14 | #define YZERO 0.0 15 | #define YMATRIX( matrix, r, c ) matrix->m[r][c] 16 | 17 | /* the matrix itself */ 18 | typedef struct { 19 | INT rows ; 20 | INT columns ; 21 | DOUBLE **m ; 22 | } YMBOX, *YMPTR ; 23 | 24 | extern YMPTR Ymatrix_create( P2(INT rows, INT columns ) ) ; 25 | extern YMPTR Ymatrix_free( P1( YMPTR mptr ) ) ; 26 | extern YMPTR Ymatrix_transpose( P1( YMPTR mptr ) ) ; 27 | extern YMPTR Ymatrix_mult( P2(YMPTR aptr, YMPTR bptr ) ) ; 28 | extern YMPTR Ymatrix_sub( P2(YMPTR aptr, YMPTR bptr ) ) ; 29 | extern void Ymatrix_disp( P1(YMPTR mptr ) ) ; 30 | extern YMPTR Ymatrix_eye( P1(INT size ) ) ; 31 | extern void Ymatrix_zero( P1(YMPTR matrix ) ) ; 32 | extern YMPTR Ymatrix_copy( P1(YMPTR input ) ) ; 33 | extern YMPTR Ymatrix_linv( P1(YMPTR aptr ) ) ; 34 | extern YMPTR Ymatrix_cofactors( P1(YMPTR aptr ) ) ; 35 | 36 | #endif /* LINALG_H */ 37 | -------------------------------------------------------------------------------- /include/yalecad/mac.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: mac.h 3 | CONTENTS: Definitions for directing conditional compiles on the Mac. 4 | DATE: May 2, 1990 5 | 6 | REVISIONS: 7 | ----------------------------------------------------------------- */ 8 | #ifndef MAC_H 9 | #define MAC_H 10 | 11 | 12 | #ifdef THINK_C 13 | 14 | #include 15 | #include 16 | #define ALTERNATE 17 | #define DEBUG 18 | /* #define CLEANUP_C */ 19 | #define SIGUSR1 1 20 | 21 | #endif /* THINK_C */ 22 | 23 | #ifdef _AUX_SOURCE 24 | #define NBPG 4096 /* number of bytes per page */ 25 | #endif /* _AUX_SOURCE */ 26 | 27 | #endif /* MAC_H */ 28 | -------------------------------------------------------------------------------- /include/yalecad/menus.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_MENUS_H 2 | #define INC_MENUS_H 3 | 4 | #include 5 | 6 | void TWdrawMenus(); 7 | 8 | void TWfreeMenuWindows(); 9 | 10 | void TWinforMenus(); 11 | 12 | void TWmouse_tracking_start(); 13 | 14 | BOOL TWmouse_tracking_end(); 15 | 16 | BOOL TWmouse_tracking_pt( INT *x, INT *y ); 17 | 18 | INT TWsaveState(); 19 | 20 | void TWrestoreState(); 21 | 22 | BOOL TWinterupt(); 23 | 24 | #endif /*INC_MENUS_H*/ 25 | 26 | -------------------------------------------------------------------------------- /include/yalecad/okmalloc.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: okmalloc.h 3 | CONTENTS: macro definitions for memory manager. 4 | DATE: Tue Mar 3 16:05:51 EST 1992 5 | REVISIONS: 6 | ----------------------------------------------------------------- */ 7 | #ifndef YOKMALLOC_H 8 | #define YOKMALLOC_H 9 | 10 | 11 | /* memory definitions - for portability and ease of use */ 12 | #ifndef MEM_DEBUG 13 | 14 | #define NIL( type ) (type) NULL 15 | #define YMALLOC(n, els) (els *) Ysafe_malloc((n)*sizeof(els)) 16 | #define YCALLOC(n, els) (els *) Ysafe_calloc(n, sizeof(els)) 17 | #define YREALLOC(ar,n,els) (els *) Ysafe_realloc(ar,(n)*sizeof(els)) 18 | #define YFREE(els) Ysafe_free(els) 19 | 20 | #define YVECTOR_MALLOC(lo, hi, els) (els *) Yvector_alloc(lo,hi,sizeof(els)) 21 | #define YVECTOR_CALLOC(lo, hi, els) (els *) Yvector_calloc(lo,hi,sizeof(els)) 22 | #define YVECTOR_FREE(ar,lo) Yvector_free( ar,lo,sizeof(* ar)) 23 | #define YVECTOR_REALLOC(ar,lo,hi,els) (els *) Yvector_realloc( ar,lo,hi,sizeof(els)) 24 | 25 | /* memory manager definitions - safety net between memory manager */ 26 | extern VOID Ysafe_free( P1(void *ptr) ) ; 27 | extern VOID Ysafe_cfree( P1(void *ptr) ) ; 28 | extern char *Ysafe_malloc( P1(INT bytes) ) ; 29 | extern char *Ysafe_calloc( P2(INT num_entries, INT bytes) ) ; 30 | extern char *Ysafe_realloc( P2(void *ptr, INT bytes) ) ; 31 | extern char *Yvector_alloc( P3(INT lo, INT hi, INT size ) ) ; 32 | extern char *Yvector_calloc( P3(INT lo, INT hi, INT size ) ) ; 33 | extern char *Yvector_realloc( P4(VOIDPTR array,INT lo,INT hi,INT size )) ; 34 | extern VOID Yvector_free( P3( VOIDPTR array, INT lo, INT size ) ) ; 35 | 36 | #else /* MEM_DEBUG - memory debug functions */ 37 | 38 | #define NIL( type ) (type) NULL 39 | #define YMALLOC(n, els) \ 40 | (els *) Ysafe_malloc((n)*sizeof(els),__FILE__,__LINE__) 41 | #define YCALLOC(n, els) \ 42 | (els *) Ysafe_calloc(n, sizeof(els),__FILE__,__LINE__) 43 | #define YREALLOC(ar,n,els) \ 44 | (els *) Ysafe_realloc(ar,(n)*sizeof(els),__FILE__,__LINE__) 45 | #define YFREE(els) \ 46 | Ysafe_free(els,__FILE__,__LINE__) 47 | 48 | #define YVECTOR_MALLOC(lo, hi, els) \ 49 | (els *) Yvector_alloc(lo,hi,sizeof(els),__FILE__,__LINE__) 50 | #define YVECTOR_CALLOC(lo, hi, els) \ 51 | (els *) Yvector_calloc(lo,hi,sizeof(els), __FILE__,__LINE__) 52 | #define YVECTOR_REALLOC(ar,lo,hi,els) \ 53 | (els *) Yvector_realloc( ar,lo,hi,sizeof(els),__FILE__,__LINE__) 54 | #define YVECTOR_FREE(ar,lo) \ 55 | Yvector_free( ar,lo,sizeof(* ar),__FILE__,__LINE__) 56 | 57 | /* memory manager definitions - safety net between memory manager */ 58 | extern VOID Ysafe_free( P3(void *ptr,char *file,INT line) ) ; 59 | extern VOID Ysafe_cfree( P3(void *ptr,char *file,INT line) ) ; 60 | extern char *Ysafe_malloc( P3(INT bytes,char *file,INT line) ) ; 61 | extern char *Ysafe_calloc( P4(INT num_entries, INT bytes,char *file,INT line) ) ; 62 | extern char *Ysafe_realloc( P4(void *ptr, INT bytes,char *file,INT line) ) ; 63 | extern char *Yvector_alloc( P5(INT lo, INT hi, INT size,char *file,INT line ) ) ; 64 | extern char *Yvector_calloc( P5(INT lo, INT hi, INT size,char *file,INT line ) ) ; 65 | extern char *Yvector_realloc( P6(VOIDPTR a,INT lo,INT h,INT s,char *f,INT l )) ; 66 | extern VOID Yvector_free( P5( VOIDPTR array, INT lo, INT size,char *f,INT l ) ) ; 67 | 68 | #endif /* MEM_DEBUG */ 69 | 70 | /* In both cases, define these */ 71 | extern INT YgetCurMemUse( P1(void) ) ; 72 | extern INT YgetMaxMemUse( P1(void) ) ; 73 | extern INT YcheckMemObj( P1(char *ptr) ) ; 74 | extern VOID YdebugMemory( P1(INT flag ) ) ; 75 | extern INT YcheckDebug( P1(VOIDPTR where ) ) ; 76 | extern VOID Yinit_memsize( P1(INT memsize) ) ; 77 | extern VOID Ydump_mem( P1(void) ) ; 78 | extern VOID Ypmemerror( P1(char *message ) ) ; 79 | 80 | #endif /* YOKMALLOC_H */ 81 | -------------------------------------------------------------------------------- /include/yalecad/plot.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_PLOT_H 2 | #define INC_PLOT_H 3 | 4 | void Yplot_flush( char *gName ); 5 | 6 | #endif /* INC_PLOT_H */ 7 | 8 | -------------------------------------------------------------------------------- /include/yalecad/program.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) program.h version 1.5 3/5/92" 3 | FILE: program.h 4 | DESCRIPTION:Insert file for program utility routines. 5 | DATE: Mar 16, 1989 6 | REVISIONS: 7 | ----------------------------------------------------------------- */ 8 | #ifndef PROGRAM_H 9 | #define PROGRAM_H 10 | 11 | #include 12 | 13 | extern char *YinitProgram( P3(char *name, char *version, 14 | VOID (*introTextFunction)() ) ) ; 15 | /* 16 | Function: 17 | Returns string with program name, version, and compile date. 18 | This string is built with YmsgG (actually a global note G suffix ). 19 | The user may perform various initialization in introTextFunction. 20 | There are no arguments to introTextFunction but user may 21 | get at the return string by peeking at YmsgG. This routine also 22 | starts the elapsed timer. 23 | */ 24 | 25 | extern void YexitPgm( P1(INT status) ) ; 26 | /* 27 | Function: 28 | Exit a program gracefully. It always outputs a message with 29 | the number of errors and warnings during the execution. A 30 | nonzero status means the execution failed. Status follows the 31 | normal UNIX rules. Exit program also calls the debug write 32 | function to create a dbg file if debug has been set. 33 | */ 34 | 35 | extern char *YgetProgName() ; 36 | /* 37 | Function: 38 | Returns the program name given in YinitProgram. 39 | */ 40 | 41 | #endif /* PROGRAM_H */ 42 | -------------------------------------------------------------------------------- /include/yalecad/project.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: project.h 3 | CONTENTS: definitions for projection package. 4 | DATE: Tue Oct 29 15:05:57 EST 1991 5 | REVISIONS: Thu Mar 5 03:41:11 EST 1992 - added very useful 6 | macro function Yproject_intersect. 7 | ----------------------------------------------------------------- */ 8 | #ifndef YPROJECT_H 9 | #define YPROJECT_H 10 | 11 | 12 | 13 | #define NOTOUCH 0 /* tiles don't touch or overlap */ 14 | #define TOUCH -1 /* tiles touch but dont overlap */ 15 | #define OVERLAP1 1 /* tiles overlap completely */ 16 | #define OVERLAP2 2 /* tiles overlap to right (top) */ 17 | #define OVERLAP3 3 /* tiles overlap to left (bot) */ 18 | 19 | /* very useful macro which determines intersection */ 20 | #define Yproject_intersect( t1_l, t1_r, t1_b, t1_t, t2_l, t2_r, t2_b, t2_t ) \ 21 | ( YprojectX((t1_l),(t1_r),(t2_l),(t2_r) ) ? \ 22 | YprojectY((t1_b),(t1_t),(t2_b),(t2_t) ) : 0 ) 23 | 24 | extern void Yproject_space( P2(INT xspace, INT yspace ) ) ; 25 | 26 | extern INT YprojectX( P4( INT tile1_left, INT tile1_right, 27 | INT tile2_left, INT tile2_right ) ) ; 28 | extern INT YprojectY( P4( INT tile1_bot, INT tile1_top, 29 | INT tile2_bot, INT tile2_top ) ) ; 30 | 31 | #endif /* YPROJECT_H */ 32 | -------------------------------------------------------------------------------- /include/yalecad/queue.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) queue.h version 1.4 10/9/90" 3 | FILE: queue.h 4 | DESCRIPTION:Insert file for queue library routines. 5 | DATE: Mar 16, 1989 6 | REVISIONS: 7 | ----------------------------------------------------------------- */ 8 | #ifndef QUEUE_H 9 | #define QUEUE_H 10 | 11 | #include 12 | 13 | /* *********** data structures *************** */ 14 | typedef struct yqueue_info { 15 | char *data ; 16 | struct yqueue_info *next ; 17 | } YQUEUEBOX, *YQUEUEPTR ; 18 | 19 | typedef struct { 20 | YQUEUEPTR top_of_queue ; 21 | YQUEUEPTR bot_of_queue ; 22 | } YQUEUE ; 23 | 24 | /* *********** FIFO routines *************** */ 25 | extern void YinitQueue( P2(YQUEUE *queue, char *node ) ) ; 26 | /* 27 | Arguments: 28 | YQUEUE *queue ; 29 | char *node ; 30 | Function: 31 | Initialization of the queue handler (FIFO) for a given queue. User 32 | supplies a pointer to the data that should be stored in queue. 33 | */ 34 | 35 | extern char *YtopQueue( P1(YQUEUE *queue ) ) ; 36 | /* 37 | Arguments: 38 | YQUEUE *queue ; 39 | Function: 40 | Returns the users pointer to the first element in the FIFO. 41 | */ 42 | 43 | extern void Yadd2Queue( P2(YQUEUE *queue, char *node ) ) ; 44 | /* 45 | Arguments: 46 | YQUEUE *queue ; 47 | char *node ; 48 | Function: 49 | Add a new element to the end of the queue. 50 | */ 51 | 52 | /* check status of the queue */ 53 | extern YQUEUEPTR YqueueNotEmpty( P1(YQUEUE *queue ) ) ; 54 | /* 55 | Arguments: 56 | YQUEUE *queue ; 57 | Function: 58 | Returns the QUEUEPTR if queue is not empty. NULL otherwise. 59 | */ 60 | 61 | /* debug function to dump the contents of the queue */ 62 | extern void YdumpQueue( P1(YQUEUE *queue ) ) ; 63 | /* 64 | Arguments: 65 | YQUEUE *queue ; 66 | Function: 67 | Debug function for queue handler. 68 | */ 69 | 70 | #endif /* QUEUE_H */ 71 | -------------------------------------------------------------------------------- /include/yalecad/quicksort.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: quicksort.h 3 | CONTENTS: quicksort definitions. 4 | DATE: Tue Mar 3 16:01:25 EST 1992 5 | ----------------------------------------------------------------- */ 6 | #ifndef YQUICKSORT_H 7 | #define YQUICKSORT_H 8 | 9 | 10 | extern VOID Yquicksort( P4(VOIDPTR base, INT n, INT size, INT (*compare)() ) ) ; 11 | 12 | #endif /* YQUICKSORT_H */ 13 | -------------------------------------------------------------------------------- /include/yalecad/radixsort.h: -------------------------------------------------------------------------------- 1 | #ifndef YRADIXSORT_H 2 | #define YRADIXSORT_H 3 | 4 | #include 5 | 6 | extern int Yradixsort7( P7(VOIDPTR *l1,INT n,UNSIGNED_INT endchar, 7 | VOIDPTR *tab, INT indexstart,char *(*ralloc)(), VOID (*rfree)() ) ) ; 8 | 9 | extern int Yradixsort5( P5(VOIDPTR *l1,INT n,UNSIGNED_INT endchar,VOIDPTR *tab, 10 | INT indexstart) ) ; 11 | 12 | extern int Yradixsort_pref( P2(VOIDPTR *l1,INT n) ) ; 13 | 14 | extern int Yradixsort4( P4(VOIDPTR *l1,INT n,UNSIGNED_INT endchar,VOIDPTR *tab)); 15 | 16 | extern int Yradixsort( P4(VOIDPTR *l1,INT n,VOIDPTR *tab,UNSIGNED_INT endchar)) ; 17 | 18 | extern int Yradixsort3( P3(VOIDPTR *l1,INT n, UNSIGNED_INT endchar) ) ; 19 | 20 | extern char *Yradix_prefix( P2(char *buffer, INT num ) ) ; 21 | 22 | extern int Yradix_number( P1(char *buffer ) ) ; 23 | 24 | extern char *Yradix_suffix( P1(char *buffer) ) ; 25 | 26 | extern char *Yradix_pref_clone( P1(char *buffer) ) ; 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /include/yalecad/rand.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_RAND_H 2 | #define INC_RAND_H 3 | 4 | INT Yacm_random(); 5 | 6 | #endif /*INC_RAND_H*/ 7 | 8 | -------------------------------------------------------------------------------- /include/yalecad/stack.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: stack.h 3 | DESCRIPTION:Macro descriptions for implementing simple stack operations. 4 | CONTENTS: 5 | DATE: Dec 6, 1989 6 | REVISIONS: 7 | ----------------------------------------------------------------- */ 8 | 9 | #ifndef STACK_H 10 | 11 | #define STACK_H 12 | 13 | #define YSIZE_STACK 0 14 | #define YSTACK_POINT 1 15 | #include 16 | 17 | #define YINITSTACK( stack_xyz, size_xyz ) \ 18 | { \ 19 | stack_xyz = (INT *) Ysafe_malloc( (size_xyz+2) * sizeof(int) ) ; \ 20 | stack_xyz[YSIZE_STACK] = size_xyz + 1 ; \ 21 | stack_xyz[YSTACK_POINT] = 1 ; \ 22 | } 23 | 24 | #define YCLEARSTACK( stack_xyz ) \ 25 | { \ 26 | stack_xyz[YSTACK_POINT] = 1 ; \ 27 | } 28 | 29 | #define YPOPSTACK( stack_xyz ) \ 30 | ( stack_xyz[YSTACK_POINT] > YSTACK_POINT ? stack_xyz[stack_xyz[YSTACK_POINT]--] : 0 ) 31 | 32 | #define YPUSHSTACK( stack_xyz, data_xyz ) \ 33 | { \ 34 | if( ++stack_xyz[YSTACK_POINT] <= stack_xyz[YSIZE_STACK] ){ \ 35 | stack_xyz[ stack_xyz[YSTACK_POINT] ] = data_xyz ; \ 36 | } else { \ 37 | M( ERRMSG, "YPUSHSTACK", "stack_overflow\n" ) ; \ 38 | } \ 39 | } 40 | 41 | #endif /* STACK_H */ 42 | -------------------------------------------------------------------------------- /include/yalecad/stat.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: stat.h 3 | DESCRIPTION:utility routines to calculate min, max, mean, and variance. 4 | CONTENTS: DOUBLE Ystat_min( array, number_ele, size_ele ) 5 | char *array ; 6 | INT num_ele, INT size_ele ; 7 | DOUBLE Ystat_max( array, number_ele, size_ele ) 8 | char *array ; 9 | INT num_ele, INT size_ele ; 10 | DOUBLE Ystat_mean( array, number_ele, size_ele ) 11 | char *array ; 12 | INT num_ele, INT size_ele ; 13 | DOUBLE Ystat_var( array, number_ele, size_ele, mean ) 14 | char *array ; 15 | INT num_ele, INT size_ele ; 16 | DOUBLE mean ; 17 | DATE: Mar 7, 1989 18 | REVISIONS: 19 | ----------------------------------------------------------------- */ 20 | #ifndef YSTAT_H 21 | #define YSTAT_H 22 | 23 | #ifndef lint 24 | static char SccsYstat_H[] = "@(#) stat.h (Yale) version 1.1 4/21/91" ; 25 | #endif 26 | 27 | /* 28 | Function: 29 | Given an array of number_elements of size_element, calculate min 30 | */ 31 | extern DOUBLE Ystat_min( P3( VOIDPTR array, INT number_elements, 32 | INT size_element ) ) ; 33 | 34 | /* 35 | Function: 36 | Given an array of number_elements of size size_element,calculate max 37 | */ 38 | extern DOUBLE Ystat_max( P3( VOIDPTR array, INT number_elements, 39 | int size_element ) ) ; 40 | 41 | /* 42 | Function: 43 | Given an array of number_elements of size size_ele, calculate mean 44 | */ 45 | extern DOUBLE Ystat_mean( P3( VOIDPTR array, INT number_elements, 46 | INT size_element ) ) ; 47 | 48 | /* 49 | Function: 50 | Given an array of number_elements of size size_ele, calculate variance. 51 | NOTE also need to give mean calculated from above 52 | */ 53 | extern DOUBLE Ystat_var( P4(VOIDPTR array,INT number_elements, 54 | INT size_element, DOUBLE mean ) ) ; 55 | #endif /* YSTAT_H */ 56 | -------------------------------------------------------------------------------- /include/yalecad/string.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) string.h version 1.7 3/6/92" 3 | FILE: string.h 4 | DESCRIPTION:Insert file for string library routines. 5 | DATE: Mar 16, 1989 6 | REVISIONS: Tue Oct 23 01:29:24 EDT 1990 - added string prototypes. 7 | ----------------------------------------------------------------- */ 8 | #ifndef YSTRING_H 9 | #define YSTRING_H 10 | 11 | #include 12 | #include 13 | 14 | extern char *Ystrclone( P1(char *str) ) ; 15 | /* 16 | Function: 17 | Clone a string by allocating memory. User must free memory when done. 18 | */ 19 | 20 | extern char **Ystrparser( P3(char *str, char *delimiters,INT *numtokens ) ) ; 21 | /* 22 | Function: 23 | This string parsing function uses strtok to break up the string 24 | into tokens delimited by the set of characters given in the delimiter 25 | string. Numtokens is set to the number of parsed tokens. The function 26 | returns a pointer to an array of all the tokens each of which has 27 | been terminated with EOS. This function destroys the given string 28 | so remember to copy the string if you need the original string for 29 | future use. 30 | */ 31 | 32 | extern char *Yremove_lblanks( P1(char *bufferptr) ) ; 33 | /* 34 | Function: 35 | Remove leading blanks and tabs from a string. 36 | */ 37 | 38 | /* 39 | Function: 40 | Very often used string functions that are defined by system. 41 | See man pages for details. 42 | */ 43 | #ifndef __GNUC__ 44 | extern char *strcat( P2( char *str1, char *str2 ) ) ; 45 | extern char *strncat( P3( char *str1, char *str2, INT n ) ) ; 46 | extern char *strcpy( P2( char *str1, char *str2 ) ) ; 47 | extern char *strncpy( P3( char *str1, char *str2, INT n) ) ; 48 | extern char *strtok( P2( char *str, char *delimiters ) ) ; 49 | extern char *strchr( P2( char *str, char c ) ) ; 50 | extern char *strrchr( P2( char *str, char c ) ) ; 51 | extern char *index( P2( char *str, char c ) ) ; 52 | extern char *rindex( P2( char *str, char c ) ) ; 53 | extern unsigned int strlen( P1( char *str) ) ; 54 | extern INT strcmp( P2( char *str1, char *str2 ) ) ; 55 | extern INT strncmp( P3( char *str1, char *str2, INT n ) ) ; 56 | #endif /* __GNUCC__ */ 57 | 58 | #endif /* YSTRING_H */ 59 | -------------------------------------------------------------------------------- /include/yalecad/system.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: system.h 3 | CONTENTS: definitions for system functions. 4 | DATE: Tue Oct 29 15:05:57 EST 1991 5 | REVISIONS: 6 | ----------------------------------------------------------------- */ 7 | #ifndef YSYSTEM_H 8 | #define YSYSTEM_H 9 | 10 | 11 | /* 12 | Ysystem - 13 | Function: 14 | An abstract interface to the system call. The first argument is 15 | the name of the program to be executed. It is used in the error 16 | message when the system call fails for some reason. The second 17 | argument is whether to abort the program or not. The third argument 18 | is the actual command that is to be processed. The fourth argument 19 | is the function to call upon failure. It has no arguments. 20 | Ysystem return the system error code if failure; 0 otherwise. 21 | */ 22 | extern INT Ysystem( P4(char *program,BOOL abortFlag,char *exec_statement, 23 | INT (*abort_func)() ) ) ; 24 | 25 | /* 26 | YcopyFile - 27 | Function: 28 | Copy a file from the source to the destination name. 29 | Aborts pgm if a failure. 30 | */ 31 | extern VOID YcopyFile( P2(char *sourcefile, char *destfile) ) ; 32 | 33 | /* 34 | YmoveFile - 35 | Function: 36 | Move a file from the source to the destination name. 37 | Aborts pgm if a failure. 38 | */ 39 | extern VOID YmoveFile( P2(char *sourcefile, char *destfile) ) ; 40 | 41 | /* 42 | Yrm_files - 43 | Function: 44 | Remove files from system. Wildcards are available. May be system 45 | dependent however. 46 | Never aborts pgm if a failure. 47 | */ 48 | extern VOID Yrm_files( P1(char *files) ) ; 49 | 50 | /* 51 | Ygetenv - 52 | Function: 53 | Interface to getenv system function. 54 | */ 55 | extern char *Ygetenv( P1(char *env_var) ) ; 56 | 57 | #endif /* YSYSTEM_H */ 58 | -------------------------------------------------------------------------------- /include/yalecad/tech.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: tech.h 3 | DESCRIPTION:include file for technology lookup. 4 | DATE: Oct 13, 1990 5 | REVISIONS: 6 | ----------------------------------------------------------------- */ 7 | #ifndef YTECH_H 8 | #define YTECH_H 9 | 10 | 11 | #include 12 | 13 | #define TECH_CHARACTERISTIC (DOUBLE) 1000.0 14 | 15 | #define LAYER1 "layer1" 16 | #define LAYER2 "layer2" 17 | #define LAYER3 "layer3" 18 | #define VIA1_2 "via1/2" 19 | #define VIA2_3 "via2/3" 20 | 21 | 22 | extern void Ytech_init( P1(char *designName ) ) ; 23 | /* 24 | Function: 25 | Read a technology file for a given design. Must be called 26 | first before using other technology functions. 27 | */ 28 | 29 | 30 | extern INT Ytech_spacing( P2(char *object1, char *object2 ) ) ; 31 | /* 32 | Function: 33 | Returns the spacing between the two given objects. 34 | If it does not exist it defaults to zero. 35 | */ 36 | 37 | extern INT Ytech_width( P1(char *object) ) ; 38 | /* 39 | Function: 40 | Returns the width of the given object. 41 | If it does not exist it defaults to zero. 42 | */ 43 | 44 | extern INT Ytech_pitch( P1(char *object) ) ; 45 | /* 46 | Function: 47 | Convenience function that returns the pitch of a given object. 48 | It returns the sum of width and spacing for that object. 49 | */ 50 | 51 | #endif /* YTECH_H */ 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /include/yalecad/time.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_TIME_H 2 | #define INC_TIME_H 3 | 4 | char *YcurTime( INT *time_in_sec ); 5 | 6 | #endif /* INC_TIME_H */ 7 | 8 | -------------------------------------------------------------------------------- /include/yalecad/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_TIMER_H 2 | #define INC_TIMER_H 3 | 4 | void Ytimer_elapsed( INT *time_elapsed ); 5 | 6 | void Ytimer_start(); 7 | 8 | #endif /*INC_TIMER_H */ 9 | -------------------------------------------------------------------------------- /script/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_custom_command(OUTPUT show_flows COMMAND sed 's;TWFLOWDIR;${CMAKE_INSTALL_PREFIX}/lib/graywolf;' ${CMAKE_SOURCE_DIR}/script/show_flows.in > ${CMAKE_BINARY_DIR}/script/show_flows) 4 | add_custom_target(run ALL DEPENDS ${CMAKE_BINARY_DIR}/script/show_flows) 5 | install(FILES ${CMAKE_BINARY_DIR}/script/show_flows DESTINATION lib/graywolf/bin PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE) 6 | install(FILES splt_file.a DESTINATION lib/graywolf/bin) 7 | -------------------------------------------------------------------------------- /script/show_flows.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (C) 1991 Yale University 4 | # 5 | # This work is distributed in the hope that it will be useful; you can 6 | # redistribute it and/or modify it under the terms of the 7 | # GNU General Public License as published by the Free Software Foundation; 8 | # either version 2 of the License, 9 | # or any later version, on the following conditions: 10 | # 11 | # (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 12 | # ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 13 | # SALE OR 14 | # OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 15 | # PATENT OR 16 | # OTHER RIGHTS NOT VESTED IN YALE. 17 | # 18 | # (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 19 | # WARRANTIES 20 | # WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 21 | # INCLUDING, 22 | # BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 23 | # PARTICULAR 24 | # PURPOSE. 25 | # 26 | # (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 27 | # WHATSOEVER TO 28 | # ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 29 | # ARTICLE 30 | # (a) AND (b) above. 31 | # 32 | # (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 33 | # EMPLOYEES AND 34 | # AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 35 | # INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 36 | # ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 37 | # POSSIBILITY OF THE FOREGOING. 38 | # 39 | # 40 | 41 | # This shell script shows the flow directory options 42 | # "@(#) show_flows version 1.1 4/27/91" 43 | 44 | #set test = ${?TWDIR} 45 | #if $test != 1 then 46 | # echo "" 47 | # echo "ERROR[show_flows]:TWDIR environment variable not set" 48 | # echo "TWDIR is pathname of TimberWolf root directory" 49 | # echo "" 50 | # exit(1) ; 51 | #endif 52 | 53 | echo " " 54 | echo " " 55 | echo "Available installed flow directories are:" 56 | 57 | 58 | # get environment variable TWDIR 59 | #set twdir = /usr/lib/timberwolf 60 | 61 | /bin/ls -1l TWFLOWDIR/bin/flow | awk '{ print $8 $9 $10 }' 62 | 63 | echo " " 64 | echo "The current default flow directory is denoted by the arrow." 65 | echo " " 66 | echo " " 67 | 68 | exit 0 69 | -------------------------------------------------------------------------------- /script/splt_file.a: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # 3 | # FILENAME : splt_file.a 4 | # 5 | # FUNCTION : Split circuitName.cel into two files, called 6 | # circuitName.mcel and circuitName.scel respectively. The 7 | # file circuitName.mcel contains the part of various macro 8 | # cells and pads in file circuitName.cel; while file 9 | # circuitName.scel contains the standard cell part. 10 | # 11 | # RESTRICTION : All cells must be separated by a blank line. 12 | # 13 | # USAGE : awk -f [/path/]splt_file.a circuitName.cel 14 | # 15 | # CHANGES : GNU awk does not set FILENAME in the BEGIN block. 16 | # FILENAME picked up from arguments list. (8/27/03) 17 | # 18 | # "@(#) splt_file.a (Yale) version 1.2 12/18/89" 19 | ########################################################################## 20 | 21 | BEGIN { 22 | mfile = ARGV[ARGC - 1] ; 23 | sfile = ARGV[ARGC - 1] ; 24 | sub( /\..+/ , ".mcel" , mfile ) ; 25 | sub( /\..+/ , ".scel" , sfile ) ; 26 | printf( "\n" ) > sfile 27 | } 28 | $1 == "cell" { sc = 1; print $0 >> sfile; next } 29 | $1 == "hardcell" { sc = 0; print $0 >> mfile; next } 30 | $1 == "softcell" { sc = 0; print $0 >> mfile; next } 31 | $1 == "pad" { sc = 0; print $0 >> mfile; next } 32 | sc == 1 { print $0 >> sfile } 33 | sc == 0 { print $0 >> mfile } 34 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_subdirectory(Ylib) 3 | add_subdirectory(date) 4 | add_subdirectory(twmc) 5 | add_subdirectory(genrows) 6 | add_subdirectory(twflow) 7 | add_subdirectory(mincut) 8 | add_subdirectory(twsc) 9 | add_subdirectory(syntax) 10 | add_subdirectory(mc_compact) 11 | -------------------------------------------------------------------------------- /src/Ylib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | #add_executable(mincut main.c output.c readcells.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 4 | 5 | 6 | add_library(ycadgraywolf SHARED assign.c buster.c cleanup.c colors.c deck.c dialog.c draw.c dset.c edcolors.c file.c getftime.c graph.c grid.c hash.c heap.c list.c log.c menus.c message.c mst.c mytime.c okmalloc.c path.c plot.c program.c project.c queue.c quicksort.c radixsort.c rand.c rbtree.c relpath.c set.c stat.c stats.c string.c system.c time.c timer.c trans.c wgraphics.c ydebug.c yreadpar.c ) 7 | 8 | target_link_libraries(ycadgraywolf ${X11_LIBRARIES}) 9 | target_link_libraries(ycadgraywolf m) 10 | 11 | set_target_properties(ycadgraywolf PROPERTIES VERSION 1.0.0 SOVERSION 1) 12 | 13 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include ${X11_INCLUDE_DIR}) 14 | 15 | install(TARGETS ycadgraywolf DESTINATION ${CMAKE_INSTALL_LIBDIR}) 16 | -------------------------------------------------------------------------------- /src/Ylib/getftime.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1989-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: getftime.c 42 | DESCRIPTION:This file contains a routine which returns the last time 43 | a file was modified. 44 | CONTENTS: 45 | DATE: May 8, 1989 - original coding. 46 | REVISIONS: Apr 29, 1990 - added message.h 47 | ----------------------------------------------------------------- */ 48 | 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | 55 | #define ERROR -1 /* return code for error */ 56 | 57 | INT YgetFileTime( filename ) 58 | char *filename ; 59 | { 60 | struct stat info ; /* info record */ 61 | INT status ; /* return code from stat */ 62 | 63 | if( filename ){ 64 | status = stat( filename, &info ) ; 65 | if( status == ERROR ){ 66 | sprintf( YmsgG, "ERROR[YgetFileTime] - %s", filename ) ; 67 | perror( YmsgG ) ; 68 | return( ERROR ) ; 69 | } 70 | return( info.st_mtime ) ; 71 | } 72 | return( ERROR ) ; 73 | 74 | } /* end YgetFileTime */ 75 | -------------------------------------------------------------------------------- /src/Ylib/info.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) info.h (Yale) version 3.10 1/30/92" 3 | FILE: info.h 4 | DESCRIPTION:include file for graphics screen routines 5 | CONTENTS: typedefs, and external routines for TWinfo record. 6 | DATE: Mar 21, 1989 - original coding moved from draw.h 7 | REVISIONS: Sep 23, 1989 - added color fields for TWtoggleColor() 8 | Oct 12, 1990 - modified structure to accommodate 4 9 | draw windows. 10 | Dec 7, 1990 - added stipple switch to information. 11 | Mon Jan 7 18:17:44 CST 1991 - made SAFE_WAIT_TIME 12 | user programmable for slow machines. 13 | Thu Mar 7 01:23:40 EST 1991 - added refresh function 14 | so that dialog box works correctly. 15 | ----------------------------------------------------------------- */ 16 | #ifndef INFO_H 17 | #define INFO_H 18 | 19 | #include 20 | 21 | #define GRAPHICS "graywolf" /* the name of prog in Xdefaults */ 22 | #define MENUHEIGHT 20 /* give menu extra pixels in width */ 23 | 24 | #ifdef YDRAW_VARS 25 | #define EXTERN 26 | #else 27 | #define EXTERN extern 28 | #endif 29 | 30 | typedef struct { 31 | GC *graphicContext ; /* array of color contexts */ 32 | Display *dpy ; /* the display */ 33 | Window backWindow; /* the backing window */ 34 | Window drawWindow; /* the main drawing window */ 35 | Window rootWindow; /* the root window */ 36 | INT screen; /* the current screen */ 37 | char *fontname ; /* main font window font */ 38 | XFontStruct *fontinfo ; /* font information */ 39 | DOUBLE scaleFactor ; /* scale data to screen dim.*/ 40 | INT xoffset ; /* data offset to x screen dim.*/ 41 | INT yoffset ; /* data offset to y screen dim.*/ 42 | INT winwidth ; /* window width in pixels */ 43 | INT winheight ; /* window height in pixels */ 44 | INT winx ; /* window origin x from ul */ 45 | INT winy ; /* window origin y from ul */ 46 | BOOL *colorOn ; /* array of whether color is on */ 47 | BOOL stipple ; /* whether stipple has been requested*/ 48 | INT numColors ; /* number of colors */ 49 | char **colors ; /* names of the user given colors */ 50 | Pixmap pixmap ; /* pixmap for redraw after menus */ 51 | INT (*refresh_func)() ;/* store the refresh function */ 52 | } TWINFO, *TWINFOPTR ; 53 | 54 | /* ****************** GLOBALS ************************** */ 55 | /* GLOBAL VARIABLES */ 56 | EXTERN INT TWsafe_wait_timeG ;/* time to wait before redraw */ 57 | 58 | extern TWINFOPTR TWgetDrawInfo() ; /* TW library routines use this */ 59 | extern void TWsetDrawInfo( P3( INT winheight, INT winwidth, Pixmap pixmap )) ; 60 | extern Window TWgetWindowId( P2(Display *dpy, Window backwindow) ) ; 61 | extern BOOL TWinitMenuWindow( P1(TWMENUPTR menu_fields) ) ; 62 | extern XFontStruct *TWgetfont( P2(char *fname, Font *font) ) ; 63 | 64 | #undef EXTERN 65 | 66 | #endif /* INFO_H */ 67 | -------------------------------------------------------------------------------- /src/Ylib/log.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1989-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: log.c 42 | DESCRIPTION:This file contains routines for logging the 43 | execution times of the program. 44 | CONTENTS: Ylog_msg( message ) 45 | char *message ; 46 | Ylog_start( message ) 47 | char *message ; 48 | DATE: May 7, 1989 - original coding. 49 | REVISIONS: Aug 7, 1989 - Moved to libary. 50 | ----------------------------------------------------------------- */ 51 | 52 | #include 53 | #include 54 | #include 55 | #include 56 | 57 | static char cktNameS[LRECL] = " " ; 58 | 59 | /* put a message in the log file */ 60 | void Ylog_msg( message ) 61 | char *message ; 62 | { 63 | INT timestamp ; /* seconds since Jan 1, 1970 */ 64 | char *time, *YcurTime() ; /* YcurTime returns ASCII time string */ 65 | char filename[LRECL] ; /* log file name */ 66 | FILE *fp ; /* logfile */ 67 | 68 | sprintf( filename, "%s.log", cktNameS ) ; 69 | fp = TWOPEN( filename, "a", ABORT ) ; 70 | time = YcurTime( ×tamp ) ; 71 | fprintf( fp, "time %8d %s:%s\n", timestamp, time, message ) ; 72 | TWCLOSE( fp ) ; 73 | } /* end log */ 74 | 75 | void Ylog_start( design, message ) 76 | char *design ; 77 | char *message ; 78 | { 79 | INT timestamp ; /* seconds since Jan 1, 1970 */ 80 | char *time, *YcurTime() ; /* YcurTime returns ASCII time string */ 81 | char filename[LRECL] ; /* log file name */ 82 | FILE *fp ; /* logfile */ 83 | 84 | strcpy( cktNameS, design ) ; 85 | sprintf( filename, "%s.log", cktNameS ) ; 86 | fp = TWOPEN( filename, "a", ABORT ) ; 87 | time = YcurTime( ×tamp ) ; 88 | fprintf( fp,"####################################################\n"); 89 | fprintf( fp, "time %8d %s:%s\n", timestamp, time, message ) ; 90 | TWCLOSE( fp ) ; 91 | } /* end log */ 92 | -------------------------------------------------------------------------------- /src/Ylib/system.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: system.c 42 | DESCRIPTION:system routines 43 | DATE: Apr 26, 1990 44 | REVISIONS: May 12, 1990 - added move file and getenv. 45 | ----------------------------------------------------------------- */ 46 | 47 | #include 48 | #include 49 | #include 50 | 51 | INT Ysystem( program, abortFlag, exec_statement, abort_func ) 52 | char *program ; 53 | BOOL abortFlag ; 54 | char *exec_statement ; 55 | INT (*abort_func)() ; 56 | { 57 | INT status ; /* return status from program */ 58 | 59 | if( status = system( exec_statement ) ){ 60 | /* get status from exit routine */ 61 | status = (status & 0x0000FF00) >> 8 ;/* return code in 2nd byte */ 62 | /* now determine the program */ 63 | 64 | sprintf( YmsgG, "Program %s returned with exit code:%d\n",program, 65 | status ); 66 | M( ERRMSG, NULL, YmsgG ) ; 67 | if( abort_func ){ 68 | (*abort_func)() ; 69 | } 70 | if( abortFlag ){ 71 | YexitPgm( PGMFAIL ) ; /* exit the program */ 72 | } 73 | return( status ) ; 74 | } 75 | return( 0 ) ; 76 | } /* end Ysystem */ 77 | 78 | void YcopyFile( sourcefile, destfile ) 79 | char *sourcefile, *destfile ; 80 | { 81 | sprintf( YmsgG, "/bin/cp %s %s", sourcefile, destfile ) ; 82 | Ysystem( "Ylib/YcopyFile", ABORT, YmsgG, NULL ) ; 83 | } /* end Ycopyfile */ 84 | 85 | void YmoveFile( sourcefile, destfile ) 86 | char *sourcefile, *destfile ; 87 | { 88 | sprintf( YmsgG, "/bin/mv %s %s", sourcefile, destfile ) ; 89 | Ysystem( "Ylib/YmoveFile", ABORT, YmsgG, NULL ) ; 90 | } /* end Ycopyfile */ 91 | 92 | void Yrm_files( files ) 93 | char *files ; 94 | { 95 | sprintf( YmsgG, "/bin/rm -rf %s", files ) ; 96 | Ysystem( "Ylib/Yrm_files", NOABORT, YmsgG, NULL ) ; 97 | } /* end Ycopyfile */ 98 | 99 | char *Ygetenv( env_var ) 100 | char *env_var ; 101 | { 102 | char *getenv() ; 103 | 104 | return( (char *) getenv( env_var ) ) ; 105 | 106 | } /* end Ygetenv */ 107 | -------------------------------------------------------------------------------- /src/Ylib/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1988-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: time.c 42 | DESCRIPTION:This file contains a time utility routine which returns 43 | an ASCII string with time and date. 44 | CONTENTS: 45 | char *YcurTime( time_in_sec ) 46 | INT *time_in_sec ; 47 | 48 | DATE: Oct 23, 1988 49 | REVISIONS: Apr 27, 1989 - changed to Y prefix and added time in seconds. 50 | ----------------------------------------------------------------- */ 51 | 52 | #include 53 | #include 54 | 55 | #ifdef THINK_C 56 | #define TIME_T time_t 57 | #else 58 | #define TIME_T long 59 | #endif 60 | 61 | char *YcurTime( time_in_sec ) 62 | INT *time_in_sec ; 63 | { 64 | /* get current time - return ASCII string with time and date */ 65 | TIME_T t ; 66 | char *ptr ; 67 | char *nptr ; 68 | t = time((TIME_T *) 0) ; 69 | /* return time in seconds since Jan 1, 1970 if requested */ 70 | if( time_in_sec ){ 71 | *time_in_sec = t ; 72 | } 73 | /* get time and remove newline char */ 74 | for( nptr = ptr = ctime(&t) ;*nptr;nptr++ ){ 75 | if( *nptr == '\n' ){ 76 | *nptr = EOS ; 77 | } 78 | } 79 | return( ptr ) ; 80 | } /* end curTime */ 81 | -------------------------------------------------------------------------------- /src/date/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_executable(getdate getdate.c) 4 | -------------------------------------------------------------------------------- /src/date/date.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | 41 | /* ----------------------------------------------------------------- 42 | FILE: date.c 43 | DESCRIPTION:Compile date stamp routine. This simple function stores 44 | the compile date of the program. 45 | DATE: Jan 29, 1988 46 | REVISIONS: May 4, 1990 - now use static so we can look at compile 47 | date in object code. 48 | ----------------------------------------------------------------- */ 49 | 50 | #include 51 | 52 | static char compileDate[] = DATE ; 53 | char *getCompileDate() 54 | { 55 | return( &(compileDate[27]) ) ; 56 | } /* end getCompileDate */ 57 | -------------------------------------------------------------------------------- /src/date/getdate.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | #define LRECL 256 46 | #define EOS '\0' 47 | 48 | 49 | /* this small program creates a file called date.h */ 50 | /* which contains a define statement with the current time */ 51 | 52 | int main( int argc , char ** argv ) 53 | { 54 | 55 | FILE *fp ; 56 | char *date , 57 | buffer[LRECL] ; 58 | int len ; 59 | 60 | system("date > date.h") ; 61 | 62 | if( !(fp = fopen("date.h","r" ))){ 63 | printf("Could not reopen date.h"); 64 | exit(0) ; 65 | } 66 | 67 | rewind(fp) ; 68 | 69 | /* read line from system call */ 70 | date = fgets(buffer,LRECL,fp) ; 71 | fclose(fp) ; 72 | 73 | if( !(fp = fopen("date.h","w" ))){ 74 | printf("Could not open date.h"); 75 | exit(0) ; 76 | } 77 | 78 | if( date ){ 79 | /* get rid of newline character */ 80 | len = strlen( date ) ; 81 | date[len-1] = EOS ; 82 | fprintf(fp,"#define DATE \"@(#) Yale compilation date:%s\"\n",date); 83 | fclose(fp) ; 84 | exit(0) ; 85 | } 86 | 87 | /* errors - give unknown date */ 88 | fprintf(fp,"#define DATE \"@(#) Yale compilation date:unknown\"\n") ; 89 | fclose(fp) ; 90 | 91 | return 0; 92 | } /* end main */ 93 | -------------------------------------------------------------------------------- /src/genrows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_executable(genrows draw.c genrows.c main.c merge.c readpar.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 4 | 5 | target_link_libraries(genrows ycadgraywolf) 6 | target_link_libraries(genrows ${X11_LIBRARIES}) 7 | target_link_libraries(genrows m) 8 | 9 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 10 | 11 | install(TARGETS genrows DESTINATION lib/graywolf/bin) 12 | -------------------------------------------------------------------------------- /src/genrows/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 20:57:18 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/genrows/dialog.h: -------------------------------------------------------------------------------- 1 | static TWDIALOGBOX dialogS[40] = { 2 | 1,5,8," ACCEPT ",2,6,0, 3 | 1,25,8," CANCEL ",2,3,0, 4 | 2,15,9,"Tile Edit",0,3,0, 5 | 3,5,6,"Tile :",0,4,0, 6 | 4,5,6,"Left :",0,4,0, 7 | 5,5,6,"Bottom:",0,4,0, 8 | 6,5,6,"Right :",0,4,0, 9 | 7,5,6,"Top :",0,4,0, 10 | 9,5,10,"Legal Tile",3,4,9, 11 | 9,25,3,"YES",2,6,1, 12 | 9,31,2,"NO",2,3,1, 13 | 10,5,21,"Row Height :",0,4,0, 14 | 10,25,8," ",1,4,0, 15 | 11,5,21,"Max. No. of Rows :",0,4,0, 16 | 11,25,8," ",1,4,0, 17 | 12,5,21,"Number of Rows :",0,4,0, 18 | 12,25,8," ",1,4,2, 19 | 13,5,19,"Force No. of Rows :",3,4,17, 20 | 13,25,3,"YES",2,6,0, 21 | 13,31,2,"NO",2,3,0, 22 | 14,5,21,"Min. length of row:",0,4,0, 23 | 14,25,8," ",1,4,0, 24 | 15,5,21,"Start of row :",0,4,0, 25 | 15,25,8," ",1,4,0, 26 | 16,5,21,"End of row :",0,4,0, 27 | 16,25,8," ",1,4,0, 28 | 17,5,21,"Channel separation:",0,4,0, 29 | 17,25,8," ",1,4,0, 30 | 18,5,21,"Default Class :",0,4,0, 31 | 18,25,8," ",1,4,0, 32 | 19,5,19,"Mirror rows :",3,4,32, 33 | 19,25,3,"YES",2,6,3, 34 | 19,31,2,"NO",2,3,3, 35 | 21,1,35,"To change case fields put pointer",0,4,0, 36 | 22,1,35,"in window and click. To change",0,4,0, 37 | 23,1,35,"input fields put pointer in window",0,4,0, 38 | 24,1,35,"and back up over current contents",0,4,0, 39 | 25,1,35,"using the delete key. After modifying",0,4,0, 40 | 26,1,35,"the field, hit the return key.",0,4,0, 41 | 0,0,0,0,0,0,0 42 | } ; 43 | 44 | -------------------------------------------------------------------------------- /src/genrows/dialog2.h: -------------------------------------------------------------------------------- 1 | static TWDIALOGBOX row_dialogS[19] = { 2 | 1,5,8," ACCEPT ",2,6,0, 3 | 1,25,8," CANCEL ",2,3,0, 4 | 2,15,8,"Row Edit",0,3,0, 5 | 4,5,6,"Left :",0,4,0, 6 | 5,5,6,"Bottom :",0,4,0, 7 | 6,5,6,"Right :",0,4,0, 8 | 7,5,6,"Top :",0,4,0, 9 | 8,5,21,"Class :",0,4,0, 10 | 8,25,8," ",1,4,0, 11 | 9,5,19,"Mirror rows :",3,4,11, 12 | 9,25,3,"YES",2,6,1, 13 | 9,31,2,"NO",2,3,1, 14 | 11,1,35,"To change case fields put pointer",0,4,0, 15 | 12,1,35,"in window and click. To change",0,4,0, 16 | 13,1,35,"input fields put pointer in window",0,4,0, 17 | 14,1,35,"and back up over current contents",0,4,0, 18 | 15,1,35,"using the delete key. After modifying",0,4,0, 19 | 16,1,35,"the field, hit the return key.",0,4,0, 20 | 0,0,0,0,0,0,0 21 | } ; 22 | 23 | -------------------------------------------------------------------------------- /src/genrows/dialog3.h: -------------------------------------------------------------------------------- 1 | static TWDIALOGBOX macro_dialogS[29] = { 2 | 1,5,8," ACCEPT ",2,6,0, 3 | 1,25,8," CANCEL ",2,3,0, 4 | 2,15,9,"Macro Edit",0,3,0, 5 | 4,5,11,"Coordinates",0,4,0, 6 | 5,5,11,"-----------",0,2,0, 7 | 6,5,9,"X :",0,4,0, 8 | 6,25,8," ",1,4,0, 9 | 7,5,9,"Y :",0,4,0, 10 | 7,25,8," ",1,4,0, 11 | 8,5,9,"Delta X :",0,4,0, 12 | 8,25,8," ",1,4,0, 13 | 9,5,9,"Delta Y :",0,4,0, 14 | 9,25,8," ",1,4,0, 15 | 10,5,7,"Orient:",3,4,14, 16 | #ifndef TI 17 | 10,25,1,"0",2,4,1, 18 | 10,26,1,"1",2,4,1, 19 | 10,27,1,"2",2,4,1, 20 | 10,28,1,"3",2,4,1, 21 | 10,29,1,"4",2,4,1, 22 | 10,30,1,"5",2,4,1, 23 | 10,31,1,"6",2,4,1, 24 | 10,32,1,"7",2,4,1, 25 | #else /* the TI case */ 26 | 10,25,1,"1",2,4,1, 27 | 10,26,1,"2",2,4,1, 28 | 10,27,1,"3",2,4,1, 29 | 10,28,1,"4",2,4,1, 30 | 10,29,1,"5",2,4,1, 31 | 10,30,1,"6",2,4,1, 32 | 10,31,1,"7",2,4,1, 33 | 10,32,1,"8",2,4,1, 34 | #endif /* TI */ 35 | 13,1,35,"To change case fields put pointer",0,4,0, 36 | 14,1,35,"in window and click. To change",0,4,0, 37 | 15,1,35,"input fields put pointer in window",0,4,0, 38 | 16,1,35,"and back up over current contents",0,4,0, 39 | 17,1,35,"using the delete key. After modifying",0,4,0, 40 | 18,1,35,"the field, hit the return key.",0,4,0, 41 | 0,0,0,0,0,0,0 42 | } ; 43 | 44 | #ifdef TI 45 | /* timberwolf to ice view translations */ 46 | INT tw2ice(orient) 47 | INT orient; 48 | { 49 | switch (orient){ 50 | case 0: 51 | return(1); 52 | case 1: 53 | return(7); 54 | case 2: 55 | return(5); 56 | case 3: 57 | return(3); 58 | case 4: 59 | return(8); 60 | case 5: 61 | return(6); 62 | case 6: 63 | return(2); 64 | case 7: 65 | return(4); 66 | } 67 | 68 | } 69 | 70 | 71 | INT ice2tw(orient) 72 | INT orient; 73 | { 74 | switch (orient){ 75 | case 1: 76 | return(0); 77 | case 2: 78 | return(6); 79 | case 3: 80 | return(3); 81 | case 4: 82 | return(7); 83 | case 5: 84 | return(2); 85 | case 6: 86 | return(5); 87 | case 7: 88 | return(1); 89 | case 8: 90 | return(4); 91 | } 92 | } /* end ice2tw */ 93 | 94 | #endif /* TI */ 95 | -------------------------------------------------------------------------------- /src/genrows/genrows.dialog: -------------------------------------------------------------------------------- 1 | numfields;39 2 | # "@(#) genrows.dialog (Yale) version 3.4 1/25/91" 3 | # Here is how you make a dialog box. 4 | # Semicolons are delimiters 5 | # field;fieldnumber;xpos;ypos;init string;field length; 6 | # (continued) field type;color;case toggle 7 | # Field types are 8 | # accept - mandatory 9 | # reject - mandatory 10 | # label - write only field. 11 | # input - read write field 12 | # case - a set of case field to follow 13 | # the first field in the list is the initial case. 14 | # clabel - one of the case fields. 15 | # field number must start with 0 16 | field;0; 5;1 ; ACCEPT ; 8;accept;green 17 | field;1; 25;1 ; CANCEL ; 8;reject;red 18 | field;2; 15;2 ;Tile Edit; 9;label;red 19 | field;3; 5;3 ;Tile :; 6;label;blue 20 | field;4; 5;4 ;Left :; 6;label;blue 21 | field;5; 5;5 ;Bottom:; 6;label;blue 22 | field;6; 5;6 ;Right :; 6;label;blue 23 | field;7; 5;7 ;Top :; 6;label;blue 24 | field;8; 5;9 ;Legal Tile; 10;case;blue;9,10 25 | field;9; 25;9 ;YES; 3;clabel;green 26 | field;10; 31;9 ;NO; 2;clabel;red 27 | field;11; 5;10 ;Row Height :;21;label;blue 28 | field;12; 25;10 ; ; 8;input;blue 29 | field;13; 5;11 ;Max. No. of Rows :;21;label;blue 30 | field;14; 25;11 ; ; 8;input;blue 31 | field;15; 5;12 ;Number of Rows :;21;label;blue 32 | field;16; 25;12 ; ; 8;input;blue 33 | field;17; 5;13 ;Force No. of Rows :;19;case;blue;17,16 34 | field;18; 25;13 ;YES; 3;clabel;green 35 | field;19; 31;13 ;NO; 2;clabel;red 36 | field;20; 5;14 ;Min. length of row:;21;label;blue 37 | field;21; 25;14 ; ; 8;input;blue 38 | field;22; 5;15 ;Start of row :;21;label;blue 39 | field;23; 25;15 ; ; 8;input;blue 40 | field;24; 5;16 ;End of row :;21;label;blue 41 | field;25; 25;16 ; ; 8;input;blue 42 | field;26; 5;17 ;Channel separation:;21;label;blue 43 | field;27; 25;17 ; ; 8;input;blue 44 | field;28; 5;18 ;Default Class :;21;label;blue 45 | field;29; 25;18 ; ; 8;input;blue 46 | field;30; 5;19 ;Mirror rows :;19;case;blue;32,31 47 | field;31; 25;19 ;YES; 3;clabel;green 48 | field;32; 31;19 ;NO; 2;clabel;red 49 | # directions 50 | field;33;1;21;To change case fields put pointer;35;label;blue 51 | field;34;1;22;in window and click. To change;35;label;blue 52 | field;35;1;23;input fields put pointer in window;35;label;blue 53 | field;36;1;24;and back up over current contents;35;label;blue 54 | field;37;1;25;using the delete key. After modifying;35;label;blue 55 | field;38;1;26;the field, hit the return key.;35;label;blue 56 | -------------------------------------------------------------------------------- /src/genrows/genrows.h: -------------------------------------------------------------------------------- 1 | #ifndef __GENROWS_GENROWS_H__ 2 | #define __GENROWS_GENROWS_H__ 3 | 4 | void calculate_numrows(void); 5 | void recalculate(BOOL freepts); 6 | void remakerows(void); 7 | void set_core(INT left, INT right, INT bottom, INT top ); 8 | 9 | #endif // __GENROWS_GENROWS_H__ 10 | -------------------------------------------------------------------------------- /src/genrows/genrows_menu: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 1991 Yale University 3 | # 4 | # This work is distributed in the hope that it will be useful; you can 5 | # redistribute it and/or modify it under the terms of the 6 | # GNU General Public License as published by the Free Software Foundation; 7 | # either version 2 of the License, 8 | # or any later version, on the following conditions: 9 | # 10 | # (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | # ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | # SALE OR 13 | # OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | # PATENT OR 15 | # OTHER RIGHTS NOT VESTED IN YALE. 16 | # 17 | # (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | # WARRANTIES 19 | # WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | # INCLUDING, 21 | # BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | # PARTICULAR 23 | # PURPOSE. 24 | # 25 | # (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | # WHATSOEVER TO 27 | # ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | # ARTICLE 29 | # (a) AND (b) above. 30 | # 31 | # (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | # EMPLOYEES AND 33 | # AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | # INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | # ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | # POSSIBILITY OF THE FOREGOING. 37 | # 38 | 39 | 40 | # genrows menu file. 41 | # "@(#) genrows_menu (Yale) version 3.15 9/21/91" 42 | # 43 | # Comments start with a sharp 44 | # MENU is a keyword must be capitalized. 45 | # Everything in this file is case sensitive. 46 | # Fields are separated by commas. 47 | # Format: 48 | # MENU,menuName - followed by list of entries for this menu 49 | # - one on each line. 50 | # Normal menu entry - MenuEntry,FunctionNumber 51 | # Boolean menu entry - 52 | # TrueMenuEntry,FunctionNumber1,FalseMenuEntry,FunctionNumber2,Init 53 | # where Init is the initial state and is 1 for True and 0 for False. 54 | # 55 | # Menu are placed on the screen in a left to right order according 56 | # to the order in this file. 57 | # 58 | MENU,CONTROL 59 | Auto Redraw On,1,Auto Redraw Off,2,1 60 | Close Graphics,3 61 | Colors,4 62 | Continue Pgm,5 63 | Dump Graphics,6 64 | FullView,7 65 | Redraw,8 66 | Tell Point,9 67 | Translate,10 68 | Zoom,11 69 | Cancel,0 70 | 71 | MENU,EDIT 72 | Align Macro in X,12 73 | Align Macro in Y,13 74 | Align Rows,14 75 | Edit Macro,16 76 | Edit Row,15 77 | Edit Tile,17 78 | Keep Short Row,18,Discard Short Row,19,0 79 | Memory On,51,Memory Off,52,1 80 | Modify Core Area,20 81 | Move Macro,21 82 | Numrows,22 83 | Redo,23 84 | Restore State,24 85 | Save State,25 86 | Undo,27 87 | Cancel,0 88 | 89 | MENU,MERGE 90 | Divide Tile Left_Right,28 91 | Divide Tile Up_Down,29 92 | Limit Merges,30,Unlimit Merges,31,0 93 | Merge Downward,32 94 | Merge Left,33 95 | Merge Right,34 96 | Merge Upward,35 97 | Reset Tiles,36 98 | Cancel,0 99 | 100 | MENU,DRAW 101 | Draw Labels,37,Ignore Labels,38,0 102 | Draw Macros,39,Ignore Macros,40,1 103 | Draw Orient,49,Ignore Orient,50,0 104 | Draw Rows,41,Ignore Rows,42,1 105 | Draw Tiles,43,Ignore Tiles,44,1 106 | Cancel,0 107 | 108 | MENU,PARAMETERS 109 | Feed Percentage,45 110 | Min. Row Length,46 111 | Row Separation,47 112 | Set Spacing,48 113 | Cancel,0 114 | -------------------------------------------------------------------------------- /src/genrows/macro.dialog: -------------------------------------------------------------------------------- 1 | numfields;36 2 | # "@(#) macro.dialog (Yale) version 1.2 4/17/91" 3 | # Here is how you make a dialog box. 4 | # Semicolons are delimiters 5 | # field;fieldnumber;xpos;ypos;init string;field length; 6 | # (continued) field type;color;case toggle 7 | # Field types are 8 | # accept - mandatory 9 | # reject - mandatory 10 | # label - write only field. 11 | # input - read write field 12 | # case - a set of case field to follow 13 | # the first field in the list is the initial case. 14 | # clabel - one of the case fields. 15 | # field number must start with 0 16 | field;0; 5;1 ; ACCEPT ; 8;accept;green 17 | field;1; 25;1 ; CANCEL ; 8;reject;red 18 | field;2; 15;2 ;Macro Edit; 9;label;red 19 | field;3; 5;4 ;Coordinates; 11;label;blue 20 | field;4; 5;5 ;-----------; 11;label;black 21 | field;5; 5;6 ;X :; 9;label;blue 22 | field;6; 25;6 ; ; 8;input;blue 23 | field;7; 5;7 ;Y :; 9;label;blue 24 | field;8; 25;7 ; ; 8;input;blue 25 | field;9; 5;8 ;Delta X :; 9;label;blue 26 | field;10; 25;8 ; ; 8;input;blue 27 | field;11; 5;9 ;Delta Y :; 9;label;blue 28 | field;12; 25;9 ; ; 8;input;blue 29 | field;13;5;10;Orient:;7;case;blue;14,15,16,17,18,19,20,21 30 | field;14;25;10;0;1;clabel;blue 31 | field;15;26;10;1;1;clabel;blue 32 | field;16;27;10;2;1;clabel;blue 33 | field;17;28;10;3;1;clabel;blue 34 | field;18;29;10;4;1;clabel;blue 35 | field;19;30;10;5;1;clabel;blue 36 | field;20;31;10;6;1;clabel;blue 37 | field;21;32;10;7;1;clabel;blue 38 | # directions 39 | field;23;1;13;To change case fields put pointer;35;label;blue 40 | field;24;1;14;in window and click. To change;35;label;blue 41 | field;25;1;15;input fields put pointer in window;35;label;blue 42 | field;26;1;16;and back up over current contents;35;label;blue 43 | field;27;1;17;using the delete key. After modifying;35;label;blue 44 | field;28;1;18;the field, hit the return key.;35;label;blue 45 | -------------------------------------------------------------------------------- /src/genrows/menus.h: -------------------------------------------------------------------------------- 1 | 2 | /* TWmenu definitions */ 3 | #define TWNUMMENUS 52 4 | #define AUTO_REDRAW_ON 1 5 | #define AUTO_REDRAW_OFF 2 6 | #define CLOSE_GRAPHICS 3 7 | #define COLORS 4 8 | #define CONTINUE_PGM 5 9 | #define DUMP_GRAPHICS 6 10 | #define FULLVIEW 7 11 | #define REDRAW 8 12 | #define TELL_POINT 9 13 | #define TRANSLATE 10 14 | #define ZOOM 11 15 | #define CANCEL 0 16 | #define ALIGN_MACRO_IN_X 12 17 | #define ALIGN_MACRO_IN_Y 13 18 | #define ALIGN_ROWS 14 19 | #define EDIT_MACRO 16 20 | #define EDIT_ROW 15 21 | #define EDIT_TILE 17 22 | #define KEEP_SHORT_ROW 18 23 | #define DISCARD_SHORT_ROW 19 24 | #define MEMORY_ON 51 25 | #define MEMORY_OFF 52 26 | #define MODIFY_CORE_AREA 20 27 | #define MOVE_MACRO 21 28 | #define NUMROWS 22 29 | #define REDO 23 30 | #define RESTORE_STATE 24 31 | #define SAVE_STATE 25 32 | #define UNDO 27 33 | #define CANCEL 0 34 | #define DIVIDE_TILE_LEFT_RIGHT 28 35 | #define DIVIDE_TILE_UP_DOWN 29 36 | #define LIMIT_MERGES 30 37 | #define UNLIMIT_MERGES 31 38 | #define MERGE_DOWNWARD 32 39 | #define MERGE_LEFT 33 40 | #define MERGE_RIGHT 34 41 | #define MERGE_UPWARD 35 42 | #define RESET_TILES 36 43 | #define CANCEL 0 44 | #define DRAW_LABELS 37 45 | #define IGNORE_LABELS 38 46 | #define DRAW_MACROS 39 47 | #define IGNORE_MACROS 40 48 | #define DRAW_ORIENT 49 49 | #define IGNORE_ORIENT 50 50 | #define DRAW_ROWS 41 51 | #define IGNORE_ROWS 42 52 | #define DRAW_TILES 43 53 | #define IGNORE_TILES 44 54 | #define CANCEL 0 55 | #define FEED_PERCENTAGE 45 56 | #define MIN_ROW_LENGTH 46 57 | #define ROW_SEPARATION 47 58 | #define SET_SPACING 48 59 | #define CANCEL 0 60 | 61 | 62 | static TWMENUBOX menuS[53] = { 63 | "CONTROL",0,0,1,0,0, 64 | "Auto Redraw On","Auto Redraw Off",1,0,1,2, 65 | "Close Graphics",0,0,0,3,0, 66 | "Colors",0,0,0,4,0, 67 | "Continue Pgm",0,0,0,5,0, 68 | "Dump Graphics",0,0,0,6,0, 69 | "FullView",0,0,0,7,0, 70 | "Redraw",0,0,0,8,0, 71 | "Tell Point",0,0,0,9,0, 72 | "Translate",0,0,0,10,0, 73 | "Zoom",0,0,0,11,0, 74 | "Cancel",0,0,0,0,0, 75 | "EDIT",0,0,1,0,0, 76 | "Align Macro in X",0,0,0,12,0, 77 | "Align Macro in Y",0,0,0,13,0, 78 | "Align Rows",0,0,0,14,0, 79 | "Edit Macro",0,0,0,16,0, 80 | "Edit Row",0,0,0,15,0, 81 | "Edit Tile",0,0,0,17,0, 82 | "Keep Short Row","Discard Short Row",0,0,18,19, 83 | "Memory On","Memory Off",1,0,51,52, 84 | "Modify Core Area",0,0,0,20,0, 85 | "Move Macro",0,0,0,21,0, 86 | "Numrows",0,0,0,22,0, 87 | "Redo",0,0,0,23,0, 88 | "Restore State",0,0,0,24,0, 89 | "Save State",0,0,0,25,0, 90 | "Undo",0,0,0,27,0, 91 | "Cancel",0,0,0,0,0, 92 | "MERGE",0,0,1,0,0, 93 | "Divide Tile Left_Right",0,0,0,28,0, 94 | "Divide Tile Up_Down",0,0,0,29,0, 95 | "Limit Merges","Unlimit Merges",0,0,30,31, 96 | "Merge Downward",0,0,0,32,0, 97 | "Merge Left",0,0,0,33,0, 98 | "Merge Right",0,0,0,34,0, 99 | "Merge Upward",0,0,0,35,0, 100 | "Reset Tiles",0,0,0,36,0, 101 | "Cancel",0,0,0,0,0, 102 | "DRAW ",0,0,1,0,0, 103 | "Draw Labels","Ignore Labels",0,0,37,38, 104 | "Draw Macros","Ignore Macros",1,0,39,40, 105 | "Draw Orient","Ignore Orient",0,0,49,50, 106 | "Draw Rows","Ignore Rows",1,0,41,42, 107 | "Draw Tiles","Ignore Tiles",1,0,43,44, 108 | "Cancel",0,0,0,0,0, 109 | "PARAMETERS ",0,0,1,0,0, 110 | "Feed Percentage",0,0,0,45,0, 111 | "Min. Row Length",0,0,0,46,0, 112 | "Row Separation",0,0,0,47,0, 113 | "Set Spacing",0,0,0,48,0, 114 | "Cancel",0,0,0,0,0, 115 | 0,0,0,0,0,0 116 | } ; 117 | 118 | -------------------------------------------------------------------------------- /src/genrows/readpar.h: -------------------------------------------------------------------------------- 1 | #ifndef __GENROWS_READPAR_H__ 2 | #define __GENROWS_READPAR_H__ 3 | 4 | void readpar(void); 5 | 6 | #endif // __GENROWS_READPAR_H__ 7 | -------------------------------------------------------------------------------- /src/genrows/row.dialog: -------------------------------------------------------------------------------- 1 | numfields;18 2 | # "@(#) row.dialog (Yale) version 1.3 1/25/91" 3 | # Here is how you make a dialog box. 4 | # Semicolons are delimiters 5 | # field;fieldnumber;xpos;ypos;init string;field length; 6 | # (continued) field type;color;case toggle 7 | # Field types are 8 | # accept - mandatory 9 | # reject - mandatory 10 | # label - write only field. 11 | # input - read write field 12 | # case - a set of case field to follow 13 | # the first field in the list is the initial case. 14 | # clabel - one of the case fields. 15 | # field number must start with 0 16 | field;0; 5;1 ; ACCEPT ; 8;accept;green 17 | field;1; 25;1 ; CANCEL ; 8;reject;red 18 | field;2; 15;2 ;Row Edit; 8;label;red 19 | field;3; 5;4 ;Left :; 6;label;blue 20 | field;4; 5;5 ;Bottom :; 6;label;blue 21 | field;5; 5;6 ;Right :; 6;label;blue 22 | field;6; 5;7 ;Top :; 6;label;blue 23 | field;7; 5;8 ;Class :;21;label;blue 24 | field;8; 25;8 ; ; 8;input;blue 25 | field;9; 5;9 ;Mirror rows :;19;case;blue;11,10 26 | field;10;25;9 ;YES; 3;clabel;green 27 | field;11;31;9 ;NO; 2;clabel;red 28 | # directions 29 | field;12;1;11;To change case fields put pointer;35;label;blue 30 | field;13;1;12;in window and click. To change;35;label;blue 31 | field;14;1;13;input fields put pointer in window;35;label;blue 32 | field;15;1;14;and back up over current contents;35;label;blue 33 | field;16;1;15;using the delete key. After modifying;35;label;blue 34 | field;17;1;16;the field, hit the return key.;35;label;blue 35 | -------------------------------------------------------------------------------- /src/mc_compact/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | add_executable(mc_compact cdraw.c compactor.c io.c multi.c stdmacro.c changraph.c debug2.c movestrat2.c readcgraph.c xcompact.c cmain.c grid.c movestrat.c readtiles.c ycompact.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 5 | 6 | target_link_libraries(mc_compact ycadgraywolf) 7 | 8 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 9 | 10 | install(TARGETS mc_compact DESTINATION lib/graywolf/bin) 11 | -------------------------------------------------------------------------------- /src/mc_compact/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 21:07:13 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/mc_compact/menus.h: -------------------------------------------------------------------------------- 1 | 2 | /* TWmenu definitions */ 3 | #define TWNUMMENUS 26 4 | #define AUTO_REDRAW_ON 1 5 | #define AUTO_REDRAW_OFF 2 6 | #define CLOSE_GRAPHICS 3 7 | #define COLORS 4 8 | #define CONTINUE_PROG 5 9 | #define DUMP_GRAPHICS 6 10 | #define FULLVIEW 7 11 | #define REDRAW 8 12 | #define TRANSLATE 9 13 | #define ZOOM 10 14 | #define CANCEL 0 15 | #define DRAW_EDGES 11 16 | #define IGNORE_EDGES 12 17 | #define DRAW_EDGE_LABELS 13 18 | #define IGNORE_EDGE_LABELS 14 19 | #define DRAW_FORWARD 15 20 | #define DRAW_BACKWARD 16 21 | #define DRAW_LABELS 17 22 | #define IGNORE_LABELS 18 23 | #define SET__3D_CAMERA 24 24 | #define NORMAL_VIEW 25 25 | #define CANCEL 0 26 | #define DUMP_STATE 19 27 | #define HIGHLITE_CELL 20 28 | #define TELL_POINT 21 29 | #define DRAW_MOVED_TILES 22 30 | #define IGNORE_MOVED_TILES 23 31 | #define FIND_EDGE 26 32 | #define CANCEL 0 33 | 34 | 35 | static TWMENUBOX menuS[27] = { 36 | "CONTROL",0,0,1,0,0, 37 | "Auto Redraw On","Auto Redraw Off",1,0,1,2, 38 | "Close Graphics",0,0,0,3,0, 39 | "Colors",0,0,0,4,0, 40 | "Continue Prog.",0,0,0,5,0, 41 | "Dump Graphics",0,0,0,6,0, 42 | "FullView",0,0,0,7,0, 43 | "Redraw",0,0,0,8,0, 44 | "Translate",0,0,0,9,0, 45 | "Zoom",0,0,0,10,0, 46 | "Cancel",0,0,0,0,0, 47 | "DRAW ",0,0,1,0,0, 48 | "Draw Edges","Ignore Edges",0,0,11,12, 49 | "Draw Edge Labels","Ignore Edge Labels",0,0,13,14, 50 | "Draw Forward","Draw Backward",1,0,15,16, 51 | "Draw Labels","Ignore Labels",0,0,17,18, 52 | "Set 3D Camera",0,0,0,24,0, 53 | "Normal View",0,0,0,25,0, 54 | "Cancel",0,0,0,0,0, 55 | "DEBUG ",0,0,1,0,0, 56 | "Dump State",0,0,0,19,0, 57 | "HighLite Cell",0,0,0,20,0, 58 | "Tell Point",0,0,0,21,0, 59 | "Draw Moved Tiles","Ignore Moved Tiles",1,0,22,23, 60 | "Find Edge",0,0,0,26,0, 61 | "Cancel",0,0,0,0,0, 62 | 0,0,0,0,0,0 63 | } ; 64 | 65 | -------------------------------------------------------------------------------- /src/mc_compact/readcgraph.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: readcgraph.h 3 | DESCRIPTION:This file redefines global variable of yacc and lex so 4 | that we can have more than one parser in TimberWolfMC. 5 | CONTENTS: macro redefinitions for graph parser in detail router.. 6 | DATE: Aug 7, 1988 7 | REVISIONS: Thu Mar 7 01:41:07 EST 1991 - added more definitions 8 | for byacc. 9 | ----------------------------------------------------------------- */ 10 | /* ***************************************************************** 11 | "@(#) readcgraph.h (Yale) version 1.2 3/7/91" 12 | ***************************************************************** */ 13 | 14 | #define yyact DRG_yyact 15 | #define yyback DRG_yyback 16 | #define yybgin DRG_yybgin 17 | #define yychar DRG_yychar 18 | #define yychk DRG_yychk 19 | #define yycrank DRG_yycrank 20 | #define yydebug DRG_yydebug 21 | #define yydef DRG_yydef 22 | #define yyerrflag DRG_yyerrflag 23 | #define yyerror DRG_yyerror 24 | #define yyestate DRG_yyestate 25 | #define yyexca DRG_yyexca 26 | #define yyextra DRG_yyextra 27 | #define yyfnd DRG_yyfnd 28 | #define yyin DRG_yyin 29 | #define yyinput DRG_yyinput 30 | #define yyleng DRG_yyleng 31 | #define yylex DRG_yylex 32 | #define yylineno DRG_yylineno 33 | #define yylook DRG_yylook 34 | #define yylsp DRG_yylsp 35 | #define yylstate DRG_yylstate 36 | #define yylval DRG_yylval 37 | #define yymatch DRG_yymatch 38 | #define yymorfg DRG_yymorfg 39 | #define yynerrs DRG_yynerrs 40 | #define yyolsp DRG_yyolsp 41 | #define yyout DRG_yyout 42 | #define yyoutput DRG_yyoutput 43 | #define yypact DRG_yypact 44 | #define yyparse DRG_yyparse 45 | #define yypgo DRG_yypgo 46 | #define yyprevious DRG_yyprevious 47 | #define yyreds DRG_yyreds 48 | #define yyr1 DRG_yyr1 49 | #define yyr2 DRG_yyr2 50 | #define yysbuf DRG_yysbuf 51 | #define yysptr DRG_yysptr 52 | #define yysvec DRG_yysvec 53 | #define yytchar DRG_yytchar 54 | #define yytext DRG_yytext 55 | #define yytoks DRG_yytoks 56 | #define yytop DRG_yytop 57 | #define yyunput DRG_yyunput 58 | #define yyv DRG_yyv 59 | #define yyval DRG_yyval 60 | #define yyvstop DRG_yyvstop 61 | #define yywrap DRG_yywrap 62 | /* for byacc */ 63 | #define yyrule DRG_yyrule 64 | #define yyname DRG_yyname 65 | #define yytable DRG_yytable 66 | #define yycheck DRG_yycheck 67 | #define yydgoto DRG_yydgoto 68 | #define yydefred DRG_yydefred 69 | #define yygindex DRG_yygindex 70 | #define yyrindex DRG_yyrindex 71 | #define yysindex DRG_yysindex 72 | #define yylen DRG_yylen 73 | #define yylhs DRG_yylhs 74 | -------------------------------------------------------------------------------- /src/mincut/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_executable(Mincut main.c output.c readcells.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 4 | 5 | target_link_libraries(Mincut ycadgraywolf) 6 | target_link_libraries(Mincut ${X11_LIBRARIES}) 7 | target_link_libraries(Mincut m) 8 | 9 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 10 | 11 | install(TARGETS Mincut DESTINATION lib/graywolf/bin) 12 | -------------------------------------------------------------------------------- /src/mincut/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 21:09:40 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/mincut/globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1989-1991 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | "@(#) globals.h version 1.1 7/30/91" 42 | FILE: globals.h 43 | CONTENTS: definitions for globals structures and variables 44 | DATE: Apr 24, 1989 45 | REVISIONS: 46 | ----------------------------------------------------------------- */ 47 | #ifndef GLOBALS_H 48 | #define GLOBALS_H 49 | 50 | #include 51 | 52 | #ifndef MATH_H 53 | #define MATH_H 54 | #include 55 | #endif /* MATH_H */ 56 | 57 | /* if not using makefile and debug is wanted add it here */ 58 | /* #define DEBUG */ 59 | 60 | /* ***********LEAVE THE BELOW UNCHANGED *************************** */ 61 | #define NOCUT "nocut - replacement for Mincut" 62 | #define HARDCELLTYPE 1 63 | #define SOFTCELLTYPE 2 64 | #define STDCELLTYPE 3 65 | #define PADCELLTYPE 4 66 | 67 | /* compile switch for globals */ 68 | #ifndef MAIN_VARS 69 | #define EXTERN extern 70 | 71 | #else 72 | #define EXTERN 73 | #endif 74 | 75 | EXTERN char *cktNameG ; 76 | 77 | #endif /* GLOBALS_H */ 78 | -------------------------------------------------------------------------------- /src/mincut/output.h: -------------------------------------------------------------------------------- 1 | #ifndef __MINCUT_OUTPUT_H__ 2 | #define __MINCUT_OUTPUT_H__ 3 | 4 | void read_par(void); 5 | 6 | #endif // __MINCUT_OUTPUT_H__ 7 | -------------------------------------------------------------------------------- /src/syntax/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_executable(syntax main.c output.c readcells.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 4 | 5 | target_link_libraries(syntax ycadgraywolf) 6 | target_link_libraries(syntax ${X11_LIBRARIES}) 7 | target_link_libraries(syntax m) 8 | 9 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 10 | 11 | install(TARGETS syntax DESTINATION lib/graywolf/bin) 12 | -------------------------------------------------------------------------------- /src/syntax/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 21:11:10 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/syntax/globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1989 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | "@(#) globals.h version 1.1 5/5/89" 42 | FILE: globals.h 43 | CONTENTS: definitions for globals structures and variables 44 | DATE: Apr 24, 1989 45 | REVISIONS: 46 | ----------------------------------------------------------------- */ 47 | #ifndef GLOBALS_H 48 | #define GLOBALS_H 49 | 50 | #include 51 | 52 | #ifndef MATH_H 53 | #define MATH_H 54 | #include 55 | #endif /* MATH_H */ 56 | 57 | /* if not using makefile and debug is wanted add it here */ 58 | /* #define DEBUG */ 59 | 60 | /* ***********LEAVE THE BELOW UNCHANGED *************************** */ 61 | #define SYNTAX "syntax" 62 | #define HARDCELLTYPE 1 63 | #define SOFTCELLTYPE 2 64 | #define STDCELLTYPE 3 65 | #define PADCELLTYPE 4 66 | 67 | /* compile switch for globals */ 68 | #ifndef MAIN_VARS 69 | #define EXTERN extern 70 | 71 | #else 72 | #define EXTERN 73 | #endif 74 | 75 | EXTERN FILE *fpoG ; 76 | EXTERN char *cktNameG ; 77 | 78 | #endif /* GLOBALS_H */ 79 | -------------------------------------------------------------------------------- /src/twflow/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_executable(graywolf autoflow.c findflow.c graphics.c io.c main.c program.c readobjects.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 4 | 5 | target_link_libraries(graywolf ycadgraywolf) 6 | target_link_libraries(graywolf ${X11_LIBRARIES}) 7 | target_link_libraries(graywolf m) 8 | 9 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 10 | 11 | install(TARGETS graywolf DESTINATION bin) 12 | -------------------------------------------------------------------------------- /src/twflow/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 21:15:08 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/twflow/io.h: -------------------------------------------------------------------------------- 1 | #ifndef __TWFLOW_IO_H__ 2 | #define __TWFLOW_IO_H__ 3 | 4 | void add_path(char* pathname); 5 | 6 | #endif // __TWFLOW_IO_H__ 7 | -------------------------------------------------------------------------------- /src/twflow/menus.h: -------------------------------------------------------------------------------- 1 | 2 | /* TWmenu definitions */ 3 | #define TWNUMMENUS 19 4 | #define AUTO_REDRAW_ON 1 5 | #define AUTO_REDRAW_OFF 2 6 | #define CLOSE_GRAPHICS 3 7 | #define COLORS 4 8 | #define CONTINUE_PGM 5 9 | #define DUMP_GRAPHICS 6 10 | #define EXIT_PROGRAM 7 11 | #define FULLVIEW 8 12 | #define REDRAW 9 13 | #define TELL_POINT 10 14 | #define TRANSLATE 11 15 | #define ZOOM 12 16 | #define CANCEL 0 17 | #define AUTOFLOW 13 18 | #define EXECUTE_PGM 14 19 | #define PICK_PGM 15 20 | #define PROMPT_ON 16 21 | #define PROMPT_OFF 17 22 | #define CANCEL 0 23 | 24 | 25 | static TWMENUBOX menuS[20] = { 26 | "CONTROL",0,0,1,0,0, 27 | "Auto Redraw On","Auto Redraw Off",1,0,1,2, 28 | "Close Graphics",0,0,0,3,0, 29 | "Colors",0,0,0,4,0, 30 | "Continue Pgm",0,0,0,5,0, 31 | "Dump Graphics",0,0,0,6,0, 32 | "Exit Program",0,0,0,7,0, 33 | "FullView",0,0,0,8,0, 34 | "Redraw",0,0,0,9,0, 35 | "Tell Point",0,0,0,10,0, 36 | "Translate",0,0,0,11,0, 37 | "Zoom",0,0,0,12,0, 38 | "Cancel",0,0,0,0,0, 39 | "FLOW ",0,0,1,0,0, 40 | "AutoFlow",0,0,0,13,0, 41 | "Execute Pgm",0,0,0,14,0, 42 | "Pick Pgm",0,0,0,15,0, 43 | "Prompt On","Prompt Off",0,0,16,17, 44 | "Cancel",0,0,0,0,0, 45 | 0,0,0,0,0,0 46 | } ; 47 | 48 | -------------------------------------------------------------------------------- /src/twmc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_executable(TimberWolfMC acceptt.c analyze.c compact.c config1.c config2.c configpads.c debug.c finalout.c finalpin.c gmain.c findcheck.c findcost.c findloc.c findside.c fixcell.c genorient.c graphics.c initialize.c initnets.c loadbins.c main.c makebins.c makesite.c mergecell.c neworient.c newtemp.c outgeo.c outpin.c output.c overlap.c paths.c partition.c penalties.c perimeter.c placepads.c placepin.c prboard.c readcells.c readnets.c rmain.c readpar.c reconfig.c savewolf.c scrapnet.c sortpin.c selectpin.c setpwates.c sortpad.c twstats.c uaspect.c uloop.c unbust.c uinst.c unet.c upin.c upinswap.c usite1.c usite2.c usoftmove.c utemp.c watesides.c window.c wirecosts.c wireest.c wireratio.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 4 | 5 | target_link_libraries(TimberWolfMC ycadgraywolf) 6 | target_link_libraries(TimberWolfMC ${X11_LIBRARIES}) 7 | target_link_libraries(TimberWolfMC m) 8 | target_link_libraries(TimberWolfMC ${GSL_LIBRARIES}) 9 | 10 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 11 | 12 | install(TARGETS TimberWolfMC DESTINATION lib/graywolf/bin) 13 | -------------------------------------------------------------------------------- /src/twmc/acceptt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1988-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: acceptt.c 42 | DESCRIPTION:accept routine used in simulated annealing 43 | CONTENTS: acceptt( INT ) 44 | DATE: Jan 30, 1988 45 | REVISIONS: 46 | ----------------------------------------------------------------- */ 47 | 48 | #include 49 | #include 50 | #include 51 | 52 | #define MASK 0x3ff 53 | 54 | static DOUBLE table1S[1024] , table2S[1024] , table3S[1024] ; 55 | 56 | void init_table() 57 | { 58 | INT i2 ; 59 | table1S[0] = 1.0 ; 60 | table2S[0] = 1.0 ; 61 | table3S[0] = 1.0 ; 62 | for( i2 = 1 ; i2 <= 1023 ; i2++ ) { 63 | table1S[ i2 ] = exp( -(DOUBLE) i2 / 8.0 ) ; 64 | table2S[ i2 ] = exp( -(DOUBLE) i2 / 8192.0 ) ; 65 | table3S[ i2 ] = exp( -(DOUBLE) i2 / 8388608.0 ) ; 66 | } 67 | } 68 | INT acceptt( delta_cost ) 69 | INT delta_cost ; 70 | { 71 | 72 | INT truth ; 73 | DOUBLE fred ; 74 | register unsigned fract ; 75 | 76 | d_costG = delta_cost ; /*** make it known to the world. JL ***/ 77 | fred = ((DOUBLE) delta_cost ) / TG ; 78 | 79 | if( fred >= 0.0 ) { 80 | truth = 1 ; 81 | } else if( fred < -80.0 ) { 82 | truth = 0 ; 83 | } else if( fred > -0.0001 ) { 84 | if( 1.0 + fred > ( (DOUBLE) RAND / (DOUBLE)0x7fffffff ) ) { 85 | truth = 1 ; 86 | } else { 87 | truth = 0 ; 88 | } 89 | } else { 90 | fract = (INT)( -fred * 8388608.0 ) ; 91 | if( (table1S[ (fract >> 20) & MASK ] * 92 | table2S[ (fract >> 10) & MASK] * 93 | table3S[ fract & MASK ]) > 94 | ( (DOUBLE) RAND / (DOUBLE)0x7fffffff ) ) { 95 | truth = 1 ; 96 | } else { 97 | truth = 0 ; 98 | } 99 | } 100 | 101 | return(truth) ; 102 | } 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/twmc/analog.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: analog.h 3 | CONTENTS: definitions for analog information. 4 | DATE: Dec 13, 1990 5 | REVISIONS: 6 | ----------------------------------------------------------------- */ 7 | /* ***************************************************************** 8 | "@(#) analog.h (Yale) version 1.2 2/23/91" 9 | ***************************************************************** */ 10 | #ifndef ANALOG_H 11 | #define ANALOG_H 12 | 13 | #define INIT_DROP -1000000.0 14 | #define NO_CONSTRAINT_ON_DROP -100000.0 15 | #define INIT_CURRENT -1000000.0 16 | #define NO_CURRENT_SPECIFIED -100000.0 17 | #define INIT_CAP -1.0 18 | #define INIT_RES -1.0 19 | 20 | /* analog net type */ 21 | #define SHIELDING_NET 1 22 | #define SHIELDMASK 0x1 23 | #define NOISY_NET 2 24 | #define NOISYMASK 0x2 25 | #define SENSITIVE_NET 4 26 | #define SENSITIVEMASK 0x4 27 | 28 | /* the circuit type */ 29 | #define NO_CKT_TYPE 0 30 | #define DIGITAL 0x1 31 | #define ANALOG 0x2 32 | #define MIXED 0x3 33 | 34 | typedef struct abox { 35 | INT *x_contour ; /* x coordinates of pin contour */ 36 | INT *y_contour ; /* y coordinates of pin contour */ 37 | INT num_corners ; /* number of vertices in pin contour */ 38 | FLOAT current ; /* current for the pin */ 39 | FLOAT power ; /* power for the pin */ 40 | BOOL no_layer_change ; /* whether layer change are allowed */ 41 | } ANALOGBOX, *ANALOGPTR ; 42 | 43 | typedef struct common_pt { 44 | INT num_pins ; /* number of pins in this common point */ 45 | INT *common_set ; /* set of pins in the common point */ 46 | INT *cap_match ; /* pins that must match cap. for each cpt.*/ 47 | INT *res_match ; /* pins that must match res. for each cpt.*/ 48 | } COMMONBOX, *COMMONPTR ; 49 | 50 | typedef struct analognet { 51 | DOUBLE cap_upper_bound ; /* capacitance upper bound */ 52 | DOUBLE res_upper_bound ; /* resistance upper bound */ 53 | INT net_type ; /* noisy, sensitive, shielding */ 54 | INT num_common_points ; /* number of common points for the net */ 55 | COMMONPTR *common_pts ; /* array of the common points */ 56 | DOUBLE max_drop ; /* max voltage drop */ 57 | } ANETBOX, *ANETPTR ; 58 | 59 | #endif /* ANALOG_H */ 60 | -------------------------------------------------------------------------------- /src/twmc/configpads.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_TSMC_CONFIGPADS_H 2 | #define INC_TSMC_CONFIGPADS_H 3 | 4 | void calc_constraints( PADBOXPTR pad, INT side, DOUBLE *lb, DOUBLE *ub, BOOL *spacing_restricted, INT *lowpos, INT *uppos ); 5 | 6 | #endif /* INC_TSMC_CONFIGPADS_H */ 7 | 8 | -------------------------------------------------------------------------------- /src/twmc/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 21:18:34 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/twmc/dens.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: dens.h 3 | CONTENTS: definitions for cell routing area tiles. 4 | DATE: Jan 20, 1990 5 | REVISIONS: Thu Jan 17 00:46:38 PST 1991 - added side to RTILEBOX 6 | and added the TILE macro definitions. 7 | Wed May 1 19:16:12 EDT 1991 - added switchbox definition. 8 | ----------------------------------------------------------------- */ 9 | #ifndef DENS_H 10 | #define DENS_H 11 | 12 | #undef EXTERN 13 | #ifndef DENS_DEFS 14 | #define EXTERN extern 15 | 16 | #else 17 | #define EXTERN 18 | #endif 19 | 20 | #define TILEL 1 21 | #define TILET 2 22 | #define TILER 3 23 | #define TILEB 4 24 | 25 | typedef struct rtilebox { 26 | INT x1 ; 27 | INT y1 ; 28 | INT x2 ; 29 | INT y2 ; 30 | INT side ; 31 | BOOL switchbox ; 32 | struct rtilebox *next ; 33 | } RTILEBOX, *RTILEBOXPTR ; 34 | 35 | 36 | /* list of tiles to be added to each cell to accommodate routing */ 37 | EXTERN RTILEBOXPTR *routingTilesG ; 38 | 39 | #endif /* DENS_H */ 40 | -------------------------------------------------------------------------------- /src/twmc/dialog.h: -------------------------------------------------------------------------------- 1 | static TWDIALOGBOX dialogS[53] = { 2 | 1,5,8," ACCEPT ",2,4,0, 3 | 1,25,8," CANCEL ",2,2,0, 4 | 2,15,9,"Edit Cell",0,4,0, 5 | 3,5,13,"Name",0,5,0, 6 | 4,5,12,"Number",0,5,0, 7 | 5,5,8,"Xcenter:",0,5,0, 8 | 5,14,8,"10",1,5,0, 9 | 6,5,8,"Ycenter:",0,5,0, 10 | 6,14,8,"10",1,5,0, 11 | 7,5,7,"Orient:",3,5,10, 12 | 7,14,2,"0 ",2,5,1, 13 | 7,16,2,"1 ",2,5,1, 14 | 7,18,2,"2 ",2,5,1, 15 | 7,20,2,"3 ",2,5,1, 16 | 7,22,2,"4 ",2,5,1, 17 | 7,24,2,"5 ",2,5,1, 18 | 7,26,2,"6 ",2,5,1, 19 | 7,28,2,"7 ",2,5,1, 20 | 9,5,19,"Valid orientations",0,5,0, 21 | 10,7,1,"0",3,5,20, 22 | 10,14,5,"valid",2,7,2, 23 | 10,25,7,"invalid",2,4,2, 24 | 11,7,1,"1",3,5,23, 25 | 11,14,5,"valid",2,7,3, 26 | 11,25,7,"invalid",2,4,3, 27 | 12,7,1,"2",3,5,26, 28 | 12,14,5,"valid",2,7,4, 29 | 12,25,7,"invalid",2,4,4, 30 | 13,7,1,"3",3,5,29, 31 | 13,14,5,"valid",2,7,5, 32 | 13,25,7,"invalid",2,4,5, 33 | 14,7,1,"4",3,5,32, 34 | 14,14,5,"valid",2,7,6, 35 | 14,25,7,"invalid",2,4,6, 36 | 15,7,1,"5",3,5,35, 37 | 15,14,5,"valid",2,7,7, 38 | 15,25,7,"invalid",2,4,7, 39 | 16,7,1,"6",3,5,38, 40 | 16,14,5,"valid",2,7,8, 41 | 16,25,7,"invalid",2,4,8, 42 | 17,7,1,"7",3,5,41, 43 | 17,14,5,"valid",2,7,9, 44 | 17,25,7,"invalid",2,4,9, 45 | 19,5,5,"Fixed",3,5,44, 46 | 19,14,3,"on ",2,7,10, 47 | 19,25,3,"off",2,4,10, 48 | 21,1,35,"To change case fields put pointer",0,5,0, 49 | 22,1,35,"in window and click. To change",0,5,0, 50 | 23,1,35,"input fields put pointer in window",0,5,0, 51 | 24,1,35,"and back up over current contents",0,5,0, 52 | 25,1,35,"using the delete key. After modifying",0,5,0, 53 | 26,1,35,"the field, hit the return key.",0,5,0, 54 | 0,0,0,0,0,0,0 55 | } ; 56 | 57 | -------------------------------------------------------------------------------- /src/twmc/findside.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_FINDSIDE_H 2 | #define INC_FINDSIDE_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | void loadside( PSIDEBOX *pSideArray, INT side , DOUBLE factor ); 9 | void load_soft_pins( CELLBOXPTR ptr, PSIDEBOX *pSideArray ); 10 | 11 | #endif /* INC_FINDSIDE_H */ 12 | 13 | -------------------------------------------------------------------------------- /src/twmc/initialize.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: initialize.h 3 | DESCRIPTION:Header file for initialize.c 4 | CONTENTS: 5 | DATE: March 15, 1990 6 | REVISIONS: Wed Dec 19 19:38:46 EST 1990 - added analog pin type. 7 | ----------------------------------------------------------------- */ 8 | #ifndef INITIALIZE_H 9 | #define INITIALIZE_H 10 | 11 | #define PINGROUPTYPE 1 12 | #define HARDPINTYPE 2 13 | #define SOFTPINTYPE 3 14 | #define SOFTEQUIVTYPE 4 15 | #define HARDEQUIVTYPE 5 16 | #define ADDEQUIVTYPE 6 17 | #define ANALOGPINTYPE 7 18 | 19 | void fixCell( INT fixedType, INT xloc, char *lorR, INT yloc, char *borT, INT xloc2, char *lorR2, INT yloc2, char *borT2 ); 20 | 21 | void addClass( INT class ); 22 | 23 | void addCell( char * cellName, CELLTYPE cellType ); 24 | 25 | void endCell(); 26 | 27 | void addOrient( INT orient ); 28 | 29 | #endif /* INITIALIZE_H */ 30 | -------------------------------------------------------------------------------- /src/twmc/initnets.h: -------------------------------------------------------------------------------- 1 | #ifndef __TWMC_INITNETS_H__ 2 | #define __TWMC_INITNETS_H__ 3 | 4 | void end_path(INT lower_bound, INT upper_bound, INT priority); 5 | void add_path(BOOL pathFlag, char* net); 6 | 7 | #endif // __TWMC_INITNETS_H__ 8 | 9 | -------------------------------------------------------------------------------- /src/twmc/makebins.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1988-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: makebins.c 42 | DESCRIPTION:determines number of bins for overlap calculation 43 | CONTENTS: makebins( INT ) 44 | DATE: Feb 13, 1988 45 | REVISIONS: 46 | Feb 27, 1988 - now called from config1 and calculates 47 | numbins based on cell area. In future, use variance. 48 | Mar 1, 1988 - added variance. 49 | Nov 20, 1988 - fixed aspect ratio. 50 | ----------------------------------------------------------------- */ 51 | 52 | #include 53 | #include 54 | 55 | void makebins( INT numbins ) 56 | { 57 | 58 | BINBOXPTR bptr ; 59 | DOUBLE xbins, ybins ; 60 | INT i, j ; 61 | 62 | ybins = sqrt( chipaspectG * (DOUBLE) numbins ) ; 63 | ybins = ceil( ybins ) ; 64 | xbins = sqrt( (DOUBLE) numbins / chipaspectG ) ; 65 | xbins = ceil( xbins ) ; 66 | 67 | maxBinXG = (INT) xbins ; 68 | maxBinYG = (INT) ybins ; 69 | 70 | /* take bins for border around chip into account */ 71 | /* bins will be labeled [0..maxBinsXG] for a total of maxBinsXG+1 bins */ 72 | maxBinXG++ ; 73 | maxBinYG++ ; 74 | OUT2("maxBinXG automatically set to:%d\n", maxBinXG ); 75 | OUT2("maxBinYG automatically set to:%d\n", maxBinYG ); 76 | 77 | binptrG = (BINBOXPTR **)Ysafe_malloc( (1+maxBinXG)*sizeof(BINBOXPTR *)) ; 78 | for( i = 0 ; i <= maxBinXG ; i++ ) { 79 | binptrG[i]=(BINBOXPTR*) Ysafe_malloc((1+maxBinYG)*sizeof(BINBOXPTR)); 80 | for( j = 0 ; j <= maxBinYG ; j++ ) { 81 | bptr = binptrG[i][j] = (BINBOXPTR) Ysafe_malloc( sizeof(BINBOX)); 82 | bptr->cells = 83 | (INT *) Ysafe_malloc( (EXPCELLPERBIN+1) * sizeof(INT)); 84 | /* zero position holds current number cells in bin */ 85 | bptr->cells[0] = 0 ; 86 | /* space holds current size of array */ 87 | bptr->space = EXPCELLPERBIN + 1 ; 88 | } 89 | } 90 | 91 | } /* end function make bins */ 92 | -------------------------------------------------------------------------------- /src/twmc/mc.dialog: -------------------------------------------------------------------------------- 1 | numfields;52 2 | # Here is how you make a dialog box. 3 | # field;fieldnumber;xpos;ypos;init string;field length; 4 | # (continued) field type;color;case toggle 5 | # Field types are 6 | # accept - mandatory 7 | # reject - mandatory 8 | # label - write only field. 9 | # input - read write field 10 | # case - a set of case field to follow 11 | # the first field in the list is the initial case. 12 | # clabel - one of the case fields. 13 | # field number must start with 0 14 | field;0;5;1; ACCEPT ;8;accept;red 15 | field;1;25;1; CANCEL ;8;reject;black 16 | field;2;15;2;Edit Cell;9;label;red 17 | field;3;5;3;Name;13;label;blue 18 | field;4;5;4;Number;12;label;blue 19 | field;5;5;5;Xcenter:;8;label;blue 20 | field;6;14;5;10;8;input;blue 21 | field;7;5;6;Ycenter:;8;label;blue 22 | field;8;14;6;10;8;input;blue 23 | field;9;5;7;Orient:;7;case;blue;10,11,12,13,14,15,16,17 24 | field;10;14;7;0 ;2;clabel;blue 25 | field;11;16;7;1 ;2;clabel;blue 26 | field;12;18;7;2 ;2;clabel;blue 27 | field;13;20;7;3 ;2;clabel;blue 28 | field;14;22;7;4 ;2;clabel;blue 29 | field;15;24;7;5 ;2;clabel;blue 30 | field;16;26;7;6 ;2;clabel;blue 31 | field;17;28;7;7 ;2;clabel;blue 32 | field;18;5;9;Valid orientations;19;label;blue 33 | # orientation 0 34 | field;19;7;10;0;1;case;blue;20,21 35 | field;20;14;10;valid;5;clabel;green 36 | field;21;25;10;invalid;7;clabel;red 37 | # orientation 1 38 | field;22;7;11;1;1;case;blue;23,24 39 | field;23;14;11;valid;5;clabel;green 40 | field;24;25;11;invalid;7;clabel;red 41 | # orientation 2 42 | field;25;7;12;2;1;case;blue;26,27 43 | field;26;14;12;valid;5;clabel;green 44 | field;27;25;12;invalid;7;clabel;red 45 | # orientation 3 46 | field;28;7;13;3;1;case;blue;29,30 47 | field;29;14;13;valid;5;clabel;green 48 | field;30;25;13;invalid;7;clabel;red 49 | # orientation 4 50 | field;31;7;14;4;1;case;blue;32,33 51 | field;32;14;14;valid;5;clabel;green 52 | field;33;25;14;invalid;7;clabel;red 53 | # orientation 5 54 | field;34;7;15;5;1;case;blue;35,36 55 | field;35;14;15;valid;5;clabel;green 56 | field;36;25;15;invalid;7;clabel;red 57 | # orientation 6 58 | field;37;7;16;6;1;case;blue;38,39 59 | field;38;14;16;valid;5;clabel;green 60 | field;39;25;16;invalid;7;clabel;red 61 | # orientation 7 62 | field;40;7;17;7;1;case;blue;41,42 63 | field;41;14;17;valid;5;clabel;green 64 | field;42;25;17;invalid;7;clabel;red 65 | # fix field 66 | field;43;5;19;Fixed;5;case;blue;44,45 67 | field;44;14;19;on ;3;clabel;green 68 | field;45;25;19;off;3;clabel;red 69 | # 70 | field;46;1;21;To change case fields put pointer;35;label;blue 71 | field;47;1;22;in window and click. To change;35;label;blue 72 | field;48;1;23;input fields put pointer in window;35;label;blue 73 | field;49;1;24;and back up over current contents;35;label;blue 74 | field;50;1;25;using the delete key. After modifying;35;label;blue 75 | field;51;1;26;the field, hit the return key.;35;label;blue 76 | -------------------------------------------------------------------------------- /src/twmc/mc_menu: -------------------------------------------------------------------------------- 1 | # TimberWolfMC menu file. 2 | # "@(#) mc_menu (Yale) version 3.9 4/27/91" 3 | # 4 | # Comments start with a sharp 5 | # MENU is a keyword must be capitalized. 6 | # Everything in this file is case sensitive. 7 | # Fields are separated by commas. 8 | # Format: 9 | # MENU,menuName - followed by list of entries for this menu 10 | # - one on each line. 11 | # Normal menu entry - MenuEntry,FunctionNumber 12 | # Boolean menu entry - 13 | # TrueMenuEntry,FunctionNumber1,FalseMenuEntry,FunctionNumber2,Init 14 | # where Init is the initial state and is 1 for True and 0 for False. 15 | # 16 | # Menu are placed on the screen in a left to right order according 17 | # to the order in this file. 18 | # 19 | MENU,CONTROL 20 | Auto Redraw On,1,Auto Redraw Off,2,1 21 | Close Graphics,3 22 | Colors,4 23 | Continue Program,5 24 | Dump Graphics,6 25 | FullView,8 26 | Graphics Update On,9,Graphics Update Off,10,1 27 | Redraw,11 28 | Tell Point,12 29 | Translate,13 30 | Zoom,14 31 | Cancel,0 32 | 33 | MENU,EDIT 34 | Cell Neighborhood,15 35 | Edit Cell,16 36 | Fix Cell,17 37 | Fix Cell but Rot,18 38 | Group Cells,19 39 | Move Cell,20 40 | Cancel,0 41 | 42 | MENU,DRAW 43 | Draw Bins,21,Ignore Bins,22,0 44 | Draw Border,23,Draw Tiles,24,1 45 | Draw Globe Areas,37,Ignore Globe Areas,38,1 46 | Draw Labels,25,Ignore Labels,26,0 47 | Draw Neighborhd,27,Ignore Neighborhood,28,1 48 | Draw Nets,29,Ignore Nets,30,0 49 | Draw Orient,44,Ignore Orient,45,0 50 | Draw Pins,31,Ignore Pins,32,0 51 | Draw Single Cell Moves,42,Ignore Single Cell,43,0 52 | Draw Single Net,33 53 | Draw Wiring Est,34,Ignore Wiring Est,35,0 54 | Cancel,0 55 | 56 | MENU,PARAMETERS 57 | Change Aspect Ratio,36 58 | Graphics Wait,40,No Graphics Wait,41,0 59 | Cancel,0 60 | -------------------------------------------------------------------------------- /src/twmc/menus.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_TWMC_MENUS_H 2 | #define INC_TWMC_MENUS_H 3 | 4 | /* TWmenu definitions */ 5 | #define TWNUMMENUS 38 6 | #define AUTO_REDRAW_ON 1 7 | #define AUTO_REDRAW_OFF 2 8 | #define CLOSE_GRAPHICS 3 9 | #define COLORS 4 10 | #define CONTINUE_PROGRAM 5 11 | #define DUMP_GRAPHICS 6 12 | #define FULLVIEW 8 13 | #define GRAPHICS_UPDATE_ON 9 14 | #define GRAPHICS_UPDATE_OFF 10 15 | #define REDRAW 11 16 | #define TELL_POINT 12 17 | #define TRANSLATE 13 18 | #define ZOOM 14 19 | #define CANCEL 0 20 | #define CELL_NEIGHBORHOOD 15 21 | #define EDIT_CELL 16 22 | #define FIX_CELL 17 23 | #define FIX_CELL_BUT_ROT 18 24 | #define GROUP_CELLS 19 25 | #define MOVE_CELL 20 26 | #define CANCEL 0 27 | #define DRAW_BINS 21 28 | #define IGNORE_BINS 22 29 | #define DRAW_BORDER 23 30 | #define DRAW_TILES 24 31 | #define DRAW_GLOBE_AREAS 37 32 | #define IGNORE_GLOBE_AREAS 38 33 | #define DRAW_LABELS 25 34 | #define IGNORE_LABELS 26 35 | #define DRAW_NEIGHBORHD 27 36 | #define IGNORE_NEIGHBORHOOD 28 37 | #define DRAW_NETS 29 38 | #define IGNORE_NETS 30 39 | #define DRAW_ORIENT 44 40 | #define IGNORE_ORIENT 45 41 | #define DRAW_PINS 31 42 | #define IGNORE_PINS 32 43 | #define DRAW_SINGLE_CELL_MOVES 42 44 | #define IGNORE_SINGLE_CELL 43 45 | #define DRAW_SINGLE_NET 33 46 | #define DRAW_WIRING_EST 34 47 | #define IGNORE_WIRING_EST 35 48 | #define CANCEL 0 49 | #define CHANGE_ASPECT_RATIO 36 50 | #define GRAPHICS_WAIT 40 51 | #define NO_GRAPHICS_WAIT 41 52 | #define CANCEL 0 53 | 54 | 55 | static TWMENUBOX menuS[39] = { 56 | "CONTROL",0,0,1,0,0, 57 | "Auto Redraw On","Auto Redraw Off",1,0,1,2, 58 | "Close Graphics",0,0,0,3,0, 59 | "Colors",0,0,0,4,0, 60 | "Continue Program",0,0,0,5,0, 61 | "Dump Graphics",0,0,0,6,0, 62 | "FullView",0,0,0,8,0, 63 | "Graphics Update On","Graphics Update Off",1,0,9,10, 64 | "Redraw",0,0,0,11,0, 65 | "Tell Point",0,0,0,12,0, 66 | "Translate",0,0,0,13,0, 67 | "Zoom",0,0,0,14,0, 68 | "Cancel",0,0,0,0,0, 69 | "EDIT",0,0,1,0,0, 70 | "Cell Neighborhood",0,0,0,15,0, 71 | "Edit Cell",0,0,0,16,0, 72 | "Fix Cell",0,0,0,17,0, 73 | "Fix Cell but Rot",0,0,0,18,0, 74 | "Group Cells",0,0,0,19,0, 75 | "Move Cell",0,0,0,20,0, 76 | "Cancel",0,0,0,0,0, 77 | "DRAW ",0,0,1,0,0, 78 | "Draw Bins","Ignore Bins",0,0,21,22, 79 | "Draw Border","Draw Tiles",1,0,23,24, 80 | "Draw Globe Areas","Ignore Globe Areas",1,0,37,38, 81 | "Draw Labels","Ignore Labels",0,0,25,26, 82 | "Draw Neighborhd","Ignore Neighborhood",1,0,27,28, 83 | "Draw Nets","Ignore Nets",0,0,29,30, 84 | "Draw Orient","Ignore Orient",0,0,44,45, 85 | "Draw Pins","Ignore Pins",0,0,31,32, 86 | "Draw Single Cell Moves","Ignore Single Cell",0,0,42,43, 87 | "Draw Single Net",0,0,0,33,0, 88 | "Draw Wiring Est","Ignore Wiring Est",0,0,34,35, 89 | "Cancel",0,0,0,0,0, 90 | "PARAMETERS ",0,0,1,0,0, 91 | "Change Aspect Ratio",0,0,0,36,0, 92 | "Graphics Wait","No Graphics Wait",0,0,40,41, 93 | "Cancel",0,0,0,0,0, 94 | 0,0,0,0,0,0 95 | } ; 96 | 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /src/twmc/neworient.h: -------------------------------------------------------------------------------- 1 | #ifndef INC_NEWORIENT_H 2 | #define INC_NEWORIENT_H 3 | 4 | #include 5 | #include 6 | 7 | INT check_valid_orient( CELLBOXPTR cptr ); 8 | 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /src/twmc/pads.h: -------------------------------------------------------------------------------- 1 | #ifndef PADS_H 2 | #define PADS_H 3 | 4 | /* control for pad spacing */ 5 | #define UNIFORM_PADS 0 6 | #define VARIABLE_PADS 1 7 | #define ABUT_PADS 2 8 | #define EXACT_PADS 3 9 | 10 | /* pad sides */ 11 | #define ALL 0 12 | #define L 1 13 | #define T 2 14 | #define R 3 15 | #define B 4 16 | 17 | #define MINI 0 18 | #define MAXI 1 19 | 20 | #define X 0 21 | #define Y 1 22 | 23 | #define HOWMANY 0 24 | #define LARGE 100000 25 | #define PINFINITY INT_MAX / 8 26 | #define PICK_INT(l,u) (((l)<(u)) ? ((RAND % ((u)-(l)+1))+(l)) : (l)) 27 | 28 | /* pad hierarchy */ 29 | #define NONE 0 30 | #define LEAF 1 31 | #define SUBROOT 2 32 | #define ROOT 3 33 | 34 | #endif /* PADS_H */ 35 | -------------------------------------------------------------------------------- /src/twmc/partition.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) partition.h (Yale) version 3.3 9/5/90" 3 | FILE: partition.h 4 | DESCRIPTION:insert file to support standard cell partitioner. 5 | CONTENTS: 6 | DATE: May 17, 1989 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | #ifndef PARTITION_H 10 | #define PARTITION_H 11 | 12 | #define INITROWSEP 1.0 13 | #define EVEN_ODD( x ) ( (x) & 01 ) 14 | #define EVEN 0 15 | 16 | typedef struct d_field { 17 | INT x_lb ; 18 | INT x_ub ; 19 | INT cell ; 20 | struct d_field *prev ; 21 | struct d_field *next ; 22 | } DFLD, *DFLDPTR ; 23 | 24 | typedef struct b_record { 25 | SHORT state ; 26 | SHORT number ; 27 | INT length ; 28 | INT x_lb ; 29 | INT x_ub ; 30 | INT y_lb ; 31 | INT y_ub ; 32 | struct d_field *macro ; 33 | } BLOCK, *BLOCKPTR ; 34 | 35 | #endif /* PARTITION_H */ 36 | -------------------------------------------------------------------------------- /src/twmc/perimeter.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | 46 | int perimeter( YBUSTBOXPTR A, INT numcorners ) 47 | { 48 | 49 | INT i , sum ; 50 | 51 | sum = 0 ; 52 | for( i = 1 ; i <= numcorners ; i++ ) { 53 | if( i == numcorners ) { 54 | sum += ABS(A[1].x - A[i].x) + ABS(A[1].y - A[i].y) ; 55 | } else { 56 | sum += ABS(A[i + 1].x - A[i].x) + ABS(A[i + 1].y - A[i].y) ; 57 | } 58 | } 59 | return( sum ) ; 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/twmc/prboard.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1988-1991 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: prboard.c 42 | DESCRIPTION:print board routine 43 | CONTENTS: config1( ) 44 | DATE: Jan 30, 1988 45 | REVISIONS: Jul 30, 1988 - fixed output for softcells and added 46 | gridding of cells for mighty interface. 47 | Mon Jan 7 18:31:00 CST 1991 - don't grid pads. 48 | ----------------------------------------------------------------- */ 49 | 50 | #include 51 | #include 52 | 53 | void grid_cells() 54 | { 55 | 56 | INT xcenter , ycenter, remainder ; 57 | INT cell ; 58 | INT old_left, old_bottom ;/* original xy center of cell before gridding */ 59 | INT delta_x, delta_y ; /* delta to move cell lower left to grid */ 60 | INT left, right, bottom, top ; /* sides of cell bounding box */ 61 | CELLBOXPTR cellptr ; 62 | BOUNBOXPTR bounptr ; 63 | 64 | if(!(gridCellsG)){ 65 | return ; 66 | } 67 | for( cell = 1 ; cell <= endsuperG ; cell++ ) { 68 | cellptr = cellarrayG[ cell ] ; 69 | if( cellptr->celltype == GROUPCELLTYPE || 70 | cellptr->celltype == SUPERCELLTYPE ) { 71 | /* avoid these cell types */ 72 | continue ; 73 | } 74 | bounptr = cellptr->bounBox[cellptr->orient] ; 75 | xcenter = cellptr->xcenter ; 76 | ycenter = cellptr->ycenter ; 77 | 78 | left = bounptr->l ; 79 | right = bounptr->r ; 80 | bottom = bounptr->b ; 81 | top = bounptr->t ; 82 | 83 | /* add offset */ 84 | old_left = left += xcenter ; 85 | old_bottom = bottom += ycenter ; 86 | 87 | /* grid cell data if requested */ 88 | /* set lower left corner to grid */ 89 | YforceGrid( &left, &bottom ) ; 90 | 91 | /* now modify center of cell coordinates */ 92 | delta_x = left - old_left ; 93 | delta_y = bottom - old_bottom ; 94 | cellptr->xcenter += delta_x ; 95 | cellptr->ycenter += delta_y ; 96 | 97 | } /* end for loop */ 98 | 99 | /* update all the costs */ 100 | funccostG = findcost() ; 101 | 102 | } /* end grid_cells */ 103 | -------------------------------------------------------------------------------- /src/twmc/readcells.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: custom_parser.h 3 | DESCRIPTION:This file redefines global variable of yacc and lex so 4 | that we can have more than one parser in TimberWolfMC. 5 | CONTENTS: macro redefinitions for parser in readcells. 6 | DATE: Aug 7, 1988 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | 10 | #define yyact CUSTOM_yyact 11 | #define yyback CUSTOM_yyback 12 | #define yybgin CUSTOM_yybgin 13 | #define yychar CUSTOM_yychar 14 | #define yychk CUSTOM_yychk 15 | #define yycrank CUSTOM_yycrank 16 | #define yycnprs CUSTOM_yycnprs 17 | #define yydebug CUSTOM_yydebug 18 | #define yydef CUSTOM_yydef 19 | #define yyerrflag CUSTOM_yyerrflag 20 | #define yyerror CUSTOM_yyerror 21 | #define yyestate CUSTOM_yyestate 22 | #define yyexca CUSTOM_yyexca 23 | #define yyextra CUSTOM_yyextra 24 | #define yyfnd CUSTOM_yyfnd 25 | #define yyin CUSTOM_yyin 26 | #define yyinput CUSTOM_yyinput 27 | #define yyleng CUSTOM_yyleng 28 | #define yylex CUSTOM_yylex 29 | #define yylineno CUSTOM_yylineno 30 | #define yylook CUSTOM_yylook 31 | #define yylsp CUSTOM_yylsp 32 | #define yylstate CUSTOM_yylstate 33 | #define yylval CUSTOM_yylval 34 | #define yymatch CUSTOM_yymatch 35 | #define yymorfg CUSTOM_yymorfg 36 | #define yynerrs CUSTOM_yynerrs 37 | #define yyolsp CUSTOM_yyolsp 38 | #define yyout CUSTOM_yyout 39 | #define yyoutput CUSTOM_yyoutput 40 | #define yypact CUSTOM_yypact 41 | #define yyparse CUSTOM_yyparse 42 | #define yypgo CUSTOM_yypgo 43 | #define yyprevious CUSTOM_yyprevious 44 | #define yyreds CUSTOM_yyreds 45 | #define yyr1 CUSTOM_yyr1 46 | #define yyr2 CUSTOM_yyr2 47 | #define yysbuf CUSTOM_yysbuf 48 | #define yysptr CUSTOM_yysptr 49 | #define yysvec CUSTOM_yysvec 50 | #define yytchar CUSTOM_yytchar 51 | #define yytext CUSTOM_yytext 52 | #define yytoks CUSTOM_yytoks 53 | #define yytop CUSTOM_yytop 54 | #define yyunput CUSTOM_yyunput 55 | #define yyv CUSTOM_yyv 56 | #define yyval CUSTOM_yyval 57 | #define yyvstop CUSTOM_yyvstop 58 | #define yywrap CUSTOM_yywrap 59 | -------------------------------------------------------------------------------- /src/twmc/readnets.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: readnets.h 3 | DESCRIPTION:This file redefines global variable of yacc and lex so 4 | that we can have more than one parser in TimberWolfMC. 5 | CONTENTS: macro redefinitions for parser in readnets. 6 | DATE: Oct 19, 1988 7 | REVISIONS: Sun Dec 16 00:40:28 EST 1990 - moved net routines to 8 | initnets.c and added analog functions. 9 | Thu Mar 7 01:48:21 EST 1991 - added more definitions 10 | for byacc. 11 | ----------------------------------------------------------------- */ 12 | #include 13 | #define STARTPATH 1 /* flag for start of path */ 14 | #define CONTPATH 0 /* flag for continuing path */ 15 | 16 | #define yyact NET_yyact 17 | #define yyback NET_yyback 18 | #define yybgin NET_yybgin 19 | #define yychar NET_yychar 20 | #define yychk NET_yychk 21 | #define yycrank NET_yycrank 22 | #define yycnprs NET_yycnprs 23 | #define yydebug NET_yydebug 24 | #define yydef NET_yydef 25 | #define yyerrflag NET_yyerrflag 26 | #define yyerror NET_yyerror 27 | #define yyestate NET_yyestate 28 | #define yyexca NET_yyexca 29 | #define yyextra NET_yyextra 30 | #define yyfnd NET_yyfnd 31 | #define yyin NET_yyin 32 | #define yyinput NET_yyinput 33 | #define yyleng NET_yyleng 34 | #define yylex NET_yylex 35 | #define yylineno NET_yylineno 36 | #define yylook NET_yylook 37 | #define yylsp NET_yylsp 38 | #define yylstate NET_yylstate 39 | #define yylval NET_yylval 40 | #define yymatch NET_yymatch 41 | #define yymorfg NET_yymorfg 42 | #define yynerrs NET_yynerrs 43 | #define yyolsp NET_yyolsp 44 | #define yyout NET_yyout 45 | #define yyoutput NET_yyoutput 46 | #define yypact NET_yypact 47 | #define yyparse NET_yyparse 48 | #define yypgo NET_yypgo 49 | #define yyprevious NET_yyprevious 50 | #define yyreds NET_yyreds 51 | #define yyr2 NET_yyr2 52 | #define yysbuf NET_yysbuf 53 | #define yysptr NET_yysptr 54 | #define yysvec NET_yysvec 55 | #define yytchar NET_yytchar 56 | #define yytext NET_yytext 57 | #define yytoks NET_yytoks 58 | #define yytop NET_yytop 59 | #define yyunput NET_yyunput 60 | #define yyv NET_yyv 61 | #define yyval NET_yyval 62 | #define yyvstop NET_yyvstop 63 | #define yywrap NET_yywrap 64 | /* for byacc */ 65 | #define yyrule NET_yyrule 66 | #define yyname NET_yyname 67 | #define yytable NET_yytable 68 | #define yycheck NET_yycheck 69 | #define yydgoto NET_yydgoto 70 | #define yydefred NET_yydefred 71 | #define yygindex NET_yygindex 72 | #define yyrindex NET_yyrindex 73 | #define yysindex NET_yysindex 74 | #define yylen NET_yylen 75 | #define yylhs NET_yylhs 76 | -------------------------------------------------------------------------------- /src/twmc/readpar.h: -------------------------------------------------------------------------------- 1 | #ifndef __TWMC_READPAR_H__ 2 | #define __TWMC_READPAR_H__ 3 | 4 | void readpar(void); 5 | 6 | #endif // __TWMC_READPAR_H__ 7 | 8 | -------------------------------------------------------------------------------- /src/twmc/selectpin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1988-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: selectpin.c 42 | DESCRIPTION:attempts single pin move, if unsuccessful attempts pairwise 43 | pin flip. 44 | CONTENTS: BOOL selectpin( acellptr ) 45 | CELLBOXPTR acellptr ; 46 | DATE: Feb 5, 1988 47 | REVISIONS: July 21, 1988 - modified selectpin to work with Jimmy's 48 | controller. 49 | Mar 20, 1989 - rewrote to work with new data structure 50 | ----------------------------------------------------------------- */ 51 | 52 | #include 53 | #include 54 | 55 | 56 | void selectpin( acellptr ) 57 | CELLBOXPTR acellptr ; 58 | { 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/twmc/temp.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) temp.h (Yale) version 3.4 2/4/91" 3 | FILE: temp.c 4 | DESCRIPTION:definitions for temperature control 5 | CONTENTS: 6 | DATE: Mar 01, 1989 7 | REVISIONS: Mon Feb 4 02:21:54 EST 1991 - added MINTUPDATE def. 8 | ----------------------------------------------------------------- */ 9 | #ifndef TEMP_H 10 | #define TEMP_H 11 | 12 | #define RATIOUPPERBOUND 0.15 /* control to find Tratio */ 13 | #define RATIOLOWERBOUND 0.05 /* control to find Tratio */ 14 | #define LOWTEMPRATIO 0.05 /* low temp anneal acceptance ratio */ 15 | #define EPSILON 0.000001 /* error tolerance */ 16 | #define DEFAULTTEMP 5.0 /* default temp for low temp anneal */ 17 | #define FINISHED 0.99999 /* round to 1.0 we are finished */ 18 | 19 | /* Definitions for heuristic temperature scheduler */ 20 | 21 | /* ----------------------------------------------------------------- 22 | The temperature regions are defined as follows: 23 | Iterations Purpose 24 | -2 - 0 Initialization 25 | 1 - HIGHTEMP High temperature regime exponential decay 26 | HIGHTEMP+1 - MEDTEMP Critical temp. 0.44 - range limiter 27 | MEDTEMP+1 - LASTTEMP Low temperature regime exponential decay. 28 | ----------------------------------------------------------------------- */ 29 | #define INIT_ITERATION -2 /* initialization iteration */ 30 | #define HIGHTEMP 23.00 /* last iteration of high temp regime */ 31 | #define MEDTEMP 81.00 /* last iteration of range limiter */ 32 | #define LOWTEMP 125.0 /* temperature @ 6% acceptance rate */ 33 | #define TURNOFFT 125.0 /* iteration of neg. feddback turnoff */ 34 | #define LASTTEMP 155.00 /* last iteration */ 35 | #define CRITRATIO 0.44 /* critical ratio */ 36 | #define LOWRATIO 0.06 /* temperature for controler turn off */ 37 | #define ACCEPTDAMPFACTOR 0.025 /* damping factor for acceptance rate*/ 38 | #define ACCEPTDAMPFACTOR2 0.25 /* damping factor for low temp's */ 39 | #define NUMTUPDATES 400 /* max number of T updates per iteration*/ 40 | #define MINTUPDATE 14 /* mininum # moves before update */ 41 | 42 | #endif /* TEMP_H */ 43 | -------------------------------------------------------------------------------- /src/twmc/tidialog.h: -------------------------------------------------------------------------------- 1 | static TWDIALOGBOX dialogS[53] = { 2 | 1,5,8," ACCEPT ",2,3,0, 3 | 1,25,8," CANCEL ",2,2,0, 4 | 2,15,9,"Edit Cell",0,3,0, 5 | 3,5,13,"Name",0,4,0, 6 | 4,5,12,"Number",0,4,0, 7 | 5,5,8,"Xcenter:",0,4,0, 8 | 5,14,8,"10",1,4,0, 9 | 6,5,8,"Ycenter:",0,4,0, 10 | 6,14,8,"10",1,4,0, 11 | 7,5,7,"Orient:",3,4,10, 12 | 7,14,2,"1 ",2,4,1, 13 | 7,16,2,"2 ",2,4,1, 14 | 7,18,2,"3 ",2,4,1, 15 | 7,20,2,"4 ",2,4,1, 16 | 7,22,2,"5 ",2,4,1, 17 | 7,24,2,"6 ",2,4,1, 18 | 7,26,2,"7 ",2,4,1, 19 | 7,28,2,"8 ",2,4,1, 20 | 9,5,19,"Valid orientations",0,4,0, 21 | 10,7,1,"1",3,4,20, 22 | 10,14,5,"valid",2,6,2, 23 | 10,25,7,"invalid",2,3,2, 24 | 11,7,1,"2",3,4,23, 25 | 11,14,5,"valid",2,6,3, 26 | 11,25,7,"invalid",2,3,3, 27 | 12,7,1,"3",3,4,26, 28 | 12,14,5,"valid",2,6,4, 29 | 12,25,7,"invalid",2,3,4, 30 | 13,7,1,"4",3,4,29, 31 | 13,14,5,"valid",2,6,5, 32 | 13,25,7,"invalid",2,3,5, 33 | 14,7,1,"5",3,4,32, 34 | 14,14,5,"valid",2,6,6, 35 | 14,25,7,"invalid",2,3,6, 36 | 15,7,1,"6",3,4,35, 37 | 15,14,5,"valid",2,6,7, 38 | 15,25,7,"invalid",2,3,7, 39 | 16,7,1,"7",3,4,38, 40 | 16,14,5,"valid",2,6,8, 41 | 16,25,7,"invalid",2,3,8, 42 | 17,7,1,"8",3,4,41, 43 | 17,14,5,"valid",2,6,9, 44 | 17,25,7,"invalid",2,3,9, 45 | 19,5,5,"Fixed",3,4,44, 46 | 19,14,3,"on ",2,6,10, 47 | 19,25,3,"off",2,3,10, 48 | 21,1,35,"To change case fields put pointer",0,4,0, 49 | 22,1,35,"in window and click. To change",0,4,0, 50 | 23,1,35,"input fields put pointer in window",0,4,0, 51 | 24,1,35,"and back up over current contents",0,4,0, 52 | 25,1,35,"using the delete key. After modifying",0,4,0, 53 | 26,1,35,"the field, hit the return key.",0,4,0, 54 | 0,0,0,0,0,0,0 55 | } ; 56 | 57 | 58 | /* timberwolf to ice view translations */ 59 | INT tw2ice(orient) 60 | INT orient; 61 | { 62 | switch (orient){ 63 | case 0: 64 | return(1); 65 | case 1: 66 | return(7); 67 | case 2: 68 | return(5); 69 | case 3: 70 | return(3); 71 | case 4: 72 | return(8); 73 | case 5: 74 | return(6); 75 | case 6: 76 | return(2); 77 | case 7: 78 | return(4); 79 | } 80 | 81 | } 82 | 83 | 84 | INT ice2tw(orient) 85 | INT orient; 86 | { 87 | switch (orient){ 88 | case 1: 89 | return(0); 90 | case 2: 91 | return(6); 92 | case 3: 93 | return(3); 94 | case 4: 95 | return(7); 96 | case 5: 97 | return(2); 98 | case 6: 99 | return(5); 100 | case 7: 101 | return(1); 102 | case 8: 103 | return(4); 104 | } 105 | } /* end ice2tw */ 106 | 107 | 108 | -------------------------------------------------------------------------------- /src/twmc/usoftmove.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1988-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: usoftmove.c 42 | DESCRIPTION:pin move routine. 43 | CONTENTS: BOOL usoftmove( acellptr,UCpin,seq,firstNewSite,lastNewSite ) 44 | INT UCpin , seq , firstNewSite , lastNewSite ; 45 | CELLBOXPTR acellptr ; 46 | DATE: Jun 27, 1988 47 | REVISIONS: Oct 21, 1988 - removed Hweight and Vweight fields. 48 | Mar 16, 1989 - rewrote data structure and move upin to 49 | usoftmove.c. 50 | ----------------------------------------------------------------- */ 51 | 52 | #include 53 | #include 54 | #include 55 | 56 | /* ----------------------------------------------------------------- 57 | important global definitions - defined in custom.h used for feedback. 58 | INT overfillG, overpenalG ; 59 | DOUBLE pinFactorG ; 60 | */ 61 | 62 | -------------------------------------------------------------------------------- /src/twmc/ys.awk: -------------------------------------------------------------------------------- 1 | BEGIN { state = 1; pstate = 0 } 2 | $1 == "%%" { pstate = 1; next } 3 | $1 == "{" { state = 0 } 4 | $1 == "}" { state = 1; next } 5 | $1 == "#include" && pstate == 1 { exit } 6 | state == 1 && pstate == 1 { 7 | if( $2 == ":" ){ 8 | printf( "\n%s\t: ", $1 ) ; 9 | i = 3 ; 10 | while( i <= NF ){ 11 | printf( "%s ", $i ) ; 12 | i++ ; 13 | } 14 | printf( "\n" ) ; 15 | 16 | } else if( $1 == "|" ){ 17 | if( $NF == "error" || $(NF-1) == "error" ){ 18 | next ; 19 | } 20 | printf( "\t| " ) ; 21 | i = 2 ; 22 | while( i <= NF ){ 23 | printf( "%s ", $i ) ; 24 | i++ ; 25 | } 26 | printf( "\n" ) ; 27 | } else if( $NF > 0 ){ 28 | i = 1 ; 29 | printf( "\t\t" ) ; 30 | while( i <= NF ){ 31 | printf( "%s ", $i ) ; 32 | i++ ; 33 | } 34 | printf( "\n" ) ; 35 | } 36 | } 37 | END { } 38 | -------------------------------------------------------------------------------- /src/twsc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | add_executable(TimberWolfSC acceptt.c coarseglb.c debug2.c findcostf.c globroute.c newtemp.c overlap.c readcell.c rowevener.c sortpin.c ucxxo1.c upair.c buildimp.c configpads.c debug.c findrcost.c graphics.c outcm.c parser.c readnets.c savewolf.c steiner.c ucxxo2.c urcost.c cell_width.c configure.c dimbox.c findunlap.c main.c outpins1.c paths.c readpar.c seagate.c uc0.c ucxxp.c utemp.c cglbroute.c countf.c feedest.c gateswap.c mergeseg.c outpins.c placepads.c reconfig.c sort.c ucxx1.c uloop.c xpickint.c changrid.c crossbus.c findcost.c globe.c netgraph.c output.c readblck.c rmoverlap.c sortpad.c ucxx2.c unlap.c ${CMAKE_SOURCE_DIR}/src/date/date.c) 5 | 6 | target_link_libraries(TimberWolfSC ycadgraywolf) 7 | target_link_libraries(TimberWolfSC ${X11_LIBRARIES}) 8 | target_link_libraries(TimberWolfSC m) 9 | 10 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include .) 11 | 12 | install(TARGETS TimberWolfSC DESTINATION lib/graywolf/bin) 13 | -------------------------------------------------------------------------------- /src/twsc/config.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) config.h (Yale) version 4.4 2/17/91" 3 | FILE: config.h 4 | DESCRIPTION:TimberwolfSC insert file for configuration parameters. 5 | CONTENTS: 6 | DATE: Mar 27, 1989 7 | REVISIONS: Sun Feb 17 21:11:18 EST 1991 - moved numMacroG to pad.h 8 | ----------------------------------------------------------------- */ 9 | #ifndef CONFIG_H 10 | #define CONFIG_H 11 | 12 | #ifdef CONFIG_VARS 13 | #define EXTERN 14 | #else 15 | #define EXTERN extern 16 | #endif 17 | 18 | typedef struct macrobox { 19 | INT mx ; 20 | INT my ; 21 | } MACROBOX ; 22 | 23 | typedef struct rowbox { 24 | INT startx ; 25 | INT endx ; 26 | INT endx1 ; 27 | INT startx2 ; 28 | INT ypos ; 29 | INT desiredL ; 30 | } ROWBOX ; 31 | 32 | EXTERN MACROBOX *macroArrayG ; 33 | EXTERN ROWBOX *rowArrayG ; 34 | 35 | EXTERN INT max_blklengthG ; 36 | EXTERN INT route2actG; /* added for placement adjusted for routing */ 37 | extern INT track_pitchG; /* used only if global routing is performed */ 38 | EXTERN INT gridCellG; /* used only if global routing is performed */ 39 | EXTERN INT desiredLG ; 40 | EXTERN DOUBLE *macspaceG ; 41 | 42 | EXTERN INT *padArrayG ; 43 | EXTERN INT extraSpaceG ; 44 | EXTERN INT coreHeightG ; 45 | EXTERN INT coreWidthG ; 46 | EXTERN INT separationG ; 47 | EXTERN INT spaceG ; 48 | EXTERN INT maxHeight ; 49 | EXTERN INT lastG ; 50 | 51 | #undef EXTERN 52 | 53 | #endif /* CONFIG_H */ 54 | -------------------------------------------------------------------------------- /src/twsc/date.h: -------------------------------------------------------------------------------- 1 | #define DATE "@(#) Yale compilation date:Mon May 25 21:19:07 EDT 1992" 2 | -------------------------------------------------------------------------------- /src/twsc/feeds.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) feeds.h (Yale) version 4.2 9/7/90" 3 | FILE: feeds.h 4 | DESCRIPTION:TimberwolfSC insert file for feedthrus. 5 | CONTENTS: 6 | DATE: Mar 27, 1989 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | #ifndef FEEDS_H 10 | #define FEEDS_H 11 | 12 | #ifdef FEEDS_VARS 13 | #define EXTERN 14 | #else 15 | #define EXTERN extern 16 | #endif 17 | 18 | typedef struct feed_assgn_box { 19 | PINBOXPTR netptr ; 20 | PINBOXPTR refer ; 21 | SEGBOXPTR segptr ; 22 | } 23 | *FEED_SEG_PTR , 24 | FEED_SEG ; 25 | 26 | EXTERN INT *feeds_in_rowG ; 27 | extern INT *FeedInRowG ; 28 | EXTERN INT fdWidthG ; 29 | EXTERN INT *fdcel_addedG ; 30 | EXTERN INT **fdcel_needG ; 31 | EXTERN INT *total_feed_in_the_rowG ; 32 | 33 | 34 | #undef EXTERN 35 | 36 | #endif /* FEEDS_H */ 37 | -------------------------------------------------------------------------------- /src/twsc/main.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) main.h (Yale) version 4.6 1/25/91" 3 | FILE: main.h 4 | DESCRIPTION:global definitions for TimberWolfSC 5 | CONTENTS: 6 | DATE: Mar 27, 1989 7 | REVISIONS: Sun Jan 20 21:47:52 PST 1991 - ported to AIX. 8 | Fri Jan 25 23:46:21 PST 1991 - removed redundant variables. 9 | ----------------------------------------------------------------- */ 10 | #ifndef MAIN_H 11 | #define MAIN_H 12 | 13 | /* global variables defined for main */ 14 | #ifdef MAIN_VARS 15 | #define EXTERN 16 | #else 17 | #define EXTERN extern 18 | #endif 19 | 20 | EXTERN char *cktNameG ; 21 | 22 | EXTERN INT rowsG ; 23 | EXTERN INT attmaxG ; 24 | EXTERN INT iterationG ; 25 | 26 | EXTERN INT blkxspanG ; 27 | EXTERN INT blkyspanG ; 28 | extern INT ffeedsG ; 29 | EXTERN INT lrtxspanG ; 30 | EXTERN INT lrtyspanG ; 31 | EXTERN INT ifrangeG ; 32 | EXTERN INT *fixarrayG ; 33 | 34 | EXTERN FILE *fpoG ; 35 | 36 | EXTERN INT d_costG ; 37 | EXTERN INT resume_runG ; 38 | EXTERN INT implicit_pins_usedG ; 39 | EXTERN INT rowHeightG ; 40 | extern INT fdthrusG ; 41 | 42 | EXTERN DOUBLE TG ; 43 | EXTERN DOUBLE imprangeG ; 44 | EXTERN DOUBLE rowSepG ; 45 | EXTERN INT rowSepAbsG ; 46 | EXTERN DOUBLE stopdegG ; 47 | 48 | EXTERN unsigned Yrandom_seed() ; 49 | EXTERN unsigned randomSeedG ; 50 | EXTERN unsigned randomSeed2G ; 51 | 52 | #undef EXTERN 53 | 54 | #endif /* MAIN_H */ 55 | -------------------------------------------------------------------------------- /src/twsc/menus.h: -------------------------------------------------------------------------------- 1 | 2 | /* TWmenu definitions */ 3 | #define TWNUMMENUS 23 4 | #define CANCEL 0 5 | #define AUTO_REDRAW_ON 1 6 | #define AUTO_REDRAW_OFF 2 7 | #define CLOSE_GRAPHICS 3 8 | #define COLORS 4 9 | #define CONTINUE_PGM 5 10 | #define DUMP_GRAPHICS 6 11 | #define FULLVIEW 7 12 | #define GRAPHICS_UPDATE_ON 8 13 | #define GRAPHICS_UPDATE_OFF 9 14 | #define REDRAW 10 15 | #define TELL_POINT 11 16 | #define TRANSLATE 12 17 | #define ZOOM 13 18 | #define DRAW_BLOCKS 20 19 | #define IGNORE_BLOCKS 21 20 | #define DRAW_STDCELLS 22 21 | #define IGNORE_STDCELLS 23 22 | #define DRAW_LABELS 24 23 | #define IGNORE_LABELS 25 24 | #define DRAW_NETS 26 25 | #define IGNORE_NETS 27 26 | #define DRAW_ORIENT 33 27 | #define IGNORE_ORIENT 34 28 | #define DRAW_PINS 28 29 | #define IGNORE_PINS 29 30 | #define DRAW_SINGLE_NET 30 31 | #define DRAW_SINGLE_CELL_MOVES 31 32 | #define IGNORE_SINGLE_MOVES 32 33 | 34 | #ifndef DEVELOPMENU 35 | 36 | static TWMENUBOX menuS[24] = { 37 | "CONTROL",0,0,1,0,0, 38 | "Auto Redraw On","Auto Redraw Off",1,0,1,2, 39 | "Close Graphics",0,0,0,3,0, 40 | "Colors",0,0,0,4,0, 41 | "Continue Pgm",0,0,0,5,0, 42 | "Dump Graphics",0,0,0,6,0, 43 | "FullView",0,0,0,7,0, 44 | "Graphics Update On","Graphics Update Off",1,0,8,9, 45 | "Redraw",0,0,0,10,0, 46 | "Tell Point",0,0,0,11,0, 47 | "Translate",0,0,0,12,0, 48 | "Zoom",0,0,0,13,0, 49 | "Cancel",0,0,0,0,0, 50 | "DRAW ",0,0,1,0,0, 51 | "Draw Blocks","Ignore Blocks",1,0,20,21, 52 | "Draw Stdcells","Ignore Stdcells",1,0,22,23, 53 | "Draw Labels","Ignore Labels",0,0,24,25, 54 | "Draw Nets","Ignore Nets",0,0,26,27, 55 | "Draw Orient","Ignore Orient",0,0,33,34, 56 | "Draw Pins","Ignore Pins",0,0,28,29, 57 | "Draw Single Net",0,0,0,30,0, 58 | "Draw Single Cell Moves","Ignore Single Moves",0,0,31,32, 59 | "Cancel",0,0,0,0,0, 60 | 0,0,0,0,0,0 61 | } ; 62 | 63 | #else /* DEVELOPMENU */ 64 | 65 | static TWMENUBOX *menuS ; 66 | 67 | #endif /* DEVELOPMENU */ 68 | -------------------------------------------------------------------------------- /src/twsc/parser.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) parser.h (Yale) version 4.5 9/7/90" 3 | FILE: parser.h 4 | DESCRIPTION:definitions for parsing. 5 | CONTENTS: 6 | DATE: Dec 8, 1989 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | #ifndef PARSER_H 10 | 11 | #define PARSER_H 12 | 13 | #ifdef PARSER_VARS 14 | #define EXTERN 15 | #else 16 | #define EXTERN extern 17 | #endif 18 | 19 | /* cell types */ 20 | #define STDCELLTYPE 1 21 | #define EXCEPTTYPE 2 22 | #define PADTYPE 3 23 | #define PORTTYPE 4 24 | #define EXTRATYPE 5 25 | #define PADGROUPTYPE 6 26 | #define HARDCELLTYPE 7 27 | /* pin types */ 28 | #define PINTYPE 1 29 | #define PASS_THRU 2 30 | #define SWAP_PASS 3 31 | 32 | EXTERN SWAPBOX *swap_group_listG ; 33 | EXTERN BOOL one_pin_feedthruG ; 34 | 35 | EXTERN INT case_unequiv_pinG ; 36 | EXTERN INT celllenG ; 37 | EXTERN INT cells_per_clusterG ; 38 | EXTERN INT cluster_widthG ; 39 | EXTERN INT extra_cellsG ; 40 | EXTERN INT *fixLRBTG ; 41 | EXTERN INT last_pin_numberG ; 42 | EXTERN INT num_clustersG ; 43 | EXTERN BOOL swappable_gates_existG ; 44 | 45 | EXTERN INT swap_netG ; 46 | EXTERN INT totallenG ; 47 | EXTERN DOUBLE *padspaceG ; 48 | 49 | #undef EXTERN 50 | 51 | #endif /* PARSER_H */ 52 | -------------------------------------------------------------------------------- /src/twsc/readblck.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) readblck.h (Yale) version 4.2 9/7/90" 3 | FILE: readblck.h 4 | DESCRIPTION:TimberwolfSC insert file for reading block file. 5 | CONTENTS: 6 | DATE: Mar 27, 1989 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | #ifndef READBLCK_H 10 | #define READBLCK_H 11 | 12 | #ifdef READBLCK_VARS 13 | #define EXTERN 14 | #else 15 | #define EXTERN extern 16 | #endif 17 | 18 | typedef struct exceptbox { 19 | INT row ; 20 | INT ll_x ; 21 | INT ll_y ; 22 | INT ur_x ; 23 | INT ur_y ; 24 | } *EXCEPTPTR, EXCEPTBOX ; 25 | 26 | /* global variable definitions */ 27 | EXTERN INT num_exceptsG ; 28 | EXTERN INT top_of_top_rowG ; 29 | EXTERN INT bot_of_bot_rowG ; 30 | EXTERN INT uniform_rowsG ; 31 | EXTERN INT individual_rowSepsG ; 32 | EXTERN INT total_except_widthG ; 33 | EXTERN DOUBLE *rowSepsG ; 34 | EXTERN INT *rowSepsAbsG ; 35 | EXTERN DOUBLE *relativeLenG ; 36 | EXTERN EXCEPTBOX *exceptionsG ; 37 | 38 | 39 | #undef EXTERN 40 | 41 | #endif /* READBLCK_H */ 42 | -------------------------------------------------------------------------------- /src/twsc/readcell.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: readcell.h 3 | DESCRIPTION:This file redefines global variable of yacc and lex so 4 | that we can have more than one parser in TimberWolfSC. 5 | CONTENTS: macro redefinitions for parser in readcell. 6 | DATE: Aug 7, 1988 7 | REVISIONS: 8 | ----------------------------------------------------------------- */ 9 | 10 | #define yyact READCEL_yyact 11 | #define yyback READCEL_yyback 12 | #define yybgin READCEL_yybgin 13 | #define yychar READCEL_yychar 14 | #define yychk READCEL_yychk 15 | #define yycrank READCEL_yycrank 16 | #define yydebug READCEL_yydebug 17 | #define yydef READCEL_yydef 18 | #define yyerrflag READCEL_yyerrflag 19 | #define yyerror READCEL_yyerror 20 | #define yyestate READCEL_yyestate 21 | #define yyexca READCEL_yyexca 22 | #define yyextra READCEL_yyextra 23 | #define yyfnd READCEL_yyfnd 24 | #define yyin READCEL_yyin 25 | #define yyinput READCEL_yyinput 26 | #define yyleng READCEL_yyleng 27 | #define yylex READCEL_yylex 28 | #define yylineno READCEL_yylineno 29 | #define yylook READCEL_yylook 30 | #define yylsp READCEL_yylsp 31 | #define yylstate READCEL_yylstate 32 | #define yylval READCEL_yylval 33 | #define yymatch READCEL_yymatch 34 | #define yymorfg READCEL_yymorfg 35 | #define yynerrs READCEL_yynerrs 36 | #define yyolsp READCEL_yyolsp 37 | #define yyout READCEL_yyout 38 | #define yyoutput READCEL_yyoutput 39 | #define yypact READCEL_yypact 40 | #define yyparse READCEL_yyparse 41 | #define yypgo READCEL_yypgo 42 | #define yyprevious READCEL_yyprevious 43 | #define yyreds READCEL_yyreds 44 | #define yyr1 READCEL_yyr1 45 | #define yyr2 READCEL_yyr2 46 | #define yysbuf READCEL_yysbuf 47 | #define yysptr READCEL_yysptr 48 | #define yysvec READCEL_yysvec 49 | #define yytchar READCEL_yytchar 50 | #define yytext READCEL_yytext 51 | #define yytoks READCEL_yytoks 52 | #define yytop READCEL_yytop 53 | #define yyunput READCEL_yyunput 54 | #define yyv READCEL_yyv 55 | #define yyval READCEL_yyval 56 | #define yyvstop READCEL_yyvstop 57 | #define yywrap READCEL_yywrap 58 | -------------------------------------------------------------------------------- /src/twsc/readnets.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | FILE: readnets.h 3 | DESCRIPTION:This file redefines global variable of yacc and lex so 4 | that we can have more than one parser in TimberWolfMC. 5 | CONTENTS: macro redefinitions for parser in readnets. 6 | DATE: Oct 19, 1988 7 | REVISIONS: Mar 27, 1989 - added to TimberWolfSC also added PSETBOX def. 8 | Thu Mar 7 02:43:49 EST 1991 - added more definitions 9 | for byacc. 10 | ----------------------------------------------------------------- */ 11 | /* ***************************************************************** 12 | "@(#) readnets.h (Yale) version 4.4 3/7/91" 13 | ***************************************************************** */ 14 | typedef struct psetrec { 15 | INT member; /* integer for determining membership */ 16 | INT path ; /* data */ 17 | struct psetrec *next ; 18 | } PSETBOX, *PSETPTR ; /* path set record */ 19 | 20 | #define yyact NET_yyact 21 | #define yyback NET_yyback 22 | #define yybgin NET_yybgin 23 | #define yychar NET_yychar 24 | #define yychk NET_yychk 25 | #define yycrank NET_yycrank 26 | #define yydebug NET_yydebug 27 | #define yydef NET_yydef 28 | #define yyerrflag NET_yyerrflag 29 | #define yyerror NET_yyerror 30 | #define yyestate NET_yyestate 31 | #define yyexca NET_yyexca 32 | #define yyextra NET_yyextra 33 | #define yyfnd NET_yyfnd 34 | #define yyin NET_yyin 35 | #define yyinput NET_yyinput 36 | #define yyleng NET_yyleng 37 | #define yylex NET_yylex 38 | #define yylineno NET_yylineno 39 | #define yylook NET_yylook 40 | #define yylsp NET_yylsp 41 | #define yylstate NET_yylstate 42 | #define yylval NET_yylval 43 | #define yymatch NET_yymatch 44 | #define yymorfg NET_yymorfg 45 | #define yynerrs NET_yynerrs 46 | #define yyolsp NET_yyolsp 47 | #define yyout NET_yyout 48 | #define yyoutput NET_yyoutput 49 | #define yypact NET_yypact 50 | #define yyparse NET_yyparse 51 | #define yypgo NET_yypgo 52 | #define yyprevious NET_yyprevious 53 | #define yyr1 NET_yyr1 54 | #define yyr2 NET_yyr2 55 | #define yysbuf NET_yysbuf 56 | #define yysptr NET_yysptr 57 | #define yysvec NET_yysvec 58 | #define yytchar NET_yytchar 59 | #define yytext NET_yytext 60 | #define yytop NET_yytop 61 | #define yyunput NET_yyunput 62 | #define yyv NET_yyv 63 | #define yyval NET_yyval 64 | #define yyvstop NET_yyvstop 65 | #define yywrap NET_yywrap 66 | /* for byacc */ 67 | #define yyrule NET_yyrule 68 | #define yyname NET_yyname 69 | #define yytable NET_yytable 70 | #define yycheck NET_yycheck 71 | #define yydgoto NET_yydgoto 72 | #define yydefred NET_yydefred 73 | #define yygindex NET_yygindex 74 | #define yyrindex NET_yyrindex 75 | #define yysindex NET_yysindex 76 | #define yylen NET_yylen 77 | #define yylhs NET_yylhs 78 | -------------------------------------------------------------------------------- /src/twsc/readpar.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) readpar.h (Yale) version 4.4 11/8/91" 3 | FILE: readpar.h 4 | DESCRIPTION:global definitions for TimberWolfSC 5 | CONTENTS: 6 | DATE: Mar 27, 1989 7 | REVISIONS: Thu Sep 19 14:15:51 EDT 1991 - added equal width cell 8 | capability. 9 | ----------------------------------------------------------------- */ 10 | #ifndef READPAR_H 11 | #define READPAR_H 12 | 13 | /* global variables defined for main */ 14 | #ifdef READPAR_VARS 15 | #define EXTERN 16 | #else 17 | #define EXTERN extern 18 | #endif 19 | 20 | 21 | EXTERN BOOL addFeedsG ; 22 | EXTERN BOOL connection_machineG ; 23 | EXTERN BOOL costonlyG ; 24 | EXTERN BOOL cswapsG ; 25 | EXTERN BOOL doglobalG ; 26 | EXTERN BOOL doGraphicsG ; 27 | EXTERN BOOL estimate_feedsG ; 28 | EXTERN BOOL gate_arrayG ; 29 | EXTERN BOOL gate_array_specialG ; 30 | EXTERN BOOL intelG ; 31 | EXTERN BOOL restartG ; 32 | EXTERN BOOL SGGRG ; 33 | EXTERN BOOL try_not_to_add_explicit_feedsG ; 34 | EXTERN BOOL Equal_Width_CellsG ; 35 | EXTERN BOOL file_conversionG ; 36 | EXTERN BOOL even_rows_maximallyG ; 37 | 38 | EXTERN INT feedLayerG ; 39 | EXTERN INT no_feeds_side_netsG ; 40 | EXTERN INT pin_layers_givenG ; 41 | EXTERN INT tw_fastG ; 42 | EXTERN INT tw_slowG ; 43 | 44 | #undef EXTERN 45 | 46 | #endif /* READPAR_VARS */ 47 | -------------------------------------------------------------------------------- /src/twsc/sc_menu: -------------------------------------------------------------------------------- 1 | # TimberWolfMC menu file. 2 | # "@(#) sc_menu (Yale) version 4.8 5/7/91" 3 | # 4 | # Comments start with a sharp 5 | # MENU is a keyword must be capitalized. 6 | # Everything in this file is case sensitive. 7 | # Fields are separated by commas. 8 | # Format: 9 | # MENU,menuName - followed by list of entries for this menu 10 | # - one on each line. 11 | # Normal menu entry - MenuEntry,FunctionNumber 12 | # Boolean menu entry - 13 | # TrueMenuEntry,FunctionNumber1,FalseMenuEntry,FunctionNumber2,Init 14 | # where Init is the initial state and is 1 for True and 0 for False. 15 | # 16 | # Menu are placed on the screen in a left to right order according 17 | # to the order in this file. 18 | # 19 | MENU,CONTROL 20 | Auto Redraw On,1,Auto Redraw Off,2,1 21 | Close Graphics,3 22 | Colors,4 23 | Continue Pgm,5 24 | Dump Graphics,6 25 | FullView,7 26 | Graphics Update On,8,Graphics Update Off,9,1 27 | Redraw,10 28 | Tell Point,11 29 | Translate,12 30 | Zoom,13 31 | Cancel,0 32 | 33 | MENU,DRAW 34 | Draw Blocks,20,Ignore Blocks,21,1 35 | Draw Stdcells,22,Ignore Stdcells,23,1 36 | Draw Labels,24,Ignore Labels,25,0 37 | Draw Nets,26,Ignore Nets,27,0 38 | Draw Orient,33,Ignore Orient,34,0 39 | Draw Pins,28,Ignore Pins,29,0 40 | Draw Single Net,30 41 | Draw Single Cell Moves,31,Ignore Single Moves,32,0 42 | Cancel,0 43 | -------------------------------------------------------------------------------- /src/twsc/src_list: -------------------------------------------------------------------------------- 1 | acceptt.c 2 | buildimp.c 3 | cell_width.c 4 | cglbroute.c 5 | changrid.c 6 | coarseglb.c 7 | config.h 8 | configpads.c 9 | configure.c 10 | countf.c 11 | crossbus.c 12 | debug.c 13 | debug2.c 14 | dimbox.c 15 | feedest.c 16 | feeds.h 17 | findcost.c 18 | findcostf.c 19 | findrcost.c 20 | findunlap.c 21 | gateswap.c 22 | globe.c 23 | globroute.c 24 | graphics.c 25 | groute.h 26 | main.c 27 | main.h 28 | menus.h 29 | mergeseg.c 30 | netgraph.c 31 | newtemp.c 32 | outcm.c 33 | outpins.c 34 | outpins1.c 35 | output.c 36 | overlap.c 37 | pads.h 38 | parser.c 39 | parser.h 40 | paths.c 41 | placepads.c 42 | readblck.c 43 | readblck.h 44 | readcell.c 45 | readcell.h 46 | readcell.l 47 | readcell.y 48 | readnets.h 49 | readnets.l 50 | readnets.y 51 | readpar.c 52 | readpar.h 53 | reconfig.c 54 | rmoverlap.c 55 | rowevener.c 56 | savewolf.c 57 | sc_menu 58 | seagate.c 59 | sort.c 60 | sortpad.c 61 | sortpin.c 62 | standard.h 63 | steiner.c 64 | uc0.c 65 | ucxx1.c 66 | ucxx2.c 67 | ucxxglb.h 68 | ucxxo1.c 69 | ucxxo2.c 70 | ucxxp.c 71 | uloop.c 72 | unlap.c 73 | upair.c 74 | urcost.c 75 | utemp.c 76 | xpickint.c 77 | -------------------------------------------------------------------------------- /src/twsc/uc0.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1989-1992 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: uc0.c 42 | DESCRIPTION:orientation change. 43 | CONTENTS: uc0( a , newaor ) 44 | INT a , newaor ; 45 | DATE: Mar 27, 1989 46 | REVISIONS: Mon Aug 12 17:01:03 CDT 1991 - changed timing ASSERTIONS 47 | to D( ) constructs to speed execution time during 48 | debug mode. 49 | ----------------------------------------------------------------- */ 50 | 51 | #include "standard.h" 52 | #include 53 | 54 | 55 | void uc0( a , newaor ) 56 | INT a , newaor ; 57 | { 58 | 59 | CBOXPTR acellptr ; 60 | PINBOXPTR antrmptr ; 61 | INT cost , truth ; 62 | INT newtimepenal ; 63 | 64 | 65 | acellptr = carrayG[ a ] ; 66 | antrmptr = acellptr->pins ; 67 | 68 | term_newpos( antrmptr, acellptr->cxcenter, acellptr->cycenter, newaor ); 69 | 70 | cost = funccostG ; 71 | 72 | clear_net_set() ; /* reset set to mark nets that have changed position */ 73 | /* dimbox routines mark the nets that have changed */ 74 | new_dbox( antrmptr , &cost ) ; 75 | 76 | newtimepenal = timingcostG ; 77 | newtimepenal += calc_incr_time( a ) ; 78 | 79 | D( "twsc/check_timing", 80 | ASSERT( dcalc_full_penalty(newtimepenal),"uc0","time problem") ; 81 | ) ; 82 | 83 | truth = acceptt( funccostG - cost, timingcostG - newtimepenal, 0 ) ; 84 | if( truth ) { 85 | 86 | dbox_pos( antrmptr ) ; 87 | update_time( a ) ; 88 | acellptr->corient = newaor ; 89 | funccostG = cost ; 90 | timingcostG = newtimepenal ; 91 | G( graphics_cell_update( a ) ) ; 92 | } else { 93 | G( graphics_cell_attempt( a ) ) ; 94 | } 95 | return ; 96 | } 97 | -------------------------------------------------------------------------------- /src/twsc/ucxxglb.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------- 2 | "@(#) ucxxglb.h (Yale) version 4.4 9/19/91" 3 | FILE: ucxxglb.h 4 | DESCRIPTION:insert file for cell moves. 5 | CONTENTS: macros and global defs for cell moves. 6 | DATE: Mar 27, 1989 7 | REVISIONS: Thu Sep 19 14:15:51 EDT 1991 - added equal width cell 8 | capability. 9 | ----------------------------------------------------------------- */ 10 | #ifndef UCXXGLB_H 11 | #define UCXXGLB_H 12 | 13 | #include "standard.h" 14 | 15 | #define MASK 0x3ff 16 | #define remv_cell( cellptr , post ) (\ 17 | ( *cellptr != post ) ? (cellptr[ post ] = cellptr[ *cellptr ],\ 18 | (*cellptr)-- ) : (*cellptr)-- ) 19 | /* 20 | #define add_cell( cellptr , c ) ( cellptr[ ++(*cellptr) ] = c ) 21 | */ 22 | 23 | /* global variables defined for main */ 24 | #ifdef UCXXGLB_VARS 25 | #define EXTERN 26 | #else 27 | #define EXTERN extern 28 | #endif 29 | 30 | EXTERN INT ablockG , bblockG ; 31 | EXTERN INT aG , bG ; 32 | EXTERN INT ApostG , BpostG ; 33 | EXTERN INT *cellaptrG , *cellbptrG ; 34 | EXTERN INT earlyRejG , Rej_errorG ; 35 | EXTERN INT axcenterG , aycenterG , bxcenterG , bycenterG ; 36 | EXTERN INT aleftG , arightG , bleftG , brightG ; 37 | EXTERN INT attemptsG ; 38 | EXTERN INT potential_errorsG , error_countG , P_limitG ; 39 | EXTERN DOUBLE total_wire_chgG ; 40 | EXTERN DOUBLE sigma_wire_chgG ; 41 | EXTERN DOUBLE mean_wire_chgG ; 42 | EXTERN INT wire_chgsG ; 43 | EXTERN DOUBLE fraction_doneG ; 44 | 45 | #undef EXTERN 46 | 47 | #endif /* UCXXGLB_H */ 48 | -------------------------------------------------------------------------------- /src/twsc/xpickint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1989-1990 Yale University 3 | * 4 | * This work is distributed in the hope that it will be useful; you can 5 | * redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; 7 | * either version 2 of the License, 8 | * or any later version, on the following conditions: 9 | * 10 | * (a) YALE MAKES NO, AND EXPRESSLY DISCLAIMS 11 | * ALL, REPRESENTATIONS OR WARRANTIES THAT THE MANUFACTURE, USE, PRACTICE, 12 | * SALE OR 13 | * OTHER DISPOSAL OF THE SOFTWARE DOES NOT OR WILL NOT INFRINGE UPON ANY 14 | * PATENT OR 15 | * OTHER RIGHTS NOT VESTED IN YALE. 16 | * 17 | * (b) YALE MAKES NO, AND EXPRESSLY DISCLAIMS ALL, REPRESENTATIONS AND 18 | * WARRANTIES 19 | * WHATSOEVER WITH RESPECT TO THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 20 | * INCLUDING, 21 | * BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 22 | * PARTICULAR 23 | * PURPOSE. 24 | * 25 | * (c) LICENSEE SHALL MAKE NO STATEMENTS, REPRESENTATION OR WARRANTIES 26 | * WHATSOEVER TO 27 | * ANY THIRD PARTIES THAT ARE INCONSISTENT WITH THE DISCLAIMERS BY YALE IN 28 | * ARTICLE 29 | * (a) AND (b) above. 30 | * 31 | * (d) IN NO EVENT SHALL YALE, OR ITS TRUSTEES, DIRECTORS, OFFICERS, 32 | * EMPLOYEES AND 33 | * AFFILIATES BE LIABLE FOR DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR 34 | * INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER YALE SHALL BE 35 | * ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE 36 | * POSSIBILITY OF THE FOREGOING. 37 | * 38 | */ 39 | 40 | /* ----------------------------------------------------------------- 41 | FILE: xpickint.c 42 | DESCRIPTION:pick a random number. 43 | CONTENTS: XPICK_INT( l , u , c ) 44 | INT l , u , c ; 45 | DATE: Mar 27, 1989 46 | REVISIONS: 47 | ----------------------------------------------------------------- */ 48 | 49 | #include 50 | 51 | #define PICK_INT(l,u) (((l)<(u)) ? ((RAND % ((u)-(l)+1))+(l)) : (l)) 52 | 53 | int XPICK_INT(INT l , INT u , INT c ) 54 | { 55 | 56 | INT d ; 57 | 58 | if ( c < 0 ) { 59 | return(-c) ; 60 | } else { 61 | do { 62 | d = PICK_INT(l,u) ; 63 | } while ( d == c ) ; 64 | return(d) ; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_test( 2 | NAME install_in_tmp 3 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/install_in_tmp.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} 4 | ) 5 | set_tests_properties(install_in_tmp PROPERTIES DEPENDS graywolf) 6 | 7 | add_test( 8 | NAME map9v3 9 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/runtest.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} map9v3 10 | ) 11 | set_tests_properties(map9v3 PROPERTIES DEPENDS install_in_tmp) 12 | 13 | add_test( 14 | NAME map9v3-twsc 15 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/twsc/runtest.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} map9v3 16 | ) 17 | set_tests_properties(map9v3-twsc PROPERTIES DEPENDS install_in_tmp) 18 | 19 | add_test( 20 | NAME map9v3-mincut 21 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mincut/runtest.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} map9v3 22 | ) 23 | set_tests_properties(map9v3-mincut PROPERTIES DEPENDS install_in_tmp) 24 | 25 | add_test( 26 | NAME map9v3-twmc 27 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/twmc/runtest.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} map9v3 28 | ) 29 | set_tests_properties(map9v3-twmc PROPERTIES DEPENDS install_in_tmp) 30 | 31 | add_test( 32 | NAME map9v3_other_seed 33 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/runtest.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} map9v3_other_seed 34 | ) 35 | set_tests_properties(map9v3_other_seed PROPERTIES DEPENDS install_in_tmp) 36 | 37 | -------------------------------------------------------------------------------- /tests/install_in_tmp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf $2/micro_env 4 | mkdir -p $2/micro_env 5 | mkdir -p $2/micro_env/bin 6 | cp $2/src/mincut/Mincut $2/micro_env/bin/ 7 | cp $2/src/twmc/TimberWolfMC $2/micro_env/bin/ 8 | cp $2/src/twsc/TimberWolfSC $2/micro_env/bin/ 9 | cp $2/src/genrows/genrows $2/micro_env/bin/ 10 | cp $2/src/mc_compact/mc_compact $2/micro_env/bin/ 11 | cp $2/src/syntax/syntax $2/micro_env/bin/ 12 | cp $2/script/show_flows $2/micro_env/bin/ 13 | cp $1/script/splt_file.a $2/micro_env/bin/ 14 | cp -r $1/flow $2/micro_env/bin/ 15 | ln -sf flow.noroute $2/micro_env/bin/flow/flow 16 | -------------------------------------------------------------------------------- /tests/map9v3/expected/map9v3.blk: -------------------------------------------------------------------------------- 1 | rows 9 2 | row -239 -200 24239 1800 mirror 3 | row -239 1800 24239 3800 4 | row -239 3800 24239 5800 mirror 5 | row -239 5800 24239 7800 6 | row -239 7800 24239 9800 mirror 7 | row -239 9800 24239 11800 8 | row -239 11800 24239 13800 mirror 9 | row -239 13800 24239 15800 10 | row -239 15800 24239 17800 mirror 11 | 12 | /* 13 | The Tile and Macro Information: 14 | numtiles 1 15 | -240 -200 24240 27400 16 | 17 | nummacros 0 18 | 19 | */ 20 | -------------------------------------------------------------------------------- /tests/map9v3/expected/map9v3.pl2: -------------------------------------------------------------------------------- 1 | 1 -239 -200 23601 1800 0 0 2 | 2 -239 1800 23281 3800 0 0 3 | 3 -239 3800 23441 5800 0 0 4 | 4 -239 5800 23761 7800 0 0 5 | 5 -239 7800 23601 9800 0 0 6 | 6 -239 9800 23441 11800 0 0 7 | 7 -239 11800 23441 13800 0 0 8 | 8 -239 13800 23441 15800 0 0 9 | 9 -239 15800 23281 17800 0 0 10 | twpin_clock 9041 18000 9201 18200 3 -4 11 | twpin_reset 4401 18000 4561 18200 3 -4 12 | twpin_start -639 2180 -439 2340 7 -1 13 | twpin_N<0> 23961 14340 24161 14500 6 -2 14 | twpin_N<1> 20241 -600 20401 -400 0 -3 15 | twpin_N<2> 20561 -600 20721 -400 0 -3 16 | twpin_N<3> 23961 1260 24161 1420 6 -2 17 | twpin_N<4> 21761 -600 21921 -400 0 -3 18 | twpin_N<5> 23961 14180 24161 14340 6 -2 19 | twpin_N<6> 23961 4720 24161 4880 6 -2 20 | twpin_N<7> 23961 9050 24161 9210 6 -2 21 | twpin_N<8> 23961 8720 24161 8880 6 -2 22 | twpin_dp<0> 22651 18000 22811 18200 3 -4 23 | twpin_dp<1> 23961 16720 24161 16880 6 -2 24 | twpin_dp<2> -639 8720 -439 8880 7 -1 25 | twpin_dp<3> -639 14720 -439 14880 7 -1 26 | twpin_dp<4> 10011 18000 10171 18200 3 -4 27 | twpin_dp<5> 13991 18000 14151 18200 3 -4 28 | twpin_dp<6> -639 12720 -439 12880 7 -1 29 | twpin_dp<7> -639 6720 -439 6880 7 -1 30 | twpin_dp<8> 3911 18000 4071 18200 3 -4 31 | twpin_done 7271 -600 7431 -400 0 -3 32 | twpin_counter<0> 13531 -600 13691 -400 0 -3 33 | twpin_counter<1> 14011 -600 14171 -400 0 -3 34 | twpin_counter<2> 18491 -600 18651 -400 0 -3 35 | twpin_counter<3> 18971 -600 19131 -400 0 -3 36 | twpin_counter<4> 23961 14720 24161 14880 6 -2 37 | twpin_counter<5> 23961 720 24161 880 6 -2 38 | twpin_counter<6> 16401 18000 16561 18200 3 -4 39 | twpin_counter<7> 15131 18000 15291 18200 3 -4 40 | twpin_sr<0> 15921 18000 16081 18200 3 -4 41 | twpin_sr<1> -639 8880 -439 9040 7 -1 42 | twpin_sr<2> 8561 18000 8721 18200 3 -4 43 | twpin_sr<3> 9201 18000 9361 18200 3 -4 44 | twpin_sr<4> 13201 18000 13361 18200 3 -4 45 | twpin_sr<5> 7761 18000 7921 18200 3 -4 46 | twpin_sr<6> 3611 -600 3771 -400 0 -3 47 | twpin_sr<7> 7601 18000 7761 18200 3 -4 48 | -------------------------------------------------------------------------------- /tests/map9v3/map9v3.par: -------------------------------------------------------------------------------- 1 | # osu035.par --- Parameter file for GrayWolf 2 | # NOTE: all distance units are in centimicrons unless otherwise stated 3 | 4 | RULES 5 | # values are resistance in ohms/sq and capacitance in fF/um^2 6 | layer metal1 0.07 0.030 horizontal 7 | layer metal2 0.07 0.017 vertical 8 | layer metal3 0.07 0.006 horizontal 9 | layer metal4 0.04 0.004 vertical 10 | 11 | via via12 metal1 metal2 12 | via via23 metal2 metal3 13 | via via34 metal3 metal4 14 | 15 | width metal1 60 16 | width metal2 60 17 | width metal3 60 18 | width metal4 120 19 | width via12 60 20 | width via23 60 21 | width via34 120 22 | 23 | # Set spacing = track pitch - width, so that GrayWolf places pins 24 | # on the right pitch. 25 | # Pitches are (in um): 26 | # metal1 = 200, metal2 = 160, metal3 = 200, metal4 = 320 27 | 28 | spacing metal1 metal1 140 29 | spacing metal2 metal2 100 30 | spacing metal3 metal3 140 31 | spacing metal4 metal4 200 32 | 33 | # Stacked vias allowed 34 | spacing via12 via23 0 35 | spacing via23 via34 0 36 | 37 | overhang via12 metal1 8 38 | overhang via12 metal2 6 39 | 40 | overhang via23 metal2 8 41 | overhang via23 metal3 6 42 | 43 | overhang via34 metal3 14 44 | overhang via34 metal4 16 45 | ENDRULES 46 | 47 | *vertical_wire_weight : 1.0 48 | *vertical_path_weight : 1.0 49 | *padspacing : variable 50 | *rowSep : 0.0 0 51 | *track.pitch : 160 52 | *graphics.wait : off 53 | *last_chance.wait : off 54 | *random.seed : 12345 55 | 56 | TWMC*chip.aspect.ratio : 0.75 57 | 58 | TWSC*feedThruWidth : 160 layer 1 59 | TWSC*do.global.route : on 60 | TWSC*ignore_feeds : true 61 | TWSC*call_row_evener : true 62 | TWSC*even_rows_maximally : true 63 | # TWSC*no.graphics : on 64 | 65 | GENR*row_to_tile_spacing: 1 66 | # GENR*numrows : 6 67 | GENR*flip_alternate_rows : 1 68 | -------------------------------------------------------------------------------- /tests/map9v3_other_seed/expected/map9v3_other_seed.pl2: -------------------------------------------------------------------------------- 1 | 1 -239 -200 23281 1800 0 0 2 | 2 -239 1800 23281 3800 0 0 3 | 3 -239 3800 23601 5800 0 0 4 | 4 -239 5800 23441 7800 0 0 5 | 5 -239 7800 23601 9800 0 0 6 | 6 -239 9800 23441 11800 0 0 7 | 7 -239 11800 23761 13800 0 0 8 | 8 -239 13800 23281 15800 0 0 9 | 9 -239 15800 23601 17800 0 0 10 | twpin_clock 13041 18000 13201 18200 3 -4 11 | twpin_reset 12881 18000 13041 18200 3 -4 12 | twpin_start 10961 -600 11121 -400 0 -3 13 | twpin_N<0> -639 1260 -439 1420 7 -1 14 | twpin_N<1> 23961 2380 24161 2540 6 -2 15 | twpin_N<2> 23961 2860 24161 3020 6 -2 16 | twpin_N<3> 23961 1260 24161 1420 6 -2 17 | twpin_N<4> 23961 8720 24161 8880 6 -2 18 | twpin_N<5> 23961 13260 24161 13420 6 -2 19 | twpin_N<6> 23961 12720 24161 12880 6 -2 20 | twpin_N<7> 23961 5050 24161 5210 6 -2 21 | twpin_N<8> 23961 4420 24161 4580 6 -2 22 | twpin_dp<0> -639 2720 -439 2880 7 -1 23 | twpin_dp<1> 9531 -600 9691 -400 0 -3 24 | twpin_dp<2> -639 4720 -439 4880 7 -1 25 | twpin_dp<3> -639 8720 -439 8880 7 -1 26 | twpin_dp<4> 3751 18000 3911 18200 3 -4 27 | twpin_dp<5> 5531 -600 5691 -400 0 -3 28 | twpin_dp<6> -639 6720 -439 6880 7 -1 29 | twpin_dp<7> -639 14720 -439 14880 7 -1 30 | twpin_dp<8> 1191 -600 1351 -400 0 -3 31 | twpin_done 13511 18000 13671 18200 3 -4 32 | twpin_counter<0> 17691 -600 17851 -400 0 -3 33 | twpin_counter<1> 13191 -600 13351 -400 0 -3 34 | twpin_counter<2> 19931 18000 20091 18200 3 -4 35 | twpin_counter<3> 18631 18000 18791 18200 3 -4 36 | twpin_counter<4> 19451 18000 19611 18200 3 -4 37 | twpin_counter<5> 17511 18000 17671 18200 3 -4 38 | twpin_counter<6> 23961 6880 24161 7040 6 -2 39 | twpin_counter<7> 23961 6720 24161 6880 6 -2 40 | twpin_sr<0> 9041 -600 9201 -400 0 -3 41 | twpin_sr<1> 9201 18000 9361 18200 3 -4 42 | twpin_sr<2> 12091 18000 12251 18200 3 -4 43 | twpin_sr<3> 4231 18000 4391 18200 3 -4 44 | twpin_sr<4> -639 10720 -439 10880 7 -1 45 | twpin_sr<5> -639 11040 -439 11200 7 -1 46 | twpin_sr<6> 3271 18000 3431 18200 3 -4 47 | twpin_sr<7> -639 10880 -439 11040 7 -1 48 | -------------------------------------------------------------------------------- /tests/map9v3_other_seed/map9v3_other_seed.cel: -------------------------------------------------------------------------------- 1 | ../map9v3/map9v3.cel -------------------------------------------------------------------------------- /tests/map9v3_other_seed/map9v3_other_seed.par: -------------------------------------------------------------------------------- 1 | # osu035.par --- Parameter file for GrayWolf 2 | # NOTE: all distance units are in centimicrons unless otherwise stated 3 | 4 | RULES 5 | # values are resistance in ohms/sq and capacitance in fF/um^2 6 | layer metal1 0.07 0.030 horizontal 7 | layer metal2 0.07 0.017 vertical 8 | layer metal3 0.07 0.006 horizontal 9 | layer metal4 0.04 0.004 vertical 10 | 11 | via via12 metal1 metal2 12 | via via23 metal2 metal3 13 | via via34 metal3 metal4 14 | 15 | width metal1 60 16 | width metal2 60 17 | width metal3 60 18 | width metal4 120 19 | width via12 60 20 | width via23 60 21 | width via34 120 22 | 23 | # Set spacing = track pitch - width, so that GrayWolf places pins 24 | # on the right pitch. 25 | # Pitches are (in um): 26 | # metal1 = 200, metal2 = 160, metal3 = 200, metal4 = 320 27 | 28 | spacing metal1 metal1 140 29 | spacing metal2 metal2 100 30 | spacing metal3 metal3 140 31 | spacing metal4 metal4 200 32 | 33 | # Stacked vias allowed 34 | spacing via12 via23 0 35 | spacing via23 via34 0 36 | 37 | overhang via12 metal1 8 38 | overhang via12 metal2 6 39 | 40 | overhang via23 metal2 8 41 | overhang via23 metal3 6 42 | 43 | overhang via34 metal3 14 44 | overhang via34 metal4 16 45 | ENDRULES 46 | 47 | *vertical_wire_weight : 1.0 48 | *vertical_path_weight : 1.0 49 | *padspacing : variable 50 | *rowSep : 0.0 0 51 | *track.pitch : 160 52 | *graphics.wait : off 53 | *last_chance.wait : off 54 | *random.seed : 123 55 | 56 | TWMC*chip.aspect.ratio : 0.75 57 | 58 | TWSC*feedThruWidth : 160 layer 1 59 | TWSC*do.global.route : on 60 | TWSC*ignore_feeds : true 61 | TWSC*call_row_evener : true 62 | TWSC*even_rows_maximally : true 63 | # TWSC*no.graphics : on 64 | 65 | GENR*row_to_tile_spacing: 1 66 | # GENR*numrows : 6 67 | GENR*flip_alternate_rows : 1 68 | -------------------------------------------------------------------------------- /tests/mincut/map9v3/expected/map9v3.stat: -------------------------------------------------------------------------------- 1 | syntax version:v1.1 date:Mon May 25 21:11:10 EDT 1992 2 | TIMESTAMP:Thu Jul 19 21:21:05 2018 3 | Statistics for map9v3: 4 | num_stdcells:215 5 | num_macros:0 6 | num_instances:0 7 | num_pads:38 8 | num_nets:228 9 | num_pins:735 10 | num_implicit_feeds:1334 11 | num_equivs:1334 12 | num_unequivs:0 13 | num_ports:38 14 | macro_area:0.000e+00 15 | tot_length:213440 16 | num_soft:1 17 | cell_height:2000 18 | tot_length:213440 19 | num_soft:1 20 | cell_height:2000 21 | tot_length:213440 22 | num_soft:1 23 | cell_height:2000 24 | -------------------------------------------------------------------------------- /tests/mincut/map9v3/map9v3.cel: -------------------------------------------------------------------------------- 1 | ../../map9v3/map9v3.cel -------------------------------------------------------------------------------- /tests/mincut/map9v3/map9v3.par: -------------------------------------------------------------------------------- 1 | ../../map9v3/map9v3.par -------------------------------------------------------------------------------- /tests/mincut/map9v3/map9v3.stat: -------------------------------------------------------------------------------- 1 | syntax version:v1.1 date:Mon May 25 21:11:10 EDT 1992 2 | TIMESTAMP:Thu Jul 19 21:21:05 2018 3 | Statistics for map9v3: 4 | num_stdcells:215 5 | num_macros:0 6 | num_instances:0 7 | num_pads:38 8 | num_nets:228 9 | num_pins:735 10 | num_implicit_feeds:1334 11 | num_equivs:1334 12 | num_unequivs:0 13 | num_ports:38 14 | macro_area:0.000e+00 15 | tot_length:213440 16 | num_soft:1 17 | cell_height:2000 18 | tot_length:213440 19 | num_soft:1 20 | cell_height:2000 21 | -------------------------------------------------------------------------------- /tests/mincut/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCEDIR=$1 4 | BINDIR=$2 5 | TESTNAME=$3 6 | 7 | #TWDIR=${BINDIR}/micro_env ${BINDIR}/src/twflow/graywolf 8 | TMPDIR=`mktemp -d` 9 | rsync ${SOURCEDIR}/tests/mincut/${TESTNAME} ${TMPDIR}/ -a --copy-links -v 10 | 11 | 12 | pushd ${TMPDIR}/${TESTNAME} 13 | TWDIR=${BINDIR}/micro_env ${BINDIR}/micro_env/bin/Mincut ${TESTNAME} 14 | 15 | RET=0 16 | diff ${TESTNAME}.scel expected/${TESTNAME}.scel 17 | RETPART=$? 18 | if [ "$RETPART" != "0" ] ; then 19 | RET=-1 20 | fi 21 | diff ${TESTNAME}.mcel expected/${TESTNAME}.mcel 22 | RETPART=$? 23 | if [ "$RETPART" != "0" ] ; then 24 | RET=-1 25 | fi 26 | diff ${TESTNAME}.stat expected/${TESTNAME}.stat 27 | RETPART=$? 28 | if [ "$RETPART" != "0" ] ; then 29 | RET=-1 30 | fi 31 | 32 | if [ "$#" = "4" ] && [ "$4" == "1" ] ; then 33 | cp * ${SOURCEDIR}/tests/mincut/${TESTNAME}/expected/ 34 | touch ${SOURCEDIR}/tests/mincut/${TESTNAME}/expected/updated 35 | fi 36 | 37 | popd 38 | rm -rf ${TMPDIR} 39 | #echo ${TMPDIR} 40 | 41 | exit $RET 42 | -------------------------------------------------------------------------------- /tests/picosoc/picosoc.par: -------------------------------------------------------------------------------- 1 | # osu018.par --- Parameter file for GrayWolf 2 | # NOTE: all distance units are in centimicrons unless otherwise stated 3 | 4 | RULES 5 | # values are resistance in ohms/sq and capacitance in fF/um^2 6 | layer metal1 0.07 0.030 horizontal 7 | layer metal2 0.07 0.017 vertical 8 | layer metal3 0.07 0.006 horizontal 9 | layer metal4 0.04 0.004 vertical 10 | 11 | via via12 metal1 metal2 12 | via via23 metal2 metal3 13 | via via34 metal3 metal4 14 | 15 | width metal1 60 16 | width metal2 60 17 | width metal3 60 18 | width metal4 120 19 | width via12 60 20 | width via23 60 21 | width via34 120 22 | 23 | # Set spacing = track pitch - width, so that GrayWolf places pins 24 | # on the right pitch. 25 | # Pitches are (in um): 26 | # metal1 = 200, metal2 = 160, metal3 = 200, metal4 = 320 27 | 28 | spacing metal1 metal1 140 29 | spacing metal2 metal2 100 30 | spacing metal3 metal3 140 31 | spacing metal4 metal4 200 32 | 33 | # Stacked vias allowed 34 | spacing via12 via23 0 35 | spacing via23 via34 0 36 | 37 | overhang via12 metal1 8 38 | overhang via12 metal2 6 39 | 40 | overhang via23 metal2 8 41 | overhang via23 metal3 6 42 | 43 | overhang via34 metal3 14 44 | overhang via34 metal4 16 45 | ENDRULES 46 | 47 | *vertical_wire_weight : 1.0 48 | *vertical_path_weight : 1.0 49 | *padspacing : variable 50 | *rowSep : 0.0 0 51 | *track.pitch : 80 52 | *minimum_pad_space : 120 53 | *gridX : 80 54 | *gridY : 100 55 | *gridOffsetX : 0 56 | *gridOffsetY : 0 57 | *graphics.wait : off 58 | *last_chance.wait : off 59 | *random.seed : 12345 60 | 61 | TWMC*chip.aspect.ratio : 0.75 62 | 63 | TWSC*feedThruWidth : 80 layer 1 64 | TWSC*do.global.route : on 65 | TWSC*ignore_feeds : true 66 | TWSC*call_row_evener : true 67 | TWSC*even_rows_maximally : true 68 | # TWSC*no.graphics : on 69 | 70 | GENR*row_to_tile_spacing: 1 71 | # GENR*numrows : 6 72 | GENR*flip_alternate_rows : 1 73 | -------------------------------------------------------------------------------- /tests/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCEDIR=$1 4 | BINDIR=$2 5 | TESTNAME=$3 6 | 7 | #TWDIR=${BINDIR}/micro_env ${BINDIR}/src/twflow/graywolf 8 | TMPDIR=`mktemp -d` 9 | rsync ${SOURCEDIR}/tests/${TESTNAME} ${TMPDIR}/ -a --copy-links -v 10 | 11 | pushd ${TMPDIR}/${TESTNAME} 12 | TWDIR=${BINDIR}/micro_env ${BINDIR}/src/twflow/graywolf -n ${TESTNAME} 13 | 14 | RET=0 15 | 16 | diff -Nau ${TESTNAME}.pl1 expected/${TESTNAME}.pl1 17 | RETPART=$? 18 | if [ "$RETPART" != "0" ] ; then 19 | RET=-1 20 | fi 21 | 22 | diff -Nau ${TESTNAME}.pl2 expected/${TESTNAME}.pl2 23 | RETPART=$? 24 | if [ "$RETPART" != "0" ] ; then 25 | RET=-1 26 | fi 27 | 28 | 29 | if [ "$#" = "4" ] && [ "$4" == "1" ] ; then 30 | cp * ${SOURCEDIR}/tests/${TESTNAME}/expected/ 31 | touch ${SOURCEDIR}/tests/${TESTNAME}/expected/updated 32 | fi 33 | 34 | popd 35 | rm -rf ${TMPDIR} 36 | 37 | exit $RET 38 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.blk: -------------------------------------------------------------------------------- 1 | rows 9 2 | row -239 -200 24239 1800 mirror 3 | row -239 1800 24239 3800 4 | row -239 3800 24239 5800 mirror 5 | row -239 5800 24239 7800 6 | row -239 7800 24239 9800 mirror 7 | row -239 9800 24239 11800 8 | row -239 11800 24239 13800 mirror 9 | row -239 13800 24239 15800 10 | row -239 15800 24239 17800 mirror 11 | 12 | /* 13 | The Tile and Macro Information: 14 | numtiles 1 15 | -240 -200 24240 27400 16 | 17 | nummacros 0 18 | 19 | */ 20 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.gen: -------------------------------------------------------------------------------- 1 | core -240 -200 24240 18200 2 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.gsav: -------------------------------------------------------------------------------- 1 | total_row_length 213440 2 | actual_row_height 2000 3 | channel_separation 0 4 | min_length 4896 5 | core -240 -200 24240 18200 6 | grid 0 0 7 | num_macro 0 8 | feed_length 0 9 | spacing 1 10 | numtiles 1 11 | 0 -240 -200 24240 27400 0 1 0 9 2000 0 0 4896 1 24478 0 12 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.mgeo: -------------------------------------------------------------------------------- 1 | cell core 2 | 6 vertices 0 0 0 18478 18478 18478 18478 9239 27717 9239 27717 0 3 | cell pad.macro.l 4 | 4 vertices -440 140 -440 8440 -240 8440 -240 140 5 | cell pad.macro.t 6 | 4 vertices 240 18400 240 18600 23760 18600 23760 18400 7 | cell pad.macro.r 8 | 4 vertices 24480 200 24480 17800 24720 17800 24720 200 9 | cell pad.macro.b 10 | 4 vertices 240 -600 240 -400 23760 -400 23760 -600 11 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.mpth: -------------------------------------------------------------------------------- 1 | The paths: 2 | ############################################## 3 | 4 | The nets: 5 | ############################################## 6 | net 1:sr<7> xspan:340 yspan:0 length:340 numpins:2 7 | net 2:sr<6> xspan:340 yspan:0 length:340 numpins:2 8 | net 3:sr<5> xspan:340 yspan:0 length:340 numpins:2 9 | net 4:sr<4> xspan:340 yspan:0 length:340 numpins:2 10 | net 5:sr<3> xspan:340 yspan:0 length:340 numpins:2 11 | net 6:sr<2> xspan:340 yspan:0 length:340 numpins:2 12 | net 7:sr<1> xspan:340 yspan:0 length:340 numpins:2 13 | net 8:sr<0> xspan:340 yspan:0 length:340 numpins:2 14 | net 9:dp<8> xspan:340 yspan:0 length:340 numpins:2 15 | net 10:dp<7> xspan:340 yspan:0 length:340 numpins:2 16 | net 11:dp<6> xspan:340 yspan:0 length:340 numpins:2 17 | net 12:dp<5> xspan:340 yspan:0 length:340 numpins:2 18 | net 13:dp<4> xspan:340 yspan:0 length:340 numpins:2 19 | net 14:dp<3> xspan:340 yspan:0 length:340 numpins:2 20 | net 15:dp<2> xspan:340 yspan:0 length:340 numpins:2 21 | net 16:dp<1> xspan:340 yspan:0 length:340 numpins:2 22 | net 17:dp<0> xspan:340 yspan:0 length:340 numpins:2 23 | net 18:done xspan:340 yspan:0 length:340 numpins:2 24 | net 19:counter<7> xspan:340 yspan:0 length:340 numpins:2 25 | net 20:counter<6> xspan:340 yspan:0 length:340 numpins:2 26 | net 21:counter<5> xspan:340 yspan:0 length:340 numpins:2 27 | net 22:counter<4> xspan:340 yspan:0 length:340 numpins:2 28 | net 23:counter<3> xspan:340 yspan:0 length:340 numpins:2 29 | net 24:counter<2> xspan:340 yspan:0 length:340 numpins:2 30 | net 25:counter<1> xspan:340 yspan:0 length:340 numpins:2 31 | net 26:counter<0> xspan:340 yspan:0 length:340 numpins:2 32 | net 27:reset xspan:340 yspan:0 length:340 numpins:2 33 | net 28:N<8> xspan:340 yspan:0 length:340 numpins:2 34 | net 29:N<7> xspan:340 yspan:0 length:340 numpins:2 35 | net 30:N<6> xspan:340 yspan:0 length:340 numpins:2 36 | net 31:N<5> xspan:340 yspan:0 length:340 numpins:2 37 | net 32:N<4> xspan:340 yspan:0 length:340 numpins:2 38 | net 33:N<3> xspan:340 yspan:0 length:340 numpins:2 39 | net 34:N<2> xspan:340 yspan:0 length:340 numpins:2 40 | net 35:N<1> xspan:340 yspan:0 length:340 numpins:2 41 | net 36:N<0> xspan:340 yspan:0 length:340 numpins:2 42 | net 37:start xspan:340 yspan:0 length:340 numpins:2 43 | net 38:clock xspan:340 yspan:0 length:340 numpins:2 44 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.msav: -------------------------------------------------------------------------------- 1 | # uloop parameters: 2 | 0 0 0 3 | 1.000000 0.000000 4 | # window parameters: 5 | 0.000000 0.000000 0.000000 6 | # wireest parameters: 7 | 0.00000000000000000000000000000000e+00 8 | 0.00000000000000000000000000000000e+00 9 | 0.00000000000000000000000000000000e+00 10 | 0.00000000000000000000000000000000e+00 11 | 0.00000000000000000000000000000000e+00 12 | 0.00000000000000000000000000000000e+00 13 | # configuration parameters: 14 | #numcells 1 15 | 12345 16 | 17893 23857 17 | 11928 8946 18 | 7953 -7952 19 | 8947 -8946 20 | 8.38328373223791770661728062208340e-05 21 | 1.11775554686190133741284513657632e-04 22 | 1.00000000000000000000000000000000e+00 23 | 0.00000000000000000000000000000000e+00 24 | 0.00000000000000000000000000000000e+00 25 | 0.00000000000000000000000000000000e+00 26 | 1.00000000000000000000000000000000e+00 27 | 1 0 13858 9239 28 | 3 29 | 0.666667 30 | -13858 -9019 -13858 -8799 -13858 -8579 -13858 -8359 -13858 -8139 -13858 -7919 -13858 -7699 -13858 -7479 -13858 -7259 -13858 -7039 -13858 -6819 -13858 -6599 -13858 -6379 -13858 -6159 -13858 -5939 31 | -13858 -5719 -13858 -5499 -13858 -5279 -13858 -5059 -13858 -4839 -13858 -4619 -13858 -4399 -13858 -4179 -13858 -3959 -13858 -3739 -13858 -3519 -13858 -3299 -13858 -3079 -13858 -2859 -13858 -2639 32 | -13858 -2419 -13858 -2199 -13858 -1979 -13858 -1759 -13858 -1539 -13858 -1319 -13858 -1099 -13858 -879 33 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.mver: -------------------------------------------------------------------------------- 1 | total_row_length 213440 2 | actual_row_height 2000 3 | channel_separation 0 4 | min_length 4896 5 | core -240 -200 24240 18200 6 | grid 240 200 7 | num_macro 0 8 | -------------------------------------------------------------------------------- /tests/twmc/map9v3/expected/map9v3.mvio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubund/graywolf/f47937b66d4d44eafc4224f7c43d556dbf88f05b/tests/twmc/map9v3/expected/map9v3.mvio -------------------------------------------------------------------------------- /tests/twmc/map9v3/map9v3.cel: -------------------------------------------------------------------------------- 1 | ../../map9v3/map9v3.cel -------------------------------------------------------------------------------- /tests/twmc/map9v3/map9v3.par: -------------------------------------------------------------------------------- 1 | ../../map9v3/map9v3.par -------------------------------------------------------------------------------- /tests/twmc/map9v3/map9v3.stat: -------------------------------------------------------------------------------- 1 | syntax version:v1.1 date:Mon May 25 21:11:10 EDT 1992 2 | TIMESTAMP:Thu Jul 19 21:21:05 2018 3 | Statistics for map9v3: 4 | num_stdcells:215 5 | num_macros:0 6 | num_instances:0 7 | num_pads:38 8 | num_nets:228 9 | num_pins:735 10 | num_implicit_feeds:1334 11 | num_equivs:1334 12 | num_unequivs:0 13 | num_ports:38 14 | macro_area:0.000e+00 15 | tot_length:213440 16 | num_soft:1 17 | cell_height:2000 18 | tot_length:213440 19 | num_soft:1 20 | cell_height:2000 21 | tot_length:213440 22 | num_soft:1 23 | cell_height:2000 24 | -------------------------------------------------------------------------------- /tests/twmc/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCEDIR=$1 4 | BINDIR=$2 5 | TESTNAME=$3 6 | 7 | #TWDIR=${BINDIR}/micro_env ${BINDIR}/src/twflow/graywolf 8 | TMPDIR=`mktemp -d` 9 | rsync ${SOURCEDIR}/tests/twmc/${TESTNAME} ${TMPDIR}/ -a --copy-links -v 10 | 11 | 12 | pushd ${TMPDIR}/${TESTNAME} 13 | TWDIR=${BINDIR}/micro_env ${BINDIR}/micro_env/bin/TimberWolfMC -n ${TESTNAME} 14 | 15 | RET=0 16 | 17 | diff -Nau ${TESTNAME}.blk expected/${TESTNAME}.blk 18 | RETPART=$? 19 | if [ "$RETPART" != "0" ] ; then 20 | RET=-1 21 | fi 22 | 23 | diff -Nau ${TESTNAME}.gen expected/${TESTNAME}.gen 24 | RETPART=$? 25 | if [ "$RETPART" != "0" ] ; then 26 | RET=-1 27 | fi 28 | 29 | diff -Nau ${TESTNAME}.gsav expected/${TESTNAME}.gsav 30 | RETPART=$? 31 | if [ "$RETPART" != "0" ] ; then 32 | RET=-1 33 | fi 34 | 35 | diff -Nau ${TESTNAME}.mdat expected/${TESTNAME}.mdat 36 | RETPART=$? 37 | if [ "$RETPART" != "0" ] ; then 38 | RET=-1 39 | fi 40 | 41 | diff -Nau ${TESTNAME}.mgeo expected/${TESTNAME}.mgeo 42 | RETPART=$? 43 | if [ "$RETPART" != "0" ] ; then 44 | RET=-1 45 | fi 46 | 47 | diff -Nau ${TESTNAME}.mpin expected/${TESTNAME}.mpin 48 | RETPART=$? 49 | if [ "$RETPART" != "0" ] ; then 50 | RET=-1 51 | fi 52 | 53 | diff -Nau ${TESTNAME}.mpth expected/${TESTNAME}.mpth 54 | RETPART=$? 55 | if [ "$RETPART" != "0" ] ; then 56 | RET=-1 57 | fi 58 | 59 | diff -Nau ${TESTNAME}.msav expected/${TESTNAME}.msav 60 | RETPART=$? 61 | if [ "$RETPART" != "0" ] ; then 62 | RET=-1 63 | fi 64 | 65 | diff -Nau ${TESTNAME}.mver expected/${TESTNAME}.mver 66 | RETPART=$? 67 | if [ "$RETPART" != "0" ] ; then 68 | RET=-1 69 | fi 70 | 71 | diff -Nau ${TESTNAME}.mvio expected/${TESTNAME}.mvio 72 | RETPART=$? 73 | if [ "$RETPART" != "0" ] ; then 74 | RET=-1 75 | fi 76 | 77 | diff -Nau ${TESTNAME}.scel expected/${TESTNAME}.scel 78 | RETPART=$? 79 | if [ "$RETPART" != "0" ] ; then 80 | RET=-1 81 | fi 82 | 83 | if [ "$#" = "4" ] && [ "$4" == "1" ] ; then 84 | cp * ${SOURCEDIR}/tests/twmc/${TESTNAME}/expected/ 85 | touch ${SOURCEDIR}/tests/twmc/${TESTNAME}/expected/updated 86 | fi 87 | 88 | popd 89 | rm -rf ${TMPDIR} 90 | #echo ${TMPDIR} 91 | 92 | exit $RET 93 | -------------------------------------------------------------------------------- /tests/twsc/map9v3/expected: -------------------------------------------------------------------------------- 1 | ../../map9v3/expected -------------------------------------------------------------------------------- /tests/twsc/map9v3/map9v3.blk: -------------------------------------------------------------------------------- 1 | rows 9 2 | row -239 -200 24239 1800 mirror 3 | row -239 1800 24239 3800 4 | row -239 3800 24239 5800 mirror 5 | row -239 5800 24239 7800 6 | row -239 7800 24239 9800 mirror 7 | row -239 9800 24239 11800 8 | row -239 11800 24239 13800 mirror 9 | row -239 13800 24239 15800 10 | row -239 15800 24239 17800 mirror 11 | 12 | /* 13 | The Tile and Macro Information: 14 | numtiles 1 15 | -240 -200 24240 27400 16 | 17 | nummacros 0 18 | 19 | */ 20 | -------------------------------------------------------------------------------- /tests/twsc/map9v3/map9v3.cel: -------------------------------------------------------------------------------- 1 | ../../map9v3/map9v3.cel -------------------------------------------------------------------------------- /tests/twsc/map9v3/map9v3.par: -------------------------------------------------------------------------------- 1 | ../../map9v3/map9v3.par -------------------------------------------------------------------------------- /tests/twsc/map9v3/map9v3.stat: -------------------------------------------------------------------------------- 1 | syntax version:v1.1 date:Mon May 25 21:11:10 EDT 1992 2 | TIMESTAMP:Thu Jul 19 20:55:28 2018 3 | Statistics for map9v3: 4 | num_stdcells:215 5 | num_macros:0 6 | num_instances:0 7 | num_pads:38 8 | num_nets:228 9 | num_pins:735 10 | num_implicit_feeds:1334 11 | num_equivs:1334 12 | num_unequivs:0 13 | num_ports:38 14 | macro_area:0.000e+00 15 | tot_length:213440 16 | num_soft:1 17 | cell_height:2000 18 | -------------------------------------------------------------------------------- /tests/twsc/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCEDIR=$1 4 | BINDIR=$2 5 | TESTNAME=$3 6 | 7 | #TWDIR=${BINDIR}/micro_env ${BINDIR}/src/twflow/graywolf 8 | TMPDIR=`mktemp -d` 9 | rsync ${SOURCEDIR}/tests/twsc/${TESTNAME} ${TMPDIR}/ -a --copy-links -v 10 | 11 | 12 | pushd ${TMPDIR}/${TESTNAME} 13 | TWDIR=${BINDIR}/micro_env ${BINDIR}/micro_env/bin/TimberWolfSC -n ${TESTNAME} 14 | 15 | 16 | RET=0 17 | 18 | diff -Nau ${TESTNAME}.pl1 expected/${TESTNAME}.pl1 19 | RETPART=$? 20 | if [ "$RETPART" != "0" ] ; then 21 | RET=-1 22 | fi 23 | 24 | diff -Nau ${TESTNAME}.pl2 expected/${TESTNAME}.pl2 25 | RETPART=$? 26 | if [ "$RETPART" != "0" ] ; then 27 | RET=-1 28 | fi 29 | 30 | diff -Nau ${TESTNAME}.pth expected/${TESTNAME}.pth 31 | RETPART=$? 32 | if [ "$RETPART" != "0" ] ; then 33 | RET=-1 34 | fi 35 | 36 | diff -Nau ${TESTNAME}.pin expected/${TESTNAME}.pin 37 | RETPART=$? 38 | if [ "$RETPART" != "0" ] ; then 39 | RET=-1 40 | fi 41 | 42 | diff -Nau ${TESTNAME}.sav expected/${TESTNAME}.sav 43 | RETPART=$? 44 | if [ "$RETPART" != "0" ] ; then 45 | RET=-1 46 | fi 47 | 48 | echo "Just showing diff for. out:" 49 | diff -Nau ${TESTNAME}.out expected/${TESTNAME}.out 50 | 51 | 52 | if [ "$#" = "4" ] && [ "$4" == "1" ] ; then 53 | cp * ${SOURCEDIR}/tests/twsc/${TESTNAME}/expected/ 54 | touch ${SOURCEDIR}/tests/twsc/${TESTNAME}/expected/updated 55 | fi 56 | 57 | popd 58 | rm -rf ${TMPDIR} 59 | #echo ${TMPDIR} 60 | 61 | exit $RET 62 | --------------------------------------------------------------------------------