[16 pts] You are tasked to design your own CRC hardware. a. [8 pts] Create a val
ID: 3591959 • Letter: #
Question
[16 pts] You are tasked to design your own CRC hardware. a. [8 pts] Create a valid 4-bit Pattern P, and then write a test 6-bit data chunk D, then show your work of calculating the FCS F to get your final transmitted bitstream T and work out the receiver's calculation to determine if there was an error or not. b. [8 pts] Draw the block diagram for the actual hardware to encode this CRC, and create a timing diagram (like we did on the whiteboard in class) where you show the values of your input, your output, and all of your shift registers as data is streamed into your hardware, and your final output bitstream is createdExplanation / Answer
As in the previous example, an explicit interface to this routine must be available to its caller so that the type signature is known. As before, this is preferably done by placing the function in a MODULE and then USEing the module in the calling routine. An alternative is to use a INTERFACE block.
Internal and Elemental Procedures[edit]
An alternative way to write the swap_real subroutine from the previous example, is:
In the example, the swap_e subroutine is elemental, i.e., it acts upon its array arguments, on an element-by-element basis. Elemental procedures must be pure (i.e., they must have no side effects and can invoke only pure procedures), and all the arguments must be scalar. Since swap_e is internal to the swap_real subroutine, no other program unit can invoke it.
The following program serves as a test for any of the two swap_real subroutines presented:
Pointers and targets methods[edit]
In Fortran, the concept of pointers differs from that in C-like languages. A Fortran 90 pointer does not merely store the memory address of a target variable; it also contains additional descriptive information such as the target's rank, the upper and lower bounds of each dimension, and even strides through memory. This allows a Fortran 90 pointer to point at submatrices.
Fortran 90 pointers are "associated" with well-defined "target" variables, via either the pointer assignment operator (=>) or an ALLOCATE statement. When appearing in expressions, pointers are always dereferenced
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.