From: lomtikster on
Hi everyone,

I would like to read a file from a CF card on xupv2p board using PLB
and Microblaze 7.10d. There are a few questions that I am trying to
answer.

There is an xps_sysace interface controller v1.00a which seats between
the PLB and the system ace CF peripheral and has sysace v1_11_a driver
with functions like XSysAce_SectorRead and XSysAce_SectorWrite.
However, I have not found any file system management soft like
sysace_fopen and sysace_fread provided with XilFatfs FATFile System
access library (xilfatfs_v1_00_a) that, from its doc, requires OPB
SYSACE Interface Controller - Logicore module. How else would you read
files from the a CF via PLB?
Would it require modifying xilfatfs to support PLB?

Probably I could reuse the xilfatfs_v1_00_a if I use the older MB 6
with OPB bus and opb_sysace or OPB2PLB bridge and xps_sysace.

From: G�ran Bilski on
Hi,

First, MicroBlaze v7 still handles OPB interface, the default is just PLB.
The parameter C_USE_INTERFACE determines what interface MicroBlaze should
use.

I don't know the details of the XilFatfs library but I doubt that it only
works with the opb based version.
Have you tried using it for the xps based version?

G�ran

<lomtikster(a)gmail.com> wrote in message
news:e5ef2d98-e7e4-466e-87b5-274a90255a3b(a)k36g2000pri.googlegroups.com...
> Hi everyone,
>
> I would like to read a file from a CF card on xupv2p board using PLB
> and Microblaze 7.10d. There are a few questions that I am trying to
> answer.
>
> There is an xps_sysace interface controller v1.00a which seats between
> the PLB and the system ace CF peripheral and has sysace v1_11_a driver
> with functions like XSysAce_SectorRead and XSysAce_SectorWrite.
> However, I have not found any file system management soft like
> sysace_fopen and sysace_fread provided with XilFatfs FATFile System
> access library (xilfatfs_v1_00_a) that, from its doc, requires OPB
> SYSACE Interface Controller - Logicore module. How else would you read
> files from the a CF via PLB?
> Would it require modifying xilfatfs to support PLB?
>
> Probably I could reuse the xilfatfs_v1_00_a if I use the older MB 6
> with OPB bus and opb_sysace or OPB2PLB bridge and xps_sysace.
>


From: G�ran Bilski on
Bah,
The parameter is called C_INTERCONNECT and nothing else.

G�ran

"G�ran Bilski" <goran.bilski(a)xilinx.com> wrote in message
news:gcch95$ill1(a)cnn.xsj.xilinx.com...
> Hi,
>
> First, MicroBlaze v7 still handles OPB interface, the default is just PLB.
> The parameter C_USE_INTERFACE determines what interface MicroBlaze should
> use.
>
> I don't know the details of the XilFatfs library but I doubt that it only
> works with the opb based version.
> Have you tried using it for the xps based version?
>
> G�ran
>
> <lomtikster(a)gmail.com> wrote in message
> news:e5ef2d98-e7e4-466e-87b5-274a90255a3b(a)k36g2000pri.googlegroups.com...
>> Hi everyone,
>>
>> I would like to read a file from a CF card on xupv2p board using PLB
>> and Microblaze 7.10d. There are a few questions that I am trying to
>> answer.
>>
>> There is an xps_sysace interface controller v1.00a which seats between
>> the PLB and the system ace CF peripheral and has sysace v1_11_a driver
>> with functions like XSysAce_SectorRead and XSysAce_SectorWrite.
>> However, I have not found any file system management soft like
>> sysace_fopen and sysace_fread provided with XilFatfs FATFile System
>> access library (xilfatfs_v1_00_a) that, from its doc, requires OPB
>> SYSACE Interface Controller - Logicore module. How else would you read
>> files from the a CF via PLB?
>> Would it require modifying xilfatfs to support PLB?
>>
>> Probably I could reuse the xilfatfs_v1_00_a if I use the older MB 6
>> with OPB bus and opb_sysace or OPB2PLB bridge and xps_sysace.
>>
>
>


From: jason.hy.wu on
On Oct 6, 4:21 pm, lomtiks...(a)gmail.com wrote:
> Hi everyone,
>
> I would like to read a file from a CF card on xupv2p board using PLB
> and Microblaze 7.10d. There are a few questions that I am trying to
> answer.
>
> There is an xps_sysace interface controller v1.00a which seats between
> the PLB and the system ace CF peripheral and has sysace v1_11_a driver
> with functions like XSysAce_SectorRead and XSysAce_SectorWrite.
> However, I have not found any file system management soft like
> sysace_fopen and sysace_fread provided with XilFatfs FATFile System
> access library (xilfatfs_v1_00_a) that, from its doc, requires OPB
> SYSACE Interface Controller - Logicore module. How else would you read
> files from the a CF via PLB?
> Would it require modifying xilfatfs to support PLB?
>
> Probably I could reuse the xilfatfs_v1_00_a if I use the older MB 6
> with OPB bus and opb_sysace or OPB2PLB bridge and xps_sysace.

I am using MB 7.10a + plb + xps_sysace 1.00a with xilfatfs 1.00.a. I
also use
sysace_fopen, sysace_fread, sysace_fwrite for my sysace operations. So
I don't
think you need to redesign your system again.XSysAce_SectorRead and
XSysAce_SectorWrite are the raw operations as I remember.
From: lomtikster on
On Oct 6, 5:40 am, jason.hy...(a)gmail.com wrote:
> On Oct 6, 4:21 pm, lomtiks...(a)gmail.com wrote:
>
>
>
> > Hi everyone,
>
> > I would like to read a file from a CF card on xupv2p board using PLB
> > and Microblaze 7.10d. There are a few questions that I am trying to
> > answer.
>
> > There is an xps_sysace interface controller v1.00a which seats between
> > the PLB and the system ace CF peripheral and has sysace v1_11_a driver
> > with functions like XSysAce_SectorRead and XSysAce_SectorWrite.
> > However, I have not found any file system management soft like
> > sysace_fopen and sysace_fread provided with XilFatfs FATFile System
> > access library (xilfatfs_v1_00_a) that, from its doc, requires OPB
> > SYSACE Interface Controller - Logicore module. How else would you read
> > files from the a CF via PLB?
> > Would it require modifying xilfatfs to support PLB?
>
> > Probably I could reuse the xilfatfs_v1_00_a if I use the older MB 6
> > with OPB bus and opb_sysace or OPB2PLB bridge and xps_sysace.
>
> I am using MB 7.10a + plb + xps_sysace 1.00a with xilfatfs 1.00.a. I
> also use
> sysace_fopen, sysace_fread, sysace_fwrite for my sysace operations. So
> I don't
> think you need to redesign your system again.XSysAce_SectorRead and
> XSysAce_SectorWrite are the raw operations as I remember.

Thanks Goran, Jason. It was great to hear the confirmation that
xilfatfs worked for you with with the xps_sysace 1.00a. I came back to
the original setup with PLB and xps_sysace and fixed all the
compilation errors that I had. I also added the ddr ram plb controller
and able to debug the code now.

I have another issue now that am trying to figure out. For some
reason, when reading the first file, the program is hitting a
_vector_sw_exception which I get after exiting
int update_bufcache(int sector, unsigned char *sector_buf, int dirty)
function. This function is called multiple times before the exception
is made.

update_bufcache() is called by read_sector(), which in turn is read
from read_from_file()

Why could this exception happen?
I've checked my address ranges and they don't seem to overlap.
I formatted my CF card as suggested by the xupv2p's user guide for
128mb with mkdosfs and placed a few images there, and the exception
happens on the first.
As example, I am using the slideshow code available from xilinx/
digilent: http://www.digilentinc.com/Products/Detail.cfm?Prod=XUPV2P
I disabled //XCache_EnableDCache(0xF000000F) and //
XCache_EnableICache(0xF000000F) lines. Could it relate to the problem?
My DDR ram has these disabled in Assembly System View too.