OpenCores
URL https://opencores.org/ocsvn/sc2v/sc2v/trunk

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [src/] [sc2v_step2.y] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jcastillo
/* -----------------------------------------------------------------------------
2
 *
3 4 jcastillo
 *  SystemC to Verilog Translator v0.2
4 2 jcastillo
 *  Provided by OpenSoc Design
5
 *
6
 *  www.opensocdesign.com
7
 *
8
 * -----------------------------------------------------------------------------
9
 *  This program is free software; you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  (at your option) any later version.
13
 *
14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *  GNU Library General Public License for more details.
18
 *
19
 *  You should have received a copy of the GNU General Public License
20
 *  along with this program; if not, write to the Free Software
21
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
 */
23
 
24
%{
25
#include 
26
#include 
27 4 jcastillo
#include 
28 2 jcastillo
 
29
#include "list.h"
30
 
31
 
32
/*Global var to read from file_writes.sc2v*/
33
WritesList *writeslist;
34
 
35
/*Global var to store ports*/
36
PortList *portlist;
37
 
38
/* Global var to store signals*/
39
SignalsList *signalslist;
40
 
41
/* Global var to store sensitivity list*/
42
SensibilityList *sensibilitylist;
43
 
44
/* Global var to store instantiated modules*/
45
InstancesList *instanceslist;
46
 
47
/* Global var to store process list*/
48
ProcessList *processlist;
49
 
50 4 jcastillo
/*List of enumerates*/
51
EnumeratesList *enumerateslist;
52
EnumListList   *enumlistlist;
53
char           *enumname;
54
int            reading_enumerates=0;
55 2 jcastillo
 
56 4 jcastillo
/*Multiple Declarations*/
57
int            multipledec;
58
char           *storedtype;
59
 
60 2 jcastillo
/* Global var to store process module name*/
61
char *module_name;
62
int module_name_found = 0;
63
 
64
/* Global var to store last port type*/
65
char *lastportkind;
66
int lastportsize;
67
int activeport = 0;     // 1 -> reading port list
68
 
69
/* Global var to store last signal type*/
70
int lastsignalsize;
71
int signalactive = 0;
72
 
73
/* Global var to store last SC_METHOD found*/
74
char *active_method;
75
char *active_method_type;
76
int method_found;
77
 
78
/* Global var to store last sensitivity found*/
79
char *last_sensibility;
80
int sensibility_active = 0;
81
 
82
 
83 4 jcastillo
int translate;
84 2 jcastillo
 
85
void yyerror(const char *str)
86
{
87
        fprintf(stderr,"error: %s\n",str);
88
}
89
 
90
int yywrap()
91
{
92
        return 1;
93
}
94
 
95
main()
96
{
97 4 jcastillo
    /*Initialize lists*/
98
 
99 2 jcastillo
        writeslist = (WritesList *)malloc(sizeof(WritesList));
100
        InitializeWritesList(writeslist);
101 4 jcastillo
 
102 2 jcastillo
        portlist = (PortList *)malloc(sizeof(PortList));
103
        InitializePortList(portlist);
104 4 jcastillo
 
105 2 jcastillo
        signalslist = (SignalsList *)malloc(sizeof(SignalsList));
106
        InitializeSignalsList(signalslist);
107 4 jcastillo
 
108 2 jcastillo
        sensibilitylist = (SensibilityList *)malloc(sizeof(SensibilityList));
109
        InitializeSensibilityList(sensibilitylist);
110 4 jcastillo
 
111 2 jcastillo
        instanceslist = (InstancesList *)malloc(sizeof(InstancesList));
112
        InitializeInstancesList(instanceslist);
113 4 jcastillo
 
114
    processlist = (ProcessList *)malloc(sizeof(ProcessList));
115 2 jcastillo
        InitializeProcessList(processlist);
116
 
117 4 jcastillo
        enumlistlist = (EnumListList *)malloc(sizeof(EnumListList));
118
        InitializeEnumListList(enumlistlist);
119
 
120
        translate=1;
121
 
122 2 jcastillo
        yyparse();
123 4 jcastillo
 
124 2 jcastillo
        printf("module %s(",module_name);
125
        EnumeratePorts(portlist);
126
        printf(");\n");
127
 
128
        ShowPortList(portlist);
129
        printf("\n");
130
        RegOutputs(portlist);
131
        printf("\n");
132 4 jcastillo
 
133
    ShowEnumListList(enumlistlist);
134
 
135 2 jcastillo
        ReadWritesFile(writeslist, (char *)"file_writes.sc2v");
136
 
137
        ShowSignalsList(signalslist, writeslist);
138
        printf("\n");
139
 
140
        ShowInstancedModules(instanceslist);
141
        printf("\n");
142
 
143
        ShowDefines((char *)"file_defines.sc2v");
144
 
145
        ShowProcessCode(processlist);
146
        printf("\n");
147
 
148
        printf("endmodule\n");
149
}
150
 
151
%}
152
 
153 4 jcastillo
%token NUMBER SC_MODULE WORD OPENPAR CLOSEPAR SC_IN SC_OUT SEMICOLON BOOL ENUM
154 2 jcastillo
%token MENOR MAYOR SC_INT SC_UINT SC_METHOD SENSITIVE_POS SENSITIVE_NEG SENSITIVE
155
%token SENSIBLE CLOSEKEY OPENKEY SEMICOLON COLON SC_SIGNAL ARROW EQUALS NEW QUOTE
156 4 jcastillo
%token SC_CTOR VOID ASTERISCO TRANSLATEON TRANSLATEOFF
157 2 jcastillo
 
158
%%
159
 
160
commands: /* empty */
161
        | commands command
162
        ;
163
 
164
 
165
command:
166
        module
167
        |
168
        in_bool
169
        |
170
        in_sc_int
171
        |
172
        in_sc_uint
173
        |
174
        out_bool
175
        |
176
        out_sc_int
177
        |
178
        out_sc_uint
179
        |
180
        sc_method
181
        |
182
        sensitive_pos
183
        |
184
        sensitive_neg
185
        |
186
        sensitive
187
        |
188
        sensible_word_colon
189
        |
190
        sensible_word_semicolon
191
        |
192 4 jcastillo
        sensible_par_colon
193
        |
194
        sensible_par_pos
195
        |
196
        sensible_par_neg
197
        |
198 2 jcastillo
        closekey
199
        |
200
        word_semicolon
201
        |
202
        word_colon
203
        |
204 4 jcastillo
        word_closekey
205
        |
206
        word_closekey_word
207
        |
208 2 jcastillo
        signal_bool
209
        |
210
        signal_uint
211
        |
212
        signal_int
213
        |
214
        instantation
215
        |
216
        port_binding
217
        |
218
        sc_ctor
219
        |
220
        void
221
        |
222
        inst_decl
223
        |
224
        closekey_semicolon
225 4 jcastillo
        |
226
        enumerates
227
        |
228
        enumerates_type
229
        |
230
        declaration
231
        |
232
        declaration_sc_signal
233
        |
234
        multiple_declaration
235
        |
236
        multiple_sc_signal_declaration
237
        |
238
        translateoff
239
        |
240
        translateon
241 2 jcastillo
        ;
242
 
243
module:
244
        SC_MODULE OPENPAR WORD CLOSEPAR OPENKEY
245
        {
246 4 jcastillo
        if(translate==1){
247 2 jcastillo
                if(module_name_found)
248
                        {
249
                        fprintf(stderr,"error: two or more modules found in the file\n");
250
                        exit(1);
251
                        }
252
                else
253
                        {
254
                        module_name = (char *)malloc(256*sizeof(char));
255
                        strcpy(module_name, (char *)$3);
256
                        module_name_found = 1;
257
                        }
258
        }
259 4 jcastillo
        }
260 2 jcastillo
        ;
261
 
262
in_sc_uint:
263
        SC_IN MENOR SC_UINT MENOR NUMBER MAYOR MAYOR
264
        {
265 4 jcastillo
        if(translate==1){
266 2 jcastillo
                activeport = 1;
267
                lastportsize = $5;
268
                lastportkind = (char *)"input";
269
        }
270 4 jcastillo
        };
271 2 jcastillo
 
272
in_sc_int:
273
        SC_IN MENOR SC_INT MENOR NUMBER MAYOR MAYOR
274
        {
275 4 jcastillo
        if(translate==1){
276 2 jcastillo
                activeport = 1;
277
                lastportsize = $5;
278
                lastportkind = (char *)"input";
279
        }
280 4 jcastillo
        };
281 2 jcastillo
 
282
 
283
in_bool:
284
        SC_IN MENOR BOOL MAYOR
285
        {
286 4 jcastillo
        if(translate==1){
287 2 jcastillo
                activeport = 1;
288
                lastportsize = 0;
289
                lastportkind = (char *)"input";
290
        }
291 4 jcastillo
        };
292 2 jcastillo
 
293
signal_bool:
294
                SC_SIGNAL MENOR BOOL MAYOR
295
                {
296 4 jcastillo
                if(translate==1){
297 2 jcastillo
                        signalactive = 1;
298
                        lastsignalsize = 0;
299
                }
300 4 jcastillo
                };
301
 
302 2 jcastillo
signal_uint:
303
                SC_SIGNAL MENOR SC_UINT MENOR NUMBER MAYOR MAYOR
304
                {
305 4 jcastillo
                if(translate==1){
306 2 jcastillo
                        signalactive = 1;
307
                        lastsignalsize = $5;
308
                }
309 4 jcastillo
                };
310
 
311 2 jcastillo
signal_int:
312
                SC_SIGNAL MENOR SC_INT MENOR NUMBER MAYOR MAYOR
313
                {
314 4 jcastillo
                if(translate==1){
315 2 jcastillo
                        signalactive = 1;
316
                        lastsignalsize = $5;
317
                }
318 4 jcastillo
                };
319 2 jcastillo
 
320
out_bool:
321
        SC_OUT MENOR BOOL MAYOR
322
        {
323 4 jcastillo
        if(translate==1){
324 2 jcastillo
                activeport = 1;
325
                lastportsize = 0;
326
                lastportkind = (char *)"output";
327
        }
328 4 jcastillo
        };
329 2 jcastillo
 
330
out_sc_uint:
331
        SC_OUT MENOR SC_UINT MENOR NUMBER MAYOR MAYOR
332
        {
333 4 jcastillo
        if(translate==1){
334 2 jcastillo
                activeport = 1;
335
                lastportsize = $5;
336
                lastportkind = (char *)"output";
337
        }
338 4 jcastillo
        };
339 2 jcastillo
 
340
out_sc_int:
341
        SC_OUT MENOR SC_INT MENOR NUMBER MAYOR MAYOR
342
        {
343 4 jcastillo
        if(translate==1){
344 2 jcastillo
                activeport = 1;
345
                lastportsize = $5;
346
                lastportkind = (char *)"output";
347
        }
348 4 jcastillo
        };
349 2 jcastillo
 
350
sc_method:
351
        SC_METHOD OPENPAR WORD CLOSEPAR SEMICOLON
352
        {
353 4 jcastillo
        if(translate==1){
354 2 jcastillo
                if(method_found)
355
                        {
356
                        InsertProcess(processlist, active_method, sensibilitylist, active_method_type);
357
                        }
358
                active_method = (char *)$3;
359
                method_found = 1;
360
                /* New sensitivity list */
361
                sensibilitylist = (SensibilityList *)malloc(sizeof(SensibilityList));
362
                InitializeSensibilityList(sensibilitylist);
363
        }
364 4 jcastillo
        };
365
 
366
sensible_par_neg:
367
        SENSITIVE_NEG OPENPAR WORD CLOSEPAR SEMICOLON
368
        {
369
        if(translate==1){
370
            active_method_type = (char *)"seq"; //comb
371
                InsertSensibility(sensibilitylist, (char *)$3, "negedge");
372
        }
373
        };
374
 
375
sensible_par_pos:
376
        SENSITIVE_POS OPENPAR WORD CLOSEPAR SEMICOLON
377
        {
378
        if(translate==1){
379
            active_method_type = (char *)"seq"; //comb
380
                InsertSensibility(sensibilitylist, (char *)$3, "posedge");
381
        }
382
        };
383 2 jcastillo
 
384
sensitive_pos:
385
        SENSITIVE_POS
386
        {
387 4 jcastillo
        if(translate==1){
388 2 jcastillo
                last_sensibility = (char *)"posedge";
389
                active_method_type = (char *)"seq"; //seq
390
                sensibility_active = 1;
391
        }
392 4 jcastillo
        };
393 2 jcastillo
 
394
sensitive_neg:
395
        SENSITIVE_NEG
396
        {
397 4 jcastillo
        if(translate==1){
398 2 jcastillo
                last_sensibility = (char *)"negedge";
399
                active_method_type = (char *)"seq"; //seq
400
                sensibility_active = 1;
401
        }
402 4 jcastillo
        };
403 2 jcastillo
 
404
sensitive:
405
        SENSITIVE
406
        {
407 4 jcastillo
        if(translate==1){
408 2 jcastillo
                last_sensibility = (char *)" ";
409
                active_method_type = (char *)"comb"; //comb
410
                sensibility_active = 1;
411
        }
412 4 jcastillo
        };
413
 
414
sensible_par_colon:
415
        SENSITIVE OPENPAR WORD CLOSEPAR SEMICOLON
416
        {
417
        if(translate==1){
418
            active_method_type = (char *)"comb"; //comb
419
                InsertSensibility(sensibilitylist, (char *)$3, " ");
420
        }
421
        };
422
 
423
 
424 2 jcastillo
sensible_word_colon:
425
        SENSIBLE WORD
426
        {
427 4 jcastillo
        if(translate==1){
428 2 jcastillo
                InsertSensibility(sensibilitylist, (char *)$2, (char *)last_sensibility);
429
        }
430 4 jcastillo
        };
431 2 jcastillo
 
432
sensible_word_semicolon:
433
        SENSIBLE WORD SEMICOLON
434
        {
435 4 jcastillo
        if(translate==1){
436 2 jcastillo
                InsertSensibility(sensibilitylist, (char *)$2, (char *)last_sensibility);
437
                if(sensibility_active)
438
                        {
439
                        sensibility_active = 0;
440
                        }
441
        }
442 4 jcastillo
        };
443 2 jcastillo
 
444
closekey:
445
        CLOSEKEY
446
        {
447 4 jcastillo
        if(translate==1){
448 2 jcastillo
                if(method_found)
449
                        {
450
                        method_found = 0;
451
                        InsertProcess(processlist, active_method, sensibilitylist, active_method_type);
452
                        }
453 4 jcastillo
        }
454
        };
455
 
456 2 jcastillo
word_semicolon:
457
        WORD SEMICOLON
458
        {
459 4 jcastillo
        if(translate==1){
460 2 jcastillo
                        if(activeport)
461
                        {
462
                                InsertPort(portlist, (char *)$1, lastportkind, lastportsize);
463
                                activeport = 0;
464
                        }
465
                        else if(signalactive)
466
                        {
467
                                InsertSignal(signalslist, (char *)$1, lastsignalsize);
468
                                signalactive = 0;
469 4 jcastillo
                        }else if(multipledec){
470
                          int length,list_pos;
471
                      length=0;
472
                      list_pos=0;
473
                      //Look in the enumerated list if it was declared e.j state_t state;
474
                      list_pos=findEnumList(enumlistlist, storedtype);
475
                      if(list_pos>-1){
476
                        //Calculate the number of bits needed to represent the enumerate
477
                length=findEnumerateLength(enumlistlist,list_pos);
478
 
479
                        InsertSignal(signalslist, (char *)$1,length);
480
                            InsertWrite(writeslist,(char *)$1);
481
                                free(storedtype);
482
                            multipledec=0;
483
              }else{
484
                fprintf(stderr,"\nType %s unknow\n",(char *)$1);
485
                return(1);
486
              }
487
                   }
488 2 jcastillo
        }
489 4 jcastillo
        };
490 2 jcastillo
 
491
word_colon:
492
                WORD COLON
493
                {
494 4 jcastillo
                if(translate==1){
495 2 jcastillo
                        if(activeport)
496
                        {
497
                                InsertPort(portlist, (char *)$1, lastportkind, lastportsize);
498
                        }
499
                        else if(signalactive)
500
                        {
501
                                InsertSignal(signalslist, (char *)$1, lastsignalsize);
502
                        }
503 4 jcastillo
                        else if(reading_enumerates)
504
                        {
505
                            InsertEnumerates(enumerateslist, (char *)$1);
506
 
507
                        }else if(multipledec){
508
                          int length,list_pos;
509
                      length=0;
510
                      list_pos=0;
511
                      //Look in the enumerated list if it was declared e.j state_t state;
512
                      list_pos=findEnumList(enumlistlist, storedtype);
513
                      if(list_pos>-1){
514
                        //Calculate the number of bits needed to represent the enumerate
515
                length=findEnumerateLength(enumlistlist,list_pos);
516
 
517
                        InsertSignal(signalslist, (char *)$1,length);
518
                            InsertWrite(writeslist,(char *)$1);
519
                            multipledec=1;
520
              }else{
521
                fprintf(stderr,"\nType %s unknow\n",(char *)$1);
522
                return(1);
523
              }
524
                   }
525 2 jcastillo
                }
526 4 jcastillo
                };
527 2 jcastillo
 
528 4 jcastillo
word_closekey_word:
529
        WORD CLOSEKEY WORD SEMICOLON
530
                {
531
                if(translate==1){
532
                  //Finish enumerate var declaration
533
                  if(reading_enumerates)
534
                  {
535
                    InsertEnumerates(enumerateslist, (char *)$1);
536
                        InsertEnumList(enumlistlist,enumerateslist,(char *)$4,0); //Insert also the variable name
537
                    reading_enumerates=0;
538
                  }
539
                }
540
                };
541
 
542
word_closekey:
543
        WORD CLOSEKEY SEMICOLON
544
                {
545
                if(translate==1){
546
                  //Finish enumerate type declaration
547
                  if(reading_enumerates)
548
                  {
549
                    InsertEnumerates(enumerateslist, (char *)$1);
550
                        InsertEnumList(enumlistlist,enumerateslist,enumname,1); //Insert also the variable name
551
                        free(enumname);
552
                    reading_enumerates=0;
553
                  }
554
                }
555
                };
556
 
557
 
558 2 jcastillo
instantation:
559
                WORD EQUALS NEW WORD OPENPAR QUOTE WORD QUOTE CLOSEPAR SEMICOLON
560
                {
561 4 jcastillo
                if(translate==1){
562 2 jcastillo
                        InsertInstance(instanceslist, (char *)$1, (char *)$4);
563
                }
564 4 jcastillo
                };
565 2 jcastillo
 
566
port_binding:
567
                WORD ARROW WORD OPENPAR WORD CLOSEPAR SEMICOLON
568 4 jcastillo
                {
569
        if(translate==1){
570 2 jcastillo
                        if(instanceslist->last == NULL)
571
                        {
572
                                fprintf(stderr,"error: no instances found\n");
573
                        }
574
                        else
575
                        {
576
                                InstanceNode *aux;
577
                                aux = instanceslist->first;
578
                                while(1)
579
                                {
580
                                        if(strcmp(aux->nameinstance, (char *)$1) == 0)
581
                                        {
582
                                                break;
583
                                        }
584
                                        else
585
                                        {
586
                                                if(aux->next == NULL)
587
                                                {
588
                                                        fprintf(stderr,"error: instance %s not found\n",$1);
589
                                                        exit(1);
590
                                                }
591
                                                else
592
                                                {
593
                                                        aux = aux->next;
594
                                                }
595
                                        }
596
                                }
597
                                InsertBind(aux->bindslist, (char *)$3, (char *)$5);
598
                        }
599
                }
600 4 jcastillo
                };
601 2 jcastillo
 
602
sc_ctor:
603
                SC_CTOR OPENPAR WORD CLOSEPAR OPENKEY
604
                {
605 4 jcastillo
 
606
                };
607 2 jcastillo
 
608
void:
609
                VOID WORD OPENPAR CLOSEPAR SEMICOLON
610
                {
611
 
612 4 jcastillo
                };
613 2 jcastillo
 
614
inst_decl:
615
                WORD ASTERISCO WORD SEMICOLON
616
                {
617
 
618 4 jcastillo
                };
619 2 jcastillo
 
620
closekey_semicolon:     CLOSEKEY SEMICOLON
621
                {
622
 
623 4 jcastillo
                };
624
 
625
enumerates:
626
         ENUM OPENKEY
627
                 {
628
                 if(translate==1){
629
                   //New enumerate list
630
                   enumerateslist = (EnumeratesList *)malloc(sizeof(EnumeratesList));
631
                   InitializeEnumeratesList(enumerateslist);
632
           reading_enumerates=1;
633
                 }
634
                 };
635
 
636
enumerates_type:
637
         ENUM WORD OPENKEY
638
                 {
639
                 if(translate==1){
640
                   //In this case we define type e.g. enum state_t {S0,S1,S2};
641
                   enumerateslist = (EnumeratesList *)malloc(sizeof(EnumeratesList));
642
                   InitializeEnumeratesList(enumerateslist);
643
                   enumname=malloc(sizeof(char)*strlen((char *)$2));
644
                   strcpy(enumname,(char *)$2);
645
           reading_enumerates=1;
646
                 }
647
                 };
648
 
649
declaration:
650
         WORD WORD SEMICOLON
651
                 {
652
                 if(translate==1){
653
           int length,list_pos;
654
                   length=0;
655
                   list_pos=0;
656
                   //Look in the enumerated list if it was declared e.j state_t state;
657
                   list_pos=findEnumList(enumlistlist, (char *)$1);
658
                   if(list_pos>-1){
659
                      //Calculate the number of bits needed to represent the enumerate
660
              length=findEnumerateLength(enumlistlist,list_pos);
661
 
662
                      InsertSignal(signalslist, (char *)$2,length);
663
                          InsertWrite(writeslist,(char *)$2);
664
           }else{
665
              fprintf(stderr,"\nType %s unknow\n",(char *)$1);
666
              return(1);
667
           }
668
                 }
669
                 };
670
 
671
declaration_sc_signal:
672
         SC_SIGNAL MENOR WORD MAYOR WORD SEMICOLON
673
                 {
674
                 if(translate==1){
675
           int length,list_pos;
676
                   length=0;
677
                   list_pos=0;
678
                   //Look in the enumerated list if it was declared e.j state_t state;
679
                   list_pos=findEnumList(enumlistlist, (char *)$3);
680
                   if(list_pos>-1){
681
                      //Calculate the number of bits needed to represent the enumerate
682
              length=findEnumerateLength(enumlistlist,list_pos);
683
 
684
                      InsertSignal(signalslist, (char *)$5,length);
685
                          InsertWrite(writeslist,(char *)$5);
686
           }else{
687
              fprintf(stderr,"\nType %s unknow\n",(char *)$3);
688
              return(1);
689
           }
690
                 }
691
                 };
692
 
693
multiple_declaration:
694
         WORD WORD COLON
695
                 {
696
                 if(translate==1){
697
           int length,list_pos;
698
                   length=0;
699
                   list_pos=0;
700
                   //Look in the enumerated list if it was declared e.j state_t state;
701
                   list_pos=findEnumList(enumlistlist, (char *)$1);
702
                   if(list_pos>-1){
703
                      //Calculate the number of bits needed to represent the enumerate
704
              length=findEnumerateLength(enumlistlist,list_pos);
705
                          storedtype=malloc(sizeof(char)*strlen((char *)$1));
706
                          strcpy(storedtype,(char *)$1);
707
                      InsertSignal(signalslist, (char *)$2,length);
708
                          InsertWrite(writeslist,(char *)$2);
709
                          multipledec=1;
710
           }else{
711
              fprintf(stderr,"\nType %s unknow\n",(char *)$1);
712
              return(1);
713
           }
714
                 }
715
                 };
716
 
717
multiple_sc_signal_declaration:
718
         SC_SIGNAL MENOR WORD MAYOR WORD COLON
719
                 {
720
                 if(translate==1){
721
           int length,list_pos;
722
                   length=0;
723
                   list_pos=0;
724
                   //Look in the enumerated list if it was declared e.j state_t state;
725
                   list_pos=findEnumList(enumlistlist, (char *)$3);
726
                   if(list_pos>-1){
727
                      //Calculate the number of bits needed to represent the enumerate
728
              length=findEnumerateLength(enumlistlist,list_pos);
729
                          storedtype=malloc(sizeof(char)*strlen((char *)$3));
730
                          strcpy(storedtype,(char *)$3);
731
                      InsertSignal(signalslist, (char *)$5,length);
732
                          InsertWrite(writeslist,(char *)$5);
733
                          multipledec=1;
734
           }else{
735
              fprintf(stderr,"\nType %s unknow\n",(char *)$3);
736
              return(1);
737
           }
738
                 }
739
                 };
740
 
741
translateoff:
742
        TRANSLATEOFF
743
                {
744
                  translate=0;
745
                  fprintf(stderr,"Found Translate off directive \n");
746
        };
747
 
748
translateon:
749
        TRANSLATEON
750
                {
751
                  translate=1;
752
                  fprintf(stderr,"Found Translate on directive \n");
753
        };

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.