Files
yosys/docs/source/code_examples/extensions/Makefile
T

29 lines
900 B
Makefile
Raw Normal View History

2026-05-22 12:31:30 +02:00
include ../../../common.mk
2014-06-22 12:50:29 +02:00
2024-10-07 21:56:23 +13:00
.PHONY: all dots examples
all: dots examples
dots: test1.dot my_cmd.so
examples: test0.log test1.log test2.log my_cmd.so
2023-12-13 11:34:42 +13:00
2014-06-22 12:50:29 +02:00
my_cmd.so: my_cmd.cc
2026-05-22 12:31:30 +02:00
@$(YOSYS_CONFIG) --exec --cxx --cxxflags --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
2014-06-22 12:50:29 +02:00
test0.log: my_cmd.so
2026-05-22 12:31:30 +02:00
@$(YOSYS) -QTl test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' -f verilog absval_ref.v >/dev/null 2>&1
@mv test0.log_new test0.log
2014-06-22 12:50:29 +02:00
test1.log: my_cmd.so
2026-05-22 12:31:30 +02:00
@$(YOSYS) -QTl test1.log_new -m ./my_cmd.so -p 'clean; test1; dump' -f verilog absval_ref.v >/dev/null 2>&1
@mv test1.log_new test1.log
2014-06-22 12:50:29 +02:00
2024-01-25 12:35:03 +13:00
test1.dot: my_cmd.so
2026-05-22 12:31:30 +02:00
@$(YOSYS) -m ./my_cmd.so -p 'test1; show -format dot -prefix test1' >/dev/null 2>&1
2023-12-13 11:34:42 +13:00
2014-06-22 12:50:29 +02:00
test2.log: my_cmd.so
2026-05-22 12:31:30 +02:00
@$(YOSYS) -QTl test2.log_new -m ./my_cmd.so -p 'hierarchy -top test; test2' -f verilog sigmap_test.v >/dev/null 2>&1
@mv test2.log_new test2.log
2014-06-22 12:50:29 +02:00
2024-01-25 12:35:03 +13:00
.PHONY: clean
clean:
2026-05-22 12:31:30 +02:00
@rm -f *.d *.so *.dot