Designing with ARM Cortex-M based System-On-Chips (SoCs) - Part I: The basics

Tushar Rastogi and Subbarao Lanka, Cypress Semiconductor

March 30, 2014

Tushar Rastogi and Subbarao Lanka, Cypress SemiconductorMarch 30, 2014

Editor’s Note: In this first of a two-part Product How-To article series, Tushar Rastogi and Subbarao Lanka of Cypress Semiconductor describe the fundamentals of developing processor-based system-on-chip designs using the company’s PSoC architecture.

In this series we will cover several facets of designing multicore-based system-on-chips (SoCs), including the typical architecture of an SoC; how the design of mixed signal embedded systems is simplified; how design changes can be easily implemented without negatively impacting time to market; the tools available for developing complicated applications; and key business advantages of using SoCs.

We will use ARM Cortex M processor cores as our basic building blocks, widely used because of their low cost, low power operation capability, configurable processors, and simple design. They are based upon a RISC architecture that requires a low transistor count, resulting in reduction of power dissipation, thermal dissipation, and cost. And while most of our discussion will deal with issues that could apply to all system-on-chip designs, it will also make reference to features only available on programmable SoCs, such as the Cypress PSoC architecture.

The system-on-chip (SoC) architecture
A system-on-chip (SoC) is an integrated circuit which packs multiple peripherals of an electronic system (memory, connectivity, analog, and digital peripherals) on a single substrate with a processor at its heart. The processor can be a microcontroller, microprocessor, or DSP core. SoCs are becoming popular because of their smaller size, reduced power consumption, and reduced assembly costs compared to traditional microcontroller architectures.. Figure 1 shows a standard SoC with multiple peripherals connected by a data bus.

Figure 1: General SoC Architecture

Now let’s look at the details of hardware components of SoC shown above. On the hardware side, an SoC can be thought of as a Lego board. It is easy to utilize the blocks which are required in the application and leave the other blocks. The hardware portion of a SoC consists of components like:

Core Processor This is the most important component of the SoC as it controls all other peripherals on the SoC apart from general processor tasks.

System Memory This is divided into Flash memory for code storage, RAM for data, ROM for boot-code of the device, EEPROM, and an External Memory Interface (EMIF). The ARM architecture provides easy method for mapping memory and peripherals, leading to a reduction in SoC design time.

Digital peripherals Generally, SoCs are integrated with digital peripherals like counters, PWM, Timer, digital filters, etc. Some SoC also provide basic logic gates, flip-flops, multiplexers, and de-multiplexers, etc.

Analog peripherals Along with digital peripherals, SoCs also come with a lone list of analog components to provide mixed signal capabilities. Analog peripherals like ADCs, op-amps (comparator, amplifier, TIA, mixer, etc), current and voltage sources, etc. generally form the analog portion of the SoC.

Communication peripherals SoC are fitted with multiple communication interfaces like USB, UART, I2C, I2S, Ethernet, SPI, CAN, Bluetooth, etc. SoCs use these interfaces to communicate with external devices like another SoC, a base station, or a server.

Special I/O systems Some SoC also provide special I/O systems like capacitive touch detection and LCD and LED drivers.

Direct Memory Access Controller (DMA) To improve data access performance, DMA is also included in the list of peripherals. DMA frees the CPU from data-related tasks and hence improves overall data throughput of the SoC. DMA controllers can be configured for single/burst data transfer requests, interrupt signal on completion of data transfer, etc. Transfers of data can take place between:
  • Memory to peripheral
  • Memory to memory
  • Peripheral to memory
  • Peripheral to peripheral

Programmable Digital Blocks For applications that require digital capabilities that cannot be built using the components that exist in the SoC, some SoC vendors provide the option to build your own digital application using configurable PLDs and ALU to offload tasks from the CPU. With this functionality, the developer can make his/her own custom digital application suiting his requirement. Programmable digital blocks are known as Universal Digital Blocks (UDBs) in the Cypress’ PSoC architecture.  Each UDB is made up of two PLDs, status and control logic, and a datapath module. The datapath module is capable of performing simple arithmetic functions. Developers can describe their digital block in Verilog and have the PSoC Creator tool compile, synthesize, place-and-route, and automatically build it as part of the system.

Programmable Analog Blocks Vendors provide analog programmability using Switched Capacitor blocks. These blocks follow mimic resistance using a capacitor. Different op-amp configurations like inverting amplifier, non-inverting amplifier, filter, integrator, and differentiator can be created using a single op-amp by varying the input and feedback configurations using switched capacitances.

System Resources The system resources block is the controller block which deals with:
  • Clocking sub-system
  • Power and Operational modes
  • Power supply and monitoring sub-system
  • Watchdog timer, etc.

These blocks are connected to each other by a data bus which can be vendor proprietary or using the industry standard ARM’s Advance Microcontroller Bus Architecture which includes the Advanced High Performance bus (AHB), Advanced Peripheral Bus (APB), etc. This bus architecture promotes modular system design, provides higher performance, and reduces power dissipation in on-chip communication.

The peripherals mentioned above are highly configurable and their properties can be modified easily to suit the needs of the application. This can be done using firmware by writing to peripheral registers or using a vendor’s proprietary software GUI to modify the configuration settings of the peripherals. For example, PSoC Creator Software Suite allows developers to configure these components while designing an application using PSoC.

Figure 2 below shows a snapshot of a design built using PSoC Creator Software.

Click on image to enlarge.

Figure 2: Application built using PSoC Creator software

These GUIs also provide a schematic approach to circuit design. The circuit can be designed by dragging and dropping components from a component list onto the schematic. After this, they can be connected using virtual wires from the GUI. On the hardware level, this is managed by the interconnect system designed in the SoC. This interconnect system is highly configurable and can route any signal to anywhere on the silicon. As can be seen from the diagram above, this is an actual design to showcase low power modes but it looks like a normal paper-based design following a block-level approach.

Designing a mixed signal system: traditional vs SoC approaches
Let’s begin by exploring how SoCs have changed the way embedded systems are designed by taking an example and comparing it with traditional design approaches. Consider a basic gas sensing application which detects the concentration of CO in the environment. Figure 3 shows a functional block diagram for this application.

Figure 3: Functional block diagram of gas sensing system

In this design:
  • a hardware gas sensor is required to detect the concentration of CO gas
  • an op-amp is needed to amplify and convert the current signal obtained from the sensor output to a voltage
  • an ADC converts the voltage signal to digital value
  • a pulse width modulator (PWM) generates an alarm tone from the buzzer when the gas concentration crosses the defined threshold limit determined by the processor

< Previous
Page 1 of 2
Next >

Loading comments...