mirror of
https://github.com/ehw-fit/ariths-gen.git
synced 2025-04-08 08:12:11 +01:00
Merge branch 'main' into devel
This commit is contained in:
commit
283f9c79f5
72
.github/workflows/codeql-analysis.yml
vendored
Normal file
72
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '44 5 * * 5'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'python' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
15
README.md
15
README.md
@ -1,6 +1,7 @@
|
||||
# ArithsGen – tool for arithmetic circuits generation
|
||||
[](https://www.python.org/)
|
||||
[](https://ehw-fit.github.io/ariths-gen)
|
||||
[](https://arxiv.org/abs/2203.04649)
|
||||
|
||||
|
||||
## Description
|
||||
@ -11,6 +12,20 @@ In contrast to standard HDL languages Python supports
|
||||
* Advanced language construction (better configuration, inheritance, etc.)
|
||||
* Support of various PDKs (for using library cells as half-adders and full-adders)
|
||||
|
||||
## Reference
|
||||
When you use this tool in your work/research, please cite the following article: KLHUFEK Jan and MRAZEK Vojtech. ArithsGen: Arithmetics Circuit Generator for HW Accelerators. In: 2022 25th International Symposium on Design and Diagnostics of Electronic Circuits and Systems (DDECS '22). Prague, 2022, p. 4.
|
||||
|
||||
```bibtex
|
||||
@INPROCEEDINGS{klhufek:DDECS22,
|
||||
author = "Jan Klhufek and Vojtech Mrazek",
|
||||
title = "ArithsGen: Arithmetics Circuit Generator for HW Accelerators",
|
||||
pages = 4,
|
||||
booktitle = "2022 25th International Symposium on Design and Diagnostics of Electronic Circuits and Systems (DDECS '22)",
|
||||
year = 2022,
|
||||
location = "Prague, CZ"
|
||||
}
|
||||
```
|
||||
|
||||
## Prebuild circuits
|
||||
To enable fast work with the circuits, we published pre-build arithmetic circuits in various formats in [generated_circuits](generated_circuits) folder and as a [Release](https://github.com/ehw-fit/ariths-gen/releases).
|
||||
|
||||
|
@ -45,6 +45,7 @@ class Wire():
|
||||
# then the wire value is obtained from bitwise shifting the required wire from the parent bus ('parent_bus.prefix' is the same value as 'self.prefix')
|
||||
elif self.is_buswire():
|
||||
return f"((({self.prefix} >> {self.index}) & 0x01) << {offset})\n"
|
||||
|
||||
else:
|
||||
return f"((({self.name} >> 0) & 0x01) << {offset})\n"
|
||||
|
||||
|
@ -45,7 +45,6 @@ from ariths_gen.one_bit_circuits.logic_gates import (
|
||||
XnorGate,
|
||||
NotGate
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user