FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-19-2004, 02:22 PM
Ciaran
Guest
 
Posts: n/a
Default MicroBlaze User Peripheral with 2 interrupts

Hi all,

I have designed a user peripheral to connect via an OPB Bus to a
MicroBlaze processor. Also, an interrupt controller is connected to
the OPB Bus. My user peripheral generates two interrupts, which
connect to the interrupt controller. The interrupt controller irq then
connects to the MicroBlaze interrupt input.

My problem arises when I run libgen. It returns an error
ERROR:MDT - system.mss:42 - Property interrupt_handler is not found
I understand that this happens when I use the generic driver for the
user peripheral. But how do I define a driver that has 2 interrupt
outputs? What would the .mdd file look like? I can do this for one
that drives a single interrupt output

e.g.

:
:
BEGIN ARRAY interrupt_handler
PROPERTY desc = "Interrupt Handler Information";
PROPERTY size = 1, permit = none;
PARAM name = int_handler, default = XIntc_DefaultHandler, desc =
"Name of Interrupt Handler", type = string;
PARAM name = int_port, default = Interrupt, desc = "Interrupt pin
associated with the interrupt handler", permit = none;
END ARRAY
:
:

is in the .mdd file for the peripheral that drives a single interrupt.

Thanks for your help
Ciarán
Reply With Quote
  #2 (permalink)  
Old 01-20-2004, 01:15 AM
Paulo Dutra
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

This is more appropriate in comp.arch.fpga.

In case of multiple interrupt sources, the MDD file
should have entries for each of the interrupt port
in the interrupt handler array. Look at the
$XILINX_EDK/sw/XilinxProcessorIPLib/drivers/wdttb_v1_00_b/data/wdttb_v2_1_0.mdd
file for an example. Here is the snippet from the
MDD file :

BEGIN ARRAY interrupt_handler
PROPERTY desc = "Interrupt Handler Information";
PROPERTY size = 2, permit = none;
PROPERTY default = ((XIntc_DefaultHandler, TimebaseInterrupt),
(XIntc_DefaultHandler, WDT_Interrupt));
PARAM name = int_handler, desc = "Name of Interrupt Handler", type= string;
PARAM name = int_port, desc = "Interrupt pin associated with the interrupt
handler", permit = none;
END ARRAY

The default property of the interrupt_handler array
defines handlers for the 2 interrupt sources of the IP
opb_timebase_wdt.


Ciaran wrote:
> Hi all,
>
> I have designed a user peripheral to connect via an OPB Bus to a
> MicroBlaze processor. Also, an interrupt controller is connected to
> the OPB Bus. My user peripheral generates two interrupts, which
> connect to the interrupt controller. The interrupt controller irq then
> connects to the MicroBlaze interrupt input.
>
> My problem arises when I run libgen. It returns an error
> ERROR:MDT - system.mss:42 - Property interrupt_handler is not found
> I understand that this happens when I use the generic driver for the
> user peripheral. But how do I define a driver that has 2 interrupt
> outputs? What would the .mdd file look like? I can do this for one
> that drives a single interrupt output
>
> e.g.
>
> :
> :
> BEGIN ARRAY interrupt_handler
> PROPERTY desc = "Interrupt Handler Information";
> PROPERTY size = 1, permit = none;
> PARAM name = int_handler, default = XIntc_DefaultHandler, desc =
> "Name of Interrupt Handler", type = string;
> PARAM name = int_port, default = Interrupt, desc = "Interrupt pin
> associated with the interrupt handler", permit = none;
> END ARRAY
> :
> :
>
> is in the .mdd file for the peripheral that drives a single interrupt.
>
> Thanks for your help
> Ciarán



--
/ 7\'7 Paulo Dutra ([email protected])
\ \ ` Xilinx [email protected]
/ / 2100 Logic Drive http://www.xilinx.com
\_\/.\ San Jose, California 95124-3450 USA

Reply With Quote
  #3 (permalink)  
Old 01-20-2004, 10:02 AM
Ciaran
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Thanks Paulo.

I did what you said. My .mdd file looks like

OPTION psf_version = 2.1;

BEGIN driver rpa
PARAM name = level, desc = "Driver Level", type = int, default = 0,
range = (0, 1);

BEGIN BLOCK, dep = (level = 0)
OPTION depends = (common_v1_00_a);

BEGIN ARRAY interrupt_handler
PROPERTY desc = "Interrupt Handler Information";
PROPERTY size = 2, permit = none;
PROPERTY default = ((XIntc_DefaultHandler, interruptA),
(XIntc_DefaultHandler, interruptB));
PARAM name = int_handler, desc = "Name of Interrupt Handler",
type = string;
PARAM name = int_port, desc = "Interrupt pin associated with the
interrupt handler", permit = none;
END ARRAY
END BLOCK
END driver

In the .mss file for my project, I have the following
:
:
BEGIN DRIVER
PARAMETER HW_INSTANCE = hw_inst
PARAMETER DRIVER_NAME = hw_driver
PARAMETER DRIVER_VER = 1.00.a
PARAMETER LEVEL = 0
PARAMETER INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
PARAMETER INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
END
:
:
BEGIN DRIVER
PARAMETER HW_INSTANCE = myintc
PARAMETER DRIVER_NAME = intc
PARAMETER DRIVER_VER = 1.00.b
PARAMETER LEVEL = 0
END
:
:

Then I run libgen. If I look at my intc source code
(C:\project\mblaze\libsrc\intc_v1_00_b\src\xintc_l g.c) the file
contains the following:

#include "xbasic_types.h"
#include "xintc_l.h"
#include "xparameters.h"
extern void XIntc_DefaultHandler (void *);
extern void Xhw_InterruptAHandler (void *);


XIntc_VectorTableEntry
XIntc_InterruptVectorTable[XPAR_INTC_MAX_NUM_INTR_INPUTS] = {
{
XIntc_DefaultHandler,
(void *) NULL
},
{
Xhw_InterruptAHandler,
(void *) XPAR_RPA_BASEADDR
}
};
Xuint32 XIntc_AckBeforeService = XPAR_INTR_CTLR_KIND_OF_INTR;

Should there not be an entry for Xhw_InterruptBHandler, i.e. a handler
for interrupt interruptB?

Thank you,
Ciarán


Paulo Dutra <[email protected]> wrote in message news:<[email protected]>...
> This is more appropriate in comp.arch.fpga.
>
> In case of multiple interrupt sources, the MDD file
> should have entries for each of the interrupt port
> in the interrupt handler array. Look at the
> $XILINX EDK/sw/XilinxProcessorIPLib/drivers/wdttb v1 00 b/data/wdttb v2 1
> 0.mdd
> file for an example. Here is the snippet from the
> MDD file :
>
> BEGIN ARRAY interrupt handler
> PROPERTY desc = "Interrupt Handler Information";
> PROPERTY size = 2, permit = none;
> PROPERTY default = ((XIntc DefaultHandler, TimebaseInterrupt),
> (XIntc DefaultHandler, WDT Interrupt));
> PARAM name = int handler, desc = "Name of Interrupt Handler", type
> = string;
> PARAM name = int port, desc = "Interrupt pin associated with the i
> nterrupt
> handler", permit = none;
> END ARRAY
>
> The default property of the interrupt handler array
> defines handlers for the 2 interrupt sources of the IP
> opb timebase wdt.
>
>
> Ciaran wrote:
> > Hi all,
> >
> > I have designed a user peripheral to connect via an OPB Bus to a
> > MicroBlaze processor. Also, an interrupt controller is connected to
> > the OPB Bus. My user peripheral generates two interrupts, which
> > connect to the interrupt controller. The interrupt controller irq then
> > connects to the MicroBlaze interrupt input.
> >
> > My problem arises when I run libgen. It returns an error
> > ERROR:MDT - system.mss:42 - Property interrupt handler is not found
> > I understand that this happens when I use the generic driver for the
> > user peripheral. But how do I define a driver that has 2 interrupt
> > outputs? What would the .mdd file look like? I can do this for one
> > that drives a single interrupt output
> >
> > e.g.
> >
> > :
> > :
> > BEGIN ARRAY interrupt handler
> > PROPERTY desc = "Interrupt Handler Information";
> > PROPERTY size = 1, permit = none;
> > PARAM name = int handler, default = XIntc DefaultHandler, desc =

>
> > "Name of Interrupt Handler", type = string;
> > PARAM name = int port, default = Interrupt, desc = "Interrupt p

> in
> > associated with the interrupt handler", permit = none;
> > END ARRAY
> > :
> > :
> >
> > is in the .mdd file for the peripheral that drives a single interrupt.
> >
> > Thanks for your help
> > Ciar n

Reply With Quote
  #4 (permalink)  
Old 01-20-2004, 07:04 PM
Sathya Thammanur
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Hi Ciaran,
It looks like the port interruptB is not connected to the interrupt
controller in the MHS file. Your MHS should have an entry like the
following in the intc block :

PORT Intr = interruptA & interruptB

libgen generates the vector table for the intc based on the interrupt
ports connected to it.


Sathya


Ciaran wrote:
> Thanks Paulo.
>
> I did what you said. My .mdd file looks like
>
> OPTION psf_version = 2.1;
>
> BEGIN driver rpa
> PARAM name = level, desc = "Driver Level", type = int, default = 0,
> range = (0, 1);
>
> BEGIN BLOCK, dep = (level = 0)
> OPTION depends = (common_v1_00_a);
>
> BEGIN ARRAY interrupt_handler
> PROPERTY desc = "Interrupt Handler Information";
> PROPERTY size = 2, permit = none;
> PROPERTY default = ((XIntc_DefaultHandler, interruptA),
> (XIntc_DefaultHandler, interruptB));
> PARAM name = int_handler, desc = "Name of Interrupt Handler",
> type = string;
> PARAM name = int_port, desc = "Interrupt pin associated with the
> interrupt handler", permit = none;
> END ARRAY
> END BLOCK
> END driver
>
> In the .mss file for my project, I have the following
> :
> :
> BEGIN DRIVER
> PARAMETER HW_INSTANCE = hw_inst
> PARAMETER DRIVER_NAME = hw_driver
> PARAMETER DRIVER_VER = 1.00.a
> PARAMETER LEVEL = 0
> PARAMETER INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
> PARAMETER INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
> END
> :
> :
> BEGIN DRIVER
> PARAMETER HW_INSTANCE = myintc
> PARAMETER DRIVER_NAME = intc
> PARAMETER DRIVER_VER = 1.00.b
> PARAMETER LEVEL = 0
> END
> :
> :
>
> Then I run libgen. If I look at my intc source code
> (C:\project\mblaze\libsrc\intc_v1_00_b\src\xintc_l g.c) the file
> contains the following:
>
> #include "xbasic_types.h"
> #include "xintc_l.h"
> #include "xparameters.h"
> extern void XIntc_DefaultHandler (void *);
> extern void Xhw_InterruptAHandler (void *);
>
>
> XIntc_VectorTableEntry
> XIntc_InterruptVectorTable[XPAR_INTC_MAX_NUM_INTR_INPUTS] = {
> {
> XIntc_DefaultHandler,
> (void *) NULL
> },
> {
> Xhw_InterruptAHandler,
> (void *) XPAR_RPA_BASEADDR
> }
> };
> Xuint32 XIntc_AckBeforeService = XPAR_INTR_CTLR_KIND_OF_INTR;
>
> Should there not be an entry for Xhw_InterruptBHandler, i.e. a handler
> for interrupt interruptB?
>
> Thank you,
> Ciarán
>
>
> Paulo Dutra <[email protected]> wrote in message news:<[email protected]>...
>
>>This is more appropriate in comp.arch.fpga.
>>
>>In case of multiple interrupt sources, the MDD file
>>should have entries for each of the interrupt port
>>in the interrupt handler array. Look at the
>>$XILINX EDK/sw/XilinxProcessorIPLib/drivers/wdttb v1 00 b/data/wdttb v2 1
>> 0.mdd
>>file for an example. Here is the snippet from the
>>MDD file :
>>
>>BEGIN ARRAY interrupt handler
>> PROPERTY desc = "Interrupt Handler Information";
>> PROPERTY size = 2, permit = none;
>> PROPERTY default = ((XIntc DefaultHandler, TimebaseInterrupt),
>>(XIntc DefaultHandler, WDT Interrupt));
>> PARAM name = int handler, desc = "Name of Interrupt Handler", type
>> = string;
>> PARAM name = int port, desc = "Interrupt pin associated with the i
>>nterrupt
>>handler", permit = none;
>>END ARRAY
>>
>>The default property of the interrupt handler array
>>defines handlers for the 2 interrupt sources of the IP
>>opb timebase wdt.
>>
>>
>>Ciaran wrote:
>>
>>>Hi all,
>>>
>>>I have designed a user peripheral to connect via an OPB Bus to a
>>>MicroBlaze processor. Also, an interrupt controller is connected to
>>>the OPB Bus. My user peripheral generates two interrupts, which
>>>connect to the interrupt controller. The interrupt controller irq then
>>>connects to the MicroBlaze interrupt input.
>>>
>>>My problem arises when I run libgen. It returns an error
>>>ERROR:MDT - system.mss:42 - Property interrupt handler is not found
>>>I understand that this happens when I use the generic driver for the
>>>user peripheral. But how do I define a driver that has 2 interrupt
>>>outputs? What would the .mdd file look like? I can do this for one
>>>that drives a single interrupt output
>>>
>>>e.g.
>>>
>>> :
>>> :
>>>BEGIN ARRAY interrupt handler
>>> PROPERTY desc = "Interrupt Handler Information";
>>> PROPERTY size = 1, permit = none;
>>> PARAM name = int handler, default = XIntc DefaultHandler, desc =

>>
>>
>>
>>>"Name of Interrupt Handler", type = string;
>>> PARAM name = int port, default = Interrupt, desc = "Interrupt p

>>
>> in
>>
>>>associated with the interrupt handler", permit = none;
>>>END ARRAY
>>> :
>>> :
>>>
>>>is in the .mdd file for the peripheral that drives a single interrupt.
>>>
>>>Thanks for your help
>>>Ciar n


Reply With Quote
  #5 (permalink)  
Old 01-21-2004, 09:29 AM
Ciaran
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Thanks for replying Sathya (and Paulo),

Bear with me here, because I just can't figure out what I am doing
wrong.
My system.mhs file is as follows

:
:
BEGIN microblaze
PARAMETER INSTANCE = mblaze
PARAMETER HW_VER = 2.00.a
PORT CLK = sys_clk
PORT INTERRUPT = mblaze_interrupt
BUS_INTERFACE DLMB = dlmb
BUS_INTERFACE ILMB = ilmb
BUS_INTERFACE DOPB = dopb
END
:
:
BEGIN opb_intc
PARAMETER INSTANCE = intr_ctlr
PARAMETER HW_VER = 1.00.c
PARAMETER C_BASEADDR = 0xFFFF8200
PARAMETER C_HIGHADDR = 0xFFFF82FF
PORT Intr = hw_interruptA & hw_interruptB
PORT Irq = mblaze_interrupt
PORT OPB_Clk = sys_clk
BUS_INTERFACE SOPB = dopb
END
:
:
BEGIN opb_hw_inst
PARAMETER INSTANCE = hw_inst
PARAMETER HW_VER = 1.03.b
PARAMETER C_BASEADDR = 0xFFFF8400
PARAMETER C_HIGHADDR = 0xFFFF85FF
PORT opb_clk = sys_clk
PORT interruptA = hw_interruptA
PORT interruptB = hw_interruptB
BUS_INTERFACE SOPB = dopb
END
:
:

My system.mss file reads as follows
:
:
BEGIN PROCESSOR
PARAMETER HW_INSTANCE = mblaze
PARAMETER DRIVER_NAME = cpu
PARAMETER DRIVER_VER = 1.00.a
PARAMETER EXECUTABLE = mblaze/code/executable.elf
PARAMETER COMPILER = mb-gcc
PARAMETER ARCHIVER = mb-ar
PARAMETER DEFAULT_INIT = XMDSTUB
PARAMETER DEBUG_PERIPHERAL = jtag
PARAMETER STDIN = rs232
PARAMETER STDOUT = rs232
END
:
:
BEGIN DRIVER
PARAMETER HW_INSTANCE = hw_inst
PARAMETER DRIVER_NAME = hw_driver
PARAMETER DRIVER_VER = 1.00.a
PARAMETER INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
PARAMETER INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
END
:
:
BEGIN DRIVER
PARAMETER HW_INSTANCE = intr_ctlr
PARAMETER DRIVER_NAME = intc
PARAMETER DRIVER_VER = 1.00.b
PARAMETER LEVEL = 0
END
:
:

These both seem to be in order to me. The interrupts generated by the
hw_inst sub_component are both connected to the intr input of the
intc, and the irq output of the intc is connected to the interrupt
input of the microblaze.

My driver files for the hw_driver are as follows
hw_driver.mdd is as follows:

### Start of file ###
BEGIN driver XRhw_driver
constant VERSION = 2.0.0 # uses SIF 2.0.0
parameter LEVEL = 0 # default level
END

BEGIN level 0
constant DEPENDS = (common_v1_00_a)
constant CONFIG_INCLUDE = xparameters, VALUES = ( C_BASEADDR )
parameter INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
parameter INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
END
### End of file ###

hw_driver_v2_1_0.mdd is as follows:

### Start of file ###
OPTION psf_version = 2.1;

BEGIN driver hw_driver
PARAM name = level, desc = "Driver Level", type = int, default = 0,
range = (0);

BEGIN BLOCK, dep = (level = 0)
OPTION depends = (common_v1_00_a);

BEGIN ARRAY interrupt_handler
PROPERTY desc = "Interrupt Handler Information";
PROPERTY size = 2, permit = none;
PROPERTY default = ((Xhw_InterruptAHandler, interruptA),
(Xhw_InterruptBHandler, interruptB));
PARAM name = int_handler, desc = "Name of Interrupt Handler",
type = string;
PARAM name = int_port, desc = "Interrupt pin associated with the
interrupt handler", permit = none;
END ARRAY
END BLOCK
END driver
### End of file ###

My hw_driver_v2_1_0.tcl file is:

### Start of File ###
proc generate {drv_handle} {
set level [xget_value $drv_handle "PARAMETER" "level"]
if {$level == 0} {
xdefine_include_file $drv_handle "xparameters.h" "Xhw_driver"
"NUM_INSTANCES" "C_BASEADDR" "C_HIGHADDR"
}
}
### End of file ###

It all seems in order to me. But I still get the same problems when I
run libgen, and only interruptA works when I synthesise and download
to the board.

I am using EDK 3.2.2, with Memec Insight V2MB1000 Rev. 3A board, if
that explains anything. (I have tried with EDK 6.1, but I get the same
problem)

I apologise for the amount of code posted, but I just can't figure out
what I'm doing wrong.

Thanks for all your help,
Ciaran Hughes,
National University of Ireland, Galway
Reply With Quote
  #6 (permalink)  
Old 01-23-2004, 07:40 PM
Sathya Thammanur
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Hi Ciaran,
Can you check if your MPD file of opb_hw_inst IP has SIGIS=INTERRUPT
subproperty on each of the ports interruptA and interruptB ?

Sathya


Ciaran wrote:
> Thanks for replying Sathya (and Paulo),
>
> Bear with me here, because I just can't figure out what I am doing
> wrong.
> My system.mhs file is as follows
>
> :
> :
> BEGIN microblaze
> PARAMETER INSTANCE = mblaze
> PARAMETER HW_VER = 2.00.a
> PORT CLK = sys_clk
> PORT INTERRUPT = mblaze_interrupt
> BUS_INTERFACE DLMB = dlmb
> BUS_INTERFACE ILMB = ilmb
> BUS_INTERFACE DOPB = dopb
> END
> :
> :
> BEGIN opb_intc
> PARAMETER INSTANCE = intr_ctlr
> PARAMETER HW_VER = 1.00.c
> PARAMETER C_BASEADDR = 0xFFFF8200
> PARAMETER C_HIGHADDR = 0xFFFF82FF
> PORT Intr = hw_interruptA & hw_interruptB
> PORT Irq = mblaze_interrupt
> PORT OPB_Clk = sys_clk
> BUS_INTERFACE SOPB = dopb
> END
> :
> :
> BEGIN opb_hw_inst
> PARAMETER INSTANCE = hw_inst
> PARAMETER HW_VER = 1.03.b
> PARAMETER C_BASEADDR = 0xFFFF8400
> PARAMETER C_HIGHADDR = 0xFFFF85FF
> PORT opb_clk = sys_clk
> PORT interruptA = hw_interruptA
> PORT interruptB = hw_interruptB
> BUS_INTERFACE SOPB = dopb
> END
> :
> :
>
> My system.mss file reads as follows
> :
> :
> BEGIN PROCESSOR
> PARAMETER HW_INSTANCE = mblaze
> PARAMETER DRIVER_NAME = cpu
> PARAMETER DRIVER_VER = 1.00.a
> PARAMETER EXECUTABLE = mblaze/code/executable.elf
> PARAMETER COMPILER = mb-gcc
> PARAMETER ARCHIVER = mb-ar
> PARAMETER DEFAULT_INIT = XMDSTUB
> PARAMETER DEBUG_PERIPHERAL = jtag
> PARAMETER STDIN = rs232
> PARAMETER STDOUT = rs232
> END
> :
> :
> BEGIN DRIVER
> PARAMETER HW_INSTANCE = hw_inst
> PARAMETER DRIVER_NAME = hw_driver
> PARAMETER DRIVER_VER = 1.00.a
> PARAMETER INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
> PARAMETER INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
> END
> :
> :
> BEGIN DRIVER
> PARAMETER HW_INSTANCE = intr_ctlr
> PARAMETER DRIVER_NAME = intc
> PARAMETER DRIVER_VER = 1.00.b
> PARAMETER LEVEL = 0
> END
> :
> :
>
> These both seem to be in order to me. The interrupts generated by the
> hw_inst sub_component are both connected to the intr input of the
> intc, and the irq output of the intc is connected to the interrupt
> input of the microblaze.
>
> My driver files for the hw_driver are as follows
> hw_driver.mdd is as follows:
>
> ### Start of file ###
> BEGIN driver XRhw_driver
> constant VERSION = 2.0.0 # uses SIF 2.0.0
> parameter LEVEL = 0 # default level
> END
>
> BEGIN level 0
> constant DEPENDS = (common_v1_00_a)
> constant CONFIG_INCLUDE = xparameters, VALUES = ( C_BASEADDR )
> parameter INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
> parameter INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
> END
> ### End of file ###
>
> hw_driver_v2_1_0.mdd is as follows:
>
> ### Start of file ###
> OPTION psf_version = 2.1;
>
> BEGIN driver hw_driver
> PARAM name = level, desc = "Driver Level", type = int, default = 0,
> range = (0);
>
> BEGIN BLOCK, dep = (level = 0)
> OPTION depends = (common_v1_00_a);
>
> BEGIN ARRAY interrupt_handler
> PROPERTY desc = "Interrupt Handler Information";
> PROPERTY size = 2, permit = none;
> PROPERTY default = ((Xhw_InterruptAHandler, interruptA),
> (Xhw_InterruptBHandler, interruptB));
> PARAM name = int_handler, desc = "Name of Interrupt Handler",
> type = string;
> PARAM name = int_port, desc = "Interrupt pin associated with the
> interrupt handler", permit = none;
> END ARRAY
> END BLOCK
> END driver
> ### End of file ###
>
> My hw_driver_v2_1_0.tcl file is:
>
> ### Start of File ###
> proc generate {drv_handle} {
> set level [xget_value $drv_handle "PARAMETER" "level"]
> if {$level == 0} {
> xdefine_include_file $drv_handle "xparameters.h" "Xhw_driver"
> "NUM_INSTANCES" "C_BASEADDR" "C_HIGHADDR"
> }
> }
> ### End of file ###
>
> It all seems in order to me. But I still get the same problems when I
> run libgen, and only interruptA works when I synthesise and download
> to the board.
>
> I am using EDK 3.2.2, with Memec Insight V2MB1000 Rev. 3A board, if
> that explains anything. (I have tried with EDK 6.1, but I get the same
> problem)
>
> I apologise for the amount of code posted, but I just can't figure out
> what I'm doing wrong.
>
> Thanks for all your help,
> Ciaran Hughes,
> National University of Ireland, Galway


Reply With Quote
  #7 (permalink)  
Old 01-26-2004, 09:11 AM
Ciaran
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Sathya,

The ports in my .mpd file are as follows

:
:
## Ports
PORT opb_abus = OPB_ABus, DIR = IN, VEC = [0:31], BUS = SOPB
PORT opb_be = OPB_BE, DIR = IN, VEC = [0:3], BUS = SOPB
PORT opb_clk = "", DIR = IN, SIGIS = CLK, BUS = SOPB
PORT opb_dbus = OPB_DBus, DIR = IN, VEC = [0:31], BUS = SOPB
PORT opb_rnw = OPB_RNW, DIR = IN, BUS = SOPB
PORT opb_rst = OPB_Rst, DIR = IN, BUS = SOPB
PORT opb_select = OPB_select, DIR = IN, BUS = SOPB
PORT opb_seqaddr = OPB_seqAddr, DIR = IN, BUS = SOPB
PORT sln_dbus = Sl_DBus, DIR = OUT, VEC = [0:31], BUS = SOPB
PORT sln_errack = Sl_errAck, DIR = OUT, BUS = SOPB
PORT sln_retry = Sl_retry, DIR = OUT, BUS = SOPB
PORT sln_toutsup = Sl_toutSup, DIR = OUT, BUS = SOPB
PORT sln_xferack = Sl_xferAck, DIR = OUT, BUS = SOPB

PORT HW_Clk = "", DIR = IN, SIGIS = CLK
PORT interruptA = "", DIR = OUT, LEVEL = HIGH, SIGIS = INTERRUPT
PORT interruptB = "", DIR = OUT, LEVEL = HIGH, SIGIS = INTERRUPT
PORT chA = "", DIR = OUT
PORT chB = "", DIR = OUT
PORT trigger = "", DIR = OUT
:
:

Both signals are declared as level sensitive interrupts.

Thank you,
(A very confused) Ciaran


Sathya Thammanur <[email protected]> wrote in message news:<[email protected]>...
> Hi Ciaran,
> Can you check if your MPD file of opb_hw_inst IP has SIGIS=INTERRUPT
> subproperty on each of the ports interruptA and interruptB ?
>
> Sathya
>
>
> Ciaran wrote:
> > Thanks for replying Sathya (and Paulo),
> >
> > Bear with me here, because I just can't figure out what I am doing
> > wrong.
> > My system.mhs file is as follows
> >
> > :
> > :
> > BEGIN microblaze
> > PARAMETER INSTANCE = mblaze
> > PARAMETER HW_VER = 2.00.a
> > PORT CLK = sys_clk
> > PORT INTERRUPT = mblaze_interrupt
> > BUS_INTERFACE DLMB = dlmb
> > BUS_INTERFACE ILMB = ilmb
> > BUS_INTERFACE DOPB = dopb
> > END
> > :
> > :
> > BEGIN opb_intc
> > PARAMETER INSTANCE = intr_ctlr
> > PARAMETER HW_VER = 1.00.c
> > PARAMETER C_BASEADDR = 0xFFFF8200
> > PARAMETER C_HIGHADDR = 0xFFFF82FF
> > PORT Intr = hw_interruptA & hw_interruptB
> > PORT Irq = mblaze_interrupt
> > PORT OPB_Clk = sys_clk
> > BUS_INTERFACE SOPB = dopb
> > END
> > :
> > :
> > BEGIN opb_hw_inst
> > PARAMETER INSTANCE = hw_inst
> > PARAMETER HW_VER = 1.03.b
> > PARAMETER C_BASEADDR = 0xFFFF8400
> > PARAMETER C_HIGHADDR = 0xFFFF85FF
> > PORT opb_clk = sys_clk
> > PORT interruptA = hw_interruptA
> > PORT interruptB = hw_interruptB
> > BUS_INTERFACE SOPB = dopb
> > END
> > :
> > :
> >
> > My system.mss file reads as follows
> > :
> > :
> > BEGIN PROCESSOR
> > PARAMETER HW_INSTANCE = mblaze
> > PARAMETER DRIVER_NAME = cpu
> > PARAMETER DRIVER_VER = 1.00.a
> > PARAMETER EXECUTABLE = mblaze/code/executable.elf
> > PARAMETER COMPILER = mb-gcc
> > PARAMETER ARCHIVER = mb-ar
> > PARAMETER DEFAULT_INIT = XMDSTUB
> > PARAMETER DEBUG_PERIPHERAL = jtag
> > PARAMETER STDIN = rs232
> > PARAMETER STDOUT = rs232
> > END
> > :
> > :
> > BEGIN DRIVER
> > PARAMETER HW_INSTANCE = hw_inst
> > PARAMETER DRIVER_NAME = hw_driver
> > PARAMETER DRIVER_VER = 1.00.a
> > PARAMETER INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
> > PARAMETER INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
> > END
> > :
> > :
> > BEGIN DRIVER
> > PARAMETER HW_INSTANCE = intr_ctlr
> > PARAMETER DRIVER_NAME = intc
> > PARAMETER DRIVER_VER = 1.00.b
> > PARAMETER LEVEL = 0
> > END
> > :
> > :
> >
> > These both seem to be in order to me. The interrupts generated by the
> > hw_inst sub_component are both connected to the intr input of the
> > intc, and the irq output of the intc is connected to the interrupt
> > input of the microblaze.
> >
> > My driver files for the hw_driver are as follows
> > hw_driver.mdd is as follows:
> >
> > ### Start of file ###
> > BEGIN driver XRhw_driver
> > constant VERSION = 2.0.0 # uses SIF 2.0.0
> > parameter LEVEL = 0 # default level
> > END
> >
> > BEGIN level 0
> > constant DEPENDS = (common_v1_00_a)
> > constant CONFIG_INCLUDE = xparameters, VALUES = ( C_BASEADDR )
> > parameter INT_HANDLER = Xhw_InterruptAHandler, INT_PORT = interruptA
> > parameter INT_HANDLER = Xhw_InterruptBHandler, INT_PORT = interruptB
> > END
> > ### End of file ###
> >
> > hw_driver_v2_1_0.mdd is as follows:
> >
> > ### Start of file ###
> > OPTION psf_version = 2.1;
> >
> > BEGIN driver hw_driver
> > PARAM name = level, desc = "Driver Level", type = int, default = 0,
> > range = (0);
> >
> > BEGIN BLOCK, dep = (level = 0)
> > OPTION depends = (common_v1_00_a);
> >
> > BEGIN ARRAY interrupt_handler
> > PROPERTY desc = "Interrupt Handler Information";
> > PROPERTY size = 2, permit = none;
> > PROPERTY default = ((Xhw_InterruptAHandler, interruptA),
> > (Xhw_InterruptBHandler, interruptB));
> > PARAM name = int_handler, desc = "Name of Interrupt Handler",
> > type = string;
> > PARAM name = int_port, desc = "Interrupt pin associated with the
> > interrupt handler", permit = none;
> > END ARRAY
> > END BLOCK
> > END driver
> > ### End of file ###
> >
> > My hw_driver_v2_1_0.tcl file is:
> >
> > ### Start of File ###
> > proc generate {drv_handle} {
> > set level [xget_value $drv_handle "PARAMETER" "level"]
> > if {$level == 0} {
> > xdefine_include_file $drv_handle "xparameters.h" "Xhw_driver"
> > "NUM_INSTANCES" "C_BASEADDR" "C_HIGHADDR"
> > }
> > }
> > ### End of file ###
> >
> > It all seems in order to me. But I still get the same problems when I
> > run libgen, and only interruptA works when I synthesise and download
> > to the board.
> >
> > I am using EDK 3.2.2, with Memec Insight V2MB1000 Rev. 3A board, if
> > that explains anything. (I have tried with EDK 6.1, but I get the same
> > problem)
> >
> > I apologise for the amount of code posted, but I just can't figure out
> > what I'm doing wrong.
> >
> > Thanks for all your help,
> > Ciaran Hughes,
> > National University of Ireland, Galway

Reply With Quote
  #8 (permalink)  
Old 02-24-2004, 11:13 PM
senstar
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Hello,

My name is Jeremy. I am working on a similar design with the microblaze but not having much sucess with the interrupts. I was wondering if you were able to sort out your problems? I am using a single interrupt directly to the Microblaze IRQ pin. My interrupt input halts my design but I don't think the ISR is being recognized. I was hopeful that you might be able to share your experience with me.

Thankyou
Jeremy

you may reply to
[email protected]

Reply With Quote
  #9 (permalink)  
Old 02-24-2004, 11:14 PM
senstar
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Hello,

My name is Jeremy. I am working on a similar design with the microblaze but not having much sucess with the interrupts. I was wondering if you were able to sort out your problems? I am using a single interrupt directly to the Microblaze IRQ pin. My interrupt input halts my design but I don't think the ISR is being recognized. I was hopeful that you might be able to share your experience with me.

Thankyou
Jeremy

you may reply to
[email protected]

Reply With Quote
  #10 (permalink)  
Old 02-24-2004, 11:21 PM
senstar
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Hello,

I am having a similar problem with microblaze. I have created a user peripherial with only 1 interrupt and have connected it directly to the mblaze IRQ input. I have hacked the IPIF driver and created a MDD to go with it. At this point I can generate all the code and libraries but when the application is executing and I generate the interrrupt using a pushbutton the application freezes and does not appear to execute the ISR. I think that the ISR is not being registered my the Mblaze. I was hoping you could share what you have learned. Have you sucessfully got your design to run? I would appreciate it if you could point me in the right direction before I pull out every last strand of my hair.

Thanks,
Jeremy

Reply With Quote
  #11 (permalink)  
Old 02-25-2004, 02:31 AM
hamilton
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

Jeremy,

Do you really think you will get three answers ???

senstar wrote:
> Hello,
>
> My name is Jeremy. I am working on a similar design with the microblaze but not having much sucess with the interrupts. I was wondering if you were able to sort out your problems? I am using a single interrupt directly to the Microblaze IRQ pin. My interrupt input halts my design but I don't think the ISR is being recognized. I was hopeful that you might be able to share your experience with me.
>
> Thankyou
> Jeremy
>
> you may reply to
> [email protected]
>


Reply With Quote
  #12 (permalink)  
Old 02-25-2004, 02:19 PM
senstar
Guest
 
Posts: n/a
Default I apologize for posting three times

I was having connection problems last night and it was my first time on this forum.

Hamilton, thank you for pointing out the obvious. Do you have anything constructive to offer on this topic?

Reply With Quote
  #13 (permalink)  
Old 02-27-2004, 01:37 PM
Frank van Eijkelenburg
Guest
 
Posts: n/a
Default Re: MicroBlaze User Peripheral with 2 interrupts

There are some EDK examples for the microblaze at the xilinx sites (also
working with interrupts). By the way, interrupts connected to the microblaze
directly needs to be level sensitive, in case of using an edge triggered
interrupt you'll need an interrupt controller.

Maybe you could better try the comp.arch.fpga newsgroup for these topics...

Frank

"senstar" <[email protected]> wrote in message
news:[email protected] lkaboutprogramming.com...
> Hello,
>
> My name is Jeremy. I am working on a similar design with the microblaze

but not having much sucess with the interrupts. I was wondering if you were
able to sort out your problems? I am using a single interrupt directly to
the Microblaze IRQ pin. My interrupt input halts my design but I don't think
the ISR is being recognized. I was hopeful that you might be able to share
your experience with me.
>
> Thankyou
> Jeremy
>
> you may reply to
> [email protected]
>



Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interrupts in Microblaze jerzy.zielinski FPGA 2 09-22-2006 04:13 PM
MicroBlaze SPI interrupts [email protected] FPGA 1 08-03-2006 05:45 PM
How to Connect User-Defined Master Peripheral to SDRAM Slave Peripheral in SOPC Builder Pino FPGA 0 06-26-2004 11:44 PM
Microblaze interrupts Reiner Abl FPGA 0 12-12-2003 11:09 AM


All times are GMT +1. The time now is 12:01 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved