Chapter

Section

So far we have concentrated on a 2-step synthesis process, BOOG followed by LOON. We can try to make further improvements to the netlist speed by adding more LOON steps. A simple script like the one on the right runs LOON successively and writes the delay and LOON sequence to standard output.

The script only uses optimisation levels 0 and 1. This is because LOON can crash or lock up when inserting buffers during optimisation levels 2 or 4. The crash produces a message like:

insert_buffer: compute error
5.000000e-01!=5.000000e-01 fF
26764.666000!=26764.666000 ps
14798.554000!=14798.554000 ps

When LOON locks up, the job has to be stopped with a CTRL-C. This stops simple scripts from running and limits them to using LOON with opt levels 0 or 1.

The problem with a simple script is that it doesn't give much, if any speed improvement. For the previous three sequences which gave best critical path delays of 23881, 22522 and 23122, only the delay 23881 can be improved to 23652 by using the script on the right.

Using LOON with opt level 0 and 1 will not do anything about the rather high fanin, which is 19 for our fastest netlist.

We will develop a script which will loop LOON to find the fastest netlist using all opt levels and handling crashes and lock ups, and will at the same time reduce the fanin (normally!) to below our desired max value of 4.

#!/bin/bash
ntl=multi8_loon

MBK_TARGET_LIB=$ALLIANCE_MOS/vbe/sclib100_45
for opt1 in 1 0
do
  loon -l loon_1500_300_$opt1 $ntl $ntl$opt1 2>/dev/null | \
    egrep '^Area|^Critical' | tail -2 | sed 's/\.\.\./ /' | \
    awk -v RS=Q '{printf"#'$ntl''$opt1'    %1s %1s %1s, %1s %1s\n", $10,$11,$14,$1,$5}'
  for opt2 in 1 0
  do
    loon -l loon_1500_300_$opt2 $ntl$opt1 $ntl$opt1$opt2 2>/dev/null | \
      egrep '^Area|^Critical' | tail -2 | sed 's/\.\.\./ /' | \
      awk -v RS=Q '{printf"#'$ntl''$opt1''$opt2'   %1s %1s %1s, %1s %1s\n",\
      $10,$11,$14,$1,$5}'
    for opt3 in 1 0
    do
      loon -l loon_1500_300_$opt3 $ntl$opt1$opt2 $ntl$opt1$opt2$opt3 2>/dev/null | \
        egrep '^Area|^Critical' | tail -2 | sed 's/\.\.\./ /' | \
        awk -v RS=Q '{printf"#'$ntl''$opt1''$opt2''$opt3'  %1s %1s %1s, %1s %1s\n",\
        $10,$11,$14,$1,$5}'
      for opt4 in 1 0
      do
        loon -l loon_1500_300_$opt4 $ntl$opt1$opt2$opt3 $ntl$opt1$opt2$opt3$opt4 \
          2>/dev/null | egrep '^Area|^Critical' | tail -2 | sed 's/\.\.\./ /' | \
          awk -v RS=Q '{printf"#'$ntl''$opt1''$opt2''$opt3''$opt4' %1s %1s %1s, %1s %1s\n",\
          $10,$11,$14,$1,$5}'
      done
    done
  done
done