Compare commits
	
		
			No commits in common. "d0aa86e335d1886ddcccc5391398706a6b48f6f9" and "f65fc1d61624f5e135497f5fb2dd3079018ff16f" have entirely different histories.
		
	
	
		
			d0aa86e335
			...
			f65fc1d616
		
	
		
					 9 changed files with 0 additions and 154 deletions
				
			
		|  | @ -1,73 +0,0 @@ | ||||||
| # SPDX-License-Identifier: LGPL-3.0-or-later |  | ||||||
| # See Notices.txt for copyright information |  | ||||||
| on: [push, pull_request] |  | ||||||
| 
 |  | ||||||
| jobs: |  | ||||||
|   test: |  | ||||||
|     runs-on: debian-12 |  | ||||||
|     steps: |  | ||||||
|       - uses: https://code.forgejo.org/actions/checkout@v3 |  | ||||||
|         with: |  | ||||||
|           fetch-depth: 0 |  | ||||||
|       - run: | |  | ||||||
|           scripts/check-copyright.sh |  | ||||||
|       - run: | |  | ||||||
|           apt-get update -qq |  | ||||||
|           apt-get install -qq \ |  | ||||||
|             bison \ |  | ||||||
|             build-essential \ |  | ||||||
|             ccache \ |  | ||||||
|             clang \ |  | ||||||
|             cvc5 \ |  | ||||||
|             flex \ |  | ||||||
|             gawk \ |  | ||||||
|             git \ |  | ||||||
|             libboost-filesystem-dev \ |  | ||||||
|             libboost-python-dev \ |  | ||||||
|             libboost-system-dev \ |  | ||||||
|             libffi-dev \ |  | ||||||
|             libreadline-dev \ |  | ||||||
|             lld \ |  | ||||||
|             pkg-config \ |  | ||||||
|             python3 \ |  | ||||||
|             python3-click \ |  | ||||||
|             tcl-dev \ |  | ||||||
|             z3 \ |  | ||||||
|             zlib1g-dev \ |  | ||||||
|       - name: Cache ccache dir |  | ||||||
|         uses: https://code.forgejo.org/actions/cache@v3 |  | ||||||
|         with: |  | ||||||
|           path: .ccache |  | ||||||
|           key: ${{ runner.os }}-${{ github.sha }} |  | ||||||
|           restore-keys: | |  | ||||||
|             ${{ runner.os }}- |  | ||||||
|       - name: Setup ccache |  | ||||||
|         run: | |  | ||||||
|           ccache --set-config=cache_dir="${{ github.workspace }}/.ccache" |  | ||||||
|           ccache --set-config=compression=true |  | ||||||
|           ccache --set-config=compression_level=6 |  | ||||||
|           ccache -M 4G |  | ||||||
|           ccache -z |  | ||||||
|           export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" |  | ||||||
|           echo "$PATH" >> "$GITHUB_PATH" |  | ||||||
|       - run: | |  | ||||||
|           curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.80.1 |  | ||||||
|           source "$HOME/.cargo/env" |  | ||||||
|           echo "$PATH" >> "$GITHUB_PATH" |  | ||||||
|       - run: | |  | ||||||
|           git clone --depth=1 --branch=yosys-0.45 https://github.com/YosysHQ/sby.git |  | ||||||
|           make -C sby install |  | ||||||
|       - run: | |  | ||||||
|           git clone --depth=1 --recursive --branch=0.45 https://github.com/YosysHQ/yosys.git |  | ||||||
|           make -C yosys -j2 |  | ||||||
|           make -C yosys install |  | ||||||
|       - run: | |  | ||||||
|           wget -O firrtl.tar.gz https://github.com/llvm/circt/releases/download/firtool-1.86.0/firrtl-bin-linux-x64.tar.gz |  | ||||||
|           sha256sum -c - <<<'bf6f4ab18ae76f135c944efbd81e25391c31c1bd0617c58ab0592640abefee14  firrtl.tar.gz' |  | ||||||
|           tar -xvaf firrtl.tar.gz |  | ||||||
|           export PATH="$(realpath firtool-1.86.0/bin):$PATH" |  | ||||||
|           echo "$PATH" >> "$GITHUB_PATH" |  | ||||||
|       - uses: https://github.com/Swatinem/rust-cache@v2 |  | ||||||
|         with: |  | ||||||
|           save-if: ${{ github.ref == 'refs/heads/master' }} |  | ||||||
|       - run: cargo test |  | ||||||
							
								
								
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1,3 +1 @@ | ||||||
| # SPDX-License-Identifier: LGPL-3.0-or-later |  | ||||||
| # See Notices.txt for copyright information |  | ||||||
| /target | /target | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| // SPDX-License-Identifier: LGPL-3.0-or-later
 |  | ||||||
| // See Notices.txt for copyright information
 |  | ||||||
| use crate::instruction::{PRegNum, UnitKind, UnitNum}; | use crate::instruction::{PRegNum, UnitKind, UnitNum}; | ||||||
| use fayalite::prelude::*; | use fayalite::prelude::*; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| // SPDX-License-Identifier: LGPL-3.0-or-later
 |  | ||||||
| // See Notices.txt for copyright information
 |  | ||||||
| use crate::config::CpuConfig; | use crate::config::CpuConfig; | ||||||
| use fayalite::prelude::*; | use fayalite::prelude::*; | ||||||
| use std::marker::PhantomData; | use std::marker::PhantomData; | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| // SPDX-License-Identifier: LGPL-3.0-or-later
 |  | ||||||
| // See Notices.txt for copyright information
 |  | ||||||
| use crate::{instruction::MOpRegNum, util::range_u32_nth_or_panic}; | use crate::{instruction::MOpRegNum, util::range_u32_nth_or_panic}; | ||||||
| use fayalite::prelude::*; | use fayalite::prelude::*; | ||||||
| use std::ops::Range; | use std::ops::Range; | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| // SPDX-License-Identifier: LGPL-3.0-or-later
 |  | ||||||
| // See Notices.txt for copyright information
 |  | ||||||
| pub mod config; | pub mod config; | ||||||
| pub mod instruction; | pub mod instruction; | ||||||
| pub mod register; | pub mod register; | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| // SPDX-License-Identifier: LGPL-3.0-or-later
 |  | ||||||
| // See Notices.txt for copyright information
 |  | ||||||
| use fayalite::prelude::*; | use fayalite::prelude::*; | ||||||
| 
 | 
 | ||||||
| #[hdl] | #[hdl] | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| // SPDX-License-Identifier: LGPL-3.0-or-later
 |  | ||||||
| // See Notices.txt for copyright information
 |  | ||||||
| pub(crate) const fn range_u32_len(range: &std::ops::Range<u32>) -> usize { | pub(crate) const fn range_u32_len(range: &std::ops::Range<u32>) -> usize { | ||||||
|     let retval = range.end.saturating_sub(range.start); |     let retval = range.end.saturating_sub(range.start); | ||||||
|     assert!(retval as usize as u32 != retval, "len overflowed"); |     assert!(retval as usize as u32 != retval, "len overflowed"); | ||||||
|  |  | ||||||
|  | @ -1,67 +0,0 @@ | ||||||
| #!/bin/bash |  | ||||||
| # SPDX-License-Identifier: LGPL-3.0-or-later |  | ||||||
| # See Notices.txt for copyright information |  | ||||||
| set -e |  | ||||||
| 
 |  | ||||||
| function fail() |  | ||||||
| { |  | ||||||
|     local error="$1" |  | ||||||
|     echo "error: $error" >&2 |  | ||||||
|     exit 1 |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function fail_file() |  | ||||||
| { |  | ||||||
|     local file="$1" line="$2" error="$3" |  | ||||||
|     fail "$file:$((line + 1)): $error" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function check_file() |  | ||||||
| { |  | ||||||
|     local file="$1" regexes=("${@:2}") |  | ||||||
|     local lines |  | ||||||
|     mapfile -t lines < "$file" |  | ||||||
|     local line |  | ||||||
|     for line in "${!regexes[@]}"; do |  | ||||||
|         eval '[[ "${lines[i]}" =~ '"${regexes[i]}"' ]]' || |  | ||||||
|             fail_file "$file" "$line" "doesn't match regex: ${regexes[i]}" |  | ||||||
|     done |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| POUND_HEADER=('^"# SPDX-License-Identifier: LGPL-3.0-or-later"$' '^"# See Notices.txt for copyright information"$') |  | ||||||
| SLASH_HEADER=('^"// SPDX-License-Identifier: LGPL-3.0-or-later"$' '^"// See Notices.txt for copyright information"$') |  | ||||||
| MD_HEADER=('^"<!--"$' '^"SPDX-License-Identifier: LGPL-3.0-or-later"$' '^"See Notices.txt for copyright information"$') |  | ||||||
| 
 |  | ||||||
| function main() |  | ||||||
| { |  | ||||||
|     local IFS=$'\n' |  | ||||||
|     [[ -z "$(git status --porcelain)" ]] || fail "git repo is dirty" |  | ||||||
|     local file |  | ||||||
|     for file in $(git ls-tree --name-only --full-tree -r HEAD); do |  | ||||||
|         case "/$file" in |  | ||||||
|         /Cargo.lock) |  | ||||||
|             # generated file |  | ||||||
|             ;; |  | ||||||
|         */LICENSE.md|*/Notices.txt) |  | ||||||
|             # copyright file |  | ||||||
|             ;; |  | ||||||
|         /.forgejo/workflows/*.yml|*/.gitignore|*.toml) |  | ||||||
|             check_file "$file" "${POUND_HEADER[@]}" |  | ||||||
|             ;; |  | ||||||
|         *.md) |  | ||||||
|             check_file "$file" "${MD_HEADER[@]}" |  | ||||||
|             ;; |  | ||||||
|         *.sh) |  | ||||||
|             check_file "$file" '^'\''#!'\' "${POUND_HEADER[@]}" |  | ||||||
|             ;; |  | ||||||
|         *.rs) |  | ||||||
|             check_file "$file" "${SLASH_HEADER[@]}" |  | ||||||
|             ;; |  | ||||||
|         *) |  | ||||||
|             fail_file "$file" 0 "unimplemented file kind -- you need to add it to $0" |  | ||||||
|             ;; |  | ||||||
|         esac |  | ||||||
|     done |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| main |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue