Skip to content

Add chipsalliance/sv-tests to CI #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions examples/chipsalliance-sv-tests/ebmc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from BaseRunner import BaseRunner
import os

class ebmc(BaseRunner):
def __init__(self):
super().__init__(
'ebmc', 'ebmc', {
'preprocessing', 'parsing', 'elaboration'
})

self.submodule = "third_party/tools/ebmc"
self.url = f"https://github.com/diffblue/hw-cbmc/tree/{self.get_commit()}"

def prepare_run_cb(self, tmp_dir, params):
ofile = 'ebmc.out'

self.cmd = [self.executable]

if params['mode'] == 'preprocessing':
self.cmd.append('--preprocess')
elif params['mode'] == 'parsing':
self.cmd += ['--show-parse']

if params['top_module'] != '':
self.cmd += ['--module', params['top_module']]

for incdir in params['incdirs']:
self.cmd.append('-I' + incdir)

for define in params['defines']:
self.cmd.append('-D' + define)

self.cmd += params['files']

def get_version_cmd(self):
return [self.executable, "--version"]

def get_version(self):
version = super().get_version()

# The full version is the 1st line
version = version.splitlines()[0]

version.insert(0, self.name)

return " ".join(version)
13 changes: 13 additions & 0 deletions examples/chipsalliance-sv-tests/sv-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# abort on error
set -e

# clone sv-tests repo if not done yet
if [ ! -e sv-tests/.git ] ; then
git clone https://github.com/chipsalliance/sv-tests
git checkout cbe02cf550b1345f5b75fee0c85145b1b68f379e
fi

cd sv-tests

Loading