C
CupOfWater
Guest
Hi, I have some questions over the use of inout ports. Say I have a
closed source module (my_mod) that contains an 8 bit command i/o bus
declared as inout. Now in the module one level higher I'm trying to
communicate with F0. I'm using an 8 bit bus and an 8 bit register for
this purpose. I want any command written to the register to be
communicated to F0; and I want any command written out by F0 to be
available in the register. What kind of support does verilog have for
what I need?
here are some code to show what I mean:
module tb;
reg [7:0] io;
wire [7:0] io_status;
my_mod F0(
.io(io_status)
);
initial begin
io = 8'hxx;
statusread; // this is a task
#400 $stop;
end
/*
always@(io_status)
io = io_status; //syntax error
*/
assign io_status = io;
....
endmodule
now it appears that if I do:
io = 8'ha0;
then the module sees A0 on the bus and does some stuff. But I can't
seem to get a response from the module. From just what I have here,
do I have enough to do what I want to do?
Thanks in advance.
-K
closed source module (my_mod) that contains an 8 bit command i/o bus
declared as inout. Now in the module one level higher I'm trying to
communicate with F0. I'm using an 8 bit bus and an 8 bit register for
this purpose. I want any command written to the register to be
communicated to F0; and I want any command written out by F0 to be
available in the register. What kind of support does verilog have for
what I need?
here are some code to show what I mean:
module tb;
reg [7:0] io;
wire [7:0] io_status;
my_mod F0(
.io(io_status)
);
initial begin
io = 8'hxx;
statusread; // this is a task
#400 $stop;
end
/*
always@(io_status)
io = io_status; //syntax error
*/
assign io_status = io;
....
endmodule
now it appears that if I do:
io = 8'ha0;
then the module sees A0 on the bus and does some stuff. But I can't
seem to get a response from the module. From just what I have here,
do I have enough to do what I want to do?
Thanks in advance.
-K