Skip to content

Commit

Permalink
Merge pull request #5 from DVLab-NTU/develop
Browse files Browse the repository at this point in the history
Fix macos installation issue
  • Loading branch information
hchchiu authored Oct 4, 2024
2 parents 08d3b8c + 5cec517 commit 12ec5dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(CMAKE_CXX_FLAGS "")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")


include(ExternalProject)
include(FetchContent)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/yosys/yosysMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; ";
Expand Down

0 comments on commit 12ec5dd

Please sign in to comment.