It's a pain to create a mif file
the format is tedious & time consuming
let this simple program create your "mif" file for you
just asm the source on any gcc equiped Unix box
how you ask ?
save the above source link to a file (shift click the
link)
save it as "s19_2_mif.c"
then type "gcc s19_2_mif.c -o s19_2_mif"
the program takes two arguments
first is the depth of your
memory
second is the name of your s19
file
I.E. "s19_2_mif 1024 flex.s19 > my.mif"
where flex.s19 looks like below and was produced from an
assembler
(any assembler that produces S19 output will work)
S1131F00A600C700DDC700DFA604C700DEC60000C8
S1131F10A4012608C6000CC700DD2006C6000EC7B3
S1131F2000DDC600DD47474747A40F97D61F91C77A
S1131F300002C600DDA40F97D61F91C70000C6009B
S1131F40DFA40797D61F89C7000A3CDFC600DFA4B9
S1131F500797D61F89C7000B3CDFC600DEA407978E
S1131F60D61F89C700083CDEC600DEA40797D61F2B
S1131F7089C700093CDEAE10C60007A10F26F9C6CA
S1131F80000726FB5A26F12084C0C0C040404040D0
S1131F90C0C0F9A4B0999282F880988883C6A186BB
S1041FA08EAE
S10B1FF81F001F001F001F0061
S9030000FC
And produces the file my.mif {abbreviated some ;)}
DEPTH = 1024;
WIDTH = 8;
ADDRESS_RADIX = HEX;
DATA_RADIX = HEX;
CONTENT
BEGIN
300 : a6;
301 : 00;
302 : c7;
303 : 00;
304 : dd;
305 : c7;
306 : 00;
307 : df;
308 : a6;
309 : 04;
30a : c7;
30b : 00;
[many lines deleted]
39c : 83;
39d : c6;
39e : a1;
39f : 86;
3a0 : 8e;
3f8 : 1f;
3f9 : 00;
3fa : 1f;
3fb : 00;
3fc : 1f;
3fd : 00;
3fe : 1f;
3ff : 00;
END ;
This may be used to enter strings and other constants
into the memory array.
Note the the difference in
starting address 300h,
the memory depth, and the
starting address of the code 1F00h.
This was done to allow the entry of multiple locations
within the memory depth to be addressedin a modulus form. I.E. 300h
= 1F00h mod 400h; or in decimal 768 = 7935 mod
1024;
( This program was derived from EE552 Lab6 mif demonstration
program Winter 2000)