[test] add regression test to validate compilation of openfpga cell library files
This commit is contained in:
parent
d4992fd9ad
commit
c8ff3fc8dc
|
@ -0,0 +1,29 @@
|
||||||
|
#
|
||||||
|
# OpenFPGA cell library Makefile
|
||||||
|
# ==============================
|
||||||
|
#
|
||||||
|
# Check correctness of the cell library files
|
||||||
|
|
||||||
|
SHELL = bash
|
||||||
|
PYTHON_EXEC ?= python3
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
export COMMENT_EXTRACT
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
help:
|
||||||
|
@${PYTHON_EXEC} -c "$$COMMENT_EXTRACT"
|
||||||
|
|
||||||
|
compile_verilog:
|
||||||
|
# This command checks the compile compatibility of Verilog files
|
||||||
|
for f in `cat verilog_sources.f`; do iverilog $$f; done
|
||||||
|
|
||||||
|
# Functions to extract comments from Makefiles
|
||||||
|
define COMMENT_EXTRACT
|
||||||
|
import re
|
||||||
|
with open ('Makefile', 'r' ) as f:
|
||||||
|
matches = re.finditer('^([a-zA-Z-_]*):.*\n#(.*)', f.read(), flags=re.M)
|
||||||
|
for _, match in enumerate(matches, start=1):
|
||||||
|
header, content = match[1], match[2]
|
||||||
|
print(f" {header:10} {content}")
|
||||||
|
endef
|
|
@ -0,0 +1,23 @@
|
||||||
|
verilog/adder.v
|
||||||
|
verilog/aib.v
|
||||||
|
verilog/buf4.v
|
||||||
|
verilog/dff.v
|
||||||
|
verilog/dpram.v
|
||||||
|
verilog/dpram16k.v
|
||||||
|
verilog/dpram1k.v
|
||||||
|
verilog/dpram8k.v
|
||||||
|
verilog/dpram_2048x8.v
|
||||||
|
verilog/frac_mem_32k.v
|
||||||
|
verilog/frac_mult_16x16.v
|
||||||
|
verilog/gpio.v
|
||||||
|
verilog/inv.v
|
||||||
|
verilog/latch.v
|
||||||
|
verilog/lut6.v
|
||||||
|
verilog/mult_32x32.v
|
||||||
|
verilog/mult_36x36.v
|
||||||
|
verilog/mult_8x8.v
|
||||||
|
verilog/mux2.v
|
||||||
|
verilog/or2.v
|
||||||
|
verilog/spram_4x1.v
|
||||||
|
verilog/sram.v
|
||||||
|
verilog/tap_buf4.v
|
Loading…
Reference in New Issue