FC2ブログ

[LEON-MJPEG]NEEK動作確認(3)

make ghdl を実行した時の、pushなんちゃらのエラーは、GHDLがi686用つまり32bit版だった事が原因と予想。
GHDLのインストールバイナリがi686だけだったので、安易にそれを使ってしまった。

64bit版GHDLバイナリが無いので、ソースからインストールをしてみよう。


・gcc-4.3.4ソースを入手。ghdlのソースを入手。

・GHDLのREADMEを読む。
 それぞれ展開して、ghdlのvhdlフォルダを、gcc-4.3.4/gcc/以下へ移動。

mv ghdl/ghdl-0.29/vhdl gcc-4.3.4/gcc/
cd gcc-4.3.4/gcc/
./configure --enable-languages=vhdl --disable-bootstrap
コンフィギュアは成功した。

[root@localhost gcc]# make CFLAGS="-O"
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
/bin/sh ./mkconfig.sh config.h
TARGET_CPU_DEFAULT="" \
HEADERS="options.h config/i386/biarch64.h config/i386/i386.h config/i386/unix.h config/i386/att.h config/dbxelf.h config/elfos.h config/svr4.h config/linux.h config/i386/x86-64.h config/i386/linux64.h defaults.h" DEFINES="UCLIBC_DEFAULT=0" \
/bin/sh ./mkconfig.sh tm.h
gawk -f ./opt-gather.awk ./ada/lang.opt ./fortran/lang.opt ./java/lang.opt ./treelang/lang.opt ./vhdl/lang.opt ./c.opt ./common.opt ./config/i386/i386.opt ./config/linux.opt > tmp-optionlist
/bin/sh ./../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
gawk -f ./opt-functions.awk -f ./opth-gen.awk \
< optionlist > tmp-options.h
/bin/sh ./../move-if-change tmp-options.h options.h
echo timestamp > s-options-h
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
/bin/sh ./mkconfig.sh bconfig.h
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I. -I./build -I./../include -I./../libcpp/include -I./../libdecnumber -I./../libdecnumber/bid -I../libdecnumber -o build/errors.o errors.c
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory
make: *** [s-modes-h] Error 127




うまくいかないので、VMware上にCentOS6.4 i386をインストールし、環境構築した。
その後、著書に従い進めた。

cd /home/bob/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek
touch systest.c
make soft
make ghdl
   :
altera_eek_clkgen.vhd:47:14:warning: (in default configuration of altera_eek_clkgen(rtl))
altera_eek_clkgen.vhd:49:13:warning: port "fbout" of entity "altpll" is not bound
altera_eek_clkgen.vhd:47:14:warning: (in default configuration of altera_eek_clkgen(rtl))
../../lib/gaisler/greth/greth.vhd:268:5:warning: component instance "tx_fifo0" is not bound
../../lib/gaisler/greth/greth.vhd:83:14:warning: (in default configuration of greth(rtl))
../../lib/gaisler/greth/greth.vhd:273:5:warning: component instance "rx_fifo0" is not bound
../../lib/gaisler/greth/greth.vhd:83:14:warning: (in default configuration of greth(rtl))
../../lib/gaisler/greth/greth_gbit.vhd:131:3:warning: component instance "gtxc0" is not bound
../../lib/gaisler/greth/greth_gbit.vhd:81:14:warning: (in default configuration of greth_gbit(rtl))
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
ghdl: compilation error
make: *** [make.ghdl] Error 1


やたら長いコンパイル後、エラーが出た。

http://armadillo.atmark-techno.com/faq/zlib-not-Installed
http://www.cyberciti.biz/faq/centos-install-zlib-devel/

zlib-develをインストールすれば良いのかな?

yum install zlib-devel


それ以外にもこんなページも発見したが、上の zlib-develインストールでmake ghdlのエラーが解消した。
http://d.hatena.ne.jp/naga_sawa/20120503/1336020352

次は以下でシミュレーション実行。

[bob@localhost leon3-altera-ep3c25-eek]$ ./testbench
../../lib/tech/altera_mf/simprims/altera_mf.vhd:13040:13:@0ms:(assertion note): Cyclone III PLL was reset
../../lib/tech/altera_mf/simprims/altera_mf.vhd:13040:13:@0ms:(assertion note): Cyclone III PLL was reset
LEON3 Altera Embedded Evaluation Kit Demonstration Design
GRLIB Version 1.0.22, build 4095
Target technology: cycloneiii, memory library: cycloneiii
ahbctrl: AHB arbiter/multiplexer rev 1
ahbctrl: Common I/O area at 0xfff00000, 1 Mbyte
ahbctrl: AHB masters: 4, AHB slaves: 8
ahbctrl: Configuration area at 0xfffff000, 4 kbyte
ahbctrl: mst0: Gaisler Research Leon3 SPARC V8 Processor
ahbctrl: mst1: Gaisler Research JTAG Debug Link
ahbctrl: mst2: Gaisler Research SVGA frame buffer
ahbctrl: mst3: Gaisler Research GR Ethernet MAC
ahbctrl: slv0: European Space Agency Leon2 Memory Controller
ahbctrl: memory at 0x00000000, size 512 Mbyte, cacheable, prefetch
ahbctrl: memory at 0x20000000, size 512 Mbyte
ahbctrl: memory at 0xa0000000, size 256 Mbyte, cacheable, prefetch
ahbctrl: slv1: Gaisler Research AHB/APB Bridge
ahbctrl: memory at 0x80000000, size 1 Mbyte
ahbctrl: slv2: Gaisler Research Leon3 Debug Support Unit
ahbctrl: memory at 0x90000000, size 256 Mbyte
ahbctrl: slv3: Gaisler Research Single-port DDR266 controller
ahbctrl: memory at 0x40000000, size 256 Mbyte, cacheable, prefetch
ahbctrl: I/O port at 0xfff00100, size 256 byte
apbctrl: APB Bridge at 0x80000000 rev 1
apbctrl: slv0: European Space Agency Leon2 Memory Controller
apbctrl: I/O ports at 0x80000000, size 256 byte
apbctrl: slv1: Gaisler Research Generic UART
apbctrl: I/O ports at 0x80000100, size 256 byte
apbctrl: slv2: Gaisler Research Multi-processor Interrupt Ctrl.
apbctrl: I/O ports at 0x80000200, size 256 byte
apbctrl: slv3: Gaisler Research Modular Timer Unit
apbctrl: I/O ports at 0x80000300, size 256 byte
apbctrl: slv5: Gaisler Research General Purpose I/O port
apbctrl: I/O ports at 0x80000500, size 256 byte
apbctrl: slv6: Gaisler Research PS2 interface
apbctrl: I/O ports at 0x80000600, size 256 byte
apbctrl: slv8: Gaisler Research AMBA Wrapper for OC I2C-master
apbctrl: I/O ports at 0x80000800, size 256 byte
apbctrl: slv9: Gaisler Research SPI Controller
apbctrl: I/O ports at 0x80000900, size 256 byte
apbctrl: slv10: Gaisler Research GR Ethernet MAC
apbctrl: I/O ports at 0x80000a00, size 256 byte
apbctrl: slv11: Gaisler Research SVGA frame buffer
apbctrl: I/O ports at 0x80000b00, size 256 byte
apbctrl: slv12: Gaisler Research SPI Controller
apbctrl: I/O ports at 0x80000c00, size 256 byte
greth3: 10/100 Mbit Ethernet MAC rev 03, EDCL 1, buffer 2 kbyte 128 txfifo, irq 10
spictrl12: SPI controller rev 2, irq 12
clkgen_cycloneiii: altpll lcd/vga clock generator, version 1
svgactrl11: SVGA controller rev 0, FIFO length: 384, FIFO part length: 128, FIFO address bits: 9
spictrl9: SPI controller rev 2, irq 9
i2cmst8: AMBA Wrapper for OC I2C-master rev 1, irq 11
apbps2_6: APB PS2 interface rev 2, irq 6
grgpio5: 5-bit GPIO Unit rev 0
gptimer3: GR Timer Unit rev 0, 8-bit scaler, 2 32-bit timers, irq 8
irqmp: Multi-processor Interrupt Controller rev 3, #cpu 1, eirq 0
apbuart1: Generic UART rev 1, fifo 8, irq 2
ddrsp3: 16-bit DDR266 controller rev 0, 8 Mbyte, 100 MHz DDR clock
ahbjtag AHB Debug JTAG rev 0
dsu3_2: LEON3 Debug support unit + AHB Trace Buffer, 2 kbytes
leon3_0: LEON3 SPARC V8 processor rev 0
leon3_0: icache 2*4 kbyte, dcache 2*4 kbyte
clkgen_cycloneiii: altpll sdram/pci clock generator, version 1
clkgen_cycloneiii: Frequency 50000 KHz, PLL scaler 5/5
../../lib/tech/altera_mf/simprims/altera_mf.vhd:13337:25:@90ns:(assertion note): Cyclone III PLL locked to incoming clock
../../lib/tech/altera_mf/simprims/altera_mf.vhd:13337:25:@90ns:(assertion note): Cyclone III PLL locked to incoming clock
../../lib/tech/altera_mf/simprims/altera_mf.vhd:13337:25:@590ns:(assertion note): Cyclone III PLL locked to incoming clock
../../lib/cypress/ssram/cy7c1380d.vhd:611:13:@66610ns:(assertion error): Dq - tDS violation
../../lib/cypress/ssram/cy7c1380d.vhd:627:13:@66610300ps:(assertion error): Dq - tDH violation
../../lib/cypress/ssram/cy7c1380d.vhd:611:13:@68270ns:(assertion error): Dq - tDS violation
../../lib/cypress/ssram/cy7c1380d.vhd:627:13:@68270300ps:(assertion error): Dq - tDH violation
../../lib/cypress/ssram/cy7c1380d.vhd:611:13:@70350ns:(assertion error): Dq - tDS violation
../../lib/cypress/ssram/cy7c1380d.vhd:627:13:@70350300ps:(assertion error): Dq - tDH violation
testbench.vhd:303:5:@72832ns:(assertion failure): *** IU in error mode, simulation halted ***
./testbench:error: assertion failed
./testbench:error: simulation failed

スポンサーサイト



コメントの投稿

非公開コメント

カレンダー
01 | 2020/02 | 03
- - - - - - 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
累積訪問者
現在の訪問者
現在の閲覧者数:
最新記事
最新トラックバック
最新コメント
月別アーカイブ
カテゴリ
プロフィール

bobgosso

Author:bobgosso
FPGAのブログへようこそ!

検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード