URL
https://opencores.org/ocsvn/qspiflash/qspiflash/trunk
Subversion Repositories qspiflash
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 9 to Rev 8
- ↔ Reverse comparison
Rev 9 → Rev 8
/qspiflash/trunk/bench/cpp/qspiflashsim.cpp
81,26 → 81,20
memset(m_mem, 0x0ff, MEMBYTES); |
} |
|
void QSPIFLASHSIM::load(const unsigned addr, const char *fname) { |
void QSPIFLASHSIM::load(const char *fname) { |
FILE *fp; |
size_t len; |
int nr = 0; |
|
if (addr >= MEMBYTES) |
return; |
len = MEMBYTES-addr*4; |
|
if (NULL != (fp = fopen(fname, "r"))) { |
int nr = 0; |
nr = fread(&m_mem[addr], sizeof(char), len, fp); |
nr = fread(m_mem, sizeof(char), MEMBYTES, fp); |
fclose(fp); |
if (nr == 0) { |
fprintf(stderr, "SPI-FLASH: Could not read %s\n", fname); |
perror("O/S Err:"); |
} |
} else { |
fprintf(stderr, "SPI-FLASH: Could not open %s\n", fname); |
perror("O/S Err:"); |
} |
|
for(int i=nr; i<MEMBYTES; i++) |
m_mem[i] = 0x0ff; |
} |
|
#define QOREG(A) m_oreg = ((m_oreg & (~0x0ff))|(A&0x0ff)) |
391,8 → 385,8
QOREG(0x0c3); |
assert((m_addr & 0xfc00000)==0); |
} else if ((m_count >= 40)&&(0 == (m_sreg&0x01))) { |
//if (m_count == 40) |
//printf("DUMMY BYTE COMPLETE ...\n"); |
if (m_count == 40) |
printf("DUMMY BYTE COMPLETE ...\n"); |
QOREG(m_mem[m_addr++]); |
// if (m_debug) printf("SPIF[%08x] = %02x\n", m_addr-1, m_oreg); |
} else m_oreg = 0; |
/qspiflash/trunk/bench/cpp/qspiflashsim.h
72,8 → 72,7
|
public: |
QSPIFLASHSIM(void); |
void load(const char *fname) { load(0, fname); } |
void load(const unsigned addr, const char *fname); |
void load(const char *fname); |
void debug(const bool dbg) { m_debug = dbg; } |
bool debug(void) const { return m_debug; } |
int operator()(const int csn, const int sck, const int dat); |
/qspiflash/trunk/rtl/eqspiflash.v
File deleted
/qspiflash/trunk/rtl/lleqspi.v
File deleted
/qspiflash/trunk/rtl/wbqspiflash.v
663,7 → 663,7
|
spi_wr <= 1'b1; // Non-stop |
spi_in <= { 8'ha0, 24'h00 }; // Mode byte, then 2 bytes dummy |
spi_len <= 2'b10; // Write 24 bits |
spi_len <= 2'b10; // Write 8 bits |
spi_spd <= 1'b1; |
spi_dir <= 1'b0; // Still writing |
spi_hold <= 1'b0; |
/qspiflash/trunk/doc/spec.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/qspiflash/trunk/doc/src/gqtekspec.cls
29,8 → 29,6
\usepackage[dvips]{pstricks} |
\usepackage{hhline} |
\usepackage{colortbl} |
\definecolor{webgreen}{rgb}{0,0.5,0} |
\usepackage[dvips,colorlinks=true,linkcolor=webgreen]{hyperref} |
\newdateformat{headerdate}{\THEYEAR/\twodigit{\THEMONTH}/\twodigit{\THEDAY}} |
\setlength{\hoffset}{0.25in} |
\setlength{\voffset}{-0.5in} |
/qspiflash/trunk/doc/src/spec.tex
63,7 → 63,7
for more details. |
|
You should have received a copy of the GNU General Public License along |
with this program. If not, see \texttt{http://www.gnu.org/licenses/} for a |
with this program. If not, see \hbox{<http://www.gnu.org/licenses/>} for a |
copy. |
\end{license} |
\begin{revisionhistory} |
/qspiflash/trunk/doc/gpl-3.0.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream