excel workComplete a Revenue and Expense Budget (The Revenue and Expense Budget can be on separate sheets) that shows the detail of your projected income and projected expenses in 2021 and upload the Excel file. The Excel file should have all of the information needed and all formulas and reference cells should be there. Concise Labeling is encouraged in the assignment. Don’t forget to show your work! (In other words, let Excel do the calculations for you.) If you do them on a calculator offline, you will not learn how to use this tool. Doing. your work in Excel is part of the grade.COMPE 375 Embedded Systems Programming Outline § Traditional/embedded memory hierarchy § Memory types § SRAM/DRAM § ROM/EPROM/EEPROM/Flash § Memory types in AVR 2 COMPE 375 Embedded Systems Programming Hardware platform architecture 3 COMPE 375 Embedded Systems Programming Traditional Memory Hierarchies 4 l Why SRAM as Cache? l Why DRAM as main memory? l Why Flash as SSD? l Why HDD as Secondary storage? Speed Density Non-volatility & speed Price & density COMPE 375 Embedded Systems Programming Embedded Memory Hierarchy § Registers § Very fast, next to ALU, power hungry § Cache § Small, expensive, fast memory stores a copy of likely accessed parts § L1, L2, L3 § Predictability § Scratchpad memory § Main memory § Large, inexpensive, slower § Permanence § Non-volatile memories Processor Cache Main memory SSD Disk & Backup (Black box) Registers 5 COMPE 375 Embedded Systems Programming Memory Volatility § Volatile: § Loses contents when power is removed § Used for temporary storage of changing values: § Variables § Stacks § Non-Volatile: § Retains contents after power loss § Used for permanent storage of: § Programs § Constants § Look-up tables 6 COMPE 375 Embedded Systems Programming Read/Write vs. Read Only § Read/Write § Read & Write with equal ease and speed § Application: § Temporary storage § Usually Volatile § Read Only § New data cannot be written as easily or quickly as it is read § Application: § Program storage § Constants § Non-volatile 7 COMPE 375 Embedded Systems Programming Access Methods § Random access § RAM, DRAM, NOR Flash, byte access § Sequential access § NAND flash, block/page access § Direct (Hybrid random/sequential) access § Select track, rotation to sector access § Magnetic disk § Optical disk 8 COMPE 375 Embedded Systems Programming Volatile Memory § Register file § Fastest § But biggest size – built from D-FFs § SRAM: Static RAM § Memory cell uses flip-flop to store bit § Requires 6 transistors § Holds data as long as power supplied § DRAM: Dynamic RAM § Memory cell uses MOS transistor and capacitor to store a bit § DRAM scaling limit is around 55 nm, at which point the charge stored in the capacitor is too small to be detected § More compact than SRAM § “Refresh” required due to capacitor leak § word’s cells refreshed when read § Slower to access than SRAM Data W Data’ SRAM Data W DRAM R S R S R S D Q D Q D Q D Q OUT1 OUT2 OUT3 OUT4 CLK IN1 IN2 IN3 IN4 R S 9 COMPE 375 Embedded Systems Programming Static RAM (SRAM) § Each bit stored by a flip-flop § Volatile – need power to retain data § Maintains data as long as power is applied § Requires ~4-6 transistors per bit § Can be very low power when inactive § Typically <1uA at 3 V to retain contents 10 Example SRAM design COMPE 375 Embedded Systems Programming Cache § Designed with SRAM, usually on same chip as processor § Cache operation: § Request for main memory access (read or write) § First, check cache for copy § cache hit § cache miss § Design choices § cache mapping § Direct – each memory location maps onto exactly one cache entry § Fully associative – anywhere in memory, never implemented § Set-associative – each memory location can go into one of n set § write techniques § Write-through – write to main memory at each update § Write-back – write only when “dirty” block replaced § replacement policies § Random § LRU: least-recently used § FIFO: first-in-first-out Data Valid Tag Index Offset = V T D Tag Index Offset = V T D Data Valid V T D = 11 COMPE 375 Embedded Systems Programming Cache impact on system performance § Most important parameters in terms of performance: § Total size of cache (data and control info – tags etc) § Degree of associativity § Data block size § Larger caches -> lower miss rates, higher access cost § Average memory access time (h1=L1 hit rate, h2=L2 hit rate) § tav = h1tL1 + (1-h1)h2tL2 + (1- h1)(1- h2)tmain § e.g., if miss cost = 20 § 2 Kbyte: miss rate = 20%, hit cost = 2 cycles, average access time 5.6 cycles § 4 Kbyte: miss rate = 10%, hit cost = 3 cycles, access 4.7 cycles § 8 Kbyte: miss rate = 8%, hit cost = 4 cycles, access 5.28 cycles 12 COMPE 375 Embedded Systems Programming Dynamic RAM (DRAM) § Data stored as charge on a leaky capacitor § Charge determines state of switch § Charge leaks away § Must be refreshed § Only requires one transistor per bit 13 Example DRAM design COMPE 375 Embedded Systems Programming RAM organization § Stores large number of bits § m x n: m words of n bits each § k = Log2(m) address input signals § or m = 2^k words § e.g., 4,096 x 8 memory: § 32,768 bits § 12 address input signals § 8 input/output data signals § Memory access § r/w: selects read or write § enable: read or write only when asserted § multiport: multiple accesses to different locations simultaneously m × n memory … … n bits per word m words enable 2k × n read and write memory A0 … r/w … Qn-1 Q0 Ak-1 memory external view 4×4 RAM 2×4 decoder Q3 Q0 A0 enable A1 Q2 Q1 Memory cell I3 I2 I1 I0 rd/wr To every cell internal view 14 COMPE 375 Embedded Systems Programming Types of ROM § Factory programmed “Mask” ROM § Defined at time ROM is manufactured § Cannot be changed § Very low unit cost § User Programmable ROM (PROM) § Can be programmed just prior to use § Special device required for programming: § PROM Programmer 15 COMPE 375 Embedded Systems Programming Floating Gate NV Memories § EPROM, EEPROM § Read/write/erase single locations § Flash Memory § NOR – Code storage, fast, random access § NAND – Higher density, lower cost, sequential § Limited number of write/erase cycles § Flash erasure in blocks or pages § Flash read/write in bytes 16 COMPE 375 Embedded Systems Programming Erasable PROM (EPROM) § Programmable § Write electrically § Using a programmer § UV erasable (obsolete) § Shine UV light on chip § Erase chip via window § Can be re-programmed § Erases the entire chip § Uses 1 floating gate transistor 17 COMPE 375 Embedded Systems Programming EPROM Programming § Programming: § High voltage strands charge on a floating transistor gate § Byte programmable § Data read back: § Like DRAM, charge is stored on gate § Turns channel on 18 COMPE 375 Embedded Systems Programming Electrically Erasable PROM § EEPROM or E2PROM § Program and erase electrically § Fowler-Nordheim Quantum Electron Tunneling § Byte programmable and erasable § Uses 1 floating gate and 1 normal transistor § Often serial I2C or SPI a.k.a. “Serial PROM” Figure source: Microchip 19 COMPE 375 Embedded Systems Programming Flash Memory § Hybrid of EEPROM and EPROM § Uses Fowler-Nordheim Electron Tunneling like EEPROM § Byte programmable but block erasable Figure source: Jim Handy, Objective Analysis 20 COMPE 375 Embedded Systems Programming Comparison 21 COMPE 375 Embedded Systems Programming Other NV Memories § Other types emerging: § FRAM – Ferroelectric RAM § PCM – Phase change memory § More NV Memories § Battery-Backed RAM § Micron/Intel “Matrix” 22 COMPE 375 Embedded Systems Programming Characteristics of Different Memory Types 23 COMPE 375 Embedded Systems Programming AVR Register File § 32 8-bit registers § Mapped to address 0-31 in data space § Most instructions can access any register and complete in one cycle § Last 3 register pairs can be used as 3 16-bit index registers § 32 bit stack pointer 24 COMPE 375 Embedded Systems Programming Register File R0 R1 R3 R4 R5 R6 R26 R27 R28 R29 R30 R31 ••• 7 0 0x00 0x01 0x02 0x03 0x04 0x05 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F addr x register low byte x register high byte z register low byte z register high byte y register low byte y register high byte 25 COMPE 375 Embedded Systems Programming AVR Memory – FLASH § Non-volatile program space storage § 16-bit width § Some devices have separate lockable boot section § At least 10,000 write/erase cycles 26 COMPE 375 Embedded Systems Programming AVR Memories- FLASH – Memory Map 0x7FF Application Flash 0x000 ATmega 48 Application Flash Boot Flash 0x000 ATmega 88/168/328 0x1FFF 0x3FFF 0x7FFF 27 COMPE 375 Embedded Systems Programming AVR Memories – SRAM § Data space storage § 8-bit width 32 Registers 64 I/O Registers 160 External I/O Reg Internal SRAM (512/1024/2048×8) 0x0000 – 0x001F 0x0020 – 0x005F 0x00060– 0x00FF 0x0100 0x04FF/0x6FF/0x8FF External SRAM SRAM – Memory Map 28 COMPE 375 Embedded Systems Programming AVR Memories- EEPROM § Electrically Erasable Programmable Read Only Memory § Byte (8-bit) or word (16-bit) width § Requires special write sequence § Non-volatile storage for program specific data, constants, etc. § At least 100,000 write/erase cycles 29 COMPE 375 Embedded Systems Programming AVR Memory Programming § Flash § Program storage, where your code is stored § It is programmed during code upload § It is possible to dynamically program, but not preferred § Look into “Boot Loader Support” in the datasheet § EEPROM § What you will use in Lab 8 § You can write/edit/read individual byte locations during runtime § Program-related variables can be stored § The data will not be lost after power is lost § SRAM § Everything else you do dynamically during runtime is stored in SRAM 30 COMPE 375 Embedded Systems Programming EEPROM Programming § Two ways § Using EEPROM registers manually (Section 8.4 in datasheet) § EEAR – eeprom address regisger § EEDR – eeprom data register § EECR – eeprom control register § See page 25 for coding examples § Using “eeprom.h” library § Recommended way § Provides already defined libraries to read/write data in bytes and words § Example functions: § eeprom_read_byte(…) § eeprom_write_byte(…) § eeprom_update_byte(…) 31 COMPE 375 Embedded Systems Programming AVR Memories DEVICE FLASH EEPROM SRAM ATmega48A 4K Bytes 256 Bytes 512 Bytes ATmega48PA 4K Bytes 256 Bytes 512 Bytes ATmega88A 8K Bytes 512 Bytes 1K Bytes ATmega88PA 8K Bytes 512 Bytes 1K Bytes ATmega168A 16K Bytes 512 Bytes 1K Bytes ATmega168P A 16K Bytes 512 Bytes 1K Bytes ATmega328 32K Bytes 1K Bytes 2K Bytes ATmega328P 32K Bytes 1K Bytes 2K Bytes 32 COMPE 375 Embedded Systems Programming AVR Block Diagram 33 34 COMPE 375 Embedded Systems Programming Memory in an Embedded C Program § Memory in a C program includes code (executable instructions) and data § Code is typically read-only and executable § Data memory is non-executable, can be either read-only or read-write, and is either statically or dynamically allocated § In RAM-constrained embedded systems, the memory map is divided in to a section for flash memory (code and read-only data) and a section for RAM (read-write data) 35 COMPE 375 Embedded Systems Programming Flash: Code and Read-Only Memory § Code and read-only data are stored in flash memory § The beginning of the program (the lowest memory location at the bottom of the diagram) is the text section which includes executable code § This section also includes numerical values that are not assigned to any specific C variable called “literal values” 36 COMPE 375 Embedded Systems Programming Flash: Code and Read-Only Memory § The “data” section which contains the initial values of global and static variables § This section is copied to RAM when the program starts up § Example: § read_only_variable is stored in the read-only data section because it is preceded by the const keyword § The compiler assigns read_only_variable a specific address location (in flash) and writes the value of 2000 to that memory location 37 § When the variable x within my_function() is assigned the literal value 200, it references the value stored in a “literal pool” within the text section § A copy of the initial value, 500, assigned to data_variable is stored in flash memory and copied to RAM when the program starts COMPE 375 Embedded Systems Programming RAM: Read-Write Data § After the program starts running 38 RAM Flash Memory requirement of the entire C program The read-write data that is stored in RAM is further categorized as statically or dynamically allocated COMPE 375 Embedded Systems Programming Statically Allocated Data § Statically allocated memory means that the compiler determines the memory address of the variable at compile time § Static data is divided in two sections: data and bss § Data is assigned an intial, non-zero value when the program starts § All variables in the bss section are initialized to zero 39 § When the program starts: § C runtime (CRT) start function loads the memory location assigned to data_var with 500 § Copy the value from Flash to RAM § The CRT start function then sets the memory locations for bss_var0 and bss_var1 to zero which does not require any space in flash memory COMPE 375 Embedded Systems Programming Dynamically Allocated Data § The locations of dynamically allocated variables are determined while the program is running § Heap vs. Stack § The stack grows down (from higher memory address to lower ones) and the heap grows up § If memory usage is ignored in the design, the stack and heap can collide causing one or both to become corrupted § The heap is managed by the programmer while the compiler takes care of the stack 40 COMPE 375 Embedded Systems Programming Stack vs. Heap § The beginning of the heap is just above the last bss variable § To manage the heap: malloc() and free() § Variables that are declared within a function, known as local variables, are either allocated on the stack or simply assigned a register value § Whether a variable is allocated on the stack or assigned to a register depends on many factors § Compiler, the microcontroller architecture, number of variables already assigned to registers, etc. 41

Get professional assignment help cheaply

Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?

Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.

Our essay writers are graduates with diplomas, bachelor, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.

Why choose our academic writing service?

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

Get Professional Assignment Help Cheaply
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor’s, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
Why Choose Our Academic Writing Service?

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

How It Works
1.      Place an order
You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.
2.      Pay for the order
Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.
3.      Track the progress
You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.
4.      Download the paper
The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

 

PLACE THIS ORDER OR A SIMILAR ORDER WITH Essay fount TODAY AND GET AN AMAZING DISCOUNT

The post programming hardware platform architecture appeared first on Essay fount.


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"