mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Add YosysHQ/abc as a submodule located in abc
This commit is contained in:
		
							parent
							
								
									77dff5a293
								
							
						
					
					
						commit
						09b9aa83c9
					
				
					 13 changed files with 31 additions and 52 deletions
				
			
		
							
								
								
									
										3
									
								
								.github/workflows/codeql.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/codeql.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -15,7 +15,8 @@ jobs: | ||||||
| 
 | 
 | ||||||
|     - name: Checkout repository |     - name: Checkout repository | ||||||
|       uses: actions/checkout@v4 |       uses: actions/checkout@v4 | ||||||
| 
 |       with: | ||||||
|  |        submodules: true | ||||||
|     - name: Initialize CodeQL |     - name: Initialize CodeQL | ||||||
|       uses: github/codeql-action/init@v3 |       uses: github/codeql-action/init@v3 | ||||||
|       with: |       with: | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.github/workflows/emcc.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/emcc.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -8,6 +8,8 @@ jobs: | ||||||
|     steps: |     steps: | ||||||
|       - uses: mymindstorm/setup-emsdk@v14 |       - uses: mymindstorm/setup-emsdk@v14 | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v4 | ||||||
|  |         with: | ||||||
|  |          submodules: true | ||||||
|       - name: Build |       - name: Build | ||||||
|         run: | |         run: | | ||||||
|           make config-emcc |           make config-emcc | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								.github/workflows/test-docs.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/test-docs.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -29,7 +29,8 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Checkout Yosys |       - name: Checkout Yosys | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v3 | ||||||
| 
 |         with: | ||||||
|  |          submodules: true | ||||||
|       - name: Build yosys |       - name: Build yosys | ||||||
|         shell: bash |         shell: bash | ||||||
|         run: | |         run: | | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								.github/workflows/test-linux.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/test-linux.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -80,7 +80,8 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Checkout Yosys |       - name: Checkout Yosys | ||||||
|         uses: actions/checkout@v4 |         uses: actions/checkout@v4 | ||||||
| 
 |         with: | ||||||
|  |          submodules: true | ||||||
|       - name: Get iverilog |       - name: Get iverilog | ||||||
|         shell: bash |         shell: bash | ||||||
|         run: | |         run: | | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								.github/workflows/test-macos.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/test-macos.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -36,7 +36,8 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Checkout Yosys |       - name: Checkout Yosys | ||||||
|         uses: actions/checkout@v4 |         uses: actions/checkout@v4 | ||||||
| 
 |         with: | ||||||
|  |          submodules: true | ||||||
|       - name: Get iverilog |       - name: Get iverilog | ||||||
|         shell: bash |         shell: bash | ||||||
|         run: | |         run: | | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.github/workflows/test-verific.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test-verific.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,7 +10,7 @@ jobs: | ||||||
|         uses: actions/checkout@v4 |         uses: actions/checkout@v4 | ||||||
|         with: |         with: | ||||||
|           persist-credentials: false |           persist-credentials: false | ||||||
| 
 |           submodules: true | ||||||
|       - name: Runtime environment |       - name: Runtime environment | ||||||
|         run: | |         run: | | ||||||
|           echo "procs=$(nproc)" >> $GITHUB_ENV |           echo "procs=$(nproc)" >> $GITHUB_ENV | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								.github/workflows/version.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/version.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,6 +13,7 @@ jobs: | ||||||
|         uses: actions/checkout@v4 |         uses: actions/checkout@v4 | ||||||
|         with: |         with: | ||||||
|           fetch-depth: 0 |           fetch-depth: 0 | ||||||
|  |           submodules: true | ||||||
|       - name: Take last commit |       - name: Take last commit | ||||||
|         id: log |         id: log | ||||||
|         run: echo "message=$(git log --no-merges -1 --oneline)" >> $GITHUB_OUTPUT |         run: echo "message=$(git log --no-merges -1 --oneline)" >> $GITHUB_OUTPUT | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								.github/workflows/vs.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/vs.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -7,17 +7,19 @@ jobs: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v4 | ||||||
|  |         with: | ||||||
|  |          submodules: true | ||||||
|       - name: Build |       - name: Build | ||||||
|         run: make vcxsrc YOSYS_VER=latest |         run: make vcxsrc YOSYS_VER=latest | ||||||
|       - uses: actions/upload-artifact@v4 |       - uses: actions/upload-artifact@v4 | ||||||
|         with: |         with: | ||||||
|           name: vcxsrc |           name: vcxsrc | ||||||
|           path: yosys-win32-vcxsrc-latest.zip |           path: yosys-win32-vcxsrc-latest.zip | ||||||
|    | 
 | ||||||
|   build: |   build: | ||||||
|     runs-on: windows-2019 |     runs-on: windows-2019 | ||||||
|     needs: yosys-vcxsrc |     needs: yosys-vcxsrc | ||||||
|     steps:   |     steps: | ||||||
|       - uses: actions/download-artifact@v4 |       - uses: actions/download-artifact@v4 | ||||||
|         with: |         with: | ||||||
|           name: vcxsrc |           name: vcxsrc | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.github/workflows/wasi.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/wasi.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -7,6 +7,8 @@ jobs: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v4 | ||||||
|  |         with: | ||||||
|  |          submodules: true | ||||||
|       - name: Build |       - name: Build | ||||||
|         run: | |         run: | | ||||||
|           WASI_SDK=wasi-sdk-19.0 |           WASI_SDK=wasi-sdk-19.0 | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -18,7 +18,6 @@ __pycache__ | ||||||
| /coverage.info | /coverage.info | ||||||
| /coverage_html | /coverage_html | ||||||
| /Makefile.conf | /Makefile.conf | ||||||
| /abc |  | ||||||
| /viz.js | /viz.js | ||||||
| /yosys | /yosys | ||||||
| /yosys.exe | /yosys.exe | ||||||
|  | @ -46,3 +45,4 @@ __pycache__ | ||||||
| /tests/unit/bintest/ | /tests/unit/bintest/ | ||||||
| /tests/unit/objtest/ | /tests/unit/objtest/ | ||||||
| /tests/ystests | /tests/ystests | ||||||
|  | /build | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								.gitmodules
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | [submodule "abc"] | ||||||
|  | 	path = abc | ||||||
|  | 	url = https://github.com/YosysHQ/abc | ||||||
							
								
								
									
										52
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										52
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -160,15 +160,6 @@ OBJS = kernel/version_$(GIT_REV).o | ||||||
| bumpversion: | bumpversion: | ||||||
| 	sed -i "/^YOSYS_VER := / s/+[0-9][0-9]*$$/+`git log --oneline c1ad377.. | wc -l`/;" Makefile | 	sed -i "/^YOSYS_VER := / s/+[0-9][0-9]*$$/+`git log --oneline c1ad377.. | wc -l`/;" Makefile | ||||||
| 
 | 
 | ||||||
| # set 'ABCREV = default' to use abc/ as it is
 |  | ||||||
| #
 |  | ||||||
| # Note: If you do ABC development, make sure that 'abc' in this directory
 |  | ||||||
| # is just a symlink to your actual ABC working directory, as 'make mrproper'
 |  | ||||||
| # will remove the 'abc' directory and you do not want to accidentally
 |  | ||||||
| # delete your work on ABC..
 |  | ||||||
| ABCREV = 237d813 |  | ||||||
| ABCPULL = 1 |  | ||||||
| ABCURL ?= https://github.com/YosysHQ/abc |  | ||||||
| ABCMKARGS = CC="$(CXX)" CXX="$(CXX)" ABC_USE_LIBSTDCXX=1 ABC_USE_NAMESPACE=abc VERBOSE=$(Q) | ABCMKARGS = CC="$(CXX)" CXX="$(CXX)" ABC_USE_LIBSTDCXX=1 ABC_USE_NAMESPACE=abc VERBOSE=$(Q) | ||||||
| 
 | 
 | ||||||
| # set ABCEXTERNAL = <abc-command> to use an external ABC instance
 | # set ABCEXTERNAL = <abc-command> to use an external ABC instance
 | ||||||
|  | @ -789,41 +780,17 @@ $(PROGRAM_PREFIX)yosys-config: misc/yosys-config.in | ||||||
| 			-e 's#@BINDIR@#$(strip $(BINDIR))#;' -e 's#@DATDIR@#$(strip $(DATDIR))#;' < $< > $(PROGRAM_PREFIX)yosys-config | 			-e 's#@BINDIR@#$(strip $(BINDIR))#;' -e 's#@DATDIR@#$(strip $(DATDIR))#;' < $< > $(PROGRAM_PREFIX)yosys-config | ||||||
| 	$(Q) chmod +x $(PROGRAM_PREFIX)yosys-config | 	$(Q) chmod +x $(PROGRAM_PREFIX)yosys-config | ||||||
| 
 | 
 | ||||||
| abc/abc-$(ABCREV)$(EXE) abc/libabc-$(ABCREV).a: | ABC_SOURCES := $(wildcard $(YOSYS_SRC)/abc/*) | ||||||
|  | 
 | ||||||
|  | abc/abc$(EXE) abc/libabc.a: $(ABC_SOURCES) | ||||||
| 	$(P) | 	$(P) | ||||||
| ifneq ($(ABCREV),default) | 	$(Q) mkdir -p abc && $(MAKE) -C $(PROGRAM_PREFIX)abc -f "$(realpath $(YOSYS_SRC)/abc/Makefile)" ABCSRC="$(realpath $(YOSYS_SRC)/abc/)" $(S) $(ABCMKARGS) $(if $(filter %.a,$@),PROG="abc",PROG="abc$(EXE)") MSG_PREFIX="$(eval P_OFFSET = 5)$(call P_SHOW)$(eval P_OFFSET = 10) ABC: " $(if $(filter %.a,$@),libabc.a) | ||||||
| 	$(Q) if test -d abc/.hg; then \
 |  | ||||||
| 		echo 'REEBE: NOP qverpgbel vf n ut jbexvat pbcl! Erzbir nop/ naq er-eha "znxr".' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; false; \
 |  | ||||||
| 	fi |  | ||||||
| 	$(Q) if test -d abc && test -d abc/.git && ! git -C abc diff-index --quiet HEAD; then \
 |  | ||||||
| 		echo 'REEBE: NOP pbagnvaf ybpny zbqvsvpngvbaf! Frg NOPERI=qrsnhyg va Lbflf Znxrsvyr!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; false; \
 |  | ||||||
| 	fi |  | ||||||
| 	$(Q) if test -d abc && ! test -d abc/.git && ! test "`cat abc/.gitcommit | cut -c1-7`" = "$(ABCREV)"; then \
 |  | ||||||
| 		echo 'REEBE: Qbjaybnqrq NOP irefvbaf qbrf abg zngpu! Qbjaybnq sebz:' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; echo $(ABCURL)/archive/$(ABCREV).tar.gz; false; \
 |  | ||||||
| 	fi |  | ||||||
| # set a variable so the test fails if git fails to run - when comparing outputs directly, empty string would match empty string
 |  | ||||||
| 	$(Q) if test -d abc && ! test -d abc/.git && test "`cat abc/.gitcommit | cut -c1-7`" = "$(ABCREV)"; then \
 |  | ||||||
| 		echo "Compiling local copy of ABC"; \
 |  | ||||||
| 	elif ! (cd abc 2> /dev/null && rev="`git rev-parse $(ABCREV)`" && test "`git rev-parse HEAD`" = "$$rev"); then \
 |  | ||||||
| 		test $(ABCPULL) -ne 0 || { echo 'REEBE: NOP abg hc gb qngr naq NOPCHYY frg gb 0 va Znxrsvyr!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; exit 1; }; \
 |  | ||||||
| 		echo "Pulling ABC from $(ABCURL):"; set -x; \
 |  | ||||||
| 		test -d abc || git clone $(ABCURL) abc; \
 |  | ||||||
| 		cd abc && $(MAKE) DEP= clean && git fetch $(ABCURL) && git checkout $(ABCREV); \
 |  | ||||||
| 	fi |  | ||||||
| endif |  | ||||||
| 	$(Q) rm -f abc/abc-[0-9a-f]* |  | ||||||
| 	$(Q) $(MAKE) -C abc $(S) $(ABCMKARGS) $(if $(filter %.a,$@),PROG="abc-$(ABCREV)",PROG="abc-$(ABCREV)$(EXE)") MSG_PREFIX="$(eval P_OFFSET = 5)$(call P_SHOW)$(eval P_OFFSET = 10) ABC: " $(if $(filter %.a,$@),libabc-$(ABCREV).a) |  | ||||||
| 
 | 
 | ||||||
| ifeq ($(ABCREV),default) | $(PROGRAM_PREFIX)yosys-abc$(EXE): abc/abc$(EXE) | ||||||
| .PHONY: abc/abc-$(ABCREV)$(EXE) | 	$(P) cp abc/abc$(EXE) $(PROGRAM_PREFIX)yosys-abc$(EXE) | ||||||
| .PHONY: abc/libabc-$(ABCREV).a |  | ||||||
| endif |  | ||||||
| 
 | 
 | ||||||
| $(PROGRAM_PREFIX)yosys-abc$(EXE): abc/abc-$(ABCREV)$(EXE) | $(PROGRAM_PREFIX)yosys-libabc.a: abc/libabc.a | ||||||
| 	$(P) cp abc/abc-$(ABCREV)$(EXE) $(PROGRAM_PREFIX)yosys-abc$(EXE) | 	$(P) cp abc/libabc.a $(PROGRAM_PREFIX)yosys-libabc.a | ||||||
| 
 |  | ||||||
| $(PROGRAM_PREFIX)yosys-libabc.a: abc/libabc-$(ABCREV).a |  | ||||||
| 	$(P) cp abc/libabc-$(ABCREV).a $(PROGRAM_PREFIX)yosys-libabc.a |  | ||||||
| 
 | 
 | ||||||
| ifneq ($(SEED),) | ifneq ($(SEED),) | ||||||
| SEEDOPT="-S $(SEED)" | SEEDOPT="-S $(SEED)" | ||||||
|  | @ -1141,9 +1108,6 @@ echo-yosys-ver: | ||||||
| echo-git-rev: | echo-git-rev: | ||||||
| 	@echo "$(GIT_REV)" | 	@echo "$(GIT_REV)" | ||||||
| 
 | 
 | ||||||
| echo-abc-rev: |  | ||||||
| 	@echo "$(ABCREV)" |  | ||||||
| 
 |  | ||||||
| echo-cxx: | echo-cxx: | ||||||
| 	@echo "$(CXX)" | 	@echo "$(CXX)" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								abc
									
										
									
									
									
										Submodule
									
								
							
							
						
						
									
										1
									
								
								abc
									
										
									
									
									
										Submodule
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | Subproject commit 237d81397fcc85dd3894bf1a449d2955cd3df02d | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue