Skip to content

Commit 3fbe39f

Browse files
committed
Cleaning up some code in synthesis.tcl
1 parent 3cf1050 commit 3fbe39f

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

vtr_flow/misc/yosys/synthesis.tcl

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ setattr -mod -set keep_hierarchy 1 single_port_ram
66
setattr -mod -set keep_hierarchy 1 dual_port_ram
77
setattr -mod -set keep 1 dual_port_ram
88

9-
# synlig path error handling
10-
#if {[catch {set synlig $::env(synlig_exe_path)} err]} {
11-
# puts "Error: $err"
12-
# puts "synlig_exe_path is not set"
13-
#} else {
14-
# set synlig $::env(synlig_exe_path)
15-
# puts "Using parmys as partial mapper"
16-
#}
17-
189
# yosys-slang plugin error handling
1910
if {$env(PARSER) == "slang" } {
2011
if {![info exists ::env(yosys_slang_path)]} {
@@ -34,7 +25,6 @@ if {$env(PARSER) == "slang" } {
3425
error "Invalid PARSER"
3526
}
3627

37-
3828
# arch file: QQQ
3929
# input files: [XXX]
4030
# other args: [YYY]
@@ -46,43 +36,22 @@ parmys_arch -a QQQ
4636
#if {$env(PARSER) == "surelog" } {
4737
# puts "Using Synlig read_uhdm command"
4838
# exec $synlig -p "read_uhdm XXX"
49-
50-
#} elseif {$env(PARSER) == "system-verilog" } {
51-
# puts "Using Synlig read_systemverilog "
52-
# exec $synlig -p "read_systemverilog XXX"
53-
# }
39+
#}
5440

5541
if {$env(PARSER) == "slang" } {
5642
# Create a file list containing the name(s) of file(s) \
5743
# to read together with read_slang
58-
set sv_files {}
59-
set v_files {}
6044
set readfile [file join [pwd] "filelist.txt"]
6145
set fh [open $readfile "w"]
6246
foreach f {XXX} {
6347
set ext [string tolower [file extension $f]]
64-
switch -- $ext {
65-
.sv {
66-
lappend $sv_files $f
67-
puts $fh $f
68-
}
69-
.svh {
70-
lappend $sv_files $f
71-
puts $fh $f
72-
}
73-
.v {
74-
error "Use default parser to parse .v files."
75-
}
76-
.vh {
77-
error "Use default parser to parse .v files."
78-
}
48+
if {$ext == ".sv" || $ext == ".svh" || $ext == ".v" || $ext == ".vh"} {
49+
puts $fh $f
50+
} else {
51+
error "Unsupported file type. Yosys-Slang accepts .sv .svh .v .vh"
7952
}
8053
}
8154
close $fh
82-
#if {[llength $sv_files] > 0} {
83-
#puts "Using Yosys read_slang command"
84-
#read_slang -C $readfile
85-
#}
8655
puts "Using Yosys read_slang command"
8756
read_slang -C $readfile
8857
} elseif {$env(PARSER) == "default" } {

0 commit comments

Comments
 (0)