-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to UVVM version 2018.07.02 - Please see CHANGES.TXT for details.
- Loading branch information
Andre Firing
committed
Jul 2, 2018
1 parent
f1f2f75
commit a6ebfb8
Showing
55 changed files
with
5,862 additions
and
256 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,8 @@ | ||
Bitvis VIP Clock Generator - Overview on Versions and Changes | ||
============================================================== | ||
|
||
v1.0.0 | ||
---------- | ||
Released: 2018-07-02 | ||
|
||
Initial version of Clock Generator VIP |
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,19 @@ | ||
UVVM LICENSE AGREEMENT | ||
IMPORTANT - READ BEFORE USING OR COPYING. | ||
THIS IS THE MIT LICENSE, see https://opensource.org/licenses/MIT | ||
------------------------------------------------------------------ | ||
|
||
Copyright (c) 2018 by Bitvis AS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS | ||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,8 @@ | ||
----------------------------------------------------------- | ||
-- Directory structure -- | ||
----------------------------------------------------------- | ||
|
||
- bitvis_vip_clock_generator : An example VIP that uses UVVM | ||
- doc : Quick Reference for VVC | ||
- script : Compile scripts | ||
- src : VVC source code |
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 @@ | ||
1.0.0 |
Binary file not shown.
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,8 @@ | ||
# library bitvis_vip_clock_generator | ||
../src/vvc_cmd_pkg.vhd | ||
../../uvvm_vvc_framework/src_target_dependent/td_target_support_pkg.vhd | ||
../../uvvm_vvc_framework/src_target_dependent/td_vvc_framework_common_methods_pkg.vhd | ||
../src/vvc_methods_pkg.vhd | ||
../../uvvm_vvc_framework/src_target_dependent/td_queue_pkg.vhd | ||
../../uvvm_vvc_framework/src_target_dependent/td_vvc_entity_support_pkg.vhd | ||
../src/clock_generator_vvc.vhd |
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,141 @@ | ||
#======================================================================================================================== | ||
# Copyright (c) 2017 by Bitvis AS. All rights reserved. | ||
# You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, | ||
# contact Bitvis AS <support@bitvis.no>. | ||
# | ||
# UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR | ||
# OTHER DEALINGS IN UVVM. | ||
#======================================================================================================================== | ||
|
||
# This file may be called with arguments: | ||
# arg 1: Part directory of this library/module | ||
# arg 2: Target directory | ||
|
||
# Overload quietly (Modelsim specific command) to let it work in Riviera-Pro | ||
proc quietly { args } { | ||
if {[llength $args] == 0} { | ||
puts "quietly" | ||
} else { | ||
# this works since tcl prompt only prints the last command given. list prints "". | ||
uplevel $args; list; | ||
} | ||
} | ||
|
||
if {[batch_mode]} { | ||
onerror {abort all; exit -f -code 1} | ||
} else { | ||
onerror {abort all} | ||
} | ||
|
||
# Detect simulator | ||
if {[catch {eval "vsim -version"} message] == 0} { | ||
quietly set simulator_version [eval "vsim -version"] | ||
# puts "Version is: $simulator_version" | ||
if {[regexp -nocase {modelsim} $simulator_version]} { | ||
quietly set simulator "modelsim" | ||
} elseif {[regexp -nocase {aldec} $simulator_version]} { | ||
quietly set simulator "rivierapro" | ||
} else { | ||
puts "Unknown simulator. Attempting to use Modelsim commands." | ||
quietly set simulator "modelsim" | ||
} | ||
} else { | ||
puts "vsim -version failed with the following message:\n $message" | ||
abort all | ||
} | ||
|
||
if { [string equal -nocase $simulator "modelsim"] } { | ||
########### | ||
# Fix possible vmap bug | ||
do fix_vmap.tcl | ||
########## | ||
} | ||
|
||
|
||
#------------------------------------------------------ | ||
# Set up source_path and default_target | ||
# | ||
# 0 args: regular UVVM directory structure expected | ||
# 1 args: source directory specified, target will be current directory | ||
# 2 args: source directory and target directory specified | ||
# | ||
#------------------------------------------------------ | ||
quietly set part_name "bitvis_vip_clock_generator" | ||
|
||
if { [info exists 1] } { | ||
if {$argc == 1} { | ||
echo "\nUser specified source directory" | ||
quietly set source_path "$1" | ||
quietly set target_path [pwd] | ||
quietly set default_target 0 | ||
} elseif {$argc >= 2} { | ||
echo "\nUser specified source and target directory" | ||
quietly set target_path "$2" | ||
quietly set default_target 0 | ||
} | ||
unset 1 | ||
} else { | ||
echo "\nDefault output directory" | ||
# path from mpf-file in /sim folder | ||
quietly set source_path "../..//$part_name" | ||
quietly set target_path $source_path | ||
quietly set default_target 1 | ||
} | ||
echo "Source path: $source_path" | ||
echo "Taget path: $target_path" | ||
|
||
|
||
#------------------------------------------------------ | ||
# Read compile_order.txt and set lib_name | ||
#------------------------------------------------------ | ||
quietly set fp [open "$source_path/script/compile_order.txt" r] | ||
quietly set file_data [read $fp] | ||
quietly set lib_name [lindex $file_data 2] | ||
close $fp | ||
|
||
#------------------------------------------------------ | ||
# (Re-)Generate library and Compile source files | ||
#------------------------------------------------------ | ||
echo "\n\nRe-gen lib and compile $lib_name source" | ||
if {$default_target} { | ||
if {[file exists $source_path/sim/$lib_name]} { | ||
file delete -force $source_path/sim/$lib_name | ||
} | ||
if {![file exists $source_path/sim]} { | ||
file mkdir $source_path/sim | ||
} | ||
} else { | ||
if {![file exists $target_path/$lib_name]} { | ||
file mkdir $target_path/$lib_name | ||
} | ||
} | ||
|
||
if {$default_target} { | ||
vlib $source_path/sim/$lib_name | ||
vmap $lib_name $source_path/sim/$lib_name | ||
} else { | ||
vlib $target_path/$lib_name | ||
vmap $lib_name $target_path/$lib_name | ||
} | ||
|
||
if { [string equal -nocase $simulator "modelsim"] } { | ||
quietly set compdirectives "-quiet -suppress 1346,1236 -2008 -work $lib_name" | ||
} elseif { [string equal -nocase $simulator "rivierapro"] } { | ||
set compdirectives "-2008 -nowarn COMP96_0564 -nowarn COMP96_0048 -dbg -work $lib_name" | ||
} | ||
|
||
#------------------------------------------------------ | ||
# Compile src files | ||
#------------------------------------------------------ | ||
echo "\n\n\n=== Compiling $lib_name source\n" | ||
quietly set idx 0 | ||
foreach item $file_data { | ||
if {$idx > 2} { | ||
echo "eval vcom $compdirectives $source_path/script/$item" | ||
eval vcom $compdirectives $source_path/script/$item | ||
} | ||
incr idx 1 | ||
} |
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,68 @@ | ||
#======================================================================================================================== | ||
# Copyright (c) 2017 by Bitvis AS. All rights reserved. | ||
# You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, | ||
# contact Bitvis AS <support@bitvis.no>. | ||
# | ||
# UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR | ||
# OTHER DEALINGS IN UVVM. | ||
#======================================================================================================================== | ||
|
||
# This file may be called with an argument | ||
# arg 1: Part directory of this library/module | ||
|
||
# Overload quietly (Modelsim specific command) to let it work in Riviera-Pro | ||
proc quietly { args } { | ||
if {[llength $args] == 0} { | ||
puts "quietly" | ||
} else { | ||
# this works since tcl prompt only prints the last command given. list prints "". | ||
uplevel $args; list; | ||
} | ||
} | ||
|
||
if {[batch_mode]} { | ||
onerror {abort all; exit -f -code 1} | ||
} else { | ||
onerror {abort all} | ||
} | ||
#Just in case... | ||
quietly quit -sim | ||
|
||
# Compile UVVM Util | ||
#------------------------------------------------------ | ||
|
||
# Set up util_part_path | ||
quietly set part_name "uvvm_util" | ||
# path from mpf-file in sim | ||
quietly set util_part_path "../..//$part_name" | ||
|
||
if { [info exists 1] } { | ||
# path from this part to target part | ||
quietly set util_part_path "$1/..//$part_name" | ||
unset 1 | ||
} | ||
|
||
|
||
do $util_part_path/script/compile_src.do $util_part_path | ||
|
||
|
||
# Compile UVVM VVC Framework | ||
#---------------------------------- | ||
|
||
# Set up part_path for uvvm_vvc_framework | ||
#------------------------------------------------------ | ||
quietly set part_name "uvvm_vvc_framework" | ||
# path from mpf-file in sim | ||
quietly set uvvm_part_path "../..//$part_name" | ||
|
||
if { [info exists 1] } { | ||
# path from this part to target part | ||
quietly set uvvm_part_path "$1/..//$part_name" | ||
unset 1 | ||
} | ||
|
||
do $uvvm_part_path/script/compile_src.do $uvvm_part_path | ||
|
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,65 @@ | ||
#======================================================================================================================== | ||
# Copyright (c) 2017 by Bitvis AS. All rights reserved. | ||
# You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, | ||
# contact Bitvis AS <support@bitvis.no>. | ||
# | ||
# UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR | ||
# OTHER DEALINGS IN UVVM. | ||
#======================================================================================================================== | ||
|
||
# | ||
# Fix 'vmap' | ||
# | ||
# This is a fix for a bug in Modelsim's 'vmap' command, resulting in Modelsim | ||
# incorrectly reporting successful modification of 'modelsim.ini'. | ||
# | ||
# On some Linux hosts, Modelsim reports "Modifying modelsim.ini" when vmap is | ||
# executed without acutally modifying 'modelsim.ini' file. This script test to | ||
# check if the bug exists, and provides an aleternate 'vmap' command that | ||
# modifies 'modelsim.ini' file as expected by Modelsim. | ||
# | ||
|
||
vlib test-FM-8-lib | ||
vmap test-FM-8 test-FM-8-lib | ||
|
||
if { [catch {vmap test-FM-8}] } { | ||
# Bug exists | ||
|
||
echo "Detected vmap bug." | ||
proc vmap { lib path } { | ||
set timestamp [clock format [clock seconds] -format {%Y%m%d%H%M%S}] | ||
set filename "modelsim.ini" | ||
set temp $filename.new.$timestamp | ||
set backup $filename.bak.$timestamp | ||
|
||
set in [open $filename r] | ||
set out [open $temp w] | ||
|
||
# line-by-line, read the original file | ||
while { [gets $in line] != -1 } { | ||
# Write the line | ||
puts $out $line | ||
|
||
if { [string equal $line "\[Library\]"] } { | ||
puts $out "$lib = $path\n" | ||
} | ||
} | ||
|
||
close $in | ||
close $out | ||
|
||
# move the new data to the proper filename | ||
file rename -force $filename $backup | ||
file rename -force $temp $filename | ||
|
||
} | ||
|
||
|
||
} else { | ||
vmap -del test-FM-8 | ||
} | ||
vdel -all -lib test-FM-8-lib | ||
|
Oops, something went wrong.