URL
https://opencores.org/ocsvn/sc2v/sc2v/trunk
Subversion Repositories sc2v
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 22 to Rev 23
- ↔ Reverse comparison
Rev 22 → Rev 23
/trunk/ChangeLog
6,7 → 6,8
Support sc_signals arrays |
Corrected bug when connecting a output port to another |
Solved problem in type conversions |
Solved problem with enumeration list |
Solved problem with enumeration list |
Solved bug in nested switch statements |
|
25-02-2005 Version 0.4 |
|
/trunk/src/sc2v_step1.y
31,6 → 31,7
int lineno = 1; |
int processfound = 0; |
int switchfound = 0; |
int lastswitch=0; |
int switchparenthesis[256]; |
int ifdeffound = 0; |
char *processname, *processname2; |
520,7 → 521,9
{ |
if (processfound) |
{ |
if (openedcase) |
if(lastswitch){ |
openedcase=0; |
}else if (openedcase) |
{ |
fprintf (file, " :\n"); |
|
527,8 → 530,8
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
|
fprintf (file, "begin\n"); |
openedcase = 0; |
fprintf(file,"begin\n"); |
openedcase=0; |
} |
|
strcpy (lastword, (char *) $1); |
614,6 → 617,7
} |
else if (verilog == 1) |
fprintf (file, "%s ", (char *) $1); |
lastswitch=0; |
}; |
|
symbol: |
985,9 → 989,10
SWITCH |
{ |
defineparenthesis = 0; |
lastswitch=1; |
if (translate == 1 && verilog == 0) |
{ |
if (processfound) |
if (processfound && !openedcase) |
{ |
fprintf (file, "\n"); |
for (i = 0; i < openedkeys; i++) |
995,6 → 1000,17
fprintf (file, "case"); |
switchfound++; |
switchparenthesis[switchfound] = openedkeys + 1; |
}else if (processfound) |
{ |
fprintf (file, ":\n"); |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
fprintf(file,"begin\n"); |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
fprintf (file, "case"); |
switchfound++; |
switchparenthesis[switchfound] = openedkeys + 1; |
} |
} |
else if (verilog == 1) |
1009,6 → 1025,7
{ |
if (processfound) |
{ |
if (!openedcase) |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
if (openedcase) |
1033,6 → 1050,7
{ |
if (processfound) |
{ |
if (!openedcase) |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
if (openedcase) |
1057,6 → 1075,7
{ |
if (processfound) |
{ |
if (!openedcase) |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
if (openedcase) |
1081,6 → 1100,7
{ |
if (processfound) |
{ |
if (!openedcase) |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
fprintf (file, "default:\n"); |
/trunk/src/sc2v_step1.l
66,7 → 66,7
".read" if(!includefound & !linecomment & !multilinecomment) return READ; else {yylval=(int)strdup(yytext);} return WORD; |
".range" if(!includefound & !linecomment & !multilinecomment) return RANGE; else {yylval=(int)strdup(yytext);} return WORD; |
[a-zA-Z][_a-zA-Z0-9]* yylval=(int)strdup(yytext); return WORD; |
[.:"^"!%()/+*_"&""?""|""\\"] yylval=(int)strdup(yytext); return SYMBOL; |
[.:"^"!%()/+*_"&""?""|""\\"] yylval=(int)strdup(yytext); return SYMBOL; |
"<=" yylval=(int)strdup(yytext); return MINEQ; |
"=" yylval=(int)strdup(yytext); return EQUALS; |
"++" yylval=(int)strdup(yytext); return INC; |
/trunk/examples/dummy2.cpp
15,8 → 15,8
fsm::fsm_proc () |
{ |
|
sc_uint < 2 > c[4]; |
sc_uint < 4 > f; |
sc_uint <2> c[4]; |
sc_uint <4> f; |
next_state.write (state.read ()); |
array[0].write(1); |
|
24,7 → 24,7
|
switch ((int) state.read ()) |
{ |
case 0x1: //Case 0 |
case 0x1: |
if (input1.read ()) |
{ |
next_state.write (1); |
42,6 → 42,26
} |
break; |
case 0x2: |
//hola |
switch(input1.read()){ |
case 0x1: |
case 0x2: |
switch(input1.read()){ |
case 0x1: |
b.write(0); |
break; |
case 0x3: |
b.write(1); |
break; |
} |
b.write(0); |
break; |
case 0x3: |
b.write(1); |
break; |
} |
|
|
if (input2.read ()) |
{ |
next_state.write (2); |