-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
if {[llength $argv] != 2} { | ||
puts "Usage: script.tcl <filelist.F> <reportfile>" | ||
exit 1 | ||
} | ||
|
||
set listfile [lindex $argv 0] | ||
set reportfile [lindex $argv 1] | ||
|
||
# Parse Verilog list file | ||
source ../utils.tcl | ||
set listfile_contents [parse_listfile $listfile] | ||
set vfiles [lindex $listfile_contents 0] | ||
set incdirs [lindex $listfile_contents 1] | ||
|
||
# read verilog files | ||
set rd_vrlg_flags "-DSYNTHESIS_YOSYS -D__ROM_INIT_FILE__=\"init.hex\"" | ||
foreach dir $incdirs { | ||
append rd_vrlg_flags " -I$dir" | ||
} | ||
|
||
foreach file $vfiles { | ||
yosys "read_verilog $rd_vrlg_flags $file" | ||
} | ||
|
||
# Heirarchy check | ||
yosys "hierarchy -check" | ||
|
||
# Synthesize | ||
# set fpga_family xc7 | ||
set fpga_family xc6s | ||
yosys "synth_xilinx -family $fpga_family" | ||
|
||
# Report Utilization | ||
yosys "tee -a $reportfile stat" |