CAPI=2:
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv_verilator:prim_ascon_round_tb"
description: "Ascon Permutation Verilator TB"
filesets:
  files_rtl:
    depend:
      - lowrisc:prim:prim_ascon
      - lowrisc:dv:ascon_model_dpi
    files:
      - rtl/prim_ascon_round_tb.sv
    file_type: systemVerilogSource

  files_dv_verilator:
    depend:
      - lowrisc:dv_verilator:simutil_verilator

    files:
      - cpp/prim_ascon_round_tb.cc
    file_type: cppSource

targets:
  default:
    default_tool: verilator
    filesets:
      - files_rtl
      - files_dv_verilator
    toplevel: prim_ascon_round_tb
    tools:
      verilator:
        mode: cc
        verilator_options:
# Disabling tracing reduces compile times by multiple times, but doesn't have a
# huge influence on runtime performance. (Based on early observations.)
          - '--trace'
          - '--trace-fst' # this requires -DVM_TRACE_FMT_FST in CFLAGS below!
          - '--trace-structs'
          - '--trace-params'
          - '--trace-max-array 1024'
# compiler flags
#
# -O
#   Optimization levels have a large impact on the runtime performance of the
#   simulation model. -O2 and -O3 are pretty similar, -Os is slower than -O2/-O3
          - '-CFLAGS "-std=c++17 -Wall -DVM_TRACE_FMT_FST -DTOPLEVEL_NAME=prim_ascon_round_tb -g -O0"'
          - '-LDFLAGS "-pthread -lutil -lelf"'
          - "-Wall"
          # XXX: Cleanup all warnings and remove this option
          # (or make it more fine-grained at least)
          - "-Wno-fatal"
