- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
ISIM HDL sim of microblaze system (VHDL simulation hangs)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-15-2012 09:57 AM
Hi,
So I created a microblaze system with some peripherals (timers, memory controllers, etc). I then created a simple FSL peripheral and generated the netlist, bitstream and selected export design to get into the SDK.
Once in the SDK, i firstly, created the board support package with the lwIP library included and created a new C project (the echo server). I added the test code for my peripheral right at the beginning of main:
XStatus stat;
stat = TCP_IF_SelfTest();
xil_printf("%d\n", stat);
I verified that the FPGA runs ok and when attaching a serial cable to the FPGA I can verify that the self test procedure is returning XST_SUCCESS.
So now I want to run a VHDL simulation so that I can see how the peripheral works and modify it to perform the correct purpose.
I went back to XPS, and set the Elf files section to be the elf files from my SDK project. I then set the serial port baud rate to be the highest becasue I read somewhere that could cause a problem. I then clicked generate netlist.
I clicked on Generate HDL Files and Launch Simulator. In ISIM, I ran: reset; w; run 3ms, which set up the clocks and resets, logged signals and started the simulation.
Now comes the bit I don't understand. There is no activity on the FSL bus for the entire 3ms and also the instruction bus for the microblaze remains constant with the instruction address bus also remaining constant as if the whole system has hung.
Any ideas? Have I missed a step somewhere. The documentation for this area is a bit lacking.
Cheers,
Scott
Re: ISIM HDL sim of microblaze system (VHDL simulation hangs)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-15-2012 01:36 PM
Hi,
To me it looks as if the processor is stuck at address 0x90000000 which is I guess where it starts executing code. Is there likely to be any i/o ports for the microblaze that could cause it to stay here (like a reset, some debugger stop input, etc).
Cheers,
Scott
Re: ISIM HDL sim of microblaze system (VHDL simulation hangs)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-28-2012 02:56 AM
Hey Scott
Ive got the exact same probem, my Microblaze hangs at the first instruction. I've seen from the forums that you should have all your code in BRAM and not main memory (0x90000000 looks like the base of DDR2/3). Is your code in BRAM or main memory? Have you got any further with this? I'm also trying to debug a custom peripheral and want to see the FSL buses when Microblaze reads and writes.
Cheers
David
Re: ISIM HDL sim of microblaze system (VHDL simulation hangs)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-28-2012 07:10 AM
Hey Scott
I got the ISE simulation of the Microblaze working. You have to add the .elf file you generate from the SDK to the ISE project so it is associated with the testbench and processor, but don't have the .elf as the startup. Right click the processor and go to xmp/elf initialisation and choose bootloop for the processor. Image you are running it through SDK, you generate the .elf by building the project but you initialise the Microblaze using hte bootloop. If you do this and then simulate you should see it working. The last post about having your code in local memory still applies.
Cheers
David











