You created 4096 bytes of memory. Which means 1024 words.
You can use IOWR_32DIRECT (word), IOWR_16DIRECT (half-word), IOWR_8DIRECT(byte) to perform data writes with the following syntax IOWR_32DIRECT(Base_component_address, offset, data).
The standard IORD/IOWR macro's perform 32 bits operations.
So If you have memory at 0x0 and you wrote 1,2,3 to the memory in word operations using IOWR (with offset increasing by 4) it would look like this if you read it back as bytes (=8 bits).
0x0 = 1
0x1 = 0
0x2 = 0
0x3 = 0
0x4 = 2
0x5 = 0
0x6 = 0
0x7 = 0
0x8 = 3
0x9 = 0
0xA = 0
0xB = 0
If you read it back as words (=32 bits) you would get:
0x0 = 1
0x4 = 2
0x8 = 3
So you have 4096 byte registers = 1024 word registers.
The maximum value you can store in a byte = 1111 1111
And the maxium value you can store in a word = 1111 1111 1111 1111 1111 1111 1111 1111
As far as I know the string is converted (using ASCII) to a binary value and then stored, but I'm not sure. Using
http://easycalculation.com/ascii-hex.php your string (THIS IS TO TEST HOW MUCH DATA CAN A MEMORY SPACE CONTAIN) would convert to:
01010100 01001000 01001001 01010011 0001 01001001 01010011 0001 01010100 01001111 0001 01010100 01000101 01010011 01010100 0001 01001000 01001111 01010111 0001 01001101 01010101 01000011 01001000 0001 01000100 01000001 01010100 01000001 0001 01000011 01000001 01001110 0001 01000001 0001 01001101 01000101 01001101 01001111 01010010 01011001 0001 01010011 01010000 01000001 01000011 01000101 0001 01000011 01001111 01001110 01010100 01000001 01001001 01001110
Which are quite a few words :). (So you are right about the fact that one word can store 4 characters and 1 byte can store 1 character.)
--- Quote Start ---
What happened here?
--- Quote End ---
The crash is probably caused by this:
Do you write to the same memory as your pogram runs in? Because that would cause the program to crash like that. You can check it in the system library properties in the NIOS II IDE.
You should have 2 different kinds of memory in your SOPC builder. One for the program to run in and one to perform the tests in.