Livt packages
Livt.Math
Version 1.7.2
Reusable integer and fixed-point arithmetic, complex numbers, trigonometry, and statistics for FPGA applications written in Livt.
Published files (90)
- CordicAtan2MagnitudeQ15LifecycleTb.vhd
- CordicSinCosQ15LifecycleTb.vhd
- CordicSinCosQ15SynthesisTop.vhd
- cordic_q15_oracle.py
- cordic_vectoring_q15_oracle.py
- IntegerDivisionResetTb.vhd
- measure_cordic_ice40.py
- special_functions_oracle.py
- test_cordic_sincos_q15.py
- test_cordic_structure.py
- test_cordic_vectoring_lifecycle.py
- test_cordic_vectoring_structure.py
- test_special_function_structure.py
- test_wide_pipeline.py
- WideArithmeticResetTb.vhd
tests/rtl/test_cordic_vectoring_lifecycle.py
"""Compile and run the vectoring CORDIC lifecycle test after `livt build`."""
from pathlib import Path
import subprocess
APP = Path(__file__).resolve().parents[2]
WORK = APP / "out" / "cordic-vectoring-lifecycle-test"
def main() -> None:
WORK.mkdir(parents=True, exist_ok=True)
files = [
APP / "out/debug/lib/Livt.Lang.Package.vhd",
APP / "out/debug/lib/Livt.Lang.IContext.Package.vhd",
APP / "out/debug/lib/Livt.Lang.IComponent.Package.vhd",
APP / "out/debug/main/Livt.Math.Trigonometry.CordicAtan2MagnitudeQ15Primitive.Package.vhd",
APP / "out/debug/main/Livt.Math.Trigonometry.CordicAtan2MagnitudeQ15.Package.vhd",
APP / "out/debug/main/CordicAtan2MagnitudeQ15Primitive.vhd",
APP / "out/debug/main/Livt.Math.Trigonometry.CordicAtan2MagnitudeQ15.vhd",
APP / "tests/rtl/CordicAtan2MagnitudeQ15LifecycleTb.vhd",
]
subprocess.run(["ghdl", "-a", "--std=08", *map(str, files)], cwd=WORK, check=True)
subprocess.run(
["ghdl", "-e", "--std=08", "cordic_atan2_magnitude_q15_lifecycle_tb"],
cwd=WORK,
check=True,
)
subprocess.run(
[
"ghdl", "-r", "--std=08",
"cordic_atan2_magnitude_q15_lifecycle_tb",
"--assert-level=error",
],
cwd=WORK,
check=True,
)
if __name__ == "__main__":
main()