26.11.2012 Views

Implementing Hardware and Software for an ARM Cortex-M1 in FPGA

Implementing Hardware and Software for an ARM Cortex-M1 in FPGA

Implementing Hardware and Software for an ARM Cortex-M1 in FPGA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Implement<strong>in</strong>g</strong> <strong>Hardware</strong> <strong><strong>an</strong>d</strong> <strong>Software</strong> <strong>for</strong><br />

<strong>an</strong> <strong>ARM</strong> <strong>Cortex</strong>-<strong>M1</strong> <strong>in</strong> <strong>FPGA</strong><br />

Mike Thompson<br />

Senior M<strong>an</strong>ager, IP <strong><strong>an</strong>d</strong> Application Solutions<br />

October 2007


Agenda<br />

� Overview Processor Tools<br />

� CoreConsole<br />

� Libero<br />

� SoftConsole<br />

� Port<strong>in</strong>g code from <strong>ARM</strong>7 to <strong>Cortex</strong>-<strong>M1</strong><br />

� DEMO – Build a <strong>Cortex</strong>-<strong>M1</strong> System<br />

Confidential<br />

2<br />

2


<strong>Cortex</strong>-<strong>M1</strong> - Next Member of the M Series<br />

� Designed <strong>for</strong> <strong>FPGA</strong> Implementation<br />

� Soft Processor (Implemented <strong>in</strong> <strong>FPGA</strong> Fabric)<br />

� Small, Powerful, Highly-optimized <strong>for</strong> <strong>FPGA</strong>s<br />

� Configurable<br />

� <strong>ARM</strong>v6-M Architecture<br />

� Subset of Thumb-2<br />

� All 16-bit Thumb Instructions <strong><strong>an</strong>d</strong> some 32-bit Instructions<br />

� Delivered as Black Box via CoreConsole<br />

� Highly secure<br />

� Users c<strong>an</strong> connect IP to processor<br />

� Fully implemented <strong>in</strong> fabric<br />

� User c<strong>an</strong> program <strong>in</strong>to device<br />

Confidential<br />

3<br />

3


Actel <strong>Cortex</strong>-<strong>M1</strong> Design Flow<br />

HARDWARE<br />

DEVELOPMENT FLOW<br />

CoreConsole<br />

CoreConsole<br />

• Select Processor<br />

• Choose Peripherals<br />

• Add Optional User Custom IP<br />

• Auto Stitch to to Build System<br />

Libero IDE<br />

• Comb<strong>in</strong>e System with<br />

Non Non-Processor on-Processor Processor Code<br />

• Synthesis, Simulation, <strong><strong>an</strong>d</strong><br />

Layout<br />

• Optional Tim<strong>in</strong>g/Power<br />

Analysis<br />

• Easy to to use GUI<br />

SoftConsole<br />

SoftConsole<br />

• Eclipse-Base Eclipse Base IDE<br />

• GNU C-Compiler<br />

C Compiler<br />

• GNU Debugger<br />

• Memory Map <strong><strong>an</strong>d</strong> Peripheral<br />

Core Driver File Import<br />

Confidential<br />

SOFTWARE DEVELOPMENT FLOW<br />

OR<br />

Industry St<strong><strong>an</strong>d</strong>ard Support<br />

• Compilers – RealView, Keil, IAR, GNU<br />

• RTOS – uC/OS uC/OS<br />

II, uCl<strong>in</strong>ux, Nucleus<br />

• APIs, Drivers – Jungo, Jungo,<br />

GAO Research<br />

• Debuggers – RealView, GDB, IAR<br />

4<br />

Priceless<br />

4


Actel <strong>Cortex</strong>-<strong>M1</strong> Design Flow<br />

HARDWARE<br />

DEVELOPMENT FLOW<br />

CoreConsole<br />

CoreConsole<br />

• Select Processor<br />

• Choose Peripherals<br />

• Add Optional User Custom IP<br />

• Auto Stitch to to Build System<br />

Libero IDE<br />

• Comb<strong>in</strong>e System with<br />

Non Non-Processor on-Processor Processor Code<br />

• Synthesis, Simulation, <strong><strong>an</strong>d</strong><br />

Layout<br />

• Optional Tim<strong>in</strong>g/Power<br />

Analysis<br />

• Easy to to use GUI<br />

SoftConsole<br />

SoftConsole<br />

• Eclipse-Base Eclipse Base IDE<br />

• GNU C-Compiler<br />

C Compiler<br />

• GNU Debugger<br />

• Memory Map <strong><strong>an</strong>d</strong> Peripheral<br />

Core Driver File Import<br />

Confidential<br />

SOFTWARE DEVELOPMENT FLOW<br />

OR<br />

Industry St<strong><strong>an</strong>d</strong>ard Support<br />

• Compilers – RealView, Keil, IAR, GNU<br />

• RTOS – uC/OS uC/OS<br />

II, uCl<strong>in</strong>ux, Nucleus<br />

• APIs, Drivers – Jungo, Jungo,<br />

GAO Research<br />

• Debuggers – RealView, GDB, IAR<br />

5<br />

Priceless<br />

5


CoreConsole - HW Development Tools<br />

� SOC Builder <strong><strong>an</strong>d</strong> IP Deployment<br />

� Fast assembly <strong><strong>an</strong>d</strong> configuration of user designs<br />

� Easy-to-use graphical user <strong>in</strong>terface<br />

� Wide r<strong>an</strong>ge of AMBA peripheral IP<br />

� CoreConsole v1.3<br />

� C<strong>an</strong> be downloaded from www.actel.com<br />

� System output as configured RTL<br />

� Allows easy system setup <strong><strong>an</strong>d</strong> configuration<br />

� <strong>Cortex</strong>-<strong>M1</strong> output as a blackbox<br />

� Full support <strong>for</strong> <strong>Cortex</strong>-<strong>M1</strong><br />

� Seamless <strong>in</strong>tegration with Libero IDE<br />

Confidential<br />

6<br />

6


System-on-Chip - <strong>Cortex</strong>-<strong>M1</strong><br />

� Processor System<br />

� Processor<br />

� Bus Fabric<br />

� Components<br />

� Components<br />

� <strong>Cortex</strong>-<strong>M1</strong><br />

� AMBA<br />

� IP Cores<br />

� CoreConsole<br />

Automatically<br />

Creates Basic<br />

System<br />

� …OR …User C<strong>an</strong><br />

Create System<br />

M<strong>an</strong>ually<br />

Confidential<br />

7<br />

7


IP Cores Available <strong>in</strong> CoreConsole<br />

� Processors<br />

� <strong>Cortex</strong>-<strong>M1</strong>, CoreMP7<br />

� Core8051s, CoreABC<br />

� AMBA Interfaces<br />

� CoreAHB, CoreAHBLite<br />

� CoreAPB, CoreAPB3<br />

� CoreAHB2APB<br />

� Other Interfaces<br />

� Core10/100, Core429,<br />

CorePCIF<br />

� Core1553BRT, Core1553BRM<br />

� Subsystem Cores<br />

� CoreAHBNvm<br />

� CoreAHBSram<br />

� CoreAI<br />

� CoreCFI<br />

� CoreDDR<br />

� CoreFMEE<br />

� CoreFROM<br />

� CoreGPIO<br />

� CoreI2C<br />

� CoreInterrupt<br />

� CoreMemCtrl<br />

� CorePWM<br />

� CoreRemap<br />

� CoreSDR<br />

� CoreSMBus<br />

� CoreTimer<br />

� CoreUART, CoreUARTapb<br />

� CoreWatchdog<br />

Confidential<br />

8<br />

8


Build<strong>in</strong>g <strong>an</strong> SoC with CoreConsole<br />

� Decide on components needed to meet system<br />

requirements.<br />

� Add busses <strong><strong>an</strong>d</strong> bridge as necessary<br />

� Add components<br />

� Connect to busses<br />

� Configure components <strong><strong>an</strong>d</strong> memory map placement.<br />

� Generate system<br />

� Test <strong><strong>an</strong>d</strong> Verify the system<br />

Confidential<br />

9<br />

9


<strong>Cortex</strong>-<strong>M1</strong> - CoreConsole Configuration<br />

� Select Debug Interface<br />

� None (Default)<br />

� RealView JTAG<br />

� FlashPro3<br />

� Select Die<br />

� <strong>M1</strong>AFS600 (Default)<br />

� <strong>M1</strong>A3P1000<br />

� Future Project-Wide Sett<strong>in</strong>g<br />

� Other Options Inactive<br />

Confidential<br />

10<br />

10


Stitch<strong>in</strong>g <strong>an</strong> SOC Together<br />

� CoreConsole enables components to be stitched to<br />

the AHB <strong><strong>an</strong>d</strong> APB busses<br />

� Components ‘advertise’ the <strong>in</strong>terfaces they have<br />

available<br />

� Auto-Stitch<strong>in</strong>g supported<br />

to accelerate this task<br />

� User c<strong>an</strong> add <strong><strong>an</strong>d</strong> remove<br />

<strong>in</strong>dividual connections<br />

� Ad-Hoc connections are<br />

selected from drop down<br />

configuration boxes<br />

Confidential<br />

11<br />

11


Adhoc Signal Connections<br />

� To connect<br />

� Right Click on component <strong><strong>an</strong>d</strong> click<br />

configure<br />

� Or click<br />

� Label the connection<br />

� Select ‘From’ component <strong><strong>an</strong>d</strong> p<strong>in</strong><br />

� Select ‘To’ component<br />

<strong><strong>an</strong>d</strong> p<strong>in</strong><br />

� Click connect<br />

� Observe the connection label added<br />

to schematic<br />

Confidential<br />

12<br />

12


Rapid SOC Generation<br />

� Items to be Generated are Selected <strong>in</strong><br />

This Tab<br />

� Output Folder Tree is<br />

C:\CoreConsole\LiberoExport\<br />

� Details of the Files Output are<br />

Communicated to Libero <strong>in</strong> <strong>an</strong> XML File<br />

� Libero uses this to import a design<br />

� All the Files Generated by<br />

CoreConsole C<strong>an</strong> Be Located on the<br />

Disk And M<strong>an</strong>ually Edited<br />

Confidential<br />

13<br />

13


Actel <strong>Cortex</strong>-<strong>M1</strong> Design Flow<br />

HARDWARE<br />

DEVELOPMENT FLOW<br />

CoreConsole<br />

CoreConsole<br />

• Select Processor<br />

• Choose Peripherals<br />

• Add Optional User Custom IP<br />

• Auto Stitch to to Build System<br />

Libero IDE<br />

• Comb<strong>in</strong>e System with<br />

Non Non-Processor on-Processor Processor Code<br />

• Synthesis, Simulation, <strong><strong>an</strong>d</strong><br />

Layout<br />

• Optional Tim<strong>in</strong>g/Power<br />

Analysis<br />

• Easy to to use GUI<br />

SoftConsole<br />

SoftConsole<br />

• Eclipse-Base Eclipse Base IDE<br />

• GNU C-Compiler<br />

C Compiler<br />

• GNU Debugger<br />

• Memory Map <strong><strong>an</strong>d</strong> Peripheral<br />

Core Driver File Import<br />

Confidential<br />

SOFTWARE DEVELOPMENT FLOW<br />

OR<br />

Industry St<strong><strong>an</strong>d</strong>ard Support<br />

• Compilers – RealView, Keil, IAR, GNU<br />

• RTOS – uC/OS uC/OS<br />

II, uCl<strong>in</strong>ux, Nucleus<br />

• APIs, Drivers – Jungo, Jungo,<br />

GAO Research<br />

• Debuggers – RealView, GDB, IAR<br />

14<br />

Priceless<br />

14


Libero IDE<br />

� Libero Project M<strong>an</strong>ager<br />

� M<strong>an</strong>ages design flow <strong><strong>an</strong>d</strong> files<br />

� Design Creation/Verification<br />

� HDL, SmartGen Cores, Schematic<br />

� Optimization<br />

� Test Bench<br />

� Verification<br />

� Design Implementation<br />

� Floor pl<strong>an</strong>n<strong>in</strong>g & physical constra<strong>in</strong>ts<br />

� Place & Route<br />

� Tim<strong>in</strong>g constra<strong>in</strong>ts & <strong>an</strong>alysis<br />

� Power <strong>an</strong>alysis<br />

� Program file generation<br />

� Programm<strong>in</strong>g <strong><strong>an</strong>d</strong> Debug<br />

� FlashPro3 supports Programm<strong>in</strong>g <strong>for</strong> all<br />

Fusion devices<br />

Confidential<br />

15<br />

15


Libero IDE<br />

Design<br />

Hierarchy<br />

View<br />

Catalog:<br />

- Configurable Cores<br />

- HDL Templates<br />

-Macros<br />

- Bus Interfaces<br />

Confidential<br />

Design Entry Tools<br />

Interactive<br />

Design Flow<br />

M<strong>an</strong>agement Tools<br />

16<br />

Log File<br />

16


Libero IDE - Project M<strong>an</strong>ager<br />

File<br />

M<strong>an</strong>ager<br />

View<br />

Catalog:<br />

- HDL Templates<br />

- Simple click to<br />

<strong>in</strong>sert <strong>in</strong>to HDL<br />

code<br />

- Proven/tested<br />

Confidential<br />

17<br />

17


Libero IDE Design Entry<br />

Designer Block Flow<br />

� Create Fully Optimized Functional<br />

Blocks Through Layout<br />

� Preserves placement <strong><strong>an</strong>d</strong> tim<strong>in</strong>g<br />

� Publish to design repository<br />

� Supports Design & Re-use goals<br />

� Published Block Fully Compatible with<br />

Libero Design Flow<br />

� SmartDesign<br />

� Traditional<br />

Design Entry Options<br />

� CoreConsole Processor Subsystems<br />

� CoreConsole Configured Direct Cores<br />

� User Created HDL Modules<br />

� Libero Created “Designer Blocks”<br />

� ViewDraw Schematic<br />

� Mixed HDL Designs<br />

� Mixed Schematic/HDL Designs<br />

� SmartGen Configured Cores<br />

� Partner Created Comp<strong>an</strong>ion Cores<br />

� SmartDesign Components/Modules<br />

Confidential<br />

18<br />

18


Synthesize with Synplicity’s Synplify AE<br />

� Synplify AE<br />

� Lead<strong>in</strong>g edge<br />

synthesis from the<br />

market leader<br />

� Close OEM<br />

partnership provides<br />

optimal benefit to<br />

Actel users<br />

� Integration with<br />

Libero IDE ensures<br />

seamless operation<br />

� Optimized<br />

per<strong>for</strong>m<strong>an</strong>ce <strong><strong>an</strong>d</strong><br />

area utilization <strong>for</strong><br />

all Actel <strong>FPGA</strong>s<br />

� Available <strong>in</strong> Free<br />

Libero Gold<br />

Confidential<br />

19<br />

19


Mentor Graphics ModelSim HDL Simulator<br />

� HDL simulation <strong>in</strong> VHDL or Verilog<br />

� Pre-synthesis simulation<br />

� Post-synthesis simulation<br />

� Post-layout simulation<br />

Simulate<br />

Confidential<br />

20<br />

20


Libero IDE - Designer User Interface<br />

Physical<br />

Implementation<br />

Tools<br />

Constra<strong>in</strong>t &<br />

Analysis Tools<br />

Log & Device<br />

In<strong>for</strong>mation<br />

Confidential<br />

21<br />

21


Libero IDE- “Designer” Physical Implementation<br />

� Designer Functions<br />

� Import Netlist, Compile, <strong><strong>an</strong>d</strong> Design Rule Check<br />

� Floor pl<strong>an</strong>n<strong>in</strong>g <strong><strong>an</strong>d</strong> physical constra<strong>in</strong>ts<br />

� Tim<strong>in</strong>g driven Place <strong><strong>an</strong>d</strong> Route<br />

� Back <strong>an</strong>notated tim<strong>in</strong>g <strong>for</strong> full tim<strong>in</strong>g simulation<br />

� SmartTime setup of Tim<strong>in</strong>g Constra<strong>in</strong>ts <strong><strong>an</strong>d</strong> Tim<strong>in</strong>g Analysis<br />

� SmartPower <strong>an</strong>alysis of power consumption<br />

� Generate bitstream or STAPL programm<strong>in</strong>g files<br />

� Comprehensive log file <strong><strong>an</strong>d</strong> reports<br />

Confidential<br />

22<br />

22


Libero IDE - SmartTime Tim<strong>in</strong>g Constra<strong>in</strong>ts<br />

� Visual Dialogs simplify constra<strong>in</strong>t entry<br />

� View scope of tim<strong>in</strong>g paths<br />

� Select ports<br />

� Set Clock Edge<br />

� Enter Tim<strong>in</strong>g Requirements<br />

Confidential<br />

23<br />

23


Libero IDE - Program File Generation<br />

� Program File Generation <strong>for</strong> ProASIC3/E<br />

� Program<br />

� Security Sett<strong>in</strong>gs<br />

� Security Level<br />

� Pass Key<br />

� AES Key<br />

� <strong>FPGA</strong> Array<br />

� FlashROM<br />

Confidential<br />

24<br />

24


Device Programm<strong>in</strong>g <strong><strong>an</strong>d</strong> Debug<br />

� Programm<strong>in</strong>g <strong>Software</strong><br />

� FlashPro<br />

� In System Programm<strong>in</strong>g (ISP) <strong>for</strong> Actel Flash devices<br />

� Supports all FlashPro hardware programmers<br />

� Includes Cha<strong>in</strong>Builder<br />

� Generates a merged STAPL file <strong>for</strong> programm<strong>in</strong>g Actel<br />

FLASH devices <strong>in</strong> a mixed IC environment<br />

� Silicon Sculptor<br />

� Supports all Actel devices<br />

� Use with Silicon Sculptor hardware programmers<br />

� Launch from Libero Project M<strong>an</strong>ager or st<strong><strong>an</strong>d</strong> alone<br />

� Device Debugg<strong>in</strong>g<br />

� Synplicity Identify Debugger<br />

Confidential<br />

25<br />

25


Actel <strong>Cortex</strong>-<strong>M1</strong> Design Flow<br />

HARDWARE<br />

DEVELOPMENT FLOW<br />

CoreConsole<br />

CoreConsole<br />

• Select Processor<br />

• Choose Peripherals<br />

• Add Optional User Custom IP<br />

• Auto Stitch to to Build System<br />

Libero IDE<br />

• Comb<strong>in</strong>e System with<br />

Non Non-Processor on-Processor Processor Code<br />

• Synthesis, Simulation, <strong><strong>an</strong>d</strong><br />

Layout<br />

• Optional Tim<strong>in</strong>g/Power<br />

Analysis<br />

• Easy to to use GUI<br />

SoftConsole<br />

SoftConsole<br />

• Eclipse-Base Eclipse Base IDE<br />

• GNU C-Compiler<br />

C Compiler<br />

• GNU Debugger<br />

• Memory Map <strong><strong>an</strong>d</strong> Peripheral<br />

Core Driver File Import<br />

Confidential<br />

SOFTWARE DEVELOPMENT FLOW<br />

OR<br />

Industry St<strong><strong>an</strong>d</strong>ard Support<br />

• Compilers – RealView, Keil, IAR, GNU<br />

• RTOS – uC/OS uC/OS<br />

II, uCl<strong>in</strong>ux, Nucleus<br />

• APIs, Drivers – Jungo, Jungo,<br />

GAO Research<br />

• Debuggers – RealView, GDB, IAR<br />

26<br />

Priceless<br />

26


SoftConsole - Processor SW Development<br />

� <strong>Software</strong> development environment<br />

� Eclipse-based IDE - easy user <strong>in</strong>terface<br />

� Supports <strong>Cortex</strong>-<strong>M1</strong>, CoreMP7, Core8051/s<br />

� C<strong>an</strong> be downloaded from www.actel.com<br />

� C/C++ programm<strong>in</strong>g <strong><strong>an</strong>d</strong> debug<br />

� CodeSourcery G++ <strong>ARM</strong> tools<br />

� SDCC 8051 compiler<br />

� Programm<strong>in</strong>g <strong><strong>an</strong>d</strong> debug with<br />

Actel’s FlashPro3<br />

� C<strong>an</strong> import exist<strong>in</strong>g code<br />

� Open plat<strong>for</strong>m <strong>for</strong> application development<br />

� Support <strong>for</strong> RTOS <strong><strong>an</strong>d</strong> stacks<br />

� uC/OC, uCl<strong>in</strong>ux<br />

� TCP/IP, USB, IPMI<br />

Confidential<br />

27<br />

27


SoftConsole GNU C/C++ Compiler<br />

� Extensive <strong>in</strong>telligent <strong>ARM</strong> optimization<br />

� Built from CodeSourcery G++ GNU/GDB<br />

� Includes m<strong>an</strong>y features useful <strong>for</strong> embedded systems<br />

� Powerful <strong>in</strong>l<strong>in</strong>e assembly syntax<br />

� Comprehensive l<strong>in</strong>ker script l<strong>an</strong>guage permitt<strong>in</strong>g exact placement of<br />

code <strong><strong>an</strong>d</strong> data<br />

� Large developer base results <strong>in</strong> tool stability<br />

� ISO C <strong><strong>an</strong>d</strong> C++ l<strong>an</strong>guage support<br />

� Complete runtime libraries<br />

� Aggressive code usage <strong>an</strong>alysis <strong><strong>an</strong>d</strong> syntax warn<strong>in</strong>gs<br />

� Supports <strong>ARM</strong> EABI <strong>for</strong> better portability<br />

Confidential<br />

28<br />

28


SoftConsole GDB Debugger<br />

� Support <strong>for</strong> source- <strong><strong>an</strong>d</strong> assembly-level debugg<strong>in</strong>g<br />

� Live debugg<strong>in</strong>g of new code<br />

� In <strong>an</strong> <strong>FPGA</strong> or <strong>in</strong> the GDB <strong>ARM</strong> simulator<br />

� Breakpo<strong>in</strong>ts c<strong>an</strong> occur when certa<strong>in</strong> conditions are met<br />

� Intelligent access to hardware<br />

� Register b<strong>an</strong>ks <strong><strong>an</strong>d</strong> memory r<strong>an</strong>ges<br />

� Hover over a variable to read its current value<br />

� Ch<strong>an</strong>ges <strong>in</strong> value are obvious <strong>for</strong> <strong>an</strong>y variable, memory or register<br />

� Current stack frame displayed while debugg<strong>in</strong>g<br />

� Evaluation of expressions at runtime<br />

Confidential<br />

29<br />

29


On-Chip Debugg<strong>in</strong>g via FlashPro3<br />

� Download <strong><strong>an</strong>d</strong> debug executable programs to<br />

development boards us<strong>in</strong>g FlashPro3<br />

� C<strong>an</strong> program <strong><strong>an</strong>d</strong> debug processor memory <strong><strong>an</strong>d</strong> <strong>FPGA</strong> fabric with<br />

FlashPro3<br />

� Reduces p<strong>in</strong>-count – Utilizes dedicated <strong>FPGA</strong> JTAG p<strong>in</strong>s via<br />

UJTAG versus GPIO RVI-ME configuration (10-p<strong>in</strong>s)<br />

� Full debugg<strong>in</strong>g of code on remote target<br />

� View <strong>in</strong>ternal registers, memory locations, variables, etc.<br />

� Uses the same <strong>in</strong>terface as<br />

Instruction Set Simulator<br />

� Only one tool to learn<br />

Confidential<br />

30<br />

30


Port<strong>in</strong>g software from <strong>ARM</strong>7 to <strong>Cortex</strong>-<strong>M1</strong><br />

� <strong>Cortex</strong> M Processors More User-friendly th<strong>an</strong> <strong>ARM</strong>7<br />

� Less Need <strong>for</strong> Assembler Code<br />

� Ma<strong>in</strong> Differences from <strong>Software</strong> Port<strong>in</strong>g Perspective:<br />

Feature<br />

Execution State<br />

Memory Map<br />

Interrupts<br />

System Status<br />

<strong>Cortex</strong>-<strong>M1</strong><br />

Thumb-2 Only<br />

Structured (Architecturedef<strong>in</strong>ed)<br />

Integrated NVIC, up to 32<br />

Interrupts<br />

xPSR (Stacked Registers)<br />

Confidential<br />

CoreMP7<br />

<strong>ARM</strong> or Thumb<br />

Unstructured<br />

IRQ <strong><strong>an</strong>d</strong> FIQ Inputs<br />

External Interrupt Controller<br />

PSR (B<strong>an</strong>ked Registers)<br />

31<br />

31


<strong>ARM</strong>7TDMI overview<br />

� 32/16-bit RISC Architecture (<strong>ARM</strong> v4T - Thumb)<br />

� 32-bit <strong>ARM</strong> Instruction Set<br />

� 16-bit Thumb Instruction Set<br />

� 32-bit ALU<br />

� 3-stage Pipel<strong>in</strong>e<br />

� Unified 32-bit Bus Interface<br />

� Fully-static Operation<br />

� Extensive Debug Facilities<br />

� Embedded Real-time Debugg<strong>in</strong>g Block<br />

� JTAG Interface<br />

� Support <strong>for</strong> Trace<br />

Confidential<br />

TDMI St<strong><strong>an</strong>d</strong>s <strong>for</strong>:<br />

� Thumb<br />

� Debug Support<br />

� Multiplier (64-bit Result)<br />

� In-Circuit Emulator Interface<br />

32<br />

32


<strong>Cortex</strong>-<strong>M1</strong> vs. <strong>ARM</strong>7<br />

<strong>Cortex</strong>-<strong>M1</strong><br />

Smaller 2/3 Size, 2.5 x Faster<br />

4435 Tiles, 69.9 MHz without Debug<br />

New Processor<br />

Designed Specifically <strong>for</strong> <strong>FPGA</strong><br />

Implementation<br />

Sophisticated Interrupt Support<br />

1 – 32 Interrupts<br />

Automatic Processor State Sav<strong>in</strong>g <strong><strong>an</strong>d</strong><br />

Restoration<br />

Determ<strong>in</strong>istic, Short Interrupt Latency<br />

4 Levels of Interrupt Priority – Set by User<br />

<strong>ARM</strong>7 (CoreMP7)<br />

Bigger, Slower <strong>in</strong> <strong>FPGA</strong>s<br />

6083 Tiles, 28 MHz without Debug<br />

Industry-st<strong><strong>an</strong>d</strong>ard Processor<br />

Well-established <strong><strong>an</strong>d</strong> Recognized <strong>in</strong> ASIC<br />

Market (around <strong>for</strong> >15 Years)<br />

Initially Custom Design (Only Later Made<br />

Available as Synthesizable RTL<br />

Simple Interrupt Support (Two Interrupts –<br />

IRQ <strong><strong>an</strong>d</strong> FIQ)<br />

No Auto State Sav<strong>in</strong>g or Restore<br />

Long, Non-determ<strong>in</strong>istic, Interrupt Latency<br />

FIQ Has Priority over IRQ – Fixed<br />

Confidential<br />

33<br />

33


<strong>Cortex</strong>-<strong>M1</strong> vs. <strong>ARM</strong>7 (cont.)<br />

<strong>Cortex</strong>-<strong>M1</strong><br />

Connects Directly to AMBA<br />

External Interface is AMBA AHB-Lite<br />

Separate Memory Interface from AMBA<br />

1 Clock Cycle per Instruction Access<br />

Harvard Architecture – Separate Instruction<br />

<strong><strong>an</strong>d</strong> Data Interfaces<br />

Tightly-coupled Memories (TCM) up to 1MB<br />

Def<strong>in</strong>ed Memory Map<br />

Only Supports Thumb Instructions (All 16bit<br />

Thumb Instructions <strong><strong>an</strong>d</strong> Some Thumb-2<br />

32-bit Instructions)<br />

Does Not Execute <strong>ARM</strong> Instructions<br />

<strong>ARM</strong>7 (CoreMP7)<br />

External Interface Is Native <strong>ARM</strong>7 – Not AMBA<br />

Requires Bridge to AMBA<br />

Memory Accesses over AMBA<br />

Each Instruction Access Is at Least Two<br />

Clock Cycles<br />

von Neum<strong>an</strong>n Architecture – Shared<br />

Instruction <strong><strong>an</strong>d</strong> Data Interface<br />

Unstructured Memory Map<br />

(Exception Vectors from Address 0 Onwards,<br />

No Further Restrictions)<br />

Normally Executes <strong>ARM</strong> Instructions<br />

C<strong>an</strong> also Execute 16-bit Thumb Instructions<br />

but Must Ch<strong>an</strong>ge State to Do This<br />

Confidential<br />

34<br />

34


<strong>Cortex</strong>-<strong>M1</strong> - Instruction Set<br />

� <strong>ARM</strong>v6-M ISA (Subset of Thumb-2)<br />

� All 16-bit Thumb Instructions <strong><strong>an</strong>d</strong> Some 32-bit Thumb-2<br />

Instructions<br />

� Ideal C Compiler Target<br />

� Reduces Time to Market <strong><strong>an</strong>d</strong> Improves Code Quality<br />

� Interrupt Service Rout<strong>in</strong>es C<strong>an</strong> Be Coded Directly as C<br />

Functions<br />

Confidential<br />

35<br />

35


<strong>Cortex</strong>-<strong>M1</strong> - Registers<br />

� 17 Registers<br />

� 13 General-Purpose Registers<br />

� Stack Po<strong>in</strong>ter<br />

� L<strong>in</strong>k Register<br />

� Program Counter<br />

<strong>Cortex</strong>-<strong>M1</strong> register file is same as <strong>ARM</strong>7 register file<br />

Confidential<br />

Low Registers –<br />

Accessible by All<br />

Instructions<br />

High Registers –<br />

Accessible by<br />

SOME 16-bit<br />

Instructions<br />

36<br />

36


Port<strong>in</strong>g software from <strong>ARM</strong>7 to <strong>Cortex</strong>-<strong>M1</strong><br />

� Components of Embedded <strong>Software</strong> System<br />

� Application Code (Typically C/C++)<br />

� Should Rema<strong>in</strong> Largely Unch<strong>an</strong>ged<br />

� May Need M<strong>in</strong>or Modifications<br />

� Re-compile Source Code with <strong>Cortex</strong>-<strong>M1</strong> as Target<br />

Confidential<br />

37<br />

37


Port<strong>in</strong>g software from <strong>ARM</strong>7 to <strong>Cortex</strong>-<strong>M1</strong><br />

� System Code (C <strong><strong>an</strong>d</strong> Assembler Code)<br />

� Port<strong>in</strong>g System Code – the Crux of the Matter<br />

� C Code – Modify to Suit Different Resource Locations (e.g., Interrupt<br />

Controller) <strong><strong>an</strong>d</strong> Re-compile, Target<strong>in</strong>g <strong>Cortex</strong>-<strong>M1</strong><br />

CoreMP7 (<strong>ARM</strong>7)<br />

Assembler Code<br />

Start-up Code <strong><strong>an</strong>d</strong> Vector<br />

Table<br />

Exception (Interrupt)<br />

H<strong><strong>an</strong>d</strong>lers<br />

Access to System Features<br />

Tips <strong>for</strong> Port<strong>in</strong>g to <strong>Cortex</strong>-<strong>M1</strong><br />

Simpler <strong>for</strong> <strong>Cortex</strong>-<strong>M1</strong> – Vector Table Composed of<br />

Addresses rather th<strong>an</strong> <strong>ARM</strong> Instructions<br />

May Be Possible to Completely Avoid Assembler Code<br />

<strong>for</strong> This<br />

Automatic State Sav<strong>in</strong>g <strong><strong>an</strong>d</strong> Restoration Makes<br />

Exception H<strong><strong>an</strong>d</strong>l<strong>in</strong>g Easier <strong>for</strong> <strong>Cortex</strong>-<strong>M1</strong><br />

Exception H<strong><strong>an</strong>d</strong>lers May Be Written <strong>in</strong> C<br />

e.g., Enabl<strong>in</strong>g/Disabl<strong>in</strong>g Interrupts<br />

Must Be M<strong>an</strong>ually Ported<br />

Confidential<br />

38<br />

38


Actel <strong>Cortex</strong>-<strong>M1</strong> Design Flow<br />

HARDWARE<br />

DEVELOPMENT FLOW<br />

CoreConsole<br />

CoreConsole<br />

• Select Processor<br />

• Choose Peripherals<br />

• Add Optional User Custom IP<br />

• Auto Stitch to to Build System<br />

Libero IDE<br />

• Comb<strong>in</strong>e System with<br />

Non Non-Processor on-Processor Processor Code<br />

• Synthesis, Simulation, <strong><strong>an</strong>d</strong><br />

Layout<br />

• Optional Tim<strong>in</strong>g/Power<br />

Analysis<br />

• Easy to to use GUI<br />

SoftConsole<br />

SoftConsole<br />

• Eclipse-Base Eclipse Base IDE<br />

• GNU C-Compiler<br />

C Compiler<br />

• GNU Debugger<br />

• Memory Map <strong><strong>an</strong>d</strong> Peripheral<br />

Core Driver File Import<br />

Confidential<br />

SOFTWARE DEVELOPMENT FLOW<br />

OR<br />

Industry St<strong><strong>an</strong>d</strong>ard Support<br />

• Compilers – RealView, Keil, IAR, GNU<br />

• RTOS – uC/OS uC/OS<br />

II, uCl<strong>in</strong>ux, Nucleus<br />

• APIs, Drivers – Jungo, Jungo,<br />

GAO Research<br />

• Debuggers – RealView, GDB, IAR<br />

39<br />

Priceless<br />

39


Actel <strong>M1</strong> Development Boards<br />

� <strong>M1</strong>-SYSMGMT-DEV-KIT<br />

� <strong>M1</strong>AFS600 device<br />

� System Mgmt GUI<br />

� Demonstration designs<br />

� Full PCI <strong>in</strong>terface<br />

� Also available with FP3<br />

� <strong>M1</strong> SOC Boards<br />

� Powered by USB or wall supply<br />

� 1M SRAM, 4M Flash memory<br />

� FP3 programmer built <strong>in</strong>to board<br />

� Exp<strong>an</strong>sion connectors<br />

� <strong>M1</strong>A3P-DEV-KIT-SCS<br />

� <strong>M1</strong>A3P1000 device<br />

� <strong>M1</strong>AFS-DEV-KIT-SCS<br />

� <strong>M1</strong>AFS600 device<br />

� <strong>M1</strong>AGL-DEV-KIT-SCS<br />

� <strong>M1</strong>AGL600 device<br />

Confidential<br />

<strong>M1</strong>A3P1000<br />

40<br />

40


Where to Go <strong>for</strong> More In<strong>for</strong>mation<br />

� <strong>Cortex</strong>-<strong>M1</strong> on the Web<br />

� http://www.arm.com/products/CPUs/<strong>ARM</strong>_<strong>Cortex</strong>-<strong>M1</strong>.html<br />

� http://www.actel.com/products/mpu/<strong>Cortex</strong><strong>M1</strong>/<br />

� Key Documents<br />

� <strong>Cortex</strong>-<strong>M1</strong> H<strong><strong>an</strong>d</strong>book (Actel)<br />

� <strong>ARM</strong> v6-M Architecture Reference M<strong>an</strong>ual (<strong>ARM</strong>)<br />

� <strong>Cortex</strong>-<strong>M1</strong> Technical Reference M<strong>an</strong>ual (<strong>ARM</strong>)<br />

� Registration on <strong>ARM</strong>’s Website Required <strong>for</strong> Some<br />

Documents<br />

Confidential<br />

41<br />

41


Summary<br />

� <strong>Cortex</strong>-<strong>M1</strong> allows designers to benefit from<br />

hassle-free, <strong>in</strong>dustry-st<strong><strong>an</strong>d</strong>ard <strong>ARM</strong> architecture<br />

� Optimized <strong>for</strong> use <strong>in</strong> <strong>M1</strong> devices (ProASIC3, IGLOO, Fusion)<br />

� Actel <strong>FPGA</strong> tools offer seamless development flow<br />

� CoreConsole, Libero, dev kit hardware development tools<br />

� SoftConsole with GNU software development tools<br />

� Third-party ecosystem support<br />

� Br<strong>in</strong>gs flexibility <strong><strong>an</strong>d</strong> fast time to market to system-level<br />

designs<br />

Confidential<br />

42<br />

42

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!