Skip to content

Commit

Permalink
add vwc support. fix a tiny unfound bug(without harm).
Browse files Browse the repository at this point in the history
  • Loading branch information
recolic committed Sep 3, 2018
1 parent 78ffd5c commit 890519c
Show file tree
Hide file tree
Showing 10 changed files with 793 additions and 1,460 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ template/*
!template/Vivadofile
!template/*.xdc

*.bit
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

- Burn auto saved built binary at anytime and any machine.

- Built-in support to an extremely simple constraint file format: `.vwc`.

- Full vivado GUI support.

- Support every hardware supported by vivado.
Expand Down Expand Up @@ -68,6 +70,6 @@ vivadow gui

## Notice

This is a bash script, so it can be easily injected. Never trust Vivadofile uploaded by others!
This is a bash script, so it can be easily injected. `Vivadofile` and `.vwc` constraint will be directly `source`d. **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.
34 changes: 29 additions & 5 deletions example/Vivadofile
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
# Optional options
# vivado_exec="/home/recolic/extraDisk/xilinx/Vivado/2018.1/bin/vivado"
thread_num=4

#
# Required options
#

# You may use SystemVerilog, Verilog, or VHDL files as sources.
# sources=(test_main.sv lib/* ./mod?.v)
sources=(test_main.sv lib/* ./mod?.v)

# The directory where generated bitstream is put
bit_dir=./build

# All of your top_modules and its constraint files.
# top_modules=(
# "test_main:constraint/test_main.xdc"
# "mod1:constraint/mod1.vwc"
# )
top_modules=(
"test_main:constraint/test_main.xdc"
"mod1:constraint/mod1.xdc"
"mod1:constraint/mod1.vwc"
)

# Your default top_module. Maybe override by commandline option.
# top_module=test_main
top_module=test_main

# Name of your board in vivado. HUST uses 'xc7a100tcsg324-1' by default.
board="xc7a100tcsg324-1"

#
# Optional options
#

# Path to vivado executable. It will override environment variable `vivado_exec`
# vivado_exec="/path/to/vivado"

# It's recommanded to set thread_num to cores of your CPU.
thread_num=4
2 changes: 2 additions & 0 deletions example/constraint/mod1.vwc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vwc_port P4 i
vwc_port T8 j
4 changes: 0 additions & 4 deletions example/constraint/mod1.xdc

This file was deleted.

725 changes: 2 additions & 723 deletions example/constraint/test_main.xdc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion template/Vivadofile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bit_dir=./build
# All of your top_modules and its constraint files.
# top_modules=(
# "test_main:constraint/test_main.xdc"
# "mod1:constraint/mod1.xdc"
# "mod1:constraint/mod1.vwc"
# )
top_modules=(

Expand Down
Loading

0 comments on commit 890519c

Please sign in to comment.