Click here for the Circuit Cellar article code archive
p.6: Home Air Quality Monitoring (Part 2): The Android Application, By Raul Alvarez-Torrico
References:
[1] Home Air Quality Monitoring (Part 1), Circuit Cellar 378, January 2022.
[2] Nordic Semiconductor/Android-nRF-Toolbox Android applicationhttps://github.com/NordicSemiconductor/Android-nRF-Toolbox
[3] Introduction to Activities, https://developer.android.com/guide/components/activities/intro-activities
[4] Android for Developershttps://developer.android.com/
Adafruit | www.adafruit.com
Ams | www.ams.com
JetBrains | www.jetbrains.com
Nordic Semiconductor | www.nordicsemi.com
STMicroelectronics | www.st.com
p.18: Build a Maze Generator and Game: Using a PIC32 MCU, By Kyle Infantino, Jack Brzozowski and Dilan Lakhani
References:
[1] Carroll, Sean. “Cornell University ECE4760 Development Boards PIC32MX250F128B.” Cornell University ECE 4760 Designing with Microcontrollers, https://people.ece.cornell.edu/land/courses/ece4760/PIC32/target_board.html
[2] Dunkels, Adam. The Protothreads Library 1.4 Reference Manual, Swedish Institute of Computer Science, 2006.{Jeff: Might this link be more helpful than the reference to the Manual, alone? Other Cornell students routinely cite it for Protothreads. https://people.ece.cornell.edu/land/courses/ece4760/PIC32/index_Protothreads.html
[3] Microchip Technology. “32-bit Microcontrollers (up to 128 KB Flash and 32 KB SRAM) with Audio and Graphics Interfaces, USB, and Advanced Analog,” PIC32MX1XX/2XX datasheet, 2011-2012. http://ww1.microchip.com/downloads/en/devicedoc/61168d.pdf
[4] Hill, Christian. “Making a Maze.” Learning Scientific Programming with Python, 13 Apr. 2017, https://scipython.com/blog/making-a-maze/
PIC32MX250F128B Microcontroller
Microchip Technology | www.microchip.com
Sean Carroll’s Big Board (SECABB)
Cornell University | https://people.ece.cornell.edu/land/courses/ece4760/PIC32/target_board.html
Remote Development Board
Hunter Adams, Cornell University
https://people.ece.cornell.edu/land/courses/ece4760/PIC32/index_remote.html
p.25: Microprogramming Choices Explained (Part 2): Microprogrammable Machines, By Wolfgang Matthes
Reference:
[1] “Microprogramming Choices Explained (Part 2),” Circuit Cellar 378, January 2022
Editor’s Note: This article also includes an extensive ADDENDUM. Because of its length, we’ve provided at the end of this webpage.
p.36: Build a Voice-Controlled Spider Robot: The SDY-DER Project, By Arijit Das
References:
[1] Demo of this project:
[4] 3D files are available at: https://www.thingiverse.com/thing:4815137
[5] Basic spider robot codes: https://github.com/Arijit1080/Spidy-The-Spider-Robot
[6] Basic spider robot build video: https://youtu.be/fnMmnd9k6q8
[7] Codes for this project are available at: https://github.com/Arijit1080/SPY-DER-A-Speech-and-Web-Controlled-Surveillance-Spider-Robot-using-Raspberry-Pi-and-Arduino
[8] Raspberry Pi and Arduino Serial Communication video: [9] Using pi-camera with Raspberry Pi video: [10] PicoVoice Github Repo: https://github.com/Picovoice/picovoice
[11] RPi-Cam-Interface video streaming [12] Rhino Speech-to-Intent Model: https://console.picovoice.ai/rhn
[13] Build video https://youtu.be/KkZiZggtvIU [14] https://www.youtube.com/c/SPARKLERSWeAreTheMakers [15] https://www.facebook.com/sparklers2018
Arduino | www.arduino.cc
Picovoice | www.picovoice.ai
Raspberry Pi Foundation | www.raspberrypi.org
Texas Instruments | www.ti.com
p.42: Multiple Layers of Technology Enable Smart Cities: Connectivity and Collaboration, By Jeff Child
Reference:
[1] https://go.abiresearch.com/lp-70-technology-trends-that-will-and-wont-shape-2022?utm_source=media&utm_medium=email
Digi International | www.digi.com
E-peas | www.e-peas.com
FiRa Consortium | www.firaconsortium.org
Infineon Technologies | www.infineon.com
iWave Systems Technologies | www.iwavesystems.com
NXP Semiconductor | www.nxp.com
Senet | www.senetco.com
Semtech | www.semtech.com
STMicroelectronics | www.st.com
p.49: Rugged SBCs Suit Up for Tough Duties: Ready for Rough Stuff, By Jeff Child
Adlink Technology | www.adlinktech.com
American Portwell Technology | www.portwell.com
Avalue Technology | www.avalue.com.tw
Axiomtek | www.axiomtek.com
Congatec | www.congatec.com
Diamond Systems | www.diamondsystems.com
Gateworks | www.gateworks.com
Kontron | www.kontron.com
VersaLogic | www.versalogic.com
WinSystems | www.winsystems.com
p.54: DATASHEET: COMe and COM-HPC Boards: Modular Compute Muscle, By Jeff Child
Aaeon
www.aaeon.com
Adlink Technology
www.adlinktech.com
Advantech
www.advantech.com
American Portwell
www.portwell.com
Congatec
www.congatec.com
Ibase Technology
www.ibase.com.tw
Kontron
www.kontron.com
TQ-Systems
www.tq-group.com
WinSystems
www.winsystems.com
DATASHEET URLS:
AAEON www.aaeon.com/en/p/com-express-cpu-modules-nanocom-tgu
Adlink Technology www.adlinktech.com/Products/Computer_on_Modules/COM-HPC/COM-HPC-cADP
American Portwell www.portwell.com/pdf/embedded/PCOM-B657VGL.pdf
Congatec www.congatec.com/fileadmin/user_upload/Documents/Datasheets/conga-HPC_cALP.pdf
Ibase Technology www.ibase.com.tw/english/download/Embedded_Computing/CPU%20Modules/ET977_Datasheet.pdf
Kontron www.kontron.com/downloads/datasheets/c/come-basic/come-btl6/come-btl6_datasheet.pdf
TQ-Systems www.tq-group.com/en/products/tq-embedded/x86-architecture/tqmx110eb/
WinSystems https://resources.winsystems.com/datasheets/comet10-3900-ds-1.5.pdf
p.58: FROM THE BENCH: Build an IR-Based LEGO Train Controller (Part 2): IR Receiving End, By Jeff Bachiochi
References:
[1] “Build an IR-Based LEGO Train Controller (Part 2)” (Circuit Cellar 378, January 2022)[2] ESP32 based microcontroller modular systems:
http://www.m5stack.com
[3] Philippe Hurbain’s all things LEGO site:
https://www.philohome.com/pf/LEGO_Power_Functions_RC_v120.pdf
Espressif Systems | www.espressif.com
M5Stack | www.m5stack.com
p.64: THE DARKER SIDE: RF Location Techniques: Methods and Measurements, By Robert Lacoste
References:
[1] “dB for dummies: Decibels Demystified,” (Circuit Cellar 347, June 2019)[2] “Don’t Fade Away: A Multipath Fading Experiment,” (Circuit Cellar 247, February, 2011)
[3] nRF Connect (Nordic Semiconductors)
Available from Google Play (Android app) and Apple (IOS app) stores
https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp
https://apps.apple.com/us/app/nrf-connect/id1054362403?ls=1
[4] SX1280 Long range, low power 2.4GHz Wireless RF Transceiver with ranging capability (Semtech)
https://fr.semtech.com/products/wireless-rf/lora-24ghz/sx1280
[5] EVK1000 UWB evaluation kit Decawave( now Qorvo)
https://www.decawave.com/product/evk1000-evaluation-kit
[6] XPLR-AOA-1Bluetooth 5.1 direction finding explorer kit with NINA-B4 (u-blox)
https://www.u-blox.com/sites/default/files/XPLR-AOA-1_ProductSummary_UBX-21015378.pdf
ALCIOM | www.alciom.com
Decawave | www.decawave.com
Nordic Semiconductor | www.nordicsemi.com
Qorvo | www.qorvo.com
Semtech | www.semtech.com
U-blox | www.u-blox.com
p.70: EMBEDDED IN THIN SLICES: Lehman’s Laws of Software Evolution: Rules to Code By, By Bob Japenga
References:
[1] Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts (1999). Refactoring: Improving the Design of Existing Code
[2] https://research.ijcaonline.org/volume93/number18/pxc3896165.pdf[3] http://www.ece.utexas.edu/~perry/work/papers/feast1.pdf
[4] https://www.mantisbt.org
IBM | www.ibm.com
Microchip Technology | www.microchip.com
Zilog | www.zilog.com
p.79: The Future of Embedded FPGAs: eFPGA: The Proof is in the Tape Out, By Andy Jaros
References:
[1] https://www.prnewswire.com/news-releases/flex-logix-and-darpa-expand-partnership-with-the-addition-of-silicon-proven-eflx-efpga-in-12-and-16-nm-process-technologies-for-darpas-toolbox-initiative-301237143.html
[2] https://www.prnewswire.com/news-releases/boeing-defense-space–security-licenses-flex-logixs-embedded-field-programmable-gate-array-on-globalfoundries-14nm-process-300717359.html
[3] https://flex-logix.com/efpga
Flex Logix | www.flex-logix.com
– Addendum –
Microprogramming Choices Explained (Part 1): Microprogrammable Machines, By Wolfgang Matthes
Most basic sequencers
They cannot branch but only advance from state to state. They go through their sequence of states either cyclically or only once (single-cycle operation). More advanced sequencers can remain in the current state until a particular conditon is met. Such states are called wait states.
Electromechanical sequencers
In the printed article, we have already mentioned the liquid-propellant rocket as a somewhat exotic but impressive and perspicuous example. In the past, such control tasks have been tackled by electromechanical devices, magnetic tapes, and the like ([3]; [4]). In [3], for example, you may find some vivid descriptions of how such electromechanical sequencers work. By the way, there are situations in which it is just right to go stubbornly through an unsophisticated sequence of states. For example, after developing full thrust, the rocket must move away from the launchpad as fast as possible, with deliberate disregard of trajectory corrections and optimization of the combustion processes. The designers of the N1 (the Soviet counterpart to the Saturn V) had to learn this the hard way (as described in [3]).
The binary counter as control storage address register (CSAR)
Our counterpart to the camshaft is a binary counter (the CSAR) addressing a memory (the control storage CS) containing bit patterns energizing the control signals. At least one bit position serves to encode what to do in the last state. For cycling operation, it will reset the counter. For single-cycle operation, it will inhibit further counting.
In our circuit diagrams, we use fully synchronous counters (as you may invoke in a CPLD/FPGA development environment or get synthesized from a behavioral description). The clock runs continuously. All control signals are hi-active. The priorities are 1. reset, 2. load, 3. count.
A general-purpose programmable sequencer
In old times, to get a sequencer showing the desired behavior, you had to order an appropriate device (for example, as offered in [5]). In CPLD and FPGA times, you have to synthesize the circuit accordingly.
Some microinstruction bits more will lead to a general-purpose sequencer that is to be synthesized only once, allowing to change the desired behavior on the fly simply by altering the memory content.
A general-purpose branch sequencer
The state transitions: advance to the next state, retain the current state (wait), branch to another state, and go to the initial state may be implemented by a binary counter and some multiplexers.
For each of the states S0…S15 and for each kind of transition, the appropriate condition signals are to be connected to the particular multiplexer. If a transition should occur unconditionally, connect a logical 1. If the transition should never take place, connect a logical 0. The topmost multiplexers in the diagram constitute a ROM, addressed by the current state and delivering the state number of the branch target.
Outputs are not shown here. They could be added by decoding the state number or by combining the state number with input signals.
In the diagrams shown above, the multiplexers select condition signals in dependence on the current state. The condition signals are wired to the multiplexer inputs. Attaching another signal to a particular input requires an ECO. In its course, the circuitry has to be synthesized again.
The alternative is to select the condition signals by memory contents too. The circuitry must be synthesized only once. All subsequent changes are done simply by altering the memory content.
Clocking
The sequencers depicted above employ only one clock edge. The state counter equals the CSAR. A memory data register is missing. Instead, the control signals are taken immediately from the memory’s outputs. Microprogrammable branch sequencers may be laid out the same way.
All the clocking into the flip-flops must be done by the leading edge of the clock signal. Beware that all conditions coming from outside must be synchronized, and a sufficient settling time between clocking in the asynchronous signal and evaluating the condition is to be ensured.
When a memory data register (the CSDR) is inserted, we need at least two clock phases. The most straightforward two-phase clock is the single-phase clock with both edges employed.
An often implemented alternative is to retain the single-phase clock. A memory data register allows for some kind of pipelining. The leading edge of the clock causes the CSDR to be loaded with the new microinstruction and the address in the CSAR to be incremented, thus addressing the next microinstruction. It is already read while the current microinstruction is executed. Hence the microinstruction cycle could be nearly as short as the memory access time. Branching, however, will not fit in this scheme. Because the branch target address and the code which selects the branch condition come from the CSDR, branching will require two cycles. Many microcontrollers and RISC processors operate this way.
An enhanced single-address machine
Additional data paths support operations embracing an immediate operand out of the instruction, a memory operand, and the content of the address (AD) register. The new types of operations are imm OP <mem>, <AD> : = <AD> OP imm, and <AD> : = <AD> OP <mem>. (imm is the immediate operand out of the emit-field, mem is the memory operand.)
Reading data out of the program memory of a Harvard machine is somewhat intricate, requiring a hard-wired sequencer. Here, we hint only at the address path. Data will flow via the CSDR to the ALU. Such data accesses are encoded in the microinstruction’s operation field.
The MD field encodes the branching mode. (a) shows a format that supports the state transitions of the general-purpose branch sequencer, as depicted in Figure 2d or A6. (b) is a format of multiway branching by inserting two condition signals into the successor address. The SEG_SEL field encodes in which bit positions the conditions are to be injected. Other MD codes concern functional branching, subroutine call, and return.
For a small, humble microprogrammed core, 80-bit microinstructions are way too much. Here we have tried to get along with 32 bits.
The format (a) contains the emit-field. The memory must be addressed via the AD register. MEMSEL designates an operation imm OP <<DA>>. Then the content of the emit-field flows to the ALU’s A input. Otherwise, only operations <A> OP imm or <AD> OP imm are possible.
The format (b) is the conventional single-address format supporting operations <A> OP <mem> or <AD> op <mem>. Indirect addressing via the AD register is encoded by address = 0.
Format (c) supports operations with the addressed memory operand alone. These operations affect only a selected 4-bit nibble within the memory operand. Typical operations set and clear bits, clear nibbles or whole operands, shift operands, and so on.
The formats (d), (e), and (f) have been provided to support the different flavors of branching, including waiting and multiway.
Format (g) may accommodate application-specific control fields and bits.
Microprogam control of autonomous accelerators
Basically, there are two kinds of accelerators, the application-specific operation unit attached to the processor core and the fully-fledged special-purpose processor. The latter runs complex algorithms that process voluminous data structures (think, for example, of rendering graphics or supporting machine learning, vector processing, matrix algebra, and the like).
The accelerator’s memories, data paths, operation units, and so on are adapted to the requirements of the particular algorithms. The utmost goal of accelerator design and programming should be that each machine cycle contributes to the final result according to the processing width of its circuitry (think, for example, that a vector or matrix component will be stored during each of the machine cycles).
Complex algorithms are encoded by nested loops. It is essential to accelerate the innermost loop.
Accelerating the innermost loop requires an appropriate RTL design of the data paths and operation units, including dedicated memories. This circuitry is to be controlled by synthesized sequencers or horizontal microprograms or nanoprograms, respectively. (For nanoprogramming, refer to [2], [7], and [8].) Nanoinstructions are wide horizontal microinstructions that control the data paths and registers with minimum decoding delay. Thus they are well-suited for very short machine cycles.)
When our demand is met (that is, when the innermost loop produces one partial result in each machine cycle), it is typically not necessary to accelerate outer loops to the same degree. The industry-standard solution is to let a RISC IP core take over. Here, microprogram control could come into play again. Microinstructions may control the address generators, operation units, and other functional units right away, whereas RISC cores can query and control the application-specific circuitry only via I/O accesses. Furthermore, microprogram interrupts, the so-called break-ins (see [1] and [2]), have considerably shorter latencies than typical RISC interrupts.
References
http://bitsavers.trailing-edge.com/pdf/nanodata/QM1HW.pdf [9] Agrawala, Ashok; Rauscher, Tomlinson G.: Foundations of Microprogramming: Architecture, Software, and Applications. Academic Press, 1975.
Sources
The author’s project homepages:
https://www.realcomputerprojects.dev
https://www.controllersandpcs.de/projects.htm
The ultimate archives concerning computer architecture, vintage computers, and components:
http://bitsavers.trailing-edge.com/pdf/
http://bitsavers.trailing-edge.com/components/
Sponsor this ArticleCircuit Cellar's editorial team comprises professional engineers, technical editors, and digital media specialists. You can reach the Editorial Department at editorial@circuitcellar.com, @circuitcellar, and facebook.com/circuitcellar