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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [rtl/] [altbusmaster.v] - Diff between revs 11 and 13

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

Rev 11 Rev 13
Line 50... Line 50...
                // DEPP I/O Control
                // DEPP I/O Control
                i_depp_astb_n, i_depp_dstb_n, i_depp_write_n,
                i_depp_astb_n, i_depp_dstb_n, i_depp_write_n,
                        i_depp_data, o_depp_data, o_depp_wait,
                        i_depp_data, o_depp_data, o_depp_wait,
                // External UART interface
                // External UART interface
                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 75... Line 75...
        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 252... Line 252...
        //
        //
        //
        //
        reg             rx_rdy;
        reg             rx_rdy;
        wire    [11:0]   int_vector;
        wire    [11:0]   int_vector;
        assign  int_vector = { flash_interrupt, gpio_int, pwm_int, keypad_int,
        assign  int_vector = { flash_interrupt, gpio_int, pwm_int, keypad_int,
                                ~i_tx_busy, rx_rdy, tmrb_int, tmra_int,
                                (~o_tx_stb), rx_rdy,
 
                                tmrb_int, tmra_int,
                                rtc_interrupt, scop_interrupt,
                                rtc_interrupt, scop_interrupt,
                                wb_err, button_int };
                                wb_err, button_int };
 
 
        wire    [31:0]   pic_data;
        wire    [31:0]   pic_data;
        icontrol #(12)  pic(i_clk, 1'b0, (wb_stb)&&(io_sel)
        icontrol #(12)  pic(i_clk, 1'b0, (wb_stb)&&(io_sel)
Line 268... Line 269...
                if (wb_err)
                if (wb_err)
                        bus_err_addr <= wb_addr;
                        bus_err_addr <= wb_addr;
 
 
        wire    [31:0]   timer_a, timer_b;
        wire    [31:0]   timer_a, timer_b;
        wire            zta_ack, zta_stall, ztb_ack, ztb_stall;
        wire            zta_ack, zta_stall, ztb_ack, ztb_stall;
        ziptimer        #(32,20)
        ziptimer        #(32,31)
                zipt_a(i_clk, 1'b0, 1'b1, wb_cyc,
                zipt_a(i_clk, 1'b0, 1'b1, wb_cyc,
                                (wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h2),
                                (wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h2),
                                wb_we, wb_data, zta_ack, zta_stall, timer_a,
                                wb_we, wb_data, zta_ack, zta_stall, timer_a,
                                tmra_int);
                                tmra_int);
        ziptimer        #(32,20)
        ziptimer        #(32,31)
                zipt_b(i_clk, 1'b0, 1'b1, wb_cyc,
                zipt_b(i_clk, 1'b0, 1'b1, wb_cyc,
                                (wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h3),
                                (wb_stb)&&(io_sel)&&(wb_addr[3:0]==4'h3),
                                wb_we, wb_data, ztb_ack, ztb_stall, timer_b,
                                wb_we, wb_data, ztb_ack, ztb_stall, timer_b,
                                tmrb_int);
                                tmrb_int);
 
 
Line 320... Line 321...
        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 377... Line 380...
                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-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.