r description and register below, answer the following questions: (20) ys. Using
ID: 3903378 • Letter: R
Question
r description and register below, answer the following questions: (20) ys. Using the deseripto 63 0 Buffer address Reserved Length Command Error Status 63 56 55 40 39 24 23 . 8 7 0 Status flags 0000b: No activity 0011b: Descriptor Done 1100b: End of Packet 0-3 4-7 Reserved Command flags 0000b: No activity 0011b: Load Descriptor 1100b: Clear Interrupt 0011: Start transmit 1100: Compute checksum 0-3 4-7 8-15 Reserved a. Construct the struct in C that would define the descriptor. Assume the device is little- endian. b. Write the code to fill out the descriptor with the following settings: a 1Kbyte buffer of pinned memory, set the length field, clear the status field, and start transmit along with computing the checksum.Explanation / Answer
strucyt BufferAddress {
struct Status {
activity:4;
Reserved:4;
}st;
int Error:16;
struct command
{
int Activity:4;
int transmit:4:
int Reserved:8
} com;
int Length:16;
int Reserverd:8;
}
BufferAddress b;
b.Length= 1024;
b.st.activity = 0;
b.st.Reserved= 0;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.