Microblaze, XEM3010, can't get FronPanel API to recognize device

I’ve managed to add OpalKelly modules as a peripheral to the Microblaze’s PLB bus. In order to do so I had to modify the okLibary.v file to remove the inout ports and IOBUFs and allow the unmuxed signals to connect out. This way XPS is happy.

module okHost(hi_in, hi_out, hi_inout_I, hi_inout_O, hi_inout_T, ti_clk, ok1, ok2);
  input  wire [7:0]  hi_in;
  output wire [1:0]  hi_out;
  input  wire [15:0] hi_inout_I;
  output wire [15:0] hi_inout_O;
  output wire        hi_inout_T;

  output wire        ti_clk;
  output wire [30:0] ok1;
  input  wire [16:0] ok2;

  wire [15:0] hi_datain;
  wire [15:0] hi_dataout;
  wire [2:0]  hi_out_core;
  wire        hi_drive_b = ~hi_out_core[2];

  assign hi_inout_O =  hi_dataout;
  assign hi_datain = hi_inout_I;
  assign hi_inout_T = hi_drive_b;
  
  // Clock buffer for the Host Interface clock.
  BUFGDLL clkbuf(.I(hi_in[0]), .O(ti_clk));
  
  // Instantiate bidirectional IOBUFs for the hi_data lines.
  //IOBUF iobuf0(.T(hi_drive_b),  .O(hi_datain[0]),  .I(hi_dataout[0]),  .IO(hi_inout[0]));
  //IOBUF iobuf1(.T(hi_drive_b),  .O(hi_datain[1]),  .I(hi_dataout[1]),  .IO(hi_inout[1]));
  //IOBUF iobuf2(.T(hi_drive_b),  .O(hi_datain[2]),  .I(hi_dataout[2]),  .IO(hi_inout[2]));
  //IOBUF iobuf3(.T(hi_drive_b),  .O(hi_datain[3]),  .I(hi_dataout[3]),  .IO(hi_inout[3]));
  //IOBUF iobuf4(.T(hi_drive_b),  .O(hi_datain[4]),  .I(hi_dataout[4]),  .IO(hi_inout[4]));
  //IOBUF iobuf5(.T(hi_drive_b),  .O(hi_datain[5]),  .I(hi_dataout[5]),  .IO(hi_inout[5]));
  //IOBUF iobuf6(.T(hi_drive_b),  .O(hi_datain[6]),  .I(hi_dataout[6]),  .IO(hi_inout[6]));
  //IOBUF iobuf7(.T(hi_drive_b),  .O(hi_datain[7]),  .I(hi_dataout[7]),  .IO(hi_inout[7]));
  //IOBUF iobuf8(.T(hi_drive_b),  .O(hi_datain[8]),  .I(hi_dataout[8]),  .IO(hi_inout[8]));
  //IOBUF iobuf9(.T(hi_drive_b),  .O(hi_datain[9]),  .I(hi_dataout[9]),  .IO(hi_inout[9]));
  //IOBUF iobuf10(.T(hi_drive_b), .O(hi_datain[10]), .I(hi_dataout[10]), .IO(hi_inout[10]));
  //IOBUF iobuf11(.T(hi_drive_b), .O(hi_datain[11]), .I(hi_dataout[11]), .IO(hi_inout[11]));
  //IOBUF iobuf12(.T(hi_drive_b), .O(hi_datain[12]), .I(hi_dataout[12]), .IO(hi_inout[12]));
  //IOBUF iobuf13(.T(hi_drive_b), .O(hi_datain[13]), .I(hi_dataout[13]), .IO(hi_inout[13]));
  //IOBUF iobuf14(.T(hi_drive_b), .O(hi_datain[14]), .I(hi_dataout[14]), .IO(hi_inout[14]));
  //IOBUF iobuf15(.T(hi_drive_b), .O(hi_datain[15]), .I(hi_dataout[15]), .IO(hi_inout[15]));

  OBUF obuf0(.I(hi_out_core[0]), .O(hi_out[0]));
  OBUF obuf1(.I(hi_out_core[1]), .O(hi_out[1]));

  // Instantiate the core Host Interface.
  okCore hicore(.hi_in({hi_in[7:1], ti_clk}), .hi_out(hi_out_core),
                .hi_datain(hi_datain), .hi_dataout(hi_dataout),
                .ok1(ok1), .ok2(ok2));
endmodule

But I am not able to raise the endpoints in FrontPanel. IsFrontPanelEnabled() fails. I’m not sure where the issue lies.

Why did you need to make changes to okLibrary.v to connect endpoints to Microblaze?

Because XPS gives an error if I directly use an inout port. In actuality it breaks the inout port into its set of three _I _O and _T ports automatically. In that case, synthesis is unable to find okHost since the ports don’t match. I have to modify okHost to be able to use those three ports instead of one.

We have several folks using FrontPanel with Microblaze. Maybe one of them can chime in on their experiences, but we haven’t heard of anything dramatic that needed to be done.

Are you trying to somehow attach FrontPanel endpoints directly to the PLB bus or something similar?

No I’m setting the FrontPanel pins as external and attaching them to pads using the UCF file. I’m not touching the PLB interface.

OK It seems that now its working. I moved the okHost module to the top level. So now it does not require any modifications in okLibrary.v

Ah. Yes. Any instantiations of I/O components need to be at the top level.