Uploaded by Mintu Kumar

Lab Homework: Formula Implementation on Processing System

advertisement
LAB_HW1
Name : Mintu Kumar
Rollno. : 2022296
group members: Aman Kumar(2022060), Saumya Trivedi(2021198), Pankaj
Yadav(2022347)
Q1:
Implementing the given formula on a Processing System (PS).
1. Assume Input Vectors
X, T, and N are vectors of size 3.
Each vector will be input by the user during execution.
2. Steps for Implementation
Step 1: Input Handling
Prompt the user to enter three values for each vector X, T and N.
Validate the input, ensuring no zero values in T to prevent division by zero.
Step 2: Calculation of Q
For each element in the vectors, compute:
For each element in the vectors, compute:
X/T
LAB_HW1
1
2⋅N
T
​
​
Add the two computed terms to get Q[ i ].
Step 3: UART Output
Send the computed values of Q for each element via UART for display.
4. UART Communication
Use UART communication to display the results of Q . This involves:
Configuring UART for data transfer.
Sending the results as strings or formatted output.
5. Error Handling
Include checks to ensure no division by zero in the calculation.
Provide error messages for invalid inputs via UART.
code:
LAB_HW1
2
Block diagram:
LAB_HW1
3
Outputs:
LAB_HW1
4
Download