WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2008-Sep-10 12:47:15

dpfeil
Member
Registered: 2008-Feb-02
Posts: 47

adding registers to simulink mdl

I have adjusted the MIMO_OFDM simulink model to output a value to a register I added.  I followed the same process for the other read-only registers that existed in the memory map registers.  The simulation worked, then I updated the edk processor block to take into account the new register.  Then I generated it into the existing reference design v11 system.xmp file, and it was successful.  Then I opened up the project, and the already present mimo ofdm ip seemed to have been updated with the new register.  We made a change to the mac code to print out the register value, and then updated the bitstream, which worked.  Then we downloaded it to the hardware, and nothing worked at all.  Now it does not transmit or receive, and neither radio seems to be selected.  Also, the usually full serial port terminal window, showed nothing at all.  We didnt adjust any current functionality, we just added things, so I am not sure why nothing seems to work.  Any ideas or suggestions for adding registers and printing them out?  thanks.

Offline

 

#2 2008-Sep-10 13:28:21

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: adding registers to simulink mdl

The first thing to try when a project builds but seemingly doesn't boot is re-generate the linker script for your software project. Use the screenshot on the reference design page as a guide.

Offline

 

#3 2008-Sep-10 14:10:41

dpfeil
Member
Registered: 2008-Feb-02
Posts: 47

Re: adding registers to simulink mdl

great, that definitely helped, the linker script was pointing other places that it was not supposed to.  Unfortunately, now our code gets stuck at "enabling exceptions...".  We added code to see where it was getting hung up and it seems to have trouble executing: XExc_mEnableExpections(XEXC_NON_CRITICAL)

Any idea why this would get hung up?

Offline

 

#4 2008-Sep-10 15:21:23

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: adding registers to simulink mdl

We saw a similar problem a while back. It was due to a device asserting an interrupt before that function got called. Did you change any of the interrupt outputs in the PHY? Or any of the PHY's initialization that might have affect its interrupt outputs? One debugging idea would be to individually comment out the XIntc_Enable() calls for each interrupt in the system, to see if just one is the source of the hang.

Offline

 

#5 2008-Sep-11 12:01:20

dpfeil
Member
Registered: 2008-Feb-02
Posts: 47

Re: adding registers to simulink mdl

The interrupts did seem to be the problem, specifically the badheader, goodheader, and badpkt.  We have noticed that in the system assembly view -> ports, the signals under the mimo ofdm ip core, which are supposed to be class->interrupt with sensitivity->level_high, do not have the class and sensitivity set at all, as they did before we generated the mimo_ofdm model.  Basically, before we generated the mimo model with our changes, the system.xmp listed some signals as having the class of interrupt and the sensitivity as level_high, and after the generation the system.xmp signals did not have anything listed in the class or sensitivity columns.  We could not seem to find a way to set the class or sensitivity manual.  How can we change it to make sure that those are specified as interrupts?  Thanks.

Offline

 

#6 2008-Sep-11 14:01:26

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: adding registers to simulink mdl

Ahh, good catch. When you export a pcore from Sysgen, it creates an MPD file describing the core's ports and memory resources. Every pcore in a project has an MPD. In the MPD, if a port is to be used as an interrupt, it needs some extra parameters added after the basic ones. These paramters mark the output as an available interrupt and specify its sensitivity. For example, two of the PHY interrupts:

Code:

PORT rx_int_badpkt = "", DIR = O, SIGIS = INTERRUPT, SENSITIVITY = LEVEL_HIGH, INTERRUPT_PRIORITY = HIGH
PORT rx_int_goodpkt = "", DIR = O, SIGIS = INTERRUPT, SENSITIVITY = LEVEL_HIGH, INTERRUPT_PRIORITY = HIGH

Unfortunately Sysgen doesn't support marking ports as interrupts automatically. So after exporting the PHY, you have to manually edit the MPD (in <xps project root>/pcores/<core name>/data/<core name>.mpd) to add the interrupt parameters. You can also copy the lines from the MPD distributed in the reference design.

For reference, the full MPD syntax is specified in a PDF installed with the EDK. In v10.1, it's in $XILINX_EDK/doc/usenglish/psf_rm.pdf.

Offline

 

#7 2008-Sep-11 14:16:00

dpfeil
Member
Registered: 2008-Feb-02
Posts: 47

Re: adding registers to simulink mdl

Thanks.  We actually just figured this out, but we still weren't sure if copying and pasting or even manually editing the MPD file was the correct way to do it.  We are synthesizing now and will let you know how it goes.  Do you know of anyone else (outside of your group) who has made similar changes to the model successfully?  Thanks again

Offline

 

Board footer