GithubHelp home page GithubHelp logo

rfdonnelly / docker-questa Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 2.0 45 KB

A Docker image for Mentor/Siemens Questa

Shell 73.79% Verilog 0.82% Dockerfile 24.36% Makefile 1.03%
docker docker-image mentor questa siemens

docker-questa's People

Contributors

rfdonnelly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lapnd shawnma123

docker-questa's Issues

Add python to support UVMF

The BCR script and other scripts provided by UVMF require Python. The rocklinux:8 base image does not include Python.

Cannot run Verification Run Manager

Attempting to run VRM using

vrun

Fails with

/opt/mentor/questa/2019.1/questasim/bin/../linux_x86_64/vrun: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

This is fixed by adding the following to the Dockerfile

RUN yum install -y xeyes \
    && yum groupinstall -y Fonts \
    && yum clean all

Not sure if the fonts are necessary...

However running VRM again fails with

I/O warning : failed to load external entity "/opt/mentor/questa/2019.1/questasim/vm_src/rmdb.dtd"
Error: Cannot open RMDB file: Validation against DTD failed:
Could not parse DTD file '/opt/mentor/questa/2019.1/questasim/vm_src/rmdb.dtd'
Run Manager terminating due to errors

This is due to the vm_src directory having been pruned from the installation at

rm -rf $QUESTA_ROOT/questasim/vm_src

Need to remove this line and rebuild the container.

Add UVM/UVMF Example

Add an example that uses UVM. Use one of the examples provided by Questa. It seems the only UVM examples provided by Questa also use UVMF.

Download UVMF 2019.1 and extract to example/UVMF_2019.1.

Setup environment:

export MGLS_LICENSE_FILE=...
hostname=...
domain=...
username=...

Build the user image:

cd example
docker build --build-arg DOCKER_USER=$username --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t questa .

Run a single testbench:

cd UVMF_2019.1
docker run -it -v $PWD:/src -w /src -u $(id -u):$(id -g) \
    --hostname $hostname --dns-search $domain \
    -e MGLS_LICENSE_FILE \
    -e UVMF_HOME \
    questa \
    make -C base_examples/project_benches/alu/sim cli

Run full regression:

docker run -it -v $PWD:/src -w /src -u $(id -u):$(id -g) \
    --hostname $hostname --dns-search $domain \
    --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
    -e MGLS_LICENSE_FILE \
    -e UVMF_HOME=/src \
    -e QUESTA_MVC_HOME=/src \
    questa \
    make -C base_examples/project_benches/full_regression/sim

NOTE: Set QUESTA_MVC_HOME to avoid undefined errors. This variable defines the path to Questa VIP but we don't have it and we actually need it.

NOTE: The --cap-add and --security-opt options are required so that VRM doesn't fail due to Warning: setting ADDR_NO_RANDOMIZE failed - Operation not permitted. being printed to stderr.

Example error:

Error: Action 'top/each_top/build_group~alu/build_task/execScript' failed (failed/stderr):
  logfile: /src/base_examples/project_benches/full_regression/sim/VRMDATA/top/each_top/build_group~alu/build_task/execScript.log
  stderr: ** Warning: setting ADDR_NO_RANDOMIZE failed - Operation not permitted.

Use GCC 7.4.0 for Questa 2023+

Questa 2023+ provides an updated version of GCC (10.3.0). I initially defaulted to this new version but found that this also required upgrading QVIP and repacking vendored QVIP. Additionally, GCC 10.3.0 is about twice as large as GCC 7.4.0 and doesn't provide a clear benefit over GCC 7.4.0.

Add dependencies for VRM batch mode

This issue expands on #1 by:

  1. Eliminating the need for the user to install additional packages

    #1 recommends the user install X11 if they want to use VRM. The user shouldn't need to install additional packages.

  2. Reducing the dependencies required for VRM

    #1 recommends installing more dependencies than necessary to run VRM.

The following libraries are required for VRM batch mode:

  • libX11
  • libXext
  • libXft

Installing these libraries will not only enable VRM but also vsim -c which is useful for advanced coverage merging.

Investigate experimental Mentor tool for containerizing Questa

From Mentor:

We have an experimental program that be used to create a Docker container with minimum QuestaSim installation based on the end consumers needs.

$ nimbusen --help
/mtitcl/vsim/nimbusen (DEV-main 3940826 Ver. #3)
usage: /mtitcl/vsim/nimbusen options subsets...
where options are:
   -b | --baseimage <from-image>        FROM image specification (default: centos)
   -c | --container <image-name>        Create install tree and Dockerfile
   -d | --docker                        Create a Dockerfile
   -e | --env name=value                Add ENV definition
   -h | --help                          Give this help list
   --list                               List all available subsets
   -m | --maketree <tree-name>          Build an install tree from subsets
   -p | --platform <platform>           Selection platform (default: linux_x86_64)
   -r | --root <source-install>         Full install location
   -H | --stream                        Start one-time http tar streaming server
   -S | --sanitycheck <source-install>  verify subsets against release
   -t | --tar <prefix_name>             Create tarballs from source-install
   -v | --verbose
 
Example use:
 
# Select subsets to create a docker container:
    nimbusen --container qsim10.7c --root /u/release/10.7c/questasim  simulator baselibs uvm1.1d
 
# Call docker to create the container image:
    (cd 10.7c; sudo docker build -t qsim10.7c .)
 
Other uses:
# Capture the installation into subset tar files:
   nimbusen --tar 10.7c_ --root /u/release/10.7c/questasim
 
# Build a local install tree from the subsets:
    nimbusen --maketree 10.7c --platform linux_x86_64 simulator baselibs uvm1.1d
 
# Generate a Dockerfile for this subset tree:
    nimbusen --docker --root 10.7c --platform linux_x86_64 simulator baselibs uvm1.1d >10.7c/Dockerfile
 
# Shorthand notation:
    nimbusen -crp example10.7c 10.7c linux_x86_64 simulator baselibs uvm1.1d 
 
# http streaming:
    url=`nimbusen -H -crp exmpl_10.7c 10.7c linux_x86_64 simulator baselibs uvm1.1d`
    sudo docker build -t expl2 $url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.