Hardware Simulations - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Hardware Simulations

Description:

Hardware should not limit progress. Write your control software, ... or drivers to SW-simulated HW, or drivers to interim hardware. ... Hardware treated ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 22
Provided by: msresearch
Category:

less

Transcript and Presenter's Notes

Title: Hardware Simulations


1
Hardware Simulations
  • The boundary of software

2
What does a hardware interface do?
  • Takes values originating in software, and affects
    hardware

Java
Main program
Interface method
Driver
Byte value 0x04
0000 0100
int myValue 4
3
Another way
all drivers for this Interface produce identical
data
  • Card swipe

HW
ID 4675 Location 06 11082005 121600
Mary Smith SW Exit 11/08/05 121600
0146750206031108200504121600..
Interface interprets driver values
Hardware
Driver turns raw hardware values into useable
values
4
Multiple Input Devices
ID 4675 Location 06 11082005 121600
card
0146750206031108200504121600..
Mary Smith SW Exit 11/08/05 121600
ID 4675 Location 06 11082005 121600
file employee6.txt 0206031108200504121600..
Hardware
Interface interprets driver values
Driver turns raw hardware values into useable
values
5
Simulation
its own thread
Mary Smith SW Exit 11/08/05 121600
ID 4675 Location 06 11082005 121600
Pretend software that acts like a fingerprint
file employee6.txt 0206031108200504121600..
Interface this does not change
A real driver, OR a driver that is targeted at
the fake hardware
SW acting like Hardware
6
Simulated drivers
all drivers for this Interface produce identical
data
HW (port)
ID 4675 Location 06 11082005 121600
all drivers for this Interface produce identical
data
no HW
ID 4675 Location 06 11082005 121600
SW
7
Typical I/O
sensor
Software
motor
8
Typical I/O
driver takes on or off command, turns on
motor via hardware interface
Software
interface takes left to mean activate motor 2
Sensor detection changes 0 to 1 in driver
provided by interface manufacturer
interface notes presence or absense
Your software decides to avoid barrier by going
left
9
Hardware should not limit progress
  • Write your control software, gui, data handling
  • Write clean interface modules to the drivers.
    Define data in these modules the way the control
    software needs them.
  • Write fake drivers, or drivers to SW-simulated
    HW, or drivers to interim hardware.

10
Inputs
Fake Driver - faking hardware
Your Main Code
Interface - Convert Driver Signals
Real Driver
sensor
11
Outputs
Fake Driver - faking hardware
Interface - Convert to Driver Signals
Your Main Code
Real Driver
12
hardware setup
13
Interfacing hardware to a Tablet PC
  • from Measurement
  • Computing

14
..to AC power
  • from StarMagic

15
to Lights and Sound
16
Memory Mapped I/O
  • A simple scheme where an area of memory
    "parallels" an I/O port
  • Write to the memory, change the bits on the port.
  • Inputs to the port are reflected in real time in
    memory.

17
I/0 Memory
Data Memory
Program Memory
Fast Specialty Memory
18
Memory Mapped I/O
  • A hardware scheme that requires wiring memory to
    the outside of the computer

19
Words in Memory
Memory Mapped I/O
FF
C4
01
A2
4
5
6
7
A2
01
C4
FF
0
1
2
3
Hardware Interface
Terminal for External HW Connections
20
Advantages
  • Hardware treated as bytes in memory
  • Manufacturers provide drivers that do no more
    than accept / provide bytes

21
The Computer Memory Model
  • The memory map STILL provides the basic
    addressable structure for the hardware designer
  • We will explore the memory map after Spring break
    (with small assignment 3)
Write a Comment
User Comments (0)
About PowerShow.com