Lab FAQs

Lab6
  • None.
Lab5
  • None.
Lab4
  • Make sure barrierSrcDestOut is spelled properly in Barrier.v. There was a typo in the starter files.
  • My software barrier works on risc_3.bit but not on risc_13.bit. Double-check the grading feedback on your lab2 submission to make sure you have fixed any bugs we noticed in your hardware broadcast implementation. Also, if you're using a lot of xprintf statements to debug your software barrier, your code may be failing on risc_13 because test1 isn't waiting long enough before considering your program deadlocked. Try increasing the sleep time. Search for 'some bugs show up as deadlock' in beehive_main.c to see where to make the change.
Lab3
  • I'm getting a compiler error "insn does not satisfy its constraints." Several students have run into this error when they used a large array in their TSP program. The problem seems to be related to storing the data on the stack. Try dynamically allocating the memory on the heap instead, using malloc and free. I.e. int *big_array = (int*) malloc(sizeof(int)*10000);
Lab2
  • I'm having trouble with Task 2. Run git pull again to make sure you have the most up-to-date code. If still stuck, here's a hint: look at how hw_bcast_send forms a message. While the hardware broadcast can send a single message to all other cores, the software version will need to send a message to each of the other cores.
  • What are the core numbers of the cores that application code runs on? Cores 2 through enetCorenum()-1 (inclusive) are application cores. When you're working on the hardware broadcast, it may be more convenient to think of this as Cores 2 through copyCore-2 (inclusive).
  • Hint for Task 3: note that SlotTypes 1 through 11 have already been reserved for specific functions in the hardware.
Lab1
  • I'm having trouble getting my code to compile in Task 4. My tsp function can't be found. This task requires you to create a C program comprised of two files. Your tsp function is defined in beehive_tsp.c but you want to call it from beehive_main.c. In C, the canonical way of calling a function from another file is to create a header with a prototype of that function and include the header in both a) the files that call the function and b) the file that defines it. Doing this helps the compiler/linker stitch the code together properly.
  • I'm still having trouble getting my code to compile in Task 4. My tsp function still can't be found. The version of the C standard our compiler uses requires you to use the void argument type when a function takes no arguments. Make sure your function prototypes and definitions use void as the argument if there are no arguments.
  • When I try to 'make', I get an error that says the Bgcc command cannot be found. Make sure to 'add 6.173', 'add git', and 'source /mit/6.173/tools.sh' everytime you log in. These commands do things like setting up your environment so that the beehive tools are in your path. Bgcc is the gcc port we use to compile programs for beehive.
  • When I try to 'git pull' I get an error saying that the git command cannot be found. Make sure to 'add git' everytime you log in.