[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] quickly check vhdl syntax



Hi Sebastian,

Sebastian wrote:
hi,

i added my own ip in xps to a system for running petalinux. is there any possibility to check the vhdl syntax of my user_logic.vhd before executing 'make -f system.make bits' because with this command it takes about 20 minutes to get a report if there is any syntax error in my source code. i tried to use 'ghdl -s user_logic.vhd' but with it i always get the error:

user_logic.vhd:54:10: primary unit "std_logic_arith" not found in library "ieee" user_logic.vhd:55:10: primary unit "std_logic_unsigned" not found in library "ieee"
user_logic.vhd:57:9: cannot find resource library "proc_common_v2_00_a"
user_logic.vhd:58:25: primary unit "proc_common_pkg" not found in library "proc_common_v2_00_a"

how can i quickly check my syntax of edited vhdl files?

I do this in one of two ways:

* move your IP closer to the top of your hardware description file (system.mhs), since they are processed in order. Or, * create a stripped-down 'xst' project by hand and use it to do your syntax checking.

For the second option, change into the same directory as your user_logic.vhd file. You need to create a project file (foo.prj) and a script file (foo.scr). For my IP, foo.scr looks like the following:

run -ifn foo.prj -ifmt mixed -top user_logic -ofn foo.ngc -ofmt NGC -p xc4vlx160-ff1148-11 -opt_mode Speed -opt_level 2

and foo.prj looks like the following:

vhdl proc_common_v2_00_a /path/to/edk91i/hw/XilinxProcessorIPLib/pcores/proc_common_v2_00_a/hdl/vhdl/proc_common_pkg.vhd
   vhdl my_ip_name_v1_00_a user_logic.vhd

You try it out with something like this:

  xst -ifn foo.scr 2>&1 | tee build.log | less

best,
Graeme Smecher
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/