summaryrefslogtreecommitdiffstats
path: root/fpga/usrp2/fifo/crossbar36.v
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-19 17:45:08 -0800
committerJosh Blum <josh@joshknows.com>2011-01-19 17:45:08 -0800
commit72daf0902c8b8e404774a4e2d2657edf95be5e87 (patch)
tree0fa7de137a969b838f235dff9a30d8c64a67fdcc /fpga/usrp2/fifo/crossbar36.v
parent8e0fbbe47b3c0b2805d2a638da7f363bee2240fd (diff)
parent1254656ef914482cc111ffa3aca48be5c1e8caaf (diff)
downloaduhd-72daf0902c8b8e404774a4e2d2657edf95be5e87.tar.gz
uhd-72daf0902c8b8e404774a4e2d2657edf95be5e87.tar.bz2
uhd-72daf0902c8b8e404774a4e2d2657edf95be5e87.zip
Merge branch 'fpga_next' into uhd_with_fpga_next
Diffstat (limited to 'fpga/usrp2/fifo/crossbar36.v')
-rw-r--r--fpga/usrp2/fifo/crossbar36.v12
1 files changed, 7 insertions, 5 deletions
diff --git a/fpga/usrp2/fifo/crossbar36.v b/fpga/usrp2/fifo/crossbar36.v
index d90f5659c..2a046d8bf 100644
--- a/fpga/usrp2/fifo/crossbar36.v
+++ b/fpga/usrp2/fifo/crossbar36.v
@@ -9,6 +9,8 @@ module crossbar36
output [35:0] data1_o, output src1_rdy_o, input dst1_rdy_i);
reg cross_int, active0, active1;
+ wire active0_next = (src0_rdy_i & dst0_rdy_o)? ~data0_i[33] : active0;
+ wire active1_next = (src1_rdy_i & dst1_rdy_o)? ~data1_i[33] : active1;
assign data0_o = cross_int ? data1_i : data0_i;
assign data1_o = cross_int ? data0_i : data1_i;
@@ -22,19 +24,19 @@ module crossbar36
always @(posedge clk)
if(reset | clear)
active0 <= 0;
- else if(src0_rdy_i & dst0_rdy_o)
- active0 <= ~data0_i[33];
+ else
+ active0 <= active0_next;
always @(posedge clk)
if(reset | clear)
active1 <= 0;
- else if(src1_rdy_i & dst1_rdy_o)
- active1 <= ~data1_i[33];
+ else
+ active1 <= active1_next;
always @(posedge clk)
if(reset | clear)
cross_int <= 0;
- else if(~active0 & ~active1)
+ else if(~active0_next & ~active1_next)
cross_int <= cross;
endmodule // crossbar36