Skip to content

Commit

Permalink
Replace assert and fatal for all generated RTLs
Browse files Browse the repository at this point in the history
  • Loading branch information
poemonsense committed Jan 23, 2024
1 parent ee6dc8b commit f0810a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ verilog: $(TOP_V)
$(SIM_TOP_V): $(SCALA_FILE) $(TEST_FILE)
mkdir -p $(@D)
mill -i generator.test.runMain $(SIMTOP) $(MILL_ARGS)
@sed -i 's/$$fatal/xs_assert(`__LINE__)/g' $(SIM_TOP_V)
@sed -i -e "s/\$$error(/\$$fwrite(32\'h80000002, /g" $(SIM_TOP_V)
@for file in $(RTL_DIR)/*.$(RTL_SUFFIX); do \
sed -i -e 's/$$fatal/xs_assert(`__LINE__)/g' "$$file"; \
sed -i -e "s/\$$error(/\$$fwrite(32\'h80000002, /g" "$$file"; \
done

sim-verilog: $(SIM_TOP_V)

Expand Down

0 comments on commit f0810a9

Please sign in to comment.