I'm having a pretty basic problem working with MicroBlaze on a Spartan 3E starter board.
I made a simple microblaze application to read the dip switches and display that value on the leds. When I try to run that application with a custom peripheral attached to the chip, it doesn't work.
My custom peripheral just sends some timing signals to the VGA pins on the board. The pins are constrained in data/system.ucf. The timing signals are correctly generated, but the microblaze itself stops executing my program after maybe a couple hundred instructions (the blink of an eye). I can reset the microblaze, and the leds will change to whatever the dip switches read, but then stops responding.
Hi, sorry for the vague problem description. I've had more time to experiment now. Here is my story:
1) I created a new microblaze project and wrote a program to read the dip switches and write that to the leds. It worked. 2) I then created a custom peripheral with 1x32bit register. I let the wizard generate the OPB Slave register read/write code. 3) I modified my program to write the dip switch value to my peripheral then read it out again before writing it to the leds. It still worked. 4) I added some extra logic to my peripheral to drive five output ports for vga signals. I added the port definitions to both user_logic.vhd and my_periph.vhd, then I reimported it using the wizard. 5) I deleted my peripheral from the system assembly and put the new one in. I made the ports external, then I added these lines to data/system.ucf: Net my_periph_0_VGA_HSYNC_pin LOC=F15; Net my_periph_0_VGA_HSYNC_pin IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST; Net my_periph_0_VGA_VSYNC_pin LOC=F14; Net my_periph_0_VGA_VSYNC_pin IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST; Net my_periph_0_VGA_RED_pin LOC=H14; Net my_periph_0_VGA_RED_pin IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST; Net my_periph_0_VGA_GREEN_pin LOC=H15; Net my_periph_0_VGA_GREEN_pin IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST; Net my_periph_0_VGA_BLUE_pin LOC=G15; Net my_periph_0_VGA_BLUE_pin IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST
6) Now I rebuilt everything without modifying my program. The vga signals were correct and I displayed solid red on a monitor (the intended effect for this exercize). However, the leds would not change with the dip switches. Each time I pressed reset (button south) the leds would change to the current value of the switches. If I kept pressing reset enough, the leds would stop turning on altogether. 7) Finally, I changed the ports on my_periph to "no connection" and commented out those lines in system.ucf. The program worked like normal again.
Please let me know if there's any detail you're interested in that I forgot to mention.