Skip to content

recolic/vivado-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vivado Wrapper

Run vivado natively in linux command line.

Installation

git clone https://github.com/recolic/vivado-wrapper
export vivado_exec="/path/to/your/vivado" # Bash
set -Ux vivado_exec "/path/to/your/vivado" # Fish

Or if you want to make yourself happier:

set -Ux PATH $PATH (pwd)/vivado-wrapper # Fish
export PATH="$PATH:$(pwd)/vivado-wrapper" # Bash
alias vivadow=vivado-wrapper # I'll use this wrapper in the doc below.

Usage

  • Create Project
mkdir my_project && cd my_project
vivadow init
code . # Or any editor you prefer.
vim Vivadofile # To tell vivado-wrapper about your module~constraint relationship.
  • Build Project

Warning: this project will use xc7a100tcsg324-1 (for HUST) as your board. Please fork and modify template if you'd like to use other board. We can easily support changing board by Vivadofile, if you can solve the TODO in ./vivado-wrapper:line5.

cd vivado-wrapper/example
vivadow build
# Plug in your board now
vivadow burn

Or you can easily burn a pre-built bitstream:

vivadow burn-file ./build/other_mod.bit
  • Run Simulation (Or other GUI-only Tasks)

Warning: All modification to sources/constraints will be saved to origin project. All modification to other project-level configurations, adding or removing sources, will be discarded.

vivadow gui

Notice

This is a bash script, so it can be easily injected. Never trust Vivadofile uploaded by others!

If you give a wrong top_module name, silly vivado will accept it, and generate bitstream for a randomly-taken module(with long time spent), then report error.