BradC
09-14-2007, 10:12 PM
G'day all,
Just another teaser I'm afraid. I have one minor bug to squash (which is driving me up the wall) before I release this into the wild.
It "Just works" on Mac OS, requires an .inf file for Windows and requires some minor patching to the uhci driver (remove 3 lines of code) with Linux.
I've used the VID/PID pair for the AVR CDC driver temporarily so I can use the supplied .inf for that, it will likely change before I release the proper object.
As you can see below, I'm currently getting sustained bi-directional read/write speeds of about 6.5K bytes per second. I've not tested it unidirectionally and the main loop is in spin (it just reads a byte from the fifo if available and writes it back out again. It's not really quick enough and I think if I wrote it in asm I could get the bus utilization up a bit, but this is typical of the sort of spin app you would use the object in.
brad@bklaptop2:~$ cat /proc/bus/usb/devices | grep -B 4 -A 8 Propeller
T: Bus=02 Lev=02 Prnt=33 Port=01 Cnt=01 Dev#= 77 Spd=1.5 MxCh= 0
D: Ver= 1.01 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=16c0 ProdID=05e1 Rev= 1.00
S: Manufacturer=Brads-Propeller
S: Product=CDC-ACM-HACK
C:* #Ifs= 2 Cfg#= 1 Atr=40 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=100ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E: Ad=01(O) Atr=02(Bulk) MxPS= 8 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 8 Ivl=0ms
brad@bklaptop2:~$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 077: ID 16c0:05e1
Bus 002 Device 033: ID 058f:9254 Alcor Micro Corp. Hub
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
brad@bklaptop2:~$ stty -F /dev/ttyACM0 raw ; cat /dev/ttyACM0 & sleep 1 ; killall cat ; rm test.1 test.2 ; dd if=/dev/urandom of=test.1 bs=1M count=1 ; sync ; cat /dev/ttyACM0 | pipebench -b 128 > test.2 & sleep 1 ; sleep 1 ; cat test.1 > /dev/ttyACM0 ; sleep 2 ; killall cat ; sleep 1 ; sync ; echo; echo ; echo ; md5sum test.1 test.2
23615
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.677055 seconds, 1.5 MB/s
+ Terminated cat /dev/ttyACM0
23638
Summary:
Piped 1024.00 kB in 00h02m32.52s: 6.71 kB/second
+ Done cat /dev/ttyACM0 | pipebench -b 128 >test.2
2a6d11cd32b2729d03c69daf581a7056 test.1
2a6d11cd32b2729d03c69daf581a7056 test.2
brad@bklaptop2:~$
Just another teaser I'm afraid. I have one minor bug to squash (which is driving me up the wall) before I release this into the wild.
It "Just works" on Mac OS, requires an .inf file for Windows and requires some minor patching to the uhci driver (remove 3 lines of code) with Linux.
I've used the VID/PID pair for the AVR CDC driver temporarily so I can use the supplied .inf for that, it will likely change before I release the proper object.
As you can see below, I'm currently getting sustained bi-directional read/write speeds of about 6.5K bytes per second. I've not tested it unidirectionally and the main loop is in spin (it just reads a byte from the fifo if available and writes it back out again. It's not really quick enough and I think if I wrote it in asm I could get the bus utilization up a bit, but this is typical of the sort of spin app you would use the object in.
brad@bklaptop2:~$ cat /proc/bus/usb/devices | grep -B 4 -A 8 Propeller
T: Bus=02 Lev=02 Prnt=33 Port=01 Cnt=01 Dev#= 77 Spd=1.5 MxCh= 0
D: Ver= 1.01 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=16c0 ProdID=05e1 Rev= 1.00
S: Manufacturer=Brads-Propeller
S: Product=CDC-ACM-HACK
C:* #Ifs= 2 Cfg#= 1 Atr=40 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=100ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E: Ad=01(O) Atr=02(Bulk) MxPS= 8 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 8 Ivl=0ms
brad@bklaptop2:~$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 077: ID 16c0:05e1
Bus 002 Device 033: ID 058f:9254 Alcor Micro Corp. Hub
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
brad@bklaptop2:~$ stty -F /dev/ttyACM0 raw ; cat /dev/ttyACM0 & sleep 1 ; killall cat ; rm test.1 test.2 ; dd if=/dev/urandom of=test.1 bs=1M count=1 ; sync ; cat /dev/ttyACM0 | pipebench -b 128 > test.2 & sleep 1 ; sleep 1 ; cat test.1 > /dev/ttyACM0 ; sleep 2 ; killall cat ; sleep 1 ; sync ; echo; echo ; echo ; md5sum test.1 test.2
23615
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.677055 seconds, 1.5 MB/s
+ Terminated cat /dev/ttyACM0
23638
Summary:
Piped 1024.00 kB in 00h02m32.52s: 6.71 kB/second
+ Done cat /dev/ttyACM0 | pipebench -b 128 >test.2
2a6d11cd32b2729d03c69daf581a7056 test.1
2a6d11cd32b2729d03c69daf581a7056 test.2
brad@bklaptop2:~$