mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-14 11:15:40 +00:00
Add initial codecov support
This commit is contained in:
parent
b88b73a99a
commit
f2f3f31646
5 changed files with 36 additions and 33 deletions
|
|
@ -126,10 +126,11 @@ clean:
|
|||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
@echo "Creating coverage HTML"
|
||||
@echo "Creating coverage HTML & Codecov report"
|
||||
@$(YOSYS) -qp 'help; help -all'
|
||||
@rm -rf $(COVERAGE_HTML)
|
||||
@llvm-profdata merge -sparse $(COVERAGE_DIR)/coverage_*.profraw -o $(COVERAGE_DIR)/yosys.profdata
|
||||
@llvm-cov export $(YOSYS) -instr-profile=$(COVERAGE_DIR)/yosys.profdata -format=lcov --compilation-dir=$(SRC_DIR) --ignore-filename-regex='(^|.*/)libs/.*|/usr/include/.*|$(subst /,\/,$(VERIFIC_DIR))/.*' > $(BUILD_DIR)/coverage.info
|
||||
@llvm-cov show $(YOSYS) -instr-profile=$(COVERAGE_DIR)/yosys.profdata -format=html -output-dir=$(COVERAGE_HTML) --compilation-dir=$(SRC_DIR) --ignore-filename-regex='(^|.*/)libs/.*|/usr/include/.*|$(subst /,\/,$(VERIFIC_DIR))/.*'
|
||||
|
||||
.PHONY: clean_coverage
|
||||
|
|
|
|||
|
|
@ -204,12 +204,12 @@ def create_bram(dsc_f, sim_f, ref_f, tb_f, k1, k2, or_next):
|
|||
v_stmts.append(" %s" % s)
|
||||
v_stmts.append("end")
|
||||
|
||||
print("module bram_%02d_%02d(%s);" % (k1, k2, ", ".join(v_ports)), file=sim_f)
|
||||
print("module bram_%02d_%02d(%s);" % (k1, k2, ", ".join(sorted(v_ports))), file=sim_f)
|
||||
for stmt in v_stmts:
|
||||
print(" %s" % stmt, file=sim_f)
|
||||
print("endmodule", file=sim_f)
|
||||
|
||||
print("module bram_%02d_%02d_ref(%s);" % (k1, k2, ", ".join(v_ports)), file=ref_f)
|
||||
print("module bram_%02d_%02d_ref(%s);" % (k1, k2, ", ".join(sorted(v_ports))), file=ref_f)
|
||||
for stmt in v_stmts:
|
||||
print(" %s" % stmt, file=ref_f)
|
||||
print("endmodule", file=ref_f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue