View Full Version : Open Source VMM with Apache 2 License
akhailtash
05-31-2008, 07:14 PM
VMM is now open source under Apache license as well. I wonder if it runs on Mentor and Cadence simulators? I guess Synopsys saw the threat from the camp and decided to release it sooner than later.
Two great pluses for VMM are the inclusion of RAL (Register Abstraction Layer) and HAL (Hardware Abstraction Layer). Mentor and Cadence say they have something similar, but it is not open source apparently!
I am surprised they released so much. No complaints here though.
Check out this article:
Synopsys releases VMM methodology as open source (http://www.scdsource.com/article.php?id=213)
And download sources here:
VMM Central (http://www.vmmcentral.org/)
-- Amal
signalscan4ever
06-03-2008, 08:09 AM
So far, only Synopsys's VCS simulator can compile and run VMM testbenches, so 'open-sourcing' VMM makes little practical difference, other than play to the fringe crowd who believe an open-source framework (which still requires a $100K simulator license to use), is somehow better than a free vendor-proprietary framework.
Open-source pundits will say open-source distribution makes it easier for the community to contribute improvements to the framework. IMHO, the evolution of ALL frameworks (OVM/VMM/etc.) will still need to be driven by the tool-vendor...until Systemverilog simulation has 'stabilized' across vendors (with respect to a common language feature-set), such that underlying language-issues became a non-issue. And that won't happen for a few years.
pmarriott
06-03-2008, 10:03 AM
What aspects of the VMM source code cannot be compile by, say, questasim6.4? I thought that questa had the broadest support of the current IEEE P1800 LRM? Or are there synopsys "extensions" to the code used in VMM?
For what it's worth, I have seen some AVM2.0 and 3.0 code running on special version of VCS (with some minor source code modifications). Presumably the VMM source could also be tweaked with appropriate ifdefs to compile on questa and IUS - assuming there's nothing non-standard in there.
Paul.
miyashita
06-04-2008, 05:56 AM
Open Source VMM can't be compiled by QuestSim, because task is called in same functions.:confused:
function vmm_data vmm_channel::unput(int offset);
function vmm_data vmm_channel::remove();
These fuction call task vmm_channel::unblock_producer().
-- Miya
dave_59
06-04-2008, 06:28 AM
Open Source VMM can't be compiled by QuestSim, because task is called in some functions.:confused:
That's not legal SV; functions cannot call tasks, except within a fork/join_none. In this case, the task should have been defined as a void function.
And that's just one of many non-standard issues.
Dave Rich
akhailtash
06-04-2008, 06:46 AM
It is funny that they want users to report problems with compile to them so that they can fix them! I am sure they are aware of all the incompatibilities.
More discussion about compile problems here (http://www.vmmcentral.org/forums/viewtopic.php?f=2&t=4&sid=0710db9cf7356d0f6433730078f3d86e).
-- Amal
jlgray4
06-04-2008, 12:16 PM
Dave,
It's interesting listening to vendors complain about how *other* vendors have code in their libraries that is incompatible with the IEEE spec. I'm hoping that, at the very least, the fact that the VMM and OVM are both open source means that all y'all will converge on a standardized implementation of the SystemVerilog standard, since everyone now has some reasonably complex examples of everyone else's code to run through their respective simulators.
Take care,
JL
dave_59
06-04-2008, 01:01 PM
Hi JL,
That has been my point all along. The AVM has been in open source for two years; the OVM has been in open source for 6 months. It reasonable to expect that code will not work out of the box on a tool that its never been run on before. Heck, there have been 10 year old Verilog designs that have been one only one simulator that have problems when porting to another.
Speaking as Mentor's representative to the SV IEEE committee, when we find a problem with an LRM ambiguty, or when we believe the LRM does not express the original intent of a feature, we report it to the committee as soon as we are aware there is an issue.
So getting the VMM or whatever to converge on a standardized implementation means getting these issues of ambiguity brought to the attention of the IEEE as well as each individual implementation.
Dave
akhailtash
09-03-2008, 01:41 PM
I have been trying to compile the latest VMM source code as an exercise. I managed to get rid of so many warnings about function/task prototypes.
I am down to a few warnings and a couple of errors. There are some missing function bodies as well!
I get an error in Questa:
** Error: ../sv/sb/vmm_sb_ds.sv(1241): (vlog-7030) Wildcard Indexed Associative Arrays are not allowed as foreach array.
and the problematic line is:
foreach (this.Xexp_streamsX[k]) begin
where:
/*local*/ vmm_sb_ds_exp_streams Xexp_streamsX ;
Is the error a limitation of Questa or is it SystemVerilog LRM limitation?
I wonder if anyone has tried to compile this under modlesim?
-- Amal
dave_59
09-03-2008, 01:50 PM
Amal,
This is a SV limitation. Wildcard indexes are typeless, and the iterator needs a type so that it can be used in expressions. In most cases, int is sufficient. SV allows any type to be declared as an index to an associative array, so the wildcard index is for backward compatbility with Vera.
Save yourself the trouble and get a VMM kit that runs on Questa at http://www.mentor.com/go/cookbook
Dave Rich
dave_59
09-03-2008, 02:23 PM
One more thing to add - people ask how come if this works in one implementation, it's a SV limitation. "Works" is a subjective term. It may appear to work if the index value is, say, less than 32-bits wide, or the index value is only used to address the array. It may not tell you when it doesn't work.
Trying to write down the rules for such special cases is not always worth the effort when there are easy coding alternatives.
akhailtash
09-04-2008, 06:30 AM
Thanks for pointing out the release from Mentor, it helped a lot. But I still get the following errors:
These have to do with the default values passed to methods and tasks.
QuestaSim vlog 6.4 Compiler 2008.06 Jun 18 2008
** Error: ../sv/RAL/vmm_ral_field.sv(470): (vlog-2218) Default specified for 'kind' must exactly match the value specified in class at ../sv/RAL/vmm_ral_field.sv(121) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_field.sv(490): (vlog-2218) Default specified for 'kind' must exactly match the value specified in class at ../sv/RAL/vmm_ral_field.sv(124) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_field.sv(511): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_field.sv(129) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_field.sv(577): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_field.sv(136) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_field.sv(633): (vlog-2218) Default specified for 'check' must exactly match the value specified in class at ../sv/RAL/vmm_ral_field.sv(154) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_field.sv(634): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_field.sv(155) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_vfield.sv(199): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_vfield.sv(89) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_vfield.sv(324): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_vfield.sv(97) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(237): (vlog-2218) Default specified for 'cover_on' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(110) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(678): (vlog-2218) Default specified for 'kind' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(176) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(700): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(180) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(726): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(184) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(904): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(191) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(1117): (vlog-2218) Default specified for 'check' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(207) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_reg.sv(1118): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_reg.sv(208) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_mam.sv(421): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_mam.sv(69) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_mam.sv(452): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_mam.sv(78) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_mam.sv(453): (vlog-2218) Default specified for 'domain' must exactly match the value specified in class at ../sv/RAL/vmm_mam.sv(79) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_mam.sv(482): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_mam.sv(87) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_mam.sv(519): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_mam.sv(96) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_vreg.sv(285): (vlog-2218) Default specified for 'kind' must exactly match the value specified in class at ../sv/RAL/vmm_ral_vreg.sv(99) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_vreg.sv(629): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_vreg.sv(140) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_vreg.sv(707): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_vreg.sv(148) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_mem.sv(461): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_mem.svh(209) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_mem.sv(554): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_mem.svh(218) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_mem.sv(681): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_mem.svh(229) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_mem.sv(805): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_mem.svh(238) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_block.sv(500): (vlog-2218) Default specified for 'kind' must exactly match the value specified in class at ../sv/RAL/vmm_ral_block.sv(79) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_block.sv(531): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_block.sv(83) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_block.sv(569): (vlog-2218) Default specified for 'check' must exactly match the value specified in class at ../sv/RAL/vmm_ral_block.sv(85) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_block.sv(570): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_block.sv(86) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_sys.sv(758): (vlog-2218) Default specified for 'kind' must exactly match the value specified in class at ../sv/RAL/vmm_ral_sys.sv(112) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_sys.sv(807): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_sys.sv(116) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_sys.sv(823): (vlog-2218) Default specified for 'check' must exactly match the value specified in class at ../sv/RAL/vmm_ral_sys.sv(118) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_sys.sv(824): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_sys.sv(119) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_access.sv(428): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_access.sv(97) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_access.sv(446): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_access.sv(106) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_access.sv(465): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_access.sv(116) for strict LRM compliance; using default specified in class.
** Error: ../sv/RAL/vmm_ral_access.sv(484): (vlog-2218) Default specified for 'path' must exactly match the value specified in class at ../sv/RAL/vmm_ral_access.sv(126) for strict LRM compliance; using default specified in class.
-- Compiling interface vmm_hw_in_if
-- Compiling interface vmm_hw_out_if
-- Compiling interface vmm_hw_clock_control
-- Compiling interface vmm_hw_clock
-- Amal
dave_59
09-04-2008, 07:46 AM
I thought the code was fixed to remove those messages. Use -suppress 2218 on the vlog command line make an exception.
akhailtash
09-04-2008, 09:10 AM
This fixes it Dave, but is this not a bug in 6.4? The code looks fine to me.
-- Amal
Powered by vBulletin™ Version 4.0.3 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.