From 246337cdbe4472a7636e4c030143aac8f72726fe Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Fri, 3 May 2024 01:55:31 +0000 Subject: [PATCH 1/4] Fixes incorrect extern definition of Wlc_BlastMultiplier3 Signed-off-by: Ethan Mahintorabi --- src/base/wlc/wlc.c | 3 --- src/base/wlc/wlcBlast.c | 1 - src/base/wln/wlnBlast.c | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/base/wlc/wlc.c b/src/base/wlc/wlc.c index 91656efc8..0968b6ea7 100644 --- a/src/base/wlc/wlc.c +++ b/src/base/wlc/wlc.c @@ -678,7 +678,6 @@ Gia_Man_t * Wlc_ManGenTree( int nInputs, int Value, int nBits, int fVerbose ) Gia_Man_t * Wlc_ManGenProd( int nInputs, int fVerbose ) { extern void Wlc_BlastBooth( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int nArgB, Vec_Int_t * vRes, int fSigned, int fCla, Vec_Wec_t ** pvProds, int fVerbose ); - extern void Wlc_BlastMultiplier3( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int nArgB, Vec_Int_t * vRes, int fSigned, int fCla, Vec_Wec_t ** pvProds ); Vec_Int_t * vIns = Vec_IntAlloc( 2*nInputs ); Gia_Man_t * pTemp, * pNew; Vec_Wec_t * vProds; int i; @@ -694,8 +693,6 @@ Gia_Man_t * Wlc_ManGenProd( int nInputs, int fVerbose ) Gia_ManHashAlloc( pNew ); Wlc_BlastBooth( pNew, Vec_IntArray(vIns), Vec_IntArray(vIns)+nInputs, nInputs, nInputs, NULL, 0, 0, &vProds, 0 ); - //Wlc_BlastMultiplier3( pNew, Vec_IntArray(vIns), Vec_IntArray(vIns)+nInputs, nInputs, nInputs, NULL, 0, 0, &vProds ); - //Vec_WecPrint( vProds, 0 ); Wlc_ManGenTreeOne( pNew, vProds, 1, fVerbose ); Gia_ManHashStop( pNew ); Vec_WecFree( vProds ); diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c index d3b2b3a05..86b18b054 100644 --- a/src/base/wlc/wlcBlast.c +++ b/src/base/wlc/wlcBlast.c @@ -1049,7 +1049,6 @@ void Wlc_BlastReduceMatrix2( Gia_Man_t * pNew, Vec_Wec_t * vProds, Vec_Int_t * v Vec_IntFree( vTemp ); } - void Wlc_BlastMultiplier3( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int nArgB, Vec_Int_t * vRes, int fSigned, int fCla, Vec_Wec_t ** pvProds, int fVerbose ) { Vec_Wec_t * vProds = Vec_WecStart( nArgA + nArgB ); diff --git a/src/base/wln/wlnBlast.c b/src/base/wln/wlnBlast.c index c3281a2e0..87fbc0fb0 100644 --- a/src/base/wln/wlnBlast.c +++ b/src/base/wln/wlnBlast.c @@ -70,7 +70,7 @@ void Rtl_NtkBlastNode( Gia_Man_t * pNew, int Type, int nIns, Vec_Int_t * vDatas, extern void Wlc_BlastSubtract( Gia_Man_t * pNew, int * pAdd0, int * pAdd1, int nBits, int Carry ); // result is in pAdd0 extern int Wlc_NtkCountConstBits( int * pArray, int nSize ); extern void Wlc_BlastBooth( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int nArgB, Vec_Int_t * vRes, int fSigned, int fCla, Vec_Wec_t ** pvProds, int fVerbose ); - extern void Wlc_BlastMultiplier3( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int nArgB, Vec_Int_t * vRes, int fSigned, int fCla, Vec_Wec_t ** pvProds ); + extern void Wlc_BlastMultiplier3( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int nArgB, Vec_Int_t * vRes, int fSigned, int fCla, Vec_Wec_t ** pvProds, int fVerbose ); extern void Wlc_BlastZeroCondition( Gia_Man_t * pNew, int * pDiv, int nDiv, Vec_Int_t * vRes ); extern void Wlc_BlastDividerTop( Gia_Man_t * pNew, int * pNum, int nNum, int * pDiv, int nDiv, int fQuo, Vec_Int_t * vRes, int fNonRest ); extern void Wlc_BlastDividerSigned( Gia_Man_t * pNew, int * pNum, int nNum, int * pDiv, int nDiv, int fQuo, Vec_Int_t * vRes, int fNonRest ); @@ -305,7 +305,7 @@ void Rtl_NtkBlastNode( Gia_Man_t * pNew, int Type, int nIns, Vec_Int_t * vDatas, if ( fBooth ) Wlc_BlastBooth( pNew, Vec_IntArray(vArg0), Vec_IntArray(vArg1), Vec_IntSize(vArg0), Vec_IntSize(vArg1), vRes, fSigned, fCla, NULL, 0 ); else - Wlc_BlastMultiplier3( pNew, Vec_IntArray(vArg0), Vec_IntArray(vArg1), Vec_IntSize(vArg0), Vec_IntSize(vArg1), vRes, fSigned, fCla, NULL ); + Wlc_BlastMultiplier3( pNew, Vec_IntArray(vArg0), Vec_IntArray(vArg1), Vec_IntSize(vArg0), Vec_IntSize(vArg1), vRes, fSigned, fCla, NULL, 0 ); if ( nRange > Vec_IntSize(vRes) ) Vec_IntFillExtra( vRes, nRange, fSigned ? Vec_IntEntryLast(vRes) : 0 ); else From 0fc549d8b82cb4c685031f7e1e1da77c42c1cf81 Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Fri, 3 May 2024 05:24:02 +0000 Subject: [PATCH 2/4] Reverts downgrade to c++11 Signed-off-by: Ethan Mahintorabi --- CMakeLists.txt | 6 +++++- Makefile | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cee9bc72f..ce541b994 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,13 @@ -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.5.0) include(CMakeParseArguments) include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) +# Default c++ standard used unless otherwise specified in target_compile_features. +set(CMAKE_CXX_STANDARD 17 CACHE STRING "the C++ standard to use for this project") +set(CMAKE_CXX_STANDARD_REQUIRED ON) + function(addprefix var prefix) foreach( s ${ARGN} ) list(APPEND tmp "-I${s}") diff --git a/Makefile b/Makefile index 3c81251cf..aad66cb78 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ ifdef ABC_USE_LIBSTDCXX endif $(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS)) -CXXFLAGS += $(CFLAGS) -std=c++11 +CXXFLAGS += $(CFLAGS) SRC := GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags From 9ccb28ebc12e9379ae0c095b39b44dffe5d9aab0 Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Fri, 3 May 2024 20:11:04 +0000 Subject: [PATCH 3/4] Enables github actions on pull requests Signed-off-by: Ethan Mahintorabi --- .github/workflows/build-posix-cmake.yml | 6 +++++- .github/workflows/build-posix.yml | 6 +++++- .github/workflows/build-windows.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-posix-cmake.yml b/.github/workflows/build-posix-cmake.yml index def198107..5e101cd79 100644 --- a/.github/workflows/build-posix-cmake.yml +++ b/.github/workflows/build-posix-cmake.yml @@ -1,4 +1,8 @@ -on: [push] +name: Build Posix CMake + +on: + push: + pull_request: jobs: diff --git a/.github/workflows/build-posix.yml b/.github/workflows/build-posix.yml index aa97aca20..e26b67b89 100644 --- a/.github/workflows/build-posix.yml +++ b/.github/workflows/build-posix.yml @@ -1,4 +1,8 @@ -on: [push] +name: Build Posix + +on: + push: + pull_request: jobs: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 21cd1b26d..8e1ac37df 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,4 +1,8 @@ -on: [push] +name: Build Windows + +on: + push: + pull_request: jobs: From 8afc83874f12c6d7027002db0337ee871580e964 Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Sat, 4 May 2024 01:13:09 +0000 Subject: [PATCH 4/4] add c++17 back to makefile for makefile only runs Signed-off-by: Ethan Mahintorabi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aad66cb78..0cc979b75 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ ifdef ABC_USE_LIBSTDCXX endif $(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS)) -CXXFLAGS += $(CFLAGS) +CXXFLAGS += $(CFLAGS) -std=c++17 SRC := GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags