43 parameter CONTROL_ADDR =
'h0000,
// AXI write address of control write registers 45 parameter NUM_CYCLES_LOW_BIT=
6,
// decode addresses [NUM_CYCLES_LOW_BIT+:5] into command a/d length 82 input mrst,
// @posedge mclk - sync reset 83 input arst,
// @posedge axi_clk - sync reset 84 // direct commands from AXI. No wait but for multi-cycle output and command sequencer (having higher priority) 86 input start_wburst,
// burst start - should generate ~ready (should be AND-ed with !busy internally) 89 input [
31:
0]
wdata,
// write data, valid with waddr and wr_en 90 output busy,
// interface busy (combinatorial delay from start_wburst and pre_addr), controls AXI FIFO 92 // frame-based commands from the command sequencer (no wait but for multi-cycle output 95 input [
31:
0]
cseq_wdata,
// write data, valid with cseq_waddr and cseq_wr_en 96 output cseq_ackn,
// command sequencer address/data accepted 97 // Write address /data/strobe to slaves. Both parallel and byte-serial data available. COmbined from AXI and command sequencer 99 output [
31:
0]
par_data,
// parallel 32-bit data 100 output [
7:
0]
byte_ad,
// byte-wide address/data (AL-AH-DB0-DB1-DB2-DB3) 101 output ad_stb // low address output strobe (and parallel A/D) 103 // Minimal - 1 cycle, AH=DB0=DB1=DB2=DB3=0; 105 reg selected=
0;
// address range to be processed here (outside - buffer(s) and command sequencer?) 108 wire ss;
// current command (in par_waddr) is a single-cycle one 110 reg ad_stb_r;
// low address output strobe (and parallel A/D) 111 reg cmdseq_full_r;
// address/data from the command sequencer is loaded to internal register (cseq_waddr_r,cseq_wdata_r) 114 reg [
3:
0]
seq_length;
// encoded ROM output - number of cycles in command sequence, [3] - single cycle 115 reg [
4:
0]
seq_busy_r;
// shift register loaded by decoded seq_length 118 wire can_start_w;
// can start command cycle (either from sequencer or from AXI) 130 assign byte_ad=
par_ad[
7:
0];
// byte-wide address/data (AL-AH-DB0-DB1-DB2-DB3) 131 assign ad_stb=
ad_stb_r;
// low address output strobe (and parallel A/D) 143 // ROM command length decoder TODO: put actual data 144 // always @ (seq_length_rom_a) begin 221 /* FIFO to cross clock boundary **/ 225 )
fifo_cross_clocks_i (
226 .
rst (
1'b0),
// input
10183waddr_fifo_outwire[AXI_WR_ADDR_BITS-1:0]
fifo_cross_clocks_i fifo_cross_clocks
[DATA_WIDTH-1:0] 10404data_out
10178seq_length_rom_awire[4:0]
[AXI_WR_ADDR_BITS-1:0] 10162par_waddr
[AXI_WR_ADDR_BITS-1:0] 10158cseq_waddr
[AXI_WR_ADDR_BITS-1:0] 10152pre_waddr
10175cseq_wdata_rreg[31:0]
10174cseq_waddr_rreg[AXI_WR_ADDR_BITS-1:0]
10184wdata_fifo_outwire[31:0]
[DATA_WIDTH-1:0] 10403data_in
[AXI_WR_ADDR_BITS-1:0] 10154waddr
10114CONTROL_ADDR_MASK'h3800