Skip to content

Commit f520d82

Browse files
authored
Merge pull request #129 from siliconcompiler/lint
make lint install and add codespell
2 parents a4500d3 + 4d9bde0 commit f520d82

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
# Manual Dispatch
1111
workflow_dispatch:
1212

13+
concurrency:
14+
group: lambdalib-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
lint_python:
1519
name: Lint Python Code
@@ -23,9 +27,24 @@ jobs:
2327
. .venv/bin/activate
2428
2529
pip install --upgrade pip
26-
pip install .[dev]
30+
pip install .[lint]
2731
flake8 --statistics .
2832
33+
check_spelling:
34+
name: Check code spelling
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Check out Git repository
38+
uses: actions/checkout@v6
39+
- name: Check spelling with codespell
40+
run: |
41+
python3 -m venv .venv
42+
. .venv/bin/activate
43+
44+
pip install --upgrade pip
45+
pip install .[lint]
46+
codespell .
47+
2948
python_ci:
3049
name: Run Python Only
3150
runs-on: ubuntu-latest
@@ -38,13 +57,13 @@ jobs:
3857
. .venv/bin/activate
3958
4059
pip install --upgrade pip
41-
pip install .[dev]
60+
pip install .[test]
4261
4362
# change running directory
4463
mkdir testrun
4564
cd testrun
4665
47-
pytest $GITHUB_WORKSPACE -m "not eda"
66+
pytest $GITHUB_WORKSPACE -n logical -m "not eda"
4867
4968
lint_verilog:
5069
name: Lint Verilog Code
@@ -89,7 +108,7 @@ jobs:
89108
. .venv/bin/activate
90109
91110
pip install --upgrade pip
92-
pip install -e .[dev]
111+
pip install -e .[test]
93112
94113
# change running directory
95114
mkdir testrun

lambdalib/analoglib/la_pll/rtl/la_pll.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* NOTE: The generic interface was derived by reviewing a number of
77
* publicly open source PLLs and FPGA IP datasheets and via llm
8-
* promting.
8+
* prompting.
99
*
1010
* This is a synthesizable zeroth order PLL model that only
1111
* supports one operating mode: clkout=clkref.
@@ -19,7 +19,7 @@
1919
module la_pll #(parameter PROP = "", // cell property
2020
parameter NIN = 1, // number of input reference clocks
2121
parameter NOUT = 1, // number of output clocks
22-
parameter DIVINW = 8, // iunpyt divider width
22+
parameter DIVINW = 8, // input divider width
2323
parameter DIVFBW = 8, // feedback divider width
2424
parameter DIVOUTW = 8, // output divider width
2525
parameter PHASEW = 8, // phase shift adjust width
@@ -38,7 +38,7 @@ module la_pll #(parameter PROP = "", // cell property
3838
// standard controls
3939
input reset, // active high async reset
4040
input en, // pll enable
41-
input bypass, // pll bypasses
41+
input bypass, // pll bypass
4242
input [NIN-1:0] clksel, // one hot clock selector
4343
input [DIVINW-1:0] divin, // reference divider
4444
input [DIVFBW-1:0] divfb, // feedback divider

lambdalib/fpgalib/la_clb4p0/rtl/la_clb4p0.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ module la_clb4p0
8181
if (N>1)
8282
assign fbmux[i][j] = fb[i][cfgfb[(i*K+j)*$clog2(N)+:$clog2(N)]];
8383
else
84-
assign fbmux[i][j] = fb[i][0]; //TODO: suport N=1
84+
assign fbmux[i][j] = fb[i][0]; //TODO: support N=1
8585
end
8686

8787
// select between feedback and primary inputs

pyproject.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@ version = {attr = "lambdalib.__version__"}
2828

2929
[project.optional-dependencies]
3030
# Dev dependencies.
31-
dev = [
32-
"flake8 == 7.3.0",
31+
test = [
3332
"pytest == 8.4.2",
3433
"pytest-xdist==3.8.0",
3534
"pytest-timeout == 2.4.0",
3635
"cocotb == 2.0.1",
3736
"cocotb-bus == 0.3.0"
3837
]
3938

39+
lint = [
40+
"flake8 == 7.3.0",
41+
"codespell == 2.4.1"
42+
]
43+
4044
[tool.pytest.ini_options]
4145
markers = [
4246
"eda: this test requires EDA tools installed to run.",
@@ -48,3 +52,8 @@ testpaths = [
4852
"tests"
4953
]
5054
timeout = "60"
55+
56+
[tool.codespell]
57+
count = true
58+
quiet-level = 3
59+
ignore-words-list = 'inout,inouts,nin,te,dout'

0 commit comments

Comments
 (0)