OpenCores
URL https://opencores.org/ocsvn/s6soc/s6soc/trunk

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [rtl/] [busmaster.v] - Diff between revs 11 and 12

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 11 Rev 12
Line 46... Line 46...
`define FLASH_ACCESS
`define FLASH_ACCESS
`define DBG_SCOPE       // About 204 LUTs, at 2^6 addresses
`define DBG_SCOPE       // About 204 LUTs, at 2^6 addresses
// `define      INCLUDE_RTC     // About 90 LUTs
// `define      INCLUDE_RTC     // About 90 LUTs
module  busmaster(i_clk, i_rst,
module  busmaster(i_clk, i_rst,
                i_rx_stb, i_rx_data, o_tx_stb, o_tx_data, i_tx_busy,
                i_rx_stb, i_rx_data, o_tx_stb, o_tx_data, i_tx_busy,
                        o_uart_rts,
                        o_uart_cts,
                // The SPI Flash lines
                // The SPI Flash lines
                o_qspi_cs_n, o_qspi_sck, o_qspi_dat, i_qspi_dat, o_qspi_mod,
                o_qspi_cs_n, o_qspi_sck, o_qspi_dat, i_qspi_dat, o_qspi_mod,
                // The board I/O
                // The board I/O
                i_btn, o_led, o_pwm, o_pwm_aux,
                i_btn, o_led, o_pwm, o_pwm_aux,
                // Keypad connections
                // Keypad connections
Line 66... Line 66...
        input                   i_rx_stb;
        input                   i_rx_stb;
        input           [7:0]    i_rx_data;
        input           [7:0]    i_rx_data;
        output  reg             o_tx_stb;
        output  reg             o_tx_stb;
        output  reg     [7:0]    o_tx_data;
        output  reg     [7:0]    o_tx_data;
        input                   i_tx_busy;
        input                   i_tx_busy;
        output  wire            o_uart_rts;
        output  wire            o_uart_cts;
        // SPI flash control
        // SPI flash control
        output  wire            o_qspi_cs_n, o_qspi_sck;
        output  wire            o_qspi_cs_n, o_qspi_sck;
        output  wire    [3:0]    o_qspi_dat;
        output  wire    [3:0]    o_qspi_dat;
        input           [3:0]    i_qspi_dat;
        input           [3:0]    i_qspi_dat;
        output  wire    [1:0]    o_qspi_mod;
        output  wire    [1:0]    o_qspi_mod;
Line 317... Line 317...
        always @(posedge i_clk)
        always @(posedge i_clk)
                io_ack <= (wb_cyc)&&(wb_stb)&&(io_sel);
                io_ack <= (wb_cyc)&&(wb_stb)&&(io_sel);
        assign  io_stall = 1'b0;
        assign  io_stall = 1'b0;
 
 
        wire    pwm_ack, pwm_stall;
        wire    pwm_ack, pwm_stall;
        wbpwmaudio      theaudio(i_clk, wb_cyc,
        wbpwmaudio      #(14'd10000,2,0,14)
                                ((wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h4)), wb_we,
                theaudio(i_clk, wb_cyc,
                                1'b0, wb_data,
                                ((wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h4)),
                                pwm_ack, pwm_stall, pwm_data, o_pwm, o_pwm_aux,
                                        wb_we, 1'b0, wb_data,
 
                                pwm_ack, pwm_stall, pwm_data, o_pwm,
 
                                        o_pwm_aux, //={pwm_shutdown_n,pwm_gain}
                                pwm_int);
                                pwm_int);
 
 
        //
        //
        // Special Purpose I/O: Keypad, button, LED status and control
        // Special Purpose I/O: Keypad, button, LED status and control
        //
        //
Line 374... Line 376...
                if((wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h7)&&(~wb_we))
                if((wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h7)&&(~wb_we))
                        rx_rdy <= i_rx_stb;
                        rx_rdy <= i_rx_stb;
                else if (i_rx_stb)
                else if (i_rx_stb)
                        rx_rdy <= (rx_rdy | i_rx_stb);
                        rx_rdy <= (rx_rdy | i_rx_stb);
        end
        end
        assign  o_uart_rts = (~rx_rdy);
        assign  o_uart_cts = (~rx_rdy);
        assign  uart_data = { 23'h0, ~rx_rdy, r_rx_data };
        assign  uart_data = { 23'h0, ~rx_rdy, r_rx_data };
        //
        //
        // uart_ack gets returned as part of io_ack, since that happens when
        // uart_ack gets returned as part of io_ack, since that happens when
        // io_sel and wb_stb are defined
        // io_sel and wb_stb are defined
        //
        //

powered by: WebSVN 2.1.0

© copyright 1999-2022 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.