MtDt Release Details

V3.41A New Features and Fixed Bugs 
  • The CxCx.ETPD bit was not implemented.  This bit supported selection of either input or output pin for determining thread in the event vector table.  There as also no script command for setting clearing this channel's bit (though it could be done indirectly). The following script command has been added, and the bug has been fixed.

  write_chan_entry_pin_direction(CHAN_NUM, ETPD_PIN_DIRECTION_OUTPUT);

  • When in angle mode, the channel window for channel 0, shows the input pin state ... and this is very confusing! It is confusing because in angle mode, the TCRCLK pin is routed to channel zero.  So to avoid confusing, in this window, when viewing channel zero, a note is added indicating that the input pin is not used, and that shows the TCRCLK pin state.

  • When in angle mode and the CHAN register is equal to zero, the input pin used as part of the event vector table should be the TCRCLK clock pin. Instead, the CHANNEL 0 input pin was being used, which was wrong.

  • When in angle mode and the CHAN register is equal to zero, branching using the PSTI bit should be on the TCRCLK pin not on the CH-0 input pin.

  • When in angle mode and either the CHAN register is written to zero or a state begins on channel zero, the PinStateSampled bit (PSS) should be loaded with the TCRCLK pin. Instead, the CHANNEL 0 input pin was being used, which was wrong.

  • Fixed the register window such that it shows all three pin flags

>> input pin, Sampled at start of state

>> input pin, current value

>> output pin, current value

The "PST" flag had been displayed, which is no longer a part of the eTPU.

  • 32-bit variables are not being displayed in watch/local variable/function frame windows.  [This was actually fixed in a previous release]

  • Opcodes sometime appear in dis-assembler pane of multiple source files. (MikePauwelsMissingInstructionBug)  [This was actually fixed in a previous release]

  • Windows XP Bug:  When using the Windows search utility for searching for text in files such as .ETpuCommand, the file will not be searched because Windows no longer assumes that files of unknown type are text files.  THIS IS A MICROSOFT OS BUG, the suggested fix did not work, so instead a workaround has been posted on the eTPU website

  • Added two new script commands for accessing GLOBAL DATA memory as 24-bits.

#define RESULT1_ADDR 0x101;

*((ETPU_DATA_SPACE U24 *) RESULT1_ADDR) = 0x888;

verify_mem_u24(ETPU_DATA_SPACE, RESULT1_ADDR,        0xfffffF, 0x888);

[ Note 1: addresses for 24-bit accesses are on single-odd boundaries e.g. 1, 5, 9, 0xD, ...]

[ Note 2: analogous channel-relative commands already existed ]

  • The disassembly listing for addresses is often wrong.  For instance, if a U24 is stored in memory, the addresses must be 1, 5, 9, etc.  But the actual listed addresses 0, 4, 8.  NOT THAT THIS IS A VISUAL PROBLEM ONLY!!! ACTUAL SIMULATOR FUNCTIONALITY IS CORRECT!!!!

  • A single warning during parse of script commands file appears in the gui as a dialog box, but then does NOT appear in the report file, making it impossible to fix. [note: does not occur with errors or in cases in which there are multiple warnings]

  • If the simulator is launched with command-line parameters, but those command line parameters are not recognized, there is no error or warning message.

  • In certain funny double-jump cases the following does not execute correctly

au p_31_24 = 4;;

seq goto ProgramCounter + p_31_24;;

seq goto DoneWithTableA;;      // no flush here

au b    = 0xA111;;

au cReg = 0xA222;;

au diob = 0xA33333;;

au a    = 0xA44444;;

au sr   = 0xA55555;;


au p   = 0xA66666;;

Specifically, the A register should be loaded with 0xA44444, but it was not.

  • Added ability to close the startup script.

  • Added ability to resize the pin transition buffer, such that more pin transition data can be viewed in the logic analyzer.

  • Added "Cumulative Logged Regression Test" such that errors are logged to a file rather than resulting in alerts to the user.  This allows an entire test suite to be run without user intervention EVEN IF SOME TESTS FAIL.

  • Fixed error message on pin transition regression tests failure such that on error, the errant reference to TCR2CLK is removed. [Correct name is TCRCLK]

  • Improved error message on pin transition regression tests failure such that on error, the actual channel name appears (E.G. "PWM" rather than "Channel 4")

V3.41B New Features and Fixed Bugs 
  • In the user manual (only) the following script commands are missing the critical "ChanNum" parameter.  Note that this is only a documentation issue, the script commands function properly. 


verify_chan_intr(ChanNum, Val);

verify_chan_overflow_intr(ChanNum, Val);

verify_data_intr(ChanNum, Val);

verify_data_overflow_intr(ChanNum, Val);

verify_illegal_instruction(ChanNum, Val);

verify_microcode_exception(ChanNum, Val);








  • In the channel window, the longest thread time is exactly half of what it should be. For instance, if system frequency is set to 100 MHz, and the worst case steps in a thread is 24, then the worst case thread time should be 480 ns, whereas 240 ns is being displayed (which is wrong.)

V3.41C New Features and Fixed Bugs 
  • Added a worst-case thread window.  This window tracks worst-case thread execution by channel and/or by function. Very useful for developing highly-optimized code.

  • Added script commands for writing/verifying 16-bit channl data (note that 16 bit data is a non-native, and using this data type will therefore result in generally slower code)

  • Added ability to clear the worst case thread indices using a script command. This is usefull when working to improve maximum latency by optimizing thread length.  This command solves the problem in which the initilization routines (which generally do not contribute to worst case latency) are the longest threads. This command allows the indices to be cleared following initialization like this.

// Initialize the channels.
write_chan_hsrr ( RCV_15_A, ETPU_ARINC_RX_INIT);
write_chan_hsrr ( RCV_15_B, ETPU_ARINC_RX_INIT);

// Wait for initialization to complete,
// then reset the worst case thread indices.

V3.41D New Features and Fixed Bugs 
  • When terminating a test using the exit() script command, no additional script commands are allowed to trail the exit() script, or a failure results. The failure does result, as it should, but the problem is that the failure does not result in a dialog message, making such a failure difficult to diagnose.

  • There was a demo version of the compiler that was generating demo code that would not load into a demo version of the simulator.  This compiler was shipped with some of the eTPU Programming books, and was available as a free download on the Byte Craft website.

  • Non-ASCII characters in several of the file types can cause the simulator to crash, and/or prevent further parsing of the text files.  Normally, a text editor will not generate non-ascii text, but leave it to microsoft.  For instance, non-ascii left/right quote characters (-108 and -109) are generated by microsoft WORD.  If these are pasted into notepad, then saved, then the result is a text file that contains non ASCII text.

  • Need a way of measuring cumulative code coverage from multiple test runs. (added script commands for loading/saving coverage information)

  • The following files were missing from the installation of the "Freescale Engine Demo."  These are required to actually run the demo, YIKES!


  • The dis-assembly shown for entry tables always displays correctly STANDARD/ALTERNATE but ONLY if the event vector tables base address is specified using the compiler's #pragma entryaddr 0x2800; or whatever.

  • Alternate/Standard event vector table is ONLY working on function 0.  In code builds with multiple functions it is NOT working, and is giving errant standard/alternate event vector table mismatch warnings. [NOTE:  previously Appeared to be working with compilers >= 2004-June]

  • Changing coverage script command for  [ETPU ONLY]!!!! :

    verify_all_coverage_ex(84.4, 90.95, 18.7);
    verify_file_coverage_ex("eTpuC_ARINC_rX.c", 84.4, 90.95, 18.7);
    verify_all_coverage(84.4, 90.95, 18.7);
    verify_file_coverage("eTpuC_ARINC_rX.c", 84.4, 90.95, 18.7);

( This was done to retain compatibility with TPU Simulator scripts )

  • When setting CPR to zero while thread is executing disables channel. if the Channel Priority Register (CPR) is zero, the thread will not start   executing. When the CPR is set to one, then a thread can execute (assuming there is a pending HSR, LINK, MRL or TDL event.) But if the CPR is set to zero for a channel that also happens to be executing when the CPR is set to zero, then the thread executes to completion ... which is good, this is the way it should and does work. But the problem is this. If a NEW HSR, LINK, MRL or TDL event occurs after the end of the thread, then is certain cases, the thread will not execute. The specific problem is that NEGATE SGL is ONLY called at the end of a thread. But since the CPR has been set to zero, then the SGL for that channel is never cleared. This fix is to perform an NEGATE SGL at times besides just the very end of a thread.

  • When verifying coverage for a file, a weird formula WAS being used. Each opcode is being counted once for every source code line in which it appears. Due to the parallelism of the eTPU instruction set, and also due to some slop in the cross referencing between source code lines and addresses, this means that some opcodes are counted several times.  The new formula will count each opcode one time when counting coverage on a file.

  • When verifying branch coverage using a script command such as the following: 

the branch calculations are not being calculated correctly.  Specifically, branch coverage should get 0% coverage if the branch has not been executed at all, and 100% if both branch paths (true & false) have been executed, and this is working correctly. The problem is with the 50% cases.  If only the 'true" path has been taken than the coverage is supposed to be 50%.  But instead it remains at 0%.  And if only the "false" path has been taken that then coverage is also supposed to be 50%, but instead a value of 100% is used. Note that in the visual interface (the red/green/blue/white boxes) it works per the specification.

  • Added an extended version of the file coverage command (adds entry coverage)

verify_file_coverage_ex("eTpuC_ARINC_rX.c", 84.6, 90.8, 18.7 );
verify_all_coverage_ex( 84.6, 90.8, 18.7 );

  • Changed (& fixed bugs) legacy commands to make them identical to TPU's

verify_file_coverage("eTpuC_ARINC_rX.c", 84.6, 90.8 );
verify_all_coverage( 84.6, 90.8 );

  • Entry coverage now working (previously it would always pass, even if entry coverage was not met)

  • Code coverage script would not work upon initial simulator reset.  Also, code coverage was always one code-load behind such that if a branch moved from address 0x100 to address 0x104 because of the code being rebuilt, you would have to load the code TWICE before the branch would actually work.

V3.41E New Features and Fixed Bugs 
  • In the "Global Time and Angle Counters" window, there is the number of remaining TCR1 ticks that much elapse before the next angle tick will occur (assuming normal mode.)  The possible range of values is 0..0x7FFF, but the field only displays from 0 to 0xFFF, such that valid bits 12 through 14 are never displayed.  To make matters worse, the display of bits higher than 9 are being truncated (set to zero) such that only the range of 0...1FF are displayed.  For example, if the true value is 0x4D1A, the displayed value is 0x11A.

  • Invalid ASCII Characters in script command file are causing a warning, and certain editors generate invalid ASCII characters.  For instance, there is only one valid ASCII quote character, yet WORD can generate several.  Also, the "degrees" character (ascii B0) is not valid, but is available on European keyboards.  Now there is a way to suppress the warning in the GUI, but the warning still appears in the report file (though the character is removed so as to not break the parser, which it was doing)

  • Increased memory size from 12K to 16K to switch to the REV-A part.

V3.41F New Features and Fixed Bugs 
  • In the "counters" window, certain references to "rotations" have been changed to say, "cycles" as this is the proper terminology (typical car engines rotate twice per cycle.)

  • Added the ability to display the current angle on the status bar

  • Added ability to run to a user-specified angle.

  • In opcodes where the SRC field is asserted used (SRC==0) such that the SR register is shifted right by one (SR=SR>>1) and also the conditional execution field is asserted {e.g. if( Z ) [AS/CE==100]} then the SR shift should only if the conditional resolves to true. The problem is that if the conditional resolves to false the shift should not occur, but instead it is.

  • In opcodes where the SRC field is asserted (SRC==0), the SR register should shift right by 1 (SR=SR>>1) and this works fine. The problem is that there are two cases where the lsb from an associated sub-instruction gets shifted into the msb of SR, and this is never occurring. Both errant cases are shift rights by one bit (e.g. mach=mach>>1.) There are two fields/values that generate this shift right, either (AS/CE==10110) or (SHF==01) Both cases are broken.

  • Added ability to step until the end of the thread.

  • Added ability to run the simulator until the next physical, IPH, or MSCNT generated tooth.

  • Added ability to run the simulator for a selectable number of physical, IPH, or MSCNT generated teeth.

  • Hot-key Bugs: Several letter keystroke combinations such as were also executed when the SHIFT key was also depressed, such as .

  • Angle Mode Feature: Improved clarity of "Global Time and Angle Counters" window.

  • Angle Mode Feature: Added TPR.IPH to logic analyzer buffer. This makes it much easier to debug IPH type stuff. (Note that TPR.MSCNT already exists as "TprDummyTeeth".

  • Angle Mode Bug: When exiting halt mode due to a tooth (physical or TRR) the Angle Prescaler is not being updated with the new TRR value such that any changes to TRR would not take affect until the second angle tick in a tooth, and the first angle tick used the residual value from the previous tooth.

  • The write_chan_mode(); causes an errant clear of the channel interrupt (CIS) (if it was set) It also clears any CIOS, DTRS, and DTROS (if any were asserted on that channel.) It has to do with writing a 1 to the CxSCR register's CIC field, clears the CIS field, making the read/modify write type operation invalid for this type of 'write 1 to clear' field (grumble, grumble.)

V3.41G and V3.41H New Features and Fixed Bugs (2006-Mar-1)
  • CRITICAL BUG: MRLE can be set by eTPU Code, even when MRL==1. (MRL==1) Should hold the MRLE latch in the "cleared" state (MRLE==0). The net-effect of this bug was that a new match could be scheduled prior to a previous match being cleared. Problem occurs on both action units (A/B).

>>>> AUTHORS NOTE <<<<<

  • The following are a slew of "SEQ" bugs fixed in this release. "SEQ" sub-instruction are things like conditional execution, indirect branch, call, etc. Despite the large number of fixed bugs in this category, the majority are relatively obscure combinations of adjacent SEQ opcodes with very specific (und generally not-useful) combinations of flushes. The large number of bugs is due to our uncovering of a whole class of untested and non-functional SEQ combinations. Most importantly, the Byte Craft C compiler does not appear to generate these specific bug scenarios.

  • On a no_flush dispatch jump instruction such as the following is broken:

    seq goto programCounter + p_31_24, no_flush;;
    #pragma verify_opcode 0xFFFFFFFF 0xFFFFDCF9

The destination address is off by 4 (one opcode.) Specifically, the destination addreess is four too low. Note that the address is correct if FLUSH is used. Note also that the destination is correct in certain much more complicated cases such as double sequential jumps/dispatches, etc. Go figure. 

  • On two contiguous SEQ opcodes (as shown below) if the SECOND seq is FLUSHED, the flush should be discarded, but instead is causing the next executed instruction to be flushed. Note that no known instance of this has been generated by the Byte Craft compiler.

   seq [any call, goto, dispatch-call, dispatch-goto, return], no_flush;;
   seq [any call, goto, dispatch-call, dispatch-goto, return], flush;; // <<-- Second flush

On a non-flushed call instruction followed immediately by a dispatch instruction, the dispatch instruction's destination should be calculated using the target address of the previous call. Instead of the PC, the address of the dispatch instruction itself was being used.

  • On two sequential non-flushed calls, the code flow was all messed up.

   seq call BadDoubleCallA_Dest1, no_flush;; // First Call
  seq call BadDoubleCallA_Dest2, no_flush;; // Second Call

The order of operations should be 1) First Call 2) Second Call 3) Address( BadDoubleCallA_Dest1 ) + 4; It was not doing this. In fact, it was ending up at a random address.

  • The "two-deep call" warning message was not working. Note that a single call can be quite efficient on the eTPU because there is a special "RAR" register for storing the call's return address. But two-deep calls are extremely inefficient and should almost never be used because the compiler must build a stack frame, for which the eTPU has no native support.


      Func3(); // THIS CALL IS VERY BAD!!!

  • Same situation on the no_flush dispatch call as above. The return address register is correct, but the call-destination is off by four.


  • Fixed the "Options, Messages" Dialog box as it was too big to fit on many screens, has no scroll bars, etc. Actually, it was not really fixed, just rearranged stuff so that all the important stuff is visible and un-important stuff is not.

  • Fixed loading/saving of cumulative coverage files. In certain cases, the very first opcode in a new block (from the COD file) is not being recognized as an opcode. To compound the problem, this internal simulator error is generating an errant message "unexpected end of file." Actually, a whole bunch of diagnostic messages need to be added and improved, such as file version mismatch, etc.

  • If a cumulative coverage script command (load/save) is called and the module parameter is invalid such that no matching code module exists, the script command executes without warning.

  • If there is a synchronization error in loading a cumulative coverage file, such that the code that generated the cumulative coverage file is different from the code that is in the simulator when the cumulative coverage file is reloaded, the generated error message gave no clue as the the real problem (like if somebody dribbles right by you the coach tells some other kid that the defensive lapse was his problem because he did not provide help.)

V3.42A New Features and Fixed Bugs (2006-Feb-25)
  • In the Freescale's Engine Demo "etpuc_FuelDriver.C" function, fixed several bugs and improved the documentation. This demo is included with the installation.

  • Added a verify_files(); script command that is used to compare two files for match, mis-match, non-existence, etc. This is helpful for periodically saving data to a file during a simulation run to compare against a previously generated set of "gold files."

  • Added ability to append to a pre-existing file when using the dump_file(); command.

  • Added various hooks for specifying the eTPU version (MPC5554-b, MPC5553, MCF5232, etc).

  • It was always possible to specify the amount of memory (CODE/DATA) in the eTPU model to match that of the actual eTPU in the microcontroller that would be used. The problem is that this involved editing the MtDt Build files which is an advanced topic. The MtDt Build file now supports the currently-available versions of the eTPU, and a fairly simple way of passing the eTPU version has been added. This is done via either the command line parameter or a #define specified in a dialog box.

  • he configuration window displays the DATA RAM size in 1K increments only. If the DATA RAM were configured (say) for 2.5K (Like the MPC5553) or 1.5K (Like the MCF523x) then a nuisance error message would appear, and the size would not be calculated correctly.

  • The ETPD field allows entry table to be selected based on output pin state, instead of just the default input pin state, and this was working correctly. The problem is that there are a variety of eTPU versions out there, and some of those versions do not support the ETPD field. The problem is that there was no way to specify the eTPU Version, so the ETPD field was always available in the simulator. The solution is that there is now a way to specify the eTPU version, such that the ETPD field is now available/unavailable depending on the version.

  • The ETPUSCMOFFDATAR field specifies the returned opcode when the SCM fetches an out-of-range opcode. In other words, say there is 16K of code memory, and an opcode is fetched at the 20K point. This 20K is beyond the end of the 16K of code memory so there is no actual code memory at this location. The ETPUSCMOFFDATAR is used to specify the opcode value returned for all such out-of-range fetches. There were several problems: 1) this register was not supported by the simulator at all. 2) not all eTPU versions have this register 3) in versions that don't have the ETPUSCMOFFDATAR register there is a specific value that out-of-range that should have been returned. All these scenarios are now properly handled by the simulator.

  • Improved the, "GOTO ANGLE" capability such that it is easier to go to a specific angle in the "next" cycle. The stop angle was changed such that if the desired Cycle/Angle has already been traversed, then the "Cycles" field is then ignored, and the simulation halts the next time that angle is reached (in either the current or next cycle.) [=Feature change, != BUG]

  • Changed the "Current Angle" display in the IDE's status bar such that the algorithm uses only the TCR2 register value, the TPR.TICKS value, and the user-specified angle indices (degrees per cycle). Previously, the incoming teeth and angle ticks were counted. [=Feature change, != BUG]

  • Added additional information to the channel window. When matching on TCR2, in angle mode, the angle is displayed in addition to the absolute TCR2 count. Otherwise, the DELTA between TCR2/TCR1 and the match value is shown. Similarly, the capture's angle or delta value is displayed.

  • TPR.TICKS being reset to an invalid value. Valid range is 0 to 0x3FF, but actual reset value is -1. This unexpected value was causing the entire TPR register to appear to be resetting to 0xFFFF. Also, if the TPR register was read prior to being initialized (not normally the case) it would read 0xFFFF. Functionally, it appeared to be correct, though.

  • Added to a new thread-step feature, such that you can go to the next thread of the currently-active channel (amazing how nice this feature is when debugging a complete system.)

  • In the Watch, Local Variable, and Function Frame windows, signed 24 bit numbers are always being displayed as positive. In other words, 0xFFFFFF is displayed as 16,777,215 whereas it should be displayed as -1 (because it is signed.)

  • In opcodes where the PRAM destination and the AU destination are the same register, the PRAM sub-instruction should "win" in that the PRAM should occur last. Instead, the AU is winning, and this is incorrect. For example:

// ForceOpcode ( 0xBDE7BA81 );;
au p = diob;
ram p = *((relative U24 *) 0x5);;

Note that the severity of the above bug is minimal because it is a nonsensical opcode.

V3.42B and V3.42C New Features and Fixed Bugs (2006-Aug-31)
  • There have been some problems with the Channel Hardwares' MRLE latches that should now be resolved. This is an extension of the critical bug fixed in the Version 3.41 Build G/H release. All bugs occur when a new match is scheduled, but the MRL latch is still set. If the newly scheduled match is for the future then the MRLE should still get set (and this was no longer occurring following the G/H release ... yup, we broke this.) On the other hand if the newly scheduled match was for the past, MRLE should never get set (we previously fixed this in the G/H release.)

  • Improved documentation on how to specify the eTPU version (MPC5554-Rev B, MCF5232-Rev 0, ...) via the "instantiate_target_ex1(...);" script command, MtDt Build Script Dialog Box, and file, "eTpuVersions.Dat."

  • In a script command file, the following sequence locks up the simulator due to an infinite loop.



  • Added a warning related to the above bug. The user is warned if a new match is scheduled prior to clearing an old match. The warning can be disabled in the Messages dialog box.

  • Numerous bugs associated with TRACING, listed below.

  • Two/three prefetches occur on each Time Slot Transition. These prefetches are a 32-bit fetch that preloads a value into the P register, and a 24-bit fetch(s) that preload the A and DIOB register. The problem is that these latter 24-bit fetch(es) are being shown as 32-bit fetches in the trace window and in any trace file.

  • In the trace window, it is difficult to determine the size of Rd's Writes, and Fetches. (fixed by adding size informatiion, e.g., Rd.24, Wr.32, etc)

  • The address of 24-bit accesses (reads&writes) was listed as double-even (0,4,8, ...) whereas the correct address is single odd (1,5,9, ...);

  • All 8 and 24-bit data writes were being represented as a 32-bit read, followed by a 32-bit write. These 8/24 bit writes are now shown as a single-cycle write.

  • Fixed a bug in which a test vector node name could be defined twice. In will now only allow a node name to be assigned once. On the a second node name rename attempt, an error message is generated and the vector file will be rejected.

  • Fixed documentation such that it should be to figure out how to rename signals that appear in the logic analyzer. For example, to assign the name, "AngleInput" to node "".

  • Fixed a problem that would cause the simulator to crash with certain (apparently unreleased) compiler versions.

  • Added a toolbar button for stepping to the end of the thread, or to the beginning of the next execution of a thread on the last-active channel (very handy!)

  • Added a demo for Freescale's eTPU Standard Driver's SET1 UART function.

  • Added a demo for Freescale's eTPU Standard Driver's SET1 Stepper Motor function.

V3.42D and 3.42E New Features and Fixed Bugs (2006-Sep-27)
  • In logic analyzer window, adding ability to drop a time into the waveform pane to perform a "GOTO TIME." Previously, a "time" had to be dropped into the itty-bitty "CurrentTime" field in order to perform this function.

  • Made multiple cosmetic changes to the parse-able trace files such that the file is more consistent and therefore more testable.

    • VAL field changed to be upper case (0x1a2b --> 0x1A2B)

    • SRL, SGL, CTR, TCR1, TCR2, variable length instead of fixed length (0x000000A3 --> 0xA3)

    • NUMBITS, CHAN, FREERUN, THREAD, PRIORITY PINVAL changed to hexadecimal instead of integer (16 --> 0x10)

    • BAD changed from bool to hexadecimal (true --> 0x1, false --> 0x0)

  • Added ability to disable tracing of the TCR1, but leaving tracing of the TCR2 counter enabled. This is handy in when doing stuff with trace files in conjunction with angle mode. Note that disabling tracing of the TCR1 counter results in a 141X simulation speed increase for the Freescale engine demo when combined with the removal of redundant divider lines (see below.)

  • Removed redundant divider lines from the trace. This can significantly improve the simulation speed, especially when logging of TCR1 increments is disabled. See above for measured performance improvement. It also makes the trace easier to read because the eTPU is generally idle, and this was causing tons of divider lines to dominate the trace display.

  • Removed a goofy trace record called "MatchCapture." This record was part event (match) and part capture, and was therefore not really a distinct, singular record. It is split into two distinct records;"Event" and "Capture" ... see below.

  • Added a trace record called "Event." This records one of the four possible event types, "HSR", "LSR", "MATCH", and "TRANSITION". It replaces, and extends to the rest of the event types the record "MatchCapture" (MACA in the parseable trace file.) Note that previously only a "MATCH" event was generating a trace record, now TDL, LSR, and HSR are also generating trace records.

  • Added a trace record type called "Event Clear." For the HSR event this occurs at the end of the HSR-handling thread. For a link, it occurs when the link is negated. For transitions, it occurs when the transition is negated. For matches it occurs when the match is negated.

  • Added a trace record type called Event Arm. It is only for matches, and occurs when MRLE is set.

  • Added a trace record type called "Capture." This replaces the trace record previously called "MatchCapture" (see above.) This new "Capture" record type is only for captures, and no longer goofily records matches.

  • Changed order in which records associated with a time slot transition are stored in the trace buffer. Intuitely, if seems like the Time Slot Transition occurs first, then the entry table address fetch, the read of a preload into P or DIOB. These records now are stored in the trace buffer in this order.

  • The thread-end address listed in the trace windows was off by 4 (4 too big) resulting in an inability to use the context capability between the trace window, source code window, and logic analyzer.

V3.50A New Features and Fixed Bugs (2007-Feb-14)
  • Added eTPU/CPU System Simulator to installation utility and product offerings.

  • Added ability to tag source code with print statements such that every time code associated with tag is traversed, formatted text including variables that are in scope appear as trace records in the trace window. The contents of the trace window can be streamed to an external file for post processing.

  • Added a full C++ preprocessor to the script commands file. This greatly enhances the power of the script files, though the specific purpose of this new feature is to support initialization of global variables. This is done as follows. The Byte Craft compiler supports a macro capability that results in a series of macros as shown below.


    __etpu_globalinit32(0x0004,0x71ABCDEF)     __etpu_globalinit32(0x0008,0x72000000)

Using the following macro expansion, it is possible change the above macros into a form supported by ASH WARE.

    #define _init_global_(addr, data) *( (u24 *) addr ) = data;

The eTPU Simulator then sees the following script commands which it can handle.

    *((ETPU_DATA_SPACE U32 *) 0x0000 ) = 0x70123456 ;

    *((ETPU_DATA_SPACE U32 *) 0x0004 ) = 0x71ABCDEF;

    *((ETPU_DATA_SPACE U32 *) 0x0008 ) = 0x72000000 ;

  • When using a Stand-Alone eTPU Simulator, when running in two eTPU mode (eTPU's running concurrently) the product imposed the demo limits on the product. This has now been fixed such that this configuration is accepted. Previously, the system simulator product had to be purchased in order to run in two-eTPU mode.

  • Execution of a format B5 or B6 that has a reserved ALUOP field (ALUOP==0x1f or ALUOP==0x0f) should result in the eTPU's illegal instruction flag (ILF) getting set (ETPMCR.ILF --> 1) but the ILF flag was not getting set. (Note that there are quite a few illegal instructions and most now do, but some still do not. We will fix this other ones in a future release.)

  • The "Step Over Function" key [F8] was not working correctly. It should jump over a called function to the next line of the current function. Instead it was jumping into every function and stopping at the first line of the called function ... basically it was working as the "Step Into Function" key [F7.] This is now working!

  • The "Step Out of Function" key [Ctrl-Alt-F8] was not working. It now works (when in a called "C" function it exits the function and stops at the first instruction of the calling function.

  • Breakpoints in ISR Script Commands Files (an ISR Script Command File associated with an interrupt and runs when the interrupt occurs) are deleted when the simulator is reset.

  • Where a multiple lines of source code generate a single opcode (due to the eTPU's parallelism) it is possible to add multiple breakpoints for the same address when toggling breakpoints.

  • Added script command verify_version() that is useful for warning user if an earlier version of the simulator is running than is required to properly run a test or demo.

  • Removed dependency on having all source code available when running an automated test suite (needed to run under IBM Rational.) IBM Rational instruments some of the code in such a way that the source code files are not available to the simulator, and this was preventing automated testing because an error message would result in a fault. A command line switch was added that suppresses this warning when running in the auto-run mode used for automated testing.

  • Fixed an issue in which the software will not install when it has not yet been paid for but is still within the payment window. This only occurs in an unusual set of circumstances. The software will not install in the entire "net" payment window, regardless of whether or not the software has been paid for.

  • Improved command line options which is an important part of automation, by adding two new #define tags that can be passed on the command line, as follows.

These cause #defines to be prepended to the script command file. Why is this useful? Say you want to launch a series of tests in the simulator, and you want the simulator to load the exact same project file and script file, but want each test to load different executable code. To do this, pass the following command line option when openning the simulator.
Then in the the following line to be prepended to the script command file.
     #define  EXE_NAME "test1.cod"
In the script command file, use the following command to load that executable into the simulator

  • Added the ability to generate multiple #defines from the command line. Previously, only the very first was recognized.

  • There are a number of parseable trace file changes.

    • Added the "Match Enable" (M.E. Bit) to the "ThreadStart" trace information.

    • Changed name of "Negate SGL" record from "nop" to "negsgl".

    • Changed name of "Capture" record from "match" to "capt".

    • Changed name of "Action Unit" record from "mc" to "unit"

    • Changed name of "Capture A Action Unit" field from "captureA" to "A".

    • Changed name of "Capture B Action Unit" field from "captureB" to "B".

V3.50C New Features and Fixed Bugs (2007-Feb-25)
  • In the print_to_trace(); action tag, if the terminating simicolon, ';' is missing, then the simulator crashes.

  • In some older compiler versions (for instance single stepping, breakpoints, and other things related to the .COD's line number to address table to not work. This is due to line number information that is not being read correctly from the .COD file.

  • Certain reserved instruction field values were not setting the Illegal Instruction Flag (ILF.) The following have now been fixed. TBS_A values 0xA, 0xB, 0xC, 0xD, 0xE; TBS_B values 8 ,9, 0xA, 0xB, 0xC, 0xD, 0xE; IPAC_A==6, and IPAC_B==6 now work correctly. Some others are still being fixed.

V3.50F New Features and Fixed Bugs (2006-Oct-9)
  • Simulator CRASH Bugs

    • The entire computer crashes when launching the simulator, especially when parameters are passed on the command line. This one was difficult to debug (thank you STZ!) but apparently valid code for generating a dialog box early in the launch sequence mysteriously began crashing the computer. This code had not changed in over a dozen years!

    • On application close on occasion a crash occurs. In at least one case, this has been fixed.

    • In print_to_trace() (executed via script or @ASH@ action tag), if the %s conversion character was used with a non-string argument, a crash could result. This case is now checked and an error issued if found.

  • When writing to the MACH register or the MACL register in a non MDU operation the MC flag is getting cleared. The MC flag should ONLY change on an MDU operation.

  • The MAC instructions (Multiply & Accumulate) has a pipeline such that a MAC instruction can be started one instruction before any previous MDU operation (Multiply, divide or another MAC) appears to be completed. This pipeline was not being correctly modeled such that one extra instruction was required between any MDU and the MAC. (Thanks team K!)

  • ECR.FEND is supposed to force a thread to end immediately. This is useful (say) if the eTPU gets stuck in an infinite loop. This was not working (the thread would continue indefinitely reminding us all, that shifting a 32-bit number by 32 bits is silly.) This has been fixed.

  • The remaining reserved instruction field values that were not setting the Illegal Instruction Flag (ILF) have all been fixed (thanks Richard!)

  • Improved/Fixed Scripting

  • Extended the at_code_tag(); script command to include a time-out capability and several verification options. The at_code_tag_ex(...); waits until EITHER a time-out occurs OR the tagged code executes. A verification error can be specified to occur on the time-out, on execution of the tagged code, or in neither case. See below.

at_code_tag_ex("ScheduleFallingEdge", 4.1, FAIL_ON_TIME-OUT);

at_code_tag_ex("ScheduleFallingEdge", 4.1, FAIL_ON_TAG);

at_code_tag_ex("ScheduleFallingEdge", 4.1, ALWAYS_PASS);

  • Fixed a bug in verify_val() wherein when variables of types smaller than 32 bits were compared to a constant, incorrect results could sometimes occur. These types included short, unsigned short, char and unsigned char.

  • Added support for system macros for use in print_to_trace() and verify_str() script commands, or anywhere symbolic lookup is supported (e.g. watch window). Currently two macros are supported - one that equates to the compiler version string (__COMPILER_VERSION__), and another that equates to the current simulator version (__MTDT_VERSION__). For example:

     print_to_trace("\"Using compiler version %s and simulator version %s\", __COMPILER_VERSION__, __MTDT_VERSION__");

     // @ASH@print_to_trace("Compiler version is %s\n", __COMPILER_VERSION__);

     verify_str("__MTDT_VERSION__", "==", "\"TPU Simulator, Version 3.50 Build D\"");

  • The verify_str() script command now supports the >= and <= operators. Since verify_str() performs a strcmp() operation on the resolved arguments, >= results in true when the strcmp() return result is >= 0, and <= results in a passing verify_str() when the underlying strcmp() return result is <= 0.

  • A verify_str_ex() script command has been added. It is very much like the verify_str() script command with the addition of a fourth argument - a length. The length is used to perform a strncmp() rather than a strcmp(), although an input of 0 length defaults back to verify_str() operation. Like verify_str(), verify_str_ex() supports the ==, !=, >, >=, <, and <= operators.

  • eTPU-C register types are now supported in MtDt symbolic processing - watch windows, print_to_trace(), verify_val(), write_val(), etc. In standard eTPU-C headers (etpuc.h), several register variables are exposed by default:

register_chan chan ;
register_erta erta ;
register_ertb ertb ;
register_tcr1 tcr1 ;
register_tcr2 tcr2 ;
register_tpr tpr ;
register_trr trr ;
register_chan_base chan_base;

Others can be defined per the eTPU-C syntax, for example:

register_diob diob;
register_mach mach ;
register_p15_0 p15_0; // lower 16 bits of p register

See the standard eTPU-C headers for details on the syntax of the register types. Once defined, such variables can be referenced in the watch window or symbolic script commands just like other variables.

print_to_trace("\"Current channel is %d\",

Note that write-only registers like link do not provide meaningful data.

  • eTPU-C provides a built-in type called chan_struct that allows access to such channel-specific settings as IPAC, OPAC, PDCM, TBS, etc. This symbolic access to channel settings has now been exposed in the eTPU Simulator. Typically, a chan_struct variable is defined in a standard header file (etpuc.h), e.g.

chan_struct channel;

This variable channel can then be used to access channel settings in the watch window, or script command such as print_to_trace() and verify_val(), with the syntax:


In addition to any chan_struct variables explicitly defined in the code, the Simulator always predefines a variable called ASHchannel of type chan_struct. Thus this special access is available even when the predefined headers are not used. When a chan_struct variable is accessed as described above, e.g.

print_to_trace("\"Current channel PDCM is %d\",

the value accessed is always from the current channel, as indicated by the chan register. There are times where it is useful to access channel fields for other than the active channel. The following script commands could be used to help test thread handling when both TDLA and a link service request (LSR) are set:

write_val("ASHchannel.TDLA", "1");
write_val("ASHchannel.LSR", "1");

As written above, they only apply to the current channel, or whatever the chan register is currently set to if no thread is active. Like function variables, the channel relative syntax can be applied to chan_struct type variables - @. Setting TDLA and LSR on channel 5, which for example we assume is named "P_IN" in the vector file, the script should be something like as follows:

write_val("@5.ASHchannel.TDLA", "1");
write_val("@P_IN.ASHchannel.LSR", "1");

Note that when writing channel settings, great care must be taken. For example, setting TDLB without setting TDLA may result in undefined behavior. Not all channel fields described in the chan_struct type definition are supported, and several additional ones have been added - the supported list is as follows:


Note that the fields FM0, FM1 and PSS refer to sampled values and thus only apply to the current channel and thread (time slot transition). PSS is re-sampled when the chan register is written.

  • the eTPU-C _Fract, fract8 and fract16 types, both signed and unsigned, are now supported in the watch / local variables windows and the symbolic script commands. The fract24 type was previously supported.

  • Added a warning that alerts the user that the CIN field is ignored in bitwise ALU operations such as OR, XOR, AND, BIT_SET, ... when an opcode is encountered that asserts the CIN field. Note that the CIN field corresponds to B-Bus-Src+1 and would presumably have been asserted if the user wanted a b-bus increment, but did not get it.

  • Fixed a bug in the script file line highlighting and stepping wherein the executed script file line and the highlighted line could get out of sync in the presence of preprocessor commands such as #if, #ifdef, etc.

  • Improved the code to source file line number mapping in the eTPU Simulator when using *.cod executables.

  • Fixed a bug wherein the use of the load_executable() script command could result in breakpoints being left lingering in memory.

  • Fixed a bug in the Options menu where the "Find Text, Again" was listed as whereas the hot-key is actually (Thank you Harald!).

  • The microcontoller type (MPC5554_A, MCF5232, etc) can be specified in two ways. Firstly, it can be specified in the Build Options dialog box. Secondly, it can be specified in when the simulator is launched on the command line by the -BD command line parameter. If it is specified in BOTH, the command line AND the project file, then the command line should take precedence. The bug is that the define in the dialog box was being ignored no matter what, not just when it is also specified in the dialog box. This has been fixed.

  • Code coverage was broken when used on code that contains a switch statement. The reason is that the Byte Craft compiler implements a switch statement using the "Dispatch-Jump" opcode. The "Dispatch-Jump" opcode jumps to a destination contained in a register, and since the register has a very large number of possible values, it was not possible to determine all valid destinations, and this branch coverage would fail on all switch statements. This has now been fixed!

  • If a micrcontroller version is specified in which the eTPU's SCM_Off_Register is not supported, and errant message appears when the project is first opens that indicates that the SCM off data has an incorrect value. Note that the eTPU subtype is specified either at the command line from within the MtDt Build Options ... dialog box. Also, the documentation regarding this is not particularly good, and has been improved.

  • When an existing project is already open, and a new project is opened, the "build script define" setting from the original project could "leak" into the newly-opened project.

  • Fixed a bug in which when an existing project is already open, an a new project is first opened, then the following errant message is generated: "An attempt has been made to configure the event vector table for vectoring based on the "Output Pin State" instead of the default "Input Pin State."

  • Fixed a bug in which the command line option, -BD, (specifies a #define that is passed into the build script) was not always being picked up correctly. Note that this command line option is used for specifying the eTPU Micro (MPC5554, MPC5553, MCF5232, etc.)

  • In version 3.50 the -ws1 command line flag was added to allow the suppression of source cannot be found warnings during autorun. A case was found where the suppression was not working, and this has been fixed.

  • Dis-Assembler Changes (Note that these changes affect the source code view when viewing mixed SRC-ASM, and also affect the output file when the assembly code is dumped to a file.)

    • The ALU has four flags, the 'Z', 'cFlag', 'N', and 'V'. The 'cFlag' had been often referred to as just the 'c' but this was confusing as there is also a 'cReg' and a CIN field in the eTPU opcode. This eliminates the confusion.

    • In the dis-asm view, reserved fields sometimes appeared as NOP's and in other cases the reserved fields were nil. Reserved dis-assembly is now more pronounced.

For example:

     au diob = p [RESERVED! ALUOPI==0x05] 0xe7;;

  • Dis-assembler showed an inverted b-bus on bitwise operations as being (B-Bus-Src-1) whereas (for bitwise operations) the CINV field is ignored so the proper terminology in this case is the '~' character. Note that the dis-assembler is used both in the mixed ASM-SOURCE window as well as when dumping a code image to a dis-assembly file.


    au a = diob | ~sr;;


    au a = diob | (-sr-1);;

  • Dis-assembler showed shifts and rotates incorrectly. Curiously, the eTPU instruction set supports only shifts/rotates by 2, 4, 8, 16 using ALUOP=0x19, 0x1A, 0x1B and ALUOPI=0x19, 0x1A, 0x1B, though a shift/rotate by 1 is supported in other ways. The dis-assembler showed these as being shifts/rotates by 2 (good,) 4 (good,) 6 (bad,) and 8 (wrong!)


    au a = diob << (1<<(sr+1));;


    au a = diob << ((sr+1)*2);;

  • Dis assembly AU sub-instructions were being generated, even if the affect of the execution unit was a NOP. This was cluttering up the dis-assembly view, making the code difficult to read. For example, in the dis-assembly shown below the destination register is NIL (not saved) and the Condition Code Save (CCS) is set to "Discard" so there is no affect of this instruction and it is essentially an AU-NOP.

au nil = ((U24) 0)+nil, DiscardFlags;

V3.60A New Features and Fixed Bugs (2008-Feb-28)
  • Added failure detection on the memory write script commands in which the user is notified on a failed-write. Note that this can be disabled in the "Messages" dialog box.

  • Added new eTPU model versions to support new silicon. These are the MPC5565, MPC5566, MPC5567, and the MCF5270/1.

  • Reserved bit at bit position 21 in formats D5, D6, and D7 is normally a one. But if is a zero, it is an illegal value and a illegal interrupt should get asserted. The problem was that no illegal interrupt was getting generated.

  • Added the ability to embed timers right into your source code. Then, once both the timer_start and timer_stop's have been traversed the time is available in the watch window AND a verification script command supports that the code traversal fell within specified a minimum and maximum range. Each timer is named, therefore there is no limit to the number that can be embedded.

  • In the Watch Window Insert Dialog box, there is a box that contains all the @Ash@print_to_trace information that was embedded into source code. This box rarely worked.

  • Files that consisted of assembly code only were not part of the source view, and thus could not be stepped through, etc. This bug has been fixed, and the mapping of generated opcodes / code addresses to source file lines has been improved.

V3.60I New Features and Fixed Bugs (2008-Oct-9)
  • Note: there are no significant differences between Build I and Build H. Build I's ETEC demo is slightly tighter and build I's demo limitation has been cleaned up a bit.

  • CRITICAL BUG: When moving a register's bit into the CCS's C_FLAG, and the A-BUS-DST is a NIL (see below) the opcode is being treated as a NOP. Note that there is a good likelihood that the Byte Craft compiler would never generate this opcode, but the ASH WARE compiler does (that is how we found it.)

alu nil = diob.bit(14) <<>> cFlag;;

// Opcode=0x1C3BFFC2

  • fixed a simulator bug in which bitwise operations (AND, OR, XOR, and AND-WITH-CLR (ALUOPI, 0x8 through 0x13) would fail when the ALUOPI value is zero. The case that is most relevent is the 'AND' as this may be used for clearing the upper, middle, or lower bytes of a 24-bit words, whereas the other operations are generally not used. The specific problem with the 'AND' is that the result would be a zero, such that all three bytes were getting cleared when only one byte should have been cleared.

  • Added support for ASH WARE's ETEC compiler's ELF/DWARF file format.

  • Added cross eTPU engine gates such that (say) the output pins of eTPU2 can be connected to the input pins on eTPU1.

  • Fixed the TRR register bits listing in the Global Counters window. Previously, it showed the register as being 18 bits wide (17...9) whereas it is actually 24 bits wide.

  • Fixed the name of the "Channel Frame" window. This window displays the channel variables (private variables for the specified channel.) The old name, "Function Variable" was misleading.

  • When loading a .COD file following loading of a .ELF file from the ASH WARE compiler, the .COD file would have code that was being interpreted as entry table because the .COD file's entry table type information was not being fully reset between code loads. This is now fixed.

  • The eTPU register set is now automatically exposed to the Watch Window and the print_to_trace() / symbolic script commands. The register names are as follows, and match the defined named registers of the ETEC C Compiler for the eTPU: _A, _B, _C, _D, _CHAN, _DIOB, _ERTA, _ERTB, _LINK, _MACH, _MACL, _P, _RAR, _SR, _TCR1, _TCR2, _TPR, _TRR, _CHANBASE, _P_31_24, _P_23_16, _P_15_8, _P_7_0, _P_31_16, _P_15_0, _P_31_0

V3.60J New Features and Fixed Bugs (2008-Oct-20)
  • no functional changes

V3.70A New Features and Fixed Bugs (2009-Jan-6)
  • The engine naming convention has changed to match the naming convention change made by NXP. In a two-eTPU engine configuration the nomenclature was eTPU1 and eTPU2. The problem was that NXP and STMicroelectonics developed a new eTPU named, 'eTPU2' and thereby creating a very confusing name clash. The new names for the engines are 'Engine A' and Engine B.' The names you see in the simulator have been changed to match these new names.

  • CRITICAL CHANGE! In a multi-engine simulation environment, scripts can be set to act on a specific engine. The thing is, the engine naming nomenclature changed in the ASH WARE provided MtDt Build scripts to match the new naming conventions used by NXP. This new naming convention avoids confusion between the existing eTPU and the new derivative eTPU2.

    eTPU_A.write_chan_base_addr ( HI_LO_CHAN, 0x300); 
    eTPU_B.write_chan_base_addr ( HI_LO_CHAN, 0x310); 
    etpu1.write_chan_base_addr ( HI_LO_CHAN, 0x300); 
    etpu2.write_chan_base_addr ( HI_LO_CHAN, 0x310);

  • CRITICAL CHANGE! Automatically-defined #defines within ISR script commands running on eTPU 'Engine A' and 'Engine B' have changed as follows:

    #define _ASH_WARE_ETPU_A_ISR_ 
     #define _ASH_WARE_ETPU_B_ISR_ 
    #define _ASH_WARE_ETPU1_ISR_ 
     #define _ASH_WARE_ETPU2_ISR_                                    

ASH WARE recommends that you search all your script commands files (*.ETpuCommand) and replace _ASH_WARE_ETPU1_ISR_ with _ASH_WARE_ETPU_A_ISR_ and _ASH_WARE_ETPU2_ISR_ with _ASH_WARE_ETPU_B_ISR_.

  • When running the simulator from the command line or from a batch file, and in multiple engine configurations (two eTPU engines) it is possible to specify the engine in which a script file gets loaded using a command line argument. But since the engine naming nomenclature changed, this caused a change in the naming of the command line arument that specifies the engine as follows:

    %EXE% -pProj.ETpuSimProject -seTPU_A@@Scipt.ETpuCommand

    %EXE% -pProj.ETpuSimProject -seTpu1@@Scipt.ETpuCommand

  • Added a 'exit' sub-menu item to the 'files' menu.

  • Added a 'Save Project File?' Message-Box query when shutting down from the GUI Only (does not affect regression testing.) This is REALLY nice when project files are saved with CVS because it greatly reduces the number of times that project files needlessly change.

  • Improved the simulation model description in the configuration window. Added a simulation model desceription as a status indicator in the applications main window.

  • Improved the code-generation tool description information in the configuration window.

  • Added an alpha version of our eTPU2 Stand-Alone Simulator Product. Alpha features are found below.

TCR1, channel logic and digital filters (both channel and TCRCLK) now have an option to run at full system clock speed, besides system clock / 2.NoChannels support unordered transitions: transition 2 can now be detected before transition 1.NoRelated to this enhancement, TDL1 and TDL2 can now be independently negated by microcode.YesAdded a new User Programmable Channel Mode: the blocking, enabling, service request and capture characteristics of this channel mode can be programmed via microcode.PartialMicroinstructions now provide an option to issue Interrupt and Data Transfer requests selected by CHAN. They can also be requested simultaneously at the same instruction.YesChannel Flags 0 and 1 can now be tested for branching, besides selecting the entry point.YesChannel digital filters can be bypassed.n/aScheduler priority-passing mechanism can now be disabled.NoNew Watchdog mechanism kills threads over a programmable timeout.n/aNew counter allows microengine load information collection for performance analysisNoChannels 1 and 2 (besides channel 0) can now be selected to control the EAC.NoTimebase prescalers are now reset when the GTBE input is negated, guaranteeing synchronization with eMIOS in all cases.n/aNew MISC flag indicates when an SCM signature calculation round is completed. This allows measuring of the average MISC scan period in a real application situation.n/aNew channel TDLEA flag allows TDLA blocking, making it fully compatible with TPU behavior.NoNew branch condition PRSS tells the pin state at the time when a channel (match or transition) service request occurred.PartialMRLE1/2 can now be negated independently by microcode.YesReading the Engine Base register via the new ABS-ALT field value.NoNew Engine Relative address mode allows a function to access SDM addresss space common to one engine, but distinct between engines.No

V3.80A (2009-May-6) and V3.80C New Features and Fixed Bugs (2009-Jun-1)
  • Note: build C is functionally equivalent to build A. Some minor improvements in ETEC support have been incorporated in 'C'

  • The ASH WARE C Preprocessor has replaced the use of the GNU cpp.exe C preprocessor. In some cases, the ASH WARE C Preprocessor is stricter. For example, when an invalid macro re-definition is encountered, this new C preprocessor issues an error, while GNU cpp.exe allows it and issues just a warning. Other minor compatibility issues may exist.

  • The Stand-Alone eTPU Simulation is unable to run a dual eTPU engine configuration in fully licensed (reverts back to a demo version.) This has been fixed.

  • If the Channel Flags are written using the P_31_24 register (FLC==4,5,6) and the p_31_24 register is written in the same instruction (via an ALU in format A4 or a RAM in any of the D formats) the p_31_24 value used is incorrectly using the new p_31_24 value. The simulator has been fixed such that the prior p_31_24 value is fixed. For instance, the following two instructions result in the ChannelFlag0 and ChannelFlag1 getting SET.

alu p_31_24 = 0xFF;;

alu p_31_24 = 0x00; chan ChannelFlag1 = p.bit(25), ChannelFlag0 = p.bit(24);;

  • The 'output pin delayed'/ 'output pin not delayed' setting has been removed from the Channel window. Note that this was part of a PTC setting in a very early eTPU version that was removed prior to any production release. This was a GUI issue only (since PTC was not implemented in the silicon it was also not implemented in the simulation model.)

  • The 'add and rotate 1-bit' sub instruction is not working when the CCSV field is set to SampleFlags8 or SampleFlags16. Note that it is believed that the BC compiler never uses this combination because rotates are difficult to generate in C so the compilers will generally not use this combination. (ASH WARE's ETEC compiler allows this via an intrinsic, shown below.) The problem is that the simulator was ignoring the CCSV field and (incorrectly) basing the rotate bits on the operation size. Note that operation size is only used when the CCSV field is quiesced or set to 24-bits.

int24 __rotate_right_1_b7_0(int24 v);

int24 __rotate_right_1_b15_0(int24 v);

  • The round robin scheduler is not returning to the beginning of the 7-slot cycle when no channels are active. Normally, the schedules to channels according to priority in the following pattern:


And this is working fine. The problem is when no channel requests servicing. The round robin is supposed to return to the beginning of the 7-slot priority cycle such that if multiple channels request servicing at the same time, the next priority to be services SHOULD be a high. Instead, the cycle is not getting reset, such that if the cycle ended on a medium, a medium priority channel would get serviced next.

  • The Entry Table Pin Direction field controls whether the input pin or the output pin is used for the PIN field in the entry table, and this works fine. The problem is when branching the the 'Sampled Pin State' (PSS). In turns out if the pin direction is set to use the output pin, then the PSS samples the output pin, whereas the bug was that regardless of the ETPD state, PSS always contained the input pin's sampled state.

  • The range check for 8, 16 and 24-bit RAM access script commands was strictly an unsigned check - thus any negative value resulted in an out-of-range warning.  The range check for these script commands has been fixed so that negative numbers that can fit in the number of bits in question pass without warning.

V4.00A New Features and Fixed Bugs (2009-Jul-1)
  • This is the Production release of our new eTPU2 Simulator!

  • The eTPU2 can run it's channel hardware at full speed. This is not working correctly in all cases and should not (yet) be used.

  • the eTPU2 can use channel's 0, 1 and 2 for engine position (angle mode) whereas the eTPU1 can only use channel 0. This is not working correctly in all cases and should not (yet) be used.

  • Address checking for verify_chan_data32 (which must be on a double-even address such as 0, 4, 8, ..) and verify_chan_data24 (which must be on a single-odd address such as 1, 5, 9, etc) was missing. Address validity checking for these script commands has been added, but disabled. To enable goto the Options, Messages, ..., dialog box and check the appropriate boxes under 'All Targets' towards the top left. ASH WARE RECOMMENDS ADDRESS CHECKING BE ENABLED AND ALL INVALID ADDRESSES BE FIXED.

  • When symbolic script commands (e.g. write_val(), verify_val()) reference channel frame variables using the @. syntax, there are cases when the simulator is not properly finding the variables and is incorrectly issuing an error such as "Error in write_val script command: bad lefthand expression". The same problem can occur when the '@' channel locator is used in the watch window. This has been fixed.  In the meantime, two workarounds are possible, 1) use non-symbolic write or verify commands instead, and 2) use a timing mechanism such as at_code_tag() to perform that write_val(), verify_val(), etc. at a known good time.  A known good time is when the function that contains the referenced symbol is running.

V4.00B New Features and Fixed Bugs (2009-Aug-11)
  • The Thread Statistics window operation has been improved so that thread names are properly found and displayed in more cases (thread name remains blank when not found).

  • The STAC Bus for exporting/importing time bases between eTPU engines on dual eTPU engine configurations is now supported. The STAC Bus can be configured in the Global Counters window and through the write_stac_*() script commands.

V4.00C New Features and Fixed Bugs (2009-Oct-18)
  • Improved robustness of the .ELF file loader such that certain problems in the .ELF files that previously caused a crash now (instead) cause a code-load failure.

V4.00D New Features and Fixed Bugs (2009-Dec-17)
  • Script commands write_chan_bitsXX(), verify_chan_bitsXX(), write_engine_bitsXX(), verify_engine_bitsXX(), write_global_bitsXX() and verify_global_bitsXX() have been added that allow the modification and verification of bit-fields in shared data memory.  The XX can be 8, 16, 24 or 32 and designates the size of the containing unit of the bit-field.  Arguments to the commands include a bit offset from the MSB of the containing unit, and a bit size.

  • Added write_global_dataXX() and verify_global_dataXX() script commands for completeness.  The XX can be 8, 16, 24 or 32 and represents the size of the data in bits.  The specified offset/address must be aligned properly for 16, 24 and 32 bit accesses or a script error will be thrown.

  • The enumerated type eTPU register REG_P has been changed to be associated only with the REGISTERS_U24 group, and thus can only be used by the write_reg24() and verify_reg24()  script commands.  Previously it was associated with the REGISTERS_U32 group.  This change may cause some minor compatibility issues, but must be done to ensure consistency.  Access to all parts the P register have also been added, with the addition of the following enumerated type register names:  REG_P_31_0 (32 bits), REG_P_23_0 (same as REG_P, 24 bits), REG_P_31_16, REG_P_15_0 (16 bits), REG_P_31_24, REG_P_23_16, REG_P_15_8, REG_P_7_0 (8 bits).

V4.30A New Features and Fixed Bugs (2010-Mar-26)
  • Support new software licensing mechanisms.  Besides the existing node-locked licensing scheme, network (floating) licenses and USB dongle-based licenses are now supported.

  • Added a -NetworkRetry command line option that allows a client computer to wait for a user-specified amount of time for a Network License to become available. If there is still no license available after the user-specified amount of time, then the simulator exits and any test is considered to have failed.

  • Fixed a bug in which the enty table would not load at address 0x4000 or higher. Note that the entry table can be loaded anywhere in the full 64K of address space as long as there is actually physical 'SCM' memory at that address.

  • Added eTPU2 model for part MPC5674

  • The (rarely used) REG_C enumeration syntax was not distinguishig between the REGISTER and the PLA FLAG.

Changed the REG_C enumeration to be REG_C_FLAG for the PLA's flag, (similar to Z, C, N, V)
Changed the REG_C enumeration to REG_C_REG (Similar to P, DIOB, SR, etc) 

V4.30B New Features and Fixed Bugs (2010-Apr-15)
  • Version 4.00C through 4.30A of the eTPU or eTPU2 Simulator will not load .elf files generated by ETEC version 1.20C or older. This has been fixed - older ETEC .elf files will now load.

V4.30C New Features and Fixed Bugs (2010-May-3)
  • Certain 24-bit memory read-modify-write commands are causing an errant modification to the upper 8-bits of the 32-bit memory location.

// Addition
*((U32 *) 0x84) = 0xBBBBBBBB;
*((U24 *) 0x85) = 0xFFFFF0;
*((U24 *) 0x85) += 0x13;
// This was not passing
// because of the upper byte, 'BB' was changing
verify_mem_u32(ETPU_DATA_SPACE, 0x84, 0xFFFFFFFF,                0xBB000003);

V4.31A New Features and Fixed Bugs (2010-Jun-15)
  • improved product documentation to include indexed PDF user and reference manuals.  These match the printed documentation that comes with the product (if so ordered).  ETEC and Simulator manuals are available from within the eTPU/eTPU2 Simulator's menuing system.

  • for network licenses the ability to check-out a license for an extended period while out of network contact with the network license server has been added.  The check-out (and check-in if needed) is accomplished through command line options to the MtDt Simulation product (e.g. ETpu2Simulator.exe) for which check-out is desired (shown below).  The License Reference Manual should be consulted for further details.

    • -networkCheckout= : Attempts to checkout a network license until the specified date and time.  The HH field is in 24 hour time.  No linking is done; only the license checkout.

    • -networkCheckin : Returns a checked out license to the network license server; only needed if returning the license early.

V4.31B New Features and Fixed Bugs (2010-Jul-12)
  • further improvements in product documentation

V4.31C New Features and Fixed Bugs (2010-Aug-13)
  • overhauled the demo installation and added demos for all 4 sets of Freescale standard eTPU functions. 

  • fixed installation of the 'Freescale Syntax' assembler manual. Previously when selectiong this manual from the Windows' menu, the 'ASH WARE syntax' manual would load instead.

  • supports a fully-functional trial version with a timout (instead of a limit on the code size) for both the network and the node-locked versions.

  • enhanced the source file search mechanism to improve the likelihood that source files are found automatically based upon debug information in the loaded executable.

V4.31E New Features and Fixed Bugs (2010-Oct-13)
  • minor installation improvements to enhance compatibility with Windows 7.

V4.31F New Features and Fixed Bugs (2010-Dec-22)
  • In some cases where a variable (or struct member, etc.) has a basic type that is typedef'd, its value will not show properly in the Watch window.  This error can also occur in the Local Variable window or Channel Frame window, but is less likely.  The problem has been fixed and the symbolic display logic now iterates through any number of typedef layers above a symbol of basic type.

V4.50A New Features and Fixed Bugs (2011-May-9)
  • The existing behavior verification capability has been vastly improved.  A new format (.EBV) for the pin transition data?has been introduced that is in .csv format for easy import into Excel or other tools.  During verification, users can specify tolerances and control which pins they want to verify. Expected pin behavior can be viewed in the logic analyzer, as well as a difference and error signal.

  • The address argument in the global data script commands was not allowing for a large enough range. The range was 0x0 to 0x1ff, but has now been corrected to 0x0 to 0xffff. The affected script commands are write_global_dataXX(), verify_global_dataXX(), write_global_bitsXX() and verify_global_bitsXX().

  • Extensions to the write_val() and verify_val() script commands have been added. The new commands are called write_val_int(), write_val_fp(), verify_val_int() and verify_val_fp(). Rather than taking the value (right-hand operand) as a string, they take it as an integer (U32) or floating point (double). This allows the user more flexibility in specifying this argument as it can now be a simple constant expression and can more easily take advantage of macro replacement. Additionally, the write_val_int() and verify_val_int() interfaces perform range checks on the value, based upon the size of the left-hand operand.

  • Fixed a long-standing issue wherein vector file waveforms could shift by 2 system clocks between the first run and later reset & runs. Vector operation is now consistent at all times.

  • Support loading Byte Craft .cod executables that have been compiled for an eTPU2 target (eTPU2 Simulator only).

  • Toggling a breakpoint while the simulation is running could generate an internal warning.

  • If the reset settings were "Do Not Reread Script File on Reset" it would not load the specified script file when in -Autorun mode. This has been fixed.

  • If the simulator cannot load a script in -Autorun -Q and -LF5 mode, the simulation now stops anyway, effectively defeating the ability to run the entire test suite to completion without stopping regardless of whether or not there is an error.

V4.60B New Features and Fixed Bugs (2011-Jun-29)
  • the installation now includes a command line version of the simulator that runs in console mode (no GUI).  This is handy to use for automated regression testing.

  • the eTPU2 Simulator now fully supports the new angle mode feature of being able to run the angle mode hardware from channels 0, 1 or 2.

  • the installer has been modernized, although it retains a similar look and feel.

V4.61A New Features and Fixed Bugs (2011-Dec-09)
  • Directing output to a log file (-q -lf5 options)  with the command line simulator was not working in most cases; it was going to stdout/stderr instead.  This has been corrected.

  • When running an eTPU module (rather than an eTPU2 module), the scheduler could sometimes run in eTPU2 priority-passing disabled mode.  This seemed to happen more frequently under the command line version of the simulator, but could potentially happen with either tool.  This has been fixed and priority passing cannout be disabled when simulating the eTPU, only the eTPU2.

  • During the generation of .EBV files (enhanced behavior verification) there was a chance that on internal buffer wrap a set of pin transition data would not be written out, thus causing a large gap in the saved out enhanced behavior verification data.  This has been corrected.  The workaround had been to resize the pin buffer using resize_pin_buffer() to a large enough size to avoid buffer wrap.

  • Upon verification error, the simulator reports the script file name and line number of the verification script command that failed, however, it would not properly display this information if the error occurred in an included file.  This has been corrected.

  • Certain DLL's that were required for the just-release command line version of the simulator were not being installed and for some customers this was preventing the (new and faster) command line version of the simulator from running.  This has been fixed.  (Note that many customers were not experiencing this issue because the DLL's get installed by many other commercial programs.)

  • Added the ability to break on any thread in a channel using the new 'Complex Breakpoints' 'Active Channel' breakpoint feature.

  • In certain cases use of the 'Mem Tool' was generating a spurious error that was crashing the simulator.

  • When a script verification error is encountered, the correct script file name and line number are now being reported even when the verification error occurs in an included file to the main script.  Previously, only the top file and line fo the #include were reported.

V4.70B New Features and Fixed Bugs (2012-May-23)
  • The Code Coverage screen in the eTPU Simulator showed source code lines coverage bases solely on a single assembly instruction associated with each line.  This could result in lines being displayed as fully covered even if the line was only partially covered.  A new 'partially covered' (orange) indicator shows source code lines based on all assembly instructions associated with that line of source code.  Note that this did not affect the verify_coverage script commands and also did not affect the display for assembly instructions (visible when viewing code in 'mixed assembly/source" mode.

  • The ASHchannel feature that was added some years ago has been only partially available in current versions of the eTPU(2) Simulator.  It has now been updated to work in all cases.  This feature allows channel hardware fields to be verified and written from the scripting environment.  For example, the script command "verify_val("@7.ASHchannel.TDLA", "1");" verified that the channel 7 TDLA flag is set.

  • The change in the last release to report the script verification error source from included files has some issues.  It causes some funny behavior in script stepping, and reports the wrong script file extension when the verification error is in the top script file.  The script stepping behavior has been returned to its previous behavior.  When stepping via script command onto a #include line that includes a file containing script commands, stepping by one script command at a time will stay on the #include line until all script commands in the included file have been processed.  When script errors do occur, the reporting has been fixed/improved.

  • The watch window and verify_val() script commands now support the address operator (&V) in order to view or test the address of a variable (global or local).  The returned address is always a global memory address.

  • Vector files are now passed through the C preprocessor before being parsed, which allows the use of #include, macros and other preprocessor directives and capabilities.

  • Path checking has been enhanced to better handle unix/linux paths.  No changes have been made to search order or list.

  • A new option under the Options -> Reset... dialog has been added that allows data segment initialization to be turned on in the eTPU target.  If the loaded executable file has a data segment, and the data load enable is set in this dialog, the data segment will be written to the SDM on load/reset.

  • The eTPU2 channel/DMA interrupt from current channel feature was not wokring correctly; now interrupts are generated from the proper channel.

V4.70C New Features and Fixed Bugs (2012-May-25)
  • no additional changes

V4.80A New Features and Fixed Bugs (2013-Jan-03)
  • When generating an assembly file 'DUMP' extra NOP's are added such that any jump destinations become valid.  This fixes an issue with assembling dumped files in that the destination labels were not generated when not in the range of the code being dumped.

  • Fixed a bug in which simultaneous write of the ertA/B register via an ALU and a CHAN read of the MatchA/B registers (as found below) would result in the CHAN source 'winning' over the ALU source.   In fact, the ALU value should win.  For example, in the example show below the ertA register should get a value of 0xCCC111.

alu diob = ertA;;

alu ertA = diob;

chan ertA = matchA, ertB = matchB;;

  • Fixed a bug in the simultaneous (same opcode) execution of a Read & Write of the match register.  The ertA and matchA are supposed to exchange values such that the ertA receives the original matchA value and the matchA receives the original ertA value.  Instead, the ertA value was staying the same, though the matchA value was getting updated.  Same goes with ertB and matchB.  This has been fixed.

  • save_trace_buffer() and dump_file() script commands were being ignored by the command line simulator (no files were being saved).  This has been fixed.

  • Fixed problem in which on the vector() script command,  if failed to find the vector file, the preprocessor errored such as "Cannot fine file" were being quitly accepted, no warnings message, error message, or whatever.

  • Fixed problem in which The vector() script command looks relative the CWD to find the vector file.  The file's is (if not fully specified) is now made relative to the project file.

  • Changed the GUI behavior slightly when loading a vector file.  If the file failed to load (say due to a 'parse' error of the file) the previously-loaded file is now retained.  Prevously, on a failure, the previous vector file was closed such that the simulator has no vector file and this was confusing.

  • Added an extended version of the print() script command, print_pass("Some Text") that can be used to print a message to the a dialog box WITHOUT generating and error on application exit.  The print() script command always generated an error. Why?  So that an automated test can use the print_pass("This is testing requirement"); to generate a message in their log file with the simulator is launched as such.

  • etpu_simulator.exe -q -ilf5MyLogFile.txt

  • Fixed write_reg16(, REG_RETURN_ADDR);  The problem was that the upper two bits in the RAR are not implemented in the silicon but the written value was being retained in the simulator.  For example, a write of 0xABCD should result in the RAR getting a 0x2ABCD.  Instead, the RAR was retaining the full 0xABCD.

  • Fixed verify_reg16(REG_RETURN_ADDR, );  The problem was that the RAR flat out could not be verified using this script.  It would basically fail in 65535 of the possible 65536 values, randomly passing on the last (random) case.  In other words, it almost always resulted in a failure, regardless of whether or not it should pass.

  • fixed the 'trace windows' display of 24-bit read and writes.  The most significant byte was incorrectly displaying 00 such that a write of (say) 0xABCDEF would dispay as '00CDEF.'  Note that the lower two bytes of the 24-bit reads & writes were displaying properly.

  • added support for accessing the condition codes via the symbolic script commands (and watch window).  A struct object called "CC" is now always created at code load time, so flags can be accessed with text like "CC.Z" or "CC.MN".

  • previously, ISR script command files could not run target-specific script commands (e.g. "eTPU_A.write_chan_data24()") - this is now supported.

V4.80B New Features and Fixed Bugs (2013-Jan-16)
  • Fixed a problem with stepping to thread end coming out of app-launch.  The simulator would run to the end of thread on channel 0 only and would and ignore all other thread-ends.  This is now fixed.

  • When loading an executable built by the ETEC compiler, if the global error handler source file cannot be found, no warning is issued (this warning would occur in the past if the end user did not have the appropriate compiler version installed).

V4.81A New Features and Fixed Bugs (2013-Sep-23)
  • In eTPU simulation versions that simulated the 'fixed' Freescale Errata 1846, the TPR.LAST bit is supposed to get cleared on the physical tooth, not on the 'PLL' tooth as the un-fixed versions do.  However, TPR.LAST was getting cleared on the PLL Tooth (concurrent with resetting of the TCR2 counter) regardless of whether the errata is fixed or not.

  • In just Mtdt Version 4.80 Build B, in certain simulation configurations, there are cases where TPR.LAST signal was not getting cleared at all  (and was staying set.)

  • Unable to enter hex digits ('a' through 'f') into the address field of the complex breakpoin7t's 'address' field.

  • Disabled errant message triggered in angle mode when TCR2CTL==6.  The user is (incorrectly) 7alerted that this is an invalid value.  Actually, this is valid and is used to disable EAC recognition of incoming edges on TCRCLK edges.  This mode could be used (say) to create a 'Limp' mode in which 'fake' crank teeth are generated by asserting TPR.IPH.

  • File names for behavior verification and code coverage script commands are now treated explicitly as being project relative.  Without the explicit reference, there have been cases where such files are written (or attempted to be read) from unexpected locations.

  • In ISR scripts, the ability to explicitly reference a target for a script command in a multi-target environment is partially broken.  For example, in a dual-eTPU model, ISR scripts running under eTPU_A can only access eTPU_A, while those running under eTPU_B can reference both eTPU_A and eTPU_B.  This is to be fixed in the next release.  In the meantime, in many cases a work-around is possible by making use of eTPU_B for cases where an ISR handler needs to reference eTPU_A.

  • The ISR script association commands are ignoring and target designation that goes with them, without producing any kind of error message.  These are the load_X_isr() and close_X_isr() script commands.  Until fixed in the next release, they must be run from the script loaded on the destination target in order to function correctly.

V4.82A New Features and Fixed Bugs (2013-Dec-03)
  • none

V4.82B New Features and Fixed Bugs (2013-Dec-15)
  • Previously Win 7 users could experience issues with some demos due to the demo installation location and file access permissions.  The work-around is to either (1) change the permissions on the demo directories located under the main program installation directory to full access for all users, or (2) copy the demos to a location that does not have access issues; the compiler demo Mk.bat build scripts will need to be adjusted to properly find the tools.  This release eliminates those problems.

  • When the simulator ran concurrently on the same PC, or across PCs but accessing the same script files, there were cases where the script file parsing could collide and result in a crash.  The C preprocessing software was updated to ensure that unique temporary files are always used to avoid such collisions.

V4.83A New Features and Fixed Bugs (2014-Feb-24)
  • none

V4.83B New Features and Fixed Bugs (2014-Mar-12)
  • none

V4.84A New Features and Fixed Bugs (2014-Jun-16)
  • none

V4.84B New Features and Fixed Bugs (2014-Jul-11)
  • the build define (e.g.. "MPC5554_B") is now automatically injected into the script command environment as a macro.

  • fix a symbolic debug issue where when reading/writing a struct/union member value, if the member had a typedef'd type, the read/write could fail.

V4.84C New Features and Fixed Bugs (2014-Sep-07)
  • Fixed a minor issue where a TPU bank rollover was errantly being reported even though a jump moves the PC away from the bank boundary.  The specific case occurred when the jump instruction was the second-to-last opcode in a bank.

V4.84D New Features and Fixed Bugs (2014-Oct-02)
  • A problem with setting and restoring some new settings resulted in spurious warning messages when both saving and restoring a newly saved project.  This has been fixed.

V4.86A New Features and Fixed Bugs (2015-Jun-24)
  • fixed an issue with the PWMC function of the Freescale set 3 DC motor control distribution.  Multiple channel instructions were optimizing into a single opcode, in a case where it turned out the functionality of the code depended upon them not combining.  The source code should have been written in such a way to explicitly prevent such optimization - that has been done so now.

  • added script commands to output more detailed information on source/object code coverage.

V4.86C New Features and Fixed Bugs (2015-Aug-03)
  • no changes

V4.86E New Features and Fixed Bugs (2015-Sep-02)
  • a script grammar parsing issue has been fixed that left open a loophole wherein script commands could have extra or missing closing parentheses without triggering an error.  This has been fixed, and so some lurking script issues may show up when moving to this release, or newer.

V4.87A New Features and Fixed Bugs (2015-Sep-20)
  • no changes

V4.87B New Features and Fixed Bugs (2015-Oct-07)
  • no changes

V4.87C New Features and Fixed Bugs (2015-Nov-01)
  • no changes

V4.88A New Features and Fixed Bugs (2016-Jan-05)
  • When a channel being serviced is disabled (priority set to 0) while executing a thread, in some cases the channel could get locked out from ever being serviced once its priority was re-enabled (stuck SGL bit) - this has been fixed.

V4.88J New Features and Fixed Bugs (2016-Jun-22)
  • The ability to resolve timer action tags in the Watch Window is broken.  The bug has actually been in the code since this capability was originally added, but it became uncovered with release 4.80A.  Note that the verify_timer_clks() script command does work properly as documented.

V4.89G New Features and Fixed Bugs (2017-Jan-11)
  • no changes

V4.89H New Features and Fixed Bugs (2017-Feb-02)
  • no changes

V4.90A New Features and Fixed Bugs (2017-May-02)
  • TCR1 at system clock rate is now supported (T2/T4 channel timing mode)

  • Threads Window Improvements : fixed two issues with the Threads window: 

  • Store on the earliest rather than the latest. (Makes resetting and re-running to worst case thread optimally fast.

  • Include the 'RAMS' in the Worst Case Thread Length determination such that two threads with the same number of steps but different number of RAMS are no longer considered to be the same length. Instead, the WCT with the most ram accesses is considered worst case. 

V4.91A New Features and Fixed Bugs (2018-Jan-01)
  • none

ASH2 Logo.png