Today in robotics I worked on writing some of the code for the underwater robot (ROV - Remotely Operated Vehicle) we are building for the
MATE competition. More specifically, I was trying to set up communication between the top side electronics, which are above the water, and the bottom side electronics, which are inside our robot. We have an approximately 50-foot tether connecting a power/control box by the edge of the pool to our actual ROV. The data is sent by the tether over a protocol called RS-485, which can only go one way at a time. So the goal of my code was to send data in both directions over a one-way-at-a-time protocol.
Designing my code to function similarly to RDMA (Remote Direct Memory Access) - having the control box read and write to the memory of the ROV Arduino - appeared to be my best option. On my first try, I created code so complicated that even I could not understand it afterwards. Since there are always bugs and modifications, no matter what you do, I knew I had to rewrite the code in a way that would actually allow fixes to be possible. So for my second pass I kept it simple - switch directions whenever there is a read request, send the data over, and switch back. The code looks pretty good, and I think it will work. Even if it does not, at least I will be able to fix it!
Bonus Tech Stuff: Processor Architectures
One of the most helpful features of
Linux is its ability to function on many different types of hardware. It can currently function on 29 different distinct processor architectures, which is very impressive compared to the one supported by
Windows. This makes it easy for
Linux to be deployed on a variety of devices. Some of these devices are very specific, and some of them are very quirky and unusual. Many of them are for very specific purposes. This post is an overview of some the most interesting processor architectures supported.
![](https://upload.wikimedia.org/wikipedia/commons/c/cf/Motorola_Transistor_Radio_1960.jpg) |
Here is one of m68k's early uses! |
Did you know that some smartphones are equipped with two completely different processor types which can run
Linux? Smartphone processors by
Qualcomm include both an
ARM processor (the processor architecture used in most smartphones to run all of the apps and stuff, both
iPhone and
Android), and a
Hexagon processor. The
Hexagon is a VLIW DSP (Very Long Instruction Word Digital Signal Processor) - it is mainly used for audio processing. Another interesting architecture supported by
Linux is
TILE64 - which isn't 64-bit. It actually has 64 tri-issue cores arranged in an 8x8 grid - yielding an impressive 192 total maximum instructions per clock cycle.
Linux also supports
OpenRISC - an open source processor architecture. In addition,
Itanium - an architecture developed by
Intel during the switch to 64-bit - is supported.
Itanium was a commercial failure because it was not backwards compatible with previous Intel architectures, and it was easier to use the multicore 64-bit chips from
AMD that were backwards compatible.
Here is a complete list of the architectures currently supported in Linux:
Alpha, ARC, ARM, AVR32, Blackfin, C6x, ETRAX CRIS, FR-V, H8/300, Hexagon, Itanium, M32R, m68k, META, Microblaze, MIPS, MN103, Nios II, OpenRISC, PA-RISC, PowerPC, s390, S+core, SuperH, SPARC, TILE64, Unicore32, x86, Xtensa
#slice2016
No comments:
Post a Comment