From hpmtlkpp.lvld.hp.com!parker@ub-gate.UB.com Wed Apr 28 08:35:59 1993 To: vlsisj!tokyo!kawakami@decwrl.dec.com, s9144653@oxford-brookes.ac.uk, Cary_Champlin@sat.mot.com, randyh@milpitas.lmc.com Subject: BSDL Parser specification Hello, Below is the BSDL Parser specification. PLEASE acknowledge receipt. Thank you, -ken parker- ------- Forwarded Message Forwarded: Tue, 13 Apr 93 07:34:04 MST Forwarded: subbarao@engrss2.unl.edu Forwarded: Tue, 23 Mar 93 08:03:54 MST Forwarded: jon@opus.com Forwarded: Mon, 15 Mar 93 08:15:55 MST Forwarded: csrim@ccs.sogang.ac.kr (ChongSuck Rim) Forwarded: Thu, 04 Mar 93 12:41:05 MST Forwarded: Rob Wadsworth Forwarded: chandra@lsil.com Forwarded: Tue, 02 Mar 93 08:21:59 MST Forwarded: JINL@vertex.com Forwarded: Fri, 26 Feb 93 12:50:49 MST Forwarded: hmotamed.ex_m2@xerox.com Forwarded: Wed, 17 Feb 93 15:09:17 MST Forwarded: duane@hpapcfla.nsr.hp.com Forwarded: Wed, 17 Feb 93 12:08:26 MST Forwarded: JNIEMI@TNCLUS.TELE.NOKIA.FI Forwarded: Thu, 04 Feb 93 12:49:45 MST Forwarded: vlsisj!stoppit!satish@uucp-gw-2.pa.dec.com (Satish Keshava) Forwarded: Fri, 29 Jan 93 06:40:25 MST Forwarded: albin@cli.com Forwarded: Fri, 22 Jan 93 07:56:08 MST Forwarded: j_brown@thoreau.nsc.com Forwarded: Tue, 12 Jan 93 10:26:56 MST Forwarded: sun0a!tamme%sican.uucp@Germany.EU.net Forwarded: Tue, 12 Jan 93 08:03:52 MST Forwarded: jason.buckley@analog.com Forwarded: Fri, 18 Dec 92 09:25:34 MST Forwarded: ABRAMOVITZ_ROBERT@Tandem.COM Forwarded: Wed, 16 Dec 92 08:07:37 MST Forwarded: WINKLER_@musx53.zfe.siemens.de Forwarded: Thu, 19 Nov 92 09:03:02 MST Forwarded: cmb@tredysvr.tredydev.unisys.com Forwarded: Wed, 11 Nov 92 07:39:48 MST Forwarded: ekearns@bbn.com Forwarded: Tue, 10 Nov 92 12:57:29 MST Forwarded: matt_boutin@vos.stratus.com Forwarded: Fri, 06 Nov 92 07:45:25 MST Forwarded: billb@merrimac.sps.mot.com Forwarded: Mon, 26 Oct 92 10:39:25 MST Forwarded: eklow_william@tandem.com Forwarded: mccurry_john@tandem.com Forwarded: Tue, 20 Oct 92 10:28:11 MDT Forwarded: michaelt@SSD.intel.com Forwarded: Thu, 15 Oct 92 10:19:04 MDT Forwarded: aran@acri.fr Forwarded: Fri, 25 Sep 92 10:36:47 MDT Forwarded: mnyin@ntu.ac.sg Forwarded: Fri, 25 Sep 92 10:30:38 MDT Forwarded: MICHNOWS@FSHVMX.VNET.IBM.COM Forwarded: Mary.Yung@Eng.Sun.COM Forwarded: Thu, 17 Sep 92 10:42:03 MDT Forwarded: EMCWONG@NTUVAX.NTU.AC.SG Forwarded: Tue, 15 Sep 92 09:11:11 MDT Forwarded: mnyin@ntuvax.ntu.ac.sg Forwarded: Mon, 14 Sep 92 10:34:02 MDT Forwarded: andre@ai.mit.edu Forwarded: EMCWONG@NTUVAX.NTU.AC.SG Forwarded: Tue, 25 Aug 92 14:50:15 MDT Forwarded: joed@hwcae.az.honeywell.com Forwarded: Tue, 18 Aug 92 12:29:48 MDT Forwarded: HEYBRUCK@CLTVM1.VNET.IBM.COM Forwarded: Mon, 27 Jul 92 10:28:54 MDT Forwarded: dch@systems.COM Forwarded: Wed, 27 May 92 16:04:51 MDT Forwarded: anupama%idtg@uunet.UU.NET Forwarded: Fri, 15 May 92 12:34:48 MDT Forwarded: stephenl@verilink.com Forwarded: Fri, 15 May 92 12:13:25 MDT Forwarded: david_wuertz@ccm.hf.intel.com Forwarded: Fri, 08 May 92 14:58:52 MDT Forwarded: hansen Forwarded: Mon, 27 Apr 92 08:43:08 MDT Forwarded: schuld@vnet.ibm.com Forwarded: Thu, 16 Apr 92 10:57:41 MST Forwarded: aflundi@somnet.sandia.gov (Nov-Alan F Lundin) Forwarded: Wed, 15 Apr 92 08:01:11 MST Forwarded: beausang Forwarded: Mon, 13 Apr 92 07:57:39 MST Forwarded: Richard L Shorter <71740.156@compuserve.com> Forwarded: Thu, 02 Apr 92 08:42:55 MST Forwarded: dinya@wega.uni-duisburg.de Forwarded: Thu, 26 Mar 92 07:39:00 MST Forwarded: sneal@scdt.intel.com Forwarded: Tue, 24 Mar 92 09:07:25 MST Forwarded: bdk@ts.ffv.se Forwarded: Mon, 02 Mar 92 13:50:36 MST Forwarded: ami@hp-mpg.an.hp.com Forwarded: Mon, 02 Mar 92 07:53:48 MST Forwarded: muroi@mela.com Forwarded: Wed, 26 Feb 92 08:02:01 MST Forwarded: peterk@carrol.enet.dec.com Forwarded: Thu, 20 Feb 92 11:41:40 MST Forwarded: cjclark%extest@uunet.uu.net Forwarded: Fri, 07 Feb 92 12:18:26 MST Forwarded: YOUNGSJL@GDLVM6.VNET.IBM.COM Forwarded: Thu, 06 Feb 92 07:43:17 MST Forwarded: kornegay@zabriskie.berkeley.edu Forwarded: Fri, 24 Jan 92 12:44:45 MST Forwarded: 76424.2257@compuserve.com Forwarded: Fri, 24 Jan 92 12:43:03 MST Forwarded: 76424.2257@compuserve.com Forwarded: Fri, 24 Jan 92 12:39:26 MST Forwarded: 76424.2257@compuserve.com Forwarded: Fri, 24 Jan 92 12:26:24 MST Forwarded: 76424.2257@compuserve.com Forwarded: Thu, 23 Jan 92 07:38:33 MST Forwarded: rwp@fc.hp.com Forwarded: Wed, 22 Jan 92 13:07:38 MST Forwarded: carballo@etsii.upcan.es Forwarded: Mon, 13 Jan 92 08:11:27 MST Forwarded: neely@maxwell.hrl.hac.com Forwarded: Thu, 02 Jan 92 13:01:10 MST Forwarded: upton@zip.eecs.umich.edu Forwarded: Thu, 02 Jan 92 10:22:45 MST Forwarded: may@convex.com Forwarded: Thu, 02 Jan 92 08:14:46 MST Forwarded: figley@sue.sps.mot.com Forwarded: Sat, 28 Dec 91 09:12:35 MST Forwarded: sun!zycad!ssie!dch Forwarded: Wed, 18 Dec 91 08:24:10 MST Forwarded: scan%r4sun2.ccl.itri.org.tw@CUNYVM.CUNY.EDU (R220|H/W chip tester|MDE|Long-Der Chen) Forwarded: Wed, 18 Dec 91 08:16:44 MST Forwarded: crossck!spud!joseph@uunet.UU.NET Forwarded: Mon, 16 Dec 91 15:57:38 MST Forwarded: ngocanh@sun.com Forwarded: fnguyen@berlioz.nsc.com Forwarded: Vincent_Lopopolo@hp0200.desk.hp.com Forwarded: uunet!crossck!joseph Forwarded: Mon, 16 Dec 91 08:01:37 MST Forwarded: anderson@julio.sanders.lockheed.com Forwarded: Fri, 06 Dec 91 14:58:59 MST Forwarded: 4898278@mcimail.com Forwarded: Fri, 06 Dec 91 12:42:59 MST Forwarded: kutner@sfc.sony.com Forwarded: Thu, 05 Dec 91 07:21:43 MST Forwarded: Harry_Whittemore@DGC.ceo.dg.com Forwarded: Fri, 22 Nov 91 10:26:12 MST Forwarded: mcroft@esg.MENTOR.COM Forwarded: Fri, 15 Nov 91 16:25:09 MST Forwarded: P.J.Dickinson@ecs.southampton.ac.uk Forwarded: Fri, 15 Nov 91 07:44:34 MST Forwarded: PAULSON5%ecc6.DNET@esu36.cfsat.honeywell.com Forwarded: Wed, 13 Nov 91 10:39:58 MST Forwarded: bsdl@hpmtlx Forwarded: Thu, 07 Nov 91 12:19:24 MST Forwarded: rvutukur@uceng.uc.edu Forwarded: jerry@tmi.com Forwarded: Wed, 06 Nov 91 07:54:56 MST Forwarded: shou@asd.sgi.com Forwarded: Tue, 05 Nov 91 10:54:29 MST Forwarded: rich@boogie.EBay.Sun.COM Forwarded: Fri, 01 Nov 91 13:43:35 MST Forwarded: rbsmith@sandia.gov Forwarded: Thu, 24 Oct 91 11:17:49 MDT Forwarded: scitex@dcd3sx.das.net Forwarded: Thu, 17 Oct 91 13:34:08 MDT Forwarded: skip@hpupazh Forwarded: Fri, 04 Oct 91 15:39:07 MDT Forwarded: hplabs!hplms2!lsuc!motto!Stan_Jelavic Forwarded: Thu, 03 Oct 91 08:11:54 MDT Forwarded: rogel@ukfca3.sinet.slb.com Forwarded: rich%simquest@mips.com Forwarded: hplabs!hplms2!lsuc!motto!Stan_Jelavic Forwarded: Fri, 27 Sep 91 12:33:25 MDT Forwarded: brianmck@bnr.ca Forwarded: Fri, 27 Sep 91 09:21:11 MDT Forwarded: wang@shasta.stanford.edu Forwarded: Wed, 25 Sep 91 09:00:15 MDT Forwarded: IVINSKIS@BOEVM4.VNET.IBM.COM Forwarded: Thu, 19 Sep 91 15:11:43 MDT Forwarded: leppa@steks.oulu.fi Forwarded: Mon, 16 Sep 91 07:35:22 MDT Forwarded: magyar@cadence.com Forwarded: kenny@sfd1.ed.fujitsu.co.jp Forwarded: Thu, 12 Sep 91 07:42:32 MDT Forwarded: oostdijk@prl.philips.nl Forwarded: Mon, 09 Sep 91 07:42:22 MDT Forwarded: blythe@banshee.asd.sgi.com Forwarded: B645ZIT%UTARLG.UTA.EDU@RICEVM1.RICE.EDU Forwarded: Fri, 06 Sep 91 07:45:22 MDT Forwarded: erma@leland.asd.sgi.com Forwarded: danac@morc.asd.sgi.com Forwarded: Mon, 02 Sep 91 12:34:12 MDT Forwarded: hatcher@asd470.dseg.ti.com Forwarded: Fri, 30 Aug 91 09:23:52 MDT Forwarded: tecnost@oliveb.ATC.Olivetti.Com Forwarded: Thu, 29 Aug 91 12:08:41 MDT Forwarded: gloster@mcnc.org Forwarded: fdale@s30.csrd.uiuc.edu Forwarded: allen_d._heiden@mcimail.com Forwarded: Mon, 19 Aug 91 12:08:31 MDT Forwarded: ais@sloth.Eng.Sun.COM Forwarded: simond@eucad.co.uk Forwarded: Fri, 16 Aug 91 07:53:55 MDT Forwarded: mdonahue@kodak.com Forwarded: Fri, 09 Aug 91 13:32:19 MDT Forwarded: ray@su59d.ess.harris.com Forwarded: Thu, 08 Aug 91 08:58:09 MDT Forwarded: vincent@hpgnd11.grenoble.hp.com Forwarded: Tue, 30 Jul 91 12:21:42 MDT Forwarded: jwhite@hplred.hpl.hp.com Forwarded: beck@icsib.Berkeley.EDU Forwarded: Mon, 29 Jul 91 07:37:49 MDT Forwarded: huangd@eecs.ee.pdx.edu Forwarded: Thu, 25 Jul 91 11:46:41 MDT Forwarded: portman@key.com Forwarded: Wed, 24 Jul 91 16:15:20 MDT Forwarded: GARDNER_DAVID_E@LILLY.COM Forwarded: Mon, 22 Jul 91 14:36:04 MDT Forwarded: carlson@mrx.webo.dg.com Forwarded: epp@hpapcfla Forwarded: Thu, 18 Jul 91 09:54:20 MDT Forwarded: berny@tcs.com Forwarded: Wed, 17 Jul 91 12:12:59 MDT Forwarded: ktl@valid.com Forwarded: Wed, 17 Jul 91 07:57:37 MDT Forwarded: brian_dalio@mentorg.com Forwarded: spatil@pcocd2.intel.com Forwarded: Fri, 12 Jul 91 07:25:28 MDT Forwarded: dbg@slacvm.slac.stanford.edu Forwarded: fredrik@ericad.ericsson.se Forwarded: Wed, 10 Jul 91 16:45:56 MDT Forwarded: gsam@SSD.intel.com Forwarded: Mon, 08 Jul 91 07:58:00 MDT Forwarded: sgokuln3@ua1vm.ua.edu Forwarded: Tue, 02 Jul 91 10:40:49 MDT Forwarded: tecnost@oliveb.ATC.Olivetti.Com Forwarded: Fri, 28 Jun 91 10:41:49 MDT Forwarded: abdul@isc.intel.com Forwarded: Wed, 26 Jun 91 12:04:38 MDT Forwarded: spatil@fws131.intel.com Forwarded: Mon, 17 Jun 91 08:15:25 MDT Forwarded: daved@hpaeca.hp.com Forwarded: Thu, 13 Jun 91 07:36:30 MDT Forwarded: duck@elrond.calcomp.com Forwarded: Thu, 13 Jun 91 07:26:34 MDT Forwarded: ejt@s1.gov Forwarded: Wed, 12 Jun 91 15:00:32 MDT Forwarded: tedm@hp-pcd.cv.hp.com Forwarded: Wed, 12 Jun 91 12:20:37 MDT Forwarded: hplabs!kpc!uunet!ranier.pilchuck.Data-IO.COM!jackj Forwarded: Fri, 07 Jun 91 07:40:07 MDT Forwarded: "flint_andrew"@dneast.enet.dec.com Forwarded: Thu, 06 Jun 91 12:12:43 MDT Forwarded: bnados@bnr.ca Forwarded: Fri, 31 May 91 07:37:43 MDT Forwarded: eleqpaf@hatfield.ac.uk Forwarded: Wed, 29 May 91 07:46:07 MDT Forwarded: OSSEIRAN@elde.epfl.ch Forwarded: scott@s3dub.ie Forwarded: LJIN@SCUACC.SCU.EDU Forwarded: Tue, 21 May 91 09:03:56 MDT Forwarded: tellier@carrol.enet.dec.com Forwarded: Mon, 20 May 91 07:55:56 MDT Forwarded: bulent@MasPar.COM Forwarded: Thu, 09 May 91 11:42:02 MDT Forwarded: root@artic.portal.com Forwarded: Tue, 07 May 91 09:05:13 MDT Forwarded: wdb%vhdl@uunet.uu.net Forwarded: Tue, 07 May 91 08:50:59 MDT Forwarded: serigate@phcoms.seri.philips.nl Forwarded: Mon, 06 May 91 16:09:01 MDT Forwarded: agarwal@pike.ee.mcgill.ca Forwarded: kleckner!kleckner Forwarded: Fri, 26 Apr 91 14:53:53 MDT Forwarded: matsu%nttica@ntt.jp Forwarded: Thu, 25 Apr 91 09:17:52 MDT Forwarded: phil@castle.edinburgh.ac.uk Forwarded: Wed, 24 Apr 91 14:49:11 MDT Forwarded: rees@tess.sps.mot.com Forwarded: Wed, 24 Apr 91 11:36:40 MDT Forwarded: rsk@cadr.amis.com Forwarded: kma@cadr.amis.com Forwarded: Wed, 24 Apr 91 10:49:45 MDT Forwarded: mercer@cerc.utexas.edu Forwarded: Wed, 24 Apr 91 07:51:39 MDT Forwarded: lechner@cs.ulowell.edu Forwarded: Mon, 22 Apr 91 14:14:42 MDT Forwarded: meier@eeserv.ee.umanitoba.ca Forwarded: Fri, 19 Apr 91 12:30:51 MDT Forwarded: hans@hpbbsqb1 Forwarded: Bill_I_Van_Dick@ccm.hf.intel.com Forwarded: schapski@cup.portal.com Forwarded: Tue, 16 Apr 91 07:49:57 MDT Forwarded: zopf@encore.com Forwarded: bjorn.b.larsen@delab.sintef.no Forwarded: mipy@hpbbmof.bbn.hp.com Forwarded: Fri, 05 Apr 91 15:34:36 MST Forwarded: hackney@compaq.com Forwarded: Tue, 02 Apr 91 07:33:11 MST Forwarded: ELRIESSEN%UTWENTE.NL@CUNYVM.CUNY.EDU Forwarded: Mon, 01 Apr 91 07:49:38 MST Forwarded: cpiercy@nswc-wo.navy.mil Forwarded: f_hludik@unhh.unh.edu Forwarded: Mon, 25 Mar 91 12:05:54 MST Forwarded: oreilly@hpcvcbc Forwarded: Mon, 25 Mar 91 07:58:26 MST Forwarded: lechner@ulowell.edu Forwarded: athan@felix.cmd.usf.edu Forwarded: Fri, 22 Mar 91 11:52:57 MST Forwarded: cbm@elctr.dk Forwarded: Tue, 19 Mar 91 07:47:34 MST Forwarded: ledbetter@mcc.com Forwarded: Tue, 19 Mar 91 07:45:09 MST Forwarded: warren%ssdunx.mdc.com@tines.mdc.com Forwarded: Fri, 15 Mar 91 07:47:36 MST Forwarded: reger@sgi.com Forwarded: Thu, 14 Mar 91 08:20:45 MST Forwarded: gil%hpsadpe@hp-sde.hp.com Forwarded: vlsisj!egret!kawakami%tokyo.decnet@decwrl.dec.com Forwarded: Wed, 13 Mar 91 07:46:55 MST Forwarded: melka@ast.dsd.northrop.com Forwarded: Tue, 12 Mar 91 08:29:37 MST Forwarded: finnerty@ecadsr.enet.dec.com Forwarded: Tue, 12 Mar 91 07:33:58 MST Forwarded: LESTER.R@AppleLink.APPLE.com Forwarded: Mon, 11 Mar 91 13:08:42 MST Forwarded: patf@nchip.portal.COM Forwarded: Mon, 11 Mar 91 08:22:59 MST Forwarded: gleonell@bbn.com Forwarded: Mon, 11 Mar 91 07:35:58 MST Forwarded: strat@ast.dsd.northrop.com Forwarded: howard%tcville@hac2arpa.hac.com Forwarded: Fri, 08 Mar 91 07:52:10 MST Forwarded: mnguyen%tcville@hac2arpa.HAC.com Forwarded: Thu, 07 Mar 91 07:53:18 MST Forwarded: cfc@homxa.att.com Forwarded: Wed, 06 Mar 91 13:21:47 MST Forwarded: mmas@sh.alcbel.be Forwarded: Tue, 05 Mar 91 07:40:00 MST Forwarded: dajrun@flip.sp.unisys.com Forwarded: Mon, 04 Mar 91 07:56:58 MST Forwarded: blight@eeserv.ee.umanitoba.ca Forwarded: hplabs!pyramid!daisy!ronen Forwarded: Fri, 01 Mar 91 16:29:14 MST Forwarded: cho@cmc.ca Forwarded: Bob_Beckwith@NeXT.COM Forwarded: chiejin@dalek.mips.com Forwarded: jai@berlioz.nsc.com Forwarded: heilper%TECHUNIX.BITNET@CUNYVM.CUNY.EDU Forwarded: Mon, 25 Feb 91 11:52:23 MST Forwarded: rdp@apple.com Forwarded: Mon, 25 Feb 91 08:09:12 MST Forwarded: torben@foralie.ics.Hawaii.Edu Forwarded: Fri, 22 Feb 91 14:08:54 MST Forwarded: shui%fs1@lsil.com Forwarded: Fri, 22 Feb 91 12:04:42 MST Forwarded: kahrs@elbereth.rutgers.edu Forwarded: Fri, 22 Feb 91 08:05:57 MST Forwarded: carpent@src.honeywell.com Forwarded: buechner@mikroelektronik.uni-stuttgart.dbp.de Forwarded: Thu, 21 Feb 91 12:27:42 MST Forwarded: chang@Synopsys.COM Forwarded: huangd@eecs.ee.pdx.edu Forwarded: carlos@wateol.waterloo.edu Forwarded: crc@synopsys.com Forwarded: Thu, 21 Feb 91 10:27:46 MST Forwarded: sun!sunburn!sicom!twaites Forwarded: Thu, 21 Feb 91 09:56:09 MST Forwarded: paul@mozart.amd.com Forwarded: sondeen@Cheeta.ISI.Edu Forwarded: Thu, 21 Feb 91 09:08:23 MST Forwarded: halliday Forwarded: Thu, 21 Feb 91 07:32:40 MST Forwarded: 4576473@mcimail.com Forwarded: Wed, 20 Feb 91 13:15:26 MST Forwarded: ron@chopin.udel.edu Forwarded: klaus@sequent.sequent.com Forwarded: nmause@uceng.UC.EDU Forwarded: GI=Adam%IN=D%TI@mcimail.com Forwarded: hqm@ai.mit.edu Forwarded: Wed, 20 Feb 91 07:56:02 MST Forwarded: sllu@mosis.edu Forwarded: roberty@Eng.Sun.Com Forwarded: chuang@balboa.eng.uci.edu Forwarded: frank@sigproc.ee.imperial.ac.uk Forwarded: black@mpd.tandem.com Forwarded: smz@tove.cs.umd.edu Forwarded: Tue, 19 Feb 91 16:06:36 MST Forwarded: jlacoss@venera.isi.edu Forwarded: wenjay@pacific.usc.edu Forwarded: poras@utdallas.edu Forwarded: Tue, 19 Feb 91 12:56:57 MST Forwarded: tedd_corman@viewlogic.com Forwarded: Tue, 19 Feb 91 12:53:29 MST Forwarded: cah@wancom.Columbia.NCR.COM Forwarded: Tue, 19 Feb 91 08:03:17 MST Forwarded: ragnar@cadence.com Forwarded: Fri, 15 Feb 91 11:52:41 MST Forwarded: uunet!bulus3!haugen Forwarded: Fri, 15 Feb 91 07:57:08 MST Forwarded: stevep@Sun.COM Forwarded: uunet!smosjc!yoichi Forwarded: hplabs!nsc!berlioz.nsc.com!carl Forwarded: Wed, 13 Feb 91 07:43:47 MST Forwarded: yoichi@smosjc.com Forwarded: Tue, 12 Feb 91 10:38:20 MST Forwarded: ck_ee962@unhh.unh.edu Forwarded: hplabs!teda!talking-heads!prab Forwarded: Mon, 11 Feb 91 14:39:20 MST Forwarded: wald@dover.sps.mot.com Forwarded: Mon, 11 Feb 91 08:43:47 MST Forwarded: prinetto@polpp.to.cnr.it Forwarded: Fri, 08 Feb 91 08:26:47 MST Forwarded: hplabs!hp-pcd.cv.hp.com!hpupora.nsr.hp.com!tessi!loop!keithl Forwarded: Thu, 07 Feb 91 14:29:29 MST Forwarded: billp@stardent.COM Forwarded: Thu, 07 Feb 91 08:19:12 MST Forwarded: fnovak@ijs.ac.mail.yu Forwarded: Wed, 06 Feb 91 15:10:49 MST Forwarded: QUINN@MEMORY.ENET.DEC.COM Forwarded: Wed, 06 Feb 91 08:31:44 MST Forwarded: dolan@est.enet.dec.com Forwarded: Tue, 05 Feb 91 08:00:56 MST Forwarded: reader@gec-mi-at.co.uk Forwarded: DebanyW@misvx2.radc.af.mil Forwarded: Mon, 04 Feb 91 08:22:36 MST Forwarded: brad@adc.nsc.com Forwarded: Sat, 26 Jan 91 09:21:34 MST Forwarded: BARRYTE@CASPER.DNET.HAC.COM Forwarded: Fri, 25 Jan 91 16:23:37 MST Forwarded: koleary@kosys.prime.com Forwarded: cihan@sj.ate.slb.com Forwarded: Fri, 25 Jan 91 09:00:28 MST Forwarded: kwan@sj.ate.slb.com Forwarded: Thu, 24 Jan 91 12:44:56 MST Forwarded: psullivan@mcc.com Forwarded: dsha@vtvm1.bitnet Forwarded: att!blinder@whamt Forwarded: Tue, 22 Jan 91 08:16:31 MST Forwarded: DSHA@VTVM1.CC.VT.EDU Forwarded: Mon, 21 Jan 91 13:30:44 MST Forwarded: bonzanigo@nimbus.ethz.ch Forwarded: Thu, 17 Jan 91 14:30:07 MST Forwarded: etxfest@sta.ericsson.se Forwarded: Wed, 16 Jan 91 09:23:22 MST Forwarded: jay@sj.ate.slb.com Forwarded: gsp@mlb.semi.harris.com Forwarded: Thu, 10 Jan 91 16:18:48 MST Forwarded: randy@sv001.sandiego.ncr.com Forwarded: Wed, 09 Jan 91 15:07:49 MST Forwarded: Robert_Dobbs@hpd500.desk.hp.com Forwarded: Mon, 07 Jan 91 07:56:44 MST Forwarded: taneli.peltonen@rc.nokia.fi Forwarded: nfoskett%sfo@adl.austek.oz.au Forwarded: Mon, 07 Jan 91 07:43:04 MST Forwarded: regis@atarax.imag.fr Forwarded: Fri, 04 Jan 91 10:27:11 MST Forwarded: gibbons@jeep.dsg.honeywell.com Forwarded: Thu, 03 Jan 91 16:08:12 MST Forwarded: kretchma@hac2arpa.hac.com Forwarded: Wed, 02 Jan 91 09:13:09 MST Forwarded: ah739%cleveland.Freenet.Edu Forwarded: Fri, 21 Dec 90 08:09:37 MST Forwarded: marcl@Eng.Sun.COM Forwarded: Thu, 20 Dec 90 14:05:56 MST Forwarded: vlsisj!firefox!kenv@decwrl.dec.com Forwarded: Mon, 17 Dec 90 08:37:50 MST Forwarded: suntan!sunnmex!zaphod!john@Sun.COM Forwarded: Fri, 14 Dec 90 07:50:31 MST Forwarded: WANKE@HAL.dnet.hac.com Forwarded: Tue, 11 Dec 90 08:18:04 MST Forwarded: SMOURAD%SCU.BITNET@CUNYVM.CUNY.EDU Forwarded: tom@mew.mei.co.jp Forwarded: Wed, 05 Dec 90 09:25:40 MST Forwarded: lujk@chips.com Forwarded: mskip@sei.com Forwarded: gchen@certes.EBay.Sun.COM Forwarded: dinh@xanadu.key.com Forwarded: daniel@skaldn.ti.com Forwarded: tom@pyrthoth.pyramid.com Forwarded: Fri, 30 Nov 90 11:58:01 MST Forwarded: wrc@sv001.sandiego.ncr.com Forwarded: Fri, 30 Nov 90 08:13:36 MST Forwarded: peter@sgi.sgi.com Forwarded: timw@brahms.AMD.COM Forwarded: Thu, 29 Nov 90 07:53:34 MST Forwarded: allen@earl.xpoint.com Forwarded: Wed, 28 Nov 90 11:47:25 MST Forwarded: schuld@ccpvm1.iinus1.ibm.com Forwarded: Wed, 28 Nov 90 11:44:20 MST Forwarded: burdick@CRD.GE.COM Forwarded: Tue, 27 Nov 90 10:34:33 MST Forwarded: MORRISL%NET.a1@atc.boeing.com Forwarded: Tue, 27 Nov 90 07:54:58 MST Forwarded: daum@zeppo.crd.ge.com Forwarded: Mon, 26 Nov 90 08:18:27 MST Forwarded: pharrod@acorn.co.uk Forwarded: Fri, 16 Nov 90 09:09:20 MST Forwarded: haberl@ira.uka.de Forwarded: Fri, 16 Nov 90 09:06:18 MST Forwarded: pierre@Synopsys.COM Forwarded: Wed, 14 Nov 90 13:59:07 MST Forwarded: Tektronix!ogicse!LAUTO!davidh Forwarded: Tue, 13 Nov 90 14:44:37 MST Forwarded: Dean.Vendl@FtCollins.NCR.com Forwarded: Tue, 13 Nov 90 07:52:12 MST Forwarded: jangers@pluton.matrox.com Forwarded: Fri, 09 Nov 90 09:34:20 MST Forwarded: Sanjay_Bajaj@NeXT.COM Forwarded: Wed, 31 Oct 90 08:34:30 MST Forwarded: LBUG@KSUVM.KSU.EDU Forwarded: Wed, 31 Oct 90 08:33:17 MST Forwarded: gaulandm@tekigm2.men.tek.com Forwarded: Mon, 29 Oct 90 11:59:11 MST Forwarded: hansford@cheeta.isi.edu Forwarded: Wed, 24 Oct 90 07:49:17 MDT Forwarded: srimani@webber.CS.ColoState.Edu Forwarded: Tue, 23 Oct 90 10:09:43 MDT Forwarded: lien@usc.edu Forwarded: Tue, 23 Oct 90 07:49:51 MDT Forwarded: dmr@rti.rti.org Forwarded: Mon, 22 Oct 90 07:52:09 MDT Forwarded: verhelst@apolloway.prl.philips.nl Forwarded: Fri, 19 Oct 90 07:57:19 MDT Forwarded: jcf%inescn.ctt.pt@cunyvm.cuny.edu Forwarded: ricchetti@apollo.HP.COM Forwarded: Mon, 15 Oct 90 15:13:14 MDT Forwarded: wbaker@comet.berkeley.edu Forwarded: Fri, 12 Oct 90 14:12:24 MDT Forwarded: hplabs!VALID!rma Forwarded: Thu, 11 Oct 90 12:24:16 MDT Forwarded: dag@space.MIT.edu Forwarded: Thu, 11 Oct 90 12:19:59 MDT Forwarded: willm@dad.MENTOR.com Forwarded: Wed, 10 Oct 90 07:50:24 MDT Forwarded: hplabs!hpubvwa.nsr.hp.com!sherpa2!rvandera Forwarded: Tue, 09 Oct 90 15:25:04 MDT Forwarded: Tektronix!ogicse!lauto!bobj Forwarded: Tue, 09 Oct 90 08:31:25 MDT Forwarded: cotton@thumper.bellcore.com Forwarded: Mon, 08 Oct 90 12:28:07 MDT Forwarded: ais@sloth.sun.com Forwarded: Mon, 08 Oct 90 11:03:01 MDT Forwarded: arment@1drlnd.enet.dec.com Forwarded: Mon, 08 Oct 90 07:44:56 MDT Forwarded: kornegay@zion.berkeley.EDU Forwarded: Fri, 05 Oct 90 09:43:01 MDT Forwarded: halliday Forwarded: Fri, 05 Oct 90 08:07:13 MDT Forwarded: edward@Synopsys.COM To: cwy@ohm.att.com, jarwala@ohm.att.com, james@ohm.att.com, cmm@r8d.british-telecom.co.uk, ret@ohm.att.com, gdr@genrad.com, hplabs!teda!EUROPA.DNET!HANSEN, hai, harwood, B.Caldwell@Wichita.NCR.COM, kdw@IBM.com, Tom.Langford@Wichita.NCR.COM, kevins@pdx.MENTOR.COM, Tektronix!ogicse!lauto!billl, muris@nlccl.cft.philips.nl, dejong1@nlcll.cft.philips.nl, fbeenker@apolloway.prl.philips.nl, segers@nlccl.cft.philips.nl, rsbg20@max.sps.mot.com, zak@Think.Com, warreall@ccm.hf.INTEL.com, peter_maxwell@hplabs, bulent@APOLLO.HP.COM, oakhill!nemesis!billb@cs.utexas.edu, gerousis@chdasic.sps.mot.com, absher@uvm.edu, jaa@ece.utexas.edu, ejm@shasta.stanford.edu, avra@shasta.stanford.edu, wang@shasta.stanford.edu, ronw@virginia.edu, fuchs@bach.csg.uiuc.edu, arabian@hazel.enet.dec.com, waf@hp-lsd.cos.hp.com, arment%comet@decwrl.dec.com, jalee@mipos2.intel.com, carina@apple.com, pvs@apple.com, martin@apple.com, metet%dhvrrzn1.bitnet@hplabs, maeda, doerr, va@research.att.com, bear@tcs.com, harry@cadence.com, hplabs!pyramid!abekas!bruce, uunet!clsi!Frank, chi@hplchi.hpl.hp.com, fthomas@x102c.ess.harris.com, hermix!sywong@anes.ucla.edu, myazdani@hpesoz4.cup.hp.com, sunatori@bnr.ca, gps@apple.com, mstevens@orca.WV.TEK.COM, john%spc.dnet@gpo.nsc.com, thomas@hazel.enet.dec.com, 72467.2723@compuserve.com cc: bsdl@hpmtlx Subject: BSDL Version 0.0 Parser Specifications Date: Thu, 04 Oct 90 16:22:43 MDT From: parker@hpmtlkpp Hello All, This is this first mailing of the BSDL* Version 0.0 parser specifications we are sending to people who request it from our publicized E-Mail address; bsdl%hpmtlx@hplabs.HP.com You are free to redistribute this at will, but we feel that it would be better if respondents asked for it directly so that their addresses can be entered into our list for future mailings and updates. It would be helpful if you could confirm receipt of this transmission. We also would be very interested to hear about your experiences with this information and what you are planning to do with BSDL. Regards, Ken Parker Hewlett-Packard Company *Boundary-Scan Description Language - as documented in: "A Language for Describing Boundary-Scan Devices", K.P. Parker and S. Oresjo, Proceedings 1990 International Test Conference, Washington DC, pp 222-234 - -----------------cut here--------------------------------------------------- 901004.0721 Hewlett-Packard Company 901016.1049 Manufacturing Test Division P.O. Box 301 Loveland, Colorado 80537 USA October 1990 Hello BSDL Parser Requestor, This Electronic Mail reply contains the computer specifications for Hewlett-Packard's Version 0.0 BSDL parser. This section of the reply explains the contents of the rest of this file. This file is composed of seven (7) parts: 1) How to use this file 2) UNIX* Lex source (lexicographical tokenizing rules) 3) UNIX* Yacc source (BNF-like syntax description) 4) A sample main program to recognize BSDL. 5) A BSDL description of the Texas Instruments 74bct8374 that is recognized by the parser, for testing purposes. 6) The VHDL package STD_1149_1_1990 needed by this parser. 7) [added 901016] Porting experiences to other systems. RECOMMENDATION: Save a copy of this file in archival storage before processing it via the instructions below. This will allow you to recover from errors, and allow you to compare subsequently released data for changes. DISCLAIMERS: 1. The IEEE 1149.1 Working Group has not endorsed BSDL Version 0.0 and therefore no person may represent it as an IEEE standard or imply that a resulting IEEE standard will be identical to it. 2. The IEEE 1149.1 Working Group recognizes that BSDL Version 0.0 is a well-conceived initiative that is likely to excelerate the creation of tools that support the 1149.1 standard. As such, changes and enhancements will be carefully considered so as not to needlessly disrupt these development efforts. The overriding goal is the ultimate success of the 1149.1 standard. LEGAL NOTICES: Hewlett-Packard Company makes no warranty of any kind with regard to this information, including, but not limited to, the implied waranties of merchantability and fitness for a particular purpose. Hewlett-Packard Company shall not be liable for errors contained herein or direct, indirect, special, incidental, or consequential damages in connection with the furnishing, performance, or use of this material. *UNIX is a trademark of AT&T in the USA and other countries. - ----Part 1----How to use this file---------Cut Here------------------- Later sections of this file contain the specifications of a syntax recognizer for Version 0.0 BSDL, as implemented by Hewlett-Packard Co. There are three scenarios how one might use this information to produce a BSDL based tool. Scenario 1: In a Standard UNIX environment. In a standard UNIX environment, cut out the lex and yacc sources given below and process them with lex and yacc respectively. The lex program writes a 'C' program that gathers characters from the input stream and collects them into recognized 'tokens'. Examples of tokens are: attribute := Instruction_Length This code is a subroutine called by the main parsing subroutine created by yacc (see next). This code is 'included' by the code produced by yacc. The tokens are all converted to uppercase characters on input to simplify the specification. The original source is free-field and case-insensitive. The 'C' code produced by yacc is a parsing subroutine. As provided below, this code will execute on an input file opened by a 'Main' program you write (see sample in part 4) and determine whether the file contains valid BSDL, or report syntax errors. To develop a tool using this parser, you must add your own semantic processing routines written in 'C'. These are added to the yacc source. When the parser recognizes a token, any code specified at that point (by you) is executed. Consider the simple example: the yacc code below contains the recognizer for the 'entity statement' that looks like this. Begin_BSDL : ENTITY IDENTIFIER IS | error {Print_Error("Improper Entity declaration"); Print_Error("Check if source file is BSDL"); YYABORT; /* Probably not a BSDL source file */ } ; A code segment to store the entity name away can be added as follows: Begin_BSDL : ENTITY IDENTIFIER {strcpy(Entity_Name, (char *)$2); /* save name */} IS | error {Print_Error("Improper Entity declaration"); Print_Error("Check if source file is BSDL"); YYABORT; /* Probably not a BSDL source file */ } ; The manuals for yacc and lex contain more detail. You will have to make additions to the yacc source like the one shown above to support your application. You should not have to change the lex source at all, unless it is to change a table size specification. Note, no changes should be made to the basic recognition process; just add semantic processing routines. Scenario 2: A non-UNIX environment. If your target computer system supports a 'C' compiler, then your problem is to produce 'C' from the lex and yacc sources below. The easiest way is to find another system that does have a lex and yacc program. Process the files as in scenario 1 above. Then port the 'C' code to the target machine. (see the suggested support channel below) Scenario 3: You have a VHDL tool. If you have a VHDL tool, you can process the sample BSDL and package given in parts 5 and 6 immediately. You may have to enter them into the VHDL design data base in a way unique to the VHDL implementation you have. Having done this, you still need to create your application tool. General VHDL systems (that is, not dedicated to a narrow application) give you the capability to programmatically access data from their data-bases, and to add application code to support your new tools. You will notice that BSDL has some Boundary-Scan data incorporated into VHDL strings. As such, you need to write application code (in 'C' or whatever the VHDL system offers) that extracts and processes the data from these strings. This is like writing a 'mini-parser'. To do this, you only need to implement a parsing routine for the content of the string, since the VHDL environment has already parsed the VHDL. In the yacc code below, find the production rule for 'BSDL_Map_String' as an example. This rule and all it references are the complete specification for the contents of a pin_map_string in BSDL. The yacc supplied below contains a complete specification for parsing all the VHDL strings of BSDL. It is possible that you will desire support for porting BSDL to your particular computer system or environment. Hewlett-Packard is not offering anything more than the specifications of the BSDL language, but is recommending that requests for porting assistance be made to: Logic Automation Incorporated attention: Bob Johnson 19500 NW Gibbs Drive phone 503-690-6900 PO Box 310 Beaverton, Oregon 97075 Forward compatible changes to BSDL since June of 1990: The IEEE 1149.1 working group is working on some proposed additions to the Boundary-Scan standard. Those that are very likely to occur are reflected in this parser. They are the 'instruction_disable' and 'instruction_guard' attribute. The disabling attribute is covered in the ITC BSDL paper. The guard attribute is newer; it identifies an instruction that enables the Boundary Register to control all device outputs with the data it contains, while leaving the Bypass Register between TDI and TDO. This is likened to a 'digital guarding' capability where an IC can be set up to control board level signals while otherwise not participating in a test. By examining the Yacc source you can see that the 'instruction_usage' attribute is recognized but the content of the usage string is not parsed. There is also a new attribute called 'instruction_sequence' which is recognized but with no specification given for its string content. This area of the BSDL language is set up to describe instruction behavior and how sequences of instructions are used to implement test algorithms. This is of specific interest in automating access to private Built-In Self-Test (BIST) operations. An IEEE subcommittee (chaired by Ken Parker of HP) is working on fully defining this capability, with a group at AT&T contributing the bulk of the technology. The parser supplied here will not halt with a syntax error when analysing a future BSDL source that contains these attribute descriptions. When the final definitions of these BIST-oriented attributes are settled, the parser for these attributes can be completed by those with an interest in accessing these functions. - ----Part 2----Lex Source-------------------Cut Here------------------- Things to notice: 1) The #input definition has been replaced with a new definition. The code for 'BSDL_getc' is actually found in the yacc source. Remember that the 'C' created by lex will be included into the 'C' created by yacc. 2) VHDL comments are discarded in the lexical phase; not passed up to the parser. 3) Table size definitions (such as '%a 2800', etc.) are correct for HP systems. These may need adjustment on others. 4) The lex specifications use 'start condition' constructs to seperate context sensitive tokens. 5) Subroutines 'Initialize_Lex' and 'yywrap' are included and should be used as indicated. See the main. 6) Illegal characters are trapped and a message produced in the lexical phase. The parser will abort with a syntax error. - ----Lex Source----Cut Here---- %{ /*---------------------------------------------------------- * * Lex source for BSDL * *----------------------------------------------------------*/ /* Date: 901003 */ /* Begin lex input specifications */ #include #include char Save_String[80]; #undef input /* Replace Lex's input routine with BSDL's */ /* Note, BSDL_getc will uppercase all letters */ /* This will reduce Lex table space */ #define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):BSDL_getc(yyin)) \ ==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) #define BINARY 0 #define DECIMAL 1 #define BIN_X 2 int Base = DECIMAL; %} %a 2800 %e 1200 %p 4700 %n 520 %k 140 %o 3000 %START RES BOU REG PAC White [ \t\b]* VHDL_Comment \-\-[^\n]* Binary_Pattern [0-1]+ Bin_X_Pattern [0-1X]+ Digit [0-9] Exponent [E][+-]?{Digit}+ Real_Number {Digit}+[\.]{Digit}+{Exponent} Decimal_Number {Digit}+ Identifier [A-Z][A-Z0-9_]* Quoted_String \"[^\"\n]*\" Concatenate & Single_Quote [\'] Semicolon ; Eol [\n] Comma [,] Lparen [\(] Rparen [\)] Lbracket [\[] Rbracket [\]] Colon_Equal \:\= Colon [\:] Period [\.] Asterisk [\*] Box [\<][\>] Illegal [^A-Z0-9 \t\b\n\"\&\'\*\(\)\[\]\_\:\.\,\;\<\>] Entity ENTITY Port PORT Generic GENERIC Use USE Attribute ATTRIBUTE Is IS Of OF Constant CONSTANT String STRING End END All ALL Physical_Pin_Map PHYSICAL_PIN_MAP Pin_Map PIN_MAP Pin_Map_String PIN_MAP_STRING True TRUE False FALSE Signal SIGNAL Tap_Scan_In TAP_SCAN_IN Tap_Scan_Out TAP_SCAN_OUT Tap_Scan_Clock TAP_SCAN_CLOCK Tap_Scan_Mode TAP_SCAN_MODE Tap_Scan_Reset TAP_SCAN_RESET Low LOW Both BOTH Out OUT Inout INOUT In IN Buffer BUFFER Linkage LINKAGE Bit_Vector BIT_VECTOR Bit BIT To TO Downto DOWNTO Package PACKAGE Body BODY Type TYPE Subtype SUBTYPE Record RECORD Array ARRAY Positive POSITIVE Range RANGE Cell_Info CELL_INFO Instruction_Length INSTRUCTION_LENGTH Instruction_Opcode INSTRUCTION_OPCODE Instruction_Capture INSTRUCTION_CAPTURE Instruction_Disable INSTRUCTION_DISABLE Instruction_Guard INSTRUCTION_GUARD Instruction_Private INSTRUCTION_PRIVATE Instruction_Usage INSTRUCTION_USAGE Instruction_Sequence INSTRUCTION_SEQUENCE Register_Access REGISTER_ACCESS Boundary_Cells BOUNDARY_CELLS Boundary_Length BOUNDARY_LENGTH Boundary_Register BOUNDARY_REGISTER Idcode_Register IDCODE_REGISTER Usercode_Register USERCODE_REGISTER Design_Warning DESIGN_WARNING Boundary BOUNDARY Bypass BYPASS Idcode IDCODE Usercode USERCODE Input INPUT Output2 OUTPUT2 Output3 OUTPUT3 Control CONTROL Controlr CONTROLR Internal INTERNAL Clock CLOCK Bidir BIDIR Bidir_In BIDIR_IN Bidir_Out BIDIR_OUT Z Z Weak0 WEAK0 Weak1 WEAK1 Extest EXTEST Sample SAMPLE Intest INTEST Runbist RUNBIST Pi PI Po PO Upd UPD Cap CAP X X Zero ZERO One ONE %% {Entity} {return(ENTITY); } {Port} {Base = DECIMAL; /* Default number base */ return(PORT); } {Generic} {Base = DECIMAL; return(GENERIC); } {Use} {Base = DECIMAL; return(USE); } {Attribute} {Base = DECIMAL; return(ATTRIBUTE); } {Is} {return(IS); } {Constant} {Base = DECIMAL; return(CONSTANT); } {String} {return(STRING); } {End} {Base = DECIMAL; BEGIN INITIAL; /* Turn off start conditions */ return(END); } {All} {return(ALL); } {Of} {return(OF); } {Pin_Map} {return(PIN_MAP); } {Physical_Pin_Map} {return(PHYSICAL_PIN_MAP); } {Pin_Map_String} {return(PIN_MAP_STRING); } {True} {return(TRUE); } {False} {return(FALSE); } {Signal} {return(SIGNAL); } {Tap_Scan_In} {return(TAP_SCAN_IN); } {Tap_Scan_Out} {return(TAP_SCAN_OUT); } {Tap_Scan_Clock} {return(TAP_SCAN_CLOCK); } {Tap_Scan_Mode} {return(TAP_SCAN_MODE); } {Tap_Scan_Reset} {return(TAP_SCAN_RESET); } {Low} {return(LOW); } {Both} {return(BOTH); } {In} {return(IN); } {Out} {return(OUT); } {Inout} {return(INOUT); } {Buffer} {return(BUFFER); } {Linkage} {return(LINKAGE); } {Bit} {return(BIT); } {Bit_Vector} {return(BIT_VECTOR); } {To} {return(TO); } {Downto} {return(DOWNTO); } {Package} {return(PACKAGE); } {Body} {return(BODY); } {Type} {return(TYPE); } {Subtype} {return(SUBTYPE); } {Record} {return(RECORD); } {Array} {Base = DECIMAL; return(ARRAY); } {Positive} {return(POSITIVE); } {Range} {return(RANGE); } {Cell_Info} {BEGIN PAC; return(CELL_INFO); } {Instruction_Length} {return(INSTRUCTION_LENGTH); } {Instruction_Opcode} {Base = BINARY; /* Enable Binary Patterns */ return(INSTRUCTION_OPCODE); } {Instruction_Capture} {Base = BIN_X; /* Enable Bin_X Patterns */ return(INSTRUCTION_CAPTURE); } {Instruction_Disable} {return(INSTRUCTION_DISABLE); } {Instruction_Guard} {return(INSTRUCTION_GUARD); } {Instruction_Private} {return(INSTRUCTION_PRIVATE); } {Instruction_Usage} {return(INSTRUCTION_USAGE); } {Instruction_Sequence} {return(INSTRUCTION_SEQUENCE); } {Register_Access} {BEGIN REG; return(REGISTER_ACCESS); } {Boundary_Cells} {return(BOUNDARY_CELLS); } {Boundary_Length} {return(BOUNDARY_LENGTH); } {Boundary_Register} {BEGIN BOU; return(BOUNDARY_REGISTER); } {Idcode_Register} {Base = BIN_X; return(IDCODE_REGISTER); } {Usercode_Register} {Base = BIN_X; return(USERCODE_REGISTER); } {Design_Warning} {return(DESIGN_WARNING); } {Boundary} {return(BOUNDARY); } {Bypass} {return(BYPASS); } {Idcode} {return(IDCODE); } {Usercode} {return(USERCODE); } {Input} {return(INPUT); } {Output2} {return(OUTPUT2); } {Output3} {return(OUTPUT3); } {Controlr} {return(CONTROLR); } {Control} {return(CONTROL); } {Internal} {return(INTERNAL); } {Clock} {return(CLOCK); } {Bidir} {return(BIDIR); } {Bidir_In} {return(BIDIR_IN); } {Bidir_Out} {return(BIDIR_OUT); } {Extest} {return(EXTEST); } {Sample} {return(SAMPLE); } {Intest} {return(INTEST); } {Runbist} {return(RUNBIST); } {Pi} {return(PI); } {Po} {return(PO); } {Upd} {return(UPD); } {Cap} {return(CAP); } {X} {return(X); } {Zero} {return(ZERO); } {One} {return(ONE); } {Z} {return(Z); } {Weak0} {return(WEAK0); } {Weak1} {return(WEAK1); } {Eol} {Line_Number++; /* Count lines */} {Comma} {return(COMMA); } {Lparen} {return(LPAREN);} {Rparen} {return(RPAREN);} {Period} {return(PERIOD); } {Lbracket} {return(LBRACKET); } {Rbracket} {return(RBRACKET); } {Colon} {return(COLON); } {Asterisk} {return(ASTERISK); } {Box} {return(BOX); } {Single_Quote} {Base = BIN_X; return(SINGLE_QUOTE); } {Colon_Equal} {return(COLON_EQUAL); } {White} { /* Do Nothing on White Space */ } {VHDL_Comment} { /* Do Nothing on Comments */ } {Bin_X_Pattern} {if (Base != BIN_X) REJECT; strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(BIN_X_PATTERN);} {Identifier} {strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(IDENTIFIER); } {Quoted_String} {strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(QUOTED_STRING); } {Binary_Pattern} {if (Base != BINARY) REJECT; strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(BINARY_PATTERN);} {Decimal_Number} {if (Base != DECIMAL) REJECT; yylval = atoi((char *)yytext); return(DECIMAL_NUMBER);} {Real_Number} {strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(REAL_NUMBER);} {Concatenate} {return(CONCATENATE);} {Semicolon} {return(SEMICOLON);} {Illegal} {fprintf(stderr, "Error: Illegal character %c (/%03o) at line %d:\n", (char)yytext[yyleng-1], (int)yytext[yyleng-1], Line_Number); Compile_Errors++; return(ILLEGAL); /* Will cause syntax error */} %% void Initialize_Lex(f) /* Change input file from STDIN to BSDL file */ FILE *f; {yyin = f; /* Change file names */ String_Text = (char *)malloc(sizeof(Text_Array_Type)); Line_Ptr_Array=(Line_Ptr_Array_Type *)malloc(sizeof(Line_Ptr_Array_Type)); } int yywrap() {fclose(yyin); if (String_Text != 0) free(String_Text); if (Line_Ptr_Array != 0) free(Line_Ptr_Array); return(1); } - ----Part 3----Yacc Source------------------Cut Here------------------- Things to notice: 1) The yacc source uses 'left' recursion to conserve stack space. 2) The maximum number of syntax errors allowed before quiting is specified (at 15). 3) Text from VHDL strings and VHDL package definitions is read twice. The first time places it in a dynamically allocated array with dimensions you can control (TEXT_MAX). The second time the text is actually parsed. Original source-line numbers are preserved so that error reporting gives the correct line numbers. 4) Examine the rules for 'VHDL_Constant' below. The 'quoted_string' is parsed and stored in the text array. Notice that after the semicolon is parsed, the input stream is switched over to the stored text and then the rule for 'BSDL_Map_String' is activated. This device allows us to parse the contents of the string, and, allows us to seperate the parsing rules for VHDL-based applications as mentioned in part 1 above. 5) The content of the standard package STD_1149_1_1990 is recognized, but most is discarded. The package body is part of the same file. This is parsed to obtain the definition of the standard cells BC_1 through BC_6. Note that user-defined packages are also parsed for user-defined cells (see 'User_Package'). 6) None of the package processing code needs to be implemented in a VHDL system; that's intrinsic. 7) Utility subroutines (near the end) are included to support the storage and retrieval of string text. (See 'Init_Text', 'Store_Text', 'Copy_File_To_Text', 'Setup_Parse_On_Stored_Text', 'Make_String' and 'BSDL_getc'. 8) The 'Print_Error' routine will correctly identify the line number in the original source (also identifying a source package) where an error occurs. Use this for printing semantic errors that are determined on-the-fly. 9) There should be no reduction conflicts when yacc is run. - ----Yacc Source----Cut Here---- %{ /* ----------------------------------------------------------------------- */ /* */ /* Yacc code for BSDL /* */ /* ----------------------------------------------------------------------- */ /* Date: 901003 */ #include #include #include extern int Compile_Errors; extern FILE *VHDL_Pack; #define ERROR_LIMIT 15 #define BUMP_ERROR if ((Compile_Errors++)>ERROR_LIMIT) \ {Give_Up_And_Quit();YYABORT;} #define LINE_MAX 1500 /* Max lines in VHDL string expression */ #define TEXT_MAX (LINE_MAX * 80) /* Max text in VHDL string expression */ typedef char Text_Array_Type[TEXT_MAX]; typedef struct {int Line_Num; char *Line_Ptr; }Line_Ptr_Type; typedef Line_Ptr_Type Line_Ptr_Array_Type[LINE_MAX]; char *String_Text; /* See Initialize_Lex for allocation*/ Line_Ptr_Array_Type *Line_Ptr_Array; /* Ditto for allocation*/ char *Free_Text; /* Ptr to unused text area */ int Line_Ptr_Index; /* Index to next Line_Ptr */ char String_Val[150]; char Package_File_Name[100]; /* Package name being parsed */ int Reading_Package = 0; /* Flag for package parse */ int Line_Number = 1; %} %token ENTITY PORT GENERIC USE ATTRIBUTE IS %token OF CONSTANT STRING END ALL PIN_MAP %token PHYSICAL_PIN_MAP PIN_MAP_STRING TRUE FALSE SIGNAL %token TAP_SCAN_IN TAP_SCAN_OUT TAP_SCAN_MODE TAP_SCAN_RESET %token TAP_SCAN_CLOCK LOW BOTH IN OUT INOUT %token BUFFER LINKAGE BIT BIT_VECTOR TO DOWNTO %token PACKAGE BODY TYPE SUBTYPE RECORD ARRAY %token POSITIVE RANGE CELL_INFO INSTRUCTION_LENGTH %token INSTRUCTION_OPCODE INSTRUCTION_CAPTURE INSTRUCTION_DISABLE %token INSTRUCTION_GUARD INSTRUCTION_PRIVATE INSTRUCTION_USAGE %token INSTRUCTION_SEQUENCE REGISTER_ACCESS BOUNDARY_CELLS %token BOUNDARY_LENGTH BOUNDARY_REGISTER IDCODE_REGISTER %token USERCODE_REGISTER DESIGN_WARNING BOUNDARY BYPASS IDCODE %token USERCODE INPUT OUTPUT2 OUTPUT3 CONTROL CONTROLR INTERNAL %token CLOCK BIDIR BIDIR_IN BIDIR_OUT EXTEST SAMPLE %token INTEST RUNBIST PI PO UPD CAP X %token ZERO ONE Z WEAK0 WEAK1 IDENTIFIER %token SINGLE_QUOTE QUOTED_STRING DECIMAL_NUMBER BINARY_PATTERN %token BIN_X_PATTERN REAL_NUMBER CONCATENATE SEMICOLON COMMA %token LPAREN RPAREN LBRACKET RBRACKET COLON ASTERISK %token BOX COLON_EQUAL PERIOD ILLEGAL %start BSDL_Program %% /* End declarations, begin rules */ BSDL_Program : Begin_BSDL Part_1 Part_2 End_BSDL ; Begin_BSDL : ENTITY IDENTIFIER IS | error {Print_Error("Improper Entity declaration"); Print_Error("Check if source file is BSDL"); YYABORT; /* Probably not a BSDL source file */ } ; Part_1 : VHDL_Generic VHDL_Port VHDL_Use_Part VHDL_Pin_Map VHDL_Constant_List | error {Print_Error("Syntax Error"); BUMP_ERROR; YYABORT; } ; Part_2 : VHDL_Tap_Signals VHDL_Inst_Length VHDL_Inst_Opcode VHDL_Inst_Details VHDL_Boundary_Details VHDL_Boundary_Register | error {Print_Error("Syntax Error"); BUMP_ERROR; YYABORT; } ; End_BSDL : VHDL_Design_Warning END IDENTIFIER SEMICOLON | error {Print_Error("Syntax Error"); BUMP_ERROR; YYABORT; } ; VHDL_Generic : GENERIC LPAREN PHYSICAL_PIN_MAP COLON STRING COLON_EQUAL Quoted_String RPAREN SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */ } IDENTIFIER ; VHDL_Port : PORT LPAREN Port_Specifier_List RPAREN SEMICOLON | error {Print_Error("Improper Port declaration"); BUMP_ERROR; YYABORT; } ; Port_Specifier_List : Port_Specifier | Port_Specifier_List SEMICOLON Port_Specifier ; Port_Specifier : Port_List COLON Function Scaler_Or_Vector ; Port_List : IDENTIFIER | Port_List COMMA IDENTIFIER ; Function : IN | OUT | INOUT | BUFFER | LINKAGE ; Scaler_Or_Vector : BIT | BIT_VECTOR LPAREN Vector_Range RPAREN ; Vector_Range : DECIMAL_NUMBER TO DECIMAL_NUMBER | DECIMAL_NUMBER DOWNTO DECIMAL_NUMBER ; VHDL_Use_Part : Standard_Use | Standard_Use VHDL_Use_List | error {Print_Error("Error in Package declaration(s)"); BUMP_ERROR; YYABORT; } ; Standard_Use : USE IDENTIFIER {/* Parse Standard 1149.1 Package */ strcpy(Package_File_Name, (char *)$2); Copy_File_To_Text(Package_File_Name); } PERIOD ALL SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to text */ Reading_Package = 1; /* set flag for package parse */ } Standard_Package ; Standard_Package : PACKAGE IDENTIFIER IS Standard_Decls Defered_Constants Standard_Decls END IDENTIFIER SEMICOLON Package_Body | error {Print_Error("Error in Standard Package"); BUMP_ERROR; YYABORT; } ; Standard_Decls : Standard_Decl | Standard_Decls Standard_Decl ; Standard_Decl : ATTRIBUTE Standard_Attributes COLON Attribute_Type SEMICOLON | TYPE IDENTIFIER IS Type_Body SEMICOLON | TYPE CELL_INFO IS ARRAY LPAREN POSITIVE RANGE BOX RPAREN OF IDENTIFIER SEMICOLON | SUBTYPE PIN_MAP_STRING IS STRING SEMICOLON | error {Print_Error("Error in Standard Declarations"); BUMP_ERROR; YYABORT; } ; Standard_Attributes : PIN_MAP | TAP_SCAN_IN | TAP_SCAN_OUT | TAP_SCAN_CLOCK | TAP_SCAN_MODE | TAP_SCAN_RESET | INSTRUCTION_LENGTH | INSTRUCTION_OPCODE | INSTRUCTION_CAPTURE | INSTRUCTION_DISABLE | INSTRUCTION_GUARD | INSTRUCTION_PRIVATE | INSTRUCTION_USAGE | INSTRUCTION_SEQUENCE | IDCODE_REGISTER | USERCODE_REGISTER | REGISTER_ACCESS | BOUNDARY_CELLS | BOUNDARY_LENGTH | BOUNDARY_REGISTER | DESIGN_WARNING | error {Print_Error("Error in Attribute identifier"); BUMP_ERROR; YYABORT; } ; Attribute_Type : IDENTIFIER | STRING | DECIMAL_NUMBER | error {Print_Error("Error in Attribute type identification"); BUMP_ERROR; YYABORT; } ; Type_Body : LPAREN ID_Bits RPAREN | LPAREN ID_List RPAREN | LPAREN LOW COMMA BOTH RPAREN | ARRAY LPAREN DECIMAL_NUMBER TO DECIMAL_NUMBER RPAREN OF IDENTIFIER | ARRAY LPAREN DECIMAL_NUMBER DOWNTO DECIMAL_NUMBER RPAREN OF IDENTIFIER | RECORD Record_Body END RECORD | error {Print_Error("Error in Type definition"); BUMP_ERROR; YYABORT; } ; ID_Bits : ID_Bit | ID_Bits COMMA ID_Bit ; ID_List : IDENTIFIER | ID_List COMMA IDENTIFIER ; ID_Bit : SINGLE_QUOTE BIN_X_PATTERN SINGLE_QUOTE | error {Print_Error("Error in Bit definition"); BUMP_ERROR; YYABORT; } ; Record_Body : Record_Element | Record_Body Record_Element ; Record_Element : IDENTIFIER COLON IDENTIFIER SEMICOLON | error {Print_Error("Error in Record Definition"); BUMP_ERROR; YYABORT; } ; Defered_Constants: Defered_Constant | Defered_Constants Defered_Constant ; Defered_Constant : CONSTANT Constant_Body ; Constant_Body : IDENTIFIER COLON CELL_INFO SEMICOLON | error {Print_Error("Error in defered constant"); BUMP_ERROR; YYABORT; } ; VHDL_Use_List : VHDL_Use | VHDL_Use_List VHDL_Use ; Package_Body : PACKAGE BODY IDENTIFIER IS Constant_List END IDENTIFIER SEMICOLON | error {Print_Error("Error in Package Body definition"); BUMP_ERROR; YYABORT; } ; Constant_List : Cell_Constant | Constant_List Cell_Constant ; Cell_Constant : CONSTANT IDENTIFIER COLON CELL_INFO COLON_EQUAL LPAREN Triples_List RPAREN SEMICOLON | error {Print_Error("Error in Cell Constant definition"); BUMP_ERROR; YYABORT; } ; Triples_List : Triple | Triples_List COMMA Triple ; Triple : LPAREN Triple_Function COMMA Triple_Inst COMMA CAP_Data RPAREN | error {Print_Error("Error in Cell Data Record"); BUMP_ERROR; YYABORT; } ; Triple_Function : INPUT | OUTPUT2 | OUTPUT3 | INTERNAL | CONTROL | CONTROLR | CLOCK | BIDIR_IN | BIDIR_OUT | error {Print_Error("Error in Cell_Type Function field"); BUMP_ERROR; YYABORT; } ; Triple_Inst : EXTEST | SAMPLE | INTEST | RUNBIST | error {Print_Error("Error in BScan_Inst Instruction field"); BUMP_ERROR; YYABORT; } ; CAP_Data : PI | PO | UPD | CAP | X | ZERO | ONE | error {Print_Error("Error in Constant CAP data source field"); BUMP_ERROR; YYABORT; } ; VHDL_Use : USE IDENTIFIER {/* Parse Standard 1149.1 Package */ strcpy(Package_File_Name, (char *)$2); Copy_File_To_Text(Package_File_Name); } PERIOD ALL SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to text */ Reading_Package = 1; /* set flag for package parse */ } User_Package ; User_Package : PACKAGE IDENTIFIER IS Defered_Constants END IDENTIFIER SEMICOLON Package_Body | error {Print_Error("Error in User-Defined Package declarations"); BUMP_ERROR; YYABORT; } ; VHDL_Pin_Map : ATTRIBUTE PIN_MAP OF IDENTIFIER COLON ENTITY IS PHYSICAL_PIN_MAP SEMICOLON | error {Print_Error("Error in Pin_Map Attribute"); BUMP_ERROR; YYABORT; } ; VHDL_Constant_List : VHDL_Constant | VHDL_Constant_List VHDL_Constant ; VHDL_Constant : CONSTANT VHDL_Constant_Part ; VHDL_Constant_Part : IDENTIFIER COLON PIN_MAP_STRING COLON_EQUAL Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */ } BSDL_Map_String | error {Print_Error("Error in Pin_Map_String constant declaration"); BUMP_ERROR; YYABORT; } ; BSDL_Map_String : Pin_Mapping | BSDL_Map_String COMMA Pin_Mapping ; Pin_Mapping : IDENTIFIER COLON Physical_Pin_Desc ; Physical_Pin_Desc: Physical_Pin | LPAREN Physical_Pin_List RPAREN ; Physical_Pin_List: Physical_Pin | Physical_Pin_List COMMA Physical_Pin ; Physical_Pin : IDENTIFIER | DECIMAL_NUMBER ; VHDL_Tap_Signals : VHDL_Tap_Signal | VHDL_Tap_Signals VHDL_Tap_Signal ; VHDL_Tap_Signal : VHDL_Tap_Scan_In | VHDL_Tap_Scan_Out | VHDL_Tap_Scan_Clock | VHDL_Tap_Scan_Mode | VHDL_Tap_Scan_Reset ; VHDL_Tap_Scan_In : ATTRIBUTE TAP_SCAN_IN OF IDENTIFIER COLON SIGNAL IS Boolean SEMICOLON ; VHDL_Tap_Scan_Out : ATTRIBUTE TAP_SCAN_OUT OF IDENTIFIER COLON SIGNAL IS Boolean SEMICOLON ; VHDL_Tap_Scan_Mode : ATTRIBUTE TAP_SCAN_MODE OF IDENTIFIER COLON SIGNAL IS Boolean SEMICOLON ; VHDL_Tap_Scan_Reset : ATTRIBUTE TAP_SCAN_RESET OF IDENTIFIER COLON SIGNAL IS Boolean SEMICOLON ; VHDL_Tap_Scan_Clock : ATTRIBUTE TAP_SCAN_CLOCK OF IDENTIFIER COLON SIGNAL IS LPAREN REAL_NUMBER COMMA Stop RPAREN SEMICOLON ; Stop : LOW | BOTH ; Boolean : TRUE | FALSE ; VHDL_Inst_Length : ATTRIBUTE INSTRUCTION_LENGTH OF IDENTIFIER COLON ENTITY IS DECIMAL_NUMBER SEMICOLON ; VHDL_Inst_Opcode : ATTRIBUTE INSTRUCTION_OPCODE OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */ } BSDL_Opcode_Table ; BSDL_Opcode_Table: Opcode_Desc | BSDL_Opcode_Table COMMA Opcode_Desc | error {Print_Error( "Error in Instruction_Opcode attribute statement"); BUMP_ERROR; YYABORT; } ; Opcode_Desc : IDENTIFIER LPAREN Pattern_List RPAREN ; Pattern_List : Binary_Pattern | Pattern_List COMMA Binary_Pattern ; Binary_Pattern : BINARY_PATTERN ; VHDL_Inst_Details: VHDL_Inst_Detail | VHDL_Inst_Details VHDL_Inst_Detail ; VHDL_Inst_Detail : VHDL_Inst_Capture | VHDL_Inst_Disable | VHDL_Inst_Guard | VHDL_Inst_Private | VHDL_Register_Access | VHDL_Inst_Usage | VHDL_Inst_Sequence | VHDL_Idcode_Register | VHDL_Usercode_Register ; VHDL_Inst_Capture: ATTRIBUTE INSTRUCTION_CAPTURE OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} BIN_X_PATTERN ; VHDL_Inst_Disable: ATTRIBUTE INSTRUCTION_DISABLE OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} IDENTIFIER ; VHDL_Inst_Guard : ATTRIBUTE INSTRUCTION_GUARD OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} IDENTIFIER ; VHDL_Inst_Private: ATTRIBUTE INSTRUCTION_PRIVATE OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} Private_Opcode_List ; Private_Opcode_List : Private_Opcode | Private_Opcode_List COMMA Private_Opcode | error {Print_Error("Error in Opcode List"); BUMP_ERROR; YYABORT; } ; Private_Opcode : IDENTIFIER ; VHDL_Inst_Usage : ATTRIBUTE INSTRUCTION_USAGE OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {/* Syntax of string content to be changed in future */} ; VHDL_Inst_Sequence : ATTRIBUTE INSTRUCTION_SEQUENCE OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {/* Syntax of string content to be determined in future */} ; VHDL_Idcode_Register: ATTRIBUTE IDCODE_REGISTER OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} BIN_X_PATTERN ; VHDL_Usercode_Register: ATTRIBUTE USERCODE_REGISTER OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} BIN_X_PATTERN ; VHDL_Register_Access: ATTRIBUTE REGISTER_ACCESS OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} Register_String ; Register_String : Register_Assoc | Register_String COMMA Register_Assoc ; Register_Assoc : Register_Decl LPAREN Reg_Opcode_List RPAREN ; Register_Decl : Standard_Reg | IDENTIFIER LBRACKET DECIMAL_NUMBER RBRACKET ; Standard_Reg : BOUNDARY | BYPASS | IDCODE | USERCODE ; Reg_Opcode_List : Reg_Opcode | Reg_Opcode_List COMMA Reg_Opcode ; Reg_Opcode : IDENTIFIER ; VHDL_Boundary_Details: VHDL_Boundary_Detail | VHDL_Boundary_Details VHDL_Boundary_Detail ; VHDL_Boundary_Detail: VHDL_Boundary_Cells | VHDL_Boundary_Length ; VHDL_Boundary_Cells: ATTRIBUTE BOUNDARY_CELLS OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} BSDL_Cell_List ; BSDL_Cell_List : BCell_Identifier | BSDL_Cell_List COMMA BCell_Identifier ; BCell_Identifier : IDENTIFIER ; VHDL_Boundary_Length: ATTRIBUTE BOUNDARY_LENGTH OF IDENTIFIER COLON ENTITY IS DECIMAL_NUMBER SEMICOLON ; VHDL_Boundary_Register: ATTRIBUTE BOUNDARY_REGISTER OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON {Setup_Parse_On_Stored_Text(); /* Switch to string */} BSDL_Cell_Table ; BSDL_Cell_Table : Cell_Entry | BSDL_Cell_Table COMMA Cell_Entry | error {Print_Error("Error in Boundary Cell description"); BUMP_ERROR; YYABORT; } ; Cell_Entry : DECIMAL_NUMBER LPAREN Cell_Info RPAREN ; Cell_Info : Cell_Spec | Cell_Spec COMMA Disable_Spec ; Cell_Spec : IDENTIFIER COMMA Port_Name COMMA Cell_Function COMMA Safe_Value ; Port_Name : IDENTIFIER | IDENTIFIER LPAREN DECIMAL_NUMBER RPAREN | ASTERISK ; Cell_Function : INPUT | OUTPUT2 | OUTPUT3 | CONTROL | CONTROLR | INTERNAL | CLOCK | BIDIR ; Safe_Value : IDENTIFIER | DECIMAL_NUMBER ; Disable_Spec : DECIMAL_NUMBER COMMA DECIMAL_NUMBER COMMA Disable_Value ; Disable_Value : Z | WEAK0 | WEAK1 ; VHDL_Design_Warning: /* Null Statement */ | ATTRIBUTE DESIGN_WARNING OF IDENTIFIER COLON ENTITY IS Quoted_String SEMICOLON ; Quoted_String : QUOTED_STRING {Make_String((char *)$1, String_Val); Init_Text(); Store_Text(String_Val); } | Quoted_String CONCATENATE QUOTED_STRING {Make_String((char *)$3, String_Val); Store_Text(String_Val); } ; %% /* End rules, begin programs */ /*------------------------------------------------------------------------*/ void Uppercase_String(Str) char *Str; {char *P, c; for (P = Str; (c = *P) != '\0'; P++) *P = toupper(c); } /*----------------------------------------------------------------------*/ void Init_Text() { String_Text[0] = '\0'; Free_Text = String_Text; Line_Ptr_Index = 0; } /*----------------------------------------------------------------------*/ void Store_Text(String) char *String; { /* Save characters from VHDL string in array of ptrs to lines. */ /* These will be parsed later by switching BSDL_getc to the saved text*/ if (Line_Ptr_Index < LINE_MAX) {(*Line_Ptr_Array)[Line_Ptr_Index].Line_Ptr = Free_Text; (*Line_Ptr_Array)[Line_Ptr_Index++].Line_Num = Line_Number; strcpy(Free_Text, String); Free_Text += (strlen(String) + 1); } else {fprintf(stderr, "Error: more than %d lines in Quoted String.\n", LINE_MAX); fprintf(stderr, " (Check for a missing quote mark.)\n"); Compile_Errors++; } } /*----------------------------------------------------------------------*/ #define STRING_MAX 256 /*----------------------------------------------------------------------*/ static void Copy_File_To_Text(File_Name) char * File_Name; { /* Save characters from Package file in array of ptrs to lines. */ /* These will be parsed later by switching BSDL_getc to the saved text*/ int Line_Number; /* Line number in package file */ char Buf[STRING_MAX]; VHDL_Pack = fopen(File_Name, "r"); if (VHDL_Pack == NULL) {fprintf(stderr, "Error: Unable to open Package %s\n", File_Name); Compile_Errors++; return; } Init_Text(); /* Set up to store file into Text array */ for(Line_Number = 1; fgets(Buf, STRING_MAX, VHDL_Pack) != NULL; Line_Number++) {if (Line_Ptr_Index < LINE_MAX) {(*Line_Ptr_Array)[Line_Ptr_Index].Line_Ptr = Free_Text; (*Line_Ptr_Array)[Line_Ptr_Index++].Line_Num = Line_Number; Uppercase_String(Buf); /* All uppercase for Lex simplicity */ strcpy(Free_Text, Buf); Free_Text += (strlen(Buf) + 1); } else {fprintf(stderr, "Error: more than %d lines in Package %s\n", LINE_MAX, File_Name); fprintf(stderr, " (Shorten or break it into two files.)\n"); Compile_Errors++; break; } } fclose(VHDL_Pack); } /*----------------------------------------------------------------------*/ int From_File = 1; /* Flag, 1= yyin, 0 = read from string */ int Char_Index = 0; /* Index of next char to read from string */ int Ptr_Index = 0; /* Ptr to next line to read from string */ int Save_Line_Number = 1; /* Save line num in file while reading string */ /*----------------------------------------------------------------------*/ char BSDL_getc(f) FILE *f; /* Called by lex to get a character */ { char Ch; for (;;) /* keep trying until a char read */ {if (From_File) {Ch = toupper(getc(f)); /* Read the input file and uppercase Ch */ return(Ch); } else /* Read chars from parsed string */ {Ch = (*Line_Ptr_Array)[Ptr_Index].Line_Ptr[Char_Index++]; if (Ch == '\0') /* end of this line ? */ {if (++Ptr_Index < Line_Ptr_Index) /* switch to next line */ {Char_Index = 0; Line_Number = (*Line_Ptr_Array)[Ptr_Index].Line_Num; } else {From_File = 1; /* String exhausted, switch back to file */ Reading_Package = 0; /* Not parsing a package either */ Line_Number = Save_Line_Number; /* Restore file line number*/ } } else {return(Ch); } } } } /*----------------------------------------------------------------------*/ void Setup_Parse_On_Stored_Text() { From_File = 0; /* Set up to parse text from memory */ Char_Index = 0; /* Will be reset to file by BSDL_getc */ Ptr_Index = 0; /* when the stored text is exhausted */ Save_Line_Number = Line_Number; Line_Number = (*Line_Ptr_Array)[Ptr_Index].Line_Num; } /*----------------------------------------------------------------------*/ void Make_String(Source, Dest) char *Source; char *Dest; {char Ch; for (Source++; Ch = *Source, (Ch != '"') && (Ch != '\n'); Source++, Dest++) *Dest = *Source; *Dest = '\0'; } /*----------------------------------------------------------------------*/ void Print_Error(Errmess) char *Errmess; { if (Reading_Package) fprintf(stderr, "Error in Package %s, Line %d, %s.\n", Package_File_Name, Line_Number, Errmess); else fprintf(stderr, "Error, Line %d, %s.\n", Line_Number, Errmess); } /*----------------------------------------------------------------------*/ void Give_Up_And_Quit() { Print_Error("Too many errors"); } /*----------------------------------------------------------------------*/ #include "lex.yy.c" /* Include results of Lex */ - ----Part 4----sample main------------------Cut Here------------------- Things to notice: 1) This file is compiled seperately, then loaded with the object produced by compiling yacc generated 'C' code. Note the lex generated code is included by the yacc code. 2) Don't forget during loading to reference the yacc and lex libraries. On a UNIX system, use a '-ly -ll' in the compile string. - ----Main Source----Cut Here---- /**************************************************************************/ /* BSDL parser Main program example /**************************************************************************/ #include #include extern void Initialize_Lex(); int Compile_Errors = 0; /* Global variables */ FILE *VHDL_Pack; /* VHDL package file */ char BSDL_File_Name[80] = ""; main( argc, argv) /* Start Main Program */ int argc; char *argv[]; {int i; char Str[80]; FILE *BSDL_File; if (argc != 2) {fprintf(stderr, "The run string is %s BSDL_File\n", argv[0]); goto Run_Time_Error; } strcpy(BSDL_File_Name, argv[1]); BSDL_File = fopen(BSDL_File_Name, "r"); if (BSDL_File == NULL) {fprintf(stderr, "Unable to open BSDL_file %s \n", BSDL_File_Name); goto Run_Time_Error; } Initialize_Lex(BSDL_File); /* Lex will close this file */ yyparse(); /* call parser */ if (Compile_Errors == 0) {fprintf(stderr,"BSDL file %s compiled correctly\n", BSDL_File_Name); } else {fprintf(stderr,"BSDL file %s contains errors, stopping \n", BSDL_File_Name); } Run_Time_Error: fclose(BSDL_File); } /**************************************************************************/ - ----Part 5----74bct8374 BSDL---------------Cut Here------------------- Things to notice: 1) The description contains both package variants defined by Texas Instruments, 'DW_Package' and 'FK_Package'. 2) The DW_Package is identified in the 'generic' statement as the default package to be selected if none is passed from the outside environment. You may want to change this. - ----BSDL example---Cut Here---- - -- BSDL description of Texas Instruments 74bct8374 Octal D Flip-Flop entity ttl74bct8374 is generic (PHYSICAL_PIN_MAP : string := "DW_PACKAGE"); port (CLK:in bit; Q:out bit_vector(1 to 8); D:in bit_vector(1 to 8); GND, VCC:linkage bit; OC_NEG:in bit; TDO:out bit; TMS, TDI, TCK:in bit); use STD_1149_1_1990.all; -- Get Std 1149.1-1990 attributes and definitions attribute PIN_MAP of ttl74bct8374 : entity is PHYSICAL_PIN_MAP; constant DW_PACKAGE:PIN_MAP_STRING:="CLK:1, Q:(2,3,4,5,7,8,9,10), " & "D:(23,22,21,20,19,17,16,15)," & "GND:6, VCC:18, OC_NEG:24, TDO:11, TMS:12, TCK:13, TDI:14"; constant FK_PACKAGE:PIN_MAP_STRING:="CLK:9, Q:(10,11,12,13,16,17,18,19)," & "D:(6,5,4,3,2,27,26,25)," & "GND:14, VCC:28, OC_NEG:7, TDO:20, TMS:21, TCK:23, TDI:24"; attribute TAP_SCAN_IN of TDI : signal is true; attribute TAP_SCAN_MODE of TMS : signal is true; attribute TAP_SCAN_OUT of TDO : signal is true; attribute TAP_SCAN_CLOCK of TCK : signal is (20.0e6, BOTH); attribute INSTRUCTION_LENGTH of ttl74bct8374 : entity is 8; attribute INSTRUCTION_OPCODE of ttl74bct8374 : entity is "BYPASS (11111111, 10001000, 00000101, 10000100, 00000001)," & "EXTEST (00000000, 10000000)," & "SAMPLE (00000010, 10000010)," & "INTEST (00000011, 10000011)," & "TRIBYP (00000110, 10000110)," & -- Boundary Hi-Z "SETBYP (00000111, 10000111)," & -- Boundary 1/0 "RUNT (00001001, 10001001)," & -- Boundary run test "READBN (00001010, 10001010)," & -- Boundary read normal "READBT (00001011, 10001011)," & -- Boundary read test "CELLTST(00001100, 10001100)," & -- Boundary selftest normal "TOPHIP (00001101, 10001101)," & -- Boundary toggle out test "SCANCN (00001110, 10001110)," & -- BCR Scan normal "SCANCT (00001111, 10001111)"; -- BCR Scan test attribute INSTRUCTION_CAPTURE of ttl74bct8374 : entity is "10000001"; attribute INSTRUCTION_DISABLE of ttl74bct8374 : entity is "TRIBYP"; attribute REGISTER_ACCESS of ttl74bct8374 : entity is "BOUNDARY (READBN, READBT, CELLTST)," & "BYPASS (TOPHIP, SETBYP, RUNT, TRIBYP)," & "BCR[2] (SCANCN, SCANCT)"; -- 2-bit Boundary Control Register attribute BOUNDARY_CELLS of ttl74bct8374 : entity is "BC_1"; attribute BOUNDARY_LENGTH of ttl74bct8374 : entity is 18; attribute BOUNDARY_REGISTER of ttl74bct8374 : entity is -- num cell port function safe [ccell disval rslt] "17 (BC_1, CLK, input, X)," & "16 (BC_1, OC_NEG, input, X)," & -- Merged Input/Control "16 (BC_1, *, control, 1)," & -- Merged Input/Control "15 (BC_1, D(1), input, X)," & "14 (BC_1, D(2), input, X)," & "13 (BC_1, D(3), input, X)," & "12 (BC_1, D(4), input, X)," & "11 (BC_1, D(5), input, X)," & "10 (BC_1, D(6), input, X)," & "9 (BC_1, D(7), input, X)," & "8 (BC_1, D(8), input, X)," & "7 (BC_1, Q(1), output3, X, 16, 1, Z)," & -- cell 16 @ 1 -> Hi-Z. "6 (BC_1, Q(2), output3, X, 16, 1, Z)," & "5 (BC_1, Q(3), output3, X, 16, 1, Z)," & "4 (BC_1, Q(4), output3, X, 16, 1, Z)," & "3 (BC_1, Q(5), output3, X, 16, 1, Z)," & "2 (BC_1, Q(6), output3, X, 16, 1, Z)," & "1 (BC_1, Q(7), output3, X, 16, 1, Z)," & "0 (BC_1, Q(8), output3, X, 16, 1, Z)"; end ttl74bct8374; - ----Part 6----STD_1149_1_1990--------------Cut Here------------------- Things to notice: 1) This section contains both the VHDL package and package body for the 1149.1 standard definitions that are BSDL. 2) The parser supplied here expects both the package and body to be contained in one file in the current directory of the file system. - ----Standard package----Cut Here---- - -- STD_1149_1_1990 VHDL Package and Package Body in support of - -- BSDL Version 0.0 - -- package STD_1149_1_1990 is -- Created 900525 -- Give pin mapping declarations attribute PIN_MAP : string; subtype PIN_MAP_STRING is string; -- Give TAP control declarations type CLOCK_LEVEL is (LOW, BOTH); type CLOCK_INFO is record FREQ : real; LEVEL: CLOCK_LEVEL; end record; attribute TAP_SCAN_IN : boolean; attribute TAP_SCAN_OUT : boolean; attribute TAP_SCAN_CLOCK: CLOCK_INFO; attribute TAP_SCAN_MODE : boolean; attribute TAP_SCAN_RESET: boolean; -- Give instruction register declarations attribute INSTRUCTION_LENGTH : integer; attribute INSTRUCTION_OPCODE : string; attribute INSTRUCTION_CAPTURE : string; attribute INSTRUCTION_DISABLE : string; attribute INSTRUCTION_GUARD : string; attribute INSTRUCTION_PRIVATE : string; attribute INSTRUCTION_USAGE : string; attribute INSTRUCTION_SEQUENCE : string; -- Give ID and USER code declarations type ID_BITS is ('0', '1', 'x', 'X'); type ID_STRING is array (31 downto 0) of ID_BITS; attribute IDCODE_REGISTER : ID_STRING; attribute USERCODE_REGISTER: ID_STRING; -- Give register declarations attribute REGISTER_ACCESS : string; -- Give boundary cell declarations type BSCAN_INST is (EXTEST, SAMPLE, INTEST, RUNBIST); type CELL_TYPE is (INPUT, INTERNAL, CLOCK, CONTROL, CONTROLR, OUTPUT2, OUTPUT3, BIDIR_IN, BIDIR_OUT); type CAP_DATA is (PI, PO, UPD, CAP, X, ZERO, ONE); type CELL_DATA is record CT : CELL_TYPE; I : BSCAN_INST; CD : CAP_DATA; end record; type CELL_INFO is array (positive range <>) of CELL_DATA; -- Boundary Cell defered constants (see package body) constant BC_1 : CELL_INFO; constant BC_2 : CELL_INFO; constant BC_3 : CELL_INFO; constant BC_4 : CELL_INFO; constant BC_5 : CELL_INFO; constant BC_6 : CELL_INFO; -- Boundary Register declarations attribute BOUNDARY_CELLS : string; attribute BOUNDARY_LENGTH : integer; attribute BOUNDARY_REGISTER : string; -- Miscellaneous attribute DESIGN_WARNING : string; end STD_1149_1_1990; -- End of 1149.1-1990 Package package body STD_1149_1_1990 is -- Standard Boundary Cells -- Written 900525 - -- Description for f10-12, f10-16, f10-18c, f10-18d, f10-21c constant BC_1 : CELL_INFO := ((INPUT, EXTEST, PI), (OUTPUT2, EXTEST, PI), (INPUT, SAMPLE, PI), (OUTPUT2, SAMPLE, PI), (INPUT, INTEST, PI), (OUTPUT2, INTEST, PI), (INPUT, RUNBIST, PI), (OUTPUT2, RUNBIST, PI), (OUTPUT3, EXTEST, PI), (INTERNAL, EXTEST, PI), (OUTPUT3, SAMPLE, PI), (INTERNAL, SAMPLE, PI), (OUTPUT3, INTEST, PI), (INTERNAL, INTEST, PI), (OUTPUT3, RUNBIST, PI), (INTERNAL, RUNBIST, PI), (CONTROL, EXTEST, PI), (CONTROLR, EXTEST, PI), (CONTROL, SAMPLE, PI), (CONTROLR, SAMPLE, PI), (CONTROL, INTEST, PI), (CONTROLR, INTEST, PI), (CONTROL, RUNBIST, PI), (CONTROLR, RUNBIST, PI) ); - -- Description for f10-8, f10-17, f10-19c, f10-19d, f10-22c constant BC_2 : CELL_INFO := ((INPUT, EXTEST, PI), (OUTPUT2, EXTEST, UPD), (INPUT, SAMPLE, PI), (OUTPUT2, SAMPLE, PI), (INPUT, INTEST, UPD), -- Intest on output2 not supported (INPUT, RUNBIST, UPD), (OUTPUT2, RUNBIST, UPD), (OUTPUT3, EXTEST, UPD), (INTERNAL, EXTEST, PI), (OUTPUT3, SAMPLE, PI), (INTERNAL, SAMPLE, PI), (OUTPUT3, INTEST, PI), (INTERNAL, INTEST, UPD), (OUTPUT3, RUNBIST, PI), (INTERNAL, RUNBIST, UPD), (CONTROL, EXTEST, UPD), (CONTROLR, EXTEST, UPD), (CONTROL, SAMPLE, PI), (CONTROLR, SAMPLE, PI), (CONTROL, INTEST, PI), (CONTROLR, INTEST, PI), (CONTROL, RUNBIST, PI), (CONTROLR, RUNBIST, PI) ); - -- Description for f10-9 constant BC_3 : CELL_INFO := ((INPUT, EXTEST, PI), (INTERNAL, EXTEST, PI), (INPUT, SAMPLE, PI), (INTERNAL, SAMPLE, PI), (INPUT, INTEST, PI), (INTERNAL, INTEST, PI), (INPUT, RUNBIST, PI), (INTERNAL, RUNBIST, PI) ); - -- Description for f10-10, f10-11 constant BC_4 : CELL_INFO := ((INPUT, EXTEST, PI), -- Intest on input not supported (INPUT, SAMPLE, PI), -- Runbist on input not supported (CLOCK, EXTEST, PI), (INTERNAL, EXTEST, PI), (CLOCK, SAMPLE, PI), (INTERNAL, SAMPLE, PI), (CLOCK, INTEST, PI), (INTERNAL, INTEST, PI), (CLOCK, RUNBIST, PI), (INTERNAL, RUNBIST, PI) ); - -- Description for f10-20c, a combined Input/Control constant BC_5 : CELL_INFO := ((INPUT, EXTEST, PI), (CONTROL, EXTEST, PI), (INPUT, SAMPLE, PI), (CONTROL, SAMPLE, PI), (INPUT, INTEST, UPD), (CONTROL, INTEST, UPD), (INPUT, RUNBIST, PI), (CONTROL, RUNBIST, PI) ); - -- Description for f10-22d, a reversible cell constant BC_6 : CELL_INFO := ((BIDIR_IN, EXTEST, PI), (BIDIR_OUT, EXTEST, UPD), (BIDIR_IN, SAMPLE, PI), (BIDIR_OUT, SAMPLE, PI), (BIDIR_IN, INTEST, UPD), (BIDIR_OUT, INTEST, PI), (BIDIR_IN, RUNBIST, UPD), (BIDIR_OUT, RUNBIST, PI) ); end STD_1149_1_1990; -- End of 1149.1-1990 Package Body - ----Part 7-----BSDL Porting Notes---------------------------------------------- This section that follows contains responses from BSDL users giving help in porting to non-HP systems. These may give clues to problems you may experience. - ------------------------------------------------------------------------------- Oct. 16, 1990 Contributed by Ismed Hartanto, University of Illinois, Urbana Champaign; hartanto@crhc.uiuc.edu Problems found in porting to SUN3 with SunOS-4.0: 1) in Yacc; uppercase routine 'toupper' does not accept (and return unchanged) non-alpha characters. Fix: at (approx) line 510 of yacc code change: for (P = Str; (c = *P) != '\0'; P++) *P = toupper(c); to: for (P = Str; (c = *P) != '\0'; P++) { if (islower (c)) *P = toupper(c); /* Added by IH */ else *P = c; } Fix: at (approx) line 580 of yacc code change: {Ch = toupper(getc(f)); /* Read the input file and uppercase Ch */ to: {Ch = getc(f); /* Read the input file and uppercase Ch */ if (islower(Ch)) Ch = toupper(Ch); /* Added by IH */ Note, depending on your system's library structure, you may need to add: #include 2) In Lex: "too many definitions" error; the original lex code has intermediate definitions for tokens, followed by rules. Example: ... Cell_Info CELL_INFO <- intermediate def ... ... {Cell_Info} {BEGIN PAC; return(CELL_INFO); } <- rule ... Solution, remove intermediate definitions like so: ... CELL_INFO {BEGIN PAC; return(CELL_INFO); } <- rule ... Note here that the intermediate def is gone, and the token is followed directly by the rule. The U-of-I version of lex is given below. It is smaller and works on SUN. It may also work on other systems that experience the table size problem. The intermediate definition structure was used in the original lex code to support case insensitivity in an earlier version. That need was eliminated by adding the BSDL_getc routine that eliminates lowercase alphas. - -------U of Illinois BSDL lex-------------------------------------------------- %{ /*---------------------------------------------------------- * * Lex source for BSDL * *----------------------------------------------------------*/ /* Date: 901016 */ /* Ismed Hartanto hartanto@crhc.uiuc.edu */ /* Begin lex input specifications */ /* deleted by IH #include */ #include char Save_String[80]; #undef input /* Replace Lex's input routine with BSDL's */ /* Note, BSDL_getc will uppercase all letters */ /* This will reduce Lex table space */ #define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):BSDL_getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) #define BINARY 0 #define DECIMAL 1 #define BIN_X 2 #define ECHO_LN printf ("%s\n",yytext); /* Added by IH */ int Base = DECIMAL; /* Some of the definitions are deleted and changed to make it compileable in the SUN's */ /* by IH */ %} %a 2800 %e 1200 %p 4700 %n 520 %k 140 %o 3000 %START RES BOU REG PAC White [ \t\b]* VHDL_Comment \-\-[^\n]* Binary_Pattern [0-1]+ Bin_X_Pattern [0-1X]+ Digit [0-9] Exponent [E][+-]?{Digit}+ Real_Number {Digit}+[\.]{Digit}+{Exponent} Decimal_Number {Digit}+ Identifier [A-Z][A-Z0-9_]* Quoted_String \"[^\"\n]*\" Concatenate & Single_Quote [\'] Semicolon ; Eol [\n] Comma [,] Lparen [\(] Rparen [\)] Lbracket [\[] Rbracket [\]] Colon_Equal \:\= Colon [\:] Period [\.] Asterisk [\*] Box [\<][\>] Illegal [^A-Z0-9 \t\b\n\"\&\'\*\(\)\[\]\_\:\.\,\;\<\>] %% ENTITY {return(ENTITY); } PORT {Base = DECIMAL; /* Default number base */ return(PORT); } GENERIC {Base = DECIMAL; return(GENERIC); } USE {Base = DECIMAL; return(USE); } ATTRIBUTE {Base = DECIMAL; return(ATTRIBUTE); } IS {return(IS); } CONSTANT {Base = DECIMAL; return(CONSTANT); } STRING {return(STRING); } END {Base = DECIMAL; BEGIN INITIAL; /* Turn off start conditions */ return(END); } ALL {return(ALL); } OF {return(OF); } PIN_MAP {return(PIN_MAP); } PHYSICAL_PIN_MAP {return(PHYSICAL_PIN_MAP); } PIN_MAP_STRING {return(PIN_MAP_STRING); } TRUE {return(TRUE); } FALSE {return(FALSE); } SIGNAL {return(SIGNAL); } TAP_SCAN_IN {return(TAP_SCAN_IN); } TAP_SCAN_OUT {return(TAP_SCAN_OUT); } TAP_SCAN_CLOCK {return(TAP_SCAN_CLOCK); } TAP_SCAN_MODE {return(TAP_SCAN_MODE); } TAP_SCAN_RESET {return(TAP_SCAN_RESET); } LOW {return(LOW); } BOTH {return(BOTH); } IN {return(IN); } OUT {return(OUT); } INOUT {return(INOUT); } BUFFER {return(BUFFER); } LINKAGE {return(LINKAGE); } BIT {return(BIT); } BIT_VECTOR {return(BIT_VECTOR); } TO {return(TO); } DOWNTO {return(DOWNTO); } PACKAGE {return(PACKAGE); } BODY {return(BODY); } TYPE {return(TYPE); } SUBTYPE {return(SUBTYPE); } RECORD {return(RECORD); } ARRAY {Base = DECIMAL; return(ARRAY); } POSITIVE {return(POSITIVE); } RANGE {return(RANGE); } CELL_INFO {BEGIN PAC; return(CELL_INFO); } INSTRUCTION_LENGTH {return(INSTRUCTION_LENGTH); } INSTRUCTION_OPCODE {Base = BINARY; /* Enable Binary Patterns */ return(INSTRUCTION_OPCODE); } INSTRUCTION_CAPTURE {Base = BIN_X; /* Enable Bin_X Patterns */ return(INSTRUCTION_CAPTURE); } INSTRUCTION_DISABLE {return(INSTRUCTION_DISABLE); } INSTRUCTION_GUARD {return(INSTRUCTION_GUARD); } INSTRUCTION_PRIVATE {return(INSTRUCTION_PRIVATE); } INSTRUCTION_USAGE {return(INSTRUCTION_USAGE); } INSTRUCTION_SEQUENCE {return(INSTRUCTION_SEQUENCE); } REGISTER_ACCESS {BEGIN REG; return(REGISTER_ACCESS); } BOUNDARY_CELLS {return(BOUNDARY_CELLS); } BOUNDARY_LENGTH {return(BOUNDARY_LENGTH); } BOUNDARY_REGISTER {BEGIN BOU; return(BOUNDARY_REGISTER); } IDCODE_REGISTER {Base = BIN_X; return(IDCODE_REGISTER); } USERCODE_REGISTER {Base = BIN_X; return(USERCODE_REGISTER); } DESIGN_WARNING {return(DESIGN_WARNING); } BOUNDARY {return(BOUNDARY); } BYPASS {return(BYPASS); } IDCODE {return(IDCODE); } USERCODE {return(USERCODE); } INPUT {return(INPUT); } OUTPUT2 {return(OUTPUT2); } OUTPUT3 {return(OUTPUT3); } CONTROLR {return(CONTROLR); } CONTROL {return(CONTROL); } INTERNAL {return(INTERNAL); } CLOCK {return(CLOCK); } BIDIR {return(BIDIR); } BIDIR_IN {return(BIDIR_IN); } BIDIR_OUT {return(BIDIR_OUT); } EXTEST {return(EXTEST); } SAMPLE {return(SAMPLE); } INTEST {return(INTEST); } RUNBIST {return(RUNBIST); } PI {return(PI); } PO {return(PO); } UPD {return(UPD); } CAP {return(CAP); } X {return(X); } ZERO {return(ZERO); } ONE {return(ONE); } Z {return(Z); } WEAK0 {return(WEAK0); } WEAK1 {return(WEAK1); } {Eol} {Line_Number++; /* Count lines */} {Comma} {return(COMMA); } {Lparen} {return(LPAREN);} {Rparen} {return(RPAREN);} {Period} {return(PERIOD); } {Lbracket} {return(LBRACKET); } {Rbracket} {return(RBRACKET); } {Colon} {return(COLON); } {Asterisk} {return(ASTERISK); } {Box} {return(BOX); } {Single_Quote} {Base = BIN_X; return(SINGLE_QUOTE); } {Colon_Equal} {return(COLON_EQUAL); } {White} { /* Do Nothing on White Space */ } {VHDL_Comment} { /* Do Nothing on Comments */ } {Bin_X_Pattern} {if (Base != BIN_X) REJECT; strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(BIN_X_PATTERN);} {Identifier} {strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(IDENTIFIER); } {Quoted_String} {strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(QUOTED_STRING); } {Binary_Pattern} {if (Base != BINARY) REJECT; strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(BINARY_PATTERN);} {Decimal_Number} {if (Base != DECIMAL) REJECT; yylval = atoi((char *)yytext); return(DECIMAL_NUMBER);} {Real_Number} {strcpy(Save_String, (char *)yytext); yylval = (int) Save_String; return(REAL_NUMBER);} {Concatenate} {return(CONCATENATE);} {Semicolon} {return(SEMICOLON);} {Illegal} {fprintf(stderr, "Error: Illegal character %c (/%03o) at line %d:\n", (char)yytext[yyleng-1], (int)yytext[yyleng-1], Line_Number); Compile_Errors++; return(ILLEGAL); /* Will cause syntax error */} %% void Initialize_Lex(f) /* Change input file from STDIN to BSDL file */ FILE *f; {yyin = f; /* Change file names */ String_Text = (char *)malloc(sizeof(Text_Array_Type)); Line_Ptr_Array=(Line_Ptr_Array_Type *)malloc(sizeof(Line_Ptr_Array_Type)); } int yywrap() {fclose(yyin); if (String_Text != 0) free(String_Text); if (Line_Ptr_Array != 0) free(Line_Ptr_Array); return(1); } - ---------------------------------------------------------------------- From: HANSEN@fred.dnet.EDA.Teradyne.COM Received: by teda.EDA.Teradyne.COM (4.1/SMI-4.1/M-teda.910616b) id AA13695; Thu, 25 Jul 91 19:44:52 PDT X-Recip: parker%hpmtlkpp@hplabs.hp.com X-Rewrite-Recip: pyramid!hplabs!parker%hpmtlkpp Received: from teda.DNET (teda.eda.teradyne.com) by teda.EDA.Teradyne.COM (4.1/SMI-4.1/M-teda.910616b) id AA13518; Thu, 25 Jul 91 19:28:47 PDT Received: from FRED.DNET by teda.DNET (DNImail v1.2mcl 5/14/91) id AA13517; Thu, 25 Jul 91 19:28:47 PDT Date: Thu, 25 Jul 91 19:28:47 PDT Message-Id: <9107260228.AA13517@FRED.DNET.EDA.Teradyne.COM> X-Vms-To: @PARKER X-Vms-Cc: HANSEN To: parker@hpmtlkpp.lvld.hp.com Subject: BSDL_getc() problem ANSI C specifies that the function getc() be prototype as:: int getc (FILE *stream); The BSDL parser replaces getc() with the new function BSDL_getc() of the form: char BSDL_getc(FILE *stream); In addition, in the body of BSDL_getc() the variable Ch is declared as type char. Neither of these declarations are guaranteed to work in ANSII C since the EOF value that is returned by getc() is not necessarily representable by type char (see the second edition of Kernigan & Richie, page 16). The correct declarations are: int BSDL_getc(FILE *stream); and int Ch; /* as a local variable in BSDL_getch() */ Most compilers I have used don't care about this, but one (MetaWare HighC) never recognizes the EOF character. - ----End of File------------Remove this line--------------------------- ------- End of Forwarded Message