diff --git a/.github/scripts/run-linux-poweroff-externally-provisioned.py b/.github/scripts/run-linux-poweroff-externally-provisioned.py index 1833c5b3..2517ae9d 100755 --- a/.github/scripts/run-linux-poweroff-externally-provisioned.py +++ b/.github/scripts/run-linux-poweroff-externally-provisioned.py @@ -7,6 +7,7 @@ from pathlib import Path from fabric.api import prefix, settings, run, execute # type: ignore from common import manager_fsim_dir, set_fabric_firesim_pem +from utils import search_match_in_last_workloads_output_file from ci_variables import ci_env sys.path.append(ci_env['GITHUB_WORKSPACE'] + "/deploy") from awstools.awstools import get_instances_with_filter, get_private_ips_for_instances @@ -84,15 +85,20 @@ def run_linux_poweroff_externally_provisioned(): print(f"Workload {workload} failed.") sys.exit(rc) else: - print(f"Workload run {workload} successful. Checking uartlogs...") + print(f"Workload run {workload} successful. Checking workload files...") - # verify that linux booted and the pass printout was given - match_key = "*** PASSED ***" - out = run(f"""cd deploy/results-workload/ && LAST_DIR=$(ls | tail -n1) && if [ -d "$LAST_DIR" ]; then grep -n "{match_key}" $LAST_DIR/*/uartlog; fi""") - out_split = [e for e in out.split('\n') if match_key in e] - print(f"DEBUG: out_split = {out_split}") - out_count = len(out_split) - assert out_count == num_passes, f"Uartlog is malformed for some runs: *** PASSED *** found {out_count} times (!= {num_passes}). Something went wrong." + def check(match_key, file_name = 'uartlog'): + out_count = search_match_in_last_workloads_output_file(file_name, match_key) + assert out_count == num_passes, f"Workload {file_name} files are malformed: '{match_key}' found {out_count} times (!= {num_passes}). Something went wrong." + + # first driver completed successfully + check('*** PASSED ***') + + # verify login was reached (i.e. linux booted) + check('running /etc/init.d/S99run') + + # verify reaching poweroff + check('Power down') print(f"Workload run {workload} successful.") diff --git a/.github/scripts/run-linux-poweroff-vitis.py b/.github/scripts/run-linux-poweroff-vitis.py index 7efa6ecd..bcbfdcd7 100755 --- a/.github/scripts/run-linux-poweroff-vitis.py +++ b/.github/scripts/run-linux-poweroff-vitis.py @@ -4,6 +4,7 @@ import sys from fabric.api import prefix, run, settings, execute # type: ignore from ci_variables import ci_env +from utils import search_match_in_last_workloads_output_file def run_linux_poweroff_vitis(): """ Runs Base Vitis Build """ @@ -56,15 +57,20 @@ def run_linux_poweroff_vitis(): print(f"Workload {workload} failed.") sys.exit(rc) else: - print(f"Workload run {workload} successful. Checking uartlogs...") + print(f"Workload run {workload} successful. Checking workload files...") - # verify that linux booted and the pass printout was given - match_key = "*** PASSED ***" - out = run(f"""cd deploy/results-workload/ && LAST_DIR=$(ls | tail -n1) && if [ -d "$LAST_DIR" ]; then grep -n "{match_key}" $LAST_DIR/*/uartlog; fi""") - out_split = [e for e in out.split('\n') if match_key in e] - print(f"DEBUG: out_split = {out_split}") - out_count = len(out_split) - assert out_count == num_passes, f"Uartlog is malformed for some runs: *** PASSED *** found {out_count} times (!= {num_passes}). Something went wrong." + def check(match_key, file_name = 'uartlog'): + out_count = search_match_in_last_workloads_output_file(file_name, match_key) + assert out_count == num_passes, f"Workload {file_name} files are malformed: '{match_key}' found {out_count} times (!= {num_passes}). Something went wrong." + + # first driver completed successfully + check('*** PASSED ***') + + # verify login was reached (i.e. linux booted) + check('running /etc/init.d/S99run') + + # verify reaching poweroff + check('Power down') print(f"Workload run {workload} successful.") diff --git a/.github/scripts/run-linux-poweroff.py b/.github/scripts/run-linux-poweroff.py index 4642950d..1a56a966 100755 --- a/.github/scripts/run-linux-poweroff.py +++ b/.github/scripts/run-linux-poweroff.py @@ -6,6 +6,7 @@ from pathlib import Path from fabric.api import prefix, settings, run, execute # type: ignore from common import manager_fsim_dir, set_fabric_firesim_pem +from utils import search_match_in_last_workloads_output_file from ci_variables import ci_env def run_linux_poweroff(): @@ -45,15 +46,20 @@ def run_linux_poweroff(): run(f"firesim terminaterunfarm -q -c {workload}") sys.exit(rc) else: - print(f"Workload run {workload} successful. Checking uartlogs...") + print(f"Workload run {workload} successful. Checking workload files...") - # verify that linux booted and the pass printout was given - match_key = "*** PASSED ***" - out = run(f"""cd deploy/results-workload/ && LAST_DIR=$(ls | tail -n1) && if [ -d "$LAST_DIR" ]; then grep -n "{match_key}" $LAST_DIR/*/uartlog; fi""") - out_split = [e for e in out.split('\n') if match_key in e] - print(f"DEBUG: out_split = {out_split}") - out_count = len(out_split) - assert out_count >= num_passes, f"Uartlog is malformed for some runs: *** PASSED *** found {out_count} times (!= {num_passes}). Something went wrong." + def check(match_key, file_name = 'uartlog'): + out_count = search_match_in_last_workloads_output_file(file_name, match_key) + assert out_count >= num_passes, f"Workload {file_name} files are malformed: '{match_key}' found {out_count} times (!= {num_passes}). Something went wrong." + + # first driver completed successfully + check('*** PASSED ***') + + # verify login was reached (i.e. linux booted) + check('running /etc/init.d/S99run') + + # verify reaching poweroff + check('Power down') print(f"Workload run {workload} successful.") diff --git a/.github/scripts/utils.py b/.github/scripts/utils.py new file mode 100644 index 00000000..47739876 --- /dev/null +++ b/.github/scripts/utils.py @@ -0,0 +1,9 @@ +from fabric.api import run # type: ignore + +def search_match_in_last_workloads_output_file(file_name: str = "uartlog", match_key: str = "*** PASSED ***") -> int: + # if grep doesn't find any results, this command will fail + out = run(f"""cd deploy/results-workload/ && LAST_DIR=$(ls | tail -n1) && if [ -d "$LAST_DIR" ]; then grep -an "{match_key}" $LAST_DIR/*/{file_name}; fi""") + out_split = [e for e in out.split('\n') if match_key in e] + out_count = len(out_split) + print(f"Found {out_count} '{match_key}' strings in {file_name}") + return out_count diff --git a/deploy/sample-backup-configs/sample_config_build_recipes.yaml b/deploy/sample-backup-configs/sample_config_build_recipes.yaml index 6936f82f..8713c58f 100644 --- a/deploy/sample-backup-configs/sample_config_build_recipes.yaml +++ b/deploy/sample-backup-configs/sample_config_build_recipes.yaml @@ -222,7 +222,7 @@ vitis_firesim_gemmini_rocket_singlecore_no_nic: PLATFORM_CONFIG: BaseVitisConfig deploy_triplet: null platform_config_args: - fpga_frequency: 60 + fpga_frequency: 30 build_strategy: TIMING post_build_hook: null metasim_customruntimeconfig: null diff --git a/deploy/sample-backup-configs/sample_config_hwdb.yaml b/deploy/sample-backup-configs/sample_config_hwdb.yaml index 83bb0ba6..66db9ad1 100644 --- a/deploy/sample-backup-configs/sample_config_hwdb.yaml +++ b/deploy/sample-backup-configs/sample_config_hwdb.yaml @@ -11,56 +11,55 @@ # DOCREF START: Example HWDB Entry firesim_boom_singlecore_nic_l2_llc4mb_ddr3: - agfi: agfi-027bcdf407fd42763 + agfi: agfi-0ac731f61d3f31817 deploy_triplet_override: null custom_runtime_config: null # DOCREF END: Example HWDB Entry firesim_boom_singlecore_no_nic_l2_llc4mb_ddr3: - agfi: agfi-0c271ce99615bb4be + agfi: agfi-0a60b1241fe70aad8 deploy_triplet_override: null custom_runtime_config: null firesim_rocket_quadcore_nic_l2_llc4mb_ddr3: - agfi: agfi-089ca9b44772d72a6 + agfi: agfi-0c82dc422cf6408a9 deploy_triplet_override: null custom_runtime_config: null firesim_rocket_quadcore_no_nic_l2_llc4mb_ddr3: - agfi: agfi-038d5ad185a5f6b53 + agfi: agfi-09a9331f468822063 deploy_triplet_override: null custom_runtime_config: null firesim_supernode_rocket_singlecore_nic_l2_lbp: - agfi: agfi-0cd2ee79d1faaaaf7 + agfi: agfi-074d5fb88949da9e3 deploy_triplet_override: null custom_runtime_config: null firesim_rocket_singlecore_no_nic_l2_lbp: - agfi: agfi-0f18aee8d6f8ff86d + agfi: agfi-0bd3e59a6291be8d8 deploy_triplet_override: null custom_runtime_config: null firesim_rocket_singlecore_sha3_nic_l2_llc4mb_ddr3: - agfi: agfi-0d07f2a820b846e68 + agfi: agfi-0a3aa8485fc964a28 deploy_triplet_override: null custom_runtime_config: null firesim_rocket_singlecore_sha3_no_nic_l2_llc4mb_ddr3: - agfi: agfi-0bc5b83183e6ddc23 + agfi: agfi-037fd4a1261e58c73 deploy_triplet_override: null custom_runtime_config: null firesim_rocket_singlecore_sha3_no_nic_l2_llc4mb_ddr3_printf: - agfi: agfi-0e94877b2b93791dd + agfi: agfi-037978a7a54662358 deploy_triplet_override: null custom_runtime_config: null firesim_gemmini_printf_rocket_singlecore_no_nic: - agfi: agfi-08205a63018dcacbf + agfi: agfi-03d8cc99122d5fb41 deploy_triplet_override: null custom_runtime_config: null firesim_gemmini_rocket_singlecore_no_nic: - agfi: agfi-03eeebf1a917bc38b + agfi: agfi-09127fbc65317005a deploy_triplet_override: null custom_runtime_config: null vitis_firesim_rocket_singlecore_no_nic: - xclbin: https://firesim-ci-vitis-xclbins.s3.us-west-2.amazonaws.com/firesim_rocket_singlecore_no_nic_d90a28.xclbin + xclbin: https://firesim-ci-vitis-xclbins.s3.us-west-2.amazonaws.com/vitis_firesim_rocket_singlecore_no_nic_c12936.xclbin deploy_triplet_override: FireSim-FireSimRocketMMIOOnlyConfig-BaseVitisConfig custom_runtime_config: null vitis_firesim_gemmini_rocket_singlecore_no_nic: xclbin: https://firesim-ci-vitis-xclbins.s3.us-west-2.amazonaws.com/vitis_firesim_gemmini_rocket_singlecore_no_nic_36bfe5.xclbin deploy_triplet_override: FireSim-FireSimLeanGemminiRocketMMIOOnlyConfig-BaseVitisConfig custom_runtime_config: null - diff --git a/docs/Advanced-Usage/Miscellaneous-Tips.rst b/docs/Advanced-Usage/Miscellaneous-Tips.rst index 1cca5ddf..d3aa489c 100644 --- a/docs/Advanced-Usage/Miscellaneous-Tips.rst +++ b/docs/Advanced-Usage/Miscellaneous-Tips.rst @@ -62,7 +62,7 @@ the simulated node: ports[1] = new SSHPort(1); #endif - + #ifdef MACPORTSCONFIG uint16_t mac2port[3] {1, 2, 0}; #endif @@ -83,7 +83,7 @@ the simulated node: 9. Run ``firesim runworkload``. Confirm that the node has booted to the login prompt in the fsim0 screen. -10. To ssh into the simulated machine, you will need to first ssh onto the Run Farm instance, then ssh into the IP address of the simulated node (172.16.0.2), username root, password firesim. You should also prefix with TERM=linux to get backspace to work correctly: So: +10. To ssh into the simulated machine, you will need to first ssh onto the Run Farm instance, then ssh into the IP address of the simulated node (172.16.0.2), username ``root``. You should also prefix with TERM=linux to get backspace to work correctly: So: :: diff --git a/docs/Running-OnPrem-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst b/docs/Running-OnPrem-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst index 90875bf4..50bf5bba 100644 --- a/docs/Running-OnPrem-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst +++ b/docs/Running-OnPrem-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst @@ -293,8 +293,8 @@ with a Linux login prompt, like so: You can ignore the messages about the network -- that is expected because we are simulating a design without a NIC. -Now, you can login to the system! The username is ``root`` and the password is -``firesim``. At this point, you should be presented with a regular console, +Now, you can login to the system! The username is ``root``. +At this point, you should be presented with a regular console, where you can type commands into the simulation and run programs. For example: :: diff --git a/docs/Running-Simulations-Tutorial/Running-a-Cluster-Simulation.rst b/docs/Running-Simulations-Tutorial/Running-a-Cluster-Simulation.rst index a7f39499..394a542d 100644 --- a/docs/Running-Simulations-Tutorial/Running-a-Cluster-Simulation.rst +++ b/docs/Running-Simulations-Tutorial/Running-a-Cluster-Simulation.rst @@ -382,8 +382,8 @@ If you also ran the single-node no-nic simulation you'll notice a difference in this boot output -- here, Linux sees the NIC and its assigned MAC address and automatically brings up the ``eth0`` interface at boot. -Now, you can login to the system! The username is ``root`` and the password is -``firesim``. At this point, you should be presented with a regular console, +Now, you can login to the system! The username is ``root``. +At this point, you should be presented with a regular console, where you can type commands into the simulation and run programs. For example: :: diff --git a/docs/Running-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst b/docs/Running-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst index c79e0af0..5d837ce2 100644 --- a/docs/Running-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst +++ b/docs/Running-Simulations-Tutorial/Running-a-Single-Node-Simulation.rst @@ -358,8 +358,8 @@ with a Linux login prompt, like so: You can ignore the messages about the network -- that is expected because we are simulating a design without a NIC. -Now, you can login to the system! The username is ``root`` and the password is -``firesim``. At this point, you should be presented with a regular console, +Now, you can login to the system! The username is ``root``. +At this point, you should be presented with a regular console, where you can type commands into the simulation and run programs. For example: :: diff --git a/target-design/chipyard b/target-design/chipyard index 2398a7d1..3b303ba3 160000 --- a/target-design/chipyard +++ b/target-design/chipyard @@ -1 +1 @@ -Subproject commit 2398a7d13c615be2dd77ff78546e05e68e975d20 +Subproject commit 3b303ba37d3a9f197ca1cb1b4865649f7b586cb8