2023-06-15 12:24:35 -04:00
|
|
|
# Copyright 2023 (C) Peter McGoron
|
|
|
|
# This file is a part of Upsilon, a free and open source software project.
|
|
|
|
# For license terms, refer to the files in `doc/copying` in the Upsilon
|
|
|
|
# source distribution.
|
|
|
|
|
2023-03-15 14:30:08 -04:00
|
|
|
# Generate verilog from m4 file
|
2023-05-10 14:35:57 -04:00
|
|
|
#m4 -P --synclines $< | awk -v filename=$< '/^#line/ {printf("`line %d %s 0\n", $$2, filename); next} {print}' > $@
|
|
|
|
# NOTE: f4pga yosys does not support `line directives. Use above for debug.
|
2023-03-15 14:30:08 -04:00
|
|
|
%.v: %.v.m4
|
2023-03-15 17:08:55 -04:00
|
|
|
m4 -P $< > $@
|
2023-03-16 12:32:03 -04:00
|
|
|
%_preprocessed.v: %.v
|
|
|
|
verilator -P -E $< > $@
|