- use SPI flash as SPI slave

git-svn-id: http://moon:8086/svn/vhdl/trunk@1292 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2015-06-10 20:01:26 +00:00
parent b19c4c2883
commit 295095e2b0
3 changed files with 69 additions and 16 deletions
+5
View File
@@ -3,6 +3,10 @@
##
if {[file exists work]} {vdel -lib work -all}
vlib fmf
vcom -work fmf -93 "../../models/memory/flash/serial/S25fl064k/utilities/conversions.vhd"
vcom -work fmf -93 "../../models/memory/flash/serial/S25fl064k/utilities/gen_utils.vhd"
vlib work
vcom -explicit -93 "../../misc/utils_pkg.vhd"
vcom -explicit -93 "../../FIFO/src/fifo_ctrl_pkg.vhd"
@@ -14,6 +18,7 @@ vcom -explicit -93 "../../FIFO/src/fifo_sync_ctrl.vhd"
vcom -explicit -93 "../../FIFO/src/fifo_sync.vhd"
vcom -explicit -93 "../src/spi_types.vhd"
vcom -explicit -93 "../src/spi_master.vhd"
vcom -explicit -93 "../../models/memory/flash/serial/S25fl064k/model/S25fl064k.vhd"
vcom -explicit -93 "../src/tb_spi_master.vhd"
vsim -t 1ps -lib work tb_spi_master
view wave
+35 -3
View File
@@ -60,7 +60,6 @@ add wave -noupdate -format Literal -radix hexadecimal /tb_spi_master/inst_spi_ma
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/write_fifo_full
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/write_fifo_empty
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/slv_enable
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/rx_enable
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/read_fifo_full
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/read_fifo_empty
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/read_fifo_we
@@ -70,8 +69,41 @@ add wave -noupdate -format Literal /tb_spi_master/inst_spi_master/spi_rst_count
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/spi_rst
add wave -noupdate -format Logic /tb_spi_master/inst_spi_master/spi_clk_div_en
add wave -noupdate -format Literal /tb_spi_master/inst_spi_master/spi_clk_div_count
add wave -noupdate -divider Flash
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/sck
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/si
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/csneg
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/holdneg
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/wpneg
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/so
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/sck_ipd
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/si_ipd
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/so_ipd
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/csneg_ipd
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/holdneg_ipd
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/wpneg_ipd
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/holdneg_pullup
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/wpneg_pullup
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/pp_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/pp_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/pu_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/pu_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/se_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/se_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/be_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/be_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/ep_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/ep_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/wr_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/wr_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/dp_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/dp_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/pe_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/pe_out
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/res_in
add wave -noupdate -format Logic /tb_spi_master/inst_spi_slave/res_out
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {23780000 ps} 0}
WaveRestoreCursors {{Cursor 1} {34359846 ps} 0}
configure wave -namecolwidth 197
configure wave -valuecolwidth 131
configure wave -justifyvalue left
@@ -85,4 +117,4 @@ configure wave -gridperiod 1
configure wave -griddelta 40
configure wave -timeline 0
update
WaveRestoreZoom {31046634 ps} {50997546 ps}
WaveRestoreZoom {31046634 ps} {50872181 ps}