ECE595, Hardware/Software Codesign, Professor Jim Plusquellic

ECE595, Hardware/Software Codesign, Professor Jim Plusquellic

ECE595, Hardware/Software Codesign, Professor Jim Plusquellic

Kanamu Pupuhi and Ian Wilcox, Fall 2011

Decision Tree Design

  1. We implemented the decision tree using the Master Register in Burst mode.
  2. The intended design was as follows:
  3. Use Burst Mode to read 100 (max is 128 or 4096 bytes) 32-bit words using a single Master Register read command in our state machine.
  4. Have a separate process to trigger off of Bus2IP_MstRd_src_rdy_n AND Bus2IP_MstRd_sof_n to load our data array as a type data_array is array of std_logic_vector (0 to 31).
  5. When the end of data read frame is triggered (Bus2IP_MstRd_eof_n) then have a 100 Adder circuits with a Generate statement to do a concurrent decision process.
  6. Then write the result right back to our data array.
  7. Loop until 1000 lines are read and then generate an interrupt. Write the values back through the slave registers.
  8. We were having issues with trying to write back a 100 words to the data array or slave register, did not have time to troubleshoot which it is. During troubleshooting we changed the burst length to 10 instead of a 100, but not sure if that helped us any.

Lessons Learned on Microblaze/EDK/LabVIEW interactions

  1. Scanf was very temperamental when writing from LabVIEW to Microblaze. Formatting was extremely important when doing %u versus %d.
  2. Also xil_printf should be better investigated; it seemed we had issues with using %u versus %d as well.
  3. Need to be mindful on the size of the data word, ultimately easier to just store it as Xuint32 if going to be communicating on the PLB. Including using bit –wise operators such as shift operators.
  4. When making changes, such as xil_io_in8 to Xil_In8 in the C header files as well as the *.c file of your peripheral; be sure to make the changes in the following folder: <Project_Name>\drivers\<Peripheral_Name>\src
  5. By “Cleaning Libraries” XPS will reimport the files from src to where it wants it.
  6. Need to change the following for XPS version 12.4:
  7. xil_io_in8  Xil_In8
  8. xil_io_in16  Xil_In16
  9. xil_io_out8  Xil_Out8
  10. xil_io_out16  Xil_Out16
  11. If having issues with errors in XPS, try the different combinations of CLEAN: Hardware, Software, Libraries, Project, or Program.
  12. If using Interrupts in your design, they need to be connected before Building, so that the header files will have appropriate variable names. In general interrupts can be tricky because if something is not configured properly, then it will build completely without errors but may not work because it your peripheral was never tied to the xpc_intc controller or IRQ to the Microblaze.
  13. Putty is the best resource for troubleshooting; it doesn’t have the need for verification. It just reads all data it is sent with the printf commands on Microblaze.
  14. Always Synthesize design in ISE before importing peripheral into XPS, for one it is quicker, and two, XPS sometimes may let things build anyway. Doing just a Syntax check does not look for multiple driver instances when you are writing to a port from multiple processes.
  15. If you need a “wait” in the Microblaze, use a for (i = 0; I < 1000; i++); but you also need to disable optimization by right clicking your project in XPS under the Applications Tab and “Set Compiler Options.” On “Debug and Optimization” tab, Set “Optimization Level” to No Optimization.