Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHow to add an userlogic to the tri-state bridge?
I want add an user logic in CPLD to NiosII which resides in FPGA, the logic is some registers and I want to add it to the tri-state bridge, thus Nios can write or read these registers through the tri...
Altera_Forum
Honored Contributor
21 years agoFor example your device in CPLD
module yourdevice (reset, address, write, read, data); input reset; input write, read; inout [7:0] data; input [3:0] address; reg [7:0] REG1; .... assign data = (!address && read)? REG1:8'bzzzzzzzz; //some code always @ (address or reset or or write) begin if (reset) REG1 <= 0; else if (address==0) REG1 <= data; end endmodule Your hdl file for Interface to user logic: module yourdevice ( reset, address, write, read, data); input reset; input write, read; inout [7:0] data; input [3:0] address; endmodule