P
Philipp Klaus Krause
Guest
How well can the synthesis tools deal with tristates?
If I use the following Verilog code for a Xilinx CPLD, with t as the
top-level module, and data_io and addr_i connected to I/O ports. Will
this work as intended?
module b(data_io, addr_i);
inout[6:0] data_io;
input[12:0] addr_i;
assign data_io = (addr_i == 321) ? 7'b1111111 : 7'bZZZZZZZ;
endmodule
module i(data_io, addr_i);
inout[1:0] data_io;
input[12:0] addr_i;
assign data_io = (addr_i == 123) ? 2'b00 : 2'bZZ;
endmodule
module t();
inout[6:0] data_io;
input[12:0] addr_i;
b b(data_io[6:0], addr_i);
i i(data_io[1:0], addr_i);
endmodule
If I use the following Verilog code for a Xilinx CPLD, with t as the
top-level module, and data_io and addr_i connected to I/O ports. Will
this work as intended?
module b(data_io, addr_i);
inout[6:0] data_io;
input[12:0] addr_i;
assign data_io = (addr_i == 321) ? 7'b1111111 : 7'bZZZZZZZ;
endmodule
module i(data_io, addr_i);
inout[1:0] data_io;
input[12:0] addr_i;
assign data_io = (addr_i == 123) ? 2'b00 : 2'bZZ;
endmodule
module t();
inout[6:0] data_io;
input[12:0] addr_i;
b b(data_io[6:0], addr_i);
i i(data_io[1:0], addr_i);
endmodule