04-10-2014 05:21 AM
I wish to have suggestion and ideas for the specific and unique task.
I have an IP core which has inout ports of 12 bit to connect with, so it is described in mhs and mpd as DIR = IO,
But, I should restrict few bits in the available io pins. say for example [9:12] as a input pin. That is, that IO port at
pins [9:12] should not act like output or inout port.
For your information : All the 12 bits inout are connected to external ports!.
Could any body suggest the way to acheive it?
04-10-2014 08:50 AM
If the code that you write never drives the port then it will simply be an input only.
module example ( input data_out[8:0], // Data to be written input data_tri, // Tri-state conbtrol output data_in[12:0], // Data to be read inout data_io[12:0] // External port ); // Bi-directional I/O assign data_io[8:0] = (data_tri = '1') ? 9'bz : data_out[8:0]; // Always read the I/O assign data_in[12:0]= data_io[12:0]; endmodule
04-10-2014 10:22 PM
Thanks for the immediate response.
It would be helpful if I supposed to change the code.
The problem is given IO port is in IP, I am not supposed to change the coding of IP core.
Rather I should use those 12 pins assigned for 12 bit IO port such that 4 pins as a outputs only and 4 pins as inputs only and remaining pins as a Inout pins.
Is there any possiblity to reuse the IO ports assigned to IO pins(external) as input or output or inout at different time of access?
Is it possible to use some pins in the 12 bit IO port as a input or output or inout in the same time?
kindly suggest me methods please...
04-11-2014 08:23 AM
If the bidirectional output control is in a block that you cannot modify then there is nothing that you cannot do about this.
You have been very vague on what this IP block is and why you need to prevent some bits of the bus from driving out. Hopefully there is a control register with the IP block that will allow you to achieve your goal.
04-15-2014 03:39 AM
Yes, You are correct there is a configure register in IP for input output configuration.
I did it with that.
Thanks a lot.
One clarification! Do all the IPs having IO port do have these kind of configuration registers?
If not what are all the other possiblities?