Skip to content

Download

Patrick Lehmann edited this page Sep 8, 2015 · 10 revisions

Table of Content:

  1. Download the Library as an Archive from GitHub
  2. Downloading the Library with git clone
  3. Adding the Library as a git submodule into another git Repository

The PicoBlaze-Library can be downloaded as an archive or cloned with git clone.

Protocol    URL
----------------------------------
SSH         ssh://git@github.com:Paebbels/PicoBlaze-Library.git
HTTPS       https://github.com/Paebbels/PicoBlaze-Library.git

All Windows command line instructions are intended for Windows PowerShell, if not marked otherwise. So executing the following instructions in Windows Command Prompt (cmd.exe) won't function or result in errors! See the Requirements wiki page on where to download or update PowerShell.

Download the Library as an Archive from GitHub

The latest master branch can be downloaded as a zip-file on the repository's main page.

Downloading the Library with git clone

The following commands create a L_PicoBlaze\ folder and clone the repository onto a local computer's drive. See the Cloning a Repository article on GitHub for more details. The GitHub documentation will use the remote name github instead of git's default name origin in all references.

Linux:
cd <GitRoot>
git clone --recursive git@github.com:Paebbels/PicoBlaze-Library.git L_PicoBlazey
cd PoC
git remote rename origin github
Windows (PowerShell):
cd <GitRoot>
git clone --recursive git@github.com:Paebbels/PicoBlaze-Library.git L_PicoBlaze
cd PoC
git remote rename origin github

Note: The option --recursive performs a recursive clone operation for all linked git submodules. An additional git submodule init and git submodule update call is not needed anymore.

Adding the Library as a git submodule into another git Repository

The PicoBlaze-Library is meant to be included in other project or repositories as a submodule. Therefore it's recommended to create a library folder and add the PicoBlaze-Library and it's dependencies as git submodules.

The following command line instructions will create a library folder lib\ and clone all depenencies as git submodules into subfolders.

Linux:
cd <ProjectRoot>
mkdir lib

git submodule add git@github.com:VLSI-EDA/PoC.git lib/PoC
cd lib/PoC
git remote rename origin github
cd ../..
git add .gitmodules lib/PoC
git commit -m "Added new git submodule PoC in 'lib/PoC' (PoC-Library)."

git submodule add git@github.com:Paebbels/PicoBlaze-Library.git lib/L_PicoBlaze
cd lib/L_PicoBlaze
git remote rename origin github
cd ../..
git add .gitmodules lib/L_PicoBlaze
git commit -m "Added new git submodule L_PicoBlaze in 'lib/L_PicoBlaze' (PicoBalze-Library)."
    
git submodule add git@github.com:Paebbels/opbasm.git lib/opbasm
cd lib/opbasm
git remote rename origin github
cd ../..
git add .gitmodules lib/opbasm
git commit -m "Added new git submodule opbasm in 'lib/opbasm' (Open PicoBlaze Assembler)."
Windows (PowerShell):
function gitsubmodule([string]$dir, [string]$url, [string]$name) {
  $p = pwd
  mkdir lib -ErrorAction SilentlyContinue; cd lib
  git submodule add $url $dir
  cd $dir
  git remote rename origin github
  cd $p
  git add .gitmodules "lib\$dir"
  git commit -m "Added new git submodule $dir in 'lib\$dir' ($name)."
}

cd <ProjectRoot>
gitsubmodule "PoC" "git@github.com:VLSI-EDA/PoC.git" "PoC-Library"
gitsubmodule "L_PicoBlaze" "git@github.com:Paebbels/PicoBlaze-Library.git" "PicoBalze-Library"
gitsubmodule "opbasm" "git@github.com:Paebbels/opbasm.git" "Open PicoBlaze Assembler"

Clone this wiki locally