Monday, March 3, 2014

Microcontroller Showdown, Part 4

The next chip to test is the AT89LP6440. This is a single-cycle 8052 compatible like the DS89C450. It can run from an internal oscillator at 8MHz or an external crystal up to 20MHz like I am using. According to the datasheet, total capacitance for the crystal should not exceed 20pF and the chip itself adds about 10pF of that. The smallest capacitors I can find are 22pF so I ran it without capacitors and it seems to work fine on a breadboard.

As you might imagine, the AT89LP6440 performs similarly to the DS89C450 at 20MHz. The times are not exactly the same, though, because both chips perform some instructions in less cycles than original 8051s. This is apparent, for example, in the multiply times where the AT89LP6440 can do 32 bit multiplication about 30% faster because it does multiplies in 2 cycles instead of the 4 cycles needed by the DS89C450 and standard 8051s. The AT89LP6440 also shifted about 5% faster in the tests, although it was a little slower at BCD calculations. Like the DS89C450, I don't think I will end up using this in a calculator but it may come in handy because it can run at 3 volts and has an external memory interface.

Results are after the break.
These tests are not a comprehensive benchmark. Many factors have to be taken into account to choose the right chip for a job. These tests only focus on a very narrow range of those factors.
MSP430G2553LPC1114DS89C450AT89LP6440
Loop overhead time -O3 1.720.843.333.33
-Os 1.720.913.33(20MHz)(33MHz)3.33
Add unsigned 8 bit -O3 9.8268.1064.643.86.292.961.796.262.93
-Os 9.8898.1694.843.936.242.911.766.252.92
Add unsigned 16 bit -O3 10.0328.3124.964.1218.0414.718.9218.0714.74
-Os 10.0718.3515.154.2417.9214.598.8418.0514.72
Add unsigned 32 bit -O3 29.59227.8724.233.3931.4928.1617.0731.4728.14
-Os 29.81628.0964.383.4731.327.9716.9531.4228.09
Add signed 8 bit -O3 9.848.124.633.796.292.961.796.252.92
-Os 9.9098.1894.823.916.242.911.766.252.92
Add signed 16 bit -O3 10.028.34.633.7918.0514.728.9218.0914.76
-Os 10.0548.3345.154.2417.9214.598.8418.0514.72
Add signed 32 bit -O3 29.53627.8164.23.3631.4928.1617.0731.4528.12
-Os 29.63727.9174.383.4731.3127.9816.9631.4428.11
Multiply unsigned 8 bit -O3 19.6517.931.280.445.311.981.24.431.1
-Os 19.5817.861.410.55.281.951.184.421.09
Multiply unsigned 16 bit -O3 21.1419.421.280.4412.929.595.8110.36.97
-Os 21.0719.351.410.512.829.495.7510.276.94
Multiply unsigned 32 bit -O3 40.3638.641.330.4931.3728.0416.992319.67
-Os 40.2338.511.420.5131.2827.9516.9422.919.57
Multiply signed 8 bit -O3 19.9818.261.390.555.311.981.24.431.1
-Os 19.9118.191.530.625.281.951.184.431.1
Multiply signed 16 bit -O3 20.6518.931.390.5512.919.585.8110.286.95
-Os 20.5818.861.530.6212.829.495.7510.266.93
Multiply signed 32 bit -O3 70.2468.521.230.3931.3828.051722.9419.61
-Os 69.9768.251.410.531.1827.8516.8822.919.57
Divide unsigned 8 bit -O3 17.3415.628.097.255.442.111.284.681.35
-Os 17.2715.558.337.425.42.071.254.671.34
Divide unsigned 16 bit -O3 29.4427.721110.1675.4372.143.773.3570.02
-Os 29.3227.611.1410.2374.9872.6543.4273.2169.88
Divide unsigned 32 bit -O3 90.1288.414.5613.72231.16227.83138.08226.32222.99
-Os 89.7588.0314.6513.74229.63226.3137.15225.89222.56
Divide signed 8 bit -O3 33.2731.559.358.518.264.932.997.243.91
-Os 33.1331.419.388.478.24.872.957.223.89
Divide signed 16 bit -O3 33.723212.0511.2179.3476.0146.0777.2973.96
-Os 33.4731.7512.2911.3878.8975.5645.7977.1373.8
Divide signed 32 bit -O3 96.9495.2215.514.66231.86228.53138.5227.3223.97
-Os 96.5494.8215.5814.67230.46227.13137.65226.68223.35
Shift right unsigned 8 bit -O3 14.8613.141.830.9917.814.478.7716.0212.69
-Os 14.7913.071.961.0517.6714.348.6915.9812.65
Shift right unsigned 16 bit -O3 29.7928.071.830.9962.8659.5336.0858.9455.61
-Os 29.6627.941.971.0662.4659.1335.8458.7955.46
Shift right unsigned 32 bit -O3 69.6267.91.720.88200.46197.13119.47192.1188.77
-Os 69.3167.591.80.89199.32195.99118.78191.57188.24
Shift right signed 8 bit -O3 14.8513.132.161.3220.7417.4110.5518.7215.39
-Os 14.813.082.291.3820.6217.2910.4818.6615.33
Shift right signed 16 bit -O3 25.1523.432.161.3267.7664.4339.0563.5960.26
-Os 25.0523.332.291.3867.3564.0238.863.4460.11
Shift right signed 32 bit -O3 59.6957.971.720.88209.38206.05124.88200.68197.35
-Os 59.4257.71.80.89208.16204.83124.14200.12196.79
Shift left unsigned 8 bit -O3 14.8613.141.830.9917.8114.488.7816.0312.7
-Os 14.813.081.961.0517.7114.388.7215.9812.65
Shift left unsigned 16 bit -O3 25.1623.441.830.9962.8659.5336.0858.9655.63
-Os 25.0423.321.971.0662.5159.1835.8758.2154.88
Shift left unsigned 32 bit -O3 59.6757.981.720.88200.53197.2119.52192.16188.83
-Os 59.4157.961.80.89199.42196.09118.84189.73186.4
Shift left signed 8 bit -O3 14.8613.142.161.3217.814.478.7716.0312.7
-Os 14.813.082.291.3817.714.378.7115.8212.49
Shift left signed 16 bit -O3 25.1723.452.161.3262.8859.5536.0958.9755.64
-Os 25.0423.322.291.3862.5159.1835.8758.2154.88
Shift left signed 32 bit -O3 59.6857.961.720.88200.55197.22119.53192.21188.88
-Os 59.4157.691.80.89199.44196.11118.85189.73186.4
GPIO -O3 18.08816.3687.036.1915.612.277.4415.5512.22
-Os 18.05616.3367.266.3515.5212.197.3915.3512.02
GPIO Constant Generator -O3 14.75213.032
-Os 14.75813.038
GPIO Masked -O3 3.222.38
-Os 3.522.61
GPIO Bit Operation -O3 8.264.932.998.244.91
-Os 8.224.892.968.124.79
BCD Add 120+325 -O3 47.9346.2117.9316.21
-Os 50.0548.3320.8319.11
BCD Add 120+325
Stored in xdata
-O3 214.03210.7127.7218.71215.38
-Os 212.13208.8126.55215.79212.46
BCD Add 120+325
Stored in idata
-O3 249.96246.63149.47254.55251.22
-Os 247.78244.45148.15251.02247.69
BCD Multiply 24 * 13
Without multiplies
-O3 393.4391.68131.49129.77
-Os 375.21373.49149.84148.12
BCD Multiply 24 * 13
Without multiplies, xdata
-O3 1441.81438.47871.81471.11467.77
-Os 14371433.67868.891480.31476.97
BCD Multiply 24 * 13
Without multiplies, idata
-O3 1658.31654.971003.011683.41680.07
-Os 1651.81648.47999.0716851681.67
BCD Multiply 24 * 13
With multiplies
-O3 405.64403.92131.88130.16
-Os 508.52506.8140.53138.81
BCD Multiply 24 * 13
With multiplies, xdata
-O3 1565.11561.77946.531593.81590.47
-Os 15571553.67941.621604.91601.57
BCD Multiply 24 * 13
With multiplies, idata
-O3 1829.51826.171106.7718531849.67
-Os 1818.91815.571100.351867.41864.07

No comments:

Post a Comment