pluto_hdl_adi/library/scripts/adi_ip_alt.tcl

29 lines
672 B
Tcl
Raw Normal View History

2015-05-20 13:11:18 +00:00
# keep interface-mess out of the way - keeping it pretty is a waste of time
2015-05-20 15:51:50 +00:00
proc ad_alt_intf {type name dir width {remap ""}} {
2015-05-20 13:11:18 +00:00
if {(($type eq "clock") && ($dir eq "input"))} {
add_interface if_${name} clock sink
add_interface_port if_${name} ${name} clk ${dir} ${width}
return
}
if {(($type eq "clock") && ($dir eq "output"))} {
add_interface if_${name} clock source
add_interface_port if_${name} ${name} clk ${dir} ${width}
return
}
2015-05-20 15:51:50 +00:00
if {$remap eq ""} {
set remap $name
}
2015-05-20 13:11:18 +00:00
if {$type eq "signal"} {
add_interface if_${name} conduit end
2015-05-20 15:51:50 +00:00
add_interface_port if_${name} ${name} ${remap} ${dir} ${width}
2015-05-20 13:11:18 +00:00
return
}
}