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

Subversion Repositories mips789

[/] [mips789/] [tags/] [arelease/] [CTool/] [genmif.c] - Diff between revs 10 and 15

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

Rev 10 Rev 15
Line 1... Line 1...
/*这份代码经源码格式软件格式化过
 
     yang_hx@neusoft.com      */
 
#include "stdio.h"
#include "stdio.h"
#include "stdlib.h"
#include "stdlib.h"
#define DEFAULT_LEN  "2048"
#define DEFAULT_LEN  "2048"
 
/*Liwei 2007-8-29*/
 
 
 
 
/*the two functions listed between are added by Liwei 2007-8-29*/
 
char HEX[]="0123456789ABCDEF" ;
char HEX[]="0123456789ABCDEF" ;
char hex[]="0123456789abcdef" ;
char hex[]="0123456789abcdef" ;
unsigned char hex2byte(char hex_char)
unsigned char hex2byte(char hex_char)
{
{
    unsigned char i ;
    unsigned char i ;
Line 54... Line 49...
        else if(j==3)
        else if(j==3)
        ft=fopen("qu2_ram3.mif","w");
        ft=fopen("qu2_ram3.mif","w");
        base=(NULL!=argv[1])?par2u32(argv[1]):0 ;
        base=(NULL!=argv[1])?par2u32(argv[1]):0 ;
        base=base/4 ;
        base=base/4 ;
        fprintf(ft,"WIDTH=8;\n");
        fprintf(ft,"WIDTH=8;\n");
        /*(NULL!=argv[2])?argv[2]:*/
 
        fprintf(ft,"DEPTH=%s;\n\n",DEFAULT_LEN);
        fprintf(ft,"DEPTH=%s;\n\n",DEFAULT_LEN);
        fprintf(ft,"ADDRESS_RADIX=HEX;\n");
        fprintf(ft,"ADDRESS_RADIX=HEX;\n");
        fprintf(ft,"DATA_RADIX=HEX;\n\n");
        fprintf(ft,"DATA_RADIX=HEX;\n\n");
        fprintf(ft,"CONTENT BEGIN \n");
        fprintf(ft,"CONTENT BEGIN \n");
        i=base ;
        i=base ;

powered by: WebSVN 2.1.0

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