Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
artvvb committed Nov 16, 2018
0 parents commit 3c6dbdb
Show file tree
Hide file tree
Showing 109 changed files with 16,435 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .gitignore
@@ -0,0 +1,54 @@
# This is a gitignore file automatically generated by digilent_vivado_checkin.tcl
# Remove this comment block when editing this file; the file will not be overwritten unless deleted

# root
/*
!.gitignore
!.gitmodules
!README.md
!LICENSE
!project_info.tcl
!proj/
!repo/
!sdk/
!src/
!digilent-vivado-scripts/

# vivado workspace
proj/*

# ip repository
repo/**
!repo/vivado-library
repo/vivado-library/**
!repo/local
!repo/local/**
!repo/cache
repo/cache/**

# version controlled sources
src/**
!src/bd
src/bd/**
!src/bd/*.tcl
!src/constraints
src/constraints/**
!src/constraints/*.xdc
!src/hdl
src/hdl/**
!src/hdl/*.v
!src/hdl/*.vhd
!src/ip
!src/ip/*
src/ip/*/**
!src/ip/**/*.xci
!src/other
!src/other/**

# sdk application sources
sdk/**
!sdk/appsrc
!sdk/appsrc/**

# maintain required directories
!**/.keep
6 changes: 6 additions & 0 deletions .gitmodules
@@ -0,0 +1,6 @@
[submodule "digilent-vivado-scripts"]
path = digilent-vivado-scripts
url = https://github.com/Digilent/digilent-vivado-scripts
[submodule "repo/vivado-library"]
path = repo/vivado-library
url = https://github.com/Digilent/vivado-library
1 change: 1 addition & 0 deletions digilent-vivado-scripts
Empty file added proj/.keep
Empty file.
9 changes: 9 additions & 0 deletions project_info.tcl
@@ -0,0 +1,9 @@
# This is an automatically generated file used by digilent_vivado_checkout.tcl to set project options
proc set_digilent_project_properties {proj_name} {
set project_obj [get_projects $proj_name]
set_property "part" "xc7z020clg400-1" $project_obj
set_property "board_part" "digilentinc.com:arty-z7-20:part0:1.0" $project_obj
set_property "default_lib" "xil_defaultlib" $project_obj
set_property "simulator_language" "Mixed" $project_obj
set_property "target_language" "Verilog" $project_obj
}
Empty file added repo/cache/.keep
Empty file.
Empty file added repo/local/.keep
Empty file.
86 changes: 86 additions & 0 deletions repo/local/ip/Audio_Stream_PWM_1.0/bd/bd.tcl
@@ -0,0 +1,86 @@

proc init { cellpath otherInfo } {

set cell_handle [get_bd_cells $cellpath]
set all_busif [get_bd_intf_pins $cellpath/*]
set axi_standard_param_list [list ID_WIDTH AWUSER_WIDTH ARUSER_WIDTH WUSER_WIDTH RUSER_WIDTH BUSER_WIDTH]
set full_sbusif_list [list ]

foreach busif $all_busif {
if { [string equal -nocase [get_property MODE $busif] "slave"] == 1 } {
set busif_param_list [list]
set busif_name [get_property NAME $busif]
if { [lsearch -exact -nocase $full_sbusif_list $busif_name ] == -1 } {
continue
}
foreach tparam $axi_standard_param_list {
lappend busif_param_list "C_${busif_name}_${tparam}"
}
bd::mark_propagate_only $cell_handle $busif_param_list
}
}
}


proc pre_propagate {cellpath otherInfo } {

set cell_handle [get_bd_cells $cellpath]
set all_busif [get_bd_intf_pins $cellpath/*]
set axi_standard_param_list [list ID_WIDTH AWUSER_WIDTH ARUSER_WIDTH WUSER_WIDTH RUSER_WIDTH BUSER_WIDTH]

foreach busif $all_busif {
if { [string equal -nocase [get_property CONFIG.PROTOCOL $busif] "AXI4"] != 1 } {
continue
}
if { [string equal -nocase [get_property MODE $busif] "master"] != 1 } {
continue
}

set busif_name [get_property NAME $busif]
foreach tparam $axi_standard_param_list {
set busif_param_name "C_${busif_name}_${tparam}"

set val_on_cell_intf_pin [get_property CONFIG.${tparam} $busif]
set val_on_cell [get_property CONFIG.${busif_param_name} $cell_handle]

if { [string equal -nocase $val_on_cell_intf_pin $val_on_cell] != 1 } {
if { $val_on_cell != "" } {
set_property CONFIG.${tparam} $val_on_cell $busif
}
}
}
}
}


proc propagate {cellpath otherInfo } {

set cell_handle [get_bd_cells $cellpath]
set all_busif [get_bd_intf_pins $cellpath/*]
set axi_standard_param_list [list ID_WIDTH AWUSER_WIDTH ARUSER_WIDTH WUSER_WIDTH RUSER_WIDTH BUSER_WIDTH]

foreach busif $all_busif {
if { [string equal -nocase [get_property CONFIG.PROTOCOL $busif] "AXI4"] != 1 } {
continue
}
if { [string equal -nocase [get_property MODE $busif] "slave"] != 1 } {
continue
}

set busif_name [get_property NAME $busif]
foreach tparam $axi_standard_param_list {
set busif_param_name "C_${busif_name}_${tparam}"

set val_on_cell_intf_pin [get_property CONFIG.${tparam} $busif]
set val_on_cell [get_property CONFIG.${busif_param_name} $cell_handle]

if { [string equal -nocase $val_on_cell_intf_pin $val_on_cell] != 1 } {
#override property of bd_interface_net to bd_cell -- only for slaves. May check for supported values..
if { $val_on_cell_intf_pin != "" } {
set_property CONFIG.${busif_param_name} $val_on_cell_intf_pin $cell_handle
}
}
}
}
}

0 comments on commit 3c6dbdb

Please sign in to comment.