commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9961 - gnuradio/trunk/usrp2/fpga/top/u2_core


From: matt
Subject: [Commit-gnuradio] r9961 - gnuradio/trunk/usrp2/fpga/top/u2_core
Date: Sun, 9 Nov 2008 15:51:15 -0700 (MST)

Author: matt
Date: 2008-11-09 15:51:15 -0700 (Sun, 09 Nov 2008)
New Revision: 9961

Modified:
   gnuradio/trunk/usrp2/fpga/top/u2_core/u2_core.v
Log:
hardware control of leds


Modified: gnuradio/trunk/usrp2/fpga/top/u2_core/u2_core.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/top/u2_core/u2_core.v     2008-11-09 22:02:45 UTC 
(rev 9960)
+++ gnuradio/trunk/usrp2/fpga/top/u2_core/u2_core.v     2008-11-09 22:51:15 UTC 
(rev 9961)
@@ -427,12 +427,26 @@
                                      
.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;





reply via email to

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