Browse Source

Save a cycle in fpga memory interface

Michael McMaster 8 năm trước cách đây
mục cha
commit
93e78ce555

+ 2 - 1
lib/SCSI2SD/CHANGELOG

@@ -1,4 +1,5 @@
-201705XX		6.1.1
+20170520		6.1.1
+	- Performance improvements to improve throughput at all scsi speeds
 	- Add new "turbo" speed option to boost speeds.
 		- May not be reliable, and use is not supported.
 		- Async timings trimmed

+ 9 - 2
lib/SCSI2SD/STM32CubeMX/SCSI2SD-V6/Src/fsmc.c

@@ -71,8 +71,15 @@ void MX_FSMC_Init(void)
   Timing.AddressSetupTime = 2;
   Timing.AddressHoldTime = 1;
 
-  // 1 for synchroniser skew, 1 to skip hold time, 1 to process read, 1 to output
-  Timing.DataSetupTime = 5;//4 doesn't work ? ?? ?
+  // Writes to device:
+  //   1 for synchroniser skew (dbx also delayed)
+  //   1 to skip hold time
+  //   1 to write data.
+
+  // Reads from device:
+  //   3 for syncroniser
+  //   1 to write back to fsmc bus.
+  Timing.DataSetupTime = 4;
 
   // Allow a clock for us to release signals, plus 3 for the synchroniser to
   // realise the cycle has ended. Need to avoid both devices acting as outputs

BIN
lib/SCSI2SD/rtl/fpga_bitmap.o


+ 4 - 2
lib/SCSI2SD/src/firmware/scsiPhy.c

@@ -594,7 +594,7 @@ void scsiPhyReset()
 	scsiSetDefaultTiming();
 
 	// DMA Benchmark code
-	// Currently 11MB/s.
+	// Currently 14.9MB/s.
 	#ifdef DMA_BENCHMARK
 	while(1)
 	{
@@ -770,8 +770,11 @@ int scsiSelfTest()
 		return 32;
 	}
 	*SCSI_CTRL_BSY = 1;
+	s2s_delay_ms(1);
 	if (! scsiStatusBSY())
 	{
+		*SCSI_CTRL_BSY = 0;
+
 		// Error, BSY doesn't work.
 		return 32;
 	}
@@ -851,7 +854,6 @@ int scsiSelfTest()
 	}
 	*/
 
-
 	// FPGA comms test code
 	for(i = 0; i < 10000; ++i)
 	{