SVUnit on Cygwin

208 views
Skip to first unread message

Alan Fitch

unread,
Jun 8, 2016, 7:15:42 PM6/8/16
to SVUnit User Group
Hi,
has anyone tried SVUnit on Cygwin?
With Questa, I ran into a problem because runSVunit created paths like

/cygdrive/c...

which Questa didn't like.

I was wondering whether it would be better to use relative paths?

Alan

Tudor Timi

unread,
Jun 9, 2016, 8:26:29 AM6/9/16
to SVUnit User Group
I have a setup for Questa and Cygwin. What I did there was to mangle the 'qverilog' call to change the paths in a way that Questa for Windows likes. It's by no means complete, but it works for the moment. I don't really use it anymore, though. I can share the wrapper here if you like.

I also had an issue with SVUnit reading the version from the text file and passing it as a define on the simulator command line, since this gave me problems with quoting in the shell. I instrumented my SVUnit install to have it hard coded.

Alan Fitch

unread,
Jun 9, 2016, 6:19:36 PM6/9/16
to SVUnit User Group
Hi Tudor,
 thanks - I was just curious if it was a real problem, or caused by more environment. I was only using Cygwin due to a temporary "disturbance in the force" on our Linux servers.

I didn't notice a problem with the version. 
I think it might be more portable to use relative paths - maybe...

kind regards
Alan

Srinivasan Venkataramanan

unread,
Jul 13, 2016, 12:38:33 PM7/13/16
to SVUnit User Group
Bitten by this very issue today. Am using Cygwin + Aldec's Riviera. After some googling and trials, got it running :-) Fiex done:

1. buildSVUnit Perl script - used cygpath to adapt UNIX paths to Windows (Ugly, but have to live with it for now)
2. runSVUnit actually has some small bugs for Riviera I believe. "vlog -l" is not for log file and the way to pass UVM lib is little tricky. If inteersted, see my comments inside the runSVUnit (Look for "Srini").

3. Still having issue with -f option, for now avoiding it


Feeling good as we now have a paper accepted for DVCon Indis 2016 with Neil, Ben Cohen and Ajeetha - and I'm tasked with making the code work :-)

Srini
buildSVUnit
runSVUnit

Srinivasan Venkataramanan

unread,
Jul 16, 2016, 8:07:03 AM7/16/16
to SVUnit User Group
Quick update. A day after I managed to run SVUnit + Cygwin + Riviera, today it failed to run again :-( Realized that the cygwin PATH convention and Riviera on Windows path conventions differ leading to issues. For now I have the following fix done and it works again. 

In my .bashrc of Cygwin:

export SVUNIT_INSTALL="D:/srini/VWorks/VW_Methodology/VW_Go2UVM/SVUnit/svunit-code-master"
export SVUNIT_INSTALL_CYGWIN="/cygdrive/d/srini/VWorks/VW_Methodology/VW_Go2UVM/SVUnit/svunit-code-master"
export PATH=${PATH}:${SVUNIT_INSTALL_CYGWIN}/bin

I see the SVUNIT_INSTALL env var is required by the build & run scripts. So providing a classical Windows path to that and use UNIX like path for PATH variable. 

Any better approach, anyone?

Srini

Vinicius Carlos

unread,
Feb 27, 2017, 6:59:33 AM2/27/17
to SVUnit User Group
Hi Tudor, 

Would you mind posting your solution so I could have a go?

Thanks a lot

Christophe ROUAUD

unread,
Sep 2, 2019, 9:34:49 AM9/2/19
to SVUnit User Group
Hi folks,

Any progress on this ? 
I actually encounter an equivalent issue while running SVUnit under Mobaxterm (Cygwin based).
I tried Srini approach but this did not change anything on my side. 

I encountered issue seems to be related to Modelsim usage of absolte path (/drive/c/... appears not being well supported)
I changed all absolute path by relative path in .svunit.f file generated by SVUnit and it appears to work OK with template generated. 

Is someone aware of a viable solution/patch ?

Thanks in advance
Christophe

Tudor Timi

unread,
Sep 3, 2019, 5:01:49 AM9/3/19
to SVUnit User Group
I've long since killed the machine on which I was running Cygwin with Questa. :(

Christophe ROUAUD

unread,
Sep 12, 2019, 3:43:27 AM9/12/19
to SVUnit User Group
Hi, 

I finally worked a bit on it and could work for a patch for Cygwin.

It deals with path resolution for Cygwin/Modelsim compatibility.
Patch is attached to current email. 

I am definitely not a Perl expert so apologize for possible errors there.

Maybe should I open an issue / branch to have this integrated ?

Christophe


cygwin_patch.txt
Reply all
Reply to author
Forward
0 new messages