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

Subversion Repositories xulalx25soc

[/] [xulalx25soc/] [trunk/] [rtl/] [busmaster.v] - Diff between revs 83 and 101

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

Rev 83 Rev 101
Line 45... Line 45...
// Configuration question #1
// Configuration question #1
//
//
//      What innate capabilities are built into the board?
//      What innate capabilities are built into the board?
//
//
`define INCLUDE_ZIPCPU
`define INCLUDE_ZIPCPU
// `define      NO_ZIP_WBU_DELAY
 
 
// Without the ZipCPU competing for the bus, we don't need to delay it by a
 
// cycle.
 
`ifndef INCLUDE_ZIPCPU
 
`define NO_ZIP_WBU_DELAY
 
`endif
 
`ifdef  VERILATOR
 
`define NO_ZIP_WBU_DELAY
 
`endif
 
 
`define IMPLEMENT_ONCHIP_RAM
`define IMPLEMENT_ONCHIP_RAM
`ifndef VERILATOR
`ifndef VERILATOR
`ifndef XULA25
`ifndef XULA25
// `define      FANCY_ICAP_ACCESS
// `define      FANCY_ICAP_ACCESS
`endif
`endif
Line 165... Line 174...
        wire    w_interrupt;
        wire    w_interrupt;
        // Oh, and the debug control for the ZIP CPU
        // Oh, and the debug control for the ZIP CPU
        wire            wbu_zip_sel, zip_dbg_ack, zip_dbg_stall;
        wire            wbu_zip_sel, zip_dbg_ack, zip_dbg_stall;
        assign  wbu_zip_sel =((wbu_cyc)&&(wbu_addr[24]));
        assign  wbu_zip_sel =((wbu_cyc)&&(wbu_addr[24]));
        wire    [31:0]   zip_dbg_data;
        wire    [31:0]   zip_dbg_data;
 
        wire            wbu_dbg;
        wbubus  genbus(i_clk, i_rx_stb, i_rx_data,
        wbubus  genbus(i_clk, i_rx_stb, i_rx_data,
                        wbu_cyc, wbu_stb, wbu_we, wbu_addr, wbu_data,
                        wbu_cyc, wbu_stb, wbu_we, wbu_addr, wbu_data,
`ifdef  INCLUDE_ZIPCPU
`ifdef  INCLUDE_ZIPCPU
                        ((~wbu_zip_sel)&&(wbu_ack))
                        ((~wbu_zip_sel)&&(wbu_ack))
                                ||((wbu_zip_sel)&&(zip_dbg_ack)),
                                ||((wbu_zip_sel)&&(zip_dbg_ack)),
Line 178... Line 188...
`else
`else
                        wbu_ack, wbu_stall,
                        wbu_ack, wbu_stall,
                                wbu_err, dwb_idata,
                                wbu_err, dwb_idata,
`endif
`endif
                        w_interrupt,
                        w_interrupt,
                        o_tx_stb, o_tx_data, i_tx_busy);
                        o_tx_stb, o_tx_data, i_tx_busy,
 
                        wbu_dbg);
 
 
 
 
        //
        //
        //
        //
        // Second BUS master source: The ZipCPU
        // Second BUS master source: The ZipCPU
Line 197... Line 208...
        wire    [31:0]   dwb_addr, dwb_odata;
        wire    [31:0]   dwb_addr, dwb_odata;
        wire    [8:0]    w_ints_to_zip_cpu;
        wire    [8:0]    w_ints_to_zip_cpu;
`ifdef  INCLUDE_ZIPCPU
`ifdef  INCLUDE_ZIPCPU
`ifdef  XULA25
`ifdef  XULA25
        wire    [31:0]   zip_debug;
        wire    [31:0]   zip_debug;
        zipsystem #(24'h2000,ZA,8,1,9)
        zipsystem #(24'h2000,ZA,9,1,9)
                zippy(i_clk, 1'b0,
                zippy(i_clk, 1'b0,
                        // Zippys wishbone interface
                        // Zippys wishbone interface
                        zip_cyc, zip_stb, zip_we, w_zip_addr, zip_data,
                        zip_cyc, zip_stb, zip_we, w_zip_addr, zip_data,
                                zip_ack, zip_stall, dwb_idata, zip_err,
                                zip_ack, zip_stall, dwb_idata, zip_err,
                        w_ints_to_zip_cpu, zip_cpu_int,
                        w_ints_to_zip_cpu, zip_cpu_int,
Line 259... Line 270...
                        wbu_ack, wbu_stall, wbu_err,
                        wbu_ack, wbu_stall, wbu_err,
                // Common bus returns
                // Common bus returns
                dwb_cyc, dwb_stb, dwb_we, dwb_addr, dwb_odata,
                dwb_cyc, dwb_stb, dwb_we, dwb_addr, dwb_odata,
                        dwb_ack, dwb_stall, dwb_err);
                        dwb_ack, dwb_stall, dwb_err);
 
 
 
        // 
 
        // 
 
        // And because the ZIP CPU and the Arbiter create an unacceptable
 
        // delay, we fail timing.  So we add in a delay cycle ...
 
        // 
 
        // 
 
`ifdef  NO_ZIP_WBU_DELAY
 
        assign  wb_cyc    = dwb_cyc;
 
        assign  wb_stb    = dwb_stb;
 
        assign  wb_we     = dwb_we;
 
        assign  wb_addr   = dwb_addr;
 
        assign  wb_data   = dwb_odata;
 
        assign  dwb_idata = wb_idata;
 
        assign  dwb_ack   = wb_ack;
 
        assign  dwb_stall = wb_stall;
 
        assign  dwb_err   = wb_err;
`else
`else
 
        busdelay        wbu_zip_delay(i_clk,
 
                        dwb_cyc, dwb_stb, dwb_we, dwb_addr, dwb_odata,
 
                                dwb_ack, dwb_stall, dwb_idata, dwb_err,
 
                        wb_cyc, wb_stb, wb_we, wb_addr, wb_data,
 
                                wb_ack, wb_stall, wb_idata, wb_err);
 
`endif
 
 
 
 
 
`else // if no ZIP_CPU
        assign  zip_cyc = 1'b0;
        assign  zip_cyc = 1'b0;
        assign  zip_stb = 1'b0;
        assign  zip_stb = 1'b0;
        assign  zip_we  = 1'b0;
        assign  zip_we  = 1'b0;
        assign  zip_cpu_int = 1'b0;
        assign  zip_cpu_int = 1'b0;
        assign  zip_addr = 32'h000;
        assign  zip_addr = 32'h000;
Line 287... Line 323...
        assign  dwb_idata = wb_idata;
        assign  dwb_idata = wb_idata;
        assign  wbu_err = dwb_err;
        assign  wbu_err = dwb_err;
`endif
`endif
 
 
 
 
        // 
 
        // 
 
        // And because the ZIP CPU and the Arbiter create an unacceptable
 
        // delay, we fail timing.  So we add in a delay cycle ...
 
        // 
 
        // 
 
`ifdef  NO_ZIP_WBU_DELAY
 
        assign  wb_cyc    = dwb_cyc;
 
        assign  wb_stb    = dwb_stb;
 
        assign  wb_we     = dwb_we;
 
        assign  wb_addr   = dwb_addr;
 
        assign  wb_data   = dwb_odata;
 
        assign  dwb_idata = wb_idata;
 
        assign  dwb_ack   = wb_ack;
 
        assign  dwb_stall = wb_stall;
 
        assign  dwb_err   = wb_err;
 
`else
 
        busdelay        wbu_zip_delay(i_clk,
 
                        dwb_cyc, dwb_stb, dwb_we, dwb_addr, dwb_odata,
 
                                dwb_ack, dwb_stall, dwb_idata, dwb_err,
 
                        wb_cyc, wb_stb, wb_we, wb_addr, wb_data,
 
                                wb_ack, wb_stall, wb_idata, wb_err);
 
`endif
 
 
 
 
 
 
 
        wire    io_sel, pwm_sel, uart_sel, flash_sel, flctl_sel, scop_sel,
        wire    io_sel, pwm_sel, uart_sel, flash_sel, flctl_sel, scop_sel,
                        cfg_sel, mem_sel, sdram_sel, sdcard_sel,
                        cfg_sel, mem_sel, sdram_sel, sdcard_sel,
                        none_sel, many_sel, io_bank;
                        none_sel, many_sel, io_bank;
        wire    io_ack, flash_ack, scop_ack, cfg_ack, mem_ack,
        wire    io_ack, flash_ack, scop_ack, cfg_ack, mem_ack,
Line 473... Line 484...
        // audio rate can be adjusted (1), or whether it is fixed within the
        // audio rate can be adjusted (1), or whether it is fixed within the
        // build (0).
        // build (0).
`ifdef  XULA25
`ifdef  XULA25
        wbpwmaudio      #(16'd1813,1)   // 44.1 kHz, user adjustable
        wbpwmaudio      #(16'd1813,1)   // 44.1 kHz, user adjustable
`else
`else
        wbpwmaudio      #(16'h2710,0,16) //  8   kHz, fixed audio rate
        wbpwmaudio      #(16'h270f,0,16) //  8   kHz, fixed audio rate
`endif
`endif
                pwmdev(i_clk,
                pwmdev(i_clk,
                        wb_cyc, (wb_stb)&&(pwm_sel), wb_we, wb_addr[0],
                        wb_cyc, (wb_stb)&&(pwm_sel), wb_we, wb_addr[0],
                        wb_data, pwm_ack, pwm_stall, pwm_data, o_pwm, pwm_int);
                        wb_data, pwm_ack, pwm_stall, pwm_data, o_pwm, pwm_int);
 
 
 
 
 
 
        //
        //
        //      FLASH MEMORY CONFIGURATION ACCESS
        //      FLASH MEMORY CONFIGURATION ACCESS
        //
        //
        wire    flash_cs_n, flash_sck, flash_mosi;
        wire    flash_cs_n, flash_sck, flash_mosi;
        wire    spi_user, sdcard_grant, flash_grant;
        wire    spi_user, sdcard_grant, flash_grant;

powered by: WebSVN 2.1.0

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