[mod.vlsi] MEG fix for illegal characters

fred@wucs.UUCP (Fred Rosenberger) (05/27/86)

The following files describe a change to MEG/PEG that improves
the error reporting for invalid characters (e. g. commas used
incorrectly as separators in MEG).

Fred

	Fred U. Rosenberger     ihnp4!wucs!fred
	CSL			(314) 362-3124
	724 S. Euclid Ave
	St. Louis, MO 63110

------------------------ cut here ----------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	README
#	statepla.meg
#	lextable-diff
# This archive created: Fri May 16 09:46:29 1986
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'README'
then
	echo shar: "will not over-write existing file 'README'"
else
cat << \SHAR_EOF > 'README'
MEG passes unrecognized characters on to the output without any
warning or error message.  This may produce an output
file which will be rejected by following programs like
eqntott.  The enclosed file statepla.meg has a couple of
commas (an easy mistake to make) and the command:
meg -e statepla.meg |eqntott -l -f
gives an error and no output.

The diffs to produce a diagnostic message on stderr are included
and with this change the above example produces an error message on
stderr and the desired output from eqntott.
The same change could be made to PEG.
SHAR_EOF
fi
if test -f 'statepla.meg'
then
	echo shar: "will not over-write existing file 'statepla.meg'"
else
cat << \SHAR_EOF > 'statepla.meg'
-- Node control state machine
-- All control signals are delayed by one cycle  and are high
-- for the following clock phases:
--    clr_cntr7   Phi2
--    clr_en      Phi1
--    clr_fren    Phi1
--    empty_shr   Phi1
--    en_shr1     Phi2
--    en_shr80    Phi2
--    load_en     Phi1
--    load_rc     Phi1
--    load_fa     Phi1
--    load_lchh   Phi1
--    load_lchl   Phi1
--    cload_flgs  Phi1
--    load_flgs   Phi1
--    sel_path    Phi1
--    set_fren    Phi1
--    set_gt      Phi1
--    set_pt      Phi1
--    stop_shr1   Phi1
--    outsel1     Both 
--    outsel2     Both 
--    load_outsel Phi1

INPUTS: pt test brdcst eq88 init;
OUTPUTS: empty_shr clr_en clr_fren set_fren set_pt load_rc
   load_fa load_lchh load_lchl en_shr1 en_shr80 load_en load_flgs cload_flgs
   postp load_outsel outsel1 outsel0 clr_cntr7 sel_path stop_shr1 set_gt;

reset on init to sync(empty_shr,clr_en,clr_fren);

-- Resync with packet time  entered on framing errors  or initialization
sync: if pt then st1(set_fren set_pt load_rc clr_cntr7)
      else LOOP;

-- Start of packet processing get header
st1: goto st2(load_fa);

st2: goto st3(load_lchh);

st3: goto st4(sel_path load_lchl);

-- enable shift registers  registers dont start until cycle 6)
st4: goto st5(en_shr1 en_shr80);

st5: goto st6;

st6: case(test brdcst)
        0 0 => wait(load_en load_outsel load_flgs postp outsel0);
        0 1 => copy7(load_en load_outsel cload_flgs postp outsel0);
        1 0 => test7(load_en load_outsel cload_flgs postp outsel0);
     endcase => ANY;

copy7: goto copy8(postp load_outsel outsel1);

copy8: goto wait(load_flgs load_outsel outsel0);

test7: goto test8(postp stop_shr1 load_outsel outsel1);

test8: goto test9;

test9: goto wait(load_flgs en_shr1 load_outsel outsel0);

-- Here we wait for the next packet time  if we get one before the correct
-- time the error lead is asserted  but we still wait to see if we get one
-- at the correct time. If we do  we go on like nothing happened  otherwise
-- we try and resync.
wait: goto waitb(set_gt);

waitb: case(eq88 pt)
         1 0 => sync(clr_fren);
         1 1 => st1(set_pt load_rc clr_cntr7);
       endcase => LOOP;
SHAR_EOF
fi
if test -f 'lextable-diff'
then
	echo shar: "will not over-write existing file 'lextable-diff'"
else
cat << \SHAR_EOF > 'lextable-diff'
RCS file: RCS/lextable,v
retrieving revision 1.1
diff  -r1.1 lextable
76a77,80
> 
> .               { fprintf(stderr,"Found an illegal character '%s', ignored\n",
>                     yytext);
>                 }
SHAR_EOF
fi
exit 0
#	End of shell archive