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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [rtl/] [fasttop.v] - Diff between revs 12 and 13

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

Rev 12 Rev 13
Line 212... Line 212...
        // The WB bus interconnect, herein called fastmaster, which handles
        // The WB bus interconnect, herein called fastmaster, which handles
        // just about ... everything.
        // just about ... everything.
        //
        //
        //
        //
        //////
        //////
        wire            w_qspi_sck;
        wire            w_qspi_sck, w_qspi_cs_n;
        wire    [1:0]    qspi_bmod;
        wire    [1:0]    qspi_bmod;
        wire    [3:0]    qspi_dat;
        wire    [3:0]    qspi_dat;
        wire    [3:0]    i_qspi_dat;
        wire    [3:0]    i_qspi_dat;
 
 
        //
        //
Line 239... Line 239...
                i_sw, i_btn, o_led,
                i_sw, i_btn, o_led,
                o_clr_led0, o_clr_led1, o_clr_led2, o_clr_led3,
                o_clr_led0, o_clr_led1, o_clr_led2, o_clr_led3,
                // Board level PMod I/O
                // Board level PMod I/O
                i_aux_rx, o_aux_tx, o_aux_cts, i_gps_rx, o_gps_tx,
                i_aux_rx, o_aux_tx, o_aux_cts, i_gps_rx, o_gps_tx,
                // Quad SPI flash
                // Quad SPI flash
                o_qspi_cs_n, w_qspi_sck, qspi_dat, io_qspi_dat, qspi_bmod,
                w_qspi_cs_n, w_qspi_sck, qspi_dat, i_qspi_dat, qspi_bmod,
                // DDR3 SDRAM
                // DDR3 SDRAM
                o_ddr_reset_n, o_ddr_cke,
                o_ddr_reset_n, o_ddr_cke,
                w_ddr_cs_n, w_ddr_ras_n, w_ddr_cas_n, w_ddr_we_n,
                w_ddr_cs_n, w_ddr_ras_n, w_ddr_cas_n, w_ddr_we_n,
                w_ddr_dqs, w_ddr_dm, w_ddr_odt, w_ddr_bus_oe,
                w_ddr_dqs, w_ddr_dm, w_ddr_odt, w_ddr_bus_oe,
                w_ddr_addr, w_ddr_ba, wo_ddr_data, r_ddr_data,
                w_ddr_addr, w_ddr_ba, wo_ddr_data, r_ddr_data,
Line 276... Line 276...
        //
        //
        //      ??      Dual mode in  (not yet)
        //      ??      Dual mode in  (not yet)
        //      ??      Dual mode out (not yet)
        //      ??      Dual mode out (not yet)
        //
        //
        //
        //
`define QSPI_OUT_VERSION_ONE
// `define      QSPI_OUT_VERSION_ONE
`ifdef  QSPI_OUT_VERSION_ONE
`ifdef  QSPI_OUT_VERSION_ONE
        assign io_qspi_dat = (~qspi_bmod[1])?({2'b11,1'bz,qspi_dat[0]})
        assign io_qspi_dat = (~qspi_bmod[1])?({2'b11,1'bz,qspi_dat[0]})
                                :((qspi_bmod[0])?(4'bzzzz):(qspi_dat[3:0]));
                                :((qspi_bmod[0])?(4'bzzzz):(qspi_dat[3:0]));
        assign  i_qspi_dat = io_qspi_dat;
        assign  i_qspi_dat = io_qspi_dat;
        assign  o_qspi_sck = w_qspi_sck;
        assign  o_qspi_sck = w_qspi_sck;
`else
`else
        wire    [3:0]    i_qspi_ignore;
        wire    [3:0]    i_qspi_pedge, i_qspi_nedge;
 
 
        xoddr   xqspi_sck( i_clk, { w_qspi_sck,  w_qspi_sck }, o_qspi_sck);
        xoddr   xqspi_sck( i_clk, { w_qspi_sck,  w_qspi_sck }, o_qspi_sck);
 
        xoddr   xqspi_csn( i_clk, { w_qspi_cs_n, w_qspi_cs_n },o_qspi_cs_n);
        //
        //
        xioddr  xqspi_d0(  i_clk, (~qspi_bmod[0])||(~qspi_bmod[1]),
        xioddr  xqspi_d0(  i_clk, (qspi_bmod != 2'b11),
                { qspi_dat[0], qspi_dat[0] },
                { qspi_dat[0], qspi_dat[0] },
                { i_qspi_ignore[0], i_qspi_dat[0] }, io_qspi_dat[0]);
                { i_qspi_pedge[0], i_qspi_nedge[0] }, io_qspi_dat[0]);
        xioddr  xqspi_d1(  i_clk, (qspi_bmod==2'b10),
        xioddr  xqspi_d1(  i_clk, (qspi_bmod==2'b10),
                { qspi_dat[1], qspi_dat[1] },
                { qspi_dat[1], qspi_dat[1] },
                { i_qspi_ignore[1], i_qspi_dat[1] }, io_qspi_dat[1]);
                { i_qspi_pedge[1], i_qspi_nedge[1] }, io_qspi_dat[1]);
        xioddr  xqspi_d2(  i_clk, (qspi_bmod!=2'b11),
        xioddr  xqspi_d2(  i_clk, (qspi_bmod!=2'b11),
                (qspi_bmod[1])?{ qspi_dat[2], qspi_dat[2] }:2'b11,
                (qspi_bmod[1])?{ qspi_dat[2], qspi_dat[2] }:2'b11,
                { i_qspi_ignore[2], i_qspi_dat[2] }, io_qspi_dat[2]);
                { i_qspi_pedge[2], i_qspi_nedge[2] }, io_qspi_dat[2]);
        xioddr  xqspi_d3(  i_clk, (qspi_bmod!=2'b11),
        xioddr  xqspi_d3(  i_clk, (qspi_bmod!=2'b11),
                (qspi_bmod[1])?{ qspi_dat[3], qspi_dat[3] }:2'b11,
                (qspi_bmod[1])?{ qspi_dat[3], qspi_dat[3] }:2'b11,
                { i_qspi_ignore[3], i_qspi_dat[3] }, io_qspi_dat[3]);
                { i_qspi_pedge[3], i_qspi_nedge[3] }, io_qspi_dat[3]);
`endif
 
 
 
        //
 
        // Proposed QSPI mode select, to allow dual I/O mode
 
        //      000     Normal SPI mode
 
        //      001     Dual mode input
 
        //      010     Dual mode, output
 
        //      101     Quad I/O mode input
 
        //      110     Quad I/O mode output
 
        //
 
        //
 
        // assign io_qspi_dat[3:2] = (~qspi_bmod[2]) ? 2'b11
 
        //                      : (qspi_bmod[0])?2'bzz : qspi_dat[3:2];
 
        // assign io_qspi_dat[1] = (~qspi_bmod[1])?qspi_dat[1]:1'bz;
 
        // assign io_qspi_dat[0] = (qspi_bmod[0])?1'bz : qspi_dat[0];
 
 
 
        //
 
        //
 
        // The following primitive is necessary on other boards in order to
 
        // gain access to the o_qspi_sck pin.  On the Arty, however, there is
 
        // a clock PIN, so we don't need this primitive.
 
        //
 
        //
 
/*
 
        wire    [3:0]   su_nc;  // Startup primitive, no connect
 
        STARTUPE2 #(
 
                // Leave PROG_USR false to avoid activating the program
 
                // event security feature.  Notes state that such a feature
 
                // requires encrypted bitstreams.
 
                .PROG_USR("FALSE"),
 
                // Sets the configuration clock frequency (in ns) for
 
                // simulation.
 
                .SIM_CCLK_FREQ(0.0)
 
        ) STARTUPE2_inst (
 
        // CFGCLK, 1'b output: Configuration main clock output -- no connect
 
        .CFGCLK(su_nc[0]),
 
        // CFGMCLK, 1'b output: Configuration internal oscillator clock output
 
        .CFGMCLK(su_nc[1]),
 
        // EOS, 1'b output: Active high output indicating the End Of Startup.
 
        .EOS(su_nc[2]),
 
        // PREQ, 1'b output: PROGRAM request to fabric output
 
        //      Only enabled if PROG_USR is set.  This lets the fabric know
 
        //      that a request has been made (either JTAG or pin pulled low)
 
        //      to program the device
 
        .PREQ(su_nc[3]),
 
        // CLK, 1'b input: User start-up clock input
 
        .CLK(1'b0),
 
        // GSR, 1'b input: Global Set/Reset input
 
        .GSR(1'b0),
 
        // GTS, 1'b input: Global 3-state input
 
        .GTS(1'b0),
 
        // KEYCLEARB, 1'b input: Clear AES Decrypter Key input from BBRAM
 
        .KEYCLEARB(1'b0),
 
        // PACK, 1-bit input: PROGRAM acknowledge input
 
        //      This pin is only enabled if PROG_USR is set.  This allows the
 
        //      FPGA to acknowledge a request for reprogram to allow the FPGA
 
        //      to get itself into a reprogrammable state first.
 
        .PACK(1'b0),
 
        // USRCLKO, 1-bit input: User CCLK input -- This is why I am using this
 
        // module at all.
 
        .USRCCLKO(qspi_sck),
 
        // USRCCLKTS, 1'b input: User CCLK 3-state enable input
 
        //      An active high here places the clock into a high impedence
 
        //      state.  Since we wish to use the clock as an active output
 
        //      always, we drive this pin low.
 
        .USRCCLKTS(1'b0),
 
        // USRDONEO, 1'b input: User DONE pin output control
 
        //      Set this to "high" to make sure that the DONE LED pin is
 
        //      high.
 
        .USRDONEO(1'b1),
 
        // USRDONETS, 1'b input: User DONE 3-state enable output
 
        //      This enables the FPGA DONE pin to be active.  Setting this
 
        //      active high sets the DONE pin to high impedence, setting it
 
        //      low allows the output of this pin to be as stated above.
 
        .USRDONETS(1'b1)
 
        );
 
*/
 
 
 
 
 
 
        assign  i_qspi_dat = i_qspi_pedge;
 
`endif
 
 
        //
        //
        //
        //
        // Wires for setting up the SD Card Controller
        // Wires for setting up the SD Card Controller
        //
        //

powered by: WebSVN 2.1.0

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