Преглед изворни кода

Фильтры были:

1Гц - 300КГц - Тьюки.
500КГц - 2МГц - sin^2.
3МГц - 10МГц - Прямоугольное окно.
Фильтры стали:
1Гц - 2МГц - Тьюки.
3МГц - 10МГц Прямоугольное окно.
ChStepan пре 1 година
родитељ
комит
ca7e7a2713

+ 47 - 0
S5444_M/src/constrs/S5443Top.xdc

@@ -250,3 +250,50 @@ connect_debug_port dbg_hub/clk [get_nets gclk_BUFG]
 
 
 
+
+create_debug_core u_ila_0 ila
+set_property ALL_PROBE_SAME_MU true [get_debug_cores u_ila_0]
+set_property ALL_PROBE_SAME_MU_CNT 1 [get_debug_cores u_ila_0]
+set_property C_ADV_TRIGGER false [get_debug_cores u_ila_0]
+set_property C_DATA_DEPTH 1024 [get_debug_cores u_ila_0]
+set_property C_EN_STRG_QUAL false [get_debug_cores u_ila_0]
+set_property C_INPUT_PIPE_STAGES 0 [get_debug_cores u_ila_0]
+set_property C_TRIGIN_EN false [get_debug_cores u_ila_0]
+set_property C_TRIGOUT_EN false [get_debug_cores u_ila_0]
+set_property port_width 1 [get_debug_ports u_ila_0/clk]
+connect_debug_port u_ila_0/clk [get_nets [list gclk_BUFG]]
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe0]
+set_property port_width 18 [get_debug_ports u_ila_0/probe0]
+connect_debug_port u_ila_0/probe0 [get_nets [list {InternalDsp/wind[0]} {InternalDsp/wind[1]} {InternalDsp/wind[2]} {InternalDsp/wind[3]} {InternalDsp/wind[4]} {InternalDsp/wind[5]} {InternalDsp/wind[6]} {InternalDsp/wind[7]} {InternalDsp/wind[8]} {InternalDsp/wind[9]} {InternalDsp/wind[10]} {InternalDsp/wind[11]} {InternalDsp/wind[12]} {InternalDsp/wind[13]} {InternalDsp/wind[14]} {InternalDsp/wind[15]} {InternalDsp/wind[16]} {InternalDsp/wind[17]}]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe1]
+set_property port_width 7 [get_debug_ports u_ila_0/probe1]
+connect_debug_port u_ila_0/probe1 [get_nets [list {pulseBus[0]} {pulseBus[1]} {pulseBus[2]} {pulseBus[3]} {pulseBus[4]} {pulseBus[5]} {pulseBus[6]}]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe2]
+set_property port_width 1 [get_debug_ports u_ila_0/probe2]
+connect_debug_port u_ila_0/probe2 [get_nets [list InternalDsp/EndMeas_o]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe3]
+set_property port_width 1 [get_debug_ports u_ila_0/probe3]
+connect_debug_port u_ila_0/probe3 [get_nets [list measStart]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe4]
+set_property port_width 1 [get_debug_ports u_ila_0/probe4]
+connect_debug_port u_ila_0/probe4 [get_nets [list InternalDsp/MeasWind_o]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe5]
+set_property port_width 1 [get_debug_ports u_ila_0/probe5]
+connect_debug_port u_ila_0/probe5 [get_nets [list startMeasSyncRR]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe6]
+set_property port_width 1 [get_debug_ports u_ila_0/probe6]
+connect_debug_port u_ila_0/probe6 [get_nets [list StartMeas_i_IBUF]]
+create_debug_port u_ila_0 probe
+set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe7]
+set_property port_width 1 [get_debug_ports u_ila_0/probe7]
+connect_debug_port u_ila_0/probe7 [get_nets [list EndMeas_o_OBUF]]
+set_property C_CLK_INPUT_FREQ_HZ 300000000 [get_debug_cores dbg_hub]
+set_property C_ENABLE_CLK_DIVIDER false [get_debug_cores dbg_hub]
+set_property C_USER_SCAN_CHAIN 1 [get_debug_cores dbg_hub]
+connect_debug_port dbg_hub/clk [get_nets gclk_BUFG]

+ 2 - 2
S5444_M/src/src/InternalDsp/AdcCalibration.v

@@ -6,7 +6,7 @@
 // 
 // Create Date:    14:12:30 06/03/2020 
 // Design Name: 
-// Module Name:     
+// Module Name:    
 // Project Name: 
 // Target Devices: 
 // Tool versions: 
@@ -74,7 +74,7 @@ module AdcCalibration
 
 	assign	CalDone_o	=	calDone;
 	assign	CalibratedAdcData_o	=	calibratedData;
-	
+
 //================================================================================
 //  CODING
 //================================================================================	

+ 1 - 1
S5444_M/src/src/InternalDsp/CordicNco.v

@@ -117,6 +117,7 @@ always @(posedge Clk_i) begin
 	end
 end
 
+//  Phase handle logic
 always @(posedge Clk_i) begin
     if (Rst_i) begin
         phaseAcc   <= {PhIncWidth{1'b0}};
@@ -244,5 +245,4 @@ always @(posedge Clk_i) begin
 		Val_o		<= valPipe[0];
     end	
 end
-
 endmodule

+ 1 - 2
S5444_M/src/src/InternalDsp/InternalDsp.v

@@ -182,12 +182,11 @@ module InternalDsp
 	assign	CalModeDone_o	=	&calDone;
 	
 //================================================================================
-//  CODING
+//  INSTANTIATIONS
 //================================================================================
 
 //----------------------------------------------
 //Module generates event signals for measurement
-
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
 		if	(!StartMeas_i)	begin

+ 2 - 3
S5444_M/src/src/InternalDsp/MeasCtrlModule.v

@@ -53,7 +53,6 @@ module MeasCtrlModule
 	output	[1:0]	TukeyCtrl_o
 );
 
-
 //================================================================================
 //  REG/WIRE
 //================================================================================
@@ -105,7 +104,7 @@ module MeasCtrlModule
 	wire	incPhase	=	(pNumCnt	<=	tukeyFirstCosValues);
 	wire	decrPhase	=	(pNumCnt	>=	tukeySecondCosValues-1	&	pNumCnt	<=	WindPointsNum_i-1);
 	
-	wire	wideFilterFlag	=	(FilterCmd_i>=8'h54	&	FilterCmd_i!=8'h70);
+	wire	wideFilterFlag	=	(FilterCmd_i>=8'h63	&	FilterCmd_i!=8'h70);
 	
 	reg		sampleStrobeGenRst;
 	
@@ -130,7 +129,7 @@ module MeasCtrlModule
 //================================================================================
 //  CODING
 //================================================================================
-	
+
 	always	@(posedge	Clk_i)	begin
 		if	(!Rst_i)	begin
 			if	(measCnt	==	MeasNum_i-1	&	measWind)	begin

+ 15 - 15
S5444_M/src/src/InternalDsp/WinParameters.v

@@ -302,38 +302,38 @@ always	@	(posedge	Clk_i)	begin
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h54 : begin//	500	KHz
-						windPhInc 		<=	32'h1c71c71;
+						windPhInc 		<=	32'h15555555;
 						// winNormCoef		<=	32'h3ce38e38;
-						winNormCoef		<=	32'h3ce98ccd;
-						winPointsNum	<=	32'h90;
+						winNormCoef		<=	32'h3cba2e8c;
+						winPointsNum	<=	32'h65;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h55 : begin//	700	KHz
-						windPhInc		<=	32'h2828282;
+						windPhInc		<=	32'h1c71c71c;
 						// winNormCoef		<=	32'h3d20a0a0;
-						winNormCoef		<=	32'h3d24cd6d;
-						winPointsNum	<=	32'h66;
+						winNormCoef		<=	32'h3d042108;
+						winPointsNum	<=	32'h48;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h60 : begin//	1	MHz
-						windPhInc 		<=	32'h38e38e3;
+						windPhInc 		<=	32'h2aaaaaaa;
 						// winNormCoef		<=	32'h3d638e39;
-						winNormCoef		<=	32'h3d698ccd;
-						winPointsNum	<=	32'h48;
+						winNormCoef		<=	32'h3d3e82fa;
+						winPointsNum	<=	32'h32;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h61 : begin//	1.5	MHz
-						windPhInc 		<=	32'h5555555;
+						windPhInc 		<=	32'h40000000;
 						// winNormCoef		<=	32'h3daaaaab;
-						winNormCoef		<=	32'h3daf299a;
-						winPointsNum	<=	32'h30;
+						winNormCoef		<=	32'h3d924925;
+						winPointsNum	<=	32'h21;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h62 : begin//	2	MHz
-						windPhInc 		<=	32'h71c71c7;
+						windPhInc 		<=	32'h55555555;
 						// winNormCoef		<=	32'h3de38e39;
-						winNormCoef		<=	32'h3de98759;
-						winPointsNum	<=	32'h24;
+						winNormCoef		<=	32'h3dc30c31;
+						winPointsNum	<=	32'h19;
 						averageNoiseLvl	<=	32'h0;
 					end	
 			8'h63 : begin

+ 3 - 3
S5444_M/src/src/InternalDsp/Win_calc.v

@@ -117,9 +117,9 @@ module Win_calc	(
 	assign	windMux1	=	(sinFilterFlag)	?	sinWindPow2[34-:18]:tukeyWindOut;
 	assign	windMux2	=	(rectFilterFlag)?	18'h1ffff:windMux1;
 
-	assign	win_o		=	windMux2;
+	assign	win_o		=	(rectFilterFlag)? 18'h1ffff:tukeyWindOut;
 
-// ================================================================================
+// ===============================================================================
 //  CODING
 //================================================================================	
 
@@ -182,6 +182,7 @@ always	@(*)	begin
 	end
 end
 
+
 always	@(*)	begin
 	if	(!reset_i)	begin
 		if	(!win_type_i)	begin 
@@ -197,5 +198,4 @@ always	@(*)	begin
 		tukeyWind	=	18'h0;
 	end
 end
-
 endmodule

+ 2 - 2
S5444_S/src/src/InternalDsp/AdcCalibration.v

@@ -6,7 +6,7 @@
 // 
 // Create Date:    14:12:30 06/03/2020 
 // Design Name: 
-// Module Name:     
+// Module Name:    
 // Project Name: 
 // Target Devices: 
 // Tool versions: 
@@ -74,7 +74,7 @@ module AdcCalibration
 
 	assign	CalDone_o	=	calDone;
 	assign	CalibratedAdcData_o	=	calibratedData;
-	
+
 //================================================================================
 //  CODING
 //================================================================================	

+ 1 - 1
S5444_S/src/src/InternalDsp/CordicNco.v

@@ -117,6 +117,7 @@ always @(posedge Clk_i) begin
 	end
 end
 
+//  Phase handle logic
 always @(posedge Clk_i) begin
     if (Rst_i) begin
         phaseAcc   <= {PhIncWidth{1'b0}};
@@ -244,5 +245,4 @@ always @(posedge Clk_i) begin
 		Val_o		<= valPipe[0];
     end	
 end
-
 endmodule

+ 1 - 2
S5444_S/src/src/InternalDsp/InternalDsp.v

@@ -182,12 +182,11 @@ module InternalDsp
 	assign	CalModeDone_o	=	&calDone;
 	
 //================================================================================
-//  CODING
+//  INSTANTIATIONS
 //================================================================================
 
 //----------------------------------------------
 //Module generates event signals for measurement
-
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
 		if	(!StartMeas_i)	begin

+ 2 - 3
S5444_S/src/src/InternalDsp/MeasCtrlModule.v

@@ -53,7 +53,6 @@ module MeasCtrlModule
 	output	[1:0]	TukeyCtrl_o
 );
 
-
 //================================================================================
 //  REG/WIRE
 //================================================================================
@@ -105,7 +104,7 @@ module MeasCtrlModule
 	wire	incPhase	=	(pNumCnt	<=	tukeyFirstCosValues);
 	wire	decrPhase	=	(pNumCnt	>=	tukeySecondCosValues-1	&	pNumCnt	<=	WindPointsNum_i-1);
 	
-	wire	wideFilterFlag	=	(FilterCmd_i>=8'h54	&	FilterCmd_i!=8'h70);
+	wire	wideFilterFlag	=	(FilterCmd_i>=8'h63	&	FilterCmd_i!=8'h70);
 	
 	reg		sampleStrobeGenRst;
 	
@@ -130,7 +129,7 @@ module MeasCtrlModule
 //================================================================================
 //  CODING
 //================================================================================
-	
+
 	always	@(posedge	Clk_i)	begin
 		if	(!Rst_i)	begin
 			if	(measCnt	==	MeasNum_i-1	&	measWind)	begin

+ 15 - 15
S5444_S/src/src/InternalDsp/WinParameters.v

@@ -302,38 +302,38 @@ always	@	(posedge	Clk_i)	begin
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h54 : begin//	500	KHz
-						windPhInc 		<=	32'h1c71c71;
+						windPhInc 		<=	32'h15555555;
 						// winNormCoef		<=	32'h3ce38e38;
-						winNormCoef		<=	32'h3ce98ccd;
-						winPointsNum	<=	32'h90;
+						winNormCoef		<=	32'h3cba2e8c;
+						winPointsNum	<=	32'h65;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h55 : begin//	700	KHz
-						windPhInc		<=	32'h2828282;
+						windPhInc		<=	32'h1c71c71c;
 						// winNormCoef		<=	32'h3d20a0a0;
-						winNormCoef		<=	32'h3d24cd6d;
-						winPointsNum	<=	32'h66;
+						winNormCoef		<=	32'h3d042108;
+						winPointsNum	<=	32'h48;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h60 : begin//	1	MHz
-						windPhInc 		<=	32'h38e38e3;
+						windPhInc 		<=	32'h2aaaaaaa;
 						// winNormCoef		<=	32'h3d638e39;
-						winNormCoef		<=	32'h3d698ccd;
-						winPointsNum	<=	32'h48;
+						winNormCoef		<=	32'h3d3e82fa;
+						winPointsNum	<=	32'h32;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h61 : begin//	1.5	MHz
-						windPhInc 		<=	32'h5555555;
+						windPhInc 		<=	32'h40000000;
 						// winNormCoef		<=	32'h3daaaaab;
-						winNormCoef		<=	32'h3daf299a;
-						winPointsNum	<=	32'h30;
+						winNormCoef		<=	32'h3d924925;
+						winPointsNum	<=	32'h21;
 						averageNoiseLvl	<=	32'h0;
 					end
 			8'h62 : begin//	2	MHz
-						windPhInc 		<=	32'h71c71c7;
+						windPhInc 		<=	32'h55555555;
 						// winNormCoef		<=	32'h3de38e39;
-						winNormCoef		<=	32'h3de98759;
-						winPointsNum	<=	32'h24;
+						winNormCoef		<=	32'h3dc30c31;
+						winPointsNum	<=	32'h19;
 						averageNoiseLvl	<=	32'h0;
 					end	
 			8'h63 : begin

+ 3 - 3
S5444_S/src/src/InternalDsp/Win_calc.v

@@ -117,9 +117,9 @@ module Win_calc	(
 	assign	windMux1	=	(sinFilterFlag)	?	sinWindPow2[34-:18]:tukeyWindOut;
 	assign	windMux2	=	(rectFilterFlag)?	18'h1ffff:windMux1;
 
-	assign	win_o		=	windMux2;
+	assign	win_o		=	(rectFilterFlag)? 18'h1ffff:tukeyWindOut;
 
-// ================================================================================
+// ===============================================================================
 //  CODING
 //================================================================================	
 
@@ -182,6 +182,7 @@ always	@(*)	begin
 	end
 end
 
+
 always	@(*)	begin
 	if	(!reset_i)	begin
 		if	(!win_type_i)	begin 
@@ -197,5 +198,4 @@ always	@(*)	begin
 		tukeyWind	=	18'h0;
 	end
 end
-
 endmodule