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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [src/] [sc2v_step1.y] - Diff between revs 23 and 24

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 23 Rev 24
Line 190... Line 190...
  |
  |
  case_number
  case_number
  |
  |
  case_hexnumber
  case_hexnumber
  |
  |
 
  case_hexword
 
  |
 
  case_hexnumberword
 
  |
  case_word
  case_word
  |
  |
  case_default
  case_default
  |
  |
  break
  break
Line 777... Line 781...
    }
    }
  else if (verilog == 1)
  else if (verilog == 1)
    {
    {
      fprintf (file, "(");
      fprintf (file, "(");
    }
    }
 
  //If par after a sc_reg declaration the declaration is a type cast
 
  reg_found=0;
}
}
 
 
closepar:
closepar:
CLOSEPAR
CLOSEPAR
{
{
Line 1043... Line 1049...
};
};
 
 
case_hexnumber:
case_hexnumber:
CASE HEXA NUMBER SYMBOL
CASE HEXA NUMBER SYMBOL
{
{
 
  //Is a dec number
  defineparenthesis = 0;
  defineparenthesis = 0;
  if (translate == 1 && verilog == 0)
  if (translate == 1 && verilog == 0)
    {
    {
      if (processfound)
      if (processfound)
        {
        {
Line 1065... Line 1072...
    }
    }
  else if (verilog == 1)
  else if (verilog == 1)
    fprintf (file, "case %d %s", $3, (char *) $4);
    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:
CASE WORD SYMBOL
CASE WORD SYMBOL
{
{
  defineparenthesis = 0;
  defineparenthesis = 0;
  if (translate == 1 && verilog == 0)
  if (translate == 1 && verilog == 0)

powered by: WebSVN 2.1.0

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