开始调试,数据恢复不成功
This commit is contained in:
@@ -39,6 +39,8 @@ module ShinTopSpiTb(
|
||||
reg reset;
|
||||
reg clk8x;
|
||||
|
||||
reg [7:0] multiCLK;
|
||||
|
||||
wire [3:0] dDat_w;
|
||||
wire [3:0] uDat_w;
|
||||
|
||||
@@ -66,11 +68,24 @@ module ShinTopSpiTb(
|
||||
|
||||
wire [4:0] io_int_sig;
|
||||
|
||||
`define MULTICLK
|
||||
|
||||
ShinTop s_ShinTop_Mst(
|
||||
.clock(clock),
|
||||
.reset(reset | isSoftReset[0]),
|
||||
|
||||
.io_clk8x(clk8x),
|
||||
`ifdef MULTICLK
|
||||
.multiCLK_0(multiCLK[0]),
|
||||
.multiCLK_1(multiCLK[1]),
|
||||
.multiCLK_2(multiCLK[2]),
|
||||
.multiCLK_3(multiCLK[3]),
|
||||
.multiCLK_4(multiCLK[4]),
|
||||
.multiCLK_5(multiCLK[5]),
|
||||
.multiCLK_6(multiCLK[6]),
|
||||
.multiCLK_7(multiCLK[7]),
|
||||
`else
|
||||
.clk8x(clk8x),
|
||||
`endif
|
||||
.io_dDatIn(1'b0),
|
||||
.io_dDatOut(dDat_w[0]),
|
||||
.io_uDatIn(uDat_w[0]),
|
||||
@@ -104,7 +119,18 @@ ShinTop s_ShinTop_slv0(
|
||||
.clock(clock),
|
||||
.reset(reset | isSoftReset[1]),
|
||||
|
||||
.io_clk8x(clk8x),
|
||||
`ifdef MULTICLK
|
||||
.multiCLK_0(multiCLK[0]),
|
||||
.multiCLK_1(multiCLK[1]),
|
||||
.multiCLK_2(multiCLK[2]),
|
||||
.multiCLK_3(multiCLK[3]),
|
||||
.multiCLK_4(multiCLK[4]),
|
||||
.multiCLK_5(multiCLK[5]),
|
||||
.multiCLK_6(multiCLK[6]),
|
||||
.multiCLK_7(multiCLK[7]),
|
||||
`else
|
||||
.clk8x(clk8x),
|
||||
`endif
|
||||
.io_dDatIn(dDat_w[0]),
|
||||
.io_dDatOut(dDat_w[1]),
|
||||
.io_uDatIn(uDat_w[1]),
|
||||
@@ -137,7 +163,18 @@ ShinTop s_ShinTop_slv1(
|
||||
.clock(clock),
|
||||
.reset(reset | isSoftReset[2]),
|
||||
|
||||
.io_clk8x(clk8x),
|
||||
`ifdef MULTICLK
|
||||
.multiCLK_0(multiCLK[0]),
|
||||
.multiCLK_1(multiCLK[1]),
|
||||
.multiCLK_2(multiCLK[2]),
|
||||
.multiCLK_3(multiCLK[3]),
|
||||
.multiCLK_4(multiCLK[4]),
|
||||
.multiCLK_5(multiCLK[5]),
|
||||
.multiCLK_6(multiCLK[6]),
|
||||
.multiCLK_7(multiCLK[7]),
|
||||
`else
|
||||
.clk8x(clk8x),
|
||||
`endif
|
||||
.io_dDatIn(dDat_w[1]),
|
||||
.io_dDatOut(dDat_w[2]),
|
||||
.io_uDatIn(uDat_w[2]),
|
||||
@@ -170,7 +207,18 @@ ShinTop s_ShinTop_slv2(
|
||||
.clock(clock),
|
||||
.reset(reset | isSoftReset[3]),
|
||||
|
||||
.io_clk8x(clk8x),
|
||||
`ifdef MULTICLK
|
||||
.multiCLK_0(multiCLK[0]),
|
||||
.multiCLK_1(multiCLK[1]),
|
||||
.multiCLK_2(multiCLK[2]),
|
||||
.multiCLK_3(multiCLK[3]),
|
||||
.multiCLK_4(multiCLK[4]),
|
||||
.multiCLK_5(multiCLK[5]),
|
||||
.multiCLK_6(multiCLK[6]),
|
||||
.multiCLK_7(multiCLK[7]),
|
||||
`else
|
||||
.clk8x(clk8x),
|
||||
`endif
|
||||
.io_dDatIn(dDat_w[2]),
|
||||
.io_dDatOut(dDat_w[3]),
|
||||
.io_uDatIn(uDat_w[3]),
|
||||
@@ -203,7 +251,18 @@ ShinTop s_ShinTop_slv3(
|
||||
.clock(clock),
|
||||
.reset(reset | isSoftReset[4]),
|
||||
|
||||
.io_clk8x(clk8x),
|
||||
`ifdef MULTICLK
|
||||
.multiCLK_0(multiCLK[0]),
|
||||
.multiCLK_1(multiCLK[1]),
|
||||
.multiCLK_2(multiCLK[2]),
|
||||
.multiCLK_3(multiCLK[3]),
|
||||
.multiCLK_4(multiCLK[4]),
|
||||
.multiCLK_5(multiCLK[5]),
|
||||
.multiCLK_6(multiCLK[6]),
|
||||
.multiCLK_7(multiCLK[7]),
|
||||
`else
|
||||
.clk8x(clk8x),
|
||||
`endif
|
||||
.io_dDatIn(dDat_w[3]),
|
||||
.io_dDatOut(),
|
||||
.io_uDatIn(1'b0),
|
||||
@@ -274,6 +333,22 @@ initial begin
|
||||
forever begin #80 clock <= ~clock; end
|
||||
end
|
||||
|
||||
|
||||
generate
|
||||
for( genvar i = 0; i < 8; i = i + 1 ) begin
|
||||
initial begin
|
||||
multiCLK[i] = 0;
|
||||
for( integer j = i; j < 8; j = j + 1 ) begin
|
||||
#20
|
||||
;
|
||||
end
|
||||
forever begin #80 multiCLK[i] <= ~multiCLK[i]; end
|
||||
end
|
||||
end
|
||||
endgenerate
|
||||
|
||||
|
||||
|
||||
initial
|
||||
begin
|
||||
spidata_file = $fopen("spi_trans_data.txt", "w");
|
||||
|
||||
Reference in New Issue
Block a user