diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index b060e844..bc7fddb5 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -28,23 +28,18 @@ jobs: ${{ runner.os }}-${{ env.cache-name }}- - name: Install Dependencies - shell: bash run: brew tap Homebrew/bundle && brew bundle - name: Export the brew path - shell: bash run: | - brew install bison - echo 'export PATH="$(brew --prefix bison)/bin:$PATH"' >> $GITHUB_ENV - # export PATH="$(brew --prefix bison)/bin:$(brew --prefix)/bin:$PATH" + echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH - name: Verify the brew path - shell: bash - run: bison --version + run: which bison && echo $PATH && bison --version && brew --prefix bison - # - name: Install GV - # run: make - # - # - name: Run tests - # run: make test + - name: Install GV + run: make + + - name: Run tests + run: make test diff --git a/CMakeLists.txt b/CMakeLists.txt index d0905a69..1b4fbb67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ set(CMAKE_CXX_FLAGS "") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") + include(ExternalProject) include(FetchContent) @@ -86,7 +87,7 @@ ExternalProject_Add( UPDATE_COMMAND "" UPDATE_DISCONNECTED TRUE PATCH_COMMAND ${CMAKE_COMMAND} -P ${PATCH_DIR}/${YOSYS_PATCH_CMAKE} - BUILD_COMMAND $(MAKE) ${LIBYOSYS_NAME} + BUILD_COMMAND $(MAKE) ${LIBYOSYS_NAME} && $(MAKE) LOG_CONFIGURE ON LOG_INSTALL ON # LOG_BUILD ON @@ -170,6 +171,7 @@ add_compile_definitions(GV_TEMPLATE_PATH="${CMAKE_SOURCE_DIR}/simulators/verilat add_compile_definitions(GV_VERILATOR_PATH="${CMAKE_SOURCE_DIR}/simulators/verilator/") add_compile_definitions(GV_VERILATOR_BUILD_PATH="${CMAKE_SOURCE_DIR}/simulators/verilator/build/") add_compile_definitions(GV_CXXRTL_PATH="${CMAKE_SOURCE_DIR}/simulators/cxxrtl/") +add_compile_definitions(GV_YOSYS_BIN_PATH="${YOSYS_DIR}/yosys") # target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE) # target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Wextra) target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -w) @@ -192,13 +194,13 @@ foreach(DIR ${SRC_DIR}) endforeach() # Include all the header files under the engine Yosys target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${YOSYS_DIR}) -target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${YOSYS_DIR}) # Include all the header files under the engine ABC target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${ABC_DIR}/src) # Include the readline header files target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE /usr/include/readline) # Include the gmp header files target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE /usr/local/include) +target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE /opt/homebrew/include) # Include the VCD parser header files target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${VCD_PARSER_DIR}/build) # Include the Glucose header files diff --git a/src/yosys/yosysMgr.cpp b/src/yosys/yosysMgr.cpp index 7f092cfd..87e39b28 100644 --- a/src/yosys/yosysMgr.cpp +++ b/src/yosys/yosysMgr.cpp @@ -119,9 +119,10 @@ void YosysMgr::resetDesign() { */ void YosysMgr::createMapping(const string& fileName) { // loadDesign(fileName); - string yosys = "yosys -qp "; - string readVerilog = "read_verilog -sv " + fileName + "; "; - string topModule = "hierarchy -auto-top; "; + /*string yosys = "yosys -qp ";*/ + string yosys = string(GV_YOSYS_BIN_PATH) + " -qp "; + string readVerilog = "read_verilog -sv " + fileName + "; "; + string topModule = "hierarchy -auto-top; "; /*string preProcess = "flatten; proc; techmap; setundef -zero; aigmap; ";*/ // Try to solve the unsupported type issue string preProcess = "flatten; proc; techmap; async2sync; dffunmap; setundef -zero; aigmap; ";