blob: b7fd42a263e25e74e40ce3ed9a09a6f6e4f3fcf4 [file] [log] [blame]
#!/bin/bash
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# RDC stands for reset domain crossing. This script uses Meridian RDC,
# which is an RDC linting tool.
#
# Usage: To run rdc_lint on module foo, type
# rdc_lint foo
#
# Here are three examples:
# rdc_lint gpio
# rdc_lint prim_fifo_async
# rdc_lint top_earlgrey
#-------------------------------------------------------------------------
# set LINT_TOP env variable
#-------------------------------------------------------------------------
export LINT_TOP=$1
#-------------------------------------------------------------------------
# use fusesoc to generate file list
#-------------------------------------------------------------------------
fusesoc --cores-root .. sim --build-only formal > /dev/null 2>&1
#-------------------------------------------------------------------------
# run meridian CDC lint
#-------------------------------------------------------------------------
mrdc -i rdc_lint.tcl -wait -log rdc.log