Modelsim support for SV - system-verilog

I'm currently using modelsim SE 5.8e. It doesn't support SystemVerilog. I need to use SystemVerilog for design and validation of my project. Any idea which version of Modelsim supports both design and validation subset of sytemverilog well? I used VCS before and trying to find it if I can use Modelsim instead of VCS for simulation.
Thanks in advance!

According to this table, ModelSim supports SystemVerilog design features, but not verification features. This means that it probably does not support classes, randomization, or the coverage features of SV.
The latest simulator platform from Mentor Graphics is branded Questa. This is really just an extension to Modelsim. Questa has full support for SystemVerilog. This is what you want if you have (or can get) a license for it. My experience is that EDA simulators are licensed in a tiered manner, so some features may only be available if you have a certain license.
The Questa simulator marketing page is at http://www.mentor.com/products/fv/questa/

You are with the student version, so try one of this list.
I guess there isn't an open source simulator, let us know if you find something.
other option you can use other things like myhdl check out this as well.

ModelSim 10.1d supports SystemVerilog except for SystemVerilog coverage, SystemVerilog assertions, randomize() method, and program blocks. The student version and Altera-Starter versions are free.
ModelSim 10.1d can be used for verification. Most verification engineers are using UVM library, and ModelSim can run UVM.
A trivial UVM testbench for ModelSim

Related

How to connect SystemC model with SystemVerilog?

Say we have a SystemC model of decade counter and I want to verify SystemVerilog Counter RTL using SystemC model. How can we connect these two in SV/UVM based testbench so as to communicate between them.
Mentor developed a free package called UVMConnect that was developed specifically for the application you are asking about. See https://verificationacademy.com/topics/verification-methodology/uvm-connect. You will need a simulator that supports SystemVerilog and SystemC simulating together, like Questa.
If you're using QuestaSim I think UVM-connect from Mentor is the way to go. When I first used it(4 years ago) it was very buggy and gave the most cryptic segfault errors I've ever seen. But, with help from the Mentor support I managed to overcome them and get stuff done. It should be more stable now, but if you have problems with it don't hesitate to contact Mentor support. They are very responsive.
However, if you're using Cadence tools and/or the e language I think that UVM-ML from Cadence is a much more comprehensive solution. It allows you to connect components written in any combination of languages(SV-SC, SV-e, SC-e) and it has nicer documentation and examples. I understand it's also compatible with all simulators now. You can find it here : http://forums.accellera.org/files/file/65-uvm-ml-open-architecture/
Not sure what Synopsis folks recommend for their tool suite. Maybe someone who used them can offer more information on this. But I'm guessing that both UVM-ML and UVM-Connect could work since their makers claim that they are portable.
And lastly, if you're planning to use SystemC as a verification language(very unlikely but just for the sake of diversity) there is something called UVM-SystemC which is basically a clone of SV-UVM written in C++/SystemC. It's currently in its alpha release and it lacks many features(register modeling, constrained randomization, coverage collection, etc.). It feels a lot like SV-UVM and I think it's a nice toy to play with in your spare time if you can't afford a commercial simulator license. You can find it here http://accellera.org/images/downloads/drafts-review/uvm-systemc-1.0-alpha1.tar.gz

Issues in Migration of RISCV Test Harness from VCS to Questasim Simulator

I have been trying to simulate the RISCV rocket core but to no luck, I do not have a Synopsys VCS simulator and so the rocketTestHarness.v file cannot be used as is. The rocketTestHarness.v includes a vcs_main.cc file that has extern functions that use DirectC interface handles like vc_handle and vc_getScalar vc_putScalar vc_put4stVector vc_4stVectorRef. These do not work with non VCS simulators like Questasim (the one that I have been using). Is there any way which I can use to migrate the rocketTestHarness.v file from a VCS simulator to Questasim Simulator. Or is there any other way by which I can simulate the rocket core using Questasim.
I looked at this but I'am not sure how all that works. Is it not possible to simulate the rocketchip without using the riscv_fesrvr and simulate as it would work in a natural environment. I'am willing to use DPI calls if those functions in vcs_main.cc can be translated to DPI call logic.
I would really appreciate if someone could provide some assistance on this.
Thanks in advance!!
Rocket Chip is designed to run in a tethered fashion (with HTIF and FESVR). This is not a requirement for RISC-V, but a artifact of how Rocket Chip is used in prototypes for research. Work is currently underway to define a platform specification to set a standard for boot-up and such for those that want to run standalone.
As a short-term method to get started, we do recommend using the C++ emulation provided by Chisel. Porting to Questasim will involve modifying the harness. In addition to interfacing with memory, HTIF will need to be connected to FESVR. When you get this done, if you submit a clean pull request we can integrate it for others.

Is there a cross-platform framework for C?

I am curious to know if there is any kind of programming library/framework for the C language for cross-platform programming of course. I mean there are already frameworks like Wxwidgets, Boost, Qt, U++ and etc for C++ available but I have not yet found any for C .
Updated Info:
We are trying to build an underlying Framework/library to be used in our project. We are going to eliminate the dotnet and instead provide a counterpart for those libraries which is fast and less demanding.
We will be working on a server/client based project, and thus the underlying services must be fast and also portable. GUI is not our priority now, but libraries providing threading capabilities is of importance to us.
And for the ANSI part, I think we are fine with that at the moment unless something changes that in the future.
if you write plain ANSI C, it should work on every POSIX system.
The most successful example of cross platform C library is standard C library itself (IMHO).
If you're looking for GUI toolkit GTK is the answer,
if you're looking for terminal UI, ncurses is pretty portable.
If you're looking for general use libraries, as long as they're written in ANSI C, should work almost everywhere, as long as it doesn't use system level APIs.
Can you just tell us, what kind of library/framework you are looking for ?
GTK+ is long established and actively maintained cross-platform C-only (or primarily) toolkit. You'll find not only on-line documentation but also books written about it. It is the framework backing up the GNOME project.
GTK+ is meant to build applications with UI, first of all. However, even if you don't need UI you'll find that some GTK+ components, namely GLib, provide general multiplatform support comparable with Qt. Actually, I needed a framework without UI at first and chose GLib over APR because I was able to find documentation and tutorials easier.
GTK+ was initially developed on UN*X an X-Windows which remains the platform where you can get it running the most easily. I wouldn't say that it is more difficult on Windows; it is just that you have more compiling environment options. I started with prepared GTK+ packages and MinGW but ended up integrating GTK+ with MSVC.
GTK+ exists for a long time and some people may find it old-school. On the other hand, it shows that it has proven to be stable and useful. There are also bindings for C++ and C#.
As with every big framework, the more you need from it the longer you will have to learn. But the other way round it works too; the more you learn the more you'll be able to do with it. Consistent coding style helps getting used to it.
--- Ferda

some pointer to understanding GCC source code

I'm student working on optimizing GCC for multi-core processor. I tried going through the source code, it is difficult to follow through it since I need to add some code to the back end. Can anyone suggest some good resource which explains the code flow through the different phases.
Also suggest some development environment for debugging GCC mainly to step through the code. Is it possible on windows?
As a starting point see Links and Selected Readings on GCC site. Of particular interest to you, I think, are:
GNU C Compiler Internals
Compilation of Functional Programming Languages using GCC -- Tail Calls by Andreas Bauer
Porting GCC for Dunces by Hans-Peter Nilsson
If you want to develop on Windows you probably need to start from MinGW (Minimalist GNU for Windows) Compiler Suite sources (it includes GNU GDB debugger), which is a port of GCC to Windows.
For a comfortable development environment I cannot help much because I don't develop in C++. But I suppose a good IDE for C/C++ is what you need: have a look at this comparison, there are plenty free/open source IDEs for Windows.
Update: I think ICI can also be of interest to you:
The Interactive Compilation Interface
(or 'ICI' for short) is a plugin
system with a high-level
compiler-independent and low-level
compiler-dependent API to transform
current compilers into collaborative
open modular interactive toolsets. The
ICI framework acts as a "middleware"
interface between the compiler and the
user-definable plugins. It opens up
and reuses the production-quality
compiler infrastructure to enable
program analysis and instrumentation,
fine-grain program optimizations,
simple prototyping of new development
and research ideas while avoiding
building new compilation tools from
scratch. For example, it is used in
MILEPOST GCC to automate compiler and
architecture design and program
optimizations based on statistical
analysis and machine learning. It
should enable universal self-tuning
compilers adaptable to heterogeneous,
reconfigurable, multi-core
architectures ranging from
supercomputers to embedded systems.
.. as the rest of projects under the Collective TUNING umbrella.
Note: Writing "compilers are one of the most complex programs there are", as BlueRaja wrote in comments, is an overstatement: there are very simple compilers and very complex compilers. But in compiler theory (once you have studied it) there is nothing esoteric. GCC is a complex program to understand as whatever BIG, poorly documented program out there1. So rizwanhudda don't be discouraged: start studying the documentation available and then ask GCC developers (on GCC irc channel, as suggested by nvl or GCC developers mailing list) to explain what is poorly (or not at all) documented.
In fact program comprehension is an active field of research.
I would suggest you to use the GCC irc channel, it is meant for discussion of development of GCC.

Any good library or software for queue networks simulation?

I have been trying to make work EZSIM with no luck, which is a software to build discrete event simulators in a graphical DOS environment. In this software, my simulator and many others (of the other people in the course I'm taking) don't work, but teacher's simulator (and examples of the downloaded files) does work.
So, I began to distrust of the software.
Do you know any software that resolves the same kind of problems but really works? It will be good if it is free, or I can download an evaluation copy or something like that.
If you don't know any software, do you know any library which might work? Preferably in C#, Ansi C, Java or Delphi.
This may be more than what you're looking for, but check out NS2. It's the standard for open source network simulations, and will allow you to simulate all kinds of network layer behavior.
I've also used JUNG in the past. It's very flexible, although it also doesn't offer much out of the box.
I used Möbius in my computer systems analysis class. It is free for educational use (which sounds like what you're doing). It's a Java GUI which generates C++ code.
The R package queuecomputer. queuecomputer is a computationally efficient method for simulating queues with arbitrary arrival and service times. There is a submitted paper on arXiv describing the algorithm used in the package. Examples can be found within the arXiv paper and the vignette. A web app based on the package is available at https://ace-ebert.shinyapps.io/queue_simulator_mmk/ .