x393  1.0
FPGAcodeforElphelNC393camera
mult_saxi_wr.v
Go to the documentation of this file.
1 
42 `timescale 1ns/1ps
43 
44 module mult_saxi_wr #(
45  parameter MULT_SAXI_ADDR = 'h730, // ..'h737
46  parameter MULT_SAXI_CNTRL_ADDR = 'h738, // ..'h739
47  parameter MULT_SAXI_STATUS_REG = 'h34, //..'h37 uses 4 consecutive locations
48  parameter MULT_SAXI_HALF_BRAM = 1, // 0 - use full 36Kb BRAM for the buffer, 1 - use just half
49  parameter MULT_SAXI_BSLOG0 = 4, // number of bits to represent burst size (4 - b.s. = 16, 0 - b.s = 1)
50  parameter MULT_SAXI_BSLOG1 = 4,
51  parameter MULT_SAXI_BSLOG2 = 4,
52  parameter MULT_SAXI_BSLOG3 = 4,
53  parameter MULT_SAXI_MASK = 'h7f8, // 4 address/length pairs. In bytes, but lower bits are set to 0?
54  parameter MULT_SAXI_CNTRL_MASK = 'h7fe, // mode and status - 2 locations
55  parameter MULT_SAXI_AWCACHE = 4'h3, //..7 cache mode (4 bits, default 4'h3)
56  parameter MULT_SAXI_ADV_WR = 4, // number of clock cycles before end of write to genearte adv_wr_done
57  parameter MULT_SAXI_ADV_RD = 3 // number of clock cycles before end of write to genearte adv_wr_done
58 
59 ) (
60 // input rst, // global reset
61  input mclk, // system clock
62  input aclk, // global clock to run s_axi (@150MHz?)
63  input mrst, // @mclk sync reset
64  input arst, // @aclk sync reset
65  // command interface
66  input [7:0] cmd_ad, // byte-serial command address/data (up to 6 bytes: AL-AH-D0-D1-D2-D3
67  input cmd_stb, // strobe (with first byte) for the command a/d
68  output [7:0] status_ad, // status address/data - up to 5 bytes: A - {seq,status[1:0]} - status[2:9] - status[10:17] - status[18:25]
69  output status_rq, // input request to send status downstream
70  input status_start, // Acknowledge of the first status packet byte (address)
71 
72  output en_chn0, // @mclk enable channel 0 input FIFO ( 0 - reset)
73  input has_burst0, // channel has at least 1 burst (should go down immediately after read_burst0 if no more data)
74  output read_burst0, // request to read a burst of data from channel 0
75  input [31:0] data_in_chn0, // data read from channel 0 (with some latency)
76  input pre_valid_chn0,// data valid (same latency)
77 
78  output en_chn1, // @mclk enable channel 1 input FIFO ( 0 - reset)
79  input has_burst1, // channel has at least 1 burst (should go down immediately after read_burst0 if no more data)
80  output read_burst1, // request to read a burst of data from channel 0
81  input [31:0] data_in_chn1, // data read from channel 0 (with some latency)
82  input pre_valid_chn1,// data valid (same latency)
83 
84  output en_chn2, // @mclk enable channel 2 input FIFO ( 0 - reset)
85  input has_burst2, // channel has at least 1 burst (should go down immediately after read_burst0 if no more data)
86  output read_burst2, // request to read a burst of data from channel 0
87  input [31:0] data_in_chn2, // data read from channel 0 (with some latency)
88  input pre_valid_chn2,// data valid (same latency)
89 
90  output en_chn3, // @mclk enable channel 3 input FIFO ( 0 - reset)
91  input has_burst3, // channel has at least 1 burst (should go down immediately after read_burst0 if no more data)
92  output read_burst3, // request to read a burst of data from channel 0
93  input [31:0] data_in_chn3, // data read from channel 0 (with some latency)
94  input pre_valid_chn3,// data valid (same latency)
95 
96  // S_AXI inerface w/o read channel
97  // write address
98  output [31:0] saxi_awaddr, // AXI PS Slave GP0 AWADDR[31:0], input
99  output saxi_awvalid, // AXI PS Slave GP0 AWVALID, input
100  input saxi_awready, // AXI PS Slave GP0 AWREADY, output
101  output [5:0] saxi_awid, // AXI PS Slave GP0 AWID[5:0], input
102  output [1:0] saxi_awlock, // AXI PS Slave GP0 AWLOCK[1:0], input
103  output [ 3:0] saxi_awcache, // AXI PS Slave GP0 AWCACHE[3:0], input
104  output [ 2:0] saxi_awprot, // AXI PS Slave GP0 AWPROT[2:0], input
105  output [ 3:0] saxi_awlen, // AXI PS Slave GP0 AWLEN[3:0], input
106  output [ 1:0] saxi_awsize, // AXI PS Slave GP0 AWSIZE[1:0], input
107  output [ 1:0] saxi_awburst, // AXI PS Slave GP0 AWBURST[1:0], input
108  output [ 3:0] saxi_awqos, // AXI PS Slave GP0 AWQOS[3:0], input
109  // write data
110  output [31:0] saxi_wdata, // AXI PS Slave GP0 WDATA[31:0], input
111  output saxi_wvalid, // AXI PS Slave GP0 WVALID, input
112  input saxi_wready, // AXI PS Slave GP0 WREADY, output
113  output [ 5:0] saxi_wid, // AXI PS Slave GP0 WID[5:0], input
114  output saxi_wlast, // AXI PS Slave GP0 WLAST, input
115  output [ 3:0] saxi_wstrb, // AXI PS Slave GP0 WSTRB[3:0], input
116  // write response Not used - may add guaranteed address (as for the histogram)?
117  input saxi_bvalid, // AXI PS Slave GP0 BVALID, output // @SuppressThisWarning VEditor unused
118  output saxi_bready, // AXI PS Slave GP0 BREADY, input
119  input [ 5:0] saxi_bid, // AXI PS Slave GP0 BID[5:0], output //TODO: Update range !!! // @SuppressThisWarning VEditor unused
120  input [ 1:0] saxi_bresp // AXI PS Slave GP0 BRESP[1:0], output // @SuppressThisWarning VEditor unused
121 );
122 // parameter MULT_SAXI_BSLOG0 = 4, // number of bits to represent burst size (4 - b.s. = 16, 0 - b.s = 1)
123 
124 // localparam BURSTS_CAP0= (MULT_SAXI_HALF_BRAM ? 'h400 : 'h800 ) / MULT_SAXI_BURST0 / 4;
125  localparam BRAM_A_WDTH = MULT_SAXI_HALF_BRAM?9:10;
126  localparam CHN_A_WDTH = BRAM_A_WDTH - 2;
127 
128  wire [3:0] en_chn_mclk;
129  wire [3:0] run_chn_mclk;
130  reg [7:0] mode_reg;
131  wire en_mclk= |en_chn_mclk; // at least one channel enabled
132  reg [3:0] en_chn_aclk;
133  wire en_aclk= |en_chn_aclk; // at least one channel enabled
134  wire [3:0] rq_wr;
135  wire [3:0] grant_wr;
136  wire [4 * CHN_A_WDTH - 1:0] wa_chn;
137  wire [3:0] adv_wr_done; // outputs grant_wr for short bursts, or several clocks before end of wr
138  wire [3:0] rq_out_chn;
139  wire [4 * CHN_A_WDTH - 1:0] ra_chn;
140  wire [3:0] pre_re;
141 
142  reg en_we_arb; // @mclk should be reset by we_grant
143  wire we_grant; // @mclk
144  wire [1:0] we_cur_chn; // @mclk
145  wire [127:0] data_in;
146  wire [3:0] pre_valid;
147  reg [3:0] valid;
148  reg [BRAM_A_WDTH-1:0] buf_wa; // multiplexed buffer write address
149  reg [31:0] buf_wd; // multiplexed buffer write data
150  reg buf_we; // multiplexed buffer write enable
151 
152  wire [3:0] grant_rd;
155  wire [1:0] re_cur_chn;
156 
157  reg [BRAM_A_WDTH-1:0] buf_ra; // multiplexed buffer write address
158  wire [31:0] inter_buf_data; // multiplexed buffer write data
159  reg [2:0] buf_re; // multiplexed buffer write enable
160 
161  wire fifo_half_full; // output FIFO saxi_wdata is half full (stop writing to)
162  wire fifo_nempty; // output FIFO saxi_wdata is not empty (can read)
163  wire [3:0] wdata_busy_chn; // output data busy (ends early to start next arbitration)
164  wire [3:0] first_re; // reading first word in a burst from the buffer
165  wire [3:0] last_re; // reading first word in a burst from the buffer
166 
167  wire [3:0] cmd_a;
168  wire [31:0] cmd_data;
169 
170  wire we_ctrl;
172 
173  assign saxi_bready=1'b1;
174 
175  assign {en_chn3, en_chn2, en_chn1, en_chn0} = en_chn_mclk;
176 
177  assign {read_burst3, read_burst2, read_burst1, read_burst0} = grant_wr; // single clock pulse
180 
181  assign en_chn_mclk = mode_reg[3:0];
182  assign run_chn_mclk = mode_reg[7:4];
183 
184  always @ (posedge mclk) begin
185  if (mrst) mode_reg <= 0;
186  else if (we_ctrl && !cmd_a[0]) mode_reg <= cmd_data[7:0];
187  end
188 
189 // Arbiter requests on copying from one of the input channels to the internal buffer
190 
193  .MULT_SAXI_BSLOG (MULT_SAXI_BSLOG0),
196 
197  ) mult_saxi_wr_sub0_i (
198  .mclk (mclk), // input
199  .aclk (aclk), // input
200  .en (en_chn_mclk[0]), // input
201  .has_burst (has_burst0), // input
202  .valid (valid[0]), // input
203  .rq_wr (rq_wr[0]), // output
204  .grant_wr (grant_wr[0]), // input
205  .wa (wa_chn[0 * CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
206  .adv_wr_done (adv_wr_done[0]), // output
207  .rq_out (rq_out_chn[0]), // output reg
208  .grant_out (grant_rd[0]), // input
209  .fifo_half_full(fifo_half_full), // input
210  .ra (ra_chn[0* CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
211  .pre_re (pre_re[0]), // output
212  .first_re (first_re[0]), // output reg // 1 clock later than pre_re
213  .last_re (last_re[0]), // output reg // 1 clock later than pre_re
214  .wdata_busy (wdata_busy_chn[0]) // output reg
215  );
216 
219  .MULT_SAXI_BSLOG (MULT_SAXI_BSLOG1),
222  ) mult_saxi_wr_sub1_i (
223  .mclk (mclk), // input
224  .aclk (aclk), // input
225  .en (en_chn_mclk[1]), // input
226  .has_burst (has_burst1), // input
227  .valid (valid[1]), // input
228  .rq_wr (rq_wr[1]), // output
229  .grant_wr (grant_wr[1]), // input
230  .wa (wa_chn[1 * CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
231  .adv_wr_done (adv_wr_done[1]), // output
232  .rq_out (rq_out_chn[1]), // output reg
233  .grant_out (grant_rd[1]), // input
234  .fifo_half_full(fifo_half_full), // input
235  .ra (ra_chn[1* CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
236  .pre_re (pre_re[1]), // output
237  .first_re (first_re[1]), // output reg // 1 clock later than pre_re
238  .last_re (last_re[1]), // output reg // 1 clock later than pre_re
239  .wdata_busy (wdata_busy_chn[1]) // output reg
240  );
241 
244  .MULT_SAXI_BSLOG (MULT_SAXI_BSLOG2),
247  ) mult_saxi_wr_sub2_i (
248  .mclk (mclk), // input
249  .aclk (aclk), // input
250  .en (en_chn_mclk[2]), // input
251  .has_burst (has_burst2), // input
252  .valid (valid[2]), // input
253  .rq_wr (rq_wr[2]), // output
254  .grant_wr (grant_wr[2]), // input
255  .wa (wa_chn[2 * CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
256  .adv_wr_done (adv_wr_done[2]), // output
257  .rq_out (rq_out_chn[2]), // output reg
258  .grant_out (grant_rd[2]), // input
259  .fifo_half_full(fifo_half_full), // input
260  .ra (ra_chn[2* CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
261  .pre_re (pre_re[2]), // output
262  .first_re (first_re[2]), // output reg // 1 clock later than pre_re
263  .last_re (last_re[2]), // output reg // 1 clock later than pre_re
264  .wdata_busy (wdata_busy_chn[2]) // output reg
265  );
266 
269  .MULT_SAXI_BSLOG (MULT_SAXI_BSLOG3),
272  ) mult_saxi_wr_sub3_i (
273  .mclk (mclk), // input
274  .aclk (aclk), // input
275  .en (en_chn_mclk[3]), // input
276  .has_burst (has_burst3), // input
277  .valid (valid[3]), // input
278  .rq_wr (rq_wr[3]), // output
279  .grant_wr (grant_wr[3]), // input
280  .wa (wa_chn[3 * CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
281  .adv_wr_done (adv_wr_done[3]), // output
282  .rq_out (rq_out_chn[3]), // output reg
283  .grant_out (grant_rd[3]), // input
284  .fifo_half_full(fifo_half_full), // input
285  .ra (ra_chn[3* CHN_A_WDTH +: CHN_A_WDTH]), // output[7:0]
286  .pre_re (pre_re[3]), // output
287  .first_re (first_re[3]), // output reg // 1 clock later than pre_re
288  .last_re (last_re[3]), // output reg // 1 clock later than pre_re
289  .wdata_busy (wdata_busy_chn[3]) // output reg
290  );
291 
292 
294  .FIXED_PRIORITY (0), // 0 - round-robin, 1 - fixed channel priority (0 - highest)
295  .BITS (2) // number of bits to encode channel number (1 << BITS) - number of inputs
296  ) round_robin_mclk_i (
297  .clk (mclk), // input
298  .srst (!en_mclk), // input sync. reset - needed to reset current channel output
299  .rq (rq_wr & run_chn_mclk), // input[3:0]
300  .en (en_we_arb), // input enable to grant highest priority request (should be reset by grant out)
301  .grant (we_grant), // output stays on until reset by !en
302  .chn (we_cur_chn), // output[1:0]
303  .grant_chn (grant_wr) // output[3:0] 1-hot grant output per-channel, single-clock pulse
304  );
305 
306 // multiplex channel data to a common buffer
309  reg [1:0] chn_wr;
311  always @ (posedge mclk) begin
312  // Use advanced 'valid' signal (from the input channel external buffers) to copy we_cur_chn
313  // to chn_wr - that allows to start arbitration (that will result in modification of the we_cur_chn)
314  // early, before write operation to the buffer (using channel for multiplexing and address MSB)
315  // is finished.
316  valid <= pre_valid;
318  buf_we <= pre_buf_we; // valid[we_cur_chn];
319  if (pre_pre_buf_we && !pre_buf_we) chn_wr <= we_cur_chn; // to re-start arbitration early
320 
321  // multiplex address and data
323  buf_wd <= data_in[chn_wr* 32 +: 32];
324  // early re-enable arbitration (en_we_arb)
325  if (!en_mclk || adv_wr_done[chn_wr]) en_we_arb <= 1;
326  else if (we_grant) en_we_arb <= 0;
327  // else if
328  end
329 
330 // Buffer output to S_AXI (will need a smaller FIFO
331  reg [1:0] chn_rd;
332  reg [1:0] chn_rd_data; // channel valid with read data
333  reg pre_first_rd_valid; // first inter_buf_data in a burst will be valid next cycle
334  reg [1:0] is_last_rd; // [1] accompanies last inter_buf_data in a burst (to generate wlast)
335  wire [1:0] chn_fifo_out; // channel number out from fifo (for wid)
336 // wire is_last_fifo_out; // last data word out from fifo (for wlast)
337 
338  always @ (posedge aclk) begin
340  chn_rd <= re_cur_chn; // delay by 1 clock (to increase overlap)
342  buf_re <= {buf_re[1:0], pre_re[chn_rd]};
345  if (pre_first_rd_valid) chn_rd_data <= chn_rd; // extend to later time to use as wid with overlapping requests
346  // in parallel - read channel parameters (address, length, pointer)
347 
348 
349 
350  end
351 
353  .FIXED_PRIORITY (0), // 0 - round-robin, 1 - fixed channel priority (0 - highest)
354  .BITS (2) // number of bits to encode channel number (1 << BITS) - number of inputs
355  ) round_robin_aclk_i (
356  .clk (aclk), // input
357  .srst (!en_aclk), // input sync. reset - needed to reset current channel output
358  .rq (rq_out_chn), // input[3:0]
359  .en (en_out_arb), // input enable to grant highest priority request (should be reset by grant out)
360  .grant (grant_rd_any), // output stays on until reset by !en
361  .chn (re_cur_chn), // output[1:0]
362  .grant_chn (grant_rd) // output[3:0] 1-hot grant output per-channel, single-clock pulse
363  );
364 
365 // Process address, length and current pointers (all in 32-bit words). Pointers are updated once per burst (parameter defined per each channel)
366  wire axi_ptr_busy; //
367  wire [29:0] axi_addr; //
368  wire [ 3:0] axi_len;
369  assign saxi_awaddr = {axi_addr,2'b0};
370  assign saxi_awlen = axi_len;
371 
372  assign saxi_awlock= 2'h0; // AXI PS Slave GP0 AWLOCK[1:0], input
373  assign saxi_awcache= MULT_SAXI_AWCACHE; // awcache_mode; // 4'h3; // AXI PS Slave GP0 AWCACHE[3:0], input
374  assign saxi_awprot= 3'h0; // AXI PS Slave GP0 AWPROT[2:0], input
375  assign saxi_awsize= 2'h2; // 4 bytes; AXI PS Slave GP0 AWSIZE[1:0], input
376  assign saxi_awburst= 2'h1; // Increment address bursts AXI PS Slave GP0 AWBURST[1:0], input
377  assign saxi_awqos= 4'h0; // AXI PS Slave GP0 AWQOS[3:0], input
378 
379 
380 
381  wire [29:0] pntr_wd; // @aclk, re-clock and write to status
382  wire [1:0] pntr_wa;
383  wire pntr_we;
384 
390  ) mult_saxi_wr_pointers_i (
391  .mclk (mclk), // input
392  .aclk (aclk), // input
393  .chn_en_mclk (en_chn_mclk), // input[3:0]
394  .sa_len_di (cmd_data[29:0]), // input[29:0]
395  .sa_len_wa (cmd_a[2:0]), // input[2:0]
396  .sa_len_we (cmd_we_sa_len), // input
397  .chn (re_cur_chn), // input[1:0]
398  .start (grant_rd_any), // input make sure 1 cycle
399  .busy (axi_ptr_busy), // output OR this busy with write data channel busy for en_out_arb
400  .axi_addr (axi_addr), // output[29:0] reg valid 2 cycles after start of grant_rd_any
401  .axi_len (axi_len), // output[3:0] reg
402  .pntr_wd (pntr_wd), // output[29:0]
403  .pntr_wa (pntr_wa), // output[1:0]
404  .pntr_we (pntr_we) // output
405  );
406 
407  // interface axi_aw channel
408  reg awvalid; //
409  reg [2:0] aw_seq;
410 // wire aw_busy; // use to control en_out_arb = !(aw_busy || <data_channel_busy>);
411  reg [1:0] chn_out;
412  always @ (posedge aclk) begin
413  if (!en_aclk) aw_seq <= 0;
414  else aw_seq <= {aw_seq[1:0], grant_rd_any};
415 
416  if (!en_aclk) awvalid <= 0;
417  else if (aw_seq[0]) awvalid <= 1;
418  else if (saxi_awready) awvalid <= 0;
419 
421  end
422 // assign aw_busy = axi_ptr_busy | awvalid;
423  assign saxi_awvalid = awvalid;
424  assign saxi_awid = {4'b0, chn_out};
425  assign en_out_arb = !(axi_ptr_busy || awvalid || (|wdata_busy_chn));
426  wire fifo_re;
427 
428  assign fifo_re= saxi_wvalid && saxi_wready;
429 // s_axi write channel
430  // Small extra FIFO to tolerate ram_var_w_var_r latency
431 // assign fifo_re= saxi_wvalid && saxi_wready;
432  assign saxi_wid={4'b0, chn_fifo_out};
433  assign saxi_wvalid = en_aclk && fifo_nempty;
434  assign saxi_wstrb = 4'hf; // All bytes
435 
436  always @ (posedge aclk) begin
437  end
438 
440  .DATA_WIDTH(35),
441  .DATA_DEPTH(4)
442  ) fifo_same_clock_i (
443  .rst (1'b0), // rst), // input
444  .clk (aclk), // input
445  .sync_rst (!en_aclk || arst), // input
446  .we (buf_re[2]), // input
447  .re (fifo_re), // input
448  .data_in ({chn_rd_data,is_last_rd[1],inter_buf_data}), // input[31:0]
449  .data_out ({chn_fifo_out,saxi_wlast, saxi_wdata}), // output[31:0]
450  .nempty (fifo_nempty), // output
451  .half_full (fifo_half_full) // output reg
452  );
453 
454  generate
457  .REGISTERS(1),
458  .LOG2WIDTH_WR(5),
459  .LOG2WIDTH_RD(5),
460  .DUMMY(0)
461  ) ram_var_w_var_r_i (
462  .rclk (aclk), // input
463  .raddr (buf_ra[8:0]), // input[9:0]
464  .ren (buf_re[0]), // input
465  .regen (buf_re[1]), // input
466  .data_out (inter_buf_data), // output[31:0]
467  .wclk (mclk), // input
468  .waddr (buf_wa[8:0]), // input[9:0]
469  .we (buf_we), // input
470  .web (4'hf), // input[7:0]
471  .data_in (buf_wd) // input[31:0]
472  );
473  else
475  .REGISTERS(1),
476  .LOG2WIDTH_WR(5),
477  .LOG2WIDTH_RD(5),
478  .DUMMY(0)
479  ) ram_var_w_var_r_i (
480  .rclk (aclk), // input
481  .raddr ({buf_ra[BRAM_A_WDTH-1],buf_ra[8:0]}), // input[9:0]
482  .ren (buf_re[0]), // input
483  .regen (buf_re[1]), // input
484  .data_out (inter_buf_data), // output[31:0]
485  .wclk (mclk), // input
486  .waddr ({buf_wa[BRAM_A_WDTH-1],buf_wa[8:0]}), // input[9:0]
487  .we (buf_we), // input
488  .web (8'hff), // input[7:0]
489  .data_in (buf_wd) // input[31:0]
490  );
491  endgenerate
492 
494  .ADDR (MULT_SAXI_ADDR),
495  .ADDR_MASK (MULT_SAXI_MASK),
496  .NUM_CYCLES (6),
497  .ADDR_WIDTH (4),
498  .DATA_WIDTH (32),
499  .ADDR1 (MULT_SAXI_CNTRL_ADDR),
500  .ADDR_MASK1 (MULT_SAXI_CNTRL_MASK),
501  .ADDR2 (0),
502  .ADDR_MASK2 (0)
503  ) cmd_deser_sens_i2c_i (
504  .rst (1'b0), //rst), // input
505  .clk (mclk), // input
506  .srst (mrst), // input
507  .ad (cmd_ad), // input[7:0]
508  .stb (cmd_stb), // input
509  .addr (cmd_a), // output[3:0]
510  .data (cmd_data), // output[31:0]
511  .we ({cmd_we_sa_len,we_ctrl}) // output
512  );
513 
514  // now - converting all to parallel (TODO: use RAM for multi-word status data)
515  reg [29:0] status_pntr0;
516  reg [29:0] status_pntr1;
517  reg [29:0] status_pntr2;
518  reg [29:0] status_pntr3;
520  wire [128:0] status_data;
522  assign status_data = {2'b0, status_pntr3, 2'b0, status_pntr2, 2'b0, status_pntr1, 2'b0, status_pntr0, status_tgl};
523  always @ (posedge mclk) begin
524  if (!en_mclk) status_tgl <= 0;
525  else if (pntr_we_mclk) status_tgl <= ~status_tgl;
526 
527  if (pntr_we_mclk && (pntr_wa == 2'h0)) status_pntr0 <= pntr_wd;
528  if (pntr_we_mclk && (pntr_wa == 2'h1)) status_pntr1 <= pntr_wd;
529  if (pntr_we_mclk && (pntr_wa == 2'h2)) status_pntr2 <= pntr_wd;
530  if (pntr_we_mclk && (pntr_wa == 2'h3)) status_pntr3 <= pntr_wd;
531  end
532 
534 
536  .STATUS_REG_ADDR (MULT_SAXI_STATUS_REG+4), // not used
537  .PAYLOAD_BITS (0),
538  .REGISTER_STATUS (1),
539  .EXTRA_WORDS (4),
540  .EXTRA_REG_ADDR (MULT_SAXI_STATUS_REG)
541  ) status_generate_i (
542  .rst (1'b0), //rst), // input
543  .clk (mclk), // input
544  .srst (mrst), // input
545  .we (we_ctrl && cmd_a[0]), // input
546  .wd (cmd_data[7:0]), // input[7:0]
547  .status (status_data), // input[128:0]
548  .ad (status_ad), // output[7:0]
549  .rq (status_rq), // output
550  .start (status_start) // input
551  );
552 
553 
554 endmodule
555 
852cmd_we_sa_lenwire
Definition: mult_saxi_wr.v:171
[DATA_WIDTH-1:0] 10430data_in
760MULT_SAXI_AWCACHE4'h3
Definition: mult_saxi_wr.v:55
[7:0] 769status_ad
Definition: mult_saxi_wr.v:68
[1:0] 796saxi_awlock
Definition: mult_saxi_wr.v:102
832pre_validwire[3:0]
Definition: mult_saxi_wr.v:146
858pre_first_rd_validreg
Definition: mult_saxi_wr.v:333
[ 1:0] 800saxi_awsize
Definition: mult_saxi_wr.v:106
821rq_wrwire[3:0]
Definition: mult_saxi_wr.v:134
876status_datawire[128:0]
Definition: mult_saxi_wr.v:520
[1 << LOG2WIDTH_WR-1:0] 11872data_in
cmd_deser_sens_i2c_i cmd_deser
Definition: mult_saxi_wr.v:493
830we_cur_chnwire[1:0]
Definition: mult_saxi_wr.v:144
849cmd_awire[3:0]
Definition: mult_saxi_wr.v:167
826ra_chnwire[4*CHN_A_WDTH-1:0]
Definition: mult_saxi_wr.v:139
[14-LOG2WIDTH_WR:0] 11869waddr
847first_rewire[3:0]
Definition: mult_saxi_wr.v:164
842inter_buf_datawire[31:0]
Definition: mult_saxi_wr.v:158
861axi_ptr_busywire
Definition: mult_saxi_wr.v:366
[MULT_SAXI_HALF_BRAM?6:7:0] 721wa
875pntr_we_mclkwire
Definition: mult_saxi_wr.v:519
815en_chn_mclkwire[3:0]
Definition: mult_saxi_wr.v:128
824adv_wr_donewire[3:0]
Definition: mult_saxi_wr.v:137
[1 << LOG2WIDTH_WR-1:0] 11597data_in
831data_inwire[127:0]
Definition: mult_saxi_wr.v:145
[31:0] 775data_in_chn0
Definition: mult_saxi_wr.v:75
850cmd_datawire[31:0]
Definition: mult_saxi_wr.v:168
mult_saxi_wr_sub3_i mult_saxi_wr_chn
Definition: mult_saxi_wr.v:267
873status_pntr2reg[29:0]
Definition: mult_saxi_wr.v:517
[1 << LOG2WIDTH_RD-1:0] 11592data_out
863axi_lenwire[3:0]
Definition: mult_saxi_wr.v:368
[ 3:0] 808saxi_wstrb
Definition: mult_saxi_wr.v:115
868aw_seqreg[2:0]
Definition: mult_saxi_wr.v:409
[5:0] 795saxi_awid
Definition: mult_saxi_wr.v:101
[13-LOG2WIDTH_RD:0] 11589raddr
[31:0] 803saxi_wdata
Definition: mult_saxi_wr.v:110
[ADDR_MASK2!=0?2:ADDR_MASK1!=0?1:0:0] 9935we
Definition: cmd_deser.v:60
[31:0] 785data_in_chn2
Definition: mult_saxi_wr.v:87
[ 5:0] 811saxi_bid
Definition: mult_saxi_wr.v:119
[31:0] 780data_in_chn1
Definition: mult_saxi_wr.v:81
825rq_out_chnwire[3:0]
Definition: mult_saxi_wr.v:138
[ 3:0] 802saxi_awqos
Definition: mult_saxi_wr.v:108
[1 << BITS -1:0] 10753rq
Definition: round_robin.v:47
[ 2:0] 798saxi_awprot
Definition: mult_saxi_wr.v:104
819en_chn_aclkreg[3:0]
Definition: mult_saxi_wr.v:132
859is_last_rdreg[1:0]
Definition: mult_saxi_wr.v:334
823wa_chnwire[4*CHN_A_WDTH-1:0]
Definition: mult_saxi_wr.v:136
817mode_regreg[7:0]
Definition: mult_saxi_wr.v:130
862axi_addrwire[29:0]
Definition: mult_saxi_wr.v:367
status_generate_i status_generate
Definition: mult_saxi_wr.v:535
[31:0] 790data_in_chn3
Definition: mult_saxi_wr.v:93
753MULT_SAXI_HALF_BRAM1
Definition: mult_saxi_wr.v:48
837grant_rdwire[3:0]
Definition: mult_saxi_wr.v:152
[ 5:0] 806saxi_wid
Definition: mult_saxi_wr.v:113
844fifo_half_fullwire
Definition: mult_saxi_wr.v:161
[1 << LOG2WIDTH_RD-1:0] 11867data_out
752MULT_SAXI_STATUS_REG'h34
Definition: mult_saxi_wr.v:47
[ 1:0] 812saxi_bresp
Definition: mult_saxi_wr.v:120
[DATA_WIDTH-1:0] 9934data
Definition: cmd_deser.v:59
834buf_wareg[BRAM_A_WDTH-1:0]
Definition: mult_saxi_wr.v:148
reg [1 << BITS -1:0] 10757grant_chn
Definition: round_robin.v:51
841buf_rareg[BRAM_A_WDTH-1:0]
Definition: mult_saxi_wr.v:157
838grant_rd_anywire
Definition: mult_saxi_wr.v:153
869chn_outreg[1:0]
Definition: mult_saxi_wr.v:411
871status_pntr0reg[29:0]
Definition: mult_saxi_wr.v:515
860chn_fifo_outwire[1:0]
Definition: mult_saxi_wr.v:335
[14-LOG2WIDTH_RD:0] 11864raddr
[DATA_WIDTH-1:0] 10431data_out
872status_pntr1reg[29:0]
Definition: mult_saxi_wr.v:516
827pre_rewire[3:0]
Definition: mult_saxi_wr.v:140
[BITS-1:0] 10756chn
Definition: round_robin.v:50
[ 3:0] 797saxi_awcache
Definition: mult_saxi_wr.v:103
816run_chn_mclkwire[3:0]
Definition: mult_saxi_wr.v:129
750MULT_SAXI_ADDR'h730
Definition: mult_saxi_wr.v:45
846wdata_busy_chnwire[3:0]
Definition: mult_saxi_wr.v:163
[7:0] 9931ad
Definition: cmd_deser.v:56
[ADDR_WIDTH-1:0] 9933addr
Definition: cmd_deser.v:58
857chn_rd_datareg[1:0]
Definition: mult_saxi_wr.v:332
[13-LOG2WIDTH_WR:0] 11594waddr
833validreg[3:0]
Definition: mult_saxi_wr.v:147
751MULT_SAXI_CNTRL_ADDR'h738
Definition: mult_saxi_wr.v:46
840re_cur_chnwire[1:0]
Definition: mult_saxi_wr.v:155
mult_saxi_wr_pointers_i mult_saxi_wr_pointers
Definition: mult_saxi_wr.v:385
[ 1:0] 801saxi_awburst
Definition: mult_saxi_wr.v:107
758MULT_SAXI_MASK'h7f8
Definition: mult_saxi_wr.v:53
864pntr_wdwire[29:0]
Definition: mult_saxi_wr.v:381
ram_var_w_var_r_i ram_var_w_var_r[generate]
Definition: mult_saxi_wr.v:474
[7:0] 767cmd_ad
Definition: mult_saxi_wr.v:66
813BRAM_A_WDTHMULT_SAXI_HALF_BRAM?9:10
Definition: mult_saxi_wr.v:125
reg 10755grant
Definition: round_robin.v:49
855chn_wrreg[1:0]
Definition: mult_saxi_wr.v:309
853pre_pre_buf_wewire
Definition: mult_saxi_wr.v:307
822grant_wrwire[3:0]
Definition: mult_saxi_wr.v:135
848last_rewire[3:0]
Definition: mult_saxi_wr.v:165
[ 3:0] 799saxi_awlen
Definition: mult_saxi_wr.v:105
856chn_rdreg[1:0]
Definition: mult_saxi_wr.v:331
874status_pntr3reg[29:0]
Definition: mult_saxi_wr.v:518
[MULT_SAXI_HALF_BRAM?6:7:0] 726ra
[ALL_BITS-1:0] 10777status
759MULT_SAXI_CNTRL_MASK'h7fe
Definition: mult_saxi_wr.v:54
845fifo_nemptywire
Definition: mult_saxi_wr.v:162
ram_var_w_var_r_i ram18_var_w_var_r[generate]
Definition: mult_saxi_wr.v:456
865pntr_wawire[1:0]
Definition: mult_saxi_wr.v:382
843buf_rereg[2:0]
Definition: mult_saxi_wr.v:159
[31:0] 792saxi_awaddr
Definition: mult_saxi_wr.v:98
status_wr_i pulse_cross_clock
Definition: mult_saxi_wr.v:533
762MULT_SAXI_ADV_RD3
Definition: mult_saxi_wr.v:57
round_robin_aclk_i round_robin
Definition: mult_saxi_wr.v:352
fifo_same_clock_i fifo_same_clock
Definition: mult_saxi_wr.v:439
835buf_wdreg[31:0]
Definition: mult_saxi_wr.v:149
814CHN_A_WDTHBRAM_A_WDTH - 2
Definition: mult_saxi_wr.v:126