URL
https://opencores.org/ocsvn/qspiflash/qspiflash/trunk
Subversion Repositories qspiflash
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 3 to Rev 2
- ↔ Reverse comparison
Rev 3 → Rev 2
/qspiflash/trunk/bench/cpp/qspiflashsim.cpp
File deleted
/qspiflash/trunk/bench/cpp/qspiflashsim.h
File deleted
/qspiflash/trunk/rtl/wbqspiflash.v
1,8 → 1,8
/////////////////////////////////////////////////////////////////////////// |
// |
// |
// Filename: wbspiflash.v |
// |
// Project: Wishbone Controlled Quad SPI Flash Controller |
// Project: FPGA library development (Basys3 development board) |
// |
// Purpose: Access a Quad SPI flash via a WISHBONE interface. This |
// includes both read and write (and erase) commands to the SPI |
11,7 → 11,7
// left/kept in the 4-bit read interface mode between accesses, |
// for a minimum read latency. |
// |
// Wishbone Registers (See spec sheet for more detail): |
// Wishbone Registers (See Basys3 Wishbone HTML page): |
// 0: local config(r) / erase commands(w) / deep power down cmds / etc. |
// R: (Write in Progress), (dirty-block), (spi_port_busy), 1'b0, 9'h00, |
// { last_erased_sector, 14'h00 } if (WIP) |
18,9 → 18,8
// else { current_sector_being_erased, 14'h00 } |
// current if write in progress, last if written |
// W: (1'b1 to erase), (12'h ignored), next_erased_block, 14'h ignored) |
// 1: Configuration register |
// 2: Status register (R/w) |
// 3: Read ID (read only) |
// 1: Read ID (read only) |
// 2: Status register (R(/w?)), reads update the WIP bit ... |
// (19 bits): Data (R/w, but expect writes to take a while) |
// |
// |
27,30 → 26,9
// Creator: Dan Gisselquist |
// Gisselquist Tecnology, LLC |
// |
/////////////////////////////////////////////////////////////////////////// |
// Copyright: 2015 |
// |
// Copyright (C) 2015, Gisselquist Technology, LLC |
// |
// This program is free software (firmware): 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 MERCHANTIBILITY 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. (It's in the $(ROOT)/doc directory, run make with no |
// target there if the PDF file isn't present.) If not, see |
// <http://www.gnu.org/licenses/> for a copy. |
// |
// License: GPL, v3, as defined and found on www.gnu.org, |
// http://www.gnu.org/licenses/gpl.html |
// |
// |
/////////////////////////////////////////////////////////////////////////// |
`define WBQSPI_RESET 0 |
`define WBQSPI_RESET_WEN 1 |
`define WBQSPI_IDLE 2 |
91,7 → 69,9
o_wb_ack, o_wb_stall, o_wb_data, |
// Quad Spi connections to the external device |
o_qspi_sck, o_qspi_cs_n, o_qspi_mod, o_qspi_dat, i_qspi_dat, |
o_interrupt); |
o_interrupt, |
// Info for a wbscope |
o_debug); |
input i_clk_100mhz; |
// Wishbone, inputs first |
input i_wb_cyc, i_wb_data_stb, i_wb_ctrl_stb, i_wb_we; |
108,6 → 88,8
input [3:0] i_qspi_dat; |
// Interrupt line |
output reg o_interrupt; |
// Debug/scope |
output wire [31:0] o_debug; |
|
reg spi_wr, spi_hold, spi_spd, spi_dir; |
reg [31:0] spi_in; |
114,11 → 96,13
reg [1:0] spi_len; |
wire [31:0] spi_out; |
wire spi_valid, spi_busy; |
wire [22:0] spi_dbg; |
llqspi lldriver(i_clk_100mhz, |
spi_wr, spi_hold, spi_in, spi_len, spi_spd, spi_dir, |
spi_out, spi_valid, spi_busy, |
o_qspi_sck, o_qspi_cs_n, o_qspi_mod, o_qspi_dat, |
i_qspi_dat); |
i_qspi_dat, |
spi_dbg); |
|
// Erase status tracking |
reg write_in_progress, write_protect; |
142,6 → 126,8
wire [5:0] spif_sector; |
assign spif_sector = spif_addr[19:14]; |
|
assign o_debug = { spi_wr, spi_spd, spi_hold, state, spi_dbg }; |
|
initial state = `WBQSPI_RESET; |
initial o_wb_ack = 1'b0; |
initial o_wb_stall = 1'b1; |
/qspiflash/trunk/rtl/llqspi.v
1,8 → 1,8
/////////////////////////////////////////////////////////////////////////// |
// |
// |
// Filename: llqspi.v |
// |
// Project: Wishbone Controlled Quad SPI Flash Controller |
// Project: FPGA library development (Basys-3 development board) |
// |
// Purpose: Reads/writes a word (user selectable number of bytes) of data |
// to/from a Quad SPI port. The port is understood to be |
13,30 → 13,9
// Creator: Dan Gisselquist |
// Gisselquist Tecnology, LLC |
// |
/////////////////////////////////////////////////////////////////////////// |
// Copyright: 2015 |
// |
// Copyright (C) 2015, Gisselquist Technology, LLC |
// |
// This program is free software (firmware): 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 MERCHANTIBILITY 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. (It's in the $(ROOT)/doc directory, run make with no |
// target there if the PDF file isn't present.) If not, see |
// <http://www.gnu.org/licenses/> for a copy. |
// |
// License: GPL, v3, as defined and found on www.gnu.org, |
// http://www.gnu.org/licenses/gpl.html |
// |
// |
/////////////////////////////////////////////////////////////////////////// |
`define QSPI_IDLE 0 |
`define QSPI_START 1 |
`define QSPI_BITS 2 |
54,7 → 33,9
i_wr, i_hold, i_word, i_len, i_spd, i_dir, |
o_word, o_valid, o_busy, |
// QSPI interface |
o_sck, o_cs_n, o_mod, o_dat, i_dat); |
o_sck, o_cs_n, o_mod, o_dat, i_dat, |
// Wbscope interface |
o_dbg); |
input i_clk; |
// Chip interface |
// Can send info |
74,7 → 55,11
output reg [1:0] o_mod; |
output reg [3:0] o_dat; |
input [3:0] i_dat; |
output wire [22:0] o_dbg; |
|
assign o_dbg = { state, spi_len, // 3+6+ 14 |
o_busy, o_valid, o_cs_n, o_sck, o_mod, o_dat, i_dat }; |
|
// Timing: |
// |
// Tick Clk BSY/WR CS_n BIT/MO STATE |
/qspiflash/trunk/doc/spec.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/qspiflash/trunk/doc/src/spec.tex
1,45 → 1,3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%% |
%% Filename: spec.tex |
%% |
%% Project: Wishbone Controlled Quad SPI Flash Controller |
%% |
%% Purpose: This LaTeX file contains all of the documentation/description |
%% currently provided with this Quad SPI Flash Controller. |
%% It's not nearly as interesting as the PDF file it creates, |
%% so I'd recommend reading that before diving into this file. |
%% You should be able to find the PDF file in the SVN distribution |
%% together with this PDF file and a copy of the GPL-3.0 license |
%% this file is distributed under. |
%% |
%% |
%% Creator: Dan Gisselquist |
%% Gisselquist Tecnology, LLC |
%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%% |
%% Copyright (C) 2015, Gisselquist Technology, LLC |
%% |
%% This program is free software (firmware): 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 MERCHANTIBILITY 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. (It's in the $(ROOT)/doc directory, run make with no |
%% target there if the PDF file isn't present.) If not, see |
%% <http://www.gnu.org/licenses/> for a copy. |
%% |
%% License: GPL, v3, as defined and found on www.gnu.org, |
%% http://www.gnu.org/licenses/gpl.html |
%% |
%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
\documentclass{gqtekspec} |
\project{Quad SPI Flash Controller} |
\title{Specification} |
63,8 → 21,7
for more details. |
|
You should have received a copy of the GNU General Public License along |
with this program. If not, see \hbox{<http://www.gnu.org/licenses/>} for a |
copy. |
with this program. If not, see \hbox{<http://www.gnu.org/licenses/>} for a copy. |
\end{license} |
\begin{revisionhistory} |
0.1 & 5/13/2015 & Gisselquist & First Draft \\\hline |