# Copyright Google LLC
# Copyright 2022 Thales DIS Design Services SAS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

###### This file is based on <cwd>/cva6-simuator.yaml

- tool: vcs
  compile:
    cmd:
      - "vcs -file <cwd>/dv/vcs.compile.option.f
              +incdir+<setting>
              +incdir+<user_extension>
             -f <cwd>/dv/files.f
             -f <cwd>/../env/corev-dv/cva6-files.f
             -full64
             -l <out>/compile.log
             -LDFLAGS '-Wl,--no-as-needed'
             -Mdir=<out>/vcs_simv.csrc
             -o <out>/vcs_simv <cmp_opts> <cov_opts> "
    cov_opts: >
      -cm_dir <out>/test.vdb
  sim:
    cmd: >
      <out>/vcs_simv +vcs+lic+wait gen="true" <sim_opts> +ntb_random_seed=<seed> <cov_opts>
    cov_opts: >
      -cm_dir <out>/test.vdb -cm_log /dev/null -cm_name test_<seed>_<test_id>
