diff options
| author | Ben Hilburn <ben.hilburn@ettus.com> | 2014-02-14 12:05:07 -0800 | 
|---|---|---|
| committer | Ben Hilburn <ben.hilburn@ettus.com> | 2014-02-14 12:05:07 -0800 | 
| commit | ff1546f8137f7f92bb250f685561b0c34cc0e053 (patch) | |
| tree | 7fa6fd05c8828df256a1b20e2935bd3ba9899e2c /fpga/usrp3/lib/wishbone | |
| parent | 4f691d88123784c2b405816925f1a1aef69d18c1 (diff) | |
| download | uhd-ff1546f8137f7f92bb250f685561b0c34cc0e053.tar.gz uhd-ff1546f8137f7f92bb250f685561b0c34cc0e053.tar.bz2 uhd-ff1546f8137f7f92bb250f685561b0c34cc0e053.zip  | |
Pushing the bulk of UHD-3.7.0 code.
Diffstat (limited to 'fpga/usrp3/lib/wishbone')
| -rw-r--r-- | fpga/usrp3/lib/wishbone/axi_stream_to_wb.v | 39 | ||||
| -rw-r--r-- | fpga/usrp3/lib/wishbone/settings_bus.v | 14 | ||||
| -rw-r--r-- | fpga/usrp3/lib/wishbone/settings_readback.v | 14 | ||||
| -rw-r--r-- | fpga/usrp3/lib/wishbone/simple_uart.v | 14 | ||||
| -rw-r--r-- | fpga/usrp3/lib/wishbone/simple_uart_rx.v | 14 | ||||
| -rw-r--r-- | fpga/usrp3/lib/wishbone/simple_uart_tx.v | 14 | 
6 files changed, 27 insertions, 82 deletions
diff --git a/fpga/usrp3/lib/wishbone/axi_stream_to_wb.v b/fpga/usrp3/lib/wishbone/axi_stream_to_wb.v index 559f7f3ff..15bdc0982 100644 --- a/fpga/usrp3/lib/wishbone/axi_stream_to_wb.v +++ b/fpga/usrp3/lib/wishbone/axi_stream_to_wb.v @@ -1,19 +1,7 @@  //  // Copyright 2012 Ettus Research LLC  // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program.  If not, see <http://www.gnu.org/licenses/>. -// +  // AXI stream to/from wishbone  // Input is an axi stream which wites into a BRAM. @@ -40,7 +28,7 @@ module axi_stream_to_wb      //-- the wishbone interface      input clk_i, input rst_i,      input we_i, input stb_i, input cyc_i, output reg ack_o, -    input [AWIDTH-1:0] adr_i, input [31:0] dat_i, output [31:0] dat_o, +    input [AWIDTH-1:0] adr_i, input [31:0] dat_i, output reg [31:0] dat_o,      //-- the axi stream interface input      input [63:0] rx_tdata, @@ -60,10 +48,23 @@ module axi_stream_to_wb      output [31:0] debug_tx  ); +    reg stb_i_del; +    always @(posedge clk_i) begin +        if (rst_i) stb_i_del <= 0; +        else stb_i_del <= stb_i; +    end + +    reg ack_o_del; +    always @(posedge clk_i) begin +        if (rst_i)  ack_o_del <= 0; +        else        ack_o_del <= ack_o; +    end +      //drive the ack signal      always @(posedge clk_i) begin -        if (rst_i) ack_o <= 0; -        else ack_o <= stb_i & ~ack_o; +        if (rst_i)      ack_o <= 0; +        else if (we_i)  ack_o <= stb_i & ~ack_o; +        else            ack_o <= stb_i & stb_i_del & ~ack_o & ~ack_o_del;      end      //control registers, status @@ -119,7 +120,11 @@ module axi_stream_to_wb      );      //select the data source, status, or upper/lower 32 from bram -    assign dat_o = ctrl_addressed ? status : ((!adr_i[2])? rx_bram_data64[63:32]: rx_bram_data64[31:0]); +    wire [31:0] dat_o_pipeline; +    assign dat_o_pipeline = ctrl_addressed ? status : ((!adr_i[2])? rx_bram_data64[63:32]: rx_bram_data64[31:0]); +    always @(posedge clk_i) begin +        dat_o <= dat_o_pipeline; +    end      //------------------------------------------------------------------      //-- block ram interface between wb and output stream diff --git a/fpga/usrp3/lib/wishbone/settings_bus.v b/fpga/usrp3/lib/wishbone/settings_bus.v index 3238e0ac3..39f148916 100644 --- a/fpga/usrp3/lib/wishbone/settings_bus.v +++ b/fpga/usrp3/lib/wishbone/settings_bus.v @@ -1,19 +1,7 @@  //  // Copyright 2011-2012 Ettus Research LLC  // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program.  If not, see <http://www.gnu.org/licenses/>. -// +  // Grab settings off the wishbone bus, send them out to our simpler bus on the fast clock diff --git a/fpga/usrp3/lib/wishbone/settings_readback.v b/fpga/usrp3/lib/wishbone/settings_readback.v index ce0ddd180..745571717 100644 --- a/fpga/usrp3/lib/wishbone/settings_readback.v +++ b/fpga/usrp3/lib/wishbone/settings_readback.v @@ -1,19 +1,7 @@  //  // Copyright 2011-2012 Ettus Research LLC  // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program.  If not, see <http://www.gnu.org/licenses/>. -// +  //  // Use this module in conjunction with settings_bus.v to add stateful reads diff --git a/fpga/usrp3/lib/wishbone/simple_uart.v b/fpga/usrp3/lib/wishbone/simple_uart.v index 640ba884f..51dc23f16 100644 --- a/fpga/usrp3/lib/wishbone/simple_uart.v +++ b/fpga/usrp3/lib/wishbone/simple_uart.v @@ -1,19 +1,7 @@  //  // Copyright 2011 Ettus Research LLC  // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program.  If not, see <http://www.gnu.org/licenses/>. -// +  module simple_uart diff --git a/fpga/usrp3/lib/wishbone/simple_uart_rx.v b/fpga/usrp3/lib/wishbone/simple_uart_rx.v index da4d28884..7790a0a87 100644 --- a/fpga/usrp3/lib/wishbone/simple_uart_rx.v +++ b/fpga/usrp3/lib/wishbone/simple_uart_rx.v @@ -1,19 +1,7 @@  //  // Copyright 2011-2013 Ettus Research LLC  // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program.  If not, see <http://www.gnu.org/licenses/>. -// + diff --git a/fpga/usrp3/lib/wishbone/simple_uart_tx.v b/fpga/usrp3/lib/wishbone/simple_uart_tx.v index 317596bba..3eb1a1ecd 100644 --- a/fpga/usrp3/lib/wishbone/simple_uart_tx.v +++ b/fpga/usrp3/lib/wishbone/simple_uart_tx.v @@ -1,19 +1,7 @@  //  // Copyright 2011-2013 Ettus Research LLC  // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program.  If not, see <http://www.gnu.org/licenses/>. -// +  module simple_uart_tx  | 
