On 24/03/11 6:20 AM, Jacob Schaffner wrote:
> Fantastic! This looks very promising. I won't be able to try it again
> until tomorrow, but I'll let you know how it goes.
Only one problem, it doesn't generate code (no object files).
Macbook: ada_path
Macbook: gcc --version
gcc (GCC) 4.4.0 20080314 (experimental) [trunk revision 133226]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Macbook: which gcc
/usr/local/ada-4.3/bin/gcc
(This is a 4.7K gate design of the Digital Encryption Standard (DES) with an
8 bit interface). I used to use it to check how well tools traverse
configurations statements (and Xilinx has trouble historically).
It'll generate work-obj83.cf files, zero sized display trees and when
attempting to run zero size outputs.
make run
ghdl -a bidir.vhdl
ghdl -a sr4.vhdl
ghdl -a sr8.vhdl
ghdl -a cd_reg.vhdl
ghdl -a clkbuf.vhdl
ghdl -a des_pack.vhdl
ghdl -a inbuf.vhdl
ghdl -a invbuf.vhdl
ghdl -a outbuf.vhdl
ghdl -a reg8s.vhdl
ghdl -a dslice.vhdl
ghdl -a sbox1.vhdl
ghdl -a sbox2.vhdl
ghdl -a sbox3.vhdl
ghdl -a sbox4.vhdl
ghdl -a sbox5.vhdl
ghdl -a sbox6.vhdl
ghdl -a sbox7.vhdl
ghdl -a sbox8.vhdl
ghdl -a reg6.vhdl
ghdl -a statem.vhdl
ghdl -a des.vhdl
ghdl -a key_vector.vhdl
ghdl -a plain_vector.vhdl
ghdl -a cipher_vector.vhdl
ghdl -a encrypt_vector.vhdl
ghdl -a des_tb.vhdl
ghdl -e test_config des_tb
ghdl -r test_config des_tb --stop-time=587200ns
--wave=test_config-des_tb.ghw --disp-tree=port > display_tree
/bin/sh: line 1: 5022 Segmentation fault ghdl -r test_config des_tb
--stop-time=587200ns --wave=test_config-des_tb.ghw --disp-tree=port >
display_tree
make: *** [run] Error 139
This was a successive make re-invoking analysis depending on missing object
files
Macbook: ll -t
/Users/ktz/Desktop/vhdl_des
total 392
drwxr-x--x+ 47 ktz staff 1598 24 Mar 04:13 ../
-rw------- 1 ktz staff 4309 24 Mar 03:59 work-obj93.cf
-rw-r--r--@ 1 ktz staff 6148 23 Mar 20:38 .DS_Store
drwx------ 38 ktz staff 1292 23 Mar 20:38 ./
-rw------- 1 ktz staff 0 23 Mar 20:17 display_tree
-rw------- 1 ktz staff 0 23 Mar 20:17 test_config-des_tb.ghw
drwxr-xr-x 34 ktz staff 1156 23 Mar 20:14 RCS/
-rw------- 1 ktz staff 16309 23 Mar 20:14 cipher_vector.vhdl
-rw------- 1 ktz staff 8281 23 Mar 20:14 des.vhdl
-rw------- 1 ktz staff 4306 23 Mar 20:14 des_tb.vhdl
-rw------- 1 ktz staff 1726 23 Mar 20:14 des_test.vhdl
-rw------- 1 ktz staff 1597 23 Mar 20:14 encrypt_vector.vhdl
-rw------- 1 ktz staff 16303 23 Mar 20:14 key_vector.vhdl
-rw------- 1 ktz staff 325 23 Mar 20:14 outbuf.vhdl
-rw------- 1 ktz staff 16307 23 Mar 20:14 plain_vector.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox2.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox3.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox4.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox6.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox8.vhdl
-rw------- 1 ktz staff 1097 23 Mar 20:14 sr8.vhdl
-rw------- 1 ktz staff 9895 23 Mar 20:14 statem.vhdl
-rw------- 1 ktz staff 2713 23 Mar 20:14 Makefile
-rw------- 1 ktz staff 376 23 Mar 20:14 bidir.vhdl
-rw------- 1 ktz staff 222 23 Mar 20:14 clkbuf.vhdl
-rw------- 1 ktz staff 2780 23 Mar 20:14 dslice.vhdl
-rw------- 1 ktz staff 224 23 Mar 20:14 inbuf.vhdl
-rw------- 1 ktz staff 788 23 Mar 20:14 reg6.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox5.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox7.vhdl
-rw------- 1 ktz staff 1097 23 Mar 20:14 sr4.vhdl
-rw------- 1 ktz staff 2260 23 Mar 20:14 des_pack.vhdl
-rw------- 1 ktz staff 1066 23 Mar 20:14 reg8s.vhdl
-rw------- 1 ktz staff 810 23 Mar 20:14 test_config-des_tb.sav
-rw------- 1 ktz staff 2352 23 Mar 20:14 cd_reg.vhdl
-rw------- 1 ktz staff 230 23 Mar 20:14 invbuf.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox1.vhdl
The analyzer actually runs:
@Macbook: more work-obj93.cf
v 3
file . "des_tb.vhdl" "20110323071432.000" "20110324035913.512":
entity des_tb at 1( 0) + 0 on 470;
architecture behave of des_tb at 8( 69) + 0 on 471;
configuration test_config at 178( 4115) + 0 on 472;
file . "cipher_vector.vhdl" "20110323071432.000" "20110324035913.480":
entity cipher_vector at 1( 0) + 0 on 466;
architecture behave of cipher_vector at 12( 205) + 0 on 467;
file . "key_vector.vhdl" "20110323071432.000" "20110324035913.428":
entity key_vector at 1( 0) + 0 on 462;
architecture behave of key_vector at 12( 202) + 0 on 463;
file . "statem.vhdl" "20110323071432.000" "20110324035913.372":
entity statem at 1( 0) + 0 on 457;
architecture behave of statem at 23( 430) + 0 on 458;
file . "sbox8.vhdl" "20110323071432.000" "20110324035913.349":
entity sbox8 at 1( 0) + 0 on 453;
architecture behave of sbox8 at 11( 162) + 0 on 454;
file . "sbox6.vhdl" "20110323071432.000" "20110324035913.326":
entity sbox6 at 1( 0) + 0 on 449;
architecture behave of sbox6 at 11( 162) + 0 on 450;
file . "sbox4.vhdl" "20110323071432.000" "20110324035913.303":
entity sbox4 at 1( 0) + 0 on 445;
architecture behave of sbox4 at 11( 162) + 0 on 446;
file . "sbox2.vhdl" "20110323071432.000" "20110324035913.278":
entity sbox2 at 1( 0) + 0 on 441;
architecture behave of sbox2 at 11( 162) + 0 on 442;
file . "dslice.vhdl" "20110323071431.000" "20110324035913.255":
entity dslice at 1( 0) + 0 on 437;
architecture behave of dslice at 23( 500) + 0 on 438;
file . "outbuf.vhdl" "20110323071432.000" "20110324035913.233":
entity outbuf at 1( 0) + 0 on 433;
architecture behave of outbuf at 12( 165) + 0 on 434;
file . "inbuf.vhdl" "20110323071431.000" "20110324035913.213":
entity inbuf at 1( 0) + 0 on 429;
architecture behave of inbuf at 11( 137) + 0 on 430;
file . "clkbuf.vhdl" "20110323071431.000" "20110324035913.167":
entity clkbuf at 1( 0) + 0 on 426;
architecture behave of clkbuf at 11( 138) + 0 on 427;
file . "sr8.vhdl" "20110323071432.000" "20110324035913.111":
entity sr8 at 1( 0) + 0 on 422;
architecture behave of sr8 at 18( 339) + 0 on 423;
file . "bidir.vhdl" "20110323071431.000" "20110324035913.063":
entity bidir at 1( 0) + 0 on 418;
architecture behave of bidir at 13( 193) + 0 on 419;
file . "sr4.vhdl" "20110323071431.000" "20110324035913.075":
entity sr4 at 1( 0) + 0 on 420;
architecture behave of sr4 at 18( 339) + 0 on 421;
file . "cd_reg.vhdl" "20110323071422.000" "20110324035913.157":
entity cd_reg at 1( 0) + 0 on 424;
architecture behave of cd_reg at 19( 403) + 0 on 425;
file . "des_pack.vhdl" "20110323071430.000" "20110324035913.191":
package des_pack at 1( 0) + 0 on 428;
file . "invbuf.vhdl" "20110323071422.000" "20110324035913.224":
entity invbuf at 1( 0) + 0 on 431;
architecture behave of invbuf at 11( 138) + 0 on 432;
file . "reg8s.vhdl" "20110323071430.000" "20110324035913.244":
entity reg8s at 1( 0) + 0 on 435;
architecture behave of reg8s at 18( 357) + 0 on 436;
file . "sbox1.vhdl" "20110323071422.000" "20110324035913.266":
entity sbox1 at 1( 0) + 0 on 439;
architecture behave of sbox1 at 11( 162) + 0 on 440;
file . "sbox3.vhdl" "20110323071432.000" "20110324035913.291":
entity sbox3 at 1( 0) + 0 on 443;
architecture behave of sbox3 at 11( 162) + 0 on 444;
file . "sbox5.vhdl" "20110323071431.000" "20110324035913.314":
entity sbox5 at 1( 0) + 0 on 447;
architecture behave of sbox5 at 11( 162) + 0 on 448;
file . "sbox7.vhdl" "20110323071431.000" "20110324035913.338":
entity sbox7 at 1( 0) + 0 on 451;
architecture behave of sbox7 at 11( 162) + 0 on 452;
file . "reg6.vhdl" "20110323071431.000" "20110324035913.359":
entity reg6 at 1( 0) + 0 on 455;
architecture behave of reg6 at 14( 256) + 0 on 456;
file . "des.vhdl" "20110323071432.000" "20110324035913.411":
entity des at 1( 0) + 0 on 459;
architecture behave of des at 20( 423) + 0 on 460;
configuration behave_config at 270( 7186) + 0 on 461;
file . "plain_vector.vhdl" "20110323071432.000" "20110324035913.447":
entity plain_vector at 1( 0) + 0 on 464;
architecture behave of plain_vector at 12( 204) + 0 on 465;
file . "encrypt_vector.vhdl" "20110323071432.000" "20110324035913.491":
entity encrypt_vector at 1( 0) + 0 on 468;
architecture behave of encrypt_vector at 11( 161) + 0 on 469;
It seems to think it elaborated.
There are no output messages whatsoever, and ghdl can produce output in
response to misspelling or input text errors.
Also the -ls flag will produce output, the -lc won't. The -dp and -ds flags
will produce output but not the -da.
Macbook: ll -t
/Users/david_koontz/Desktop/vhdl_des
total 392
-rw------- 1 ktz staff 0 24 Mar 10:27 display_tree
-rw------- 1 ktz staff 0 24 Mar 10:27 test_config-des_tb.ghw
-rw------- 1 ktz staff 4309 24 Mar 10:27 work-obj93.cf
drwxr-x--x+ 47 ktz staff 1598 24 Mar 04:13 ../
-rw-r--r--@ 1 ktz staff 6148 23 Mar 20:38 .DS_Store
drwx------ 38 ktz staff 1292 23 Mar 20:38 ./
-rw------- 1 ktz staff 67 23 Mar 20:14 .directory
drwxr-xr-x 34 ktz staff 1156 23 Mar 20:14 RCS/
-rw------- 1 ktz staff 16309 23 Mar 20:14 cipher_vector.vhdl
-rw------- 1 ktz staff 8281 23 Mar 20:14 des.vhdl
-rw------- 1 ktz staff 4306 23 Mar 20:14 des_tb.vhdl
-rw------- 1 ktz staff 1726 23 Mar 20:14 des_test.vhdl
-rw------- 1 ktz staff 1597 23 Mar 20:14 encrypt_vector.vhdl
-rw------- 1 ktz staff 16303 23 Mar 20:14 key_vector.vhdl
-rw------- 1 ktz staff 325 23 Mar 20:14 outbuf.vhdl
-rw------- 1 ktz staff 16307 23 Mar 20:14 plain_vector.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox2.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox3.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox4.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox6.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox8.vhdl
-rw------- 1 ktz staff 1097 23 Mar 20:14 sr8.vhdl
-rw------- 1 ktz staff 9895 23 Mar 20:14 statem.vhdl
-rw------- 1 ktz staff 2713 23 Mar 20:14 Makefile
-rw------- 1 ktz staff 376 23 Mar 20:14 bidir.vhdl
-rw------- 1 ktz staff 222 23 Mar 20:14 clkbuf.vhdl
-rw------- 1 ktz staff 2780 23 Mar 20:14 dslice.vhdl
-rw------- 1 ktz staff 224 23 Mar 20:14 inbuf.vhdl
-rw------- 1 ktz staff 788 23 Mar 20:14 reg6.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox5.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox7.vhdl
-rw------- 1 ktz staff 1097 23 Mar 20:14 sr4.vhdl
-rw------- 1 ktz staff 2260 23 Mar 20:14 des_pack.vhdl
-rw------- 1 ktz staff 1066 23 Mar 20:14 reg8s.vhdl
-rw------- 1 ktz staff 810 23 Mar 20:14 test_config-des_tb.sav
-rw------- 1 ktz staff 2352 23 Mar 20:14 cd_reg.vhdl
-rw------- 1 ktz staff 230 23 Mar 20:14 invbuf.vhdl
-rw------- 1 ktz staff 2743 23 Mar 20:14 sbox1.vhdl
I find the lack out output messages disturbing. It sounds like the code
generator doesn't pass anything to gcc. Now where does the problem lie?
Either in something in revision 143 or the ada-4.3 tool chain, which we know
can generate object files from ada source and object files from C in
building ghdl_mcode.
There's a difference in how a pthread object is generated based on the
target passed during building, so I tried make target=x86-darwin , which
didn't change the behavior.
When building ghdl
@Macbook: make target=x86-darwin
curdir=`cd ..; pwd`; \
sed -e "s%@COMPILER_GCC@%$curdir/ghdl1-gcc%" \
-e "s%@COMPILER_DEBUG@%$curdir/ghdl1-debug%" \
-e "s%@COMPILER_MCODE@%$curdir/ghdl1-mcode%" \
-e "s%@COMPILER_LLVM@%$curdir/ghdl1-llvm%" \
-e "s%@POST_PROCESSOR@%$curdir/../ortho/oread/oread-gcc%" \
-e "s%@PREFIX@%$curdir/lib/%" < default_pathes.ads.in >
default_pathes.ads
You can see there is supposed to be a ghdl1 gcc here (the first line).
Macbook: grep ghdl1 *
Makefile: sed -e "s%@COMPILER_GCC@%$$curdir/ghdl1-gcc%" \
Makefile: -e "s%@COMPILER_DEBUG@%$$curdir/ghdl1-debug%" \
Makefile: -e "s%@COMPILER_MCODE@%$$curdir/ghdl1-mcode%" \
Makefile: -e "s%@COMPILER_LLVM@%$$curdir/ghdl1-llvm%" \
Makefile:GHDL1=../ghdl1-gcc
Makefile:GHDL1LLVM=../ghdl1-llvm
Makefile_orig: sed -e "s%@COMPILER_GCC@%$$curdir/ghdl1-gcc%" \
Makefile_orig: -e "s%@COMPILER_DEBUG@%$$curdir/ghdl1-debug%" \
Makefile_orig: -e "s%@COMPILER_MCODE@%$$curdir/ghdl1-mcode%" \
Makefile_orig: -e "s%@COMPILER_LLVM@%$$curdir/ghdl1-llvm%" \
Makefile_orig:GHDL1=../ghdl1-gcc
Makefile_orig:GHDL1LLVM=../ghdl1-llvm
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-mcode";
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-llvm";
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-gcc";
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-debug";
Binary file default_pathes.o matches
Binary file ghdl matches
Binary file ghdl_mcode matches
ghdldrv.adb: Put_Line (" --GHDL1=PATH Set the path of the ghdl1
compiler");
target-i686-darwin: sed -e "s%@COMPILER_GCC@%$curdir/ghdl1-gcc%" \
target-i686-darwin: -e "s%@COMPILER_DEBUG@%$curdir/ghdl1-debug%" \
target-i686-darwin: -e "s%@COMPILER_MCODE@%$curdir/ghdl1-mcode%" \
target-i686-darwin: -e "s%@COMPILER_LLVM@%$curdir/ghdl1-llvm%" \
target-x86-darwin: sed -e "s%@COMPILER_GCC@%$curdir/ghdl1-gcc%" \
target-x86-darwin: -e "s%@COMPILER_DEBUG@%$curdir/ghdl1-debug%" \
target-x86-darwin: -e "s%@COMPILER_MCODE@%$curdir/ghdl1-mcode%" \
target-x86-darwin: -e "s%@COMPILER_LLVM@%$curdir/ghdl1-llvm%" \
Using Spotlight there are no filenames containing ghdl1 in
/Applications/ghdl nor the observable file hierarchy (I block off a couple
of places from search to reduce the noise, not involved here).
It looks like I'll have to research the structure of the code generator.
You see ghdl1 files in binary distributions, but I haven't explored that
part of ghdl before.
In ghdl.html we find:
--GHDL1=COMMAND
Use COMMAND as the command name for the compiler. If COMMAND is not a
path, then it is search in the list of program directories.
Which implies it's a link to gcc. If doesn't find it in the local directory
in should use $PATH. No indication what it does if it doesn't find it, or
what an acceptable name is.
ghdl1 is mentioned in translate/grt/Makefile and translate/Makefile.
If you look in the default_pathes.adb ghdl1 mentions above it gives the
default pathnames and location:
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-mcode";
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-llvm";
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-gcc";
default_pathes.ads: "/Applications/ghdl/translate/ghdl1-debug";
Seems there are a couple of links missing.
translate/Makefile
Macbook: make -n
make -f ../ortho/gcc/Makefile \
ortho_srcdir=../ortho GNAT_FLAGS="-aI.. -aI../psl -gnaty3befhkmr
-gnata -gnatf -gnatwael" \
ortho_exec=ghdl1-gcc all
make[1]: *** No rule to make target
`/Users/ktz/dist/gcc-4.3.4-objs/gcc/gtype-vhdl.h', needed by `ortho-lang.o'.
Stop.
make: *** [compiler] Error 2
I've seen mention of this file before. Need to think for a while to recall
the context (the past is large and cluttered, I recall it in a Linux
setting, something about stack frames and debug, it's not an insurmountable
issue as I recall). Also need to find why it wants it in ~/dist.
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss