Skip to content

Commit

Permalink
Updated run-docker.sh and added verification step NODE_BY_NODE_RTLSIM
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahxy13 committed Jun 25, 2024
1 parent 9afa88b commit 0db1791
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ elif [ "$1" = "build_custom" ]; then
BUILD_CUSTOM_DIR=$(readlink -f "$2")
FLOW_NAME=${3:-build}
FINN_DOCKER_EXTRA+="-v $BUILD_CUSTOM_DIR:$BUILD_CUSTOM_DIR -w $BUILD_CUSTOM_DIR "
FINN_DOCKER_EXTRA+="-v $BUILD_CUSTOM_DIR/../../ci:$BUILD_CUSTOM_DIR/../../ci "
DOCKER_INTERACTIVE="-it"
#FINN_HOST_BUILD_DIR=$BUILD_DATAFLOW_DIR/build
gecho "Running build_custom: $BUILD_CUSTOM_DIR/$FLOW_NAME.py"
Expand Down Expand Up @@ -214,6 +215,7 @@ DOCKER_EXEC+="-v $SCRIPTPATH:$SCRIPTPATH "
DOCKER_EXEC+="-v $FINN_HOST_BUILD_DIR:$FINN_HOST_BUILD_DIR "
DOCKER_EXEC+="-e FINN_BUILD_DIR=$FINN_HOST_BUILD_DIR "
DOCKER_EXEC+="-e FINN_ROOT="$SCRIPTPATH" "
DOCKER_EXEC+="-e VERIFICATION_EN=$VERIFICATION_EN "
DOCKER_EXEC+="-e LOCALHOST_URL=$LOCALHOST_URL "
DOCKER_EXEC+="-e VIVADO_IP_CACHE=$VIVADO_IP_CACHE "
DOCKER_EXEC+="-e PYNQ_BOARD=$PYNQ_BOARD "
Expand Down
2 changes: 2 additions & 0 deletions src/finn/builder/build_dataflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ class VerificationStepType(str, Enum):
STREAMLINED_PYTHON = "streamlined_python"
#: verify after step_apply_folding_config, using C++ for each HLS node
FOLDED_HLS_CPPSIM = "folded_hls_cppsim"
#: verify after step_hw_ipgen
NODE_BY_NODE_RTLSIM = "node_by_node_rtlsim"
#: verify after step_create_stitched_ip, using stitched-ip Verilog
STITCHED_IP_RTLSIM = "stitched_ip_rtlsim"

Expand Down
5 changes: 5 additions & 0 deletions src/finn/builder/build_dataflow_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ def step_hw_ipgen(model: ModelWrapper, cfg: DataflowBuildConfig):
estimate_layer_resources_hls = model.analysis(hls_synth_res_estimation)
with open(report_dir + "/estimate_layer_resources_hls.json", "w") as f:
json.dump(estimate_layer_resources_hls, f, indent=2)

if VerificationStepType.NODE_BY_NODE_RTLSIM in cfg._resolve_verification_steps():
model = model.transform(PrepareRTLSim())
model = model.transform(SetExecMode("rtlsim"))
verify_step(model, cfg, "node_by_node_rtlsim", need_parent=True)
return model


Expand Down

0 comments on commit 0db1791

Please sign in to comment.