summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt2008-11-09 22:51:15 +0000
committermatt2008-11-09 22:51:15 +0000
commit66d297a0bcd1bd590b7ee3e1a654af5df0c6c19f (patch)
tree3b44c67607a0e8599abc6b98b7dca1d3faefce99
parent0532c3a1aed5260a2e3bd5d7947933a33e4dc5e0 (diff)
downloadgnuradio-66d297a0bcd1bd590b7ee3e1a654af5df0c6c19f.tar.gz
gnuradio-66d297a0bcd1bd590b7ee3e1a654af5df0c6c19f.tar.bz2
gnuradio-66d297a0bcd1bd590b7ee3e1a654af5df0c6c19f.zip
hardware control of leds
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9961 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xusrp2/fpga/top/u2_core/u2_core.v18
1 files changed, 16 insertions, 2 deletions
diff --git a/usrp2/fpga/top/u2_core/u2_core.v b/usrp2/fpga/top/u2_core/u2_core.v
index 33daf8251..b12a7eaca 100755
--- a/usrp2/fpga/top/u2_core/u2_core.v
+++ b/usrp2/fpga/top/u2_core/u2_core.v
@@ -427,12 +427,26 @@ module u2_core
.in(set_data),.out(serdes_outs),.changed());
setting_reg #(.my_addr(2)) sr_adc (.clk(wb_clk),.rst(wb_rst),.strobe(set_stb),.addr(set_addr),
.in(set_data),.out(adc_outs),.changed());
- setting_reg #(.my_addr(3)) sr_led (.clk(wb_clk),.rst(wb_rst),.strobe(set_stb),.addr(set_addr),
- .in(set_data),.out(leds),.changed());
setting_reg #(.my_addr(4)) sr_phy (.clk(wb_clk),.rst(wb_rst),.strobe(set_stb),.addr(set_addr),
.in(set_data),.out(phy_reset),.changed());
// /////////////////////////////////////////////////////////////////////////
+ // LEDS
+ // register 8 determines whether leds are controlled by SW or not
+ // 1 = controlled by HW, 0 = by SW
+ // In Rev3 there are only 6 leds, and the highest one is on the ETH connector
+
+ wire [7:0] led_src, led_sw;
+ wire [7:0] led_hw = {pps_in,clk_status,serdes_link_up};
+
+ setting_reg #(.my_addr(3)) sr_led (.clk(wb_clk),.rst(wb_rst),.strobe(set_stb),.addr(set_addr),
+ .in(set_data),.out(led_sw),.changed());
+ setting_reg #(.my_addr(8)) sr_led_src (.clk(wb_clk),.rst(wb_rst),.strobe(set_stb),.addr(set_addr),
+ .in(set_data),.out(led_src),.changed());
+
+ assign leds = (led_src & led_hw) | (~led_src & led_sw);
+
+ // /////////////////////////////////////////////////////////////////////////
// Ethernet MAC Slave #6
wire Tx_mac_wa, Tx_mac_wr, Tx_mac_sop, Tx_mac_eop;