ARM Cortex-M0 DesignStart ReleaseNote
ARM Cortex-M0 DesignStart ReleaseNote
Proprietary notice
Words and logos marked with ® or ™are registered trademarks or trademarks owned by ARM Limited, except as
otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the
trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document may be
adapted or reproduced in any material form except with the prior written permission of the copyright holder.
The product described in this document is subject to continuous developments and improvements. All particulars
of the product and its use contained in this document are given by ARM Limited in good faith. However, all
warranties implied or expressed, including but not limited to implied warranties or merchantability, or fitness for
purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable for
any loss or damage arising from the use of any information in this document, or any error or omission in such
information, or any incorrect use of the product.
Product status
The information in this document is Final.
Web address
http://www.arm.com
Feedback
ARM limited welcomes feedback on both the product and the documentation.
Contents
1 PRODUCT DELIVERABLES 1
1.1 Product Release Status 1
1.2 About the Cortex-M0 DesignStart Processor 1
2 INSTALLATION 2
2.1 Introduction 2
2.1.1 Unpacking the Deliverables 2
4 SIMULATION TEST-BENCH 10
4.1 Cortex-M0 DesignStart Test-Bench 10
4.1.1 Overview 10
4.1.2 Debugging 13
6 DOCUMENTATION 16
6.1 Cortex-M0 Technical Publications Documents 16
6.2 ARM Architecture Documents 16
7 REVISION HISTORY 17
1 PRODUCT DELIVERABLES
NOTE:
• These deliverables may only be used as described in the terms of your legal agreement.
The Cortex-M0 DesignStart processor is delivered as a pre-configured and obfuscated, but synthesizable, Verilog
version of the full Cortex-M0 processor. As such the Cortex-M0 DesignStart processor is a fully working version of
the Cortex-M0 processor, and can be used as the basis for production hardware and software designs. Details of
the Cortex-M0 processor configuration used to construct the Cortex-M0 DesignStart processor are provided in
section 5.1.1.
The Cortex-M0 processor is a highly deterministic, low gate count, 32-bit processor that implements the ARMv6-M
architecture with zero deviation instruction determinism in zero wait-state memory systems. The Cortex-M0
processor’s three-stage pipeline allows for very low area implementation whilst still being capable of achieving
performance figures around 0.9 DMIPS/MHz. The Cortex-M0 processor’s programmers’ model is fully upwards
compatible with the Cortex-M1, Cortex-M3 and Cortex-M4 processors for portability.
Further details of the Cortex-M0 processor are contained in the Technical Reference Manual (TRM) document
and other technical publications documents, see section 6.1.
2 INSTALLATION
2.1 Introduction
The Cortex-M0 DesignStart intellectual property (IP) deliverables are provided as a single zipped tar file. The
following instructions cover Unix-like operating systems only.
AT510-BU-98000-r0p0-00rel0.lst
RELEASE-NOTE
ARM_Cortex-M0_DesignStart_ReleaseNote.pdf
(THIS DOCUMENT)
logical/
cortexm0ds/
verilog/
CORTEXM0DS.v SYNTHESIZABLE
cortexm0ds_logic.v VERILOG
tbench/
cortexm0ds_tb.v
helloworld.c TEST-BENCH
Makefile ENVIRONMENT
ram.bin
LOCKUP
NMI
INTERRUPT SLEEPING STATUS
INPUTS IRQ[15:0] OUTPUTS
SYSRESETREQ
3.1.1 Overview
The Cortex-M0 DesignStart processor is contained within a top-level macro-cell module named “CORTEXM0DS”,
and its obfuscated sub-module “cortexm0ds_logic”. The top-level macro-cell implements ports for a single
AMBA™3 AHB-Lite interface, interrupt and event inputs, three status outputs and an event output. A brief
summary of each of the groups is provided below. Further details are included in the port list given in section
3.1.2.
AHB-Lite interface
The Cortex-M0 DesignStart processor implements a primary memory and system bus interface compatible with
the AMBA™3 AHB-Lite specification. The Cortex-M0 DesignStart processor additionally uses the AHB-Lite reset
and clock signals as its clock and reset source. All signals are sampled and driven relative to positive clock edges
on the AHB-Lite HCLK signal.
The Cortex-M0 DesignStart processor is capable of generating four basic transaction types. These are listed in
the following table.
HTRANS[1:0] = 2’b00 IDLE The processor does not wish to perform any transaction.
HTRANS[1:0] = 2’b10 BYTE The processor wishes to perform an 8-bit data access
resulting from an LDRB, LDRSB or STRB instruction.
HPROT[0] = 1’b1
Load instructions will drive the HWRITE signal LOW; store
HSIZE[1:0] = 2’b00 instructions will drive the HWRITE signal HIGH.
HTRANS[1:0] = 2’b10 HALF- The processor wishes to perform a 16-bit data access
WORD resulting from an LDRH, LDRSH or STRH instruction.
HPROT[0] = 1’b1
Load instructions will drive the HWRITE signal LOW; store
HSIZE[1:0] = 2’b01 instructions will drive the HWRITE signal HIGH.
HTRANS[1:0] = 2’b10 WORD The processor wishes to perform a 32-bit data access
resulting from an LDR, LDM, POP, STR, STM or PUSH
HPROT[0] = 1’b1
instruction, or as part of exception entry or return. Loads
HSIZE[1:0] = 2’b10 will drive the HWRITE signal LOW; stores will drive the
HWRITE signal HIGH.
The AHB-Lite interface of the Cortex-M0 DesignStart processor always operates in little-endian format. All
transactions are always naturally aligned. The active byte lanes for HRDATA and HWDATA and their
correspondence to the source/destination register (Rd) within the Cortex-M0 processor are given in the following
table. Byte lanes marked with “-” should be ignored for write-transactions and will be ignored by the processor for
read transactions.
Address-phase: Data-phase:
00 00 - - - Rd[7:0]
00 01 - - Rd[7:0] -
00 10 - Rd[7:0] - -
00 11 Rd[7:0] - - -
01 00 - - Rd[15:8] Rd[7:0]
01 10 Rd[15:8] Rd[7:0] - -
The memory properties for the Cortex-M0 processor are specified by the ARMv6-M architecture and are fixed for
a given address. The following table lists the HPROT[3:2] mapping from HADDR and indicates the recommended
usage of each location.
Status Outputs
The Cortex-M0 DesignStart processor provides three additional status outputs.
LOCKUP indicates that the processor is in the Lockup state as defined in the ARMv6-M Architecture Reference
Manual. System designers can choose to use this signal to inform a watchdog timer that the processor is in a
likely undesirable state.
SYSRESETREQ is an active high signal that mirrors the state of the software accessible SYSRESETREQ bit of
the Application Interrupt and Reset Control Register (AIRCR). This signal is designed to inform the system reset
controller that software wishes to reset the entire system. Care should be taken to ensure that this signal is
registered before use; driving the HRESETn signal LOW will cause the SYSRESETREQ signal to become
asynchronously reset LOW.
SLEEPING is an active high signal that indicates the processor is in an idle state. This can occur as a result of
executing either a wait-for-event (WFE) or wait-for-interrupt (WFI) instruction, or by making use of the Cortex-M0
Event signals
TXEV is an active high signal that is pulsed HIGH for a single HCLK cycle whenever the processor executes a
SEV instruction. This signal can be used by other processors or system components as a simple communication
mechanism indicating that the processor has performed some operation that may be of interest, for example
releasing a memory-based semaphore.
RXEV is an active high signal that the processor uses as one of the potential sources for indicating that it should
wake-up from a WFE instruction.
HADDR[31:0] OUT AHB-Lite address-phase interface address. These signals provide the
32-bit address used to identify the memory or device being accessed
by a transaction. The value on this bus is only valid if HTRANS[1] is
HIGH.
HCLK IN AHB-Lite interface and processor clock. All signals in and out of the
processor are processed on the positive/rising edge of this clock.
HRDATA[31:0] IN AHB-Lite data-phase transaction read-data. This bus carries the read-
data associated with a previous AHB-Lite address-phase from the
system into the processor. The read-data is constructed of four 8-bit
byte-lanes, the number and location of the valid lanes is dependent on
the values of HADDR[1:0] and HSIZE[1:0] used in the address-phase,
see Table 2 for details. The value on this bus must be valid for a read-
transaction data-phase cycle where HREADY is HIGH and HRESP is
LOW.
HREADY IN AHB-Lite address and data-phase ready signal. This signal indicates
the acceptance of an address-phase from the processor and the
completion of any current data-phase. The value of this signal must
always be valid and driven HIGH to indicate that the AHB-Lite bus is
either idle and accepting an address-phase, or is completing a data-
phase and accepting an address-phase. After accepting an address-
phase, HREADY can be driven LOW to extend the current data-phase.
HRESETn IN AHB-Lite interface and processor reset. This is an active low signal
which, when LOW, asynchronously resets all state in the processor.
This signal should be held LOW for at least two HCLK cycles, and
should be de-asserted (driven HIGH) synchronously to HCLK. After
reset, this signal should be held HIGH to permit normal execution.
HTRANS[1:0] OUT AHB-Lite address-phase transfer type information. The processor uses
this bus to initiate an AHB-Lite transaction. All transfers are issued as
non-sequential transfers (no guaranteed relationship to previous
transfer address). The value on this bus is driven to 2’ b00 to indicate
an IDLE cycle or to 2’ b10 to indicate a NONSEQ transfer.
HWDATA[31:0] OUT AHB-Lite data-phase transaction write-data. This bus carries the write-
data associated with a previous AHB-Lite address-phase. The write-
data is constructed of four 8-bit byte-lanes, the number and location of
the valid lanes is dependent on the values of HADDR[1:0] and
HSIZE[1:0] used in the address-phase, see Table 2 for details. The
value on this bus is only valid for a write-transaction data-phase.
LOCKUP OUT Processor in Lockup state indicator. The processor uses this signal to
indicate that two or more unrecoverable errors have occurred, for
example due to bus-faults, attempted execution of an unaligned
memory transaction or execution of an UNDEFINED instruction, and
has therefore entered Lockup state. This signal is driven LOW for
cycles in which the processor is executing normally, and is driven
HIGH for every cycle in which the processor is waiting in the Lockup
state. This signal is valid on every cycle. Typically this signal would be
connected to a watchdog type device.
RXEV IN Event reception port. Driving this signal HIGH for a single HCLK cycle
causes the ARMv6-M Event Register inside the processor to become
set. This signal can be used by the system to indicate to software that
some event has occurred. Software can use the WFE instruction inside
a loop to reduce system polling if the event being polled is capable of
driving RXEV.
SLEEPING OUT Processor is idle. The processor drives this signal HIGH if it is idle and
will drive this signal LOW before performing any operation. This signal
is valid on every cycle.
SYSRESETREQ OUT Processor request for entire system reset. This signal is mapped to the
SYSRESETREQ register inside the processor and is driven LOW
during normal operation. The processor will drive this signal HIGH in
response to a validated software write to the internal reset request
register. This signal is reset LOW by the asynchronous HRESETn
signal. The signal must therefore not be connected via combinatorial
logic to the HRESETn port. This signal is valid on every cycle.
TXEV OUT Event transmission port. This signal will be driven high by the
processor each time it executes an SEV instruction. This signal can be
used by software to indicate to the system that some operation has
been performed. This signal is valid on every cycle.
3.3 Implementation
Scripts and methodology for producing a physical implementation of either the pre- or post-integrated
CORTEXM0DS macro-cell are not provided as part of the Cortex-M0 DesignStart processor distribution.
Successful implementation in silicon, on FPGA, or using other physical means, is the responsibility of the licensee.
The CORTEXM0DS macro-cell should be compatible with most Verilog synthesis flows. The synthesizable
processor is contained within the two Verilog files found in the “logical/cortexm0ds/verilog/” directory,
namely “CORTEXM0DS.v” and “cortexm0ds_logic.v”.
4 SIMULATION TEST-BENCH
CORTEXM0DS HRDATA
u_cortexm0ds
HSIZE PRE-INITIALIZED
HTRANS/HWRITE RAM MODEL
HREADY
HADDR “RAM.BIN”
HRESP/NMI/IRQ/RXEV
ARM®
CORTEX™-M0
DESIGNSTART
SYSRESETREQ PROCESSOR
OUTPUT
RESET CONSOLE
SYNCHRONIZER HWDATA
HRESETn
RESET
LOCKUP SIMULATION STOP
GENERATOR
4.1.1 Overview
The Cortex-M0 DesignStart deliverables include a lightweight simulation test-bench intended to minimize the time
from downloading the deliverables to being able to execute code on the processor. The test-bench deliverables
consist of: a Verilog test-bench, an example program and corresponding memory-image, and a simple Makefile.
Verilog test-bench
The test-bench, shown in Figure 2 above, instantiates the CORTEXM0DS module and connects it in a minimal
way to a memory model and clock and reset generators. It also provides a means of outputting information from
the processor to the Verilog simulator’s console output. Note that the components within the test-bench are
intended for simulation purposes only, and should be replaced with synthesizable counterparts before performing
any synthesis.
Simulating the test-bench is simply a matter of compiling the test-bench, “cortexm0ds_tb.v” with the Cortex-M0
DesignStart processor synthesizable Verilog using a Verilog simulator.
Commands for performing this operation using some commercial EDA tools under Linux are provided in the
Makefile, and can be invoked simply by running “make”. The Cortex-M0 DesignStart processor does not include a
Verilog simulator, however, it should be possible to simulate the provided RTL files using any EDA tool compliant
with the Verilog-2k standard (IEEE Std 1364-2001) or later. Such tools are available both commercially and from
the open-source community.
Makefile
The Makefile contains example commands for both compiling the memory image from its C source file, and
additionally for performing a simulation of the test-bench and processor RTL using a number of commercial
Verilog simulators running under the Linux operating system.
Users of alternative operating systems or Verilog simulators, or those wishing to perform simulation using a
graphical-user-interface, should refer to the documentation provided by their EDA tool vendor. The relevant files
for simulation are “cortexm0ds_tb.v”, “CORTEXM0DS.v” and “cortexm0ds_logic.v” with the top-level
Verilog module being “cortexm0ds_tb”.
For those using Linux, and with the relevant EDA tools, compiler tools and GNU Make available (and locatable via
the PATH environment variable), the Makefile provides a number of targets. The targets are available by
executing “make <target>”, where <target> should be substituted for one of the items in the following table:
<target> Description
ram.bin Rebuilds the “ram.bin” file from the “helloworld.c” source file using ARMCC.
This target can only be built if “armcc”, “armlink” and “fromelf” are on the
PATH.
ncverilog Builds and simulates the Verilog test-bench using Cadence NC Verilog. This can
only be used if “ncverilog” is on the PATH.
questasim Builds and simulates the Verilog test-bench using Mentor Graphics QuestaSim or
ModelSim. This can only be used if “vlib”, “vlog” and “vsim” are on the PATH.
vcs Builds and simulates the Verilog test-bench using Synopsys VCS. This can only be
used if “vcs” is on the PATH.
4.1.2 Debugging
Whilst the Cortex-M0 DesignStart processor does not offer any hardware debug capabilities, the provided Verilog
RTL does offer visibility of key architectural state for the purposes of simulation waveform based debugging.
Several observation signals are routed from within the Cortex-M0 DesignStart processor logic level into the
CORTEXM0DS level for this purpose. Table 6 below lists the signals to be found in the CORTEXM0DS level.
Signal Description
5.1 Introduction
To enable low cost access, the ARM Cortex-M0 DesignStart processor has limitations in comparison to the full
Cortex-M0 processor. Neither the processor technology nor supporting deliverables should be used as an
indicator of what is received under a full technology license of the ARM Cortex-M0 processor. This section gives
an overview of the differences.
Fast/small multiplier options Fast single or small 32-cycle. Small 32-cycle multiplier only.
Wake-up Interrupt
Optional. None.
Controller
Hardware debugger
Optional Serial-Wire or JTAG. None.
interface
Debug support
The full Cortex-M0 processor supports the use of an external hardware debugger to facilitate the development of
applications. Connection is possible via either Serial-Wire or JTAG interfaces and provides a host of debug
functionality. Both connections provide the ability to access all AHB-Lite connected slaves, including RAM, whilst
the processor is running, as well as providing full halting-mode debug. Halting-mode debug allows all processor
registers to be examined and modified, and can be configured to provide up to four hardware breakpoints and two
hardware watchpoints. Unlimited software breakpoints are possible via the BKPT instruction.
The Cortex-M0 DesignStart processor implementation does not provide any debug capabilities.
6 DOCUMENTATION
7 REVISION HISTORY