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 

Condition for Rule in BSV code is getting false

 
Post new topic   Reply to topic    bluespec.com Forum Index -> Designing with BSV's Rules, Interfaces, ...
View previous topic :: View next topic  
Author Message
gurmohan



Joined: 13 Jan 2014
Posts: 4

PostPosted: Tue Feb 05, 2019 6:53 am    Post subject: Condition for Rule in BSV code is getting false Reply with quote

We are getting a warning while simulating BSV code for bus transactions. The rule is getting removed along with its functionality. Kindly suggest to overcome this problem..

Warning: "/home/gurmohan/Bluespectools/TRIVENDARAM_CODE/SRC/AXI4_Fabric.bsv", line 129, column 15: (G0023)
The condition for rule `ifc_rl_wr_xaction_master_to_slave' is always false.
Removing...




Code is :


function Bool wr_move_from_mi_to_sj (Integer mi, Integer sj ,Integer idj);
let addr = xactors_from_masters [mi].o_wr_addr.first.awaddr;
let id = xactors_from_masters [mi].o_wr_addr.first.awid;
match { .legal, .slave_num,.id_num} = (fn_addr_to_slave_num (addr, id));
return (legal && (slave_num == fromInteger (sj)) && id_num == fromInteger (idj));
endfunction

// Legal destination slaves
for (Integer mi = 0; mi < valueOf (num_masters); mi = mi + 1)
for (Integer sj = 0; sj < valueOf (num_slaves); sj = sj + 1)
for (Integer idj = 0; idj < valueOf (ids); idj = idj + 1)

rule rl_wr_xaction_master_to_slave (wr_move_from_mi_to_sj (mi, sj,idj)); // This rule does not work line 129, column 15
AXI4_Wr_Addr #(wd_addr, wd_user ,wd_id) a <- pop_o (xactors_from_masters [mi].o_wr_addr);
AXI4_Wr_Data #(wd_data ,wd_id) d <- pop_o (xactors_from_masters [mi].o_wr_data);

xactors_to_slaves [sj].i_wr_addr.enq (a);
xactors_to_slaves [sj].i_wr_data.enq (d);

v_f_wr_mis [sj].enq (fromInteger (mi));
v_f_wr_sjs [mi].enq (fromInteger (sj));

if (cfg_verbosity > 1) begin
$display (" AXI4_Fabric: wr master [%0d] -> slave [%0d]", mi, sj ,idj ,cur_cycle);
$display (" Write Address Channel (M -> S)---- ", fshow (a),cur_cycle);
$display (" Write Data Channel (M -> S)---- ", fshow (d),cur_cycle);
end
endrule
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bluespec.com Forum Index -> Designing with BSV's Rules, Interfaces, ... 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