URL
https://opencores.org/ocsvn/sc2v/sc2v/trunk
Subversion Repositories sc2v
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 23 to Rev 24
- ↔ Reverse comparison
Rev 23 → Rev 24
/trunk/ChangeLog
1,3 → 1,9
18-03-2005 Version 0.4.2 |
|
Corrected bug in hexadecimal numbers in case statatements |
Corrected bug in type conversions |
Corrected bug in array length |
|
15-03-2005 Version 0.4.1 |
|
Corrected bug with <= comparation |
/trunk/src/sc2v_step1.y
192,6 → 192,10
| |
case_hexnumber |
| |
case_hexword |
| |
case_hexnumberword |
| |
case_word |
| |
case_default |
779,6 → 783,8
{ |
fprintf (file, "("); |
} |
//If par after a sc_reg declaration the declaration is a type cast |
reg_found=0; |
} |
|
closepar: |
1045,6 → 1051,7
case_hexnumber: |
CASE HEXA NUMBER SYMBOL |
{ |
//Is a dec number |
defineparenthesis = 0; |
if (translate == 1 && verilog == 0) |
{ |
1067,6 → 1074,58
fprintf (file, "case %d %s", $3, (char *) $4); |
}; |
|
case_hexword: |
CASE HEXA WORD SYMBOL |
{ |
//Begin with a-F |
defineparenthesis = 0; |
if (translate == 1 && verilog == 0) |
{ |
if (processfound) |
{ |
if (!openedcase) |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
if (openedcase) |
fprintf (file, ", 'h%s", (char *)$3); |
else |
fprintf (file, "'h%s", (char *)$3); |
|
newline = 1; |
openedcase = 1; |
|
} |
} |
else if (verilog == 1) |
fprintf (file, "case 0x%s %s", (char *)$3, (char *) $4); |
}; |
|
case_hexnumberword: |
CASE HEXA NUMBER WORD SYMBOL |
{ |
//Hex number beginning with dec number |
defineparenthesis = 0; |
if (translate == 1 && verilog == 0) |
{ |
if (processfound) |
{ |
if (!openedcase) |
for (i = 0; i < openedkeys; i++) |
fprintf (file, " "); |
if (openedcase) |
fprintf (file, ", 'h%d%s", $3,(char *)$4); |
else |
fprintf (file, "'h%d%s", $3,(char *)$4); |
|
newline = 1; |
openedcase = 1; |
|
} |
} |
else if (verilog == 1) |
fprintf (file, "case %d%s %s", $3, (char *) $4, (char *)$5); |
}; |
|
case_word: |
CASE WORD SYMBOL |
{ |
/trunk/src/sc2v_step2.y
199,8 → 199,9
sc_ctor |
| |
void |
|inst_decl |
| |
inst_decl |
| |
closekey_semicolon |
| |
enumerates |
/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/src/sc2v_step2.c
213,7 → 213,7
printf ("%s", sll->name); |
} |
if(sll->arraysize !=0) |
printf("[%d:0]", (-1 + sll->size)); |
printf("[%d:0]", (-1 + sll->arraysize)); |
printf(";\n"); |
} |
); |
/trunk/examples/dummy2.h
28,6 → 28,7
SC_METHOD(fsm_proc); |
sensitive(state); |
sensitive << input1; |
sensitive << array[3]; |
sensitive(input2); |
|
} |
/trunk/examples/dummy2.cpp
24,10 → 24,10
|
switch ((int) state.read ()) |
{ |
case 0x1: |
case 0x1a: |
if (input1.read ()) |
{ |
next_state.write (1); |
next_state.write (sc_uint<4>(0x1b1)); |
a.write (true); |
} |
else if (input2.read () < input1.read()) |
41,7 → 41,7
a.write (1); |
} |
break; |
case 0x2: |
case 0xfaf67: |
//hola |
switch(input1.read()){ |
case 0x1: |
68,7 → 68,7
b.write (1); |
} |
break; |
case 3: |
case 35: |
next_state.write (0); |
break; |
} |