URL
https://opencores.org/ocsvn/mlite/mlite/trunk
[/] [mlite/] [trunk/] [tools/] [ram_image.c] - Diff between revs 137 and 336
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 137 |
Rev 336 |
Line 13... |
Line 13... |
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
{
|
{
|
FILE *file;
|
FILE *file;
|
int i, j, index, size, count;
|
int i, j, index, size, count;
|
char *buf, *ptr, *ptr_list[64*4], text[80];
|
char *buf, *ptr, *ptr_list[64*4], text[80];
|
unsigned long *code;
|
unsigned int *code;
|
|
|
if(argc < 4)
|
if(argc < 4)
|
{
|
{
|
printf("Usage: ram_image <in.vhd> <in_code.txt> <out.vhd>\n");
|
printf("Usage: ram_image <in.vhd> <in_code.txt> <out.vhd>\n");
|
printf("Usage: ram_image ram_xilinx.vhd code.txt ram_image.vhd\n");
|
printf("Usage: ram_image ram_xilinx.vhd code.txt ram_image.vhd\n");
|
return 0;
|
return 0;
|
}
|
}
|
|
|
buf = (char*)malloc(BUF_SIZE);
|
buf = (char*)malloc(BUF_SIZE);
|
code = (unsigned long*)malloc(BUF_SIZE);
|
code = (unsigned int*)malloc(BUF_SIZE);
|
|
|
//Read ram_xilinx.vhd
|
//Read ram_xilinx.vhd
|
file = fopen(argv[1], "rb");
|
file = fopen(argv[1], "rb");
|
if(file == NULL)
|
if(file == NULL)
|
{
|
{
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.