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

Subversion Repositories sc2v

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

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
                    reading_enumerates=0;
552
                  }
553
                }
554
                };
555
 
556
 
557 2 jcastillo
instantation:
558
                WORD EQUALS NEW WORD OPENPAR QUOTE WORD QUOTE CLOSEPAR SEMICOLON
559
                {
560 4 jcastillo
                if(translate==1){
561 2 jcastillo
                        InsertInstance(instanceslist, (char *)$1, (char *)$4);
562
                }
563 4 jcastillo
                };
564 2 jcastillo
 
565
port_binding:
566
                WORD ARROW WORD OPENPAR WORD CLOSEPAR SEMICOLON
567 4 jcastillo
                {
568
        if(translate==1){
569 2 jcastillo
                        if(instanceslist->last == NULL)
570
                        {
571
                                fprintf(stderr,"error: no instances found\n");
572
                        }
573
                        else
574
                        {
575
                                InstanceNode *aux;
576
                                aux = instanceslist->first;
577
                                while(1)
578
                                {
579
                                        if(strcmp(aux->nameinstance, (char *)$1) == 0)
580
                                        {
581
                                                break;
582
                                        }
583
                                        else
584
                                        {
585
                                                if(aux->next == NULL)
586
                                                {
587
                                                        fprintf(stderr,"error: instance %s not found\n",$1);
588
                                                        exit(1);
589
                                                }
590
                                                else
591
                                                {
592
                                                        aux = aux->next;
593
                                                }
594
                                        }
595
                                }
596
                                InsertBind(aux->bindslist, (char *)$3, (char *)$5);
597
                        }
598
                }
599 4 jcastillo
                };
600 2 jcastillo
 
601
sc_ctor:
602
                SC_CTOR OPENPAR WORD CLOSEPAR OPENKEY
603
                {
604 4 jcastillo
 
605
                };
606 2 jcastillo
 
607
void:
608
                VOID WORD OPENPAR CLOSEPAR SEMICOLON
609
                {
610
 
611 4 jcastillo
                };
612 2 jcastillo
 
613
inst_decl:
614
                WORD ASTERISCO WORD SEMICOLON
615
                {
616
 
617 4 jcastillo
                };
618 2 jcastillo
 
619
closekey_semicolon:     CLOSEKEY SEMICOLON
620
                {
621
 
622 4 jcastillo
                };
623
 
624
enumerates:
625
         ENUM OPENKEY
626
                 {
627
                 if(translate==1){
628
                   //New enumerate list
629
                   enumerateslist = (EnumeratesList *)malloc(sizeof(EnumeratesList));
630
                   InitializeEnumeratesList(enumerateslist);
631
           reading_enumerates=1;
632
                 }
633
                 };
634
 
635
enumerates_type:
636
         ENUM WORD OPENKEY
637
                 {
638
                 if(translate==1){
639
                   //In this case we define type e.g. enum state_t {S0,S1,S2};
640
                   enumerateslist = (EnumeratesList *)malloc(sizeof(EnumeratesList));
641
                   InitializeEnumeratesList(enumerateslist);
642
                   enumname=malloc(sizeof(char)*strlen((char *)$2));
643
                   strcpy(enumname,(char *)$2);
644
           reading_enumerates=1;
645
                 }
646
                 };
647
 
648
declaration:
649
         WORD WORD SEMICOLON
650
                 {
651
                 if(translate==1){
652
           int length,list_pos;
653
                   length=0;
654
                   list_pos=0;
655
                   //Look in the enumerated list if it was declared e.j state_t state;
656
                   list_pos=findEnumList(enumlistlist, (char *)$1);
657
                   if(list_pos>-1){
658
                      //Calculate the number of bits needed to represent the enumerate
659
              length=findEnumerateLength(enumlistlist,list_pos);
660
 
661
                      InsertSignal(signalslist, (char *)$2,length);
662
                          InsertWrite(writeslist,(char *)$2);
663
           }else{
664
              fprintf(stderr,"\nType %s unknow\n",(char *)$1);
665
              return(1);
666
           }
667
                 }
668
                 };
669
 
670
declaration_sc_signal:
671
         SC_SIGNAL MENOR WORD MAYOR WORD SEMICOLON
672
                 {
673
                 if(translate==1){
674
           int length,list_pos;
675
                   length=0;
676
                   list_pos=0;
677
                   //Look in the enumerated list if it was declared e.j state_t state;
678
                   list_pos=findEnumList(enumlistlist, (char *)$3);
679
                   if(list_pos>-1){
680
                      //Calculate the number of bits needed to represent the enumerate
681
              length=findEnumerateLength(enumlistlist,list_pos);
682
 
683
                      InsertSignal(signalslist, (char *)$5,length);
684
                          InsertWrite(writeslist,(char *)$5);
685
           }else{
686
              fprintf(stderr,"\nType %s unknow\n",(char *)$3);
687
              return(1);
688
           }
689
                 }
690
                 };
691
 
692
multiple_declaration:
693
         WORD WORD COLON
694
                 {
695
                 if(translate==1){
696
           int length,list_pos;
697
                   length=0;
698
                   list_pos=0;
699
                   //Look in the enumerated list if it was declared e.j state_t state;
700
                   list_pos=findEnumList(enumlistlist, (char *)$1);
701
                   if(list_pos>-1){
702
                      //Calculate the number of bits needed to represent the enumerate
703
              length=findEnumerateLength(enumlistlist,list_pos);
704
                          storedtype=malloc(sizeof(char)*strlen((char *)$1));
705
                          strcpy(storedtype,(char *)$1);
706
                      InsertSignal(signalslist, (char *)$2,length);
707
                          InsertWrite(writeslist,(char *)$2);
708
                          multipledec=1;
709
           }else{
710
              fprintf(stderr,"\nType %s unknow\n",(char *)$1);
711
              return(1);
712
           }
713
                 }
714
                 };
715
 
716
multiple_sc_signal_declaration:
717
         SC_SIGNAL MENOR WORD MAYOR WORD COLON
718
                 {
719
                 if(translate==1){
720
           int length,list_pos;
721
                   length=0;
722
                   list_pos=0;
723
                   //Look in the enumerated list if it was declared e.j state_t state;
724
                   list_pos=findEnumList(enumlistlist, (char *)$3);
725
                   if(list_pos>-1){
726
                      //Calculate the number of bits needed to represent the enumerate
727
              length=findEnumerateLength(enumlistlist,list_pos);
728
                          storedtype=malloc(sizeof(char)*strlen((char *)$3));
729
                          strcpy(storedtype,(char *)$3);
730
                      InsertSignal(signalslist, (char *)$5,length);
731
                          InsertWrite(writeslist,(char *)$5);
732
                          multipledec=1;
733
           }else{
734
              fprintf(stderr,"\nType %s unknow\n",(char *)$3);
735
              return(1);
736
           }
737
                 }
738
                 };
739
 
740
translateoff:
741
        TRANSLATEOFF
742
                {
743
                  translate=0;
744
                  fprintf(stderr,"Found Translate off directive \n");
745
        };
746
 
747
translateon:
748
        TRANSLATEON
749
                {
750
                  translate=1;
751
                  fprintf(stderr,"Found Translate on directive \n");
752
        };

powered by: WebSVN 2.1.0

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