C64x+ Cycle Accurate Simulator

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

C64x+ Cycle Accurate Simulator

This simulator is a C64x+ CPU only simulator and it's also cycle accurate simulator. This is generic C64x+ simulator with cache system modeled & comes with a predefined configuration/memory map; Mainly used in algorithm development where the development is CPU centric.

Components Model

Components modeled in C64x+ Cycle Accurate Simulator.

Internal Memory Configuration

C64x+ Cycle Accurate Simulator models all the internal memory along with cache configurations. Internal memories are Data Memory Controller (DMC), Program Memory Controller (PMC) & Unified Memory Controller (UMC). Memory region falling outside the CPU are part of External Memory Controller (EMC) and they are program accessible with single cycle latency.

Timer Model

The C6000™ DSP device has 32-bit general-purpose timers that can be used to: Time events, Count events, Generate pulses, Interrupt the CPU and Send synchronization events to the DMA.

Timer Memory Map

Interrupt connection for Timer models

CPU pin 69 (Intsel_in_pin_70) to Timer_1 Event TIN34 (TIMER64_1_cpu_int_34)

Simulator Configurable Options

C64x+ Cycle Accurate Simulator can be configured to match other C64x+ device by configuring the internal memory & timer. Follow the step to configure internal memory to different cache & SRAM sizes & Timer model to different memory map & interrupt connection.

Simulator Configurable Options in CCSv4

C64x setup4.jpg

C64x setup5.jpg

C64x setup6.jpg

Simulator Configurable Options in CCSv3.3

Simulator is configured via simulator configuration file in CCSv3.3. Please follow the step given below.

Internal Memory Configuration

Configure DMC

Ex:
   MODULE DMC;
       CACHE_SIZE         0x0000;
       MEMORY_SIZE        0x100000;
       SRAM_START_ADDRESS 0x00F00000;
   END DMC; 

SRAM_START_ADDRESS – Start address of DMC
MEMORY_SIZE – Total size of DMC memory. Ex: 0x100000 = 1 Mbytes, 0x8000 = 32 Kbytes.
CACHE_SIZE – Cache memory size in DMC memory. Cache size can’t be greater than total memory size.

Note: SRAM size is the difference total memory size and cache size. 

Ex: For C6455 simulator - DMC
   MODULE DMC;
       CACHE_SIZE         0x8000;
       MEMORY_SIZE        0x8000;
       SRAM_START_ADDRESS 0x00F00000;
   END DMC;

Configure PMC

Ex:
   MODULE PMC;
       CACHE_SIZE         0x0000;
       MEMORY_SIZE        0x100000;
       SRAM_START_ADDRESS 0x00E00000;
   END PMC; 

SRAM_START_ADDRESS – Start address of PMC
MEMORY_SIZE – Total size of PMC memory. Ex: 0x100000 = 1 Mbytes, 0x8000 = 32 Kbytes.
CACHE_SIZE – Cache memory size in PMC memory. Cache size can’t be greater than total memory size.

Note: SRAM size is the difference total memory size and cache size. 

Ex: For C6455 simulator - PMC
   MODULE PMC;
       CACHE_SIZE         0x8000;
       MEMORY_SIZE        0x8000;
       SRAM_START_ADDRESS 0x00E00000;
   END PMC;

Configure UMC

Ex:
   MODULE UMC;
       CACHE_SIZE         0x00000;
       MEMORY_SIZE        0xE00000;
       SRAM_START_ADDRESS 0x00000000;
       RAM_WAIT_STATES    1;
   END UMC;

   SRAM_START_ADDRESS – Start address of UMC
   MEMORY_SIZE – Total size of UMC memory. Ex: 0x100000 = 1 Mbytes, 0x8000 = 32 Kbytes.
   CACHE_SIZE – Cache memory size in UMC memory. Cache size can’t be greater than total memory size.
   RAM_WAIT_STATES –  No. of excess cycle taken for read/write access.

   Note: SRAM size is the difference total memory size and cache size. 

Ex: For C6455 simulator - UMC
   MODULE UMC;
       CACHE_SIZE         0x00000;
       MEMORY_SIZE        0x200000;
       SRAM_START_ADDRESS 0x00800000;
       RAM_WAIT_STATES    1;
   END UMC;
Timer Model configuration
Ex: 
   CONNECT23 C64xplus.MM.EMCCtrlecfg_mem_map, TIMER64_0_mif, 0x02940000, 0x0294003F, -0x02940000;
   CONNECT24 C64xplus.MM.EMCCtrlecfg_mem_map, TIMER64_1_mif, 0x02980000, 0x0298003F, -0x02980000;

   Note: Last 3 hex values represent the start address, end address & offset.
Ex: 
   CONNECT1 C64xplus_mem_map, TIMER0_mif, start_address, end_address, -start_address;

Ex:
   CONNECT25 C64xplus.MM.Intsel_in_pin_67, TIMER64_0_cpu_int_12;
   CONNECT26 C64xplus.MM.Intsel_in_pin_68, TIMER64_0_cpu_int_34;

Ex:
   CONNECT25 C64xplus.MM.Intsel_in_pin_4, TIMER64_0_cpu_int_12;
   CONNECT26 C64xplus.MM.Intsel_in_pin_5, TIMER64_0_cpu_int_34;

   Note: C64x+ Cycle Accurate simulator support interrupt 4-15 only.

Runtime Memory Limit

Simulator support 64MB as memory limit for application, beyond that it gives an error. To increase the runtime memory limit add the following line in simulator configuration file inside Module C64xplus;

MODULE C64xplus;

      MEM_USAGE_LIMIT 100; // Supposing you want to change to 100 MB
      ....

END C64xplus;

Running Applications

All BIOS application will run on simulator after selecting the appropriate devices which intern configure the timer memory map & interrupt configurations.

Note: In CCSv3.3 while running BIOS application check whether the simulator timer memory map & interrupt configuration matches the intended device.

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox