This project would define a hardware abstraction of the purplebox, and using that abstraction create a simulation of the purplebox at the level of the hardware abstraction. This would allow students to debug purplebox programs without needing to be physically next to a device. There is a real need for simulation of hardware at the functional level of the software API anytime that you are developing software to run on hardware being developed concurrently. You can not wait until the hardware is fully functional to start software development. The initial stages of software development and testing will have to be done against a hardware simulation implemented in software entirely, simplified hardware, or a mixture of both. The creation of this simulation is often a small, or significant, development project in itself.
Application developers would code to a hardware abstraction layer (HAL) API. There will be two versions of the software: real and simulated purplebox. An application should be able to select its environment (real or simulated purplebox) during startup. Any calls to the simulated purplebox would be handled entirely in software. The project would simulate as many aspects of the purplebox hardware as possible. The real purplebox version would be functions working directly with the hardware. The HAL API that you design should simplify aspects of purplebox usage, such as, working with the D/As and A/Ds. This would make it easier to build purplebox applications.
For the simulated purplebox, there will be a simulation side (SIM) API that allows the developer to programmatically get access to the values output by the hardware, and set the values that the hardware would read in. This would be the same interface that the simulated purplebox user interface would use to display the state of the simulation and allow the user to provide simulated input.
Some features that could be considered for the purplebox simulator are listed below. The exact set of features will be decided through discussion with the instructor.
A zipfile containing the following: