1# Copyright (c) 2024 Antmicro <www.antmicro.com>
2#
3# SPDX-License-Identifier: Apache-2.0
4
5from west.commands import WestCommand
6from run_common import add_parser_common, do_run_common
7
8EXPORT_DESCRIPTION = '''\
9Simulate the board on a runner of choice using generated artifacts.
10'''
11
12
13class Simulate(WestCommand):
14
15    def __init__(self):
16        super(Simulate, self).__init__(
17            'simulate',
18            # Keep this in sync with the string in west-commands.yml.
19            'simulate board',
20            EXPORT_DESCRIPTION,
21            accepts_unknown_args=True)
22
23        self.runner_key = 'sim-runner'  # in runners.yaml
24
25    def do_add_parser(self, parser_adder):
26        return add_parser_common(self, parser_adder)
27
28    def do_run(self, my_args, runner_args):
29        do_run_common(self, my_args, runner_args)
30