($Id: README,v 1.3 2017/01/23 23:47:40 stevew Exp $)

This directory provides some testing capability, based on some designs
generated with Qflow.

The Makefile provides the following targets:

There are presently two examples:
1 map9v2      A simple ~200 gate control circuit
2 openMSP430  A small microprocessor (WARNING: runs take an hour or so)

test1, test2
  This will run the map9v3 or openMSP430 example, and compare LEF and
  DEF output files to references.  Both files should match exactly for
  all supported targets (except for Windows line termination, but
  white space is ignored in the diff).

  "make test1" provides a quick but reasonably thorough test.  The
  test2 is intended to be fairly stressful and takes a long time to
  run.

run1, run2
  Run the same mrouter command as is used in the test, but don't
  redirect standard output and dont do any comparison.  This will
  perform the routing, and generate LEF and routed DEF files.

runsc1, runsc2
  Similar to the run1/2, but uses the MRouter routing script from the
  examples.  Output will be different than run1/2 but equivalent.

qrun1, qrun2
  Same as run, but assumes use of the "qrouter" program from the
  Qrouter.  You will probably have to change the path to the
  qrouter program.

  This assumes the non-Tcl version of qrouter.  To build this, you can
  hack the Makefile in Qrouter as follows:

  0.  Instead of the procedure below, try "./configure --with-tcl=no".

  1.  Install and build Qrouter.  This will create the TCL version,
      since you almost assuredly have TCL if on a Linux system.  If
      you don't have TCL, you already have qrouter so there is nothing
      to do.

  2.  Edit the Makefile, copy (duplicate) the line that starts with
      "DEFS =" near the top.  Comment out one line and edit the other,
      removing the "-DTCL_QROUTER=1" token (it might also work to set
      the 1 to 0).

  3.  Give "make clean".

  4.  Give "make qrouter".  A "qrouter" executable should result.

==============
IMPORTANT NOTE

There are presently differences in the routes generated from MRouter
and Qrouter.  These differences arise from internal differences between
MRouter and Qrouter, including
  - differences in storage and processing order of certain objects.
  - differences in floating point roundoff error handling.
  - different assumptions of the number of routing channels.
A hacked version of qrouter-1.3.57 which can avoid these issues and
produces the same output as MRouter is available upon request.
(This can match output from mrouter-1.1.1, which incorporates
qrouter-1.3.62 changes).

Also, the routed output from the mrouter program with and without the
"-q" (Qrouter compatibility) option is different.  With -q given, the
order of taps, etc.  are processed in the same order as Qrouter. 
Otherwise, and in general, MRouter will keep such objects in the same
order as read from the input file (which is reverse of Qrouter).  Only
the output with "-q" will exactly match the output from the hacked
qrouter.

Further, different releases of MRouter and Qrouter may produce
different routes, due to internal changes.

Another reason for differences is that MRouter now uses integers for
internal coordinate storage, and Qrouter uses floats/doubles.  If a
future version of Qrouter uses integers also, it should be possible to
keep output consistent.

In all of these cases, the routing output may be different, but each
is expected to be equally correct, meaning that they would pass an LVS
check.

See the "reference" directory for some examples of output DEF files.

