HOME
  Security
   Software
    Hardware
  
FPGA
  CPU
   Android
    Raspberry Pi
  
nLite
  Xcode
   etc.
    ALL
  
LINK
BACK
 

2022/08/20

FPGAに 32bitマイコン ZipCPUの CPUを実装して gccで開発する方法【gcc】 FPGAに 32bitマイコン ZipCPUの CPUを実装して gccで開発する方法【gcc】

(Zip CPU、32 bit small lightweight RISC CPU soft core with GCC toolchain)

Tags: [FPGA], [電子工作], [Xilinx XC6SLX9], [FPGA 2022]




● FPGAに 32bitマイコン ZipCPUを実装して gccで開発する方法【gcc】

 Zip CPU、32 bit small lightweight RISC CPU soft core with GCC toolchain

The ZipCPU by Gisselquist Technology

About the ZipCPU
 The ZipCPU is an open source, fully-functional, soft core CPU built for FPGA environments by Gisselquist Technology, LLC .

 これも ALINX AX309で動く様に変更します。

ZBasic very basic system working ZipCPU system

SD-Card controller using a shared SPI interface

ZipCPU toolchain and initial test

● Building the tools ZipCPU tool-suite
sudo apt install -y flex bison libbison-dev libgmp-dev libmpfr-dev libmpc-dev bc
sudo apt install -y verilator
sudo apt install -y libelf-dev
sudo apt install -y ncurses-dev ctags

cd
git clone --depth 1 https://github.com/ZipCPU/zipcpu --depth 1
cd zipcpu

# just type "make"
make

export PATH=$PATH:`pwd`/sw/install/cross-tools/bin
export | grep PATH

● Running the test file
# Running the test file
cd bench/asm
make simtest

# build a disassembly file
make simtest.txt

# change into the Verilator based simulation directory
cd ../..
cd sim/verilator

# The first automated test just runs the test file
# https://github.com/ZipCPU/zipcpu/blob/master/bench/asm/simtest.s
./zipsys_tb -s ../../bench/asm/simtest

Running in non-interactive mode, via step commands
Sim done
SUCCESS!

Clocks used         : 000003aa
Instructions Issued : 0000028f
Tick Count          : 00000ebf
Instructions / Clock: 0.70
SUCCESS!

# The second automated test simulates
./zipsys_tb -a ../../bench/asm/simtest

Running in non-interactive mode
Sim done
SUCCESS!

Clocks used         : 00000831
Instructions Issued : 0000028e
Tick Count          : 00000856
Instructions / Clock: 0.31
SUCCESS!

# These two tests are so valuable to me
make test

# There’s a third way to run the test as well-the interactive test
make itest

# Interactive !!

・Zip CPU Interactive Simulator
Zip CPU Interactive Simulator




● Windowsで動く Zip GCC toolchainのビルド手順

 ZPUの時と同様に configureに --build=armv7l-unknown-linux-gnu、--host=i686-w64-mingw32を指定しましたが、GCCの configureで GMP 4.2+, MPFR 3.1.0+ and MPCで怒られます。

● configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.
Makefile:184: recipe for target 'gcc-10.3.0-zip/nonce.txt' failed
make[1]: [gcc-10.3.0-zip/nonce.txt] Error 1 (ignored)
touch gcc-10.3.0-zip/nonce.txt
cc gcc-10.3.0-zip/gcc/config/zip/genzipops.c -o genzipops
./genzipops gcc-10.3.0-zip/gcc/config/zip/zip-ops.md
bash -c "if [[ ! -e build-gcc ]]; then bash gcc-script.sh; fi"
touch build-gcc/nonce.txt
make --no-print-directory --directory=build-gcc all-host
make[2]: *** No rule to make target 'all-host'.  Stop.
Makefile:207: recipe for target 'gcc-host' failed
make[1]: *** [gcc-host] Error 2
Makefile:80: recipe for target 'sw' failed
make: *** [sw] Error 2



Tags: [FPGA], [電子工作], [Xilinx XC6SLX9], [FPGA 2022]

●関連するコンテンツ(この記事を読んだ人は、次の記事も読んでいます)

AMD Xilinxの FPGA Spartan-6 XC6SLX16のボードを買ってアーケード ゲームを動かす
AMD Xilinxの FPGA Spartan-6 XC6SLX16のボードを買ってアーケード ゲームを動かす

  ALINX AX309 XC6SLX9の中華クローンの XC6SLX16版を購入しました

AMD Xilinxの FPGAの開発アプリ ISE WebPackをダウンロードして Windows 10で動かす方法
AMD Xilinxの FPGAの開発アプリ ISE WebPackをダウンロードして Windows 10で動かす方法

  Spartan-6の FPGAの開発用に Xilinx ISE WebPack開発ソフトウェアを Windows 10で動かす方法

Xilinxの FPGA Spartan-6の Block RAM RAMB8BWERに初期値を入れて ROMとして使う方法
Xilinxの FPGA Spartan-6の Block RAM RAMB8BWERに初期値を入れて ROMとして使う方法

  Xilinxの FPGA Spartan-6の Block RAM RAMB8BWERに初期値を入れて ROMとして使う方法

FPGA Spartan-6 XC6SLX16でファミコンを動かす!
FPGA Spartan-6 XC6SLX16でファミコンを動かす!

  Xilinx FPGA Spartan-6 XC6SLX16 NES clone in ALINX AX309

Xilinxの FPGA Spartan-6で PicoBlaze KCPSM 8 ビット マイクロコントローラーを動かす!
Xilinxの FPGA Spartan-6で PicoBlaze KCPSM 8 ビット マイクロコントローラーを動かす!

  PicoBlaze KCPSM6 in Spartan-6 with ISE WebPack

Xilinxの FPGA Spartan-6で MicroBlazeを ISE WebPack 14.7で無料ライセンスで動かす方法
Xilinxの FPGA Spartan-6で MicroBlazeを ISE WebPack 14.7で無料ライセンスで動かす方法

  How to MicroBlaze in Spartan-6 with ISE WebPack 14.7 only Free License to Blink LED !

USB HOST機能を FPGAに実装する方法、FPGAの GPIOに USB HIDデバイスを接続したい!!
USB HOST機能を FPGAに実装する方法、FPGAの GPIOに USB HIDデバイスを接続したい!!

  FPGAに USB HOST機能を実装して Low Speedの USB HIDデバイスを接続するのら

USBの通信プロトコルを勉強する
USBの通信プロトコルを勉強する

  今まで漠然としていた USBデバイスの通信方法を理解します

USB HOST機能が欲しいのでワンチップマイコンの GPIOで USB HOST機能を実現する
USB HOST機能が欲しいのでワンチップマイコンの GPIOで USB HOST機能を実現する

  FPGAに USBデバイスを接続したいのですが、USB HOSTの通信を実装できないので困っています

OLIMEX LPC-H40(Philips LPC2106)
OLIMEX LPC-H40(Philips LPC2106)

  MOTHER BOARD for LPC-H40(LPC-H2106) and ASM Sample Program.

線形帰還シフトレジスタ LFSRのまとめ、FPGAの Verilog HDLでの実装例
線形帰還シフトレジスタ LFSRのまとめ、FPGAの Verilog HDLでの実装例

  LFSR Linear Feedback Shift Registerについて調べた

【2022年版】最近流行の RISC-Vプロセッサの環境を WSL Ubuntu上に構築する方法
【2022年版】最近流行の RISC-Vプロセッサの環境を WSL Ubuntu上に構築する方法

  RISC-Vプロセッサの Rocket Chipの開発環境を Windows上に構築して Verilogする方法

XILINX FPGAのBlock RAMをROMとして使う方法
XILINX FPGAのBlock RAMをROMとして使う方法

  FPGAに内蔵のBLOCK-RAMにROMとして初期値を与える方法

スパルタン2で
スパルタン2で"ギャラクシアン基板"を作る!

  Verilog言語で記述してあります

スパルタン2で
スパルタン2で"MIDWAY 8080(TAITO インベーダ基板)"を動かす!

  ハードウェアで本物を作ります

スパルタン2で
スパルタン2で"パックマン"を動かす!

  FPGAでパックマンが動きます

スパルタン2で
スパルタン2で"ド*キーコ*グ"を動かす!

  これもFPGAで動いちゃいます

スパルタン3でアーケードゲームを動かす!
スパルタン3でアーケードゲームを動かす!

  XAPP694の使用例、INVADER/GALAXIAN/PACMAN/D*NKEY-K*NG/TIME PILOT




[HOME] | [BACK]
リンクフリー(連絡不要、ただしトップページ以外は Web構成の変更で移動する場合があります)
Copyright (c) 2022 FREE WING,Y.Sakamoto
Powered by 猫屋敷工房 & HTML Generator

http://www.neko.ne.jp/~freewing/fpga/fpga_zip_soft_core/