Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 9ac899a

Browse files
authored
Merge pull request #117 from bjones1/verilog-test-vectors
Add: Copy over a Verilog test bench if present.
2 parents a49944d + 3e81192 commit 9ac899a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bookserver/internal/scheduled_builder.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def armv7_builder(
587587
def verilog_builder(
588588
file_path, cwd, sphinx_base_path, sphinx_source_path, sphinx_out_path, source_path
589589
):
590-
# Build the test code with a random verification code.
590+
# Preprocess the test code with a random verification code, so that the student's source code won't hae access to the verification code.
591591
out_list = []
592592
verification_code = get_verification_code()
593593
test_file_path = os.path.join(
@@ -612,7 +612,7 @@ def verilog_builder(
612612
out_list,
613613
)
614614

615-
# Compile the source and test code.
615+
# Compile the source and preprocessed test code.
616616
exe_path = file_path + ".exe"
617617
report_subprocess(
618618
[
@@ -627,6 +627,11 @@ def verilog_builder(
627627
out_list,
628628
)
629629

630+
# Copy over any test vectors.
631+
copy_test_file_to_tmp(
632+
file_path, cwd, sphinx_base_path, sphinx_source_path, source_path, ".txt"
633+
)
634+
630635
# Run the simulation.
631636
report_subprocess(
632637
runguard([exe_path], cwd, memsize_kb=100000),

0 commit comments

Comments
 (0)