PageRenderTime 40ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/alliance-5.0/abv/src/bvl_bcomp_y.y

#
Happy | 2345 lines | 2111 code | 234 blank | 0 comment | 0 complexity | 463b6d91511872e04303d842eb855394 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0

Large files files are truncated, but you can click here to view the full file

  1. /*------------------------------------------------------------\
  2. | |
  3. | This file is part of the Alliance CAD System Copyright |
  4. | (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
  5. | |
  6. | Home page : http://www-asim.lip6.fr/alliance/ |
  7. | E-mail : mailto:alliance-users@asim.lip6.fr |
  8. | |
  9. | This progam is free software; you can redistribute it |
  10. | and/or modify it under the terms of the GNU Library General|
  11. | Public License as published by the Free Software Foundation |
  12. | either version 2 of the License, or (at your option) any |
  13. | later version. |
  14. | |
  15. | Alliance VLSI CAD System is distributed in the hope that |
  16. | it will be useful, but WITHOUT ANY WARRANTY; |
  17. | without even the implied warranty of MERCHANTABILITY or |
  18. | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
  19. | Public License for more details. |
  20. | |
  21. | You should have received a copy of the GNU General Public |
  22. | License along with the GNU C Library; see the file COPYING. |
  23. | If not, write to the Free Software Foundation, Inc., |
  24. | 675 Mass Ave, Cambridge, MA 02139, USA. |
  25. | |
  26. \------------------------------------------------------------*/
  27. /* ###--------------------------------------------------------------### */
  28. /* */
  29. /* file : bvl_bcomp.yac */
  30. /* date : Oct 4 1993 */
  31. /* version : v108 */
  32. /* author : P. BAZARGAN, L.A. TABUSSE, VUONG H.N. */
  33. /* content : yacc rules for behavioural VHDL */
  34. /* */
  35. /* ###--------------------------------------------------------------### */
  36. %{
  37. #include <stdio.h>
  38. #include <stdlib.h>
  39. #include <string.h>
  40. #include "mut.h"
  41. #include "aut.h"
  42. #include "abl.h"
  43. #include "bdd.h"
  44. #include "abe.h"
  45. #include "bvl_utype.h"
  46. #include "bvl_util.h"
  47. #include "bvl_byacc.h"
  48. #include "bvl_bedef.h"
  49. %}
  50. %union {
  51. long valu;
  52. char *text;
  53. bvl_ablstr list;
  54. bvl_name name;
  55. struct g_type dble;
  56. };
  57. %token tok_AND
  58. %token <valu> PRAGMA
  59. %token _BEGIN
  60. %token _END
  61. %token _EQSym
  62. %token _EXIT
  63. %token _FILE
  64. %token _GESym
  65. %token _GTSym
  66. %token _IN
  67. %token _INOUT
  68. %token _LABEL
  69. %token _LESym
  70. %token _LINKAGE
  71. %token _LTSym
  72. %token _NAND
  73. %token _NESym
  74. %token _NEXT
  75. %token _NOR
  76. %token _NOT
  77. %token tok_NULL
  78. %token _OR
  79. %token _OUT
  80. %token _XOR
  81. %token ABS
  82. %token ACCESS
  83. %token AFTER
  84. %token ALIAS
  85. %token ALL
  86. %token ARCHITECTURE
  87. %token ARRAY
  88. %token ASSERT
  89. %token ATTRIBUTE
  90. %token <text> AbstractLit
  91. %token Ampersand
  92. %token Apostrophe
  93. %token Arrow
  94. %token BIT
  95. %token BIT_VECTOR
  96. %token _BLOCK
  97. %token BODY
  98. %token BUFFER
  99. %token BUS
  100. %token Bar
  101. %token BasedInt
  102. %token BasedReal
  103. %token <text> BitStringLit
  104. %token Box
  105. %token CASE
  106. %token COMPONENT
  107. %token CONFIGURATION
  108. %token CONSTANT
  109. %token <text> CharacterLit
  110. %token Colon
  111. %token Comma
  112. %token DISCONNECT
  113. %token DOWNTO
  114. %token DecimalInt
  115. %token DecimalReal
  116. %token Dot
  117. %token DoubleStar
  118. %token ELSE
  119. %token ELSIF
  120. %token ENTITY
  121. %token ERROR
  122. %token FOR
  123. %token FUNCTION
  124. %token GENERATE
  125. %token GENERIC
  126. %token GUARDED
  127. %token IF
  128. %token IS
  129. %token <text> Identifier
  130. %token LIBRARY
  131. %token LOOP
  132. %token LeftParen
  133. %token MAP
  134. %token MOD
  135. %token MUX_BIT
  136. %token MUX_VECTOR
  137. %token Minus
  138. %token NATURAL
  139. %token NATURAL_VECTOR
  140. %token NEW
  141. %token OF
  142. %token ON
  143. %token OPEN
  144. %token OTHERS
  145. %token _PACKAGE
  146. %token PORT
  147. %token PROCEDURE
  148. %token PROCESS
  149. %token Plus
  150. %token _PS
  151. %token _NS
  152. %token _US
  153. %token _MS
  154. %token RANGE
  155. %token RECORD
  156. %token REG_BIT
  157. %token REG_VECTOR
  158. %token REGISTER
  159. %token REM
  160. %token REPORT
  161. %token RETURN
  162. %token RightParen
  163. %token SELECT
  164. %token SEVERITY
  165. %token SIGNAL
  166. %token _STABLE
  167. %token SUBTYPE
  168. %token Semicolon
  169. %token Slash
  170. %token Star
  171. %token <text> StringLit
  172. %token THEN
  173. %token TO
  174. %token TRANSPORT
  175. %token _TYPE
  176. %token UNITS
  177. %token UNTIL
  178. %token USE
  179. %token VARIABLE
  180. %token VarAsgn
  181. %token WAIT
  182. %token WARNING
  183. %token WHEN
  184. %token WHILE
  185. %token WITH
  186. %token WOR_BIT
  187. %token WOR_VECTOR
  188. %left tok_AND _OR _NAND _NOR _XOR
  189. %left _EQSym _NESym
  190. %left _NOT
  191. %type <text> choice
  192. %type <text> .simple_name.
  193. %type <text> simple_name
  194. %type <text> a_label
  195. %type <text> .label.
  196. %type <text> label
  197. %type <valu> severity__message
  198. %type <text> report__message
  199. %type <valu> .SEVERITY__expression.
  200. %type <text> .REPORT__expression.
  201. %type <text> .guard_expression.
  202. %type <text> guard_expression
  203. %type <list> ...waveform__WHEN__choices..
  204. %type <list> waveform__WHEN__choices
  205. %type <list> waveform_element
  206. %type <list> waveform
  207. %type <list> expression
  208. %type <valu> .GUARDED.
  209. %type <list> relation..AND__relation..
  210. %type <list> relation..OR__relation..
  211. %type <list> relation.NAND_NOR__relation.
  212. %type <list> relation..XOR__relation..
  213. %type <list> relation
  214. %type <list> simple_expression
  215. %type <list> .sign.term..add_op__term..
  216. %type <list> term
  217. %type <list> factor
  218. %type <list> primary
  219. %type <valu> relational_operator
  220. %type <text> literal
  221. %type <list> aggregate
  222. %type <valu> .signal_kind.
  223. %type <valu> .mode.
  224. %type <dble> type_mark
  225. %type <name> .constraint.
  226. %type <name> constraint
  227. %type <name> range
  228. %type <valu> direction
  229. %type <valu> abstractlit
  230. %type <name> name
  231. %type <name> slice_name
  232. %type <name> indexed_name
  233. %type <name> target
  234. %type <name> attribute_name
  235. %type <valu> generic_element_association
  236. %type <text> constant_VarAsgn__expression
  237. %start design_file
  238. %%
  239. design_file
  240. : /*empty*/
  241. {
  242. /* ###----------------------------------------------### */
  243. /* Initializations */
  244. /* - erroneous description presumed ! */
  245. /* ###----------------------------------------------### */
  246. BVL_NM1LST = NULL;
  247. BVL_GRDLST = NULL;
  248. BVL_CNDLST = NULL;
  249. BVL_VALLST = NULL;
  250. BVL_ERRFLG = 0;
  251. dic = beh_initab ();
  252. BVL_BEFPNT = beh_addbefig (BVL_HEDFIG,NULL);
  253. BVL_BEFPNT->ERRFLG = 1;
  254. BVL_HEDFIG = BVL_BEFPNT;
  255. }
  256. entity_declaration
  257. architecture_body
  258. {
  259. struct beout *beout_pnt;
  260. struct beaux *beaux_pnt;
  261. struct bebus *bebus_pnt;
  262. struct bereg *bereg_pnt;
  263. struct berin *berin_pnt;
  264. struct beaux *beaux_pred;
  265. struct berin *berin_pred;
  266. /* ###----------------------------------------------### */
  267. /* Checking that each output have at least one driver*/
  268. /* ###----------------------------------------------### */
  269. beout_pnt = BVL_BEFPNT->BEOUT;
  270. while (beout_pnt != NULL)
  271. {
  272. if (beout_pnt->ABL == NULL)
  273. bvl_error (40, beout_pnt->NAME);
  274. beout_pnt = beout_pnt->NEXT;
  275. }
  276. beaux_pnt = BVL_BEFPNT->BEAUX;
  277. beaux_pred=NULL;
  278. while (beaux_pnt != NULL)
  279. {
  280. if (beaux_pnt->ABL == NULL)
  281. {
  282. fprintf (stderr,"`%s` Warning %d line %d :",BVL_CURFIL,40,BVL_LINNUM);
  283. fprintf (stderr,"signal `%s` never assigned\n",beaux_pnt->NAME);
  284. /*removing signal*/
  285. if ( beaux_pred ) beaux_pred->NEXT = beaux_pnt->NEXT;
  286. else BVL_BEFPNT->BEAUX = beaux_pnt->NEXT;
  287. /*removing other ref to signal*/
  288. berin_pred = NULL;
  289. for ( berin_pnt = BVL_BEFPNT->BERIN; berin_pnt; berin_pnt = berin_pnt->NEXT )
  290. {
  291. if ( berin_pnt->NAME == beaux_pnt->NAME )
  292. {
  293. if ( berin_pred ) berin_pred->NEXT = berin_pnt->NEXT;
  294. else BVL_BEFPNT->BERIN = berin_pnt->NEXT;
  295. break;
  296. }
  297. berin_pred = berin_pnt;
  298. }
  299. }
  300. else beaux_pred = beaux_pnt;
  301. beaux_pnt = beaux_pnt->NEXT;
  302. }
  303. bebus_pnt = BVL_BEFPNT->BEBUS;
  304. while (bebus_pnt != NULL)
  305. {
  306. if (bebus_pnt->BIABL == NULL)
  307. bvl_error (40, bebus_pnt->NAME);
  308. bebus_pnt = bebus_pnt->NEXT;
  309. }
  310. bereg_pnt = BVL_BEFPNT->BEREG;
  311. while (bereg_pnt != NULL)
  312. {
  313. if (bereg_pnt->BIABL == NULL)
  314. bvl_error (40,bereg_pnt->NAME);
  315. bereg_pnt = bereg_pnt->NEXT;
  316. }
  317. if (BVL_ERRFLG == 0)
  318. BVL_BEFPNT->ERRFLG = 0;
  319. beh_fretab (dic);
  320. }
  321. ;
  322. entity_declaration
  323. : ENTITY
  324. simple_name
  325. IS
  326. {
  327. BVL_BEFPNT->NAME = $2;
  328. BVL_MODNAM = $2;
  329. }
  330. .generic_clause.
  331. .port_clause.
  332. END_ERR
  333. .simple_name.
  334. Semicolon_ERR
  335. {
  336. if (($8 != NULL) && ($8 != $2))
  337. bvl_error (1,$8);
  338. }
  339. | ENTITY
  340. error
  341. {
  342. bvl_error (2,NULL);
  343. }
  344. ;
  345. .generic_clause.
  346. : /*empty*/
  347. | generic_clause
  348. {
  349. BVL_BEFPNT->BEGEN = BVL_GENPNT;
  350. BVL_GENPNT = NULL;
  351. }
  352. ;
  353. generic_clause
  354. : GENERIC
  355. LeftParen
  356. formal_generic_list
  357. RightParen_ERR
  358. Semicolon_ERR
  359. | GENERIC
  360. error
  361. Semicolon_ERR
  362. { bvl_error (74,NULL); }
  363. ;
  364. formal_generic_list
  365. : formal_generic_element
  366. ...formal_generic_element..
  367. ;
  368. ...formal_generic_element..
  369. : /*empty*/
  370. | ...formal_generic_element..
  371. Semicolon_ERR
  372. formal_generic_element
  373. ;
  374. formal_generic_element
  375. : CONSTANT
  376. identifier_list
  377. Colon
  378. type_mark
  379. .constraint.
  380. generic_VarAsgn__expression
  381. {
  382. char *type;
  383. if ($5.FLAG == $4.FLAG)
  384. {
  385. BVL_NM1LST = reverse (BVL_NM1LST);
  386. type = namealloc ("natural");
  387. BVL_GENPNT = bvl_addgen (BVL_GENPNT,BVL_INTLST,BVL_NM1LST,
  388. type,$5.LEFT,$5.RIGHT);
  389. }
  390. else
  391. bvl_error (33,NULL);
  392. freechain (BVL_NM1LST);
  393. freechain (BVL_INTLST);
  394. BVL_NM1LST = NULL;
  395. BVL_INTLST = NULL;
  396. }
  397. | error
  398. {
  399. /* ###----------------------------------------------### */
  400. /* The following 3 lines reject tokens until the */
  401. /* sync. token 'Semicolon' is found */
  402. /* ###----------------------------------------------### */
  403. do
  404. yychar = yylex ();
  405. while ((yychar != Semicolon) && (yychar != 0));
  406. yyerrok;
  407. bvl_error (75,NULL);
  408. }
  409. ;
  410. generic_VarAsgn__expression
  411. : VarAsgn
  412. generic_expression
  413. ;
  414. generic_expression
  415. : abstractlit
  416. {
  417. long *ptlong;
  418. ptlong = (long *) mbkalloc (sizeof(long));
  419. *ptlong = $1;
  420. BVL_INTLST = addchain (BVL_INTLST,(void *)ptlong);
  421. }
  422. | generic_aggregate
  423. ;
  424. generic_aggregate
  425. : LeftParen
  426. generic_element_association
  427. {
  428. long *ptlong;
  429. ptlong = (long *) mbkalloc (sizeof(long));
  430. *ptlong = $2;
  431. BVL_INTLST = addchain (BVL_INTLST,(void *)ptlong);
  432. }
  433. ...generic_element_association..
  434. RightParen_ERR
  435. ;
  436. ...generic_element_association..
  437. : /* empty */
  438. | ...generic_element_association..
  439. Comma
  440. generic_element_association
  441. {
  442. long *ptlong;
  443. ptlong = (long *) mbkalloc (sizeof(long));
  444. *ptlong = $3;
  445. BVL_INTLST = addchain (BVL_INTLST,(void *)ptlong);
  446. }
  447. ;
  448. generic_element_association
  449. : abstractlit
  450. {$$ = $1;}
  451. ;
  452. .constraint.
  453. : /*empty*/
  454. {
  455. $$.FLAG = 'S';
  456. $$.LEFT = -1;
  457. $$.RIGHT = -1;
  458. }
  459. | constraint
  460. { $$ = $1; }
  461. ;
  462. constraint
  463. : LeftParen
  464. range
  465. RightParen_ERR
  466. { $$ = $2; }
  467. ;
  468. range
  469. : abstractlit
  470. direction
  471. abstractlit
  472. {
  473. $$.FLAG = 'A';
  474. $$.LEFT = $1;
  475. $$.RIGHT = $3;
  476. if ((($1 > $3) && ($2 == BVL_UPTDFN)) ||
  477. (($1 < $3) && ($2 == BVL_DWTDFN)) ||
  478. (($1 < 0 ) || ($2 < 0 )))
  479. {
  480. bvl_error (32,NULL);
  481. }
  482. }
  483. ;
  484. direction
  485. : TO
  486. { $$ = BVL_UPTDFN; }
  487. | DOWNTO
  488. { $$ = BVL_DWTDFN; }
  489. ;
  490. .port_clause.
  491. : /*empty*/
  492. | port_clause
  493. ;
  494. port_clause
  495. : PORT
  496. LeftParen
  497. formal_port_list
  498. RightParen_ERR
  499. Semicolon_ERR
  500. | PORT
  501. error
  502. Semicolon_ERR
  503. { bvl_error (3,NULL); }
  504. ;
  505. formal_port_list
  506. : formal_port_element
  507. ...formal_port_element..
  508. ;
  509. ...formal_port_element..
  510. : /*empty*/
  511. | ...formal_port_element..
  512. Semicolon_ERR
  513. formal_port_element
  514. ;
  515. formal_port_element
  516. : .SIGNAL.
  517. identifier_list
  518. Colon
  519. .mode.
  520. type_mark
  521. .constraint.
  522. .signal_kind.
  523. {
  524. char *signame;
  525. long sigconf;
  526. void *pnt;
  527. /* ###----------------------------------------------### */
  528. /* First, check the validity of the declaration. */
  529. /* Then, for each port, create the apropriate set of */
  530. /* structures (berin, bepor, beout, bebus) */
  531. /* ###----------------------------------------------### */
  532. chkdcl ('P', $4, $5.VALU, $5.FLAG, $7, $6.FLAG, &sigconf);
  533. BVL_NM1LST = reverse (BVL_NM1LST);
  534. while (BVL_NM1LST != NULL)
  535. {
  536. signame = (char *)BVL_NM1LST->DATA;
  537. if (beh_chktab (dic,signame,BVL_MODNAM,BVL_SIGDFN) != 0)
  538. bvl_error (4,signame);
  539. pnt = addstr (BVL_BEFPNT,'P',$4,$5.VALU,$5.FLAG,signame,
  540. $6.LEFT,$6.RIGHT);
  541. beh_addtab (dic,signame,BVL_MODNAM,BVL_SIGDFN,sigconf);
  542. beh_addtab (dic,signame,BVL_MODNAM,BVL_WMNDFN,$6.LEFT);
  543. beh_addtab (dic,signame,BVL_MODNAM,BVL_WMXDFN,$6.RIGHT);
  544. beh_addtab (dic,signame,BVL_MODNAM,BVL_PNTDFN,(long)pnt);
  545. BVL_NM1LST = delchain (BVL_NM1LST, BVL_NM1LST);
  546. }
  547. }
  548. | error
  549. {
  550. /* ###----------------------------------------------### */
  551. /* The following 3 lines reject tokens until the */
  552. /* sync. token 'Semicolon' is found */
  553. /* ###----------------------------------------------### */
  554. do
  555. yychar = yylex ();
  556. while ((yychar != Semicolon) && (yychar != 0));
  557. yyerrok;
  558. bvl_error (6,NULL);
  559. }
  560. ;
  561. .SIGNAL.
  562. : /*empty*/
  563. | SIGNAL
  564. ;
  565. .mode.
  566. : /*empty*/
  567. { $$ = _IN; }
  568. | _IN
  569. { $$ = _IN; }
  570. | _OUT
  571. { $$ = _OUT; }
  572. | _INOUT
  573. { $$ = _INOUT; }
  574. ;
  575. architecture_body
  576. : ARCHITECTURE
  577. Identifier
  578. OF
  579. simple_name
  580. IS
  581. {
  582. if ($4 != BVL_MODNAM)
  583. bvl_error (1,$4);
  584. }
  585. architecture_declarative_part
  586. _BEGIN
  587. architecture_statement_part
  588. END_ERR
  589. .simple_name.
  590. Semicolon_ERR
  591. {
  592. if (($11 != NULL) && ($11 != $2))
  593. bvl_error (7,$11);
  594. }
  595. | ARCHITECTURE
  596. error
  597. { bvl_error (8,NULL); }
  598. ;
  599. architecture_declarative_part
  600. : ..block_declarative_item..
  601. ;
  602. ..block_declarative_item..
  603. : /*empty*/
  604. | ..block_declarative_item..
  605. block_declarative_item
  606. ;
  607. block_declarative_item
  608. : signal_declaration
  609. | pragma_declaration
  610. | constant_declaration
  611. | error
  612. Semicolon_ERR
  613. { bvl_error (9,NULL); }
  614. ;
  615. pragma_declaration
  616. : PRAGMA
  617. {
  618. char pragma[30];
  619. char type [100];
  620. char name [100];
  621. sscanf((char *)$1,"-- %s %s %s", pragma,type,name);
  622. BVL_BEFPNT->BEPGM = beh_addbepgm(BVL_BEFPNT->BEPGM,
  623. type,name,(void *)0);
  624. }
  625. ;
  626. constant_declaration
  627. : CONSTANT
  628. Identifier
  629. Colon
  630. type_mark
  631. .constraint.
  632. constant_VarAsgn__expression
  633. Semicolon_ERR
  634. {
  635. long sigconf;
  636. if (chkdcl ('C',0,$4.VALU,$4.FLAG,0,$5.FLAG,&sigconf) == 0)
  637. {
  638. beh_addtab (dic,$2,BVL_MODNAM,BVL_WMNDFN,$5.LEFT);
  639. beh_addtab (dic,$2,BVL_MODNAM,BVL_WMXDFN,$5.RIGHT);
  640. beh_addtab (dic,$2,BVL_MODNAM,BVL_SIGDFN,sigconf);
  641. beh_addtab (dic,$2,NULL,BVL_PNTDFN,$6);
  642. }
  643. }
  644. ;
  645. constant_VarAsgn__expression
  646. : VarAsgn
  647. literal
  648. { $$ = $2; }
  649. ;
  650. signal_declaration
  651. : SIGNAL
  652. identifier_list
  653. Colon
  654. type_mark
  655. .constraint.
  656. .signal_kind.
  657. Semicolon_ERR
  658. {
  659. char *signame;
  660. long sigconf;
  661. void *pnt;
  662. long errflg;
  663. errflg = chkdcl ('S',0,$4.VALU,$4.FLAG,$6,$5.FLAG,&sigconf);
  664. /* ###----------------------------------------------### */
  665. /* First, check the validity of the declaration. */
  666. /* Then, for each signal, create the apropriate set of */
  667. /* structures (berin, bereg, beaux, bebux) */
  668. /* ###----------------------------------------------### */
  669. BVL_NM1LST = reverse (BVL_NM1LST);
  670. while (BVL_NM1LST != NULL)
  671. {
  672. signame = (char *)BVL_NM1LST->DATA;
  673. if (beh_chktab (dic,signame,BVL_MODNAM,BVL_SIGDFN) != 0)
  674. bvl_error (10,signame);
  675. pnt = addstr (BVL_BEFPNT,'S',0,$4.VALU,$4.FLAG,signame,
  676. $5.LEFT,$5.RIGHT);
  677. beh_addtab (dic,signame,BVL_MODNAM,BVL_SIGDFN,sigconf);
  678. beh_addtab (dic,signame,BVL_MODNAM,BVL_WMNDFN,$5.LEFT);
  679. beh_addtab (dic,signame,BVL_MODNAM,BVL_WMXDFN,$5.RIGHT);
  680. beh_addtab (dic,signame,BVL_MODNAM,BVL_PNTDFN,(long)pnt);
  681. BVL_NM1LST = delchain (BVL_NM1LST,BVL_NM1LST);
  682. }
  683. }
  684. ;
  685. .signal_kind.
  686. : /*empty*/
  687. { $$ = 0; }
  688. | REGISTER
  689. { $$ = REGISTER; }
  690. | BUS
  691. { $$ = BUS; }
  692. ;
  693. architecture_statement_part
  694. : ..concurrent_statement..
  695. ;
  696. ..concurrent_statement..
  697. : /*empty*/
  698. | ..concurrent_statement..
  699. concurrent_statement
  700. ;
  701. concurrent_statement
  702. : block_statement
  703. | concurrent_assertion_statement
  704. | concurrent_signal_assignment_statement
  705. | error
  706. Semicolon_ERR
  707. { bvl_error (18,NULL); }
  708. ;
  709. block_statement
  710. : a_label
  711. _BLOCK
  712. .guard_expression.
  713. _BEGIN
  714. {
  715. if (beh_chktab (dic,$1,BVL_MODNAM,BVL_LBLDFN) != 0)
  716. bvl_error (19,$1);
  717. beh_addtab (dic,$1,BVL_MODNAM,BVL_LBLDFN,1);
  718. if ($3 != NULL)
  719. BVL_GRDLST = addchain (BVL_GRDLST,(char *)$3);
  720. }
  721. set_of_statements
  722. END_ERR
  723. _BLOCK
  724. .label.
  725. Semicolon_ERR
  726. {
  727. if ($3 != NULL)
  728. BVL_GRDLST = delchain (BVL_GRDLST,BVL_GRDLST);
  729. if (($9 != NULL) && ($9 != $1))
  730. bvl_error (20,$9);
  731. }
  732. ;
  733. set_of_statements
  734. : ..concurrent_statement..
  735. ;
  736. concurrent_assertion_statement
  737. : a_label
  738. unlabeled_concurrent_assertion_statement
  739. {
  740. if (beh_chktab (dic,$1,BVL_MODNAM,BVL_LBLDFN) != 0)
  741. bvl_error (19,$1);
  742. beh_addtab (dic,$1,BVL_MODNAM,BVL_LBLDFN,1);
  743. if (BVL_ERRFLG == 0)
  744. BVL_BEFPNT->BEMSG->LABEL = $1;
  745. }
  746. | unlabeled_concurrent_assertion_statement
  747. ;
  748. concurrent_signal_assignment_statement
  749. : a_label
  750. unlabeled_conditional_signal_assignment
  751. {
  752. if (beh_chktab (dic,$1,BVL_MODNAM,BVL_LBLDFN) != 0)
  753. bvl_error (19,$1);
  754. beh_addtab (dic,$1,BVL_MODNAM,BVL_LBLDFN,1);
  755. }
  756. | unlabeled_conditional_signal_assignment
  757. | a_label
  758. unlabeled_selected_signal_assignment
  759. {
  760. if (beh_chktab (dic,$1,BVL_MODNAM,BVL_LBLDFN) != 0)
  761. bvl_error (19,$1);
  762. beh_addtab (dic,$1,BVL_MODNAM,BVL_LBLDFN,1);
  763. }
  764. | unlabeled_selected_signal_assignment
  765. ;
  766. unlabeled_concurrent_assertion_statement
  767. : assertion_statement
  768. ;
  769. assertion_statement
  770. : ASSERT
  771. expression
  772. .REPORT__expression.
  773. .SEVERITY__expression.
  774. Semicolon_ERR
  775. {
  776. if (BVL_ERRFLG == 0)
  777. {
  778. BVL_BEFPNT->BEMSG = beh_addbemsg(BVL_BEFPNT->BEMSG,NULL,$4,
  779. $3,$2.LIST_ABL->DATA,NULL);
  780. }
  781. }
  782. ;
  783. unlabeled_conditional_signal_assignment
  784. : target
  785. _LESym
  786. .GUARDED.
  787. ..waveform__WHEN__condition__ELSE..
  788. waveform
  789. Semicolon_ERR
  790. {
  791. long i;
  792. struct beout *beout_pnt;
  793. struct bebus *bebus_pnt;
  794. struct bereg *bereg_pnt;
  795. struct beaux *beaux_pnt;
  796. struct bebux *bebux_pnt;
  797. struct chain *abl_pnt;
  798. struct bvl_expr expr0;
  799. struct bvl_expr expr1;
  800. struct bvl_expr expr2;
  801. struct bvl_expr expr3;
  802. struct bvl_expr expr4;
  803. struct bvl_expr expr5;
  804. struct bvl_expr expr6;
  805. long rev_flg = 0;
  806. long left_bnd;
  807. long right_bnd;
  808. long left;
  809. long right;
  810. long in_bound;
  811. long out_bound;
  812. long sig_width;
  813. long sig_conf;
  814. expr4 = $5;
  815. while (BVL_CNDLST != NULL)
  816. {
  817. expr5 = *((bvl_ablstr *) BVL_CNDLST->DATA);
  818. expr6 = *((bvl_ablstr *) BVL_VALLST->DATA);
  819. expr0 = bvl_cpyablstr (expr5);
  820. expr1 = bvl_crtabl (ABL_NOT , expr5, BVL_EMPSTR,-1,-1);
  821. expr5 = expr0;
  822. expr2 = bvl_crtabl (ANDM, expr4, expr1 ,-1,-1);
  823. expr3 = bvl_crtabl (ANDM, expr6, expr5 ,-1,-1);
  824. expr4 = bvl_crtabl (ABL_OR , expr2, expr3 ,-1,-1);
  825. BVL_CNDLST = delchain (BVL_CNDLST,BVL_CNDLST);
  826. BVL_VALLST = delchain (BVL_VALLST,BVL_VALLST);
  827. }
  828. left_bnd = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_WMNDFN);
  829. right_bnd = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_WMXDFN);
  830. sig_conf = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_SIGDFN);
  831. left = $1.LEFT;
  832. right = $1.RIGHT;
  833. if (left_bnd <= right_bnd)
  834. {
  835. sig_width = right_bnd - left_bnd + 1;
  836. if (left <= right)
  837. {
  838. rev_flg = 0;
  839. in_bound = right_bnd - right;
  840. out_bound = right_bnd - left;
  841. if ((left < left_bnd) || (right > right_bnd))
  842. bvl_error (36,$1.NAME);
  843. }
  844. else
  845. {
  846. rev_flg = 1;
  847. in_bound = right_bnd - left;
  848. out_bound = right_bnd - right;
  849. if ((left > right_bnd) || (right < left_bnd))
  850. bvl_error (36,$1.NAME);
  851. }
  852. }
  853. else
  854. {
  855. sig_width = left_bnd - right_bnd + 1;
  856. if (left <= right)
  857. {
  858. rev_flg = 1;
  859. in_bound = left - right_bnd;
  860. out_bound = right - right_bnd;
  861. if ((left < right_bnd) || (right > left_bnd))
  862. bvl_error (36,$1.NAME);
  863. }
  864. else
  865. {
  866. rev_flg = 0;
  867. in_bound = right - right_bnd;
  868. out_bound = left - right_bnd;
  869. if ((left > left_bnd) || (right < right_bnd))
  870. bvl_error (36,$1.NAME);
  871. }
  872. }
  873. if ((out_bound - in_bound + 1) != expr4.WIDTH)
  874. bvl_error (35,$1.NAME);
  875. if (rev_flg == 1)
  876. expr4.LIST_ABL = reverse (expr4.LIST_ABL);
  877. abl_pnt = expr4.LIST_ABL;
  878. switch (sig_conf)
  879. {
  880. case (BVL_ICNDFN + BVL_BITDFN + BVL_NORDFN) :
  881. bvl_error (21,$1.NAME);
  882. break;
  883. case (BVL_OCNDFN + BVL_BITDFN + BVL_NORDFN) :
  884. case (BVL_BCNDFN + BVL_BITDFN + BVL_NORDFN) :
  885. if ($3 == BVL_GRDDFN)
  886. bvl_error (22,$1.NAME);
  887. beout_pnt = (struct beout *)
  888. beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_PNTDFN);
  889. if (BVL_ERRFLG == 0)
  890. {
  891. for (i=0 ; i<sig_width ; i++)
  892. {
  893. if (i >= in_bound)
  894. {
  895. if (beout_pnt->ABL != NULL)
  896. bvl_error (39,beout_pnt->NAME);
  897. else
  898. beout_pnt->ABL = (struct chain *)abl_pnt->DATA;
  899. abl_pnt = abl_pnt->NEXT;
  900. }
  901. if (i >= out_bound)
  902. break;
  903. beout_pnt = beout_pnt->NEXT;
  904. }
  905. }
  906. break;
  907. case (BVL_OCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  908. case (BVL_OCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  909. case (BVL_BCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  910. case (BVL_BCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  911. if (($3 != BVL_GRDDFN) || (BVL_GRDLST == NULL))
  912. bvl_error (23,$1.NAME);
  913. bebus_pnt = (struct bebus *)
  914. beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_PNTDFN);
  915. if (BVL_ERRFLG == 0)
  916. {
  917. for (i=0 ; i<sig_width ; i++)
  918. {
  919. if (i >= in_bound)
  920. {
  921. bebus_pnt->BINODE = beh_addbinode (bebus_pnt->BINODE,
  922. NULL,NULL);
  923. bebus_pnt->BIABL = beh_addbiabl (bebus_pnt->BIABL,
  924. BVL_LBLNAM,
  925. dupablexpr(BVL_GRDLST->DATA) ,
  926. abl_pnt->DATA);
  927. abl_pnt = abl_pnt->NEXT;
  928. }
  929. if (i >= out_bound)
  930. break;
  931. bebus_pnt = bebus_pnt->NEXT;
  932. }
  933. }
  934. break;
  935. case (BVL_BITDFN + BVL_NORDFN):
  936. if ($3 == BVL_GRDDFN)
  937. bvl_error (22,$1.NAME);
  938. beaux_pnt = (struct beaux *)
  939. beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_PNTDFN);
  940. if (BVL_ERRFLG == 0)
  941. {
  942. for (i=0 ; i<sig_width ; i++)
  943. {
  944. if (i >= in_bound)
  945. {
  946. if (beaux_pnt->ABL != NULL)
  947. bvl_error (39,beaux_pnt->NAME);
  948. else
  949. beaux_pnt->ABL = (struct chain *)abl_pnt->DATA;
  950. abl_pnt = abl_pnt->NEXT;
  951. }
  952. if (i >= out_bound)
  953. break;
  954. beaux_pnt = beaux_pnt->NEXT;
  955. }
  956. }
  957. break;
  958. case (BVL_RBIDFN + BVL_REGDFN):
  959. if (($3 != BVL_GRDDFN) || (BVL_GRDLST == NULL))
  960. bvl_error (23,$1.NAME);
  961. bereg_pnt = (struct bereg *)
  962. beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_PNTDFN);
  963. if (BVL_ERRFLG == 0)
  964. {
  965. for (i=0 ; i<sig_width ; i++)
  966. {
  967. if (i >= in_bound)
  968. {
  969. bereg_pnt->BINODE = beh_addbinode (bereg_pnt->BINODE,
  970. NULL,NULL);
  971. bereg_pnt->BIABL = beh_addbiabl (bereg_pnt->BIABL,
  972. BVL_LBLNAM,
  973. dupablexpr(BVL_GRDLST->DATA) ,
  974. abl_pnt->DATA);
  975. abl_pnt = abl_pnt->NEXT;
  976. }
  977. if (i >= out_bound)
  978. break;
  979. bereg_pnt = bereg_pnt->NEXT;
  980. }
  981. }
  982. break;
  983. case (BVL_MUXDFN + BVL_BUSDFN) :
  984. case (BVL_WORDFN + BVL_BUSDFN) :
  985. if (($3 != BVL_GRDDFN) || (BVL_GRDLST == NULL))
  986. bvl_error (23,$1.NAME);
  987. bebux_pnt = (struct bebux *)
  988. beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_PNTDFN);
  989. if (BVL_ERRFLG == 0)
  990. {
  991. for (i=0 ; i<sig_width ; i++)
  992. {
  993. if (i >= in_bound)
  994. {
  995. bebux_pnt->BINODE = beh_addbinode (bebux_pnt->BINODE,
  996. NULL,NULL);
  997. bebux_pnt->BIABL = beh_addbiabl (bebux_pnt->BIABL,
  998. BVL_LBLNAM,
  999. dupablexpr(BVL_GRDLST->DATA) ,
  1000. abl_pnt->DATA);
  1001. abl_pnt = abl_pnt->NEXT;
  1002. }
  1003. if (i >= out_bound)
  1004. break;
  1005. bebux_pnt = bebux_pnt->NEXT;
  1006. }
  1007. }
  1008. break;
  1009. default :
  1010. bvl_error (17,$1.NAME);
  1011. break;
  1012. }
  1013. }
  1014. ;
  1015. ..waveform__WHEN__condition__ELSE..
  1016. : /*empty*/
  1017. | ..waveform__WHEN__condition__ELSE..
  1018. waveform
  1019. WHEN
  1020. expression
  1021. ELSE
  1022. {
  1023. struct bvl_expr *expr_pnt;
  1024. expr_pnt = (bvl_ablstr *)mbkalloc(sizeof(bvl_ablstr));
  1025. expr_pnt->WIDTH = $4.WIDTH;
  1026. expr_pnt->LIST_ABL = $4.LIST_ABL;
  1027. BVL_CNDLST = addchain (BVL_CNDLST,(char *) expr_pnt);
  1028. expr_pnt = (bvl_ablstr *)mbkalloc(sizeof(bvl_ablstr));
  1029. expr_pnt->WIDTH = $2.WIDTH;
  1030. expr_pnt->LIST_ABL = $2.LIST_ABL;
  1031. BVL_VALLST = addchain (BVL_VALLST,(char *) expr_pnt);
  1032. }
  1033. ;
  1034. unlabeled_selected_signal_assignment
  1035. : WITH
  1036. expression
  1037. {
  1038. BVL_SLCEXP = $2;
  1039. BVL_BDDPNT = NULL;
  1040. }
  1041. SELECT
  1042. target
  1043. _LESym
  1044. .GUARDED.
  1045. waveform__WHEN__choices
  1046. ...waveform__WHEN__choices..
  1047. Semicolon_ERR
  1048. {
  1049. long i;
  1050. struct beout *beout_pnt;
  1051. struct bebus *bebus_pnt;
  1052. struct bereg *bereg_pnt;
  1053. struct beaux *beaux_pnt;
  1054. struct bebux *bebux_pnt;
  1055. struct chain *abl_pnt;
  1056. struct bvl_expr expr1;
  1057. long rev_flg = 0;
  1058. long left_bnd;
  1059. long right_bnd;
  1060. long left;
  1061. long right;
  1062. long in_bound;
  1063. long out_bound;
  1064. long sig_width;
  1065. long sig_conf;
  1066. expr1 = bvl_crtabl (ABL_OR ,$8 ,$9,-1,-1);
  1067. if (BVL_BDDPNT != getlogbddnodeone())
  1068. bvl_error (25,NULL);
  1069. left_bnd = beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_WMNDFN);
  1070. right_bnd = beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_WMXDFN);
  1071. sig_conf = beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_SIGDFN);
  1072. left = $5.LEFT;
  1073. right = $5.RIGHT;
  1074. if (left_bnd <= right_bnd)
  1075. {
  1076. sig_width = right_bnd - left_bnd + 1;
  1077. if (left <= right)
  1078. {
  1079. rev_flg = 0;
  1080. in_bound = right_bnd - right;
  1081. out_bound = right_bnd - left;
  1082. if ((left < left_bnd) || (right > right_bnd))
  1083. bvl_error (36,$5.NAME);
  1084. }
  1085. else
  1086. {
  1087. rev_flg = 1;
  1088. in_bound = right_bnd - left;
  1089. out_bound = right_bnd - right;
  1090. if ((left > right_bnd) || (right < left_bnd))
  1091. bvl_error (36,$5.NAME);
  1092. }
  1093. }
  1094. else
  1095. {
  1096. sig_width = left_bnd - right_bnd + 1;
  1097. if (left <= right)
  1098. {
  1099. rev_flg = 1;
  1100. in_bound = left - right_bnd;
  1101. out_bound = right - right_bnd;
  1102. if ((left < right_bnd) || (right > left_bnd))
  1103. bvl_error (36,$5.NAME);
  1104. }
  1105. else
  1106. {
  1107. rev_flg = 0;
  1108. in_bound = right - right_bnd;
  1109. out_bound = left - right_bnd;
  1110. if ((left > left_bnd) || (right < right_bnd))
  1111. bvl_error (36,$5.NAME);
  1112. }
  1113. }
  1114. if ((out_bound - in_bound + 1) != expr1.WIDTH)
  1115. bvl_error (35,$5.NAME);
  1116. if (rev_flg == 1)
  1117. expr1.LIST_ABL = reverse (expr1.LIST_ABL);
  1118. abl_pnt = expr1.LIST_ABL;
  1119. switch (sig_conf)
  1120. {
  1121. case (BVL_ICNDFN + BVL_BITDFN + BVL_NORDFN) :
  1122. bvl_error (21,$5.NAME);
  1123. break;
  1124. case (BVL_OCNDFN + BVL_BITDFN + BVL_NORDFN) :
  1125. case (BVL_BCNDFN + BVL_BITDFN + BVL_NORDFN) :
  1126. if ($7 == BVL_GRDDFN)
  1127. bvl_error (22,$5.NAME);
  1128. beout_pnt = (struct beout *)
  1129. beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_PNTDFN);
  1130. if (BVL_ERRFLG == 0)
  1131. {
  1132. for (i=0 ; i<sig_width ; i++)
  1133. {
  1134. if (i >= in_bound)
  1135. {
  1136. if (beout_pnt->ABL != NULL)
  1137. bvl_error (39,beout_pnt->NAME);
  1138. else
  1139. beout_pnt->ABL = (struct chain *)abl_pnt->DATA;
  1140. abl_pnt = abl_pnt->NEXT;
  1141. }
  1142. if (i >= out_bound)
  1143. break;
  1144. beout_pnt = beout_pnt->NEXT;
  1145. }
  1146. }
  1147. break;
  1148. case (BVL_OCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  1149. case (BVL_OCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  1150. case (BVL_BCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  1151. case (BVL_BCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  1152. if (($7 != BVL_GRDDFN) || (BVL_GRDLST == NULL))
  1153. bvl_error (23,$5.NAME);
  1154. bebus_pnt = (struct bebus *)
  1155. beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_PNTDFN);
  1156. if (BVL_ERRFLG == 0)
  1157. {
  1158. for (i=0 ; i<sig_width ; i++)
  1159. {
  1160. if (i >= in_bound)
  1161. {
  1162. bebus_pnt->BINODE = beh_addbinode (bebus_pnt->BINODE,
  1163. NULL,NULL);
  1164. bebus_pnt->BIABL = beh_addbiabl (bebus_pnt->BIABL,
  1165. BVL_LBLNAM,
  1166. dupablexpr(BVL_GRDLST->DATA) ,
  1167. abl_pnt->DATA);
  1168. abl_pnt = abl_pnt->NEXT;
  1169. }
  1170. if (i >= out_bound)
  1171. break;
  1172. bebus_pnt = bebus_pnt->NEXT;
  1173. }
  1174. }
  1175. break;
  1176. case (BVL_BITDFN + BVL_NORDFN):
  1177. if ($7 == BVL_GRDDFN)
  1178. bvl_error (22,$5.NAME);
  1179. beaux_pnt = (struct beaux *)
  1180. beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_PNTDFN);
  1181. if (BVL_ERRFLG == 0)
  1182. {
  1183. for (i=0 ; i<sig_width ; i++)
  1184. {
  1185. if (i >= in_bound)
  1186. {
  1187. if (beaux_pnt->ABL != NULL)
  1188. bvl_error (39,beaux_pnt->NAME);
  1189. else
  1190. {
  1191. beaux_pnt->ABL = (struct chain *)abl_pnt->DATA;
  1192. }
  1193. abl_pnt = abl_pnt->NEXT;
  1194. }
  1195. if (i >= out_bound)
  1196. break;
  1197. beaux_pnt = beaux_pnt->NEXT;
  1198. }
  1199. }
  1200. break;
  1201. case (BVL_RBIDFN + BVL_REGDFN):
  1202. if (($7 != BVL_GRDDFN) || (BVL_GRDLST == NULL))
  1203. bvl_error (23,$5.NAME);
  1204. bereg_pnt = (struct bereg *)
  1205. beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_PNTDFN);
  1206. if (BVL_ERRFLG == 0)
  1207. {
  1208. for (i=0 ; i<sig_width ; i++)
  1209. {
  1210. if (i >= in_bound)
  1211. {
  1212. bereg_pnt->BINODE = beh_addbinode (bereg_pnt->BINODE,
  1213. NULL,NULL);
  1214. bereg_pnt->BIABL = beh_addbiabl (bereg_pnt->BIABL,
  1215. BVL_LBLNAM,
  1216. dupablexpr(BVL_GRDLST->DATA) ,
  1217. abl_pnt->DATA);
  1218. abl_pnt = abl_pnt->NEXT;
  1219. }
  1220. if (i >= out_bound)
  1221. break;
  1222. bereg_pnt = bereg_pnt->NEXT;
  1223. }
  1224. }
  1225. break;
  1226. case (BVL_MUXDFN + BVL_BUSDFN) :
  1227. case (BVL_WORDFN + BVL_BUSDFN) :
  1228. if (($7 != BVL_GRDDFN) || (BVL_GRDLST == NULL))
  1229. bvl_error (23,$5.NAME);
  1230. bebux_pnt = (struct bebux *)
  1231. beh_chktab (dic,$5.NAME,BVL_MODNAM,BVL_PNTDFN);
  1232. if (BVL_ERRFLG == 0)
  1233. {
  1234. for (i=0 ; i<sig_width ; i++)
  1235. {
  1236. if (i >= in_bound)
  1237. {
  1238. bebux_pnt->BINODE = beh_addbinode (bebux_pnt->BINODE,
  1239. NULL,NULL);
  1240. bebux_pnt->BIABL = beh_addbiabl (bebux_pnt->BIABL,
  1241. BVL_LBLNAM,
  1242. dupablexpr(BVL_GRDLST->DATA) ,
  1243. abl_pnt->DATA);
  1244. abl_pnt = abl_pnt->NEXT;
  1245. }
  1246. if (i >= out_bound)
  1247. break;
  1248. bebux_pnt = bebux_pnt->NEXT;
  1249. }
  1250. }
  1251. break;
  1252. default :
  1253. bvl_error (17,$5.NAME);
  1254. break;
  1255. }
  1256. }
  1257. ;
  1258. ...waveform__WHEN__choices..
  1259. : /*empty*/
  1260. { $$ = BVL_EMPSTR; }
  1261. | ...waveform__WHEN__choices..
  1262. Comma
  1263. waveform__WHEN__choices
  1264. { $$ = bvl_crtabl (ABL_OR,$1,$3,-1,-1); }
  1265. ;
  1266. waveform__WHEN__choices
  1267. : waveform
  1268. WHEN
  1269. choices
  1270. {
  1271. struct bvl_expr expr1;
  1272. bvl_select (&expr1,BVL_NM1LST,&BVL_BDDPNT,BVL_SLCEXP);
  1273. freechain (BVL_NM1LST);
  1274. BVL_NM1LST = NULL;
  1275. $$ = bvl_crtabl (ANDM,$1,expr1,-1,-1);
  1276. }
  1277. ;
  1278. waveform
  1279. : waveform_element
  1280. { $$ = $1; }
  1281. ;
  1282. waveform_element
  1283. : expression
  1284. .AFTER__delay_expression.
  1285. {
  1286. $$ = $1;
  1287. }
  1288. ;
  1289. .AFTER__delay_expression.
  1290. : /*empty*/
  1291. {}
  1292. | AFTER
  1293. delay_expression
  1294. {}
  1295. ;
  1296. delay_expression
  1297. : abstractlit
  1298. .time_unit.
  1299. {}
  1300. ;
  1301. .time_unit.
  1302. : /*empty*/
  1303. {}
  1304. | _PS
  1305. {}
  1306. | _NS
  1307. {}
  1308. | _US
  1309. {}
  1310. | _MS
  1311. {}
  1312. ;
  1313. choices
  1314. : choice
  1315. { BVL_NM1LST = addchain (NULL ,$1); }
  1316. ..Bar__choice..
  1317. { yyerrok; }
  1318. ;
  1319. ..Bar__choice..
  1320. : /*empty*/
  1321. | ..Bar__choice..
  1322. Bar
  1323. choice
  1324. {
  1325. if ($3 == "others")
  1326. bvl_error (30,NULL);
  1327. BVL_NM1LST = addchain (BVL_NM1LST ,$3);
  1328. }
  1329. ;
  1330. choice
  1331. : literal
  1332. { $$ = $1; }
  1333. | OTHERS
  1334. { $$ = "others"; }
  1335. | name
  1336. {
  1337. char *val;
  1338. char val2[256];
  1339. long left;
  1340. long right;
  1341. long in_bound;
  1342. long out_bound;
  1343. long left_bnd;
  1344. long right_bnd;
  1345. long sig_conf;
  1346. strcpy (val2,"B\"");
  1347. sig_conf = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_SIGDFN);
  1348. val = (char *) beh_chktab (dic,$1.NAME,NULL,BVL_PNTDFN);
  1349. if (sig_conf == 0)
  1350. bvl_error (17,$1.NAME);
  1351. else
  1352. {
  1353. if (sig_conf != BVL_CSTDFN)
  1354. bvl_error (76,$1.NAME);
  1355. }
  1356. left_bnd = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_WMNDFN);
  1357. right_bnd = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_WMXDFN);
  1358. left = $1.LEFT;
  1359. right = $1.RIGHT;
  1360. if (left_bnd <= right_bnd)
  1361. {
  1362. if (left <= right)
  1363. {
  1364. in_bound = left - left_bnd;
  1365. out_bound = right - left_bnd;
  1366. if ((left < left_bnd) || (right > right_bnd))
  1367. bvl_error (36,$1.NAME);
  1368. }
  1369. else
  1370. {
  1371. in_bound = left - right_bnd;
  1372. out_bound = right - right_bnd;
  1373. if ((left > right_bnd) || (right < left_bnd))
  1374. bvl_error (36,$1.NAME);
  1375. }
  1376. }
  1377. else
  1378. {
  1379. if (left <= right)
  1380. {
  1381. in_bound = right - left_bnd;
  1382. out_bound = left - left_bnd;
  1383. if ((left < right_bnd) || (right > left_bnd))
  1384. bvl_error (36,$1.NAME);
  1385. }
  1386. else
  1387. {
  1388. in_bound = right - right_bnd;
  1389. out_bound = left - right_bnd;
  1390. if ((left > left_bnd) || (right < right_bnd))
  1391. bvl_error (36,$1.NAME);
  1392. }
  1393. }
  1394. bvl_tobin (&val2[2],val,in_bound,out_bound);
  1395. strcat (val2,"\"");
  1396. $$ = namealloc (val2);
  1397. }
  1398. ;
  1399. .REPORT__expression.
  1400. : /*empty*/
  1401. { $$ = NULL; }
  1402. | REPORT
  1403. report__message
  1404. { $$ = $2; }
  1405. ;
  1406. .SEVERITY__expression.
  1407. : /*empty*/
  1408. { $$ = 'E'; }
  1409. | SEVERITY
  1410. severity__message
  1411. { $$ = $2; }
  1412. ;
  1413. report__message
  1414. : StringLit
  1415. { $$ = $1; }
  1416. ;
  1417. severity__message
  1418. : ERROR
  1419. { $$ = 'E'; }
  1420. | WARNING
  1421. { $$ = 'W'; }
  1422. ;
  1423. expression
  1424. : relation..AND__relation..
  1425. { $$ = $1; }
  1426. | relation..OR__relation..
  1427. { $$ = $1; }
  1428. | relation.NAND_NOR__relation.
  1429. { $$ = $1; }
  1430. | relation..XOR__relation..
  1431. { $$ = $1; }
  1432. ;
  1433. relation..AND__relation..
  1434. : relation
  1435. tok_AND
  1436. relation
  1437. { $$ = bvl_crtabl (ABL_AND ,$1 ,$3 ,-1,-1); }
  1438. | relation..AND__relation..
  1439. tok_AND
  1440. relation
  1441. { $$ = bvl_crtabl (ABL_AND ,$1 ,$3 ,-1,-1); }
  1442. ;
  1443. relation..OR__relation..
  1444. : relation
  1445. _OR
  1446. relation
  1447. { $$ = bvl_crtabl (ABL_OR ,$1 ,$3 ,-1,-1); }
  1448. | relation..OR__relation..
  1449. _OR
  1450. relation
  1451. { $$ = bvl_crtabl (ABL_OR ,$1 ,$3 ,-1,-1); }
  1452. ;
  1453. relation.NAND_NOR__relation.
  1454. : relation
  1455. { $$ = $1; }
  1456. | relation
  1457. _NAND
  1458. relation
  1459. { $$ = bvl_crtabl (ABL_NAND ,$1 ,$3 ,-1,-1); }
  1460. | relation
  1461. _NOR
  1462. relation
  1463. { $$ = bvl_crtabl (ABL_NOR ,$1 ,$3 ,-1,-1); }
  1464. ;
  1465. relation..XOR__relation..
  1466. : relation
  1467. _XOR
  1468. relation
  1469. { $$ = bvl_crtabl (ABL_XOR ,$1 ,$3 ,-1,-1); }
  1470. | relation..XOR__relation..
  1471. _XOR
  1472. relation
  1473. { $$ = bvl_crtabl (ABL_XOR ,$1 ,$3 ,-1,-1); }
  1474. ;
  1475. relation
  1476. : simple_expression
  1477. { $$ = $1; }
  1478. | simple_expression
  1479. relational_operator
  1480. simple_expression
  1481. { $$ = bvl_crtabl ($2 ,$1 ,$3 ,-1,-1); }
  1482. ;
  1483. simple_expression
  1484. : .sign.term..add_op__term..
  1485. { $$ = $1; }
  1486. ;
  1487. .sign.term..add_op__term..
  1488. : term
  1489. { $$ = $1; }
  1490. | .sign.term..add_op__term..
  1491. Ampersand
  1492. term
  1493. { $$ = bvl_crtabl (CONC,$1,$3,-1,-1); }
  1494. ;
  1495. term
  1496. : factor
  1497. { $$ = $1; }
  1498. ;
  1499. factor
  1500. : primary
  1501. { $$ = $1; }
  1502. | _NOT
  1503. primary
  1504. { $$ = bvl_crtabl (ABL_NOT,$2,BVL_EMPSTR,-1,-1); }
  1505. ;
  1506. primary
  1507. : literal
  1508. {
  1509. struct bvl_expr expr1;
  1510. expr1.IDENT = $1;
  1511. $$ = bvl_crtabl (NOPS,expr1,BVL_EMPSTR,-1,-1);
  1512. }
  1513. | aggregate
  1514. { $$ = $1; }
  1515. | name
  1516. {
  1517. struct bvl_expr expr1;
  1518. long left;
  1519. long right;
  1520. long left_bnd;
  1521. long right_bnd;
  1522. long in_bound;
  1523. long out_bound;
  1524. long sig_conf;
  1525. sig_conf = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_SIGDFN);
  1526. switch (sig_conf)
  1527. {
  1528. case (BVL_ICNDFN + BVL_BITDFN + BVL_NORDFN) :
  1529. case (BVL_BCNDFN + BVL_BITDFN + BVL_NORDFN) :
  1530. case (BVL_BCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  1531. case (BVL_BCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  1532. case (BVL_BITDFN + BVL_NORDFN):
  1533. case (BVL_MUXDFN + BVL_BUSDFN):
  1534. case (BVL_WORDFN + BVL_BUSDFN):
  1535. case (BVL_RBIDFN + BVL_REGDFN):
  1536. case (BVL_CSTDFN):
  1537. break;
  1538. case (BVL_OCNDFN + BVL_BITDFN + BVL_NORDFN) :
  1539. case (BVL_OCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  1540. case (BVL_OCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  1541. bvl_error (26,$1.NAME);
  1542. break;
  1543. default :
  1544. bvl_error (17,$1.NAME);
  1545. break;
  1546. }
  1547. left_bnd = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_WMNDFN);
  1548. right_bnd = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_WMXDFN);
  1549. left = $1.LEFT;
  1550. right = $1.RIGHT;
  1551. if (left_bnd <= right_bnd)
  1552. {
  1553. if (left <= right)
  1554. {
  1555. in_bound = left - left_bnd;
  1556. out_bound = right - left_bnd;
  1557. if ((left < left_bnd) || (right > right_bnd))
  1558. bvl_error (36,$1.NAME);
  1559. }
  1560. else
  1561. {
  1562. in_bound = right - left_bnd;
  1563. out_bound = left - left_bnd;
  1564. if ((left > right_bnd) || (right < left_bnd))
  1565. bvl_error (36,$1.NAME);
  1566. }
  1567. }
  1568. else
  1569. {
  1570. if (left <= right)
  1571. {
  1572. in_bound = left - right_bnd;
  1573. out_bound = right - right_bnd;
  1574. if ((left < right_bnd) || (right > left_bnd))
  1575. bvl_error (36,$1.NAME);
  1576. }
  1577. else
  1578. {
  1579. in_bound = right - right_bnd;
  1580. out_bound = left - right_bnd;
  1581. if ((left > left_bnd) || (right < right_bnd))
  1582. bvl_error (36,$1.NAME);
  1583. }
  1584. }
  1585. if (sig_conf != BVL_CSTDFN)
  1586. {
  1587. expr1.IDENT = $1.NAME;
  1588. if($1.FLAG == 'X')
  1589. {
  1590. expr1 = bvl_crtabl (NOPI,expr1,BVL_EMPSTR,left,right);
  1591. $$ = bvl_crtabl (ABL_STABLE,expr1,BVL_EMPSTR,left,right);
  1592. }
  1593. else
  1594. $$ = bvl_crtabl (NOPI,expr1,BVL_EMPSTR,left,right);
  1595. }
  1596. else
  1597. {
  1598. expr1.IDENT = (char *)beh_chktab(dic,$1.NAME,NULL,BVL_PNTDFN);
  1599. $$ = bvl_crtabl (NOPS,expr1,BVL_EMPSTR,in_bound,out_bound);
  1600. }
  1601. }
  1602. ;
  1603. relational_operator
  1604. : _EQSym
  1605. { $$ = EQ; }
  1606. | _NESym
  1607. { $$ = NE; }
  1608. ;
  1609. literal
  1610. : CharacterLit
  1611. { $$ = $1; }
  1612. | StringLit
  1613. { $$ = $1; }
  1614. | BitStringLit
  1615. { $$ = $1; }
  1616. ;
  1617. aggregate
  1618. : LeftParen
  1619. expression
  1620. RightParen
  1621. { $$ = $2; }
  1622. ;
  1623. name
  1624. : simple_name
  1625. {
  1626. $$.NAME = $1;
  1627. $$.LEFT = beh_chktab (dic,$1,BVL_MODNAM,BVL_WMNDFN);
  1628. $$.RIGHT = beh_chktab (dic,$1,BVL_MODNAM,BVL_WMXDFN);
  1629. }
  1630. | indexed_name
  1631. { $$ = $1; }
  1632. | slice_name
  1633. { $$ = $1; }
  1634. | attribute_name
  1635. { $$ = $1; }
  1636. ;
  1637. indexed_name
  1638. : simple_name
  1639. LeftParen
  1640. abstractlit
  1641. RightParen_ERR
  1642. {
  1643. $$.NAME = $1;
  1644. $$.LEFT = $3;
  1645. $$.RIGHT = $3;
  1646. }
  1647. ;
  1648. slice_name
  1649. : simple_name
  1650. LeftParen
  1651. abstractlit
  1652. direction
  1653. abstractlit
  1654. RightParen_ERR
  1655. {
  1656. if ((($5 > $3) && ($4 != BVL_UPTDFN)) ||
  1657. (($5 < $3) && ($4 != BVL_DWTDFN)))
  1658. bvl_error (32,$1);
  1659. $$.NAME = $1;
  1660. $$.LEFT = $3;
  1661. $$.RIGHT = $5;
  1662. }
  1663. ;
  1664. attribute_name
  1665. : simple_name
  1666. Apostrophe
  1667. attribute_designator
  1668. {
  1669. char extname[100];
  1670. char *lclname;
  1671. long sig_conf;
  1672. struct bvl_expr expr1;
  1673. struct bvl_expr expr2;
  1674. struct chain *ptabl;
  1675. sig_conf = beh_chktab (dic,$1,BVL_MODNAM,BVL_SIGDFN);
  1676. switch (sig_conf)
  1677. {
  1678. case (BVL_ICNDFN + BVL_BITDFN + BVL_NORDFN) :
  1679. case (BVL_BCNDFN + BVL_BITDFN + BVL_NORDFN) :
  1680. case (BVL_BCNDFN + BVL_MUXDFN + BVL_BUSDFN) :
  1681. case (BVL_BCNDFN + BVL_WORDFN + BVL_BUSDFN) :
  1682. case (BVL_BITDFN + BVL_NORDFN):
  1683. case (BVL_MUXDFN + BVL_BUSDFN):
  1684. case (BVL_WORDFN + BVL_BUSDFN):
  1685. case (BVL_RBIDFN + BVL_REGDFN):
  1686. break;
  1687. default :
  1688. bvl_error (79,$1);
  1689. }
  1690. if (beh_chktab (dic,$1,BVL_MODNAM,BVL_WMNDFN) != -1)
  1691. bvl_error (79,$1);
  1692. sprintf (extname,"%s'delayed",$1);
  1693. lclname = namealloc (extname);
  1694. if (BVL_ERRFLG == 0)
  1695. {
  1696. if (beh_chktab (dic,$1,BVL_MODNAM,BVL_STBDFN) == 0)
  1697. {
  1698. expr1.IDENT = $1;
  1699. expr1.WIDTH = 1;
  1700. expr2 = bvl_crtabl (NOPI,expr1,BVL_EMPSTR,-1,-1);
  1701. ptabl = expr2.LIST_ABL->DATA;
  1702. if (BVL_AUXMOD == 1)
  1703. BVL_BEFPNT->BERIN=beh_addberin(BVL_BEFPNT->BERIN,lclname);
  1704. BVL_BEFPNT->BEDLY = beh_addbeaux(BVL_BEFPNT->BEDLY,lclname,
  1705. ptabl,NULL);
  1706. beh_addtab (dic,$1 ,BVL_MODNAM,BVL_STBDFN,1);
  1707. beh_addtab (dic,lclname,BVL_MODNAM,BVL_WMNDFN,-1);
  1708. beh_addtab (dic,lclname,BVL_MODNAM,BVL_WMXDFN,-1);
  1709. beh_addtab (dic,lclname,BVL_MODNAM,BVL_SIGDFN,
  1710. (BVL_ICNDFN + BVL_BITDFN + BVL_NORDFN));
  1711. }
  1712. }
  1713. BVL_BEFPNT->TYPE |= BEH_STABLE;
  1714. $$.NAME = $1;
  1715. $$.LEFT = -1;
  1716. $$.RIGHT = -1;
  1717. $$.FLAG = 'X';
  1718. }
  1719. ;
  1720. attribute_designator
  1721. : _STABLE
  1722. ;
  1723. type_mark
  1724. : BIT
  1725. { $$.VALU = BIT; $$.FLAG = 'S'; }
  1726. | WOR_BIT
  1727. { $$.VALU = WOR_BIT; $$.FLAG = 'S'; }
  1728. | MUX_BIT
  1729. { $$.VALU = MUX_BIT; $$.FLAG = 'S'; }
  1730. | BIT_VECTOR
  1731. { $$.VALU = BIT; $$.FLAG = 'A'; }
  1732. | WOR_VECTOR
  1733. { $$.VALU = WOR_BIT; $$.FLAG = 'A'; }
  1734. | MUX_VECTOR
  1735. { $$.VALU = MUX_BIT; $$.FLAG = 'A'; }
  1736. | REG_BIT
  1737. { $$.VALU = REG_BIT; $$.FLAG = 'S'; }
  1738. | REG_VECTOR
  1739. { $$.VALU = REG_BIT; $$.FLAG = 'A'; }
  1740. | NATURAL
  1741. { $$.VALU = NATURAL; $$.FLAG = 'S'; }
  1742. | NATURAL_VECTOR
  1743. { $$.VALU = NATURAL; $$.FLAG = 'A'; }
  1744. ;
  1745. identifier_list
  1746. : Identifier
  1747. { BVL_NM1LST = addchain (BVL_NM1LST,$1); }
  1748. ...identifier..
  1749. ;
  1750. ...identifier..
  1751. : /*empty*/
  1752. | ...identifier..
  1753. Comma
  1754. Identifier
  1755. { BVL_NM1LST = addchain (BVL_NM1LST,$3); }
  1756. ;
  1757. .label.
  1758. : /*empty*/
  1759. { $$ = NULL; }
  1760. | label
  1761. { $$ = $1; }
  1762. ;
  1763. .guard_expression.
  1764. : /*empty*/
  1765. { $$ = NULL; }
  1766. | guard_expression
  1767. { $$ = $1; }
  1768. ;
  1769. guard_expression
  1770. : LeftParen
  1771. expression
  1772. RightParen_ERR
  1773. { $$ = (char *)$2.LIST_ABL->DATA; }
  1774. ;
  1775. .GUARDED.
  1776. : /*empty*/
  1777. { $$ = BVL_UNGDFN ; }
  1778. | GUARDED
  1779. { $$ = BVL_GRDDFN; }
  1780. ;
  1781. .simple_name.
  1782. : /*empty*/
  1783. { $$ = NULL; }
  1784. | simple_name
  1785. { $$ = $1; }
  1786. ;
  1787. simple_name
  1788. : Identifier
  1789. { $$ = $1; }
  1790. ;
  1791. target
  1792. : name
  1793. { $$ = $1; }
  1794. ;
  1795. a_label
  1796. : label
  1797. Colon
  1798. {
  1799. BVL_LBLNAM = $1;
  1800. $$ = $1;
  1801. }
  1802. ;
  1803. label
  1804. : Identifier
  1805. { $$ = $1; }
  1806. ;
  1807. abstractlit
  1808. : AbstractLit
  1809. { $$ = atoi ($1); }
  1810. ;
  1811. RightParen_ERR
  1812. : RightParen
  1813. { yyerrok; }
  1814. ;
  1815. Semicolon_ERR
  1816. : Semicolon
  1817. { yyerrok; }
  1818. ;
  1819. END_ERR
  1820. : _END
  1821. { yyerrok; }
  1822. ;
  1823. %%
  1824. void *addstr (
  1825. struct befig *ptfig,
  1826. char object,
  1827. long mode,
  1828. long type,
  1829. char flag,
  1830. char *name,
  1831. short left,
  1832. short right )
  1833. {
  1834. void *pnt = NULL;
  1835. char porflg = 0;
  1836. char rinflg = 0;
  1837. char outflg = 0;
  1838. char busflg = 0;
  1839. char auxflg = 0;
  1840. char buxflg = 0;
  1841. char regflg = 0;
  1842. char lclmod;
  1843. char lcltyp;
  1844. char extname[100];
  1845. short i;
  1846. short inc = 1;
  1847. switch (object)
  1848. {
  1849. case 'P':
  1850. /* ###------------------------------------------------------### */
  1851. /* if object is a port ... */
  1852. /* ###------------------------------------------------------### */
  1853. porflg = 1;
  1854. switch (mode)
  1855. {
  1856. case _IN:
  1857. lclmod = 'I'; lcltyp = 'B'; rinflg = 1; break;
  1858. case _OUT:
  1859. switch (type)
  1860. {
  1861. case BIT:
  1862. lclmod = 'O'; lcltyp = 'B'; outflg = 1; break;
  1863. case MUX_BIT:
  1864. lclmod = 'Z'; lcltyp = 'M'; busflg = 1; break;
  1865. case WOR_BIT:
  1866. lclmod = 'Z'; lcltyp = 'W'; busflg = 1; break;
  1867. }
  1868. break;
  1869. case _INOUT:
  1870. rinflg = 1;
  1871. switch (type)
  1872. {
  1873. case BIT:
  1874. lclmod = 'B'; lcltyp = 'B'; outflg = 1; break;
  1875. case MUX_BIT:
  1876. lclmod = 'T'; lcltyp = 'M'; busflg = 1; break;
  1877. case WOR_BIT:
  1878. lclmod = 'T'; lcltyp = 'W'; busflg = 1; break;
  1879. }
  1880. break;
  1881. }
  1882. break;
  1883. case 'S':
  1884. /* ###------------------------------------------------------### */
  1885. /* if object is a signal ... */
  1886. /* ###------------------------------------------------------### */
  1887. switch (type)
  1888. {
  1889. case BIT:
  1890. lcltyp = 'B'; rinflg = BVL_AUXMOD; auxflg = 1; break;
  1891. case REG_BIT:
  1892. rinflg = 1; regflg = 1; break;
  1893. case MUX_BIT:
  1894. lcltyp = 'M'; rinflg = 1; buxflg = 1; break;
  1895. case WOR_BIT:
  1896. lcltyp = 'W'; rinflg = 1; buxflg = 1; break;
  1897. }
  1898. break;
  1899. }
  1900. if (flag == 'S')
  1901. {
  1902. /* ###------------------------------------------------------### */
  1903. /* if object is a scalar ... */
  1904. /* ###------------------------------------------------------### */
  1905. if (porflg == 1)
  1906. ptfig->BEPOR = beh_addbepor (ptfig->BEPOR,name,lclmod,lcltyp);
  1907. if (rinflg == 1)
  1908. ptfig->BERIN = beh_addberin (ptfig->BERIN,name);
  1909. if (outflg == 1)
  1910. ptfig->BEOUT = beh_addbeout (ptfig->BEOUT,name,NULL,NULL);
  1911. if (busflg == 1)
  1912. ptfig->BEBUS = beh_addbebus (ptfig->BEBUS,name,NULL,NULL,lcltyp);
  1913. if (auxflg == 1)
  1914. ptfig->BEAUX = beh_addbeaux (ptfig->BEAUX,name,NULL,NULL);
  1915. if (buxflg == 1)
  1916. ptfig->BEBUX = beh_addbebux (ptfig->BEBUX,name,NULL,NULL,lcltyp);
  1917. if (regflg == 1)
  1918. ptfig->BEREG = beh_addbereg (ptfig->BEREG,name,NULL,NULL);
  1919. }
  1920. else
  1921. {
  1922. /* ###------------------------------------------------------### */
  1923. /* if object is an array ... */
  1924. /* ###------------------------------------------------------### */
  1925. if (left >= right)
  1926. inc = -1;
  1927. for (i=left ; i!=(right+inc) ; i+=inc)
  1928. {
  1929. sprintf (extname,"%s %d",name,i);
  1930. if (porflg == 1)
  1931. ptfig->BEPOR = beh_addbepor (ptfig->BEPOR,extname,lclmod,lcltyp);
  1932. if (rinflg == 1)
  1933. ptfig->BERIN = beh_addberin (ptfig->BERIN,extname);
  1934. if (outflg == 1)
  1935. ptfig->BEOUT = beh_addbeout (ptfig->BEOUT,extname,NULL,NULL);
  1936. if (busflg == 1)
  1937. ptfig->BEBUS = beh_addbebus (ptfig->BEBUS,extname,NULL,NULL,lcltyp);
  1938. if (auxflg == 1)
  1939. ptfig->BEAUX = beh_addbeaux (ptfig->BEAUX,extname,NULL,NULL);
  1940. if (buxflg == 1)
  1941. ptfig->BEBUX = beh_addbebux (ptfig->BEBUX,extname,NULL,NULL,lcltyp);
  1942. if (regflg == 1)
  1943. ptfig->BEREG = beh_addbereg (ptfig->BEREG,extname,NULL,NULL);
  1944. }
  1945. }
  1946. if (outflg == 1)
  1947. pnt = (void *) ptfig->BEOUT;
  1948. if (busflg == 1)
  1949. pnt = (void *) ptfig->BEBUS;
  1950. if (auxflg == 1)
  1951. pnt = (void *) ptfig->BEAUX;
  1952. if (buxflg == 1)
  1953. pnt = (void *) ptfig->BEBUX;
  1954. if (regflg == 1)
  1955. pnt = (void *) ptfig->BEREG;
  1956. return (pnt);
  1957. }
  1958. static long
  1959. chkdcl (
  1960. char object,
  1961. long mode,
  1962. long type,
  1963. char flag,
  1964. long kind,
  1965. char constraint,
  1966. long *conf )
  1967. {
  1968. long errflg = 0;
  1969. long lclcnf = 0;
  1970. if (flag != constraint)
  1971. {
  1972. errflg = 1;
  1973. bvl_error (33,NULL);
  1974. }
  1975. else
  1976. {
  1977. switch (object)
  1978. {
  1979. case 'P':
  1980. /* ###------------------------------------------------------### */
  1981. /* If object is a port : */
  1982. /* - if type is bit, no guard indication can be used */
  1983. /* - if type is wor_bit or mux_bit, bus kind must be used */
  1984. /* - other types are illegal */
  1985. /* ###------------------------------------------------------### */
  1986. switch (type)
  1987. {
  1988. cas…

Large files files are truncated, but you can click here to view the full file