From: chrisdekoh on
Hi,
does anyone know how to use a 2nd FSL peripheral attached to
microblaze? This is what I did. I have attached 2 peripherals, let's
say we call it peripheral1 and peripheral2 to the microblaze's FSL
bus.

now here comes the problem. Using the commands
putfsl(val,0) and getfsl(val,1), I am able to write and read from
peripheral 1 respectively.

However, when I do
putfsl(val,2) and getfsl(val,3), nothing happens from peripheral2; I
thought i was supposed to write and read from peripheral 2
respectively by these commands.

I have been struggling with this for a while...any of your inputs
would really be great. :D



--- excerpt from system.mhs file


BEGIN microblaze
PARAMETER INSTANCE = microblaze_0
PARAMETER HW_VER = 4.00.a
PARAMETER C_DEBUG_ENABLED = 1
PARAMETER C_NUMBER_OF_PC_BRK = 2
PARAMETER C_NUMBER_OF_RD_ADDR_BRK = 1
PARAMETER C_NUMBER_OF_WR_ADDR_BRK = 1
PARAMETER C_FSL_LINKS = 2
PARAMETER C_USE_FPU = 1
BUS_INTERFACE DLMB = dlmb
BUS_INTERFACE ILMB = ilmb
BUS_INTERFACE DOPB = mb_opb
BUS_INTERFACE IOPB = mb_opb
BUS_INTERFACE SFSL0 = peripheral1_to_microblaze_0 ## IS THE ID 1?
BUS_INTERFACE MFSL0 = microblaze_0_to_peripheral1 ## IS THE ID 0?
BUS_INTERFACE SFSL1 = peripheral2_0_to_microblaze_0 ## IS THE ID 3?
BUS_INTERFACE MFSL1 = microblaze_0_to_peripheral2 ## IS THE ID 2?
PORT CLK = sys_clk_s
PORT DBG_CAPTURE = DBG_CAPTURE_s
PORT DBG_CLK = DBG_CLK_s
PORT DBG_REG_EN = DBG_REG_EN_s
PORT DBG_TDI = DBG_TDI_s
PORT DBG_TDO = DBG_TDO_s
PORT DBG_UPDATE = DBG_UPDATE_s
END


otherwise, how to determine the corresponding ID of the FSL
peripherals? I have looked through fsl_v20.pdf but dun see anything
useful.

thanks a million!
Chris
From: u_stadler on
On 17 Apr., 18:13, chrisde...(a)gmail.com wrote:
> Hi,
> does anyone know how to use a 2nd FSL peripheral attached to
> microblaze? This is what I did. I have attached 2 peripherals, let's
> say we call it peripheral1 and peripheral2 to the microblaze's FSL
> bus.
>
> now here comes the problem. Using the commands
> putfsl(val,0) and getfsl(val,1), I am able to write and read from
> peripheral 1 respectively.
>
> However, when I do
> putfsl(val,2) and getfsl(val,3), nothing happens from peripheral2; I
> thought i was supposed to write and read from peripheral 2
> respectively by these commands.
>
> I have been struggling with this for a while...any of your inputs
> would really be great. :D
>
> --- excerpt from system.mhs file
>
> BEGIN microblaze
> PARAMETER INSTANCE = microblaze_0
> PARAMETER HW_VER = 4.00.a
> PARAMETER C_DEBUG_ENABLED = 1
> PARAMETER C_NUMBER_OF_PC_BRK = 2
> PARAMETER C_NUMBER_OF_RD_ADDR_BRK = 1
> PARAMETER C_NUMBER_OF_WR_ADDR_BRK = 1
> PARAMETER C_FSL_LINKS = 2
> PARAMETER C_USE_FPU = 1
> BUS_INTERFACE DLMB = dlmb
> BUS_INTERFACE ILMB = ilmb
> BUS_INTERFACE DOPB = mb_opb
> BUS_INTERFACE IOPB = mb_opb
> BUS_INTERFACE SFSL0 = peripheral1_to_microblaze_0 ## IS THE ID 1?
> BUS_INTERFACE MFSL0 = microblaze_0_to_peripheral1 ## IS THE ID 0?
> BUS_INTERFACE SFSL1 = peripheral2_0_to_microblaze_0 ## IS THE ID 3?
> BUS_INTERFACE MFSL1 = microblaze_0_to_peripheral2 ## IS THE ID 2?
> PORT CLK = sys_clk_s
> PORT DBG_CAPTURE = DBG_CAPTURE_s
> PORT DBG_CLK = DBG_CLK_s
> PORT DBG_REG_EN = DBG_REG_EN_s
> PORT DBG_TDI = DBG_TDI_s
> PORT DBG_TDO = DBG_TDO_s
> PORT DBG_UPDATE = DBG_UPDATE_s
> END
>
> otherwise, how to determine the corresponding ID of the FSL
> peripherals? I have looked through fsl_v20.pdf but dun see anything
> useful.
>
> thanks a million!
> Chris

your corresponding fsl id is usually in the xparameters.h and should
look something like this:

#define XPAR_FSL_0_OUTPUT_SLOT_ID 0
#define XPAR_FSL_0_INPUT_SLOT_ID 0

with putfsl(va, 0) you a probably writing to the first peripheral and
with getfsl(val, 1) you are reading from the second?

you might also use the create peripheral wizard. i generates a nice
example how to use the fsl bus with driver templates...

urban





From: chrisdekoh on
Hi,

1) the xparameters.h file does not contain the slot ids like you
mention above. any idea why this is so? I am looking at the file from
the
$PROJECT_DIR/microblaze_0/include directory. How do I go about
fixing this?

2) when I tried writing and reading from the first peripheral with
the putfsl(val,0) and getfsl(val,1) respectively, I have not yet
attached the 2nd peripheral. This is what I was previously doing

peripheral1 ==> write : use command putfsl(val,0) # WORKS OK
read : use command getfsl(val,1) # WORKS OK

peripheral2 ==> write : use command putfsl(val,2) # NOTHING HAPPENS
ON THE BUS
read : use command getfsl(val,3) # NOTHING
HAPPENS ON THE BUS


this seem to work for peripheral1. peripheral2 however cannot be
written to or read from. I verified this using RTL simulation by
generating behavioral model of the system. Now that I have attached
the 2nd fsl peripheral, should i change it in the following way?

peripheral1 ==> write : use command putfsl(val,0)
read : use command getfsl(val,0)

peripheral2 ==> write : use command putfsl(val,1)
read : use command getfsl(val,1)

3) the create peripheral method which you mentioned does not help much
either. It creates default driver files which do not mention anything
about the slot IDs either. the generic drivers merely contains
functions of which you are to supply the slot ID; of which, this I am
not too sure.

please let me know, if there is anyone who has any idea what is going
on...

Chris
From: G�ran Bilski on
Hi,

SFSL0 and MFSL0 has the same ID which is 0.

What version of EDK are you using?

G�ran

<chrisdekoh(a)gmail.com> wrote in message
news:2a8aade4-dfe3-4ddc-846c-fb6900ef3c6f(a)a23g2000hsc.googlegroups.com...
> Hi,
> does anyone know how to use a 2nd FSL peripheral attached to
> microblaze? This is what I did. I have attached 2 peripherals, let's
> say we call it peripheral1 and peripheral2 to the microblaze's FSL
> bus.
>
> now here comes the problem. Using the commands
> putfsl(val,0) and getfsl(val,1), I am able to write and read from
> peripheral 1 respectively.
>
> However, when I do
> putfsl(val,2) and getfsl(val,3), nothing happens from peripheral2; I
> thought i was supposed to write and read from peripheral 2
> respectively by these commands.
>
> I have been struggling with this for a while...any of your inputs
> would really be great. :D
>
>
>
> --- excerpt from system.mhs file
>
>
> BEGIN microblaze
> PARAMETER INSTANCE = microblaze_0
> PARAMETER HW_VER = 4.00.a
> PARAMETER C_DEBUG_ENABLED = 1
> PARAMETER C_NUMBER_OF_PC_BRK = 2
> PARAMETER C_NUMBER_OF_RD_ADDR_BRK = 1
> PARAMETER C_NUMBER_OF_WR_ADDR_BRK = 1
> PARAMETER C_FSL_LINKS = 2
> PARAMETER C_USE_FPU = 1
> BUS_INTERFACE DLMB = dlmb
> BUS_INTERFACE ILMB = ilmb
> BUS_INTERFACE DOPB = mb_opb
> BUS_INTERFACE IOPB = mb_opb
> BUS_INTERFACE SFSL0 = peripheral1_to_microblaze_0 ## IS THE ID 1?
> BUS_INTERFACE MFSL0 = microblaze_0_to_peripheral1 ## IS THE ID 0?
> BUS_INTERFACE SFSL1 = peripheral2_0_to_microblaze_0 ## IS THE ID 3?
> BUS_INTERFACE MFSL1 = microblaze_0_to_peripheral2 ## IS THE ID 2?
> PORT CLK = sys_clk_s
> PORT DBG_CAPTURE = DBG_CAPTURE_s
> PORT DBG_CLK = DBG_CLK_s
> PORT DBG_REG_EN = DBG_REG_EN_s
> PORT DBG_TDI = DBG_TDI_s
> PORT DBG_TDO = DBG_TDO_s
> PORT DBG_UPDATE = DBG_UPDATE_s
> END
>
>
> otherwise, how to determine the corresponding ID of the FSL
> peripherals? I have looked through fsl_v20.pdf but dun see anything
> useful.
>
> thanks a million!
> Chris


From: chrisdekoh on
Hi Goran,
Yes I realised over the weekend. So the verdict based on
experiment is...based on the system.mhs mentioned above, if you wanted
to:

1) write to peripheral 1=> use putfsl(val,0)
read from peripheral 1 => use getfsl(val,0)

2) write to peripheral 2=> use putfsl(val,1)
read from peripheral 2 => use getfsl(val,1)

So in short, I have figured out how to get it working.

the only thing is that when I had only peripheral 1 attached,
write to peripheral 1=> use putfsl(val,0)
read from peripheral 1 => use getfsl(val,1)
seems to work with the following system.mhs description:

BEGIN microblaze
PARAMETER INSTANCE = microblaze_0
PARAMETER HW_VER = 4.00.a
PARAMETER C_DEBUG_ENABLED = 1
PARAMETER C_NUMBER_OF_PC_BRK = 2
PARAMETER C_NUMBER_OF_RD_ADDR_BRK = 1
PARAMETER C_NUMBER_OF_WR_ADDR_BRK = 1
PARAMETER C_FSL_LINKS = 2
PARAMETER C_USE_FPU = 1
BUS_INTERFACE DLMB = dlmb
BUS_INTERFACE ILMB = ilmb
BUS_INTERFACE DOPB = mb_opb
BUS_INTERFACE IOPB = mb_opb
BUS_INTERFACE SFSL0 = peripheral1_to_microblaze_0
BUS_INTERFACE MFSL0 = microblaze_0_to_peripheral1
PORT CLK = sys_clk_s
PORT DBG_CAPTURE = DBG_CAPTURE_s
PORT DBG_CLK = DBG_CLK_s
PORT DBG_REG_EN = DBG_REG_EN_s
PORT DBG_TDI = DBG_TDI_s
PORT DBG_TDO = DBG_TDO_s
PORT DBG_UPDATE = DBG_UPDATE_s
END


I had verified its functionality after downloading it onto the FPGA.
I am using EDK9.1i

and I still do not have the parameters XPAR_FSL* such as
XPAR_FSL_PERIPHERAL1_OUTPUT_SLOT_ID
mentioned in the xparameters.h. I have still no idea how to get it
there.

thanks all for your inputs :)
Chris