commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6895 - gnuradio/branches/developers/matt/u2f/control_


From: matt
Subject: [Commit-gnuradio] r6895 - gnuradio/branches/developers/matt/u2f/control_lib
Date: Wed, 14 Nov 2007 03:32:58 -0700 (MST)

Author: matt
Date: 2007-11-14 03:32:57 -0700 (Wed, 14 Nov 2007)
New Revision: 6895

Modified:
   gnuradio/branches/developers/matt/u2f/control_lib/icache.v
Log:
added simple forwarding, now only has 1 wasted cycle on cache misses


Modified: gnuradio/branches/developers/matt/u2f/control_lib/icache.v
===================================================================
--- gnuradio/branches/developers/matt/u2f/control_lib/icache.v  2007-11-14 
09:31:30 UTC (rev 6894)
+++ gnuradio/branches/developers/matt/u2f/control_lib/icache.v  2007-11-14 
10:32:57 UTC (rev 6895)
@@ -56,8 +56,30 @@
    wire               valid_out = ivalid[line];
    
    // //////////////////////////////////////
-   // Very basic, no forwarding
+   // Send data and ack to uP
+
+//`define BASIC
+`define LEVEL2
+//`define LEVEL3
+
+   wire               cache_hit = ivalid[line] & (tag_out == 
iwb_adr_i[AWIDTH-1:CWIDTH+2]);
+   wire               cache_miss = ~cache_hit;
+   reg                        ack_d1;
+   always @(posedge wb_clk_i) ack_d1 <= iwb_ack_o;
+   
+`ifdef BASIC    // Very basic, no forwarding
    assign             iwb_dat_o = idata[line];
-   assign             iwb_ack_o = ivalid[line] & 
-                      (tag_out == iwb_adr_i[AWIDTH-1:CWIDTH+2]);
+   assign             iwb_ack_o = cache_hit;
+`endif
+   
+`ifdef LEVEL2   // Simple forwarding
+   assign             iwb_dat_o = cache_hit ? idata[line] : iram_dat;
+   assign             iwb_ack_o = cache_hit | ~ack_d1;
+`endif
+
+`ifdef LEVEL3
+
+`endif
+   
+   
 endmodule // icache





reply via email to

[Prev in Thread] Current Thread [Next in Thread]