diff --git a/dv/uvm/core_ibex/Makefile b/dv/uvm/core_ibex/Makefile index 46b18e33..12ea81c9 100644 --- a/dv/uvm/core_ibex/Makefile +++ b/dv/uvm/core_ibex/Makefile @@ -236,8 +236,6 @@ tests-and-seeds := \ --iterations $(ITERATIONS) \ --ibex-config $(IBEX_CONFIG)) -REGEX_EMPTY_LINES := '/^$$/d' - ############################################################################### ############################################################################### # Build the Random Instruction Generator @@ -326,7 +324,6 @@ $(metadata)/.instr_gen.run.stamp: \ +pmp_granularity=${PMP_GRANULARITY} +tvec_alignment=8" \ --debug $(INSTR_GEN_RUN_COMMANDS) # Write all the commands to execute into here... @ # Construct the sub-makefile from the commands, then call it - @sed -i $(REGEX_EMPTY_LINES) $(INSTR_GEN_RUN_COMMANDS) $(verb)./scripts/construct_makefile.py \ --output=$(OUT-SEED)/instr_gen/run.mk \ --test_cmds=$(INSTR_GEN_RUN_COMMANDS) \ @@ -383,7 +380,6 @@ $(metadata)/.iss.run.stamp: \ ${_RISCV_DV_OPTS} \ --debug $(ISS_COMMANDS) # Write all the commands to execute into here... @ # Construct the sub-makefile from the commands, then call it - @sed -i $(REGEX_EMPTY_LINES) $(ISS_COMMANDS) $(verb)./scripts/construct_makefile.py \ --output=$(OUT-SEED)/instr_gen/iss.mk \ --test_cmds=$(ISS_COMMANDS) diff --git a/dv/uvm/core_ibex/scripts/construct_makefile.py b/dv/uvm/core_ibex/scripts/construct_makefile.py index d2b6ec4e..5bb94c51 100755 --- a/dv/uvm/core_ibex/scripts/construct_makefile.py +++ b/dv/uvm/core_ibex/scripts/construct_makefile.py @@ -19,10 +19,17 @@ def transform(discard_stdstreams: bool, with open(cmdlist_path) as f, \ open(makefile_path, 'w', encoding='UTF-8') as outfile: - for i, line in enumerate(f): - outfile.write(f'{i}:\n') + ctr = 0 + for line in f: + line = line.strip() + if not line: + continue + + outfile.write(f'{ctr}:\n') outfile.write('\t' + line.strip() + tail) - outfile.write(f'CMDS := $(shell seq 0 {i})\n') + ctr += 1 + + outfile.write(f'CMDS := $(shell seq 0 {ctr - 1})\n') outfile.write('all: $(CMDS)')