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 

remove optimizations for rules or registers

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



Joined: 17 Aug 2013
Posts: 9

PostPosted: Sun Jul 06, 2014 8:37 am    Post subject: remove optimizations for rules or registers Reply with quote

Hi,
I have noticed that if there is a rule or a register that doesn't do anything, bluespec removes them from the verilog files.
Is there a way to tell the compiler to keep them anyway?
i need them for later debugging...

somthing like "volatile" in c that tells the compiler to not use optimizations on this...
Back to top
View user's profile Send private message Send e-mail
quark
Site Admin


Joined: 02 Nov 2007
Posts: 495

PostPosted: Sun Jul 06, 2014 2:31 pm    Post subject: Re: remove optimizations for rules or registers Reply with quote

BSC has the following flags, which appear in the -help message and are documented in the User Guide (available as a PDF file in the "doc" subdirectory of the release):
Code:
-remove-empty-rules     remove rules whose bodies have no actions
-remove-false-rules     remove rules whose condition is provably false
-remove-starved-rules   remove rules that are never fired by the generated schedule
-remove-unused-modules  remove unconnected modules from the Verilog

The flags for removing empty rules and removing false rules are ON by default. To turn them off, you add "-no" to the front:
Code:
bsc -no-remove-empty-rules

The flags for removing starved rules and removing unused registers are OFF by default. So you should not see registers being removed.

Unless you are referring to how register and wire modules are inlined into the Verilog? There is a flag for preserving the I/O signals for these modules, even if they are unused:
Code:
-keep-inlined-boundaries preserve inlined register and wire boundaries

There are also hidden flags for directing BSC to not inline the modules:
Code:
-inline-reg             flatten Reg* module uses in the generated Verilog
-inline-rwire           flatten RWire module uses in the generated Verilog
-inline-creg            flatten CReg* module uses in the generated Verilog

These are ON by default, so to use them you will again need to add "-no" to the front of the flags.
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