PDA

View Full Version : [all variants] Simplescalar Installation Problems


dplusplus
July 6th, 2008, 02:07 PM
I have gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) installed.

Then I Was trying to install simplescalar, so i did the following without any error:
tar xvfz simplesim-3v0d.tgz
make config-alpha
make clean

After that i did :
make sim-safe
this gave me error:
machine.h:224: error: array type has incomplete element type
Then i saw in one site, it was instructed:
● machine.h in simplesim folder - change line 224 from "extern enum md_opcode md_mask2op[];" to "extern enum md_opcode *md_mask2op;"
● machine.c in simplesim folder - change line 78 from "enum md_opcode md_mask2op[MD_MAX_MASK+1];" to "enum md_opcode *md_mask2op;
I did the same and then compiled again, and then typed "make sim-safe" again and worked fine with lots of warnings though.

Ok somehow fine till now, and then typed:
./sim-safe ./tests-alpha/bin/test-math
Gave me error:
Segmentation fault (core dumped)

Going by the various forum talks, I can understand till now that it is trying to access some other memory segments, and I need to correct some
pointer addresses maybe. But still can't figure out what exactly am i supossed to do or make any other changes.

Help is kindly needed.

Regards and thanks

- Dev

zi.coder
September 13th, 2008, 12:40 AM
I have gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) installed.

Then I Was trying to install simplescalar, so i did the following without any error:
tar xvfz simplesim-3v0d.tgz
make config-alpha
make clean

After that i did :
make sim-safe
this gave me error:
machine.h:224: error: array type has incomplete element type
Then i saw in one site, it was instructed:
● machine.h in simplesim folder - change line 224 from "extern enum md_opcode md_mask2op[];" to "extern enum md_opcode *md_mask2op;"
● machine.c in simplesim folder - change line 78 from "enum md_opcode md_mask2op[MD_MAX_MASK+1];" to "enum md_opcode *md_mask2op;
I did the same and then compiled again, and then typed "make sim-safe" again and worked fine with lots of warnings though.

Ok somehow fine till now, and then typed:
./sim-safe ./tests-alpha/bin/test-math
Gave me error:
Segmentation fault (core dumped)

Going by the various forum talks, I can understand till now that it is trying to access some other memory segments, and I need to correct some
pointer addresses maybe. But still can't figure out what exactly am i supossed to do or make any other changes.

Help is kindly needed.

Regards and thanks

- Dev

Move the line:
extern enum md_opcode md_mask2op[];

below the definition of md_opcode (about 6 lines below). That should do the trick with gcc 4.x

aiyeou
October 13th, 2008, 02:45 PM
Thanks zi - that worked perfectly with gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

Another problem - while compiling for Alpha ISA (make config-alpha) an error:
mase-mem.c:134: error: static declaration of ‘mem_access_latency’ follows non-static declaration
mase-mem.h:104: error: previous declaration of ‘mem_access_latency’ was here

Which was fixed for PISA build by making memory access latency declaration on line 132 of mase-mem.c non-static as
unsigned int /* total latency of access */
mem_access_latency(int blk_sz) /* block size accessed */

but in case of alpha it compiles and throws an seg fault while running test-math.

Thanks for any suggestions?