URL
https://opencores.org/ocsvn/sc2v/sc2v/trunk
[/] [sc2v/] [trunk/] [src/] [sc2v_step2.c] - Diff between revs 19 and 20
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 19 |
Rev 20 |
Line 170... |
Line 170... |
);
|
);
|
return;
|
return;
|
}
|
}
|
|
|
SignalNode *
|
SignalNode *
|
InsertSignal (SignalNode * list, char *name, int size)
|
InsertSignal (SignalNode * list, char *name, int size, int arraysize)
|
{
|
{
|
SignalNode *sl;
|
SignalNode *sl;
|
|
|
sl = (SignalNode *) malloc (sizeof (SignalNode));
|
sl = (SignalNode *) malloc (sizeof (SignalNode));
|
strcpy (sl->name, name);
|
strcpy (sl->name, name);
|
sl->size = size;
|
sl->size = size;
|
|
sl->arraysize=arraysize;
|
SGLIB_LIST_ADD (SignalNode, list, sl, next);
|
SGLIB_LIST_ADD (SignalNode, list, sl, next);
|
return (list);
|
return (list);
|
|
|
}
|
}
|
|
|
Line 196... |
Line 197... |
printf ("reg ");
|
printf ("reg ");
|
if (sll->size != 0 && sll->size != 1)
|
if (sll->size != 0 && sll->size != 1)
|
{
|
{
|
printf ("[%d:0] ", (-1 + sll->size));
|
printf ("[%d:0] ", (-1 + sll->size));
|
}
|
}
|
printf ("%s;\n", sll->name);
|
printf ("%s", sll->name);
|
}
|
}
|
else
|
else
|
{
|
{
|
printf ("wire ");
|
printf ("wire ");
|
if (sll->size != 0 && sll->size != 1)
|
if (sll->size != 0 && sll->size != 1)
|
{
|
{
|
printf ("[%d:0] ", (-1 + sll->size));
|
printf ("[%d:0] ", (-1 + sll->size));
|
}
|
}
|
printf ("%s;\n", sll->name);
|
printf ("%s", sll->name);
|
}
|
}
|
|
if(sll->arraysize !=0)
|
|
printf("[%d:0]", (-1 + sll->size));
|
|
printf(";\n");
|
}
|
}
|
);
|
);
|
return;
|
return;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.