On 3/04/11 10:19 AM, David G. Koontz wrote: This mcode build: -----------------
Built with MacAda 4.3 /usr/local/ada-4.3/bin in Path before any other gcc (darwin10 is x86_64 only, this gnat makes i386 (32 bit) objects). Should be able to set environmental variable instead, CC /usr/local/ada-4.3/bin/gcc . MacAda 4.3 should build ghdl from Mac OS X 10.4 onward (Intel architectures). svn -r136co svn://svn.gna.org/svn/ghdl/trunk ghdl (revision 136 is ghdl0.29) cd ghdl/translate/ghdldrv either edit Makefile to include a darwin target: target=i686-darwin or pass the target declaration on all Make commands here. Before building delete ortho_code-x86-flags.ads which appears to have been inadvertently included in the svn repository. It won't be build automatically if it exists. make (target=i686-darwin) (paren enclosed target not needed if you edited Makefile) This builds ghdl_mcode ln -s ghdl_mcode ghdl (so you can find it easier) Make sure you can execute it from where ever your VHDL model is. Either search path, or an alias. make (target=i686-darwin) install.mcode generates VHDL libraries, sets up various links. If subsequently you get a segmentation violation simulating a VHDL model under ghdl check translate/ghdldrv ortho_code-x86-flags.ads with Ortho_Code.X86.Flags_Macosx; package Ortho_Code.X86.Flags renames Ortho_Code.X86.Flags_Macosx; The Flags_Macosx sets up Frame boundaries for Mac OS X. I simulated a small DES encryption chip that probably generates more than 2 million events across 30,000 clocks. It does assertion based verification via a testbench and I also checked the results with gtkwave. I'll continue marching upward to the current release (revision 143, ghdl-0.29+). The intent is to eventually build a gcc front end version of ghdl on the Mac. I also want to verify a fix for Wesley Landaker's rol/ror bug and submit it. Summary Instructions: --------------------- cd to a suitable location to build ghdl. This serves as an installation directory and requires a little of 36 MBs (decimal in Snow Leopard) Macbook: svn -r136 co svn://svn.gna.org/svn/ghdl/trunk ghdl Macbook: cd ghdl/translate/ghdldrv edit Makefile to make the target - target=i686-darwin This assignment can be passed on the command line to make Macbook: rm ortho_code-x86-flags.ads Macbook: make Macbook: ln -s ghdl_mcode ghdl (you want the current directory in your search path ($PATH) now.) Macbook: make install.mcode ghdl -v to verify it does something. Macbook: svn diff Index: ortho_code-x86-flags.ads =================================================================== --- ortho_code-x86-flags.ads (revision 136) +++ ortho_code-x86-flags.ads (working copy) @@ -1,2 +1,2 @@ -with Ortho_Code.X86.Flags_Linux; -package Ortho_Code.X86.Flags renames Ortho_Code.X86.Flags_Linux; +with Ortho_Code.X86.Flags_Macosx; +package Ortho_Code.X86.Flags renames Ortho_Code.X86.Flags_Macosx; Index: Makefile =================================================================== --- Makefile (revision 136) +++ Makefile (working copy) @@ -39,7 +39,8 @@ #GNAT_LARGS= -static all: ghdl_mcode -target=i686-pc-linux-gnu +#target=i686-pc-linux-gnu +target=i686-darwin #target=x86_64-pc-linux-gnu GRTSRCDIR=../grt include $(GRTSRCDIR)/Makefile.inc (Shows edited Makefile, ortho_code-x86-flags.ads now under version control ) _______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss