Guest User

Untitled

a guest
Feb 15th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. wire [51:0] ff_dout;
  2.  
  3. wire [9:0] ff_write_count;
  4.  
  5.  
  6. **assign o_wbus_count[10*idx+9:10*idx] = wbus_count[idx]; // Convert from 2D to 1D vector.**
  7.  
  8. // Uppermost 2 bits of 8MB Auter space must be 0's
  9. wire upper_adrs_match = 1'b1; //(i_wbus_addr[22:21] == 2'h0);
  10.  
  11. // Write only one fifo by decoding 5 address bits.
  12. **wire wen = i_wbus_enable[idx] & i_wbus_wen & upper_adrs_match &
  13. & (i_wbus_addr[20:16] == i_wbus_fws[5*idx+4:5*idx]);**
  14.  
  15.  
  16. **wire almost_full_d = i_wbus_enable[idx] & ( ff_write_count > Almost_Full_Depth );**
  17.  
  18. // partslib.v: Simple DFF with Clock enable e.
  19. dreg_clr #(1) dc_amf( .c( i_aur_clk ), .ar( i_rst ), .e( 1'b1 ), .d( almost_full_d ),
  20. .q( almost_full[idx] ) );
  21.  
  22.  
  23.  
  24. // 52 bits x 512, First Word Fall Through.
  25.  
  26. g1_ipcat_wbus_client_fifo U_client_ff (
  27. .rst ( i_rst ), // input rst
  28. .wr_clk ( i_aur_clk ), // input wr_clk
  29. .din ( ffdin ), // input [51 : 0] din
  30. .wr_en ( wen ), // input wr_en
  31. .full (), // output full
  32. .wr_data_count ( ff_write_count ), // output [9 : 0] wr_data_count
  33.  
  34. // The Client Port is connected to all the read signals
  35.  
  36. .rd_clk ( i_wbus_clk[idx] ), // input rd_clk
  37. .rd_en ( i_wbus_ren[idx] ), // input rd_en
  38. .dout ( ff_dout ), // output [51 : 0] dout
  39. .empty ( o_wbus_empty[idx] ), // output empty
  40. .rd_data_count ( wbus_count[idx] ), // output [9 : 0] rd_data_count
  41. .valid ( o_wbus_valid[idx] ) // output valid
  42. );
  43.  
  44.  
  45. // o_wbus_waddr is divided into 32 bit widths for convenience
  46. // even though only the lowest 19 bits are used.
  47.  
  48. **assign o_wbus_waddr[`WBUSRANGE] = {13'h0, ff_dout[50:32]};
  49. assign o_wbus_wdata[`WBUSRANGE] = ff_dout[31:0];**
  50.  
  51.  
  52. end
Add Comment
Please, Sign In to add comment