cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aschweiz
Visitor
Visitor
2,248 Views
Registered: ‎03-12-2018

SDK2018.1 error generating BSP for microblaze mcs with external interrupts

Jump to solution

Hello,

 

I'm getting an error if I try to generate a BSP for a microblaze mcs design with external interrupts enabled. May be I'm doing something wrong, or may be it's a bug in the tools?

 

The error message in the SDK log is:

14:06:32 ERROR : (XSDB Server)ERROR: [Hsi 55-1545
14:06:32 ERROR : (XSDB Server)] Problem running tcl command ::sw_iomodule_v2_5::generate : can't read "source_periph(0)": no such variable
while executing
"if {$source_periph($i) == ""} {
continue
}"
("foreach" body line 42)
invoked from within
"foreach periph $periphs {

# Get the edk based name of peripheral for printing redefines
set edk_periph_name [common::get_property NAM..."
(procedure "xredefine_iomodule" line 11)
invoked from within
"xredefine_iomodule $drv_handle $file_handle"
(procedure "xdefine_canonical_xpars" line 70)
invoked from within
"xdefine_canonical_xpars $drv_handle "xparameters.h" "IOModule" $all_params"
(procedure "::sw_iomodule_v2_5::generate" line 81)
invoked from within
"::sw_iomodule_v2_5::generate microblaze_mcs_0_iomodule_0"
ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()

14:06:32 ERROR : (XSDB Server)ERROR: [Hsi 55-1450] Error: running generate_bsp
14:06:32 ERROR : (XSDB Server).

14:06:32 ERROR : Error generating bsp sources: Failed in generating sources

 

As a result, xparameters.h is incomplete and doesn't compile; it ends with these lines:

#define XPAR_IOMODULE_0_INTC_LEVEL_EDGE 0x0000U
#define XPAR_IOMODULE_0_INTC_POSITIVE 0xFFFFU

 

If I disable external interrupts for the microblaze mcs in Vivado and re-generate the BSP, the error disappears.

 

I tried with a minimal project from scratch and get the same error.

 

Did anybody else notice this problem, or have an idea how to fix it?

 

thanks and greetings,

Andreas

 

0 Kudos
1 Solution

Accepted Solutions
stephenm
Xilinx Employee
Xilinx Employee
2,402 Views
Registered: ‎09-12-2007

This looks like a bug in the TCL code for the iomodule. For example, if you enable the trace in the SDK debug you will see more information on the error:

trace_sdk.png

note: to change the go to window -> preferences -> Xilinx SDK -> Log Information Level, and change this to Trace.

 

So, the TCL will get the amount of interrupt connected ot the interrupt port, then it will then get the solurce ports. Their is a mismatch here (ie the source ports are returning 0 ports, while num_intr_ports is expecting 1). This can be called bad TCL coding as you prob shouldn't use a delimiter for one array, in another array...

 

To workaround the issue, you can update your iomodule.tcl file (2018.1\data\embeddedsw\XilinxProcessorIPLib\drivers\iomodule_v2_5\data) with the one attached.

 

Here, I added a catch:

        if {$source_ports == "" && [get_num_intr_inputs $periph] != 0} {
         set source_ports [debug $periph]
        }

 

Then I manually populate this using the debug proc:

proc debug {periph} {
 set interrupt_pin [::hsi::get_pins -of_objects $periph -filter {TYPE==INTERRUPT && DIRECTION==I}]
 set cell [::hsi::get_cells -of_objects $interrupt_pin]
 set net [::hsi::get_nets -of_objects $interrupt_pin]
 set signal [common::get_property NAME $net]
 set sig_net [::hsi::get_nets -of_objects $cell $signal]
 set source_pin [::hsi::get_pins -of_objects $sig_net -filter {DIRECTION==I}]
 return $source_pin
}

 

This should workaround your particular issue.

 

 

View solution in original post

0 Kudos
8 Replies
ibaie
Xilinx Employee
Xilinx Employee
2,183 Views
Registered: ‎10-06-2016

Hi @aschweiz,

 

Not sure if this an issue in the design by itself or the tools. Could you share the HDF file of the "minimal project" you have been using to reproduce the issue? That might be useful to reproduce it on our end and have an example design without requiring to ask all the parameters you have been using :)

 

Regards,

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
ibaie
Xilinx Employee
Xilinx Employee
2,147 Views
Registered: ‎10-06-2016
Hi @aschweiz,

Are you still facing this issue? We did not hear you back since the last post so just wondering if you came accross the issue. If so, please would be great if you could share your solution/workaround as it could be used by other community members in the future.

Regards
Ibai

Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
aschweiz
Visitor
Visitor
2,137 Views
Registered: ‎03-12-2018

Hi Ibai,

 

the problem still exists. I don't have the test project any more but I've attached the hdf of the main project. It's not that big either. 

Hope it's possible to reproduce the issue with it.

 

Thanks for your help and greetings

Andreas

 

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
2,403 Views
Registered: ‎09-12-2007

This looks like a bug in the TCL code for the iomodule. For example, if you enable the trace in the SDK debug you will see more information on the error:

trace_sdk.png

note: to change the go to window -> preferences -> Xilinx SDK -> Log Information Level, and change this to Trace.

 

So, the TCL will get the amount of interrupt connected ot the interrupt port, then it will then get the solurce ports. Their is a mismatch here (ie the source ports are returning 0 ports, while num_intr_ports is expecting 1). This can be called bad TCL coding as you prob shouldn't use a delimiter for one array, in another array...

 

To workaround the issue, you can update your iomodule.tcl file (2018.1\data\embeddedsw\XilinxProcessorIPLib\drivers\iomodule_v2_5\data) with the one attached.

 

Here, I added a catch:

        if {$source_ports == "" && [get_num_intr_inputs $periph] != 0} {
         set source_ports [debug $periph]
        }

 

Then I manually populate this using the debug proc:

proc debug {periph} {
 set interrupt_pin [::hsi::get_pins -of_objects $periph -filter {TYPE==INTERRUPT && DIRECTION==I}]
 set cell [::hsi::get_cells -of_objects $interrupt_pin]
 set net [::hsi::get_nets -of_objects $interrupt_pin]
 set signal [common::get_property NAME $net]
 set sig_net [::hsi::get_nets -of_objects $cell $signal]
 set source_pin [::hsi::get_pins -of_objects $sig_net -filter {DIRECTION==I}]
 return $source_pin
}

 

This should workaround your particular issue.

 

 

View solution in original post

0 Kudos
aschweiz
Visitor
Visitor
2,107 Views
Registered: ‎03-12-2018

Hi stephenm,

 

with the modified TCL script, it works - thanks a lot, also for explaining how to enable more detailed logging!

 

cheers, Andreas

0 Kudos
wisnuk@w
Observer
Observer
1,520 Views
Registered: ‎01-13-2019

Hi Steph!

I have a similar issue , could you tell me please spesific line on iomodule.tcl i attach the code . or may i drop wherever i want ex: end of the iomodule.tcl line, i will be glad if you response my question.

thank you very much

0 Kudos
mguyard
Adventurer
Adventurer
1,140 Views
Registered: ‎10-01-2013

Hello;

Thank you for the fix.

I used 3 interrupts and it seems I always have an issue

(XSDB Server)ERROR: [Hsi 55-1545] Problem running tcl command ::sw_iomodule_v2_5::generate : can't read "source_periph(2)": no such element in array
while executing
"if {$source_periph($i) == ""} {
continue
}"
("foreach" body line 49)
invoked from within
"foreach periph $periphs {

# Get the edk based name of peripheral for printing redefines
set edk_periph_name [common::get_property NAM..."
(procedure "xredefine_iomodule" line 11)
invoked from within
"xredefine_iomodule $drv_handle $file_handle"
(procedure "xdefine_canonical_xpars" line 70)
invoked from within
"xdefine_canonical_xpars $drv_handle "xparameters.h" "IOModule" $all_params"
(procedure "::sw_iomodule_v2_5::generate" line 81)
invoked from within
"::sw_iomodule_v2_5::generate microblaze_mcs_0_iomodule_0"
ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()

13:48:39 ERROR : (XSDB Server)ERROR: [Hsi 55-1450] Error: running gen
13:48:39 ERROR : (XSDB Server)erate_bsp.

 

Please let me know if something should be added into the fix.

Thank you in advance

0 Kudos
mguyard
Adventurer
Adventurer
1,074 Views
Registered: ‎10-01-2013

Hi all;

it will be nice to have some help for the request above.

Thank you

0 Kudos