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 

Parallel compilation

 
Post new topic   Reply to topic    bluespec.com Forum Index -> Tools: BSC (Bluespec Compiler)
View previous topic :: View next topic  
Author Message
wychen



Joined: 06 Nov 2007
Posts: 35

PostPosted: Tue Mar 04, 2008 8:13 am    Post subject: Parallel compilation Reply with quote

It would be cool if multiple cores can be utilized when compiling Bluespec code. This can be manually done by writing a Makefile and automatically generate dependency file like the example below. It would be even better if bsc can natively support this kind of parallelized compilation, so we don't have to write tricky gawk scripts.

Using this technique, the fresh compilation takes around only 40% of original time on a 8 core machine with 5 licenses.

Any comments are welcomed.
Code:

-include .depend

DEP = depend
$(DEP) : .depend
.depend : $(bsvsrcs) Makefile
   cat $(bsvsrcs) | gawk '/^package/{sub(/;/,"",$$2);package=$$2;packages[package]=package}/^import/{sub(/:.*/,"",$$2);import[package,++iid]=$$2}END{for(x in import){split(x,sep,SUBSEP);if(packages[import[x]]) print sep[1]".bo : "import[x]".bo" }}' > .depend

BSC_COMP = bsc
BSC_OPTS = -u -elab -show-module-use -verilog -keep-fires -aggressive-conditions \
           -relax-method-earliness -cross-info -v -show-schedule -show-range-conflict \
           -opt-undetermined-vals -O -wait-for-license
BSC_OPTS2 = +RTS -K1024M

# Run the bluespec compiler

%.bo : %.bsv $(DEP) $(bsvsrcs)
   $(BSC_COMP) $(BSC_OPTS) $< $(BSC_OPTS2) 2>&1 | tee $(basename $<).log
   grep 'All packages are up to date' $(basename $<).log
Back to top
View user's profile Send private message
jo.prakash



Joined: 14 Sep 2008
Posts: 11

PostPosted: Tue May 12, 2009 10:02 am    Post subject: cant uderstand Reply with quote

whether we to write this code in our working directory and save it in name of "make" or else we have edit the code
kindly help me with step by step process
u can also mail 2 me
thank u
Exclamation
[email protected]
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: BSC (Bluespec Compiler) 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