109 lines
4.0 KiB
Systemverilog
109 lines
4.0 KiB
Systemverilog
// Generated by CIRCT firtool-1.151.0
|
|
module Queue2_TLBundleA_a32d64s1k1z4u(
|
|
input clock,
|
|
reset,
|
|
output io_enq_ready,
|
|
input io_enq_valid,
|
|
input [2:0] io_enq_bits_opcode,
|
|
io_enq_bits_param,
|
|
input [3:0] io_enq_bits_size,
|
|
input io_enq_bits_source,
|
|
input [31:0] io_enq_bits_address,
|
|
input io_enq_bits_user_amba_prot_bufferable,
|
|
io_enq_bits_user_amba_prot_modifiable,
|
|
io_enq_bits_user_amba_prot_readalloc,
|
|
io_enq_bits_user_amba_prot_writealloc,
|
|
io_enq_bits_user_amba_prot_privileged,
|
|
io_enq_bits_user_amba_prot_secure,
|
|
io_enq_bits_user_amba_prot_fetch,
|
|
input [7:0] io_enq_bits_mask,
|
|
input [63:0] io_enq_bits_data,
|
|
input io_enq_bits_corrupt,
|
|
io_deq_ready,
|
|
output io_deq_valid,
|
|
output [2:0] io_deq_bits_opcode,
|
|
io_deq_bits_param,
|
|
output [3:0] io_deq_bits_size,
|
|
output io_deq_bits_source,
|
|
output [31:0] io_deq_bits_address,
|
|
output io_deq_bits_user_amba_prot_bufferable,
|
|
io_deq_bits_user_amba_prot_modifiable,
|
|
io_deq_bits_user_amba_prot_readalloc,
|
|
io_deq_bits_user_amba_prot_writealloc,
|
|
io_deq_bits_user_amba_prot_privileged,
|
|
io_deq_bits_user_amba_prot_secure,
|
|
io_deq_bits_user_amba_prot_fetch,
|
|
output [7:0] io_deq_bits_mask,
|
|
output [63:0] io_deq_bits_data,
|
|
output io_deq_bits_corrupt
|
|
);
|
|
|
|
wire [122:0] _ram_ext_R0_data;
|
|
reg enq_ptr_value;
|
|
reg deq_ptr_value;
|
|
reg maybe_full;
|
|
wire ptr_match = enq_ptr_value == deq_ptr_value;
|
|
wire empty = ptr_match & ~maybe_full;
|
|
wire full = ptr_match & maybe_full;
|
|
wire do_enq = ~full & io_enq_valid;
|
|
always @(posedge clock) begin
|
|
if (reset) begin
|
|
enq_ptr_value <= 1'h0;
|
|
deq_ptr_value <= 1'h0;
|
|
maybe_full <= 1'h0;
|
|
end
|
|
else begin
|
|
automatic logic do_deq = io_deq_ready & ~empty;
|
|
if (do_enq)
|
|
enq_ptr_value <= enq_ptr_value - 1'h1;
|
|
if (do_deq)
|
|
deq_ptr_value <= deq_ptr_value - 1'h1;
|
|
if (do_enq != do_deq)
|
|
maybe_full <= do_enq;
|
|
end
|
|
end // always @(posedge)
|
|
ram_2x123 ram_ext (
|
|
.R0_addr (deq_ptr_value),
|
|
.R0_en (1'h1),
|
|
.R0_clk (clock),
|
|
.R0_data (_ram_ext_R0_data),
|
|
.W0_addr (enq_ptr_value),
|
|
.W0_en (do_enq),
|
|
.W0_clk (clock),
|
|
.W0_data
|
|
({io_enq_bits_opcode,
|
|
io_enq_bits_param,
|
|
io_enq_bits_size,
|
|
io_enq_bits_source,
|
|
io_enq_bits_address,
|
|
io_enq_bits_user_amba_prot_bufferable,
|
|
io_enq_bits_user_amba_prot_modifiable,
|
|
io_enq_bits_user_amba_prot_readalloc,
|
|
io_enq_bits_user_amba_prot_writealloc,
|
|
io_enq_bits_user_amba_prot_privileged,
|
|
io_enq_bits_user_amba_prot_secure,
|
|
io_enq_bits_user_amba_prot_fetch,
|
|
io_enq_bits_mask,
|
|
io_enq_bits_data,
|
|
io_enq_bits_corrupt})
|
|
);
|
|
assign io_enq_ready = ~full;
|
|
assign io_deq_valid = ~empty;
|
|
assign io_deq_bits_opcode = _ram_ext_R0_data[122:120];
|
|
assign io_deq_bits_param = _ram_ext_R0_data[119:117];
|
|
assign io_deq_bits_size = _ram_ext_R0_data[116:113];
|
|
assign io_deq_bits_source = _ram_ext_R0_data[112];
|
|
assign io_deq_bits_address = _ram_ext_R0_data[111:80];
|
|
assign io_deq_bits_user_amba_prot_bufferable = _ram_ext_R0_data[79];
|
|
assign io_deq_bits_user_amba_prot_modifiable = _ram_ext_R0_data[78];
|
|
assign io_deq_bits_user_amba_prot_readalloc = _ram_ext_R0_data[77];
|
|
assign io_deq_bits_user_amba_prot_writealloc = _ram_ext_R0_data[76];
|
|
assign io_deq_bits_user_amba_prot_privileged = _ram_ext_R0_data[75];
|
|
assign io_deq_bits_user_amba_prot_secure = _ram_ext_R0_data[74];
|
|
assign io_deq_bits_user_amba_prot_fetch = _ram_ext_R0_data[73];
|
|
assign io_deq_bits_mask = _ram_ext_R0_data[72:65];
|
|
assign io_deq_bits_data = _ram_ext_R0_data[64:1];
|
|
assign io_deq_bits_corrupt = _ram_ext_R0_data[0];
|
|
endmodule
|
|
|