Docsity

CSCI 513 Assignment 3: PCI-DAS08 A to D Driver - Prof. Philip A. Nelson, Assignments of Operating Systems

Toggle sidebar
bg1
CSCI 513 – Spring 2008
Systems Programming and Operating Systems Internals
Assignment 3, 400 points
Due: Wednesday, May 13, 2008.
From what you have learned from your ā€œtoyā€ device driver, it is now time to
do the complete PCI-DAS08 A to D driver.
•It is a PCI device!
•Your /dev entry should be /dev/das0.
•It should allow only one process to open it at a time.
•You should have a default rate and channel that is reset on a new open().
•Read() should return an integral number of ā€œsamplesā€. (Each read should
return a multiple of 4 bytes.) Each sample is returned as a 4 byte integer
value. The most significant two bytes is a 16 bit integer representing the
time offset from the interrupt for when the sample was taken. The value
should be in units of 10āˆ’6seconds. The least significiant two bytes is the
12 bit data value. If no data is available and the driver is sampling, the
user process should block until there is at least one sample available. It
should return EOF (zero bytes read) when there is no more data in your
driver’s buffer and the driver is not sampling.
•Write() returns ENODEV.
•Implement an ioctl call for ioctls in the file ∼phil/public/cs513/dasio.h.
The rate in ā€œset rateā€ and ā€œget rateā€ is in units of 10āˆ’5seconds. Channel
numbers are from 0 to 7.
•The program ∼phil/public/cs513/osc.c will be used for demonstrating your
driver.
Please turn in a printed copy of your source code for your device driver plus
a ā€œdiff -uā€ of any files you modified. Also, send me in e-mail all your sources
for your das driver. We will use part of the class period for individual demos of
your driver. Students with late assignments will have to make an appointment
to demo their driver.
1

Partial preview of the text

Download CSCI 513 Assignment 3: PCI-DAS08 A to D Driver - Prof. Philip A. Nelson and more Assignments Operating Systems in PDF only on Docsity!

CSCI 513 – Spring 2008

Systems Programming and Operating Systems Internals

Assignment 3, 400 points

Due: Wednesday, May 13, 2008. From what you have learned from your ā€œtoyā€ device driver, it is now time to do the complete PCI-DAS08 A to D driver.

  • It is a PCI device!
  • Your /dev entry should be /dev/das0.
  • It should allow only one process to open it at a time.
  • You should have a default rate and channel that is reset on a new open().
  • Read() should return an integral number of ā€œsamplesā€. (Each read should return a multiple of 4 bytes.) Each sample is returned as a 4 byte integer value. The most significant two bytes is a 16 bit integer representing the time offset from the interrupt for when the sample was taken. The value should be in units of 10āˆ’^6 seconds. The least significiant two bytes is the 12 bit data value. If no data is available and the driver is sampling, the user process should block until there is at least one sample available. It should return EOF (zero bytes read) when there is no more data in your driver’s buffer and the driver is not sampling.
  • Write() returns ENODEV.
  • Implement an ioctl call for ioctls in the file ∼phil/public/cs513/dasio.h. The rate in ā€œset rateā€ and ā€œget rateā€ is in units of 10āˆ’^5 seconds. Channel numbers are from 0 to 7.
  • The program ∼phil/public/cs513/osc.c will be used for demonstrating your driver.

Please turn in a printed copy of your source code for your device driver plus a ā€œdiff -uā€ of any files you modified. Also, send me in e-mail all your sources for your das driver. We will use part of the class period for individual demos of your driver. Students with late assignments will have to make an appointment to demo their driver.