bluespec.com Forum Index bluespec.com
Bluespec Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Customizing the bluespec workstation

 
Post new topic   Reply to topic    bluespec.com Forum Index -> Tools: Other
View previous topic :: View next topic  
Author Message
chiraag



Joined: 06 Aug 2011
Posts: 29

PostPosted: Wed Jun 19, 2013 5:16 pm    Post subject: Customizing the bluespec workstation Reply with quote

I am trying to customize the workstation as specified in the User Guide.

I tried to add the following snippet to the .bluetclrc file in my $HOME
Code:

if { [info exists bscws] } {
  puts "Customizing the Bluespec Development workstation"
  # Print out the version
  register_tool_bar_item myVersion "puts {[Bluetcl::version]}" Bluespec.gif "Version"
}


Unfortunately this does not show up a button on the Workstation
Could you suggest any changes?
Back to top
View user's profile Send private message
ewc



Joined: 08 May 2007
Posts: 31

PostPosted: Thu Jun 20, 2013 3:40 pm    Post subject: Reply with quote

I tried this code and it works for me.

Can you give me any other clues as to its behavior?
Can you add some puts "Got HERE" messages to insure that the .bluetclrc file is sourced properly.

Let me know what you find, especially if you find the fix.

Thanks
Ed.

_________________
Ed C
Back to top
View user's profile Send private message
chiraag



Joined: 06 Aug 2011
Posts: 29

PostPosted: Thu Jun 20, 2013 4:19 pm    Post subject: Reply with quote

Code:

puts "Outer loop"

if { [info exists bscws] } {
  puts "Customizing the Bluespec Development workstation"
  # Print out the version
  register_tool_bar_item myVersion "puts {[Bluetcl::version]}" Bluespec.gif "Version"
}


This prints "Outer loop" on the workstation
But the inner loop is not executed.

I guess the if clause fails. Is there any way to check?
Back to top
View user's profile Send private message
ewc



Joined: 08 May 2007
Posts: 31

PostPosted: Thu Jun 20, 2013 4:21 pm    Post subject: Reply with quote

Which version of Bluespec are you using? There were some bugs fixed in the past year or so in this area.

Ed.

_________________
Ed C
Back to top
View user's profile Send private message
chiraag



Joined: 06 Aug 2011
Posts: 29

PostPosted: Thu Jun 20, 2013 4:36 pm    Post subject: Reply with quote

I am using the 2012.01.A release
Back to top
View user's profile Send private message
ewc



Joined: 08 May 2007
Posts: 31

PostPosted: Thu Jun 20, 2013 4:57 pm    Post subject: Reply with quote

That issue has been fixed after the 2012.01 release.
You can find a beta release with this fix at this location
http://www.bluespec.com/downloads/Bluespec-2013.05.beta2.tar.gz

_________________
Ed C
Back to top
View user's profile Send private message
chiraag



Joined: 06 Aug 2011
Posts: 29

PostPosted: Thu Jun 20, 2013 8:20 pm    Post subject: Reply with quote

Installing the new version has fixed the original issue and I can run the above script.

The real use case I had in mind was setting the default directories for the generated output files. We use the following setup.tcl in the $HOME/.bluespec/

Code:

puts "New Project"
WS::Project::set_compilation_results location -vdir vlog -bdir bscdir -simdir bscdir


I cannot see either the puts nor do the file directories change. Is this the right way to write the above script
Back to top
View user's profile Send private message
ewc



Joined: 08 May 2007
Posts: 31

PostPosted: Fri Jun 21, 2013 9:23 am    Post subject: Reply with quote

This works for me. I've added a button which sets the directories. This code resides in ${HOME}/.bluetclrc

Code:

if { [info exists bscws] } {
    puts "Customizing the Bluespec Development workstation"
    register_tool_bar_item myVersion "setup_dirs" Bluespec.gif "Path setup"

}

proc setup_dirs {} {
    puts "setup directories..."
    ::WS::Project::set_compilation_results_location -vdir fooBar
}


In the ideal case we would offer hooks to execute commands on certain events, E.g.
opening a project, closing a project, running a command, etc.

Ed.

_________________
Ed C
Back to top
View user's profile Send private message
mehultikekar



Joined: 29 Oct 2011
Posts: 22

PostPosted: Fri Jun 21, 2013 8:39 pm    Post subject: Reply with quote

I am a colleague of chiraag's and I started getting "cannot simulate design" errors with this beta version with ncverilog. The error message is:
Code:

ncverilog: *E,NOSTUPR: A problem was detected in the setup for simulation. -R/-r <name> was used but the scratch directory (./INCA_libs_testAdderTree/snap_testAdderTree.lnx8664.10.20.nc) created from a successful design compilation and elaboration is missing.  Check the command line for any unintentional errors, like omission of the -snapname or the -nclibdirname option, if it was used for parsing, earlier.


I was able to trace to the bsc_build_vsim_ncverilog script and fix it. I am attaching my diff.
Back to top
View user's profile Send private message
mehultikekar



Joined: 29 Oct 2011
Posts: 22

PostPosted: Fri Jun 21, 2013 8:40 pm    Post subject: Reply with quote

Diff didnt get attached.
164c164
< echo "exec: ncverilog -c +access+r +name+$snapshot +nclibdirname+$inca_libs +libext+.v $VSIM_PATH_FLAGS $BSC_VSIM_FLAGS +define+TOP=$BSC_TOPLEVEL_MODULE $BSC_VERILOG_DEFS $BSC_VERILOG_OPTS + nowarn+LIBNOU $VPI_LINK $BSC_VERILOG_FILES"
---
> echo "exec: ncverilog $ARCH_OPT -c +access+r +name+$snapshot +nclibdirname+$inca_libs +libext+.v $VSIM_PATH_FLAGS $BSC_VSIM_FLAGS +define+TOP=$BSC_TOPLEVEL_MODULE $BSC_VERILOG_DEFS $BSC_VERILOG_OPTS +nowarn+LIBNOU $VPI_LINK $BSC_VERILOG_FILES"
168c168
< ncverilog $NC_VERBOSE -c +access+r +name+$snapshot +nclibdirname+$inca_libs +libext+.v $VSIM_PATH_FLAGS $BSC_VSIM_FLAGS +define+TOP=$BSC_TOPLEVEL_MODULE $BSC_VERILOG_DEFS $BSC_VERILOG_OPTS + nowarn+LIBNOU $VPI_LINK $BSC_VERILOG_FILES
---
> ncverilog $NC_VERBOSE $ARCH_OPT -c +access+r +name+$snapshot +nclibdirname+$inca_libs +libext+.v $VSIM_PATH_FLAGS $BSC_VSIM_FLAGS +define+TOP=$BSC_TOPLEVEL_MODULE $BSC_VERILOG_DEFS $BSC_VERILOG_OPTS +nowarn+LIBNOU $VPI_LINK $BSC_VERILOG_FILES
Back to top
View user's profile Send private message
ewc



Joined: 08 May 2007
Posts: 31

PostPosted: Mon Jun 24, 2013 9:09 am    Post subject: Reply with quote

Thanks,
We'll review your patch and integrate as needed.
Ed.

_________________
Ed C
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bluespec.com Forum Index -> Tools: Other All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
bluespec.com topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP