BYTE.com
RSS feed

Newsletter
Free E-mail Newsletter from BYTE.com
Email Address
First Name
Last Name




 
    
             
BYTE.com > Features > 2007

Designing and Debugging ROM-based Code

By Arvind Chauhan

April 9, 2007

(Designing and Debugging ROM-based Code :  Page 1 of 1 )



It's difficult to think of an embedded device that doesn't contain any type of memory. Lowering costs and increasing densities have made memory use in today's system designs very generous. More memory is provided to let software consume it all up in the name of more features and personalities, and of course, more bugs to debug. Commonly found memory types in systems include ROM, SRAM, DRAM, PROM, and flash.

The moment your PC game execution starts choking, the blame is "not enough RAM." Much of the code is executed out of RAM. SRAM (static random access memory) is faster than DRAM (dynamic random access memory), and hence, costs more. RAM retains data as long as power is applied, and DRAM in particular, needs to be refreshed regularly. Typically, SRAM is available in limited sizes while DRAM can more easily be scaled to fit the system.

ROM, on the other hand, can retain data, even when power is removed. Many ROM variants are available, including OTPROM (one-time programmable read-only memory), EPROM (erasable programmable read-only memory), and EEPROM (electrically erasable programmable read-only memory).

Many system-on-chip (SoC) designs contain both ROM and SRAM. This ROM is usually hardwired or masked ROM. The ROM is mostly used to store the first-order boot-loader program. After reset, ROM is usually mapped to the address from where the main CPU starts fetching instructions. A second-order boot loader or the main program can then be downloaded from an I/O interface. As ROM is fast, it can also be used to store the critical and well-tested library of important routines. Such routines typically don't change during the system's lifetime.

In ROM, software becomes hardware. The content can't be changed once the chip is manufactured. This "read-only" nature mandates a thorough debug of ROM code. You can't debug ROM-based code once the chip is manufactured using traditional debug techniques, namely putting breakpoints and watching the system state. There's very little you can do even after the bug is traced in ROM code.

 Page 1 of 1 


BYTE.com > Features > 2007
Dr. Dobb's Media Center
BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE: Volume 2 - Heuristic Algorithms
The Best of BYTE: Volume 2 - Heuristic Algorithms
In this volume of Best of BYTE, we explore the emergence of some heuristic algorithms. Although we have only scratched the surface of this intriguing subject, we hope we've suggested the potential of the synthesis of heuristics and algorithms.

© 2008 Think Services, Privacy Policy, Terms of Service, United Business Media Limited
Site comments: webmaster@byte.com
Web Sites: BYTE.com, dotnetjunkies.com, Dr. Dobb's Journal, SD Expo, Sys Admin, sqljunkies.com, Unixreview



MarketPlace
IT Service Management that Delivers. Real Value. Real Flexibility. Real Results. Free Demo.
Automatically capture customer crash data, no debugger required. Support for .NET, C++, OS X, Java.
One Stop to Buy All Your Business IT Solutions. Browse Through Dell's Best Deals Online Now!
Find Scalable and Secure Dell� Network Server Solutions at Dell� - Official Site.
Advance Your Business Technology Now with the Thin and Portable Business Solutions at Dell.com Now!
Wanna see your ad here?
 

web2