فهرست منبع

Доработан сброс NCO для сигнхронного запуска на двух приборах.

Stepan Churbanov 2 سال پیش
والد
کامیت
b182d6f285

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 31 - 0
S5443_M/S5443.srcs/constrs_1/new/S5243Top.xdc


BIN
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.dcp


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 12458 - 12458
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 13680 - 13680
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl


+ 2 - 2
S5443_M/S5443.srcs/sources_1/new/InternalDsp/InternalDsp.v

@@ -335,8 +335,8 @@ ncoFirstTone
 	// .Rst_i		(Rst_i|startMeasDspPos),
 	.Val_i		(1'b1),
 	// .PhaseInc_i	({ifFtwHReg[0+:WindNcoPhIncWidth-CmdDataRegWith],ifFtwLReg}),
-	.PhaseInc_i	(32'h40000000),
-	// .PhaseInc_i	(32'h33333333),
+	// .PhaseInc_i	(32'h40000000),
+	.PhaseInc_i	(32'h33333333),
 	.WindVal_i	(1'b1),
 	.WinType_i	(),
 	.Wind_o		(),

+ 25 - 1
S5443_M/S5443.srcs/sources_1/new/S5243Top.v

@@ -570,7 +570,30 @@ always	@(posedge	gclk)	begin	//stretching pulse
 	stopMeasR	<=	stopMeas;
 end
 
+reg	ncoRstReg;
+reg	ncoRstRegR;
 
+always	@(posedge	gclk)	begin	//stretching pulse
+	if	(!initRst)	begin
+		if	(measCtrl[18])	begin
+			ncoRstReg	<=	Trig6to1_io[2];
+		end	else	begin
+			ncoRstReg	<=	0;
+		end
+	end	else	begin
+		ncoRstReg	<=	0;
+	end
+end
+
+always	@(posedge	gclk)	begin	//stretching pulse
+	if	(!initRst)	begin
+		ncoRstRegR	<=	ncoRstReg;
+	end	else	begin
+		ncoRstRegR	<=	0;
+	end
+end
+
+wire	ncoRst	=	(!ncoRstRegR&ncoRstReg);
 //--------------------------------------------------------------------------------
 //	Data Receiving Interface
 //--------------------------------------------------------------------------------
@@ -744,7 +767,7 @@ NcoRstGen	NcoRstGenInst
 	.NcoPhInc_i			({ifFtwH[0+:PhIncWidth-CmdDataRegWith],ifFtwL}),
 	.StartMeasEvent_i	(startMeasEvent),
 	
-	.NcoRst_o			(ncoRst),
+	.NcoRst_o			(),
 	.StartMeasEvent_o	(intTrig1)	
 );
 
@@ -772,6 +795,7 @@ InternalDsp
 	.WindCalcClk_i		(windClk150),
 	.Rst_i				(initRst),
 	.NcoRst_i			(ncoRst),
+	// .NcoRst_i			(Trig6to1_io[2]),
 	.OscWind_o			(oscWind),
 	
 	.Adc1ChT1Data_i		(adc1ChT1Data),	//T1

+ 4 - 4
S5443_M/S5443.srcs/sources_1/new/S5443TopPulseProfileTb.v

@@ -72,7 +72,7 @@ module S5443TopPulseProfileTb;
 	//COMMANDS	FOR REG_MAP
 	parameter	[31:0]	MeasCmdBypass	=	{8'h11,8'h0,8'h63,8'h1};
 	parameter	[31:0]	MeasCmdFft 		=	{8'h11,8'h0,8'h63,7'h5,1'b1};
-	parameter	[31:0]	MeasCmd 		=	{8'h11,8'h1,8'h53,8'h0};
+	parameter	[31:0]	MeasCmd 		=	{8'h11,8'hff,8'h53,8'h0};
 	// parameter	[31:0]	MeasCmd =	{8'h11,8'h3e,8'h63,8'h0};
 	parameter	[31:0]	AdcCtrl =	{8'h12,24'h2};
 	parameter	[31:0]	SensCtrlCmd =	{1'b0,27'h0,4'b1};
@@ -202,7 +202,7 @@ module S5443TopPulseProfileTb;
     assign	trig1R	=	trig1;
 	
 	reg	[32:0]	extPulseTrigCnt;
-	wire	extPulseTrig	=	extPulseTrigCnt==32'd50;
+	wire	extPulseTrig	=	extPulseTrigCnt==32'd500;
 	
 	wire	[5:0]	extTrigBus;
 	wire	[5:0]	extTrigDir;
@@ -224,7 +224,7 @@ module S5443TopPulseProfileTb;
 	
 	assign	extTrigBus	[0]	=	(MeasCmd[16])	?	extPulseTrig:1'bz;	//1 - in, 0 - out
 	assign	extTrigBus	[1]	=	(MeasCmd[17])	?	0:1'bz;	//1 - in, 0 - out
-	assign	extTrigBus	[2]	=	(MeasCmd[18])	?	0:1'bz;	//1 - in, 0 - out
+	assign	extTrigBus	[2]	=	(MeasCmd[18])	?	extPulseTrig:1'bz;	//1 - in, 0 - out
 	assign	extTrigBus	[3]	=	(MeasCmd[19])	?	0:1'bz;	//1 - in, 0 - out
 	assign	extTrigBus	[4]	=	(MeasCmd[20])	?	0:1'bz;	//1 - in, 0 - out
 	assign	extTrigBus	[5]	=	(MeasCmd[21])	?	0:1'bz;	//1 - in, 0 - out
@@ -245,7 +245,7 @@ end
 	
 always	@(posedge	Clk50)	begin
 	if	(!rst)	begin
-		if	(extPulseTrigCnt!=32'd50)	begin
+		if	(extPulseTrigCnt!=32'd500)	begin
 			extPulseTrigCnt	<=	extPulseTrigCnt+32'd1;
 		end	else	begin
 			extPulseTrigCnt	<=	32'd0;