├── docs ├── tests │ └── README.md └── README.md ├── examples ├── sram │ └── rtl │ │ └── sram.v └── chip │ └── chip.py ├── lambdalib ├── padring │ ├── __init__.py │ ├── la_ioalias │ │ ├── la_ioalias.py │ │ └── rtl │ │ │ └── la_ioalias.v │ ├── la_ioshort │ │ ├── la_ioshort.py │ │ └── rtl │ │ │ └── la_ioshort.v │ └── la_padring │ │ └── la_padring.py ├── analoglib │ ├── __init__.py │ ├── la_pll │ │ └── la_pll.py │ └── la_ring │ │ └── la_ring.py ├── stdlib │ ├── la_buf │ │ ├── la_buf.py │ │ └── rtl │ │ │ └── la_buf.v │ ├── la_inv │ │ ├── la_inv.py │ │ └── rtl │ │ │ └── la_inv.v │ ├── la_or2 │ │ ├── la_or2.py │ │ └── rtl │ │ │ └── la_or2.v │ ├── la_or3 │ │ ├── la_or3.py │ │ └── rtl │ │ │ └── la_or3.v │ ├── la_or4 │ │ ├── la_or4.py │ │ └── rtl │ │ │ └── la_or4.v │ ├── la_and2 │ │ ├── la_and2.py │ │ └── rtl │ │ │ └── la_and2.v │ ├── la_and3 │ │ ├── la_and3.py │ │ └── rtl │ │ │ └── la_and3.v │ ├── la_and4 │ │ ├── la_and4.py │ │ └── rtl │ │ │ └── la_and4.v │ ├── la_ao21 │ │ ├── la_ao21.py │ │ └── rtl │ │ │ └── la_ao21.v │ ├── la_ao22 │ │ ├── la_ao22.py │ │ └── rtl │ │ │ └── la_ao22.v │ ├── la_ao31 │ │ ├── la_ao31.py │ │ └── rtl │ │ │ └── la_ao31.v │ ├── la_ao32 │ │ ├── la_ao32.py │ │ └── rtl │ │ │ └── la_ao32.v │ ├── la_ao33 │ │ ├── la_ao33.py │ │ └── rtl │ │ │ └── la_ao33.v │ ├── la_dffq │ │ ├── la_dffq.py │ │ └── rtl │ │ │ └── la_dffq.v │ ├── la_latq │ │ ├── la_latq.py │ │ └── rtl │ │ │ └── la_latq.v │ ├── la_mux2 │ │ ├── la_mux2.py │ │ └── rtl │ │ │ └── la_mux2.v │ ├── la_mux3 │ │ ├── la_mux3.py │ │ └── rtl │ │ │ └── la_mux3.v │ ├── la_mux4 │ │ ├── la_mux4.py │ │ └── rtl │ │ │ └── la_mux4.v │ ├── la_nor2 │ │ ├── la_nor2.py │ │ └── rtl │ │ │ └── la_nor2.v │ ├── la_nor3 │ │ ├── la_nor3.py │ │ └── rtl │ │ │ └── la_nor3.v │ ├── la_nor4 │ │ ├── la_nor4.py │ │ └── rtl │ │ │ └── la_nor4.v │ ├── la_oa21 │ │ ├── la_oa21.py │ │ └── rtl │ │ │ └── la_oa21.v │ ├── la_oa22 │ │ ├── la_oa22.py │ │ └── rtl │ │ │ └── la_oa22.v │ ├── la_oa31 │ │ ├── la_oa31.py │ │ └── rtl │ │ │ └── la_oa31.v │ ├── la_oa32 │ │ ├── la_oa32.py │ │ └── rtl │ │ │ └── la_oa32.v │ ├── la_oa33 │ │ ├── la_oa33.py │ │ └── rtl │ │ │ └── la_oa33.v │ ├── la_xor2 │ │ ├── la_xor2.py │ │ └── rtl │ │ │ └── la_xor2.v │ ├── la_xor3 │ │ ├── la_xor3.py │ │ └── rtl │ │ │ └── la_xor3.v │ ├── la_xor4 │ │ ├── la_xor4.py │ │ └── rtl │ │ │ └── la_xor4.v │ ├── la_ao211 │ │ ├── la_ao211.py │ │ └── rtl │ │ │ └── la_ao211.v │ ├── la_ao221 │ │ ├── la_ao221.py │ │ └── rtl │ │ │ └── la_ao221.v │ ├── la_ao222 │ │ ├── la_ao222.py │ │ └── rtl │ │ │ └── la_ao222.v │ ├── la_ao311 │ │ ├── la_ao311.py │ │ └── rtl │ │ │ └── la_ao311.v │ ├── la_aoi21 │ │ ├── la_aoi21.py │ │ └── rtl │ │ │ └── la_aoi21.v │ ├── la_aoi22 │ │ ├── la_aoi22.py │ │ └── rtl │ │ │ └── la_aoi22.v │ ├── la_aoi31 │ │ ├── la_aoi31.py │ │ └── rtl │ │ │ └── la_aoi31.v │ ├── la_aoi32 │ │ ├── la_aoi32.py │ │ └── rtl │ │ │ └── la_aoi32.v │ ├── la_aoi33 │ │ ├── la_aoi33.py │ │ └── rtl │ │ │ └── la_aoi33.v │ ├── la_csa32 │ │ ├── la_csa32.py │ │ └── rtl │ │ │ └── la_csa32.v │ ├── la_csa42 │ │ ├── la_csa42.py │ │ └── rtl │ │ │ └── la_csa42.v │ ├── la_delay │ │ ├── la_delay.py │ │ └── rtl │ │ │ └── la_delay.v │ ├── la_dffnq │ │ ├── la_dffnq.py │ │ └── rtl │ │ │ └── la_dffnq.v │ ├── la_dffqn │ │ ├── la_dffqn.py │ │ └── rtl │ │ │ └── la_dffqn.v │ ├── la_dffrq │ │ ├── la_dffrq.py │ │ └── rtl │ │ │ └── la_dffrq.v │ ├── la_dffsq │ │ ├── la_dffsq.py │ │ └── rtl │ │ │ └── la_dffsq.v │ ├── la_dmux2 │ │ ├── la_dmux2.py │ │ └── rtl │ │ │ └── la_dmux2.v │ ├── la_dmux3 │ │ ├── la_dmux3.py │ │ └── rtl │ │ │ └── la_dmux3.v │ ├── la_dmux4 │ │ ├── la_dmux4.py │ │ └── rtl │ │ │ └── la_dmux4.v │ ├── la_dmux5 │ │ ├── la_dmux5.py │ │ └── rtl │ │ │ └── la_dmux5.v │ ├── la_dmux6 │ │ ├── la_dmux6.py │ │ └── rtl │ │ │ └── la_dmux6.v │ ├── la_dmux7 │ │ ├── la_dmux7.py │ │ └── rtl │ │ │ └── la_dmux7.v │ ├── la_dmux8 │ │ ├── la_dmux8.py │ │ └── rtl │ │ │ └── la_dmux8.v │ ├── la_latnq │ │ ├── la_latnq.py │ │ └── rtl │ │ │ └── la_latnq.v │ ├── la_muxi2 │ │ ├── la_muxi2.py │ │ └── rtl │ │ │ └── la_muxi2.v │ ├── la_muxi3 │ │ ├── la_muxi3.py │ │ └── rtl │ │ │ └── la_muxi3.v │ ├── la_muxi4 │ │ ├── la_muxi4.py │ │ └── rtl │ │ │ └── la_muxi4.v │ ├── la_nand2 │ │ ├── la_nand2.py │ │ └── rtl │ │ │ └── la_nand2.v │ ├── la_nand3 │ │ ├── la_nand3.py │ │ └── rtl │ │ │ └── la_nand3.v │ ├── la_nand4 │ │ ├── la_nand4.py │ │ └── rtl │ │ │ └── la_nand4.v │ ├── la_oa211 │ │ ├── la_oa211.py │ │ └── rtl │ │ │ └── la_oa211.v │ ├── la_oa221 │ │ ├── la_oa221.py │ │ └── rtl │ │ │ └── la_oa221.v │ ├── la_oa222 │ │ ├── la_oa222.py │ │ └── rtl │ │ │ └── la_oa222.v │ ├── la_oa311 │ │ ├── la_oa311.py │ │ └── rtl │ │ │ └── la_oa311.v │ ├── la_oai21 │ │ ├── la_oai21.py │ │ └── rtl │ │ │ └── la_oai21.v │ ├── la_oai22 │ │ ├── la_oai22.py │ │ └── rtl │ │ │ └── la_oai22.v │ ├── la_oai31 │ │ ├── la_oai31.py │ │ └── rtl │ │ │ └── la_oai31.v │ ├── la_oai32 │ │ ├── la_oai32.py │ │ └── rtl │ │ │ └── la_oai32.v │ ├── la_oai33 │ │ ├── la_oai33.py │ │ └── rtl │ │ │ └── la_oai33.v │ ├── la_sdffq │ │ ├── la_sdffq.py │ │ └── rtl │ │ │ └── la_sdffq.v │ ├── la_tiehi │ │ ├── la_tiehi.py │ │ └── rtl │ │ │ └── la_tiehi.v │ ├── la_tielo │ │ ├── la_tielo.py │ │ └── rtl │ │ │ └── la_tielo.v │ ├── la_xnor2 │ │ ├── la_xnor2.py │ │ └── rtl │ │ │ └── la_xnor2.v │ ├── la_xnor3 │ │ ├── la_xnor3.py │ │ └── rtl │ │ │ └── la_xnor3.v │ ├── la_xnor4 │ │ ├── la_xnor4.py │ │ └── rtl │ │ │ └── la_xnor4.v │ ├── la_aoi211 │ │ ├── la_aoi211.py │ │ └── rtl │ │ │ └── la_aoi211.v │ ├── la_aoi221 │ │ ├── la_aoi221.py │ │ └── rtl │ │ │ └── la_aoi221.v │ ├── la_aoi222 │ │ ├── la_aoi222.py │ │ └── rtl │ │ │ └── la_aoi222.v │ ├── la_aoi311 │ │ ├── la_aoi311.py │ │ └── rtl │ │ │ └── la_aoi311.v │ ├── la_clkbuf │ │ ├── la_clkbuf.py │ │ └── rtl │ │ │ └── la_clkbuf.v │ ├── la_clkinv │ │ ├── la_clkinv.py │ │ └── rtl │ │ │ └── la_clkinv.v │ ├── la_clkor2 │ │ ├── la_clkor2.py │ │ └── rtl │ │ │ └── la_clkor2.v │ ├── la_clkor4 │ │ ├── la_clkor4.py │ │ └── rtl │ │ │ └── la_clkor4.v │ ├── la_dffrqn │ │ ├── la_dffrqn.py │ │ └── rtl │ │ │ └── la_dffrqn.v │ ├── la_dffsqn │ │ ├── la_dffsqn.py │ │ └── rtl │ │ │ └── la_dffsqn.v │ ├── la_oai221 │ │ ├── la_oai221.py │ │ └── rtl │ │ │ └── la_oai221.v │ ├── la_oai222 │ │ ├── la_oai222.py │ │ └── rtl │ │ │ └── la_oai222.v │ ├── la_oai311 │ │ ├── la_oai311.py │ │ └── rtl │ │ │ └── la_oai311.v │ ├── la_sdffqn │ │ ├── la_sdffqn.py │ │ └── rtl │ │ │ └── la_sdffqn.v │ ├── la_sdffrq │ │ ├── la_sdffrq.py │ │ └── rtl │ │ │ └── la_sdffrq.v │ ├── la_sdffsq │ │ ├── la_sdffsq.py │ │ └── rtl │ │ │ └── la_sdffsq.v │ ├── la_clkand2 │ │ ├── la_clkand2.py │ │ └── rtl │ │ │ └── la_clkand2.v │ ├── la_clknor2 │ │ ├── la_clknor2.py │ │ └── rtl │ │ │ └── la_clknor2.v │ ├── la_clkxor2 │ │ ├── la_clkxor2.py │ │ └── rtl │ │ │ └── la_clkxor2.v │ ├── la_sdffrqn │ │ ├── la_sdffrqn.py │ │ └── rtl │ │ │ └── la_sdffrqn.v │ ├── la_sdffsqn │ │ ├── la_sdffsqn.py │ │ └── rtl │ │ │ └── la_sdffsqn.v │ └── la_clknand2 │ │ ├── la_clknand2.py │ │ └── rtl │ │ └── la_clknand2.v ├── auxlib │ ├── la_ibuf │ │ ├── la_ibuf.py │ │ └── rtl │ │ │ └── la_ibuf.v │ ├── la_iddr │ │ ├── la_iddr.py │ │ └── rtl │ │ │ └── la_iddr.v │ ├── la_obuf │ │ ├── la_obuf.py │ │ └── rtl │ │ │ └── la_obuf.v │ ├── la_oddr │ │ ├── la_oddr.py │ │ └── rtl │ │ │ └── la_oddr.v │ ├── la_tbuf │ │ ├── la_tbuf.py │ │ └── rtl │ │ │ └── la_tbuf.v │ ├── la_decap │ │ ├── la_decap.py │ │ └── rtl │ │ │ └── la_decap.v │ ├── la_dsync │ │ ├── la_dsync.py │ │ └── rtl │ │ │ └── la_dsync.v │ ├── la_idiff │ │ ├── la_idiff.py │ │ └── rtl │ │ │ └── la_idiff.v │ ├── la_isohi │ │ ├── la_isohi.py │ │ └── rtl │ │ │ └── la_isohi.v │ ├── la_isolo │ │ ├── la_isolo.py │ │ └── rtl │ │ │ └── la_isolo.v │ ├── la_odiff │ │ ├── la_odiff.py │ │ └── rtl │ │ │ └── la_odiff.v │ ├── la_rsync │ │ ├── la_rsync.py │ │ └── rtl │ │ │ └── la_rsync.v │ ├── la_drsync │ │ ├── la_drsync.py │ │ └── rtl │ │ │ └── la_drsync.v │ ├── la_footer │ │ ├── la_footer.py │ │ └── rtl │ │ │ └── la_footer.v │ ├── la_header │ │ ├── la_header.py │ │ └── rtl │ │ │ └── la_header.v │ ├── la_keeper │ │ ├── la_keeper.py │ │ └── rtl │ │ │ └── la_keeper.v │ ├── la_pwrbuf │ │ ├── la_pwrbuf.py │ │ └── rtl │ │ │ └── la_pwrbuf.v │ ├── la_antenna │ │ ├── la_antenna.py │ │ └── rtl │ │ │ └── la_antenna.v │ ├── la_clkicgor │ │ ├── la_clkicgor.py │ │ └── rtl │ │ │ └── la_clkicgor.v │ ├── la_clkicgand │ │ ├── la_clkicgand.py │ │ └── rtl │ │ │ └── la_clkicgand.v │ ├── la_clkmux2 │ │ └── la_clkmux2.py │ └── la_clkmux4 │ │ └── la_clkmux4.py ├── veclib │ ├── la_vbuf │ │ ├── la_vbuf.py │ │ └── rtl │ │ │ └── la_vbuf.v │ ├── la_vinv │ │ ├── la_vinv.py │ │ └── rtl │ │ │ └── la_vinv.v │ ├── la_vmux │ │ ├── la_vmux.py │ │ └── rtl │ │ │ └── la_vmux.v │ ├── la_vdffq │ │ ├── la_vdffq.py │ │ └── rtl │ │ │ └── la_vdffq.v │ ├── la_vlatq │ │ ├── la_vlatq.py │ │ └── rtl │ │ │ └── la_vlatq.v │ ├── la_vmux2 │ │ ├── la_vmux2.py │ │ └── rtl │ │ │ └── la_vmux2.v │ ├── la_vmux3 │ │ ├── la_vmux3.py │ │ └── rtl │ │ │ └── la_vmux3.v │ ├── la_vmux4 │ │ ├── la_vmux4.py │ │ └── rtl │ │ │ └── la_vmux4.v │ ├── la_vmux5 │ │ ├── la_vmux5.py │ │ └── rtl │ │ │ └── la_vmux5.v │ ├── la_vmux6 │ │ ├── la_vmux6.py │ │ └── rtl │ │ │ └── la_vmux6.v │ ├── la_vmux7 │ │ └── la_vmux7.py │ ├── la_vmux8 │ │ └── la_vmux8.py │ ├── la_vdffnq │ │ ├── la_vdffnq.py │ │ └── rtl │ │ │ └── la_vdffnq.v │ ├── la_vlatnq │ │ ├── la_vlatnq.py │ │ └── rtl │ │ │ └── la_vlatnq.v │ └── la_vmux2b │ │ ├── la_vmux2b.py │ │ └── rtl │ │ └── la_vmux2b.v ├── iolib │ ├── la_iocut │ │ ├── la_iocut.py │ │ └── rtl │ │ │ └── la_iocut.v │ ├── la_iopoc │ │ ├── la_iopoc.py │ │ └── rtl │ │ │ └── la_iopoc.v │ ├── la_iovdd │ │ ├── la_iovdd.py │ │ └── rtl │ │ │ └── la_iovdd.v │ ├── la_iovss │ │ ├── la_iovss.py │ │ └── rtl │ │ │ └── la_iovss.v │ ├── la_iovdda │ │ ├── la_iovdda.py │ │ └── rtl │ │ │ └── la_iovdda.v │ ├── la_iovssa │ │ ├── la_iovssa.py │ │ └── rtl │ │ │ └── la_iovssa.v │ ├── la_ioxtal │ │ ├── la_ioxtal.py │ │ └── rtl │ │ │ └── la_ioxtal.v │ ├── la_iobidir │ │ └── la_iobidir.py │ ├── la_ioclamp │ │ ├── la_ioclamp.py │ │ └── rtl │ │ │ └── la_ioclamp.v │ ├── la_ioinput │ │ └── la_ioinput.py │ ├── la_iovddio │ │ ├── la_iovddio.py │ │ └── rtl │ │ │ └── la_iovddio.v │ ├── la_iovssio │ │ ├── la_iovssio.py │ │ └── rtl │ │ │ └── la_iovssio.v │ ├── la_ioanalog │ │ └── la_ioanalog.py │ ├── la_iocorner │ │ ├── la_iocorner.py │ │ └── rtl │ │ │ └── la_iocorner.v │ ├── la_iorxdiff │ │ └── la_iorxdiff.py │ └── la_iotxdiff │ │ └── la_iotxdiff.py ├── ramlib │ ├── la_syncfifo │ │ └── la_syncfifo.py │ ├── la_dpram │ │ └── la_dpram.py │ ├── la_spram │ │ └── la_spram.py │ ├── la_tdpram │ │ └── la_tdpram.py │ ├── la_asyncfifo │ │ └── la_asyncfifo.py │ ├── _common.py │ └── __init__.py ├── fpgalib │ ├── la_lut4 │ │ └── la_lut4.py │ ├── la_clb4p0 │ │ └── la_clb4p0.py │ ├── __init__.py │ └── la_ble4p0 │ │ └── la_ble4p0.py └── lambdalib.py ├── .flake8 ├── tests ├── conftest.py ├── ramlib │ └── la_asyncfifo │ │ └── la_asyncfifo_rd_monitor.py ├── test_paths.py └── test_generate.py ├── .gitignore ├── MANIFEST.in ├── scripts ├── template.py.j2 └── gen_classes.py ├── .github ├── dependabot.yml └── workflows │ ├── config │ └── verible.rules │ ├── bin │ └── format_verilog.sh │ └── wheels.yml ├── LICENSE └── pyproject.toml /docs/tests/README.md: -------------------------------------------------------------------------------- 1 | Test infrastructue goes here 2 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | -sphinx generated documentation goes here 2 | -------------------------------------------------------------------------------- /examples/sram/rtl/sram.v: -------------------------------------------------------------------------------- 1 | module sram(); 2 | 3 | // TODO: put in la_spram 4 | 5 | endmodule 6 | -------------------------------------------------------------------------------- /lambdalib/padring/__init__.py: -------------------------------------------------------------------------------- 1 | from .la_padring.la_padring import Padring 2 | 3 | __all__ = ['Padring'] 4 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 100 3 | extend-exclude = build,.venv 4 | extend-ignore = 5 | per-file-ignores = 6 | lambdalib/__init__.py:F401 7 | -------------------------------------------------------------------------------- /lambdalib/analoglib/__init__.py: -------------------------------------------------------------------------------- 1 | from .la_pll.la_pll import PLL 2 | from .la_ring.la_ring import Ring 3 | 4 | __all__ = ['PLL', 5 | 'Ring' 6 | ] 7 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import os 3 | 4 | 5 | @pytest.fixture(autouse=True) 6 | def test_wrapper(tmp_path): 7 | topdir = os.getcwd() 8 | os.chdir(tmp_path) 9 | # Run the test. 10 | yield 11 | os.chdir(topdir) 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Editor files 2 | *~ 3 | 4 | .vscod 5 | 6 | #Env 7 | venv/ 8 | .venv 9 | 10 | 11 | # Sim 12 | *.log 13 | *.vcd 14 | a.out 15 | *.vvp 16 | *.f 17 | 18 | # Byte-compiled / optimized / DLL files 19 | __pycache__/ 20 | lambdalib.egg-info/ 21 | build/ 22 | dist/ 23 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | # stuff we need to include into the sdist is handled automatically by 2 | # setuptools_scm - it includes all git-committed files. 3 | # but we want to exclude some committed files/dirs not needed in the sdist: 4 | prune .github 5 | prune scripts 6 | prune docs 7 | prune tests 8 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_buf/la_buf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Buf(Lambda): 5 | def __init__(self): 6 | name = 'la_buf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Buf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_inv/la_inv.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Inv(Lambda): 5 | def __init__(self): 6 | name = 'la_inv' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Inv() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_or2/la_or2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Or2(Lambda): 5 | def __init__(self): 6 | name = 'la_or2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Or2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_or3/la_or3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Or3(Lambda): 5 | def __init__(self): 6 | name = 'la_or3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Or3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_or4/la_or4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Or4(Lambda): 5 | def __init__(self): 6 | name = 'la_or4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Or4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/analoglib/la_pll/la_pll.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class PLL(Lambda): 5 | def __init__(self): 6 | name = 'la_pll' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = PLL() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_ibuf/la_ibuf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ibuf(Lambda): 5 | def __init__(self): 6 | name = 'la_ibuf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ibuf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_iddr/la_iddr.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iddr(Lambda): 5 | def __init__(self): 6 | name = 'la_iddr' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iddr() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_obuf/la_obuf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Obuf(Lambda): 5 | def __init__(self): 6 | name = 'la_obuf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Obuf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_oddr/la_oddr.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oddr(Lambda): 5 | def __init__(self): 6 | name = 'la_oddr' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oddr() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_tbuf/la_tbuf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Tbuf(Lambda): 5 | def __init__(self): 6 | name = 'la_tbuf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Tbuf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_and2/la_and2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class And2(Lambda): 5 | def __init__(self): 6 | name = 'la_and2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = And2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_and3/la_and3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class And3(Lambda): 5 | def __init__(self): 6 | name = 'la_and3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = And3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_and4/la_and4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class And4(Lambda): 5 | def __init__(self): 6 | name = 'la_and4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = And4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao21/la_ao21.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao21(Lambda): 5 | def __init__(self): 6 | name = 'la_ao21' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao21() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao22/la_ao22.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao22(Lambda): 5 | def __init__(self): 6 | name = 'la_ao22' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao22() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao31/la_ao31.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao31(Lambda): 5 | def __init__(self): 6 | name = 'la_ao31' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao31() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao32/la_ao32.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao32(Lambda): 5 | def __init__(self): 6 | name = 'la_ao32' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao32() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao33/la_ao33.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao33(Lambda): 5 | def __init__(self): 6 | name = 'la_ao33' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao33() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffq/la_dffq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffq(Lambda): 5 | def __init__(self): 6 | name = 'la_dffq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_latq/la_latq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Latq(Lambda): 5 | def __init__(self): 6 | name = 'la_latq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Latq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_mux2/la_mux2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Mux2(Lambda): 5 | def __init__(self): 6 | name = 'la_mux2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Mux2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_mux3/la_mux3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Mux3(Lambda): 5 | def __init__(self): 6 | name = 'la_mux3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Mux3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_mux4/la_mux4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Mux4(Lambda): 5 | def __init__(self): 6 | name = 'la_mux4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Mux4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nor2/la_nor2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Nor2(Lambda): 5 | def __init__(self): 6 | name = 'la_nor2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Nor2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nor3/la_nor3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Nor3(Lambda): 5 | def __init__(self): 6 | name = 'la_nor3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Nor3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nor4/la_nor4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Nor4(Lambda): 5 | def __init__(self): 6 | name = 'la_nor4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Nor4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa21/la_oa21.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa21(Lambda): 5 | def __init__(self): 6 | name = 'la_oa21' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa21() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa22/la_oa22.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa22(Lambda): 5 | def __init__(self): 6 | name = 'la_oa22' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa22() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa31/la_oa31.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa31(Lambda): 5 | def __init__(self): 6 | name = 'la_oa31' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa31() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa32/la_oa32.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa32(Lambda): 5 | def __init__(self): 6 | name = 'la_oa32' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa32() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa33/la_oa33.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa33(Lambda): 5 | def __init__(self): 6 | name = 'la_oa33' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa33() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xor2/la_xor2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Xor2(Lambda): 5 | def __init__(self): 6 | name = 'la_xor2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Xor2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xor3/la_xor3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Xor3(Lambda): 5 | def __init__(self): 6 | name = 'la_xor3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Xor3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xor4/la_xor4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Xor4(Lambda): 5 | def __init__(self): 6 | name = 'la_xor4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Xor4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vbuf/la_vbuf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vbuf(Lambda): 5 | def __init__(self): 6 | name = 'la_vbuf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vbuf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vinv/la_vinv.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vinv(Lambda): 5 | def __init__(self): 6 | name = 'la_vinv' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vinv() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux/la_vmux.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_decap/la_decap.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Decap(Lambda): 5 | def __init__(self): 6 | name = 'la_decap' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Decap() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_dsync/la_dsync.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dsync(Lambda): 5 | def __init__(self): 6 | name = 'la_dsync' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dsync() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_idiff/la_idiff.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Idiff(Lambda): 5 | def __init__(self): 6 | name = 'la_idiff' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Idiff() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_isohi/la_isohi.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Isohi(Lambda): 5 | def __init__(self): 6 | name = 'la_isohi' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Isohi() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_isolo/la_isolo.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Isolo(Lambda): 5 | def __init__(self): 6 | name = 'la_isolo' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Isolo() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_odiff/la_odiff.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Odiff(Lambda): 5 | def __init__(self): 6 | name = 'la_odiff' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Odiff() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_rsync/la_rsync.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Rsync(Lambda): 5 | def __init__(self): 6 | name = 'la_rsync' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Rsync() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iocut/la_iocut.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iocut(Lambda): 5 | def __init__(self): 6 | name = 'la_iocut' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iocut() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iopoc/la_iopoc.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iopoc(Lambda): 5 | def __init__(self): 6 | name = 'la_iopoc' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iopoc() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovdd/la_iovdd.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iovdd(Lambda): 5 | def __init__(self): 6 | name = 'la_iovdd' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iovdd() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovss/la_iovss.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iovss(Lambda): 5 | def __init__(self): 6 | name = 'la_iovss' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iovss() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao211/la_ao211.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao211(Lambda): 5 | def __init__(self): 6 | name = 'la_ao211' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao211() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao221/la_ao221.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao221(Lambda): 5 | def __init__(self): 6 | name = 'la_ao221' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao221() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao222/la_ao222.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao222(Lambda): 5 | def __init__(self): 6 | name = 'la_ao222' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao222() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao311/la_ao311.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ao311(Lambda): 5 | def __init__(self): 6 | name = 'la_ao311' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ao311() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi21/la_aoi21.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi21(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi21' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi21() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi22/la_aoi22.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi22(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi22' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi22() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi31/la_aoi31.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi31(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi31' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi31() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi32/la_aoi32.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi32(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi32' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi32() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi33/la_aoi33.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi33(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi33' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi33() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_csa32/la_csa32.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Csa32(Lambda): 5 | def __init__(self): 6 | name = 'la_csa32' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Csa32() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_csa42/la_csa42.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Csa42(Lambda): 5 | def __init__(self): 6 | name = 'la_csa42' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Csa42() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_delay/la_delay.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Delay(Lambda): 5 | def __init__(self): 6 | name = 'la_delay' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Delay() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffnq/la_dffnq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffnq(Lambda): 5 | def __init__(self): 6 | name = 'la_dffnq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffnq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffqn/la_dffqn.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffqn(Lambda): 5 | def __init__(self): 6 | name = 'la_dffqn' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffqn() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffrq/la_dffrq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffrq(Lambda): 5 | def __init__(self): 6 | name = 'la_dffrq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffrq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffsq/la_dffsq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffsq(Lambda): 5 | def __init__(self): 6 | name = 'la_dffsq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffsq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux2/la_dmux2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux2(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux3/la_dmux3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux3(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux4/la_dmux4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux4(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux5/la_dmux5.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux5(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux5' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux5() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux6/la_dmux6.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux6(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux6' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux6() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux7/la_dmux7.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux7(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux7' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux7() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux8/la_dmux8.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dmux8(Lambda): 5 | def __init__(self): 6 | name = 'la_dmux8' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dmux8() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_latnq/la_latnq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Latnq(Lambda): 5 | def __init__(self): 6 | name = 'la_latnq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Latnq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_muxi2/la_muxi2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Muxi2(Lambda): 5 | def __init__(self): 6 | name = 'la_muxi2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Muxi2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_muxi3/la_muxi3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Muxi3(Lambda): 5 | def __init__(self): 6 | name = 'la_muxi3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Muxi3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_muxi4/la_muxi4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Muxi4(Lambda): 5 | def __init__(self): 6 | name = 'la_muxi4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Muxi4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nand2/la_nand2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Nand2(Lambda): 5 | def __init__(self): 6 | name = 'la_nand2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Nand2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nand3/la_nand3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Nand3(Lambda): 5 | def __init__(self): 6 | name = 'la_nand3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Nand3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nand4/la_nand4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Nand4(Lambda): 5 | def __init__(self): 6 | name = 'la_nand4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Nand4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa211/la_oa211.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa211(Lambda): 5 | def __init__(self): 6 | name = 'la_oa211' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa211() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa221/la_oa221.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa221(Lambda): 5 | def __init__(self): 6 | name = 'la_oa221' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa221() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa222/la_oa222.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa222(Lambda): 5 | def __init__(self): 6 | name = 'la_oa222' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa222() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa311/la_oa311.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oa311(Lambda): 5 | def __init__(self): 6 | name = 'la_oa311' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oa311() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai21/la_oai21.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai21(Lambda): 5 | def __init__(self): 6 | name = 'la_oai21' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai21() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai22/la_oai22.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai22(Lambda): 5 | def __init__(self): 6 | name = 'la_oai22' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai22() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai31/la_oai31.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai31(Lambda): 5 | def __init__(self): 6 | name = 'la_oai31' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai31() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai32/la_oai32.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai32(Lambda): 5 | def __init__(self): 6 | name = 'la_oai32' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai32() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai33/la_oai33.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai33(Lambda): 5 | def __init__(self): 6 | name = 'la_oai33' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai33() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffq/la_sdffq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Sdffq(Lambda): 5 | def __init__(self): 6 | name = 'la_sdffq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Sdffq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_tiehi/la_tiehi.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Tiehi(Lambda): 5 | def __init__(self): 6 | name = 'la_tiehi' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Tiehi() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_tielo/la_tielo.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Tielo(Lambda): 5 | def __init__(self): 6 | name = 'la_tielo' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Tielo() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xnor2/la_xnor2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Xnor2(Lambda): 5 | def __init__(self): 6 | name = 'la_xnor2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Xnor2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xnor3/la_xnor3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Xnor3(Lambda): 5 | def __init__(self): 6 | name = 'la_xnor3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Xnor3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xnor4/la_xnor4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Xnor4(Lambda): 5 | def __init__(self): 6 | name = 'la_xnor4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Xnor4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vdffq/la_vdffq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vdffq(Lambda): 5 | def __init__(self): 6 | name = 'la_vdffq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vdffq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vlatq/la_vlatq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vlatq(Lambda): 5 | def __init__(self): 6 | name = 'la_vlatq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vlatq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux2/la_vmux2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux2(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux3/la_vmux3.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux3(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux3' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux3() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux4/la_vmux4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux4(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux5/la_vmux5.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux5(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux5' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux5() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux6/la_vmux6.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux6(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux6' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux6() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux7/la_vmux7.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux7(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux7' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux7() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux8/la_vmux8.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux8(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux8' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux8() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_drsync/la_drsync.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Drsync(Lambda): 5 | def __init__(self): 6 | name = 'la_drsync' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Drsync() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_footer/la_footer.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Footer(Lambda): 5 | def __init__(self): 6 | name = 'la_footer' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Footer() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_header/la_header.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Header(Lambda): 5 | def __init__(self): 6 | name = 'la_header' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Header() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_keeper/la_keeper.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Keeper(Lambda): 5 | def __init__(self): 6 | name = 'la_keeper' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Keeper() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_pwrbuf/la_pwrbuf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Pwrbuf(Lambda): 5 | def __init__(self): 6 | name = 'la_pwrbuf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Pwrbuf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovdda/la_iovdda.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iovdda(Lambda): 5 | def __init__(self): 6 | name = 'la_iovdda' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iovdda() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovssa/la_iovssa.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iovssa(Lambda): 5 | def __init__(self): 6 | name = 'la_iovssa' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iovssa() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_ioxtal/la_ioxtal.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ioxtal(Lambda): 5 | def __init__(self): 6 | name = 'la_ioxtal' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ioxtal() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi211/la_aoi211.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi211(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi211' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi211() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi221/la_aoi221.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi221(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi221' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi221() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi222/la_aoi222.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi222(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi222' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi222() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi311/la_aoi311.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Aoi311(Lambda): 5 | def __init__(self): 6 | name = 'la_aoi311' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Aoi311() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkbuf/la_clkbuf.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkbuf(Lambda): 5 | def __init__(self): 6 | name = 'la_clkbuf' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkbuf() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkinv/la_clkinv.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkinv(Lambda): 5 | def __init__(self): 6 | name = 'la_clkinv' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkinv() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkor2/la_clkor2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkor2(Lambda): 5 | def __init__(self): 6 | name = 'la_clkor2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkor2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkor4/la_clkor4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkor4(Lambda): 5 | def __init__(self): 6 | name = 'la_clkor4' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkor4() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffrqn/la_dffrqn.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffrqn(Lambda): 5 | def __init__(self): 6 | name = 'la_dffrqn' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffrqn() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffsqn/la_dffsqn.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Dffsqn(Lambda): 5 | def __init__(self): 6 | name = 'la_dffsqn' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dffsqn() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai221/la_oai221.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai221(Lambda): 5 | def __init__(self): 6 | name = 'la_oai221' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai221() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai222/la_oai222.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai222(Lambda): 5 | def __init__(self): 6 | name = 'la_oai222' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai222() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai311/la_oai311.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Oai311(Lambda): 5 | def __init__(self): 6 | name = 'la_oai311' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Oai311() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffqn/la_sdffqn.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Sdffqn(Lambda): 5 | def __init__(self): 6 | name = 'la_sdffqn' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Sdffqn() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffrq/la_sdffrq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Sdffrq(Lambda): 5 | def __init__(self): 6 | name = 'la_sdffrq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Sdffrq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffsq/la_sdffsq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Sdffsq(Lambda): 5 | def __init__(self): 6 | name = 'la_sdffsq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Sdffsq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vdffnq/la_vdffnq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vdffnq(Lambda): 5 | def __init__(self): 6 | name = 'la_vdffnq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vdffnq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vlatnq/la_vlatnq.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vlatnq(Lambda): 5 | def __init__(self): 6 | name = 'la_vlatnq' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vlatnq() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux2b/la_vmux2b.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Vmux2b(Lambda): 5 | def __init__(self): 6 | name = 'la_vmux2b' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Vmux2b() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_antenna/la_antenna.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Antenna(Lambda): 5 | def __init__(self): 6 | name = 'la_antenna' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Antenna() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iobidir/la_iobidir.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iobidir(Lambda): 5 | def __init__(self): 6 | name = 'la_iobidir' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iobidir() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_ioclamp/la_ioclamp.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ioclamp(Lambda): 5 | def __init__(self): 6 | name = 'la_ioclamp' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ioclamp() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_ioinput/la_ioinput.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ioinput(Lambda): 5 | def __init__(self): 6 | name = 'la_ioinput' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ioinput() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovddio/la_iovddio.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iovddio(Lambda): 5 | def __init__(self): 6 | name = 'la_iovddio' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iovddio() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovssio/la_iovssio.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iovssio(Lambda): 5 | def __init__(self): 6 | name = 'la_iovssio' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iovssio() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/padring/la_ioalias/la_ioalias.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ioalias(Lambda): 5 | def __init__(self): 6 | name = 'la_ioalias' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ioalias() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/padring/la_ioshort/la_ioshort.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ioshort(Lambda): 5 | def __init__(self): 6 | name = 'la_ioshort' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ioshort() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkand2/la_clkand2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkand2(Lambda): 5 | def __init__(self): 6 | name = 'la_clkand2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkand2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clknor2/la_clknor2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clknor2(Lambda): 5 | def __init__(self): 6 | name = 'la_clknor2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clknor2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkxor2/la_clkxor2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkxor2(Lambda): 5 | def __init__(self): 6 | name = 'la_clkxor2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkxor2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffrqn/la_sdffrqn.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Sdffrqn(Lambda): 5 | def __init__(self): 6 | name = 'la_sdffrqn' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Sdffrqn() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffsqn/la_sdffsqn.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Sdffsqn(Lambda): 5 | def __init__(self): 6 | name = 'la_sdffsqn' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Sdffsqn() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_clkicgor/la_clkicgor.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkicgor(Lambda): 5 | def __init__(self): 6 | name = 'la_clkicgor' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkicgor() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_ioanalog/la_ioanalog.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Ioanalog(Lambda): 5 | def __init__(self): 6 | name = 'la_ioanalog' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Ioanalog() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iocorner/la_iocorner.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iocorner(Lambda): 5 | def __init__(self): 6 | name = 'la_iocorner' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iocorner() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iorxdiff/la_iorxdiff.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iorxdiff(Lambda): 5 | def __init__(self): 6 | name = 'la_iorxdiff' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iorxdiff() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iotxdiff/la_iotxdiff.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Iotxdiff(Lambda): 5 | def __init__(self): 6 | name = 'la_iotxdiff' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Iotxdiff() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/ramlib/la_syncfifo/la_syncfifo.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Syncfifo(Lambda): 5 | def __init__(self): 6 | name = 'la_syncfifo' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Syncfifo() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clknand2/la_clknand2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clknand2(Lambda): 5 | def __init__(self): 6 | name = 'la_clknand2' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clknand2() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /scripts/template.py.j2: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class {{ class_name }}(Lambda): 5 | def __init__(self): 6 | name = '{{ module_name }}' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = {{ class_name }}() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_clkicgand/la_clkicgand.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | 4 | class Clkicgand(Lambda): 5 | def __init__(self): 6 | name = 'la_clkicgand' 7 | super().__init__(name, __file__) 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Clkicgand() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/ramlib/la_dpram/la_dpram.py: -------------------------------------------------------------------------------- 1 | from lambdalib.ramlib._common import _RAMLib 2 | 3 | 4 | class Dpram(_RAMLib): 5 | def __init__(self): 6 | name = 'la_dpram' 7 | super().__init__(name, __file__, impl_file='rtl/la_dpram_impl.v') 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Dpram() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/ramlib/la_spram/la_spram.py: -------------------------------------------------------------------------------- 1 | from lambdalib.ramlib._common import _RAMLib 2 | 3 | 4 | class Spram(_RAMLib): 5 | def __init__(self): 6 | name = 'la_spram' 7 | super().__init__(name, __file__, impl_file='rtl/la_spram_impl.v') 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Spram() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/ramlib/la_tdpram/la_tdpram.py: -------------------------------------------------------------------------------- 1 | from lambdalib.ramlib._common import _RAMLib 2 | 3 | 4 | class Tdpram(_RAMLib): 5 | def __init__(self): 6 | name = 'la_tdpram' 7 | super().__init__(name, __file__, impl_file='rtl/la_tdpram_impl.v') 8 | 9 | 10 | if __name__ == "__main__": 11 | d = Tdpram() 12 | d.write_fileset(f"{d.name}.f", fileset="rtl") 13 | -------------------------------------------------------------------------------- /lambdalib/fpgalib/la_lut4/la_lut4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | from lambdalib.stdlib import Mux2 3 | 4 | 5 | class Lut4(Lambda): 6 | def __init__(self): 7 | name = 'la_lut4' 8 | super().__init__(name, __file__) 9 | 10 | self.add_depfileset(Mux2(), depfileset='rtl', fileset='rtl') 11 | 12 | 13 | if __name__ == "__main__": 14 | d = Lut4() 15 | d.write_fileset(f"{d.name}.f", fileset="rtl") 16 | -------------------------------------------------------------------------------- /lambdalib/fpgalib/la_clb4p0/la_clb4p0.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | from lambdalib.fpgalib import Ble4p0 4 | 5 | 6 | class Clb4p0(Lambda): 7 | def __init__(self): 8 | name = 'la_clb4p0' 9 | super().__init__(name, __file__) 10 | 11 | self.add_depfileset(Ble4p0(), depfileset='rtl', fileset='rtl') 12 | 13 | 14 | if __name__ == "__main__": 15 | d = Clb4p0() 16 | d.write_fileset(f"{d.name}.f", fileset="rtl") 17 | -------------------------------------------------------------------------------- /lambdalib/ramlib/la_asyncfifo/la_asyncfifo.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | from lambdalib.auxlib import Drsync 4 | 5 | 6 | class Asyncfifo(Lambda): 7 | def __init__(self): 8 | name = 'la_asyncfifo' 9 | super().__init__(name, __file__) 10 | 11 | self.add_depfileset(Drsync(), depfileset='rtl', fileset='rtl') 12 | 13 | 14 | if __name__ == "__main__": 15 | d = Asyncfifo() 16 | d.write_fileset(f"{d.name}.f", fileset="rtl") 17 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | groups: 9 | actions: 10 | patterns: 11 | - "*" 12 | # Maintain dependencies for Python 13 | - package-ecosystem: pip 14 | directory: "/" 15 | schedule: 16 | interval: "weekly" 17 | groups: 18 | python-packages: 19 | patterns: 20 | - "*" -------------------------------------------------------------------------------- /lambdalib/auxlib/la_keeper/rtl/la_keeper.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Charge Keeper Cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_keeper #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | inout z 11 | ); 12 | 13 | endmodule 14 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_decap/rtl/la_decap.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Decap Cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_decap #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input vss, 11 | output vdd 12 | ); 13 | 14 | endmodule 15 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_antenna/rtl/la_antenna.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Antenna Diode # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_antenna #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input vss, 11 | output z 12 | ); 13 | 14 | endmodule 15 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_tiehi/rtl/la_tiehi.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Tie High Cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_tiehi #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | output z 11 | ); 12 | 13 | assign z = 1'b1; 14 | 15 | endmodule 16 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_tielo/rtl/la_tielo.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Tie Low Cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_tielo #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | output z 11 | ); 12 | 13 | assign z = 1'b0; 14 | 15 | endmodule 16 | -------------------------------------------------------------------------------- /lambdalib/ramlib/_common.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from typing import Union, Optional 3 | 4 | from lambdalib.lambdalib import Lambda 5 | 6 | 7 | class _RAMLib(Lambda): 8 | def __init__(self, name: str, path: Union[str, Path], 9 | impl_file: Optional[Union[str, Path]] = None): 10 | super().__init__(name, path) 11 | 12 | if impl_file: 13 | with self.active_dataroot(name), self.active_fileset("rtl.impl"): 14 | self.add_file(impl_file) 15 | with self.active_fileset("rtl"): 16 | self.add_depfileset(self, "rtl.impl") 17 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_buf/rtl/la_buf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Non-inverting Buffer # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_buf #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | output z 12 | ); 13 | 14 | assign z = a; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_inv/rtl/la_inv.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Inverter # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_inv #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | output z 12 | ); 13 | 14 | assign z = ~a; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_delay/rtl/la_delay.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Non-inverting Delay Cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_delay #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | output z 12 | ); 13 | 14 | assign z = a; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkbuf/rtl/la_clkbuf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Non-inverting Clock Buffer # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkbuf #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | output z 12 | ); 13 | 14 | assign z = a; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkinv/rtl/la_clkinv.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Clock Inverter # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkinv #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | output z 12 | ); 13 | 14 | assign z = ~a; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/fpgalib/__init__.py: -------------------------------------------------------------------------------- 1 | from siliconcompiler import Design 2 | 3 | from .la_lut4.la_lut4 import Lut4 4 | from .la_ble4p0.la_ble4p0 import Ble4p0 5 | from .la_clb4p0.la_clb4p0 import Clb4p0 6 | 7 | __all__ = ['Ble4p0', 8 | 'Clb4p0', 9 | 'Lut4'] 10 | 11 | 12 | class FPGALib(Design): 13 | def __init__(self): 14 | super().__init__("la_fpgalib") 15 | 16 | with self.active_fileset("rtl"): 17 | self.add_depfileset(Lut4(), depfileset="rtl") 18 | self.add_depfileset(Ble4p0(), depfileset="rtl") 19 | self.add_depfileset(Clb4p0(), depfileset="rtl") 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_or2/rtl/la_or2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2 Input Or Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_or2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = a | b; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_and2/rtl/la_and2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input AND Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_and2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = a & b; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xor2/rtl/la_xor2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Exclusive-Or Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_xor2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = a ^ b; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkor2/rtl/la_clkor2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Clock OR Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkor2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = a | b; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nand2/rtl/la_nand2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2 Input Nand Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_nand2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = ~(a & b); 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nor2/rtl/la_nor2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2 Input Nor Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_nor2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = ~(a | b); 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xnor2/rtl/la_xnor2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Exclusive-Nor Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_xnor2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = ~(a ^ b); 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_ibuf/rtl/la_ibuf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Single Ended Chip Input Buffer (with ESD protection) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ibuf 8 | #(parameter PROP = "DEFAULT") 9 | ( 10 | input in, // positive input 11 | output z // output 12 | ); 13 | 14 | assign z = in; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_obuf/rtl/la_obuf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Single Ended Chip Output Buffer (with ESD protection) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_obuf 8 | #(parameter PROP = "DEFAULT") 9 | ( 10 | input in, // positive input 11 | output z // output 12 | ); 13 | 14 | assign z = in; 15 | 16 | endmodule 17 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_tbuf/rtl/la_tbuf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Tristate Buffer # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_tbuf #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input oe, 12 | output z 13 | ); 14 | 15 | assign z = oe ? a : 1'bz; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkand2/rtl/la_clkand2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2 Input Clock And Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkand2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = a & b; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clknor2/rtl/la_clknor2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Clock NOR Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clknor2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = ~(a | b); 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkxor2/rtl/la_clkxor2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Clock XOR Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkxor2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = a ^ b; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clknand2/rtl/la_clknand2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2 Input Clock Nand Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clknand2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | output z 13 | ); 14 | 15 | assign z = ~(a & b); 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffqn/rtl/la_dffqn.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered inverting static D-type flop-flop # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dffqn #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d, 11 | input clk, 12 | output reg qn 13 | ); 14 | 15 | always @(posedge clk) qn <= ~d; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_or3/rtl/la_or3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3 Input Or Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_or3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output z 14 | ); 15 | 16 | assign z = a | b | c; 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_and3/rtl/la_and3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3-Input AND Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_and3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output z 14 | ); 15 | 16 | assign z = a & b & c; 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffq/rtl/la_dffq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static D-type flop-flop # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dffq #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d, 11 | input clk, 12 | output reg q 13 | ); 14 | 15 | always @(posedge clk) q <= d; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nor3/rtl/la_nor3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3 Input Nor Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_nor3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output z 14 | ); 15 | 16 | assign z = ~(a | b | c); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xor3/rtl/la_xor3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3-Input XOR Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_xor3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output z 14 | ); 15 | 16 | assign z = a ^ b ^ c; 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao21/rtl/la_ao21.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao21) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao21 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | output z 14 | ); 15 | 16 | assign z = (a0 & a1) | b0; 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffnq/rtl/la_dffnq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Negative edge-triggered static D-type flop-flop # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dffnq #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d, 11 | input clk, 12 | output reg q 13 | ); 14 | 15 | always @(negedge clk) q <= d; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_latq/rtl/la_latq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: D-type active-high transparent latch # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_latq #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d, 11 | input clk, 12 | output reg q 13 | ); 14 | 15 | always @(clk or d) if (clk) q <= d; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nand3/rtl/la_nand3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3 Input Nand Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_nand3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output z 14 | ); 15 | 16 | assign z = ~(a & b & c); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa21/rtl/la_oa21.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa21) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa21 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | output z 14 | ); 15 | 16 | assign z = (a0 | a1) & b0; 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xnor3/rtl/la_xnor3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3-Input Exclusive-Nor Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_xnor3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output z 14 | ); 15 | 16 | assign z = ~(a ^ b ^ c); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi21/rtl/la_aoi21.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi21) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi21 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | output z 14 | ); 15 | 16 | assign z = ~((a0 & a1) | b0); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_latnq/rtl/la_latnq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: D-type active-low transparent latch # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_latnq #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d, 11 | input clk, 12 | output reg q 13 | ); 14 | 15 | always @(clk or d) if (~clk) q <= d; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_mux2/rtl/la_mux2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_mux2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d0, 11 | input d1, 12 | input s, 13 | output z 14 | ); 15 | 16 | assign z = (d0 & ~s) | (d1 & s); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai21/rtl/la_oai21.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai21) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai21 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | output z 14 | ); 15 | 16 | assign z = ~((a0 | a1) & b0); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_muxi2/rtl/la_muxi2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input Inverting Mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_muxi2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d0, 11 | input d1, 12 | input s, 13 | output z 14 | ); 15 | 16 | assign z = ~((d0 & ~s) | (d1 & s)); 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_and4/rtl/la_and4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4-Input AND Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_and4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = a & b & c & d; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_or4/rtl/la_or4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4 Input Or Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_or4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = a | b | c | d; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xor4/rtl/la_xor4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4-Input XOR Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_xor4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = a ^ b ^ c ^ d; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/fpgalib/la_ble4p0/la_ble4p0.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | from lambdalib.fpgalib import Lut4 4 | from lambdalib.stdlib import Dffrq 5 | from lambdalib.stdlib import Mux2 6 | 7 | 8 | class Ble4p0(Lambda): 9 | def __init__(self): 10 | name = 'la_ble4p0' 11 | super().__init__(name, __file__) 12 | 13 | self.add_depfileset(Lut4(), depfileset='rtl', fileset='rtl') 14 | self.add_depfileset(Dffrq(), depfileset='rtl', fileset='rtl') 15 | self.add_depfileset(Mux2(), depfileset='rtl', fileset='rtl') 16 | 17 | 18 | if __name__ == "__main__": 19 | d = Ble4p0() 20 | d.write_fileset(f"{d.name}.f", fileset="rtl") 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_clkor4/rtl/la_clkor4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4 Input Clock Or Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkor4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = a | b | c | d; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nand4/rtl/la_nand4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4 Input Nand Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_nand4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = ~(a & b & c & d); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_nor4/rtl/la_nor4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4 Input Nor Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_nor4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = ~(a | b | c | d); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_xnor4/rtl/la_xnor4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4-Input Exclusive-Nor Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_xnor4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | input d, 14 | output z 15 | ); 16 | 17 | assign z = ~(a ^ b ^ c ^ d); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao31/rtl/la_ao31.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao31) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao31 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | output z 15 | ); 16 | 17 | assign z = (a0 & a1 & a2) | b0; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa31/rtl/la_oa31.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa31) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa31 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | output z 15 | ); 16 | 17 | assign z = (a0 | a1 | a2) & b0; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao211/rtl/la_ao211.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao211) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao211 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input c0, 14 | output z 15 | ); 16 | 17 | assign z = (a0 & a1) | b0 | c0; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao22/rtl/la_ao22.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao22) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao22 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | output z 15 | ); 16 | 17 | assign z = (a0 & a1) | (b0 & b1); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi31/rtl/la_aoi31.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi31) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi31 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | output z 15 | ); 16 | 17 | assign z = ~((a0 & a1 & a2) | b0); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa211/rtl/la_oa211.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa211) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa211 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input c0, 14 | output z 15 | ); 16 | 17 | assign z = (a0 | a1) & b0 & c0; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa22/rtl/la_oa22.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa22) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa22 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | output z 15 | ); 16 | 17 | assign z = (a0 | a1) & (b0 | b1); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai31/rtl/la_oai31.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai31) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai31 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | output z 15 | ); 16 | 17 | assign z = ~((a0 | a1 | a2) & b0); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_isohi/rtl/la_isohi.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Power isolation circuit # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_isohi #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input iso, // isolation signal 11 | input in, // input 12 | output out // out = iso | in 13 | ); 14 | 15 | assign out = iso | in; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_isolo/rtl/la_isolo.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Power isolation circuit # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_isolo #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input iso, // isolation signal 11 | input in, // input 12 | output out // out = ~iso & in 13 | ); 14 | 15 | assign out = ~iso & in; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/lambdalib.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from typing import Union, List 3 | from siliconcompiler import Design 4 | 5 | 6 | class Lambda(Design): 7 | def __init__(self, 8 | name: str, 9 | path: Union[str, Path], 10 | extrasources: List[str] = None): 11 | 12 | super().__init__(name) 13 | 14 | self.set_dataroot(name, path) 15 | 16 | with self.active_fileset("rtl"): 17 | self.set_topmodule(name) 18 | 19 | with self.active_dataroot(name): 20 | self.add_file(f"rtl/{name}.v") 21 | 22 | if extrasources: 23 | self.add_file(extrasources) 24 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi211/rtl/la_aoi211.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi211) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi211 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input c0, 14 | output z 15 | ); 16 | 17 | assign z = ~((a0 & a1) | b0 | c0); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi22/rtl/la_aoi22.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi22) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi22 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | output z 15 | ); 16 | 17 | assign z = ~((a0 & a1) | (b0 & b1)); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai22/rtl/la_oai22.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai22) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai22 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | output z 15 | ); 16 | 17 | assign z = ~((a0 | a1) & (b0 | b1)); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux2/rtl/la_dmux2.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 2-Input one-hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux2 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input sel1, 11 | input sel0, 12 | input in1, 13 | input in0, 14 | output out 15 | ); 16 | 17 | assign out = (sel0 & in0) | (sel1 & in1); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao311/rtl/la_ao311.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao311) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao311 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = (a0 & a1 & a2) | b0 | c0; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao32/rtl/la_ao32.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao32) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao32 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | output z 16 | ); 17 | 18 | assign z = (a0 & a1 & a2) | (b0 & b1); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa311/rtl/la_oa311.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa311) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa311 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = (a0 | a1 | a2) & b0 & c0; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa32/rtl/la_oa32.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa32) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa32 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | output z 16 | ); 17 | 18 | assign z = (a0 | a1 | a2) & (b0 | b1); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao221/rtl/la_ao221.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao221) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao221 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = (a0 & a1) | (b0 & b1) | (c0); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi221/rtl/la_aoi221.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi221) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi221 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = ~((a0 & a1) | (b0 & b1) | c0); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi311/rtl/la_aoi311.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi311) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi311 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = ~((a0 & a1 & a2) | b0 | c0); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi32/rtl/la_aoi32.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi32) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi32 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | output z 16 | ); 17 | 18 | assign z = ~((a0 & a1 & a2) | (b0 & b1)); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa221/rtl/la_oa221.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa221) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa221 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = (a0 | a1) & (b0 | b1) & (c0); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai311/rtl/la_oai311.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai311) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai311 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = ~((a0 | a1 | a2) & b0 & c0); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai32/rtl/la_oai32.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai32) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai32 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | output z 16 | ); 17 | 18 | assign z = ~((a0 | a1 | a2) & (b0 | b1)); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai221/rtl/la_oai221.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai221) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai221 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | output z 16 | ); 17 | 18 | assign z = ~((a0 | a1) & (b0 | b1) & (c0)); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_odiff/rtl/la_odiff.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Differential Chip Output Buffer (with ESD protection) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_odiff 8 | #( 9 | parameter PROP = "DEFAULT" 10 | ) 11 | ( 12 | input in, // input 13 | output z, // non inverting output 14 | output zb // inverted output 15 | ); 16 | 17 | assign z = in; 18 | assign zb = ~in; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/padring/la_padring/la_padring.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | from lambdalib.iolib import IOLib 4 | 5 | 6 | class Padring(Lambda): 7 | def __init__(self): 8 | name = 'la_padring' 9 | super().__init__(name, __file__, extrasources=["rtl/la_padside.v"]) 10 | 11 | # extra settings 12 | with self.active_fileset("rtl"): 13 | self.set_topmodule(name) 14 | 15 | with self.active_dataroot(name): 16 | self.add_idir("rtl") 17 | 18 | # dependencies 19 | self.add_depfileset(IOLib(), depfileset='rtl') 20 | 21 | 22 | if __name__ == "__main__": 23 | d = Padring() 24 | d.write_fileset(f"{d.name}.f", fileset="rtl") 25 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_mux3/rtl/la_mux3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3-Input Mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_mux3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d0, 11 | input d1, 12 | input d2, 13 | input s0, 14 | input s1, 15 | output z 16 | ); 17 | 18 | assign z = (d0 & ~s0 & ~s1) | (d1 & s0 & ~s1) | (d2 & s1); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao33/rtl/la_ao33.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao33) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao33 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | input b2, 16 | output z 17 | ); 18 | 19 | assign z = (a0 & a1 & a2) | (b0 & b1 & b2); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_csa32/rtl/la_csa32.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Carry Save Adder (3:2) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_csa32 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a, 11 | input b, 12 | input c, 13 | output sum, 14 | output carry 15 | ); 16 | 17 | assign sum = a ^ b ^ c; 18 | assign carry = (a & b) | (b & c) | (c & a); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_muxi3/rtl/la_muxi3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3-Input Inverting Mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_muxi3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d0, 11 | input d1, 12 | input d2, 13 | input s0, 14 | input s1, 15 | output z 16 | ); 17 | 18 | assign z = ~((d0 & ~s0 & ~s1) | (d1 & s0 & ~s1) | (d2 & s1)); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa33/rtl/la_oa33.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa33) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa33 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | input b2, 16 | output z 17 | ); 18 | 19 | assign z = (a0 | a1 | a2) & (b0 | b1 | b2); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vbuf/rtl/la_vbuf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Vectorized buffer cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_vbuf #(parameter W = 1, // width of data inputs 8 | parameter PROP = "DEFAULT" // custom cell property 9 | ) 10 | ( 11 | input [W-1:0] a, 12 | output [W-1:0] z 13 | ); 14 | 15 | assign z = a; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vinv/rtl/la_vinv.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Vectorized inverter cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_vinv #(parameter W = 1, // width of data inputs 8 | parameter PROP = "DEFAULT" // custom cell property 9 | ) 10 | ( 11 | input [W-1:0] a, 12 | output [W-1:0] z 13 | ); 14 | 15 | assign z = ~a; 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_ao222/rtl/la_ao222.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or (ao222) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_ao222 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | input c1, 16 | output z 17 | ); 18 | 19 | assign z = (a0 & a1) | (b0 & b1) | (c0 & c1); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi33/rtl/la_aoi33.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi33) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi33 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | input b2, 16 | output z 17 | ); 18 | 19 | assign z = ~((a0 & a1 & a2) | (b0 & b1 & b2)); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oa222/rtl/la_oa222.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And (oa222) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oa222 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | input c1, 16 | output z 17 | ); 18 | 19 | assign z = (a0 | a1) & (b0 | b1) & (c0 | c1); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai33/rtl/la_oai33.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai33) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai33 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input a2, 13 | input b0, 14 | input b1, 15 | input b2, 16 | output z 17 | ); 18 | 19 | assign z = ~((a0 | a1 | a2) & (b0 | b1 | b2)); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_aoi222/rtl/la_aoi222.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: And-Or-Inverter (aoi222) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_aoi222 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | input c1, 16 | output z 17 | ); 18 | 19 | assign z = ~((a0 & a1) | (b0 & b1) | (c0 & c1)); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_oai222/rtl/la_oai222.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Or-And-Inverter (oai222) Gate # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oai222 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input a0, 11 | input a1, 12 | input b0, 13 | input b1, 14 | input c0, 15 | input c1, 16 | output z 17 | ); 18 | 19 | assign z = ~((a0 | a1) & (b0 | b1) & (c0 | c1)); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_header/rtl/la_header.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Header circuit # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_header #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input sleep, // 1 = disabled vdd 11 | input vddin, // input supply 12 | output vddout // gated output supply 13 | ); 14 | 15 | // Primitive Device 16 | pmos m0 (vddout, vddin, sleep); //d,s,g 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux3/rtl/la_dmux3.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 3-Input one-hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux3 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input sel0, 11 | input sel1, 12 | input sel2, 13 | input in0, 14 | input in1, 15 | input in2, 16 | output out 17 | ); 18 | 19 | assign out = (sel0 & in0) | (sel1 & in1) | (sel2 & in2); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_footer/rtl/la_footer.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Footer circuit # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_footer #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input nsleep, // 0 = disabled ground 11 | input vssin, // input supply 12 | output vssout // gated output supply 13 | ); 14 | 15 | // Primitive Device 16 | nmos m0 (vssout, vssin, nsleep); //d,s,g 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_mux4/rtl/la_mux4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4-Input Mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_mux4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d0, 11 | input d1, 12 | input d2, 13 | input d3, 14 | input s0, 15 | input s1, 16 | output z 17 | ); 18 | 19 | assign z = (d0 & ~s1 & ~s0) | (d1 & ~s1 & s0) | (d2 & s1 & ~s0) | (d3 & s1 & s0); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_muxi4/rtl/la_muxi4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4-Input Inverting Mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_muxi4 #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input d0, 11 | input d1, 12 | input d2, 13 | input d3, 14 | input s0, 15 | input s1, 16 | output z 17 | ); 18 | 19 | assign z = ~((d0 & ~s1 & ~s0) | (d1 & ~s1 & s0) | (d2 & s1 & ~s0) | (d3 & s1 & s0)); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vdffq/rtl/la_vdffq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Vectorized positive edge-triggered static D-type flop-flop # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_vdffq #(parameter W = 1, // width of mux 8 | parameter PROP = "" // cell property 9 | ) 10 | ( 11 | input [W-1:0] d, 12 | input clk, 13 | output reg [W-1:0] q 14 | ); 15 | 16 | always @(posedge clk) 17 | q <= d; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vdffnq/rtl/la_vdffnq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Vectorized negative edge-triggered static D-type flop-flop # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_vdffnq #(parameter W = 1, // width of mux 8 | parameter PROP = "" // cell property 9 | ) 10 | ( 11 | input [W-1:0] d, 12 | input clk, 13 | output reg [W-1:0] q 14 | ); 15 | 16 | always @(negedge clk) 17 | q <= d; 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /.github/workflows/config/verible.rules: -------------------------------------------------------------------------------- 1 | line-length=length:120 2 | 3 | # may want to revisit this at some point, but most parameters we're 4 | # using are untyped, so this would be a major change 5 | -explicit-parameter-storage-type 6 | 7 | # don't require generate blocks to have a label 8 | -generate-label 9 | -generate-label-prefix 10 | 11 | # allow "always @*", since "always_comb" is not part of plain Verilog 12 | -always-comb 13 | 14 | # allow Verilog filenames to not match module names 15 | -module-filename 16 | 17 | # for now, allow $random 18 | -invalid-system-task-function 19 | 20 | -unpacked-dimensions-range-ordering 21 | 22 | # allow localparams to be written in all caps with underscores, 23 | # in addition to using camelcase 24 | parameter-name-style=localparam_style:CamelCase|ALL_CAPS 25 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_idiff/rtl/la_idiff.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Differential Chip Input Buffer (with ESD protection) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_idiff 8 | #( 9 | parameter PROP = "DEFAULT" 10 | ) 11 | ( 12 | input in, // positive input 13 | input inb, // negative input 14 | output z // output 15 | ); 16 | 17 | assign z = (in & ~inb) | // for proper diff inputs 18 | (~in & ~inb); // fail on non diff input 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffq/rtl/la_sdffq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static D-type flop-flop with scan input # 3 | //# # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_sdffq #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input si, 13 | input se, 14 | input clk, 15 | output reg q 16 | ); 17 | 18 | always @(posedge clk) q <= se ? si : d; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vlatq/rtl/la_vlatq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Vectorized D-type active-high transparent latch # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_vlatq #(parameter W = 1, // width of mux 8 | parameter PROP = "" // cell property 9 | ) 10 | ( 11 | input [W-1:0] d, 12 | input clk, 13 | output reg [W-1:0] q 14 | ); 15 | 16 | always @ (clk or d) 17 | if (clk) 18 | q <= d; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_pwrbuf/rtl/la_pwrbuf.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Non-inverting buffer with supplies # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_pwrbuf #( 8 | parameter PROP = "DEFAULT" 9 | ) 10 | ( 11 | input vdd, 12 | input vss, 13 | input a, 14 | output z 15 | ); 16 | 17 | `ifdef SIM 18 | assign z = ((vdd === 1'b1) && (vss === 1'b0)) ? a : 1'bX; 19 | `else 20 | assign z = a; 21 | `endif 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vlatnq/rtl/la_vlatnq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Vectorized D-type active-low transparent latch # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_vlatnq #(parameter W = 1, // width of mux 8 | parameter PROP = "" // cell property 9 | ) 10 | ( 11 | input [W-1:0] d, 12 | input clk, 13 | output reg [W-1:0] q 14 | ); 15 | 16 | always @(clk or d) 17 | if (~clk) 18 | q <= d; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffqn/rtl/la_sdffqn.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered inverting static D-type flop-flop # 3 | //# with scan input. # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_sdffqn #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input si, 13 | input se, 14 | input clk, 15 | output reg qn 16 | ); 17 | 18 | always @(posedge clk) qn <= se ? ~si : ~d; 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /.github/workflows/bin/format_verilog.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # When run from the root of the repository, formats Verilog using verible to ensure that formatting 4 | # CI checks pass. 5 | 6 | set -e 7 | 8 | FILES=$(mktemp /tmp/format-verilog.XXXXXX) 9 | 10 | # Collect all Verilog files, but generally ignore things that are copied verbatim from third party 11 | # sources. 12 | # tests/flows/data/bad.v is ours, but intentionally contains invalid syntax 13 | find . \( \ 14 | -name "*.v" \ 15 | -or -name "*.vh" \ 16 | \) -not \( \ 17 | -path "./siliconcompiler/*" \ 18 | -or -path "./lambdalib/utils/templates/*" \ 19 | \) >> $FILES 20 | 21 | #verible-verilog-format \ 22 | # --failsafe_success=false \ 23 | # --indentation_spaces 4 \ 24 | # --inplace `cat $FILES` 25 | 26 | cat $FILES 27 | rm $FILES 28 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffsqn/rtl/la_dffsqn.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static inverting D-type flop-flop with # 3 | // async active low set. # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_dffsqn #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input clk, 13 | input nset, 14 | output reg qn 15 | ); 16 | 17 | always @(posedge clk or negedge nset) 18 | if (!nset) qn <= 1'b0; 19 | else qn <= ~d; 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffsq/rtl/la_dffsq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static D-type flop-flop with async # 3 | //# active low preset. # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_dffsq #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input clk, 13 | input nset, 14 | output reg q 15 | ); 16 | 17 | always @(posedge clk or negedge nset) 18 | if (!nset) q <= 1'b1; 19 | else q <= d; 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux4/rtl/la_dmux4.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 4-Input one-hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux4 #( 8 | parameter PROP = "DEFAULT" // cell property 9 | ) ( 10 | input sel3, 11 | input sel2, 12 | input sel1, 13 | input sel0, 14 | input in3, 15 | input in2, 16 | input in1, 17 | input in0, 18 | output out 19 | ); 20 | 21 | assign out = (sel0 & in0) | (sel1 & in1) | (sel2 & in2) | (sel3 & in3); 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffrq/rtl/la_dffrq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static D-type flop-flop with async # 3 | //# active low reset. # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_dffrq #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input clk, 13 | input nreset, 14 | output reg q 15 | ); 16 | 17 | always @(posedge clk or negedge nreset) 18 | if (!nreset) q <= 1'b0; 19 | else q <= d; 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dffrqn/rtl/la_dffrqn.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static inverting D-type flop-flop with # 3 | // async active low reset. # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_dffrqn #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input clk, 13 | input nreset, 14 | output reg qn 15 | ); 16 | 17 | always @(posedge clk or negedge nreset) 18 | if (!nreset) qn <= 1'b1; 19 | else qn <= ~d; 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_clkicgor/rtl/la_clkicgor.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Integrated "Or" Clock Gating Cell # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkicgor #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input clk, // clock input 11 | input te, // test enable 12 | input en, // enable 13 | output eclk // enabled clock output 14 | ); 15 | 16 | reg en_stable; 17 | 18 | always @(clk or en or te) if (clk) en_stable <= en | te; 19 | 20 | assign eclk = clk | ~en_stable; 21 | 22 | endmodule 23 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_clkicgand/rtl/la_clkicgand.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Integrated "And" Clock Gating Cell (And) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_clkicgand #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input clk, // clock input 11 | input te, // test enable 12 | input en, // enable (from positive edge FF) 13 | output eclk // enabled clock output 14 | ); 15 | 16 | reg en_stable; 17 | 18 | always @(clk or en or te) if (~clk) en_stable <= en | te; 19 | 20 | assign eclk = clk & en_stable; 21 | 22 | endmodule 23 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux2b/rtl/la_vmux2b.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: 2-Input one-hot vectorized mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux2b #(parameter W = 1, // width of mux 8 | parameter PROP = "DEFAULT" // cell property 9 | ) 10 | ( 11 | input sel, 12 | input [W-1:0] in1, 13 | input [W-1:0] in0, 14 | output [W-1:0] out 15 | ); 16 | 17 | assign out[W-1:0] = (({(W) {~sel}} & in0[W-1:0]) | 18 | ({(W) {sel}} & in1[W-1:0])); 19 | 20 | endmodule 21 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux5/rtl/la_dmux5.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 5-Input one-hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux5 #( 8 | parameter PROP = "DEFAULT" // cell property 9 | ) ( 10 | input sel4, 11 | input sel3, 12 | input sel2, 13 | input sel1, 14 | input sel0, 15 | input in4, 16 | input in3, 17 | input in2, 18 | input in1, 19 | input in0, 20 | output out 21 | ); 22 | 23 | assign out = (sel0 & in0) | (sel1 & in1) | (sel2 & in2) | (sel3 & in3) | (sel4 & in4); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffsq/rtl/la_sdffsq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static D-type flop-flop with async # 3 | //# active low preset and scan input. # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_sdffsq #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input si, 13 | input se, 14 | input clk, 15 | input nset, 16 | output reg q 17 | ); 18 | 19 | always @(posedge clk or negedge nset) 20 | if (!nset) q <= 1'b1; 21 | else q <= se ? si : d; 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffrq/rtl/la_sdffrq.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static D-type flop-flop with async # 3 | //# active low reset and scan input # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_sdffrq #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input si, 13 | input se, 14 | input clk, 15 | input nreset, 16 | output reg q 17 | ); 18 | 19 | always @(posedge clk or negedge nreset) 20 | if (!nreset) q <= 1'b0; 21 | else q <= se ? si : d; 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /tests/ramlib/la_asyncfifo/la_asyncfifo_rd_monitor.py: -------------------------------------------------------------------------------- 1 | from cocotb.triggers import RisingEdge 2 | from cocotb_bus.monitors import BusMonitor 3 | 4 | 5 | class LaAsyncFifoRdMonitor(BusMonitor): 6 | """Monitor for read side of lambdalib async fifo""" 7 | 8 | _signals = [ 9 | "rd_dout", 10 | "rd_en", 11 | "rd_empty" 12 | ] 13 | _optional_signals = [] 14 | 15 | def __init__(self, entity, name, clock, **kwargs): 16 | BusMonitor.__init__(self, entity, name, clock, **kwargs) 17 | 18 | async def _monitor_recv(self): 19 | clk_re = RisingEdge(self.clock) 20 | 21 | def valid_handshake(): 22 | return bool(self.bus.rd_en.value) and not bool(self.bus.rd_empty.value) 23 | 24 | while True: 25 | await clk_re 26 | if valid_handshake(): 27 | self._recv(self.bus.rd_dout.value.to_unsigned()) 28 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffsqn/rtl/la_sdffsqn.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static inverting D-type flop-flop with # 3 | // async active low set and scan input # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_sdffsqn #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input si, 13 | input se, 14 | input clk, 15 | input nset, 16 | output reg qn 17 | ); 18 | 19 | always @(posedge clk or negedge nset) 20 | if (!nset) qn <= 1'b0; 21 | else qn <= se ? ~si : ~d; 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux2/rtl/la_vmux2.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: 2-Input one-hot vectorized mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux2 #(parameter W = 1, // width of mux 8 | parameter PROP = "DEFAULT" // cell property 9 | ) 10 | ( 11 | input sel1, 12 | input sel0, 13 | input [W-1:0] in1, 14 | input [W-1:0] in0, 15 | output [W-1:0] out 16 | ); 17 | 18 | assign out[W-1:0] = (({(W) {sel0}} & in0[W-1:0]) | 19 | ({(W) {sel1}} & in1[W-1:0])); 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_oddr/rtl/la_oddr.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Dual data rate output buffer # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_oddr #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input clk, // clock input 11 | input in0, // data for clk=0 12 | input in1, // data for clk=1 13 | output out // dual data rate output 14 | ); 15 | 16 | //Making in1 stable for clk=1 17 | reg in1_sh; 18 | always @(clk or in1) if (~clk) in1_sh <= in1; 19 | 20 | //Using clock as data selector 21 | assign out = clk ? in1_sh : in0; 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /lambdalib/ramlib/__init__.py: -------------------------------------------------------------------------------- 1 | from siliconcompiler import Design 2 | 3 | from .la_asyncfifo.la_asyncfifo import Asyncfifo 4 | from .la_syncfifo.la_syncfifo import Syncfifo 5 | from .la_dpram.la_dpram import Dpram 6 | from .la_spram.la_spram import Spram 7 | from .la_tdpram.la_tdpram import Tdpram 8 | 9 | __all__ = ['Asyncfifo', 10 | 'Syncfifo', 11 | 'Dpram', 12 | 'Spram', 13 | 'Tdpram'] 14 | 15 | 16 | class RAMLib(Design): 17 | def __init__(self): 18 | super().__init__("la_ramlib") 19 | 20 | with self.active_fileset("rtl"): 21 | self.add_depfileset(Asyncfifo(), depfileset="rtl") 22 | self.add_depfileset(Syncfifo(), depfileset="rtl") 23 | self.add_depfileset(Dpram(), depfileset="rtl") 24 | self.add_depfileset(Spram(), depfileset="rtl") 25 | self.add_depfileset(Tdpram(), depfileset="rtl") 26 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_sdffrqn/rtl/la_sdffrqn.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Positive edge-triggered static inverting D-type flop-flop with # 3 | // async active low reset and scan input # 4 | //# Copyright: Lambda Project Authors. All rights Reserved. # 5 | //# License: MIT (see LICENSE file in Lambda repository) # 6 | //############################################################################# 7 | 8 | module la_sdffrqn #( 9 | parameter PROP = "DEFAULT" 10 | ) ( 11 | input d, 12 | input si, 13 | input se, 14 | input clk, 15 | input nreset, 16 | output reg qn 17 | ); 18 | 19 | always @(posedge clk or negedge nreset) 20 | if (!nreset) qn <= 1'b1; 21 | else qn <= se ? ~si : ~d; 22 | 23 | endmodule 24 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iocorner/rtl/la_iocorner.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Corner IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iocorner 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovdd/rtl/la_iovdd.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Core Supply IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iovdd 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovddio/rtl/la_iovddio.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: IO Supply Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iovddio 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovss/rtl/la_iovss.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Core Ground IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iovss 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovssio/rtl/la_iovssio.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: IO Ground Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iovssio 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovdda/rtl/la_iovdda.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Analog Supply IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iovdda 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iovssa/rtl/la_iovssa.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Analog Ground IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iovssa 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | inout vdd, // core supply 19 | inout vss, // core ground 20 | inout vddio, // io supply 21 | inout vssio, // io ground 22 | inout [RINGW-1:0] ioring // generic ioring interface 23 | ); 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /examples/chip/chip.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | from siliconcompiler import Design 4 | 5 | from lambdalib.padring import Padring 6 | 7 | 8 | class Chip(Design): 9 | def __init__(self): 10 | 11 | name = 'chip' 12 | super().__init__(name) 13 | 14 | fileset = 'rtl' 15 | dataroot = f'{name}' 16 | topmodule = name 17 | 18 | self.set_dataroot(dataroot, __file__) 19 | self.set_topmodule(topmodule, fileset) 20 | 21 | self.add_file("rtl/chip.v", fileset, dataroot=dataroot) 22 | self.add_idir('rtl', fileset, dataroot=dataroot) 23 | 24 | # dependencies 25 | self.add_depfileset(Padring(), depfileset='rtl', fileset='rtl') 26 | 27 | 28 | if __name__ == "__main__": 29 | d = Chip() 30 | d.write_fileset(f"{d.name}.f", fileset="rtl") 31 | cmd = ['yosys', '-f', f"{d.name}.f"] 32 | subprocess.run(cmd, stderr=subprocess.STDOUT, check=True) 33 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_clkmux2/la_clkmux2.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | from lambdalib.stdlib import Inv 4 | from lambdalib.stdlib import And2 5 | from lambdalib.stdlib import Clkor2 6 | from lambdalib.auxlib import Drsync 7 | from lambdalib.auxlib import Clkicgand 8 | 9 | 10 | class Clkmux2(Lambda): 11 | def __init__(self): 12 | name = 'la_clkmux2' 13 | super().__init__(name, __file__) 14 | 15 | # dependencies 16 | self.add_depfileset(Inv(), depfileset='rtl', fileset='rtl') 17 | self.add_depfileset(And2(), depfileset='rtl', fileset='rtl') 18 | self.add_depfileset(Clkor2(), depfileset='rtl', fileset='rtl') 19 | self.add_depfileset(Drsync(), depfileset='rtl', fileset='rtl') 20 | self.add_depfileset(Clkicgand(), depfileset='rtl', fileset='rtl') 21 | 22 | 23 | if __name__ == "__main__": 24 | d = Clkmux2() 25 | d.write_fileset(f"{d.name}.f", fileset="rtl") 26 | -------------------------------------------------------------------------------- /lambdalib/padring/la_ioalias/rtl/la_ioalias.v: -------------------------------------------------------------------------------- 1 | 2 | /************************************************************************** 3 | * Function: IO Alias Utility Module 4 | * Copyright: Lambda Project Authors. All rights Reserved. 5 | * License: MIT (see LICENSE file in Lambda repository) 6 | * 7 | * Docs: 8 | * 9 | * Signal renaming and concatenation of wires doesn't work for 10 | * directly connected I/O ports. One solution is to hard code the 11 | * connections in the design. Another option is to pass through the 12 | * name translation module shown below. 13 | * 14 | * WARNING: The port list alias features is in the verilog standard, 15 | * but not well supported by open source tools. Not recommended for 16 | * portable designs. 17 | * 18 | *************************************************************************/ 19 | 20 | module la_ioalias (.io1(a), 21 | .io2(a)); 22 | 23 | inout wire a; 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_csa42/rtl/la_csa42.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Carry Save Adder (4:2) (aka 5:3) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_csa42 8 | #( 9 | parameter PROP = "DEFAULT" 10 | ) 11 | ( 12 | input a, 13 | input b, 14 | input c, 15 | input d, 16 | input cin, 17 | output sum, 18 | output carry, 19 | output cout 20 | ); 21 | 22 | wire sumint; 23 | 24 | assign cout = (a & b) | (b & c) | (a & c); 25 | assign sumint = a ^ b ^ c; 26 | assign sum = cin ^ d ^ sumint; 27 | assign carry = (cin & d) | (cin & sumint) | (d & sumint); 28 | 29 | endmodule 30 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_ioclamp/rtl/la_ioclamp.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: ESD Clamp IO cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_ioclamp 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | (// io pad signals 18 | inout pad, // clamp supply 19 | inout vdd, // core supply 20 | inout vss, // core ground 21 | inout vddio, // io supply 22 | inout vssio, // io ground 23 | inout [RINGW-1:0] ioring // generic io ring interface 24 | ); 25 | 26 | endmodule 27 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_drsync/rtl/la_drsync.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Synchronizer with async reset # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | module la_drsync #( 7 | parameter PROP = "DEFAULT" 8 | ) ( 9 | input clk, // clock 10 | input in, // input data 11 | input nreset, // async active low reset 12 | output out // synchronized data 13 | ); 14 | 15 | localparam STAGES = 2; 16 | 17 | reg [STAGES-1:0] shiftreg; 18 | 19 | always @(posedge clk or negedge nreset) 20 | if (!nreset) shiftreg[STAGES-1:0] <= 'b0; 21 | else shiftreg[STAGES-1:0] <= {shiftreg[STAGES-2:0], in}; 22 | 23 | assign out = shiftreg[STAGES-1]; 24 | 25 | endmodule 26 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux6/rtl/la_dmux6.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 6-Input one-hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux6 #( 8 | parameter PROP = "DEFAULT" // cell property 9 | ) ( 10 | input sel5, 11 | input sel4, 12 | input sel3, 13 | input sel2, 14 | input sel1, 15 | input sel0, 16 | input in5, 17 | input in4, 18 | input in3, 19 | input in2, 20 | input in1, 21 | input in0, 22 | output out 23 | ); 24 | 25 | assign out = (sel0 & in0) | 26 | (sel1 & in1) | 27 | (sel2 & in2) | 28 | (sel3 & in3) | 29 | (sel4 & in4) | 30 | (sel5 & in5); 31 | 32 | endmodule 33 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux3/rtl/la_vmux3.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: 3-Input one-hot vectorized mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux3 #(parameter W = 1, // width of mux 8 | parameter PROP = "DEFAULT" // cell property 9 | ) 10 | ( 11 | input sel2, 12 | input sel1, 13 | input sel0, 14 | input [W-1:0] in2, 15 | input [W-1:0] in1, 16 | input [W-1:0] in0, 17 | output [W-1:0] out 18 | ); 19 | 20 | assign out[W-1:0] = (({(W){sel0}} & in0[W-1:0]) | 21 | ({(W){sel1}} & in1[W-1:0]) | 22 | ({(W){sel2}} & in2[W-1:0])); 23 | 24 | endmodule 25 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_iddr/rtl/la_iddr.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Dual data rate input buffer # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_iddr #( 8 | parameter PROP = "DEFAULT" 9 | ) ( 10 | input clk, // clock 11 | input in, // data input sampled on both edges of clock 12 | output reg outrise, // rising edge sample 13 | output reg outfall // falling edge sample 14 | ); 15 | 16 | // Negedge Sample 17 | always @(negedge clk) outfall <= in; 18 | 19 | // Posedge Sample 20 | reg inrise; 21 | always @(posedge clk) inrise <= in; 22 | 23 | // Posedge Latch (for hold) 24 | always @(clk or inrise) if (~clk) outrise <= inrise; 25 | 26 | endmodule 27 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iopoc/rtl/la_iopoc.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Power-On Control IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iopoc 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter CFGW = 16, // width of core config bus 16 | parameter RINGW = 8 // width of io ring 17 | ) 18 | ( 19 | inout vdd, // core supply 20 | inout vss, // core ground 21 | inout vddio, // io supply 22 | inout vssio, // io ground 23 | inout [RINGW-1:0] ioring,// generic ioring interface 24 | input [CFGW-1:0] cfg // generic config interface 25 | ); 26 | 27 | endmodule 28 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_clkmux4/la_clkmux4.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | 3 | from lambdalib.stdlib import Inv 4 | from lambdalib.stdlib import And2 5 | from lambdalib.stdlib import Or3 6 | from lambdalib.stdlib import Clkor4 7 | from lambdalib.auxlib import Drsync 8 | from lambdalib.auxlib import Clkicgand 9 | 10 | 11 | class Clkmux4(Lambda): 12 | def __init__(self): 13 | name = 'la_clkmux4' 14 | super().__init__(name, __file__) 15 | 16 | # dependencies 17 | self.add_depfileset(Inv(), depfileset='rtl', fileset='rtl') 18 | self.add_depfileset(And2(), depfileset='rtl', fileset='rtl') 19 | self.add_depfileset(Or3(), depfileset='rtl', fileset='rtl') 20 | self.add_depfileset(Clkor4(), depfileset='rtl', fileset='rtl') 21 | self.add_depfileset(Drsync(), depfileset='rtl', fileset='rtl') 22 | self.add_depfileset(Clkicgand(), depfileset='rtl', fileset='rtl') 23 | 24 | 25 | if __name__ == "__main__": 26 | d = Clkmux4() 27 | d.write_fileset(f"{d.name}.f", fileset="rtl") 28 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux/rtl/la_vmux.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: N-Input one hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux #(parameter N = 1, // number of ports 8 | parameter W = 1, // data width 9 | parameter PROP = "DEFAULT" // cell property 10 | ) 11 | ( 12 | input [N-1:0] sel, // select vector 13 | input [W*N-1:0] in, // flattened input {.., in1[W-1:0],in0[W-1:0]} 14 | output reg [W-1:0] out // output 15 | ); 16 | 17 | integer i; 18 | always @* begin 19 | out[W-1:0] = 'b0; 20 | for (i = 0; i < N; i = i + 1) 21 | out[W-1:0] = out[W-1:0] | ({W{sel[i]}} & in[i*W+:W]); 22 | end 23 | 24 | endmodule 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Zero ASIC Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux7/rtl/la_dmux7.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 7-Input one-hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux7 #( 8 | parameter PROP = "DEFAULT" // cell property 9 | ) ( 10 | input sel6, 11 | input sel5, 12 | input sel4, 13 | input sel3, 14 | input sel2, 15 | input sel1, 16 | input sel0, 17 | input in6, 18 | input in5, 19 | input in4, 20 | input in3, 21 | input in2, 22 | input in1, 23 | input in0, 24 | output out 25 | ); 26 | 27 | assign out = (sel0 & in0) | 28 | (sel1 & in1) | 29 | (sel2 & in2) | 30 | (sel3 & in3) | 31 | (sel4 & in4) | 32 | (sel5 & in5) | 33 | (sel6 & in6); 34 | 35 | endmodule 36 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux4/rtl/la_vmux4.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: 4-Input one-hot vectorized mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux4 #(parameter W = 1, // width of mux 8 | parameter PROP = "DEFAULT" // cell property 9 | ) 10 | ( 11 | input sel3, 12 | input sel2, 13 | input sel1, 14 | input sel0, 15 | input [W-1:0] in3, 16 | input [W-1:0] in2, 17 | input [W-1:0] in1, 18 | input [W-1:0] in0, 19 | output [W-1:0] out 20 | ); 21 | 22 | assign out[W-1:0] = (({(W){sel0}} & in0[W-1:0]) | 23 | ({(W){sel1}} & in1[W-1:0]) | 24 | ({(W){sel2}} & in2[W-1:0]) | 25 | ({(W){sel3}} & in3[W-1:0])); 26 | 27 | endmodule 28 | -------------------------------------------------------------------------------- /lambdalib/stdlib/la_dmux8/rtl/la_dmux8.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: 8-Input one hot mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | 7 | module la_dmux8 #( 8 | parameter PROP = "DEFAULT" // cell property 9 | ) ( 10 | input sel7, 11 | input sel6, 12 | input sel5, 13 | input sel4, 14 | input sel3, 15 | input sel2, 16 | input sel1, 17 | input sel0, 18 | input in7, 19 | input in6, 20 | input in5, 21 | input in4, 22 | input in3, 23 | input in2, 24 | input in1, 25 | input in0, 26 | output out 27 | ); 28 | 29 | assign out = (sel0 & in0) | 30 | (sel1 & in1) | 31 | (sel2 & in2) | 32 | (sel3 & in3) | 33 | (sel4 & in4) | 34 | (sel5 & in5) | 35 | (sel6 & in6) | 36 | (sel7 & in7); 37 | 38 | endmodule 39 | -------------------------------------------------------------------------------- /lambdalib/padring/la_ioshort/rtl/la_ioshort.v: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Function: Simulation Friendly IO Alias Module 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * Instantiates the la_ioalias inout alias module and adds a loop breaking 9 | * logic for some tools that don's support tran, alias,and port aliasing. 10 | * 11 | * WARNING: The port list alias features is in the verilog standard, 12 | * but not well supported by open source tools. Not recommended for 13 | * portable designs. 14 | * 15 | *************************************************************************/ 16 | module la_ioshort (inout a, 17 | inout b, 18 | input a2b 19 | ); 20 | 21 | `ifdef VERILATOR 22 | // Using direction to break the loop 23 | assign a = ~a2b ? b : 1'bz; 24 | assign b = a2b ? a : 1'bz; 25 | `else 26 | // verilog_lint: waive-start module-port 27 | la_ioalias la_ioalias (a,b); 28 | // verilog_lint: waive-end module-port 29 | `endif 30 | 31 | endmodule 32 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_dsync/rtl/la_dsync.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Synchronizer # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | module la_dsync #(parameter PROP = "DEFAULT", 7 | parameter STAGES = 2, // synchronizer depth 8 | parameter RND = 1) // randomize simulation delay 9 | ( 10 | input clk, // clock 11 | input in, // input data 12 | output out // synchronized data 13 | ); 14 | 15 | reg [STAGES:0] shiftreg; 16 | always @(posedge clk) 17 | shiftreg[STAGES:0] <= {shiftreg[STAGES-1:0], in}; 18 | 19 | `ifdef SIM 20 | integer sync_delay; 21 | always @(posedge clk) 22 | sync_delay <= {$random} % 2; 23 | assign out = (|sync_delay & (|RND)) ? shiftreg[STAGES] : shiftreg[STAGES-1]; 24 | `else 25 | assign out = shiftreg[STAGES-1]; 26 | `endif 27 | 28 | endmodule 29 | -------------------------------------------------------------------------------- /.github/workflows/wheels.yml: -------------------------------------------------------------------------------- 1 | name: Wheels 2 | 3 | on: 4 | workflow_dispatch: 5 | release: 6 | types: 7 | - published 8 | 9 | jobs: 10 | build_wheels: 11 | name: Wheels lambdalib 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v6 16 | with: 17 | submodules: true 18 | - uses: hynek/build-and-inspect-python-package@v2 19 | 20 | publish: 21 | needs: [build_wheels] 22 | runs-on: ubuntu-latest 23 | permissions: 24 | id-token: write 25 | if: github.event_name == 'release' && github.event.action == 'published' 26 | 27 | steps: 28 | - uses: actions/download-artifact@v6 29 | with: 30 | name: Packages 31 | path: dist 32 | 33 | - name: Publish 34 | uses: pypa/gh-action-pypi-publish@v1.13.0 35 | 36 | save: 37 | needs: [publish] 38 | runs-on: ubuntu-latest 39 | 40 | permissions: 41 | contents: write 42 | 43 | steps: 44 | - uses: actions/download-artifact@v6 45 | with: 46 | name: Packages 47 | path: dist 48 | 49 | - name: Add wheels to GitHub release artifacts 50 | uses: softprops/action-gh-release@v2 51 | with: 52 | files: dist/*.whl 53 | -------------------------------------------------------------------------------- /lambdalib/analoglib/la_ring/la_ring.py: -------------------------------------------------------------------------------- 1 | from lambdalib.lambdalib import Lambda 2 | from lambdalib.stdlib import Inv 3 | from lambdalib.stdlib import Buf 4 | from lambdalib.stdlib import Nand2 5 | from lambdalib.stdlib import Nand3 6 | from lambdalib.stdlib import Nand4 7 | from lambdalib.stdlib import Nor2 8 | from lambdalib.stdlib import Nor3 9 | from lambdalib.stdlib import Nor4 10 | 11 | 12 | class Ring(Lambda): 13 | def __init__(self): 14 | name = 'la_ring' 15 | super().__init__(name, __file__) 16 | 17 | # deps 18 | self.add_depfileset(Inv(), depfileset='rtl', fileset='rtl') 19 | self.add_depfileset(Buf(), depfileset='rtl', fileset='rtl') 20 | self.add_depfileset(Nand2(), depfileset='rtl', fileset='rtl') 21 | self.add_depfileset(Nand3(), depfileset='rtl', fileset='rtl') 22 | self.add_depfileset(Nand4(), depfileset='rtl', fileset='rtl') 23 | self.add_depfileset(Nor2(), depfileset='rtl', fileset='rtl') 24 | self.add_depfileset(Nor3(), depfileset='rtl', fileset='rtl') 25 | self.add_depfileset(Nor4(), depfileset='rtl', fileset='rtl') 26 | 27 | 28 | if __name__ == "__main__": 29 | d = Ring() 30 | d.write_fileset(f"{d.name}.f", fileset="rtl") 31 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux5/rtl/la_vmux5.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: 5-Input one-hot vectorized mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux5 #(parameter W = 1, // width of mux 8 | parameter PROP = "DEFAULT" // cell property 9 | ) 10 | ( 11 | input sel4, 12 | input sel3, 13 | input sel2, 14 | input sel1, 15 | input sel0, 16 | input [W-1:0] in4, 17 | input [W-1:0] in3, 18 | input [W-1:0] in2, 19 | input [W-1:0] in1, 20 | input [W-1:0] in0, 21 | output [W-1:0] out 22 | ); 23 | 24 | assign out[W-1:0] = (({(W){sel0}} & in0[W-1:0]) | 25 | ({(W){sel1}} & in1[W-1:0]) | 26 | ({(W){sel2}} & in2[W-1:0]) | 27 | ({(W){sel3}} & in3[W-1:0]) | 28 | ({(W){sel4}} & in4[W-1:0])); 29 | 30 | endmodule 31 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_ioxtal/rtl/la_ioxtal.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: XTAL Oscillator IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_ioxtal 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter CFGW = 16, // width of core config bus 16 | parameter RINGW = 8 // width of io ring 17 | ) 18 | (// io pad signals 19 | inout padi, // xtal input pad 20 | inout pado, // xtal output pad 21 | inout vdd, // core supply 22 | inout vss, // core ground 23 | inout vddio, // io supply 24 | inout vssio, // io ground 25 | inout [RINGW-1:0] ioring, // generic ioring interface 26 | input [CFGW-1:0] cfg, // generic config interface 27 | // core interface 28 | output z // clock output to core 29 | ); 30 | 31 | assign z = padi; 32 | 33 | endmodule 34 | -------------------------------------------------------------------------------- /lambdalib/iolib/la_iocut/rtl/la_iocut.v: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Function: Supply Ring Cut IO Cell 3 | * Copyright: Lambda Project Authors. All rights Reserved. 4 | * License: MIT (see LICENSE file in Lambda repository) 5 | * 6 | * Docs: 7 | * 8 | * ../README.md 9 | * 10 | ****************************************************************************/ 11 | module la_iocut 12 | #( 13 | parameter PROP = "DEFAULT", // cell property 14 | parameter SIDE = "NO", // "NO", "SO", "EA", "WE" 15 | parameter RINGW = 8 // width of io ring 16 | ) 17 | ( 18 | // ground never cut 19 | inout vss, // core ground 20 | // cut these 21 | inout vdd0, // core supply from section before 22 | inout vdd1, // core supply from next section 23 | inout vddio0, // io supply from section before 24 | inout vddio1, // io supply from next section 25 | inout vssio0, // io ground from section before 26 | inout vssio1, // io ground from next section 27 | inout [RINGW-1:0] ioring0,// generic ioring interface from section before 28 | inout [RINGW-1:0] ioring1 // generic ioring interface from next section 29 | ); 30 | 31 | endmodule 32 | -------------------------------------------------------------------------------- /scripts/gen_classes.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import os 3 | from jinja2 import Environment, FileSystemLoader 4 | from pathlib import Path 5 | 6 | 7 | def main(): 8 | parser = argparse.ArgumentParser(description="""\ 9 | Generates boiler plate lambalib design classes 10 | """, formatter_class=argparse.RawDescriptionHelpFormatter) 11 | 12 | parser.add_argument("group", help="Group name") 13 | parser.add_argument("-name", help="Design name") 14 | 15 | args = parser.parse_args() 16 | 17 | env = Environment(loader=FileSystemLoader('.')) 18 | template = env.get_template('template.py.j2') 19 | 20 | lib = "../lambdalib" 21 | 22 | if args.name: 23 | lb_list = [args.name] 24 | else: 25 | base = Path(lib) / args.group 26 | paths = [p for p in base.iterdir() if p.is_dir()] 27 | lb_list = [os.path.basename(item) for item in paths] 28 | 29 | for item in lb_list: 30 | 31 | context = { 32 | 'module_name': item, 33 | 'class_name': item[3:].capitalize() 34 | } 35 | output = template.render(context) 36 | filename = f"{lib}/{args.group}/{item}/{item}.py" 37 | with open(filename, 'w') as f: 38 | f.write(output) 39 | f.write("\n") 40 | 41 | 42 | if __name__ == "__main__": 43 | main() 44 | -------------------------------------------------------------------------------- /lambdalib/auxlib/la_rsync/rtl/la_rsync.v: -------------------------------------------------------------------------------- 1 | //############################################################################# 2 | //# Function: Reset synchronizer (async assert, sync deassert) # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################# 6 | module la_rsync #(parameter PROP = "DEFAULT", 7 | parameter STAGES = 2, // synchronizer depth 8 | parameter RND = 1) // randomize sync 9 | 10 | ( 11 | input clk, // clock 12 | input nrst_in, // async reset input 13 | output nrst_out // async assert, sync deassert reset 14 | ); 15 | 16 | reg [STAGES:0] sync_pipe; 17 | 18 | always @(posedge clk or negedge nrst_in) 19 | if (!nrst_in) 20 | sync_pipe[STAGES:0] <= 'b0; 21 | else 22 | sync_pipe[STAGES:0] <= {sync_pipe[STAGES-1:0], 1'b1}; 23 | 24 | `ifdef SIM 25 | integer sync_delay; 26 | always @(posedge clk) 27 | sync_delay <= {$random} % 2; 28 | 29 | assign nrst_out = (|sync_delay & (|RND)) ? sync_pipe[STAGES] : sync_pipe[STAGES-1]; 30 | `else 31 | assign nrst_out = sync_pipe[STAGES-1]; 32 | `endif 33 | 34 | endmodule 35 | -------------------------------------------------------------------------------- /tests/test_paths.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | import lambdalib as ll 4 | 5 | 6 | @pytest.mark.parametrize("name", ll.analoglib.__all__) 7 | def test_lint_analoglib(name): 8 | assert getattr(ll.analoglib, name)().check_filepaths() 9 | 10 | 11 | @pytest.mark.parametrize("name", ll.auxlib.__all__) 12 | def test_lint_auxlib(name): 13 | assert getattr(ll.auxlib, name)().check_filepaths() 14 | 15 | 16 | @pytest.mark.parametrize("name", ll.ramlib.__all__) 17 | def test_lint_ramlib(name): 18 | assert getattr(ll.ramlib, name)().check_filepaths() 19 | 20 | 21 | @pytest.mark.parametrize("name", ll.veclib.__all__) 22 | def test_lint_veclib(name): 23 | assert getattr(ll.veclib, name)().check_filepaths() 24 | 25 | 26 | @pytest.mark.parametrize("name", ll.iolib.__all__) 27 | def test_lint_iolib(name): 28 | assert getattr(ll.iolib, name)().check_filepaths() 29 | 30 | 31 | @pytest.mark.parametrize("name", ll.padring.__all__) 32 | def test_lint_padring(name): 33 | assert getattr(ll.padring, name)().check_filepaths() 34 | 35 | 36 | @pytest.mark.parametrize("name", ll.fpgalib.__all__) 37 | def test_lint_fpgalib(name): 38 | assert getattr(ll.fpgalib, name)().check_filepaths() 39 | 40 | 41 | @pytest.mark.parametrize("name", ll.stdlib.__all__) 42 | def test_lint_stdlib(name): 43 | assert getattr(ll.stdlib, name)().check_filepaths() 44 | -------------------------------------------------------------------------------- /tests/test_generate.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pytest 3 | import lambdalib 4 | 5 | pytestmark = pytest.skip(reason="Skipping until SC update finished", 6 | allow_module_level=True) 7 | 8 | 9 | def test_check(): 10 | lambdalib.copy('./lambda') 11 | assert lambdalib.check('./lambda') 12 | 13 | 14 | def test_check_missing_file(): 15 | lambdalib.copy('./lambda', exclude=('la_and3',)) 16 | assert not lambdalib.check('./lambda') 17 | 18 | 19 | def test_check_extra_file(): 20 | lambdalib.copy('./lambda') 21 | with open('./lambda/la_testing_cells.v', 'w') as f: 22 | f.write('test') 23 | assert not lambdalib.check('./lambda') 24 | 25 | 26 | def test_check_missing_file_auxlib(): 27 | lambdalib.copy('./lambda', la_lib='auxlib', exclude=('la_clkmux4',)) 28 | assert lambdalib.check('./lambda', la_lib='auxlib') 29 | 30 | 31 | def test_check_all_files_auxlib(): 32 | lambdalib.copy('./lambda', la_lib='auxlib') 33 | assert lambdalib.check('./lambda', la_lib='auxlib') 34 | 35 | 36 | def test_copy(): 37 | lambdalib.copy('./lambda') 38 | 39 | assert os.path.exists('./lambda/la_and2.v') 40 | 41 | 42 | def test_copy_with_exclude(): 43 | lambdalib.copy('./lambda', exclude=('la_and3',)) 44 | 45 | assert os.path.exists('./lambda/la_and2.v') 46 | assert not os.path.exists('./lambda/la_and3.v') 47 | -------------------------------------------------------------------------------- /lambdalib/veclib/la_vmux6/rtl/la_vmux6.v: -------------------------------------------------------------------------------- 1 | //############################################################################ 2 | //# Function: 6-Input one-hot vectorized mux # 3 | //# Copyright: Lambda Project Authors. All rights Reserved. # 4 | //# License: MIT (see LICENSE file in Lambda repository) # 5 | //############################################################################ 6 | 7 | module la_vmux6 #(parameter W = 1, // width of mux 8 | parameter PROP = "DEFAULT" // cell property 9 | ) 10 | ( 11 | input sel5, 12 | input sel4, 13 | input sel3, 14 | input sel2, 15 | input sel1, 16 | input sel0, 17 | input [W-1:0] in5, 18 | input [W-1:0] in4, 19 | input [W-1:0] in3, 20 | input [W-1:0] in2, 21 | input [W-1:0] in1, 22 | input [W-1:0] in0, 23 | output [W-1:0] out //selected data output 24 | ); 25 | 26 | assign out[W-1:0] = (({(W){sel0}} & in0[W-1:0]) | 27 | ({(W){sel1}} & in1[W-1:0]) | 28 | ({(W){sel2}} & in2[W-1:0]) | 29 | ({(W){sel3}} & in3[W-1:0]) | 30 | ({(W){sel4}} & in4[W-1:0]) | 31 | ({(W){sel5}} & in5[W-1:0])); 32 | 33 | endmodule 34 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | "setuptools >= 64", 4 | "setuptools_scm[toml] >= 8" 5 | ] 6 | build-backend = "setuptools.build_meta" 7 | 8 | [tool.setuptools] 9 | include-package-data = true 10 | packages = ["lambdalib"] 11 | 12 | [project] 13 | name = "lambdalib" 14 | authors = [{name = "Zero ASIC"}] 15 | description = "Standardized ASIC design libraries" 16 | readme = "README.md" 17 | urls = {Homepage = "https://github.com/siliconcompiler/lambdalib"} 18 | requires-python = ">= 3.9" 19 | license = {file = "LICENSE"} 20 | dependencies = [ 21 | "siliconcompiler >= 0.35.0", 22 | "Jinja2 >= 3.1.3" 23 | ] 24 | dynamic = ['version'] 25 | 26 | [tool.setuptools.dynamic] 27 | version = {attr = "lambdalib.__version__"} 28 | 29 | [project.optional-dependencies] 30 | # Dev dependencies. 31 | test = [ 32 | "pytest == 8.4.2", 33 | "pytest-xdist==3.8.0", 34 | "pytest-timeout == 2.4.0", 35 | "cocotb == 2.0.1", 36 | "cocotb-bus == 0.3.0" 37 | ] 38 | 39 | lint = [ 40 | "flake8 == 7.3.0", 41 | "codespell == 2.4.1" 42 | ] 43 | 44 | [tool.pytest.ini_options] 45 | markers = [ 46 | "eda: this test requires EDA tools installed to run.", 47 | ] 48 | pythonpath = [ 49 | "tests" 50 | ] 51 | testpaths = [ 52 | "tests" 53 | ] 54 | timeout = "60" 55 | 56 | [tool.codespell] 57 | count = true 58 | quiet-level = 3 59 | ignore-words-list = 'inout,inouts,nin,te,dout' 60 | --------------------------------------------------------------------------------