J
John Oyler
Guest
I have two 8bit busses, both bi-directional. When the value on one bus
matches some arbitrary values, I'd like the same value to be output
onto the second bus. So far, I have something like this (simplified
example, removed irrelevant stuff):
module coprocessor(
sync,
clkin,
sysdata,
cpudata,
);
inout[7:0] sysdata, cpudata;
input sync, clkin;
reg [7:0] data;
always @( posedge clkin)
begin
if (sync == 1)begin
case (sysdata)
8'h00 : begin
data <= sysdata;
end
default : begin
data <= sysdata;
end
end
else begin
data <= sysdata;
end
end
assign cpudata = tristate? 8'h00 : data;
endmodule
This is how it was explained to me on this newsgroup just last week.
(whoever that was, not blaming you... obviously, I don't know enough
to even follow your example that well).
I'm assuming that to even use a tristate, there's some include that
needs to be done, but nothing obvious in Xilinx's ISE is there for me
to do it with. Could someone point out what exactly it is that I'm
screwing up?
Thanks,
John O.
matches some arbitrary values, I'd like the same value to be output
onto the second bus. So far, I have something like this (simplified
example, removed irrelevant stuff):
module coprocessor(
sync,
clkin,
sysdata,
cpudata,
);
inout[7:0] sysdata, cpudata;
input sync, clkin;
reg [7:0] data;
always @( posedge clkin)
begin
if (sync == 1)begin
case (sysdata)
8'h00 : begin
data <= sysdata;
end
default : begin
data <= sysdata;
end
end
else begin
data <= sysdata;
end
end
assign cpudata = tristate? 8'h00 : data;
endmodule
This is how it was explained to me on this newsgroup just last week.
(whoever that was, not blaming you... obviously, I don't know enough
to even follow your example that well).
I'm assuming that to even use a tristate, there's some include that
needs to be done, but nothing obvious in Xilinx's ISE is there for me
to do it with. Could someone point out what exactly it is that I'm
screwing up?
Thanks,
John O.