From bc6b2969ef4201f9d91331eb2577275acbb8abfa Mon Sep 17 00:00:00 2001 From: Blaise Tine Date: Thu, 2 Apr 2020 15:41:12 -0700 Subject: [PATCH] minor opae hw fixed --- driver/hw/vortex_afu.sv | 22 ++++++++-------- driver/hw/wave.do | 50 +++++++++++++++++++++++++++++++++++++ driver/tests/basic/Makefile | 2 +- 3 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 driver/hw/wave.do diff --git a/driver/hw/vortex_afu.sv b/driver/hw/vortex_afu.sv index d34dac2a..c65afe45 100644 --- a/driver/hw/vortex_afu.sv +++ b/driver/hw/vortex_afu.sv @@ -281,7 +281,6 @@ begin avs_writedata <= 0; avs_read <= 0; avs_write <= 0; - avs_read_ctr <= 0; avs_write_ctr <= 0; end @@ -323,9 +322,7 @@ begin STATE_RUN: begin if (vx_dram_req_read - && !avs_waitrequest - && !avs_raq_full - && !avs_rdq_full) + && !vx_dram_req_delay) begin avs_address <= (vx_dram_req_addr >> 6); avs_read <= 1; @@ -333,7 +330,7 @@ begin end if (vx_dram_req_write - && !avs_waitrequest) + && !vx_dram_req_delay) begin avs_writedata <= {>>{vx_dram_req_data}}; avs_address <= (vx_dram_req_addr >> 6); @@ -351,7 +348,10 @@ begin end // Vortex DRAM requests stalling -assign vx_dram_req_delay = !(avs_read || avs_write); +assign vx_dram_req_delay = !((STATE_RUN == state) + && !avs_waitrequest + && !avs_raq_full + && !avs_rdq_full); // Vortex DRAM fill response always_comb @@ -369,7 +369,7 @@ always_comb begin avs_raq_pop = vx_dram_fill_rsp || cci_write_req; avs_raq_din = avs_address; - avs_raq_push = avs_write; + avs_raq_push = avs_read; end VX_generic_queue_ll #( @@ -463,10 +463,10 @@ logic cci_write_pending; always_comb begin cci_write_req = (STATE_READ == state) - && !avs_rdq_empty - && !cp2af_sRxPort.c1TxAlmFull - && !cci_write_pending - && cci_write_ctr < csr_data_size; + && !avs_rdq_empty + && !cp2af_sRxPort.c1TxAlmFull + && !cci_write_pending + && cci_write_ctr < csr_data_size; wr_hdr = t_ccip_c1_ReqMemHdr'(0); wr_hdr.address = csr_io_addr + cci_write_ctr; diff --git a/driver/hw/wave.do b/driver/hw/wave.do new file mode 100644 index 00000000..4078ad38 --- /dev/null +++ b/driver/hw/wave.do @@ -0,0 +1,50 @@ +onerror {resume} +quietly WaveActivateNextPane {} 0 +add wave -noupdate -label clk /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/clk +add wave -noupdate -label reset /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/SoftReset +add wave -noupdate -label state /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/state +add wave -noupdate -label cci_write_pending /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/cci_write_pending +add wave -noupdate -label cci_write_ctr -radix decimal -radixshowbase 0 /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/cci_write_ctr +add wave -noupdate -label csr_data_size -radix decimal -radixshowbase 0 /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/csr_data_size +add wave -noupdate -label avs_read_ctr -radix decimal -radixshowbase 0 /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_read_ctr +add wave -noupdate -label avs_waitrequest /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_waitrequest +add wave -noupdate -label avs_address -radix hexadecimal -radixshowbase 0 /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_address +add wave -noupdate -label avs_readdata -radix hexadecimal /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_readdata +add wave -noupdate -label avs_writedata -radix hexadecimal /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_writedata +add wave -noupdate -label avs_write /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_write +add wave -noupdate -label avs_read /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_read +add wave -noupdate -label avs_readdatavalid /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_readdatavalid +add wave -noupdate -label sRx.c0.rspValid /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/cp2af_sRxPort.c0.rspValid +add wave -noupdate -label sRx.c1.rspValid /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/cp2af_sRxPort.c1.rspValid +add wave -noupdate -label sTx.c0.valid /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/af2cp_sTxPort.c0.valid +add wave -noupdate -label sTx.c1.valid /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/af2cp_sTxPort.c1.valid +add wave -noupdate -label cci_write_req /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/cci_write_req +add wave -noupdate -label avs_raq_push /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_raq_push +add wave -noupdate -label avs_rdq_push /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_rdq_push +add wave -noupdate -label avs_raq_pop /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_raq_pop +add wave -noupdate -label avs_rdq_pop /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_rdq_pop +add wave -noupdate -label avs_raq_full /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_raq_full +add wave -noupdate -label avs_rdq_full /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_rdq_full +add wave -noupdate -label avs_raq_empty /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_raq_empty +add wave -noupdate -label avs_rdq_empty /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/avs_rdq_empty +add wave -noupdate -label vx_dram_req_write /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/vx_dram_req_write +add wave -noupdate -label vx_dram_req_delay /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/vx_dram_req_delay +add wave -noupdate -label vx_dram_req_read /ase_top/ase_top_generic/platform_shim_ccip_std_afu/ccip_std_afu/vortex_afu_inst/vx_dram_req_read +TreeUpdate [SetDefaultTree] +WaveRestoreCursors {{Cursor 2} {77894400 ps} 0} +quietly wave cursor active 1 +configure wave -namecolwidth 195 +configure wave -valuecolwidth 100 +configure wave -justifyvalue left +configure wave -signalnamewidth 0 +configure wave -snapdistance 10 +configure wave -datasetprefix 0 +configure wave -rowmargin 4 +configure wave -childrowmargin 2 +configure wave -gridoffset 0 +configure wave -gridperiod 1 +configure wave -griddelta 40 +configure wave -timeline 0 +configure wave -timelineunits ps +update +WaveRestoreZoom {77712056 ps} {78076744 ps} diff --git a/driver/tests/basic/Makefile b/driver/tests/basic/Makefile index f29b8e64..d04e756f 100644 --- a/driver/tests/basic/Makefile +++ b/driver/tests/basic/Makefile @@ -18,7 +18,7 @@ run-fpga: $(PROJECT) LD_LIBRARY_PATH=../../sw/opae:$(LD_LIBRARY_PATH) ./$(PROJECT) run-ase: $(PROJECT) - ASE_LOG=0 LD_LIBRARY_PATH=../../sw/opae/ase:$(LD_LIBRARY_PATH) ./$(PROJECT) + ASE_LOG=0 LD_LIBRARY_PATH=../../sw/opae/ase:$(LD_LIBRARY_PATH) ./$(PROJECT) -t 1 run-rtlsim: $(PROJECT) LD_LIBRARY_PATH=../../sw/rtlsim:$(LD_LIBRARY_PATH) ./$(PROJECT)