News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Interfacing Arm to custom Logic

Started by enliteneer, March 22, 2020, 04:48:12 PM

Previous topic - Next topic

enliteneer

Microsemi has a 2012 app note (AC335) how to do it, but I haven't been able to make it work.   

Basically, just creating a simple project that uses their example AP3 wrapper/slave around a reg16x8 ram block.   Everything seems to synthesize/route fine, yet once programmed, the moment I step the cpu thru a line that accesses the logic/memory, I get a hard fault.

I had to modify their reg_apb_wrp.v file in order to make it work with Libero 12.3, but not sure if this is the issue.    Also, not sure why the tool put the slave at both 0x50000000-0x50000FFF AND 0x30000000-0x30000FFF nor why it's 0x1000 in length.    I'd like to add much more custom logic, and since there's only 2 FIC, I need a much bigger memory map to decode outside of the arm!








Antti Lukats

did you try reading writing the apb peripheral from the debugger? It does different access then

we have done little work with smartfusion, but with one project we had no issues, there I used a dual port block ram interface to the hard cpu and to the fpga fabric

enliteneer

Thanks, would the design you mention be the one listed under the SMF2000 resources (SMFSDRAM.zip)?   I couldn't find any custom hdl/firmware files in that zip.   

Using the Memory tab in Eclipse, I don't get a hard fault when reading/writing the apb3 slave memory space!   Interestingly, it seems as if it's a byte access issue.   For example, this will crash:

uint8_t rdVal;
uint8_t *pUserLogic8 = (uint8_t*) (0x50000000);
rdVal = *(pUserLogic8 +3 ); 

but this wont:
uint8_t rdVal;
uint8_t *pUserLogic8 = (uint8_t*) (0x50000000);
rdVal = *(pUserLogic8 +4 ); 

Do you see anything obvious with the screenshots of the project settings?

fab79df

Replying here instead of starting a new one because I have a very similar issue using a Smartberry board. By chanche, was this isssue on the same board? In any case, can you confirm the latest post describes a tested solution? Thanks all