URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc
Compare Revisions
- This comparison shows the changes necessary to convert path
/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk/mpsoc/src_c/ihex2mif
- from Rev 19 to Rev 25
- ↔ Reverse comparison
Rev 19 → Rev 25
/Makefile
1,3 → 1,3
#!/bin/sh |
all: |
gcc main.c -o ihex2mif |
gcc -Wall main.c -o ihex2mif |
/ihex.c
11,7 → 11,12
#include <stdio.h> |
#include <string.h> |
#include <stdlib.h> |
#include <ctype.h> |
|
#ifndef MAX_MEMORY_SIZE |
#define MAX_MEMORY_SIZE 65535 |
#endif |
|
/* some ansi prototypes.. maybe ought to make a .h file */ |
|
/* this loads an intel hex file into the memory[] array */ |
30,7 → 35,7
void hexout(FILE *fhex, int byte, int memory_location, int end); |
|
|
extern int memory[65536]; /* the memory is global */ |
extern int memory[MAX_MEMORY_SIZE+1]; /* the memory is global */ |
|
/* parses a line of intel hex code, stores the data in bytes[] */ |
/* and the beginning address in addr, and returns a 1 if the */ |
145,8 → 150,8
printf(" the addresses must be hexidecimal format\n"); |
return; |
} |
begin &= 65535; |
end &= 65535; |
begin &= MAX_MEMORY_SIZE; |
end &= MAX_MEMORY_SIZE; |
if (begin > end) { |
printf(" Begin address must be less than end address.\n"); |
return; |
/ihex2mif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
ihex2mif
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: main.c
===================================================================
--- main.c (revision 19)
+++ main.c (revision 25)
@@ -1,3 +1,5 @@
+#define MAX_MEMORY_SIZE 0xFFFFF //max memory size in bytes mustbe power of 2
+
#include "ihex.c"
#include
#include
@@ -5,7 +7,7 @@
#define DEFAULT_OUT_FILE_NAME "out.mif"
#define DEAFULT_END_SIZE "1FFF"
-int memory[65536]; /* the memory is global */
+int memory[MAX_MEMORY_SIZE+1]; /* the memory is global */
unsigned int end_addr_int;
FILE * in, * out;
char *file_name, *end_addr, *out_file_name ;
/out.mif
0,0 → 1,257
-- Copyright (C) 1991-2013 Altera Corporation |
-- Your use of Altera Corporation's design tools, logic functions |
-- and other software and tools, and its AMPP partner logic |
-- functions, and any output files from any of the foregoing |
-- (including device programming or simulation files), and any |
-- associated documentation or information are expressly subject |
-- to the terms and conditions of the Altera Program License |
-- Subscription Agreement, Altera MegaCore Function License |
-- Agreement, or other applicable license agreement, including, |
-- without limitation, that your use is for the sole purpose of |
-- programming logic devices manufactured by Altera and sold by |
-- Altera or its authorized distributors. Please refer to the |
-- applicable agreement for further details. |
|
-- Quartus II generated Memory Initialization File (.mif) |
|
WIDTH=32; |
DEPTH=8191; |
|
ADDRESS_RADIX=HEX; |
DATA_RADIX=HEX; |
|
CONTENT BEGIN |
0000 : B8080050; |
0001 : 00000000; |
0002 : B808017C; |
0003 : 00000000; |
0004 : B808018C; |
[0005..0007] : 00000000; |
0008 : B8080184; |
[0009..0013] : 00000000; |
0014 : 31A004C0; |
0015 : 304003B8; |
0016 : 30200D30; |
0017 : B9F40014; |
0018 : 80000000; |
0019 : B9F40140; |
001A : 30A30000; |
001B : B8000000; |
001C : 2021FFEC; |
001D : F9E10000; |
001E : 20C004C0; |
001F : 20E004C0; |
0020 : 06463800; |
0021 : BC720014; |
0022 : F8060000; |
0023 : 20C60004; |
0024 : 06463800; |
0025 : BC92FFF4; |
0026 : 20C004C0; |
0027 : 20E0053C; |
0028 : 06463800; |
0029 : BC720014; |
002A : F8060000; |
002B : 20C60004; |
002C : 06463800; |
002D : BC92FFF4; |
002E : B9F400E4; |
002F : 80000000; |
0030 : 20C00000; |
0031 : 20E00000; |
0032 : B9F40024; |
0033 : 20A00000; |
0034 : 32630000; |
0035 : B9F400C0; |
0036 : 80000000; |
0037 : C9E10000; |
0038 : 30730000; |
0039 : B60F0008; |
003A : 20210014; |
003B : E8A003B8; |
003C : E8E003C0; |
003D : E94003C4; |
003E : B00000F8; |
003F : 312004C0; |
0040 : B0001A00; |
0041 : 31000000; |
0042 : 30600001; |
0043 : F8650000; |
0044 : 10C00000; |
0045 : E8650000; |
0046 : 30800002; |
0047 : 30630001; |
0048 : F8650000; |
0049 : 10642000; |
004A : F88304C0; |
004B : 30840002; |
004C : AA44001E; |
004D : BE32FFF4; |
004E : 10642000; |
004F : F90004C0; |
0050 : F9270000; |
0051 : BC26FFD0; |
0052 : E86A0000; |
0053 : A4C30001; |
0054 : BC26FFC4; |
0055 : E86A0000; |
0056 : A4C30001; |
0057 : BC26FFB8; |
0058 : B800FFE8; |
0059 : B8000008; |
005A : 80000000; |
005B : BE25FFFC; |
005C : 30A5FFFF; |
005D : B60F0008; |
005E : 80000000; |
005F : B6110000; |
0060 : 80000000; |
0061 : B6910000; |
0062 : 80000000; |
0063 : B62E0000; |
0064 : 80000000; |
0065 : B60F0008; |
0066 : 80000000; |
0067 : B60F0008; |
0068 : 80000000; |
0069 : 3021FFE0; |
006A : 10C00000; |
006B : FA61001C; |
006C : F9E10000; |
006D : B9F40024; |
006E : 12650000; |
006F : E8A003AC; |
0070 : E8650028; |
0071 : BC03000C; |
0072 : 99FC1800; |
0073 : 80000000; |
0074 : B9F4FE9C; |
0075 : 10B30000; |
0076 : E86003AC; |
0077 : 3021FFC8; |
0078 : FB410030; |
0079 : FB610034; |
007A : F9E10000; |
007B : FA61001C; |
007C : FAC10020; |
007D : FAE10024; |
007E : FB010028; |
007F : FB21002C; |
0080 : EB030048; |
0081 : 13650000; |
0082 : BE180050; |
0083 : 13460000; |
0084 : E8780004; |
0085 : EB380088; |
0086 : 3263FFFF; |
0087 : BC53003C; |
0088 : 64930402; |
0089 : 30640008; |
008A : 12D81800; |
008B : BE060074; |
008C : 12F92000; |
008D : BC1900C0; |
008E : E8770080; |
008F : 1643D000; |
0090 : BC1200EC; |
0091 : 3273FFFF; |
0092 : 32F7FFFC; |
0093 : AA53FFFF; |
0094 : BE32FFE8; |
0095 : 32D6FFFC; |
0096 : E9E10000; |
0097 : EA61001C; |
0098 : EAC10020; |
0099 : EAE10024; |
009A : EB010028; |
009B : EB21002C; |
009C : EB410030; |
009D : EB610034; |
009E : B60F0008; |
009F : 30210038; |
00A0 : E8B70000; |
00A1 : 99FC3800; |
00A2 : 80000000; |
00A3 : 3273FFFF; |
00A4 : 32F7FFFC; |
00A5 : AA53FFFF; |
00A6 : BE12FFC0; |
00A7 : 32D6FFFC; |
00A8 : E8780004; |
00A9 : E8F60000; |
00AA : 3063FFFF; |
00AB : 16439800; |
00AC : BC120074; |
00AD : F8160000; |
00AE : BC07FFD4; |
00AF : BE190058; |
00B0 : 30800001; |
00B1 : E8790100; |
00B2 : 44849C00; |
00B3 : 84641800; |
00B4 : BC030044; |
00B5 : E8790104; |
00B6 : 84641800; |
00B7 : BC23FFA4; |
00B8 : E8D70000; |
00B9 : 99FC3800; |
00BA : 10BB0000; |
00BB : B810FFA4; |
[00BC..00BD] : 3273FFFF; |
00BE : AA53FFFF; |
00BF : BE12FF5C; |
00C0 : 3273FFFF; |
00C1 : AA53FFFF; |
00C2 : BE32FFF0; |
00C3 : 3273FFFF; |
00C4 : B800FF48; |
00C5 : 99FC3800; |
00C6 : 3273FFFF; |
00C7 : B810FF78; |
00C8 : 32F7FFFC; |
00C9 : FA780004; |
00CA : B800FF90; |
00CB : E8780004; |
00CC : E8F60000; |
00CD : 3063FFFF; |
00CE : 16439800; |
00CF : BC120054; |
00D0 : F8160000; |
00D1 : BC07FF00; |
00D2 : BC190038; |
00D3 : 30800001; |
00D4 : E8790100; |
00D5 : 44849C00; |
00D6 : 84641800; |
00D7 : BC030024; |
00D8 : E8790104; |
00D9 : 84641800; |
00DA : BC230030; |
00DB : E8D70000; |
00DC : 99FC3800; |
00DD : 10BB0000; |
00DE : B810FED0; |
00DF : 3273FFFF; |
00E0 : 99FC3800; |
00E1 : 3273FFFF; |
00E2 : B810FEC4; |
00E3 : 32F7FFFC; |
00E4 : FA780004; |
00E5 : B800FFB0; |
00E6 : E8B70000; |
00E7 : 99FC3800; |
00E8 : 3273FFFF; |
00E9 : B810FEA8; |
00EA : 32F7FFFC; |
00EB : 000003CC; |
00EC : 43000000; |
00ED : 00000000; |
00EE : 41000000; |
00EF : 40000000; |
00F0 : 40000004; |
00F1 : 40000008; |
00F2 : 000003CC; |
[00F3..00FA] : 00000000; |
00FB : 000003B0; |
[00FC..1FFE] : 00000000; |
END; |
out.mif
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property