Skip to content

Commit

Permalink
Merge branch 'MikePopoloski-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
renau committed Oct 9, 2021
2 parents a421a5f + 5164f43 commit 2e76cf1
Show file tree
Hide file tree
Showing 138 changed files with 16,129 additions and 8,258 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
matrix:
include:
- compiler: clang++-12
flags: '-DCMAKE_BUILD_TYPE=Debug -DSLANG_COVERAGE=ON -DSLANG_SANITIZERS=undefined,address "-DCMAKE_CXX_CLANG_TIDY=/usr/lib/llvm-12/bin/clang-tidy;-quiet;-checks=-*,clang-analyzer-*,bugprone-*,performance-*,modernize-*,-modernize-use-auto,-modernize-use-trailing-return-type,-modernize-raw-string-literal,-modernize-use-nodiscard,-bugprone-suspicious-semicolon,-bugprone-branch-clone,-bugprone-sizeof-expression,-clang-analyzer-cplusplus.NewDelete*,-clang-analyzer-cplusplus.InnerPointer,misc-*,-misc-non-private-member-variables-in-classes,-modernize-avoid-c-arrays,-misc-no-recursion,-modernize-use-emplace"'
flags: '-DCMAKE_BUILD_TYPE=Debug -DSLANG_COVERAGE=ON -DSLANG_SANITIZERS=undefined,address "-DCMAKE_CXX_CLANG_TIDY=/usr/lib/llvm-12/bin/clang-tidy;-quiet;-checks=-*,clang-analyzer-*,bugprone-*,performance-*,modernize-*,-modernize-use-auto,-modernize-use-trailing-return-type,-modernize-raw-string-literal,-modernize-use-nodiscard,-bugprone-suspicious-semicolon,-bugprone-branch-clone,-bugprone-sizeof-expression,-clang-analyzer-cplusplus.NewDelete*,-clang-analyzer-cplusplus.InnerPointer,misc-*,-misc-non-private-member-variables-in-classes,-modernize-avoid-c-arrays,-misc-no-recursion,-modernize-use-emplace,-performance-no-int-to-ptr"'
- compiler: g++-10
flags: '-DCMAKE_BUILD_TYPE=Release'
- compiler: g++-8
Expand Down Expand Up @@ -73,7 +73,9 @@ jobs:
cd build
find . -name *.profraw -exec llvm-profdata-12 merge -o merged.profdata -sparse {} + ;
llvm-cov-12 show bin/unittests -instr-profile=merged.profdata > coverage.txt
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- name: Archive binaries
if: matrix.compiler == 'g++-10'
run: |
Expand Down
36 changes: 4 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# slang - cmake entry point
cmake_minimum_required(VERSION 3.12)
project(slang VERSION 0.8.0 LANGUAGES CXX)
cmake_minimum_required(VERSION 3.15)
project(slang VERSION 0.9.0 LANGUAGES CXX)

option(SLANG_MSVC_W4 "Enable /W4 for MSVC builds" ON)
option(SLANG_MSVC_STATIC_RUNTIME "Enable linking to the MSVC static runtime" ON)
option(SLANG_COVERAGE "Enable code coverage" OFF)
option(CI_BUILD "Enable longer running tests for CI builds" OFF)
option(FUZZ_TARGET "Enables changes to make binaries easier to fuzz test" OFF)
Expand All @@ -18,7 +16,7 @@ set(DOXYGENPY_PATH "" CACHE STRING "When building docs, the path to doxygen.py t
set(SLANG_SANITIZERS "" CACHE STRING "List of Clang sanitizers to include in build")

set(SLANG_VERSION_MAJOR 0)
set(SLANG_VERSION_MINOR 8)
set(SLANG_VERSION_MINOR 9)

# Default build type if none is set
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -99,33 +97,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# Ignore annoying DELAYLOAD warnings
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4199")

if(SLANG_MSVC_W4)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
endif()

if(SLANG_MSVC_STATIC_RUNTIME)
set(variables
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
foreach(variable ${variables})
if(${variable} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
endif()
endforeach()
endif()

set(SLANG_WARN_FLAGS "/WX")
set(SLANG_WARN_FLAGS "/W4" "/WX")
else()
# Always include debug info
add_compile_options(-g)
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ coverage:
- "external/**/*"
- "tests/**/*"
- "tools/**/*"
- "build/**/*"

parsers:
gcov:
Expand Down
7 changes: 2 additions & 5 deletions docs/building.dox
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All source code is hosted on [GitHub](https://github.com/MikePopoloski/slang)

slang requires the following dependencies in order to build:
- [python 3](https://www.python.org/)
- [CMake](https://cmake.org/) (3.12 or later)
- [CMake](https://cmake.org/) (3.15 or later)
- C++17 compatible compiler

@section building-start Quick Start
Expand Down Expand Up @@ -68,9 +68,6 @@ SLANG_COVERAGE | Enable Clang code coverage | OFF
SLANG_SANITIZERS | A list of Clang sanitizers to include in the build | ""
FUZZ_TARGET | Turn on to enable some changes to make binaries easier to fuzz test | OFF
CI_BUILD | Enable additional longer-running tests for automated builds | OFF
SLANG_MSVC_W4 | Enable /W4 for MSVC builds | ON
SLANG_MSVC_STATIC_RUNTIME | Enable linking to the MSVC static runtime | ON
LLVM_DIR | When building with LLVM, a path to where the LLVM cmake system lives | ""
DOXYGENPY_PATH | When building docs, the path to the doxygen.py tool | ""

@section build-scripts Build Scripts
Expand Down Expand Up @@ -119,4 +116,4 @@ make docs

The output website is located at `docs/html/`

*/
*/
12 changes: 9 additions & 3 deletions docs/command-line-ref.dox
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,19 @@ The default is 64.
`-y,--libdir <dir>`

Add the given directory path to the list of directories searched when an unknown module instantiation
is encountered. Combined with `--libext`, files are automatically included based on the name of the module
being instantiated.
or package import is encountered. Combined with `--libext`, files are automatically included based on the
name that is unknown. This list is empty by default.

The search works as follows: all known modules, interfaces, programs, packages, and classes add their
names to a list of known definitions. Any instantiations, package import directives, or double colon-scoped
names that reference a name not in the list of known definitions will trigger a search in all library
directories, trying all specified library extensions. If a matching file is found it will be loaded and
parsed in its entirety, and the algorithm will be triggered again on any new names found.

`-Y,--libext <ext>`

Add the given extension to the list of extensions tried when searching for files to satisfy
unknown module instantiations. This list automatically includes '.v' and '.sv' by default.
unknown module instantiations and package imports. This list automatically includes '.v' and '.sv' by default.

@section json-output JSON Output

Expand Down
50 changes: 26 additions & 24 deletions docs/language-support.dox
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ LRM | Feature | Supported
{{m-success}} 6.5 | Nets and variables | v0.2
{{m-success}} 6.6 | Net types | v0.2
{{m-warning}} 6.6.7 | User-defined nettypes | partial
{{m-danger}} 6.6.8 | Generic interconnect | no
{{m-warning}} 6.6.8 | Generic interconnect | partial
{{m-success}} 6.7 | Net declarations | v0.6
{{m-success}} 6.8 | Variable declarations | v0.2
{{m-success}} 6.9 | Vector declarations | v0.2
Expand All @@ -64,7 +64,7 @@ LRM | Feature | Supported
{{m-success}} 6.18 | User-defined types | v0.2
{{m-success}} 6.19 | Enumerations | v0.2
{{m-success}} 6.20.2 | Value parameters | v0.2
{{m-danger}} 6.20.2.1 | $ as a parameter value | no
{{m-success}} 6.20.2.1 | $ as a parameter value | v0.8
{{m-success}} 6.20.3 | Type parameters | v0.2
{{m-success}} 6.20.4 | Local parameters | v0.2
{{m-success}} 6.20.5 | Specify parameters | v0.7
Expand All @@ -82,7 +82,7 @@ LRM | Feature | Supported
LRM | Feature | Supported
--- | ------- | ---------
{{m-success}} 7.2 | Structures | v0.2
{{m-warning}} 7.3 | Unions | partial
{{m-success}} 7.3 | Unions | v0.9
{{m-success}} 7.4 | Packed and unpacked arrays | v0.2
{{m-success}} 7.5 | Dynamic arrays | v0.4
{{m-success}} 7.6 | Array assignments | v0.2
Expand Down Expand Up @@ -140,9 +140,9 @@ LRM | Feature | Supported
{{m-success}} 9.4.1 | Delay control | v0.2
{{m-success}} 9.4.2 | Event control | v0.2
{{m-success}} 9.4.2.3 | Conditional event controls | v0.6
{{m-danger}} 9.4.2.4 | Sequence events | no
{{m-success}} 9.4.2.4 | Sequence events | v0.8
{{m-success}} 9.4.3 | Level-sensitive event control | v0.6
{{m-danger}} 9.4.4 | Level-sensitive sequence controls | no
{{m-success}} 9.4.4 | Level-sensitive sequence controls | v0.8
{{m-success}} 9.4.5 | Intra-assignment timing controls | v0.6
{{m-dim}} 9.5 | Process execution threads | N/A
{{m-success}} 9.6.1 | Wait fork statement | v0.4
Expand Down Expand Up @@ -175,10 +175,10 @@ LRM | Feature | Supported
{{m-success}} 11.6 | Expression bit lengths | v0.2
{{m-success}} 11.7 | Signed expressions | v0.2
{{m-success}} 11.8 | Expression evaluation rules | v0.2
{{m-danger}} 11.9 | Tagged union expressions | no
{{m-success}} 11.9 | Tagged union expressions | v0.9
{{m-success}} 11.10 | String literal expressions | v0.5
{{m-success}} 11.11 | Min/typ/max expressions | v0.4
{{m-danger}} 11.12 | Let construct | no
{{m-success}} 11.12 | Let construct | v0.9

## 12. Procedural programming statements

Expand Down Expand Up @@ -240,20 +240,22 @@ LRM | Feature | Supported
LRM | Feature | Supported
--- | ------- | ---------
{{m-success}} 16.3 | Immediate assertions | v0.2
{{m-warning}} 16.4 | Deferred assertions | partial
{{m-success}} 16.4 | Deferred assertions | v0.8
{{m-success}} 16.5 | Concurrent assertions overview | v0.8
{{m-success}} 16.6 | Boolean expressions | v0.8
{{m-success}} 16.7 | Sequences | v0.8
{{m-warning}} 16.8 | Declaring sequences | partial
{{m-warning}} 16.9 | Sequence operations | partial
{{m-danger}} 16.10 | Local variables | no
{{m-danger}} 16.11 | Calling subroutines on match of sequence | no
{{m-warning}} 16.12 | Declaring properties | partial
{{m-danger}} 16.13 | Multiclock support | no
{{m-warning}} 16.14 | Concurrent assertions | partial
{{m-danger}} 16.15 | Disable iff resolution | no
{{m-success}} 16.8 | Declaring sequences | v0.8
{{m-success}} 16.9 | Sequence operations | v0.8
{{m-success}} 16.10 | Local variables | v0.8
{{m-success}} 16.11 | Calling subroutines on match of sequence | v0.8
{{m-success}} 16.12 | Declaring properties | v0.8
{{m-warning}} 16.12.22 | Nondegeneracy | partial
{{m-warning}} 16.13 | Multiclock support | partial
{{m-success}} 16.14 | Concurrent assertions | v0.8
{{m-danger}} 16.14.7 | Inferred value functions | no
{{m-success}} 16.15 | Disable iff resolution | v0.8
{{m-danger}} 16.16 | Clock resolution | no
{{m-danger}} 16.17 | Expect statement | no
{{m-success}} 16.17 | Expect statement | v0.8
{{m-dim}} 16.18 | Clocking blocks and concurrent assertions | N/A

## 17. Checkers
Expand Down Expand Up @@ -286,8 +288,8 @@ LRM | Feature | Supported
{{m-success}} 18.13 | Random number system functions | v0.6
{{m-dim}} 18.14 | Random stability | N/A
{{m-dim}} 18.15 | Manually seeding randomize | N/A
{{m-danger}} 18.16 | Random weighted case | no
{{m-danger}} 18.17 | Random sequence generation | no
{{m-success}} 18.16 | Random weighted case | v0.9
{{m-success}} 18.17 | Random sequence generation | v0.9

## 19. Functional coverage

Expand All @@ -299,7 +301,7 @@ LRM | Feature | Supported
{{m-danger}} 19.6 | Defining cross coverage | no
{{m-danger}} 19.7 | Specifying coverage options | no
{{m-danger}} 19.8 | Predefined coverage methods | no
{{m-danger}} 19.9 | Predefined coverage system tasks | no
{{m-success}} 19.9 | Predefined coverage system tasks | v0.9
{{m-danger}} 19.10 | Organization of option members | no
{{m-dim}} 19.11 | Coverage computation | N/A

Expand All @@ -312,18 +314,18 @@ LRM | Feature | Supported
{{m-success}} 20.4 | Timescale tasks | v0.4
{{m-success}} 20.5 | Conversion functions | v0.2
{{m-success}} 20.6 | Data query functions | v0.3
{{m-danger}} 20.6.1 | Range system function | no
{{m-success}} 20.6.1 | Range system function | v0.8
{{m-success}} 20.7 | Array query functions | v0.4
{{m-success}} 20.8 | Math functions | v0.2
{{m-success}} 20.9 | Bit vector system functions | v0.2
{{m-success}} 20.10 | Severity tasks | v0.2
{{m-success}} 20.11 | Elaboration tasks | v0.5
{{m-success}} 20.12 | Assertion control tasks | v0.6
{{m-success}} 20.13 | Sampled value system functions | v0.8
{{m-danger}} 20.14 | Coverage control functions | no
{{m-success}} 20.14 | Coverage control functions | v0.9
{{m-success}} 20.15 | Probabilistic distribution functions | v0.7
{{m-success}} 20.16 | Stochastic analysis tasks and functions | v0.7
{{m-danger}} 20.17 | PLA modeling tasks | no
{{m-success}} 20.17 | PLA modeling tasks | v0.9
{{m-success}} 20.18 | Miscellaneous tasks and functions | v0.4

## 21. Input/output system tasks and system functions
Expand Down Expand Up @@ -408,7 +410,7 @@ LRM | Feature | Supported
{{m-success}} 26.3 | Referencing data in packages | v0.2
{{m-success}} 26.4 | Using packages in module headers | v0.2
{{m-success}} 26.5 | Search order rules | v0.2
{{m-danger}} 26.6 | Exporting imported names from packages | no
{{m-success}} 26.6 | Exporting imported names from packages | v0.9
{{m-success}} 26.7 | The std built-in package | v0.6

## 27. Generate constructs
Expand Down
Loading

0 comments on commit 2e76cf1

Please sign in to comment.