B
bmarchio
Guest
I'm a lone Verilog-er at my present company and need a sanity check for
some busses that I've coded into a PLD.
My PLD interfaces with an ASIC and a processor. The PLD is supposed to
poll the ASIC every few hundred clocks and do some maintenance thereto.
The processor can also read and write to the ASIC when it needs to. I
think my arbitration is okay, but I feel shaky about my bidirectionals:
/*************************************/
// port declarations
inout [7:0] dataB_up; // data bus to/from processor
inout [7:0] dataB_asic; // data bus to/from asic
// internals
wire [7:0] data_up;
wire [7:0] data_asic;
reg [7:0] dout_asic; // to output to asic when I write
// logic
// n.b., read and write are active low
// "poll" is the signal that tells me that it's time to poll, or i'm in
// the middle of a poll read/write sequence.
assign data_up = dataB_up;
assign dataB_up = _rd ? 8'hzz : data_asic;
assign data_cirrus = dataB_asic;
assign dataB_cirrus = _wr ? 8'hzz : (poll ? dout_asic : data_up);
/**********************************/
Anybody see any issues? Many thanks -
Bmarchio
some busses that I've coded into a PLD.
My PLD interfaces with an ASIC and a processor. The PLD is supposed to
poll the ASIC every few hundred clocks and do some maintenance thereto.
The processor can also read and write to the ASIC when it needs to. I
think my arbitration is okay, but I feel shaky about my bidirectionals:
/*************************************/
// port declarations
inout [7:0] dataB_up; // data bus to/from processor
inout [7:0] dataB_asic; // data bus to/from asic
// internals
wire [7:0] data_up;
wire [7:0] data_asic;
reg [7:0] dout_asic; // to output to asic when I write
// logic
// n.b., read and write are active low
// "poll" is the signal that tells me that it's time to poll, or i'm in
// the middle of a poll read/write sequence.
assign data_up = dataB_up;
assign dataB_up = _rd ? 8'hzz : data_asic;
assign data_cirrus = dataB_asic;
assign dataB_cirrus = _wr ? 8'hzz : (poll ? dout_asic : data_up);
/**********************************/
Anybody see any issues? Many thanks -
Bmarchio