1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-01-18 17:06:57 +00:00

Remove old Files

This commit is contained in:
Marcel 2019-06-09 18:19:13 +02:00
parent ab489a805d
commit 6ef9be05ce
26 changed files with 0 additions and 155 deletions

View File

@ -1,7 +0,0 @@
copy /B defend.1 + defend.4 + defend.2 + defend.3 + defend.9 + defend.12 + defend.8 + defend.11 + defend.7 + defend.10 + defend.6 defender_prog.bin
make_vhdl_prom defender_prog.bin defender_prog.vhd
make_vhdl_prom decoder.2 defender_decoder_2.vhd
make_vhdl_prom decoder.3 defender_decoder_3.vhd
make_vhdl_prom defend.snd defender_sound.vhd

View File

@ -1,28 +0,0 @@
------------------------------------------------------
LINUX build command
------------------------------------------------------
gcc duplicate_byte.c -lm
mv a.out duplicate_byte
gcc make_vhdl_prom.c -lm
mv a.out make_vhdl_prom
------------------------------------------------------
Win32 build command (on linux system)
------------------------------------------------------
i686-w64-mingw32-gcc duplicate_byte.c -lm -m32
mv a.exe duplicate_byte.exe
i686-w64-mingw32-gcc make_vhdl_prom.c -lm -m32
mv a.exe make_vhdl_prom.exe
------------------------------------------------------
Win64 build command (on linux system)
------------------------------------------------------
x86_64-w64-mingw32-gcc duplicate_byte.c -lm
mv a.exe duplicate_byte.exe
x86_64-w64-mingw32-gcc make_vhdl_prom.c -lm
mv a.exe make_vhdl_prom.exe
------------------------------------------------------
------------------------------------------------------

View File

@ -1,37 +0,0 @@
#include "stdio.h"
#include "stdlib.h"
main (int argc, char **argv)
{
unsigned char byte;
FILE *fid_in,*fid_out;
if (argc != 3)
{
printf("Syntax : %s file_in file_out\n",argv[0]);
exit(0);
}
fid_in = fopen(argv[1],"rb");
if (fid_in == NULL)
{
printf("can't open %s\n",argv[1]);
exit(0);
}
fid_out = fopen(argv[2],"wb");
if (fid_out == NULL)
{
printf("can't open %s\n",argv[2]);
fclose(fid_in);
exit(0);
}
while (fread(&byte,1,1,fid_in)==1)
{
fwrite(&byte,1,1,fid_out);
fwrite(&byte,1,1,fid_out);
}
fclose(fid_in);
fclose(fid_out);
}

View File

@ -1,83 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
main (int argc, char **argv)
{
unsigned char byte;
int data_len,nb_byte,first_byte;
char *end_file_name;
FILE *fid_in,*fid_out;
if (argc != 3)
{
printf("Syntax : %s file_in file_out\n",argv[0]);
exit(0);
}
fid_in = fopen(argv[1],"rb");
if (fid_in == NULL)
{
printf("can't open %s\n",argv[1]);
exit(0);
}
fid_out = fopen(argv[2],"wt");
if (fid_out == NULL)
{
printf("can't open %s\n",argv[2]);
fclose(fid_in);
exit(0);
}
end_file_name = strstr(argv[2],".vhd");
if (end_file_name!=NULL) *end_file_name='\0';
fseek(fid_in,0,SEEK_END);
data_len = ftell(fid_in);
fseek(fid_in,0,SEEK_SET);
fprintf(fid_out,"library ieee;\n");
fprintf(fid_out,"use ieee.std_logic_1164.all,ieee.numeric_std.all;\n\n");
fprintf(fid_out,"entity %s is\n",argv[2]);
fprintf(fid_out,"port (\n");
fprintf(fid_out,"\tclk : in std_logic;\n");
fprintf(fid_out,"\taddr : in std_logic_vector(%d downto 0);\n",(int)ceil(log2((double)data_len))-1);
fprintf(fid_out,"\tdata : out std_logic_vector(7 downto 0)\n");
fprintf(fid_out,");\n");
fprintf(fid_out,"end entity;\n\n");
fprintf(fid_out,"architecture prom of %s is\n",argv[2]);
fprintf(fid_out,"\ttype rom is array(0 to %d) of std_logic_vector(7 downto 0);\n",data_len-1);
fprintf(fid_out,"\tsignal rom_data: rom := (");
nb_byte = 0;
first_byte = 1;
while(fread(&byte,1,1,fid_in)==1)
{
if (nb_byte==0)
{
if (first_byte==0) fprintf(fid_out,",");
fprintf(fid_out,"\n\t\t");
}
else
{ fprintf(fid_out,","); }
first_byte = 0;
fprintf(fid_out,"X\"%02X\"",byte);
nb_byte++;
if (nb_byte==16) nb_byte=0;
}
fprintf(fid_out,");\n");
fprintf(fid_out,"begin\n");
fprintf(fid_out,"process(clk)\n");
fprintf(fid_out,"begin\n");
fprintf(fid_out,"\tif rising_edge(clk) then\n");
fprintf(fid_out,"\t\tdata <= rom_data(to_integer(unsigned(addr)));\n");
fprintf(fid_out,"\tend if;\n");
fprintf(fid_out,"end process;\n");
fprintf(fid_out,"end architecture;\n");
fclose(fid_in);
fclose(fid_out);
}