Skip to content

Commit

Permalink
Made OSVVM a submodule of the VUnit repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsAsplund committed Aug 8, 2016
1 parent d22645a commit 1f290d4
Show file tree
Hide file tree
Showing 31 changed files with 80 additions and 11,407 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vunit/vhdl/osvvm"]
path = vunit/vhdl/osvvm
url = https://github.com/JimLewis/OSVVM.git
20 changes: 11 additions & 9 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
All files except for OSVVM under vhdl/osvvm
===========================================
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.
VUnit
-----

VUnit except for OSVVM (see below) is released under the terms of
Mozilla Public License, v. 2.0.

Copyright (c) 2014-2016, Lars Asplund [email protected]

OSSVM under vhdl/osvvm
======================
License according to http://www.perlfoundation.org/artistic_license_2_0
OSVVM
-----

OSVVM is redistributed as a submodule to VUnit for your convenience. OSVVM and derivative work
located under examples/vhdl/osvvm_integration/src are licensed under the terms of Artistic License 2.0.

Copyright (c) 2010 - 2015 by SynthWorks Design Inc. All rights reserved.
Copyright (c) 2006-2016, SynthWorks Design Inc http://www.synthworks.com
21 changes: 5 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,18 @@ often" approach through automation.

License
=======

.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN

VUnit
-----

VUnit except for OSVVM (see below) is released under the terms of
`Mozilla Public License, v. 2.0`_.
Mozilla Public License, v. 2.0.

|copy| 2014-2016 Lars Asplund, [email protected].
Copyright (c) 2014-2016, Lars Asplund [email protected]

OSVVM
-----

OSVVM 2015.03 is `redistributed`_ with VUnit for your convenience. Minor
`modifications`_ have been made to enable GHDL support. Derivative work
is also located under `examples/vhdl/osvvm\_integration/src`_. These
files are licensed under the terms of `ARTISTIC License`_.

|copy| 2010 - 2015 by SynthWorks Design Inc. All rights reserved.
OSVVM is redistributed as a submodule to VUnit for your convenience. OSVVM and derivative work
located under examples/vhdl/osvvm_integration/src are licensed under the terms of Artistic License 2.0.

.. _Mozilla Public License, v. 2.0: http://mozilla.org/MPL/2.0/
.. _redistributed: https://github.com/VUnit/vunit/blob/master/vunit/vhdl/osvvm
.. _modifications: https://github.com/VUnit/vunit/commit/25fce1b3700e746c3fa23bd7157777dd4f20f0d6
.. _examples/vhdl/osvvm\_integration/src: https://github.com/VUnit/vunit/blob/master/examples/vhdl/osvvm_integration/src
.. _ARTISTIC License: http://www.perlfoundation.org/artistic_license_2_0
Copyright (c) 2006-2016, SynthWorks Design Inc http://www.synthworks.com
4 changes: 3 additions & 1 deletion docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Start by cloning our `GIT repository on GitHub <https://github.com/vunit/vunit/>

.. code-block:: console
git clone https://github.com/VUnit/vunit.git
git clone --recursive https://github.com/VUnit/vunit.git
The ``--recursive`` option initializes `OSVVM https://github.com/JimLewis/OSVVM>`__ which is included as a submodule in the VUnit repository.

To be able to import :class:`VUnit <vunit.ui.VUnit>` in your ``run.py`` script
you need to make it visible to Python or else the following error
Expand Down
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

from setuptools import setup
from vunit.about import version, doc
from vunit.builtins import osvvm_is_installed
import os

from logging import warning

def find_all_files(directory, endings=None):
"""
Expand Down Expand Up @@ -59,3 +60,12 @@ def find_all_files(directory, endings=None):
author_email='[email protected]',
description="VUnit is an open source unit testing framework for VHDL/SystemVerilog.",
long_description=doc())

if not osvvm_is_installed():
warning("""
Found no OSVVM VHDL files. If you're installing from a Git repository and plan to use VUnit's integration
of OSVVM you should run
git submodule update --init --recursive
in your VUnit repository before running setup.py.""")
54 changes: 25 additions & 29 deletions vunit/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,35 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2016, Lars Asplund [email protected]
# Copyright (c) 2015-2016, Lars Asplund [email protected]

"""
Provides documentation and version information
"""


def license_text():
"""
Returns licence text
"""
return """VUnit
-----
VUnit except for OSVVM (see below) is released under the terms of
Mozilla Public License, v. 2.0.
Copyright (c) 2014-2016, Lars Asplund [email protected]
OSVVM
-----
OSVVM is redistributed as a submodule to VUnit for your convenience. OSVVM and derivative work
located under examples/vhdl/osvvm_integration/src are licensed under the terms of Artistic License 2.0.
Copyright (c) 2006-2016, SynthWorks Design Inc http://www.synthworks.com
"""


def doc():
"""
Returns short introduction to VUnit
Expand All @@ -27,37 +49,11 @@ def doc():
License
=======
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
VUnit
-----
VUnit except for OSVVM (see below) is released under the terms of
`Mozilla Public License, v. 2.0`_.
|copy| 2014-2016 Lars Asplund, [email protected].
OSVVM
-----
OSVVM 2015.03 is `redistributed`_ with VUnit for your convenience. Minor
`modifications`_ have been made to enable GHDL support. Derivative work
is also located under `examples/vhdl/osvvm\_integration/src`_. These
files are licensed under the terms of `ARTISTIC License`_.
|copy| 2010 - 2015 by SynthWorks Design Inc. All rights reserved.
.. _Mozilla Public License, v. 2.0: http://mozilla.org/MPL/2.0/
.. _redistributed: https://github.com/VUnit/vunit/blob/master/vunit/vhdl/osvvm
.. _modifications: https://github.com/VUnit/vunit/commit/25fce1b3700e746c3fa23bd7157777dd4f20f0d6
.. _examples/vhdl/osvvm\_integration/src: https://github.com/VUnit/vunit/blob/master/examples/vhdl/osvvm_integration/src
.. _ARTISTIC License: http://www.perlfoundation.org/artistic_license_2_0
"""
""" + license_text()


def version():
"""
Returns VUnit version
"""
return '0.67.0-rc.1'
return '0.67.0'
15 changes: 15 additions & 0 deletions vunit/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,25 @@ def add_array_util(library, vhdl_standard):
library.add_source_files(join(VHDL_PATH, "array", "src", "array_pkg.vhd"))


def osvvm_is_installed():
"""
Checks if OSVVM is installed within the VUnit directory structure
"""
return len(glob(join(VHDL_PATH, "osvvm", "*.vhd"))) != 0


def add_osvvm(library):
"""
Add osvvm library
"""
if not osvvm_is_installed():
raise RuntimeError("""
Found no OSVVM VHDL files. Did you forget to run
git submodule update --init --recursive
in your VUnit Git repository? You have to do this first if installing using setup.py.""")

for file_name in glob(join(VHDL_PATH, "osvvm", "*.vhd")):
if basename(file_name) != 'AlertLogPkg_body_BVUL.vhd':
library.add_source_files(file_name, preprocessors=[])
Expand Down
5 changes: 5 additions & 0 deletions vunit/test/lint/test_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from vunit import ROOT
from vunit.builtins import VHDL_PATH
import vunit.ostools as ostools
from vunit.about import license_text

RE_LICENSE_NOTICE = re.compile(
r"(?P<comment_start>#|--|//) This Source Code Form is subject to the terms of the Mozilla Public" + "\n"
Expand All @@ -44,6 +45,10 @@ def test_that_a_valid_license_exists_in_source_files_and_that_global_licensing_i
if splitext(file_name)[1] in ('.vhd', '.vhdl', '.v', '.sv'):
self._check_no_trailing_whitespace(code, file_name)

def test_that_license_file_matches_vunit_license_text(self):
with open(join(ROOT, 'LICENSE.txt')) as lic:
self.assertEqual(lic.read(), license_text())

def _check_license(self, code, file_name):
"""
Check that the license header of file_name is valid
Expand Down
2 changes: 1 addition & 1 deletion vunit/vhdl/array/src/array_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- You can obtain one at http://mozilla.org/MPL/2.0/.
--
-- Copyright (c) 2014-2015, Lars Asplund [email protected]
-- Copyright (c) 2014-2016, Lars Asplund [email protected]

-- @TODO > 32-bit ieee signed/unsigned

Expand Down
1 change: 1 addition & 0 deletions vunit/vhdl/osvvm
Submodule osvvm added at 6843a4
Loading

0 comments on commit 1f290d4

Please sign in to comment.