mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-09 00:40:16 +00:00
Slang frontend integration
This commit is contained in:
parent
b285b72e36
commit
05c0adae77
10 changed files with 100 additions and 0 deletions
15
.gitmodules
vendored
15
.gitmodules
vendored
|
|
@ -5,3 +5,18 @@
|
|||
[submodule "cxxopts"]
|
||||
path = libs/cxxopts
|
||||
url = https://github.com/jarro2783/cxxopts
|
||||
[submodule "fmt"]
|
||||
path = libs/fmt
|
||||
url = https://github.com/fmtlib/fmt
|
||||
[submodule "tomlplusplus"]
|
||||
path = libs/tomlplusplus
|
||||
url = https://github.com/marzer/tomlplusplus
|
||||
[submodule "boost_regex"]
|
||||
path = libs/boost_regex
|
||||
url = https://github.com/MikePopoloski/regex
|
||||
[submodule "slang"]
|
||||
path = libs/slang
|
||||
url = https://github.com/MikePopoloski/slang
|
||||
[submodule "sv-elab"]
|
||||
path = frontends/slang/lib
|
||||
url = https://github.com/povik/sv-elab
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ option(YOSYS_WITHOUT_ZLIB "Disable zlib integration" OFF)
|
|||
option(YOSYS_WITHOUT_LIBFFI "Disable libffi integration" OFF)
|
||||
option(YOSYS_WITHOUT_READLINE "Disable readline integration" OFF)
|
||||
option(YOSYS_WITHOUT_EDITLINE "Disable editline integration" OFF)
|
||||
option(YOSYS_WITHOUT_SLANG "Disable Slang integration" OFF)
|
||||
option(YOSYS_WITHOUT_TCL "Disable Tcl integration" OFF)
|
||||
option(YOSYS_WITH_PYTHON "Enable Python integration" OFF)
|
||||
|
||||
|
|
@ -308,6 +309,7 @@ condition(YOSYS_ENABLE_EDITLINE editline_FOUND AND NOT YOSYS_WITHOUT_EDITLINE AN
|
|||
condition(YOSYS_ENABLE_TCL tcl_FOUND AND libtommath_FOUND AND NOT YOSYS_WITHOUT_TCL)
|
||||
condition(YOSYS_ENABLE_PYTHON Python3Devel_FOUND AND PyosysEnv_FOUND AND YOSYS_WITH_PYTHON)
|
||||
condition(YOSYS_ENABLE_VERIFIC YOSYS_VERIFIC_DIR AND zlib_FOUND)
|
||||
condition(YOSYS_ENABLE_SLANG NOT YOSYS_WITHOUT_SLANG)
|
||||
|
||||
# Describe dependencies and features
|
||||
# CMake 4.0 would let us use proper conditions, but that's too new for now.
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ add_subdirectory(json)
|
|||
add_subdirectory(liberty)
|
||||
add_subdirectory(rpc)
|
||||
add_subdirectory(rtlil)
|
||||
add_subdirectory(slang)
|
||||
add_subdirectory(verific)
|
||||
add_subdirectory(verilog)
|
||||
|
|
|
|||
39
frontends/slang/CMakeLists.txt
Normal file
39
frontends/slang/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
include(lib/cmake/GitRevision.cmake)
|
||||
git_rev_parse(YOSYS_SLANG_REVISION ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
git_rev_parse(SLANG_REVISION ${PROJECT_SOURCE_DIR}/libs/slang)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/src/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||
|
||||
yosys_frontend(slang
|
||||
lib/src/abort_helpers.cc
|
||||
lib/src/addressing.cc
|
||||
lib/src/async_pattern.cc
|
||||
lib/src/async_pattern.h
|
||||
lib/src/blackboxes.cc
|
||||
lib/src/builder.cc
|
||||
lib/src/cases.cc
|
||||
lib/src/cases.h
|
||||
lib/src/diag.cc
|
||||
lib/src/diag.h
|
||||
lib/src/initialization.cc
|
||||
lib/src/lvalue.cc
|
||||
lib/src/memory.h
|
||||
lib/src/naming.cc
|
||||
lib/src/procedural.cc
|
||||
lib/src/slang_frontend.cc
|
||||
lib/src/slang_frontend.h
|
||||
lib/src/statements.h
|
||||
lib/src/sva.cc
|
||||
lib/src/variables.cc
|
||||
lib/src/variables.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
DEFINITIONS
|
||||
YOSYS_MAJOR=${YOSYS_VERSION_MAJOR}
|
||||
YOSYS_MINOR=${YOSYS_VERSION_MINOR}
|
||||
ENABLE_IF
|
||||
YOSYS_ENABLE_SLANG
|
||||
INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
LIBRARIES
|
||||
$<${YOSYS_ENABLE_SLANG}:slang::slang>
|
||||
fmt::fmt
|
||||
)
|
||||
1
frontends/slang/lib
Submodule
1
frontends/slang/lib
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit cac7d9ae8b8b3bc25b846d8f4d2cbadace651f1e
|
||||
|
|
@ -7,3 +7,41 @@ add_subdirectory(json11)
|
|||
add_subdirectory(minisat)
|
||||
add_subdirectory(sha1)
|
||||
add_subdirectory(subcircuit)
|
||||
block()
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
include(FetchContent)
|
||||
set(FETCHCONTENT_FULLY_DISCONNECTED ON)
|
||||
|
||||
option(FMT_INSTALL OFF)
|
||||
FetchContent_Declare(
|
||||
fmt
|
||||
EXCLUDE_FROM_ALL
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt
|
||||
)
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
|
||||
FetchContent_Declare(
|
||||
tomlplusplus
|
||||
EXCLUDE_FROM_ALL
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tomlplusplus
|
||||
)
|
||||
FetchContent_MakeAvailable(tomlplusplus)
|
||||
|
||||
FetchContent_Declare(
|
||||
boost_regex
|
||||
EXCLUDE_FROM_ALL
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boost_regex
|
||||
SOURCE_SUBDIR _no_build_
|
||||
)
|
||||
FetchContent_MakeAvailable(boost_regex)
|
||||
|
||||
if (NOT YOSYS_WITHOUT_SLANG)
|
||||
set(SLANG_USE_MIMALLOC OFF)
|
||||
add_subdirectory(slang)
|
||||
# Headers autodetect based on <boost/config.hpp> but when version
|
||||
# does exist but does not match requirements it becomes problematic
|
||||
if(NOT Boost_FOUND)
|
||||
target_compile_definitions(slang_slang PRIVATE BOOST_REGEX_STANDALONE)
|
||||
endif()
|
||||
endif()
|
||||
endblock()
|
||||
|
|
|
|||
1
libs/boost_regex
Submodule
1
libs/boost_regex
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2b3ac0834f31086c6e3c0e0ceb8516e427d5c39d
|
||||
1
libs/fmt
Submodule
1
libs/fmt
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1be298e1bd68957e4cd352e1f676f00e07dcfb57
|
||||
1
libs/slang
Submodule
1
libs/slang
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 6175750969f17289695f94be5105f6006c82eb61
|
||||
1
libs/tomlplusplus
Submodule
1
libs/tomlplusplus
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a43ad3787293f4a46b1d70c0924b5a25d10e79fc
|
||||
Loading…
Add table
Add a link
Reference in a new issue