blob: 5e9342526b41f7a186f06265668d914c55fdd9ae [file] [log] [blame]
// SPDX-FileCopyrightText: 2020 Efabless Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// SPDX-License-Identifier: Apache-2.0
module eb1_brqrv_wrapper (
`ifdef USE_POWER_PINS
vccd1,
vssd1,
`endif
clk,
rst_l,
dbg_rst_l,
rst_vec,
nmi_int,
nmi_vec,
jtag_id,
uart_rx,
trace_rv_i_insn_ip,
trace_rv_i_address_ip,
trace_rv_i_valid_ip,
trace_rv_i_exception_ip,
trace_rv_i_ecause_ip,
trace_rv_i_interrupt_ip,
trace_rv_i_tval_ip,
lsu_axi_awvalid,
lsu_axi_awready,
lsu_axi_awid,
lsu_axi_awaddr,
lsu_axi_awregion,
lsu_axi_awlen,
lsu_axi_awsize,
lsu_axi_awburst,
lsu_axi_awlock,
lsu_axi_awcache,
lsu_axi_awprot,
lsu_axi_awqos,
lsu_axi_wvalid,
lsu_axi_wready,
lsu_axi_wdata,
lsu_axi_wstrb,
lsu_axi_wlast,
lsu_axi_bvalid,
lsu_axi_bready,
lsu_axi_bresp,
lsu_axi_bid,
lsu_axi_arvalid,
lsu_axi_arready,
lsu_axi_arid,
lsu_axi_araddr,
lsu_axi_arregion,
lsu_axi_arlen,
lsu_axi_arsize,
lsu_axi_arburst,
lsu_axi_arlock,
lsu_axi_arcache,
lsu_axi_arprot,
lsu_axi_arqos,
lsu_axi_rvalid,
lsu_axi_rready,
lsu_axi_rid,
lsu_axi_rdata,
lsu_axi_rresp,
lsu_axi_rlast,
ifu_axi_awvalid,
ifu_axi_awready,
ifu_axi_awid,
ifu_axi_awaddr,
ifu_axi_awregion,
ifu_axi_awlen,
ifu_axi_awsize,
ifu_axi_awburst,
ifu_axi_awlock,
ifu_axi_awcache,
ifu_axi_awprot,
ifu_axi_awqos,
ifu_axi_wvalid,
ifu_axi_wready,
ifu_axi_wdata,
ifu_axi_wstrb,
ifu_axi_wlast,
ifu_axi_bvalid,
ifu_axi_bready,
ifu_axi_bresp,
ifu_axi_bid,
ifu_axi_arvalid,
ifu_axi_arready,
ifu_axi_arid,
ifu_axi_araddr,
ifu_axi_arregion,
ifu_axi_arlen,
ifu_axi_arsize,
ifu_axi_arburst,
ifu_axi_arlock,
ifu_axi_arcache,
ifu_axi_arprot,
ifu_axi_arqos,
ifu_axi_rvalid,
ifu_axi_rready,
ifu_axi_rid,
ifu_axi_rdata,
ifu_axi_rresp,
ifu_axi_rlast,
sb_axi_awvalid,
sb_axi_awready,
sb_axi_awid,
sb_axi_awaddr,
sb_axi_awregion,
sb_axi_awlen,
sb_axi_awsize,
sb_axi_awburst,
sb_axi_awlock,
sb_axi_awcache,
sb_axi_awprot,
sb_axi_awqos,
sb_axi_wvalid,
sb_axi_wready,
sb_axi_wdata,
sb_axi_wstrb,
sb_axi_wlast,
sb_axi_bvalid,
sb_axi_bready,
sb_axi_bresp,
sb_axi_bid,
sb_axi_arvalid,
sb_axi_arready,
sb_axi_arid,
sb_axi_araddr,
sb_axi_arregion,
sb_axi_arlen,
sb_axi_arsize,
sb_axi_arburst,
sb_axi_arlock,
sb_axi_arcache,
sb_axi_arprot,
sb_axi_arqos,
sb_axi_rvalid,
sb_axi_rready,
sb_axi_rid,
sb_axi_rdata,
sb_axi_rresp,
sb_axi_rlast,
dma_axi_awvalid,
dma_axi_awready,
dma_axi_awid,
dma_axi_awaddr,
dma_axi_awsize,
dma_axi_awprot,
dma_axi_awlen,
dma_axi_awburst,
dma_axi_wvalid,
dma_axi_wready,
dma_axi_wdata,
dma_axi_wstrb,
dma_axi_wlast,
dma_axi_bvalid,
dma_axi_bready,
dma_axi_bresp,
dma_axi_bid,
dma_axi_arvalid,
dma_axi_arready,
dma_axi_arid,
dma_axi_araddr,
dma_axi_arsize,
dma_axi_arprot,
dma_axi_arlen,
dma_axi_arburst,
dma_axi_rvalid,
dma_axi_rready,
dma_axi_rid,
dma_axi_rdata,
dma_axi_rresp,
dma_axi_rlast,
lsu_bus_clk_en,
ifu_bus_clk_en,
dbg_bus_clk_en,
dma_bus_clk_en,
dccm_ext_in_pkt,
iccm_ext_in_pkt,
ic_data_ext_in_pkt,
ic_tag_ext_in_pkt,
timer_int,
soft_int,
extintsrc_req,
dec_tlu_perfcnt0,
dec_tlu_perfcnt1,
dec_tlu_perfcnt2,
dec_tlu_perfcnt3,
jtag_tck,
jtag_tms,
jtag_tdi,
jtag_trst_n,
jtag_tdo,
core_id,
mpc_debug_halt_req,
mpc_debug_run_req,
mpc_reset_run_req,
mpc_debug_halt_ack,
mpc_debug_run_ack,
debug_brkpt_status,
i_cpu_halt_req,
o_cpu_halt_ack,
o_cpu_halt_status,
o_debug_mode_status,
i_cpu_run_req,
o_cpu_run_ack,
scan_mode,
mbist_mode,
CLKS_PER_BIT
);
function automatic [0:0] sv2v_cast_1;
input reg [0:0] inp;
sv2v_cast_1 = inp;
endfunction
parameter [2270:0] pt = {232'h0808040001c0400000000000010102000060800080103c12160802000c, sv2v_cast_1(4'h0), 5'h01, 5'h01, 6'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 7'h02, 9'h00c, 7'h04, 10'h020, 7'h07, 5'h01, 10'h027, 8'h08, 9'h004, 8'h0f, 36'h0f0040000, 14'h0004, 6'h02, 7'h03, 5'h01, 7'h05, 9'h001, 6'h02, 8'h01, 5'h01, 5'h01, 7'h01, 7'h03, 6'h03, 8'h08, 7'h02, 8'h05, 8'h03, 5'h01, 18'h00200, 7'h04, 11'h040, 5'h01, 5'h00, 11'h047, 9'h00c, 11'h040, 8'h08, 8'h02, 8'h02, 7'h02, 5'h00, 8'h06, 13'h0010, 7'h01, 5'h01, 17'h00080, 7'h06, 9'h00d, 8'h02, 8'h02, 5'h01, 7'h02, 9'h003, 9'h004, 9'h00c, 5'h01, 5'h00, 8'h08, 9'h004, 5'h01, 8'h0a, 36'h0affff000, 14'h0004, 5'h01, 6'h02, 8'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 5'h00, 5'h00, 5'h01, 6'h02, 8'h03, 9'h004, 7'h02, 9'h00c, 8'h04, 5'h00, 5'h00, 36'h0f00c0000, 9'h00f, 8'h01, 8'h0f, 13'h0020, 12'h01f, 13'h0020, 8'h08, 5'h01, 6'h02, 8'h01, 5'h01};
`ifdef USE_POWER_PINS
inout wire vccd1;
inout wire vssd1;
`endif
input wire clk;
input wire rst_l;
input wire dbg_rst_l;
input wire [31:1] rst_vec;
input wire nmi_int;
input wire [31:1] nmi_vec;
input wire [31:1] jtag_id;
input uart_rx;
output wire [31:0] trace_rv_i_insn_ip;
output wire [31:0] trace_rv_i_address_ip;
output wire trace_rv_i_valid_ip;
output wire trace_rv_i_exception_ip;
output wire [4:0] trace_rv_i_ecause_ip;
output wire trace_rv_i_interrupt_ip;
output wire [31:0] trace_rv_i_tval_ip;
output wire lsu_axi_awvalid;
input wire lsu_axi_awready;
output wire [pt[181-:8] - 1:0] lsu_axi_awid;
output wire [31:0] lsu_axi_awaddr;
output wire [3:0] lsu_axi_awregion;
output wire [7:0] lsu_axi_awlen;
output wire [2:0] lsu_axi_awsize;
output wire [1:0] lsu_axi_awburst;
output wire lsu_axi_awlock;
output wire [3:0] lsu_axi_awcache;
output wire [2:0] lsu_axi_awprot;
output wire [3:0] lsu_axi_awqos;
output wire lsu_axi_wvalid;
input wire lsu_axi_wready;
output wire [63:0] lsu_axi_wdata;
output wire [7:0] lsu_axi_wstrb;
output wire lsu_axi_wlast;
input wire lsu_axi_bvalid;
output wire lsu_axi_bready;
input wire [1:0] lsu_axi_bresp;
input wire [pt[181-:8] - 1:0] lsu_axi_bid;
output wire lsu_axi_arvalid;
input wire lsu_axi_arready;
output wire [pt[181-:8] - 1:0] lsu_axi_arid;
output wire [31:0] lsu_axi_araddr;
output wire [3:0] lsu_axi_arregion;
output wire [7:0] lsu_axi_arlen;
output wire [2:0] lsu_axi_arsize;
output wire [1:0] lsu_axi_arburst;
output wire lsu_axi_arlock;
output wire [3:0] lsu_axi_arcache;
output wire [2:0] lsu_axi_arprot;
output wire [3:0] lsu_axi_arqos;
input wire lsu_axi_rvalid;
output wire lsu_axi_rready;
input wire [pt[181-:8] - 1:0] lsu_axi_rid;
input wire [63:0] lsu_axi_rdata;
input wire [1:0] lsu_axi_rresp;
input wire lsu_axi_rlast;
output wire ifu_axi_awvalid;
input wire ifu_axi_awready;
output wire [pt[826-:8] - 1:0] ifu_axi_awid;
output wire [31:0] ifu_axi_awaddr;
output wire [3:0] ifu_axi_awregion;
output wire [7:0] ifu_axi_awlen;
output wire [2:0] ifu_axi_awsize;
output wire [1:0] ifu_axi_awburst;
output wire ifu_axi_awlock;
output wire [3:0] ifu_axi_awcache;
output wire [2:0] ifu_axi_awprot;
output wire [3:0] ifu_axi_awqos;
output wire ifu_axi_wvalid;
input wire ifu_axi_wready;
output wire [63:0] ifu_axi_wdata;
output wire [7:0] ifu_axi_wstrb;
output wire ifu_axi_wlast;
input wire ifu_axi_bvalid;
output wire ifu_axi_bready;
input wire [1:0] ifu_axi_bresp;
input wire [pt[826-:8] - 1:0] ifu_axi_bid;
output wire ifu_axi_arvalid;
input wire ifu_axi_arready;
output wire [pt[826-:8] - 1:0] ifu_axi_arid;
output wire [31:0] ifu_axi_araddr;
output wire [3:0] ifu_axi_arregion;
output wire [7:0] ifu_axi_arlen;
output wire [2:0] ifu_axi_arsize;
output wire [1:0] ifu_axi_arburst;
output wire ifu_axi_arlock;
output wire [3:0] ifu_axi_arcache;
output wire [2:0] ifu_axi_arprot;
output wire [3:0] ifu_axi_arqos;
input wire ifu_axi_rvalid;
output wire ifu_axi_rready;
input wire [pt[826-:8] - 1:0] ifu_axi_rid;
input wire [63:0] ifu_axi_rdata;
input wire [1:0] ifu_axi_rresp;
input wire ifu_axi_rlast;
output wire sb_axi_awvalid;
input wire sb_axi_awready;
output wire [pt[12-:8] - 1:0] sb_axi_awid;
output wire [31:0] sb_axi_awaddr;
output wire [3:0] sb_axi_awregion;
output wire [7:0] sb_axi_awlen;
output wire [2:0] sb_axi_awsize;
output wire [1:0] sb_axi_awburst;
output wire sb_axi_awlock;
output wire [3:0] sb_axi_awcache;
output wire [2:0] sb_axi_awprot;
output wire [3:0] sb_axi_awqos;
output wire sb_axi_wvalid;
input wire sb_axi_wready;
output wire [63:0] sb_axi_wdata;
output wire [7:0] sb_axi_wstrb;
output wire sb_axi_wlast;
input wire sb_axi_bvalid;
output wire sb_axi_bready;
input wire [1:0] sb_axi_bresp;
input wire [pt[12-:8] - 1:0] sb_axi_bid;
output wire sb_axi_arvalid;
input wire sb_axi_arready;
output wire [pt[12-:8] - 1:0] sb_axi_arid;
output wire [31:0] sb_axi_araddr;
output wire [3:0] sb_axi_arregion;
output wire [7:0] sb_axi_arlen;
output wire [2:0] sb_axi_arsize;
output wire [1:0] sb_axi_arburst;
output wire sb_axi_arlock;
output wire [3:0] sb_axi_arcache;
output wire [2:0] sb_axi_arprot;
output wire [3:0] sb_axi_arqos;
input wire sb_axi_rvalid;
output wire sb_axi_rready;
input wire [pt[12-:8] - 1:0] sb_axi_rid;
input wire [63:0] sb_axi_rdata;
input wire [1:0] sb_axi_rresp;
input wire sb_axi_rlast;
input wire dma_axi_awvalid;
output wire dma_axi_awready;
input wire [pt[1235-:8] - 1:0] dma_axi_awid;
input wire [31:0] dma_axi_awaddr;
input wire [2:0] dma_axi_awsize;
input wire [2:0] dma_axi_awprot;
input wire [7:0] dma_axi_awlen;
input wire [1:0] dma_axi_awburst;
input wire dma_axi_wvalid;
output wire dma_axi_wready;
input wire [63:0] dma_axi_wdata;
input wire [7:0] dma_axi_wstrb;
input wire dma_axi_wlast;
output wire dma_axi_bvalid;
input wire dma_axi_bready;
output wire [1:0] dma_axi_bresp;
output wire [pt[1235-:8] - 1:0] dma_axi_bid;
input wire dma_axi_arvalid;
output wire dma_axi_arready;
input wire [pt[1235-:8] - 1:0] dma_axi_arid;
input wire [31:0] dma_axi_araddr;
input wire [2:0] dma_axi_arsize;
input wire [2:0] dma_axi_arprot;
input wire [7:0] dma_axi_arlen;
input wire [1:0] dma_axi_arburst;
output wire dma_axi_rvalid;
input wire dma_axi_rready;
output wire [pt[1235-:8] - 1:0] dma_axi_rid;
output wire [63:0] dma_axi_rdata;
output wire [1:0] dma_axi_rresp;
output wire dma_axi_rlast;
input wire lsu_bus_clk_en;
input wire ifu_bus_clk_en;
input wire dbg_bus_clk_en;
input wire dma_bus_clk_en;
input wire [(pt[1342-:9] * 12) - 1:0] dccm_ext_in_pkt;
input wire [(pt[909-:9] * 12) - 1:0] iccm_ext_in_pkt;
input wire [((pt[1060-:7] * pt[1189-:7]) * 12) - 1:0] ic_data_ext_in_pkt;
input wire [(pt[1060-:7] * 12) - 1:0] ic_tag_ext_in_pkt;
input wire timer_int;
input wire soft_int;
input wire [pt[56-:12]:1] extintsrc_req;
output wire dec_tlu_perfcnt0;
output wire dec_tlu_perfcnt1;
output wire dec_tlu_perfcnt2;
output wire dec_tlu_perfcnt3;
input wire jtag_tck;
input wire jtag_tms;
input wire jtag_tdi;
input wire jtag_trst_n;
output wire jtag_tdo;
input wire [31:4] core_id;
input wire mpc_debug_halt_req;
input wire mpc_debug_run_req;
input wire mpc_reset_run_req;
output wire mpc_debug_halt_ack;
output wire mpc_debug_run_ack;
output wire debug_brkpt_status;
input wire i_cpu_halt_req;
output wire o_cpu_halt_ack;
output wire o_cpu_halt_status;
output wire o_debug_mode_status;
input wire i_cpu_run_req;
output wire o_cpu_run_ack;
input wire scan_mode;
input wire mbist_mode;
input [15:0] CLKS_PER_BIT;
wire active_l2clk;
wire free_l2clk;
wire dccm_wren;
wire dccm_rden;
wire [pt[1398-:9] - 1:0] dccm_wr_addr_lo;
wire [pt[1398-:9] - 1:0] dccm_wr_addr_hi;
wire [pt[1398-:9] - 1:0] dccm_rd_addr_lo;
wire [pt[1398-:9] - 1:0] dccm_rd_addr_hi;
wire [pt[1360-:10] - 1:0] dccm_wr_data_lo;
wire [pt[1360-:10] - 1:0] dccm_wr_data_hi;
wire [pt[1360-:10] - 1:0] dccm_rd_data_lo;
wire [pt[1360-:10] - 1:0] dccm_rd_data_hi;
wire [31:1] ic_rw_addr;
wire [pt[1060-:7] - 1:0] ic_wr_en;
wire ic_rd_en;
wire [pt[1060-:7] - 1:0] ic_tag_valid;
wire [pt[1060-:7] - 1:0] ic_rd_hit;
wire ic_tag_perr;
wire [pt[1104-:9]:3] ic_debug_addr;
wire ic_debug_rd_en;
wire ic_debug_wr_en;
wire ic_debug_tag_array;
wire [pt[1060-:7] - 1:0] ic_debug_way;
wire [25:0] ictag_debug_rd_data;
wire [(pt[1189-:7] * 71) - 1:0] ic_wr_data;
wire [63:0] ic_rd_data;
wire [70:0] ic_debug_rd_data;
wire [70:0] ic_debug_wr_data;
wire [pt[1189-:7] - 1:0] ic_eccerr;
wire [pt[1189-:7] - 1:0] ic_parerr;
wire [63:0] ic_premux_data;
wire ic_sel_premux_data;
wire [pt[936-:9] - 1:1] iccm_rw_addr;
wire iccm_wren;
wire iccm_rden;
wire [2:0] iccm_wr_size;
wire [77:0] iccm_wr_data;
wire iccm_buf_correct_ecc;
wire iccm_correction_state;
wire [63:0] iccm_rd_data;
wire [77:0] iccm_rd_data_ecc;
wire core_rst;
wire core_rst_l;
wire jtag_tdoEn;
wire dccm_clk_override;
wire icm_clk_override;
wire dec_tlu_core_ecc_disable;
wire [31:0] haddr;
wire [2:0] hburst;
wire hmastlock;
wire [3:0] hprot;
wire [2:0] hsize;
wire [1:0] htrans;
wire hwrite;
wire [63:0] hrdata;
wire hready;
wire hresp;
wire [31:0] lsu_haddr;
wire [2:0] lsu_hburst;
wire lsu_hmastlock;
wire [3:0] lsu_hprot;
wire [2:0] lsu_hsize;
wire [1:0] lsu_htrans;
wire lsu_hwrite;
wire [63:0] lsu_hwdata;
wire [63:0] lsu_hrdata;
wire lsu_hready;
wire lsu_hresp;
wire [31:0] sb_haddr;
wire [2:0] sb_hburst;
wire sb_hmastlock;
wire [3:0] sb_hprot;
wire [2:0] sb_hsize;
wire [1:0] sb_htrans;
wire sb_hwrite;
wire [63:0] sb_hwdata;
wire [63:0] sb_hrdata;
wire sb_hready;
wire sb_hresp;
wire dma_hsel;
wire [31:0] dma_haddr;
wire [2:0] dma_hburst;
wire dma_hmastlock;
wire [3:0] dma_hprot;
wire [2:0] dma_hsize;
wire [1:0] dma_htrans;
wire dma_hwrite;
wire [63:0] dma_hwdata;
wire dma_hreadyin;
wire [63:0] dma_hrdata;
wire dma_hreadyout;
wire dma_hresp;
assign hrdata[63:0] = {64 {1'sb0}};
assign hready = 1'b0;
assign hresp = 1'b0;
assign lsu_hrdata[63:0] = {64 {1'sb0}};
assign lsu_hready = 1'b0;
assign lsu_hresp = 1'b0;
assign sb_hrdata[63:0] = {64 {1'sb0}};
assign sb_hready = 1'b0;
assign sb_hresp = 1'b0;
assign dma_hsel = 1'b0;
assign dma_haddr[31:0] = {32 {1'sb0}};
assign dma_hburst[2:0] = {3 {1'sb0}};
assign dma_hmastlock = 1'b0;
assign dma_hprot[3:0] = {4 {1'sb0}};
assign dma_hsize[2:0] = {3 {1'sb0}};
assign dma_htrans[1:0] = {2 {1'sb0}};
assign dma_hwrite = 1'b0;
assign dma_hwdata[63:0] = {64 {1'sb0}};
assign dma_hreadyin = 1'b0;
wire dmi_reg_en;
wire [6:0] dmi_reg_addr;
wire dmi_reg_wr_en;
wire [31:0] dmi_reg_wdata;
wire [31:0] dmi_reg_rdata;
wire rx_dv_i;
wire [7:0] rx_byte_i;
wire iccm_instr_we;
wire [13:0] iccm_instr_addr;
wire [31:0] iccm_instr_wdata;
eb1_brqrv #(.pt(pt)) brqrv(
.clk(clk),
.rst_l(core_rst),
.dbg_rst_l(dbg_rst_l),
.rst_vec(rst_vec),
.nmi_int(nmi_int),
.nmi_vec(nmi_vec),
.core_rst_l(core_rst_l),
.active_l2clk(active_l2clk),
.free_l2clk(free_l2clk),
.trace_rv_i_insn_ip(trace_rv_i_insn_ip),
.trace_rv_i_address_ip(trace_rv_i_address_ip),
.trace_rv_i_valid_ip(trace_rv_i_valid_ip),
.trace_rv_i_exception_ip(trace_rv_i_exception_ip),
.trace_rv_i_ecause_ip(trace_rv_i_ecause_ip),
.trace_rv_i_interrupt_ip(trace_rv_i_interrupt_ip),
.trace_rv_i_tval_ip(trace_rv_i_tval_ip),
.dccm_clk_override(dccm_clk_override),
.icm_clk_override(icm_clk_override),
.dec_tlu_core_ecc_disable(dec_tlu_core_ecc_disable),
.i_cpu_halt_req(i_cpu_halt_req),
.i_cpu_run_req(i_cpu_run_req),
.o_cpu_halt_ack(o_cpu_halt_ack),
.o_cpu_halt_status(o_cpu_halt_status),
.o_cpu_run_ack(o_cpu_run_ack),
.o_debug_mode_status(o_debug_mode_status),
.core_id(core_id),
.mpc_debug_halt_req(mpc_debug_halt_req),
.mpc_debug_run_req(mpc_debug_run_req),
.mpc_reset_run_req(mpc_reset_run_req),
.mpc_debug_halt_ack(mpc_debug_halt_ack),
.mpc_debug_run_ack(mpc_debug_run_ack),
.debug_brkpt_status(debug_brkpt_status),
.dec_tlu_perfcnt0(dec_tlu_perfcnt0),
.dec_tlu_perfcnt1(dec_tlu_perfcnt1),
.dec_tlu_perfcnt2(dec_tlu_perfcnt2),
.dec_tlu_perfcnt3(dec_tlu_perfcnt3),
.dccm_wren(dccm_wren),
.dccm_rden(dccm_rden),
.dccm_wr_addr_lo(dccm_wr_addr_lo),
.dccm_wr_addr_hi(dccm_wr_addr_hi),
.dccm_rd_addr_lo(dccm_rd_addr_lo),
.dccm_rd_addr_hi(dccm_rd_addr_hi),
.dccm_wr_data_lo(dccm_wr_data_lo),
.dccm_wr_data_hi(dccm_wr_data_hi),
.dccm_rd_data_lo(dccm_rd_data_lo),
.dccm_rd_data_hi(dccm_rd_data_hi),
.iccm_rw_addr(iccm_rw_addr),
.iccm_wren(iccm_wren),
.iccm_rden(iccm_rden),
.iccm_wr_size(iccm_wr_size),
.iccm_wr_data(iccm_wr_data),
.iccm_buf_correct_ecc(iccm_buf_correct_ecc),
.iccm_correction_state(iccm_correction_state),
.iccm_rd_data(iccm_rd_data),
.iccm_rd_data_ecc(iccm_rd_data_ecc),
.ic_rw_addr(ic_rw_addr),
.ic_tag_valid(ic_tag_valid),
.ic_wr_en(ic_wr_en),
.ic_rd_en(ic_rd_en),
.ic_wr_data(ic_wr_data),
.ic_rd_data(ic_rd_data),
.ic_debug_rd_data(ic_debug_rd_data),
.ictag_debug_rd_data(ictag_debug_rd_data),
.ic_debug_wr_data(ic_debug_wr_data),
.ic_eccerr(ic_eccerr),
.ic_parerr(ic_parerr),
.ic_premux_data(ic_premux_data),
.ic_sel_premux_data(ic_sel_premux_data),
.ic_debug_addr(ic_debug_addr),
.ic_debug_rd_en(ic_debug_rd_en),
.ic_debug_wr_en(ic_debug_wr_en),
.ic_debug_tag_array(ic_debug_tag_array),
.ic_debug_way(ic_debug_way),
.ic_rd_hit(ic_rd_hit),
.ic_tag_perr(ic_tag_perr),
.lsu_axi_awvalid(lsu_axi_awvalid),
.lsu_axi_awready(lsu_axi_awready),
.lsu_axi_awid(lsu_axi_awid),
.lsu_axi_awaddr(lsu_axi_awaddr),
.lsu_axi_awregion(lsu_axi_awregion),
.lsu_axi_awlen(lsu_axi_awlen),
.lsu_axi_awsize(lsu_axi_awsize),
.lsu_axi_awburst(lsu_axi_awburst),
.lsu_axi_awlock(lsu_axi_awlock),
.lsu_axi_awcache(lsu_axi_awcache),
.lsu_axi_awprot(lsu_axi_awprot),
.lsu_axi_awqos(lsu_axi_awqos),
.lsu_axi_wvalid(lsu_axi_wvalid),
.lsu_axi_wready(lsu_axi_wready),
.lsu_axi_wdata(lsu_axi_wdata),
.lsu_axi_wstrb(lsu_axi_wstrb),
.lsu_axi_wlast(lsu_axi_wlast),
.lsu_axi_bvalid(lsu_axi_bvalid),
.lsu_axi_bready(lsu_axi_bready),
.lsu_axi_bresp(lsu_axi_bresp),
.lsu_axi_bid(lsu_axi_bid),
.lsu_axi_arvalid(lsu_axi_arvalid),
.lsu_axi_arready(lsu_axi_arready),
.lsu_axi_arid(lsu_axi_arid),
.lsu_axi_araddr(lsu_axi_araddr),
.lsu_axi_arregion(lsu_axi_arregion),
.lsu_axi_arlen(lsu_axi_arlen),
.lsu_axi_arsize(lsu_axi_arsize),
.lsu_axi_arburst(lsu_axi_arburst),
.lsu_axi_arlock(lsu_axi_arlock),
.lsu_axi_arcache(lsu_axi_arcache),
.lsu_axi_arprot(lsu_axi_arprot),
.lsu_axi_arqos(lsu_axi_arqos),
.lsu_axi_rvalid(lsu_axi_rvalid),
.lsu_axi_rready(lsu_axi_rready),
.lsu_axi_rid(lsu_axi_rid),
.lsu_axi_rdata(lsu_axi_rdata),
.lsu_axi_rresp(lsu_axi_rresp),
.lsu_axi_rlast(lsu_axi_rlast),
.ifu_axi_awvalid(ifu_axi_awvalid),
.ifu_axi_awready(ifu_axi_awready),
.ifu_axi_awid(ifu_axi_awid),
.ifu_axi_awaddr(ifu_axi_awaddr),
.ifu_axi_awregion(ifu_axi_awregion),
.ifu_axi_awlen(ifu_axi_awlen),
.ifu_axi_awsize(ifu_axi_awsize),
.ifu_axi_awburst(ifu_axi_awburst),
.ifu_axi_awlock(ifu_axi_awlock),
.ifu_axi_awcache(ifu_axi_awcache),
.ifu_axi_awprot(ifu_axi_awprot),
.ifu_axi_awqos(ifu_axi_awqos),
.ifu_axi_wvalid(ifu_axi_wvalid),
.ifu_axi_wready(ifu_axi_wready),
.ifu_axi_wdata(ifu_axi_wdata),
.ifu_axi_wstrb(ifu_axi_wstrb),
.ifu_axi_wlast(ifu_axi_wlast),
.ifu_axi_bvalid(ifu_axi_bvalid),
.ifu_axi_bready(ifu_axi_bready),
.ifu_axi_bresp(ifu_axi_bresp),
.ifu_axi_bid(ifu_axi_bid),
.ifu_axi_arvalid(ifu_axi_arvalid),
.ifu_axi_arready(ifu_axi_arready),
.ifu_axi_arid(ifu_axi_arid),
.ifu_axi_araddr(ifu_axi_araddr),
.ifu_axi_arregion(ifu_axi_arregion),
.ifu_axi_arlen(ifu_axi_arlen),
.ifu_axi_arsize(ifu_axi_arsize),
.ifu_axi_arburst(ifu_axi_arburst),
.ifu_axi_arlock(ifu_axi_arlock),
.ifu_axi_arcache(ifu_axi_arcache),
.ifu_axi_arprot(ifu_axi_arprot),
.ifu_axi_arqos(ifu_axi_arqos),
.ifu_axi_rvalid(ifu_axi_rvalid),
.ifu_axi_rready(ifu_axi_rready),
.ifu_axi_rid(ifu_axi_rid),
.ifu_axi_rdata(ifu_axi_rdata),
.ifu_axi_rresp(ifu_axi_rresp),
.ifu_axi_rlast(ifu_axi_rlast),
.sb_axi_awvalid(sb_axi_awvalid),
.sb_axi_awready(sb_axi_awready),
.sb_axi_awid(sb_axi_awid),
.sb_axi_awaddr(sb_axi_awaddr),
.sb_axi_awregion(sb_axi_awregion),
.sb_axi_awlen(sb_axi_awlen),
.sb_axi_awsize(sb_axi_awsize),
.sb_axi_awburst(sb_axi_awburst),
.sb_axi_awlock(sb_axi_awlock),
.sb_axi_awcache(sb_axi_awcache),
.sb_axi_awprot(sb_axi_awprot),
.sb_axi_awqos(sb_axi_awqos),
.sb_axi_wvalid(sb_axi_wvalid),
.sb_axi_wready(sb_axi_wready),
.sb_axi_wdata(sb_axi_wdata),
.sb_axi_wstrb(sb_axi_wstrb),
.sb_axi_wlast(sb_axi_wlast),
.sb_axi_bvalid(sb_axi_bvalid),
.sb_axi_bready(sb_axi_bready),
.sb_axi_bresp(sb_axi_bresp),
.sb_axi_bid(sb_axi_bid),
.sb_axi_arvalid(sb_axi_arvalid),
.sb_axi_arready(sb_axi_arready),
.sb_axi_arid(sb_axi_arid),
.sb_axi_araddr(sb_axi_araddr),
.sb_axi_arregion(sb_axi_arregion),
.sb_axi_arlen(sb_axi_arlen),
.sb_axi_arsize(sb_axi_arsize),
.sb_axi_arburst(sb_axi_arburst),
.sb_axi_arlock(sb_axi_arlock),
.sb_axi_arcache(sb_axi_arcache),
.sb_axi_arprot(sb_axi_arprot),
.sb_axi_arqos(sb_axi_arqos),
.sb_axi_rvalid(sb_axi_rvalid),
.sb_axi_rready(sb_axi_rready),
.sb_axi_rid(sb_axi_rid),
.sb_axi_rdata(sb_axi_rdata),
.sb_axi_rresp(sb_axi_rresp),
.sb_axi_rlast(sb_axi_rlast),
.dma_axi_awvalid(dma_axi_awvalid),
.dma_axi_awready(dma_axi_awready),
.dma_axi_awid(dma_axi_awid),
.dma_axi_awaddr(dma_axi_awaddr),
.dma_axi_awsize(dma_axi_awsize),
.dma_axi_awprot(dma_axi_awprot),
.dma_axi_awlen(dma_axi_awlen),
.dma_axi_awburst(dma_axi_awburst),
.dma_axi_wvalid(dma_axi_wvalid),
.dma_axi_wready(dma_axi_wready),
.dma_axi_wdata(dma_axi_wdata),
.dma_axi_wstrb(dma_axi_wstrb),
.dma_axi_wlast(dma_axi_wlast),
.dma_axi_bvalid(dma_axi_bvalid),
.dma_axi_bready(dma_axi_bready),
.dma_axi_bresp(dma_axi_bresp),
.dma_axi_bid(dma_axi_bid),
.dma_axi_arvalid(dma_axi_arvalid),
.dma_axi_arready(dma_axi_arready),
.dma_axi_arid(dma_axi_arid),
.dma_axi_araddr(dma_axi_araddr),
.dma_axi_arsize(dma_axi_arsize),
.dma_axi_arprot(dma_axi_arprot),
.dma_axi_arlen(dma_axi_arlen),
.dma_axi_arburst(dma_axi_arburst),
.dma_axi_rvalid(dma_axi_rvalid),
.dma_axi_rready(dma_axi_rready),
.dma_axi_rid(dma_axi_rid),
.dma_axi_rdata(dma_axi_rdata),
.dma_axi_rresp(dma_axi_rresp),
.dma_axi_rlast(dma_axi_rlast),
.haddr(haddr),
.hburst(hburst),
.hmastlock(hmastlock),
.hprot(hprot),
.hsize(hsize),
.htrans(htrans),
.hwrite(hwrite),
.hrdata(hrdata),
.hready(hready),
.hresp(hresp),
.lsu_haddr(lsu_haddr),
.lsu_hburst(lsu_hburst),
.lsu_hmastlock(lsu_hmastlock),
.lsu_hprot(lsu_hprot),
.lsu_hsize(lsu_hsize),
.lsu_htrans(lsu_htrans),
.lsu_hwrite(lsu_hwrite),
.lsu_hwdata(lsu_hwdata),
.lsu_hrdata(lsu_hrdata),
.lsu_hready(lsu_hready),
.lsu_hresp(lsu_hresp),
.sb_haddr(sb_haddr),
.sb_hburst(sb_hburst),
.sb_hmastlock(sb_hmastlock),
.sb_hprot(sb_hprot),
.sb_hsize(sb_hsize),
.sb_htrans(sb_htrans),
.sb_hwrite(sb_hwrite),
.sb_hwdata(sb_hwdata),
.sb_hrdata(sb_hrdata),
.sb_hready(sb_hready),
.sb_hresp(sb_hresp),
.dma_hsel(dma_hsel),
.dma_haddr(dma_haddr),
.dma_hburst(dma_hburst),
.dma_hmastlock(dma_hmastlock),
.dma_hprot(dma_hprot),
.dma_hsize(dma_hsize),
.dma_htrans(dma_htrans),
.dma_hwrite(dma_hwrite),
.dma_hwdata(dma_hwdata),
.dma_hreadyin(dma_hreadyin),
.dma_hrdata(dma_hrdata),
.dma_hreadyout(dma_hreadyout),
.dma_hresp(dma_hresp),
.lsu_bus_clk_en(lsu_bus_clk_en),
.ifu_bus_clk_en(ifu_bus_clk_en),
.dbg_bus_clk_en(dbg_bus_clk_en),
.dma_bus_clk_en(dma_bus_clk_en),
.dmi_reg_en(dmi_reg_en),
.dmi_reg_addr(dmi_reg_addr),
.dmi_reg_wr_en(dmi_reg_wr_en),
.dmi_reg_wdata(dmi_reg_wdata),
.dmi_reg_rdata(dmi_reg_rdata),
.extintsrc_req(extintsrc_req),
.timer_int(timer_int),
.soft_int(soft_int),
.scan_mode(scan_mode)
);
eb1_mem #(.pt(pt)) mem(
.clk(active_l2clk),
.rst_l(rst_l),
.iccm_rw_addr((core_rst ? iccm_rw_addr : iccm_instr_addr[10:0])),
.iccm_wren((core_rst ? iccm_wren : iccm_instr_we)),
.iccm_wr_data((core_rst ? iccm_wr_data : {7'h00, iccm_instr_wdata, 7'h00, iccm_instr_wdata})),
.iccm_wr_size((core_rst ? iccm_wr_size : 3'b010)),
`ifdef USE_POWER_PINS
.vccd1(vccd1),
.vssd1(vssd1),
`endif
.dccm_clk_override(dccm_clk_override),
.icm_clk_override(icm_clk_override),
.dec_tlu_core_ecc_disable(dec_tlu_core_ecc_disable),
.dccm_wren(dccm_wren),
.dccm_rden(dccm_rden),
.dccm_wr_addr_lo(dccm_wr_addr_lo),
.dccm_wr_addr_hi(dccm_wr_addr_hi),
.dccm_rd_addr_lo(dccm_rd_addr_lo),
.dccm_rd_addr_hi(dccm_rd_addr_hi),
.dccm_wr_data_lo(dccm_wr_data_lo),
.dccm_wr_data_hi(dccm_wr_data_hi),
.dccm_rd_data_lo(dccm_rd_data_lo),
.dccm_rd_data_hi(dccm_rd_data_hi),
.dccm_ext_in_pkt(dccm_ext_in_pkt),
.iccm_ext_in_pkt(iccm_ext_in_pkt),
.iccm_buf_correct_ecc(iccm_buf_correct_ecc),
.iccm_correction_state(iccm_correction_state),
.iccm_rden(iccm_rden),
.iccm_rd_data(iccm_rd_data),
.iccm_rd_data_ecc(iccm_rd_data_ecc),
.ic_rw_addr(ic_rw_addr),
.ic_tag_valid(ic_tag_valid),
.ic_wr_en(ic_wr_en),
.ic_rd_en(ic_rd_en),
.ic_premux_data(ic_premux_data),
.ic_sel_premux_data(ic_sel_premux_data),
.ic_data_ext_in_pkt(ic_data_ext_in_pkt),
.ic_tag_ext_in_pkt(ic_tag_ext_in_pkt),
.ic_wr_data(ic_wr_data),
.ic_debug_wr_data(ic_debug_wr_data),
.ic_debug_rd_data(ic_debug_rd_data),
.ic_debug_addr(ic_debug_addr),
.ic_debug_rd_en(ic_debug_rd_en),
.ic_debug_wr_en(ic_debug_wr_en),
.ic_debug_tag_array(ic_debug_tag_array),
.ic_debug_way(ic_debug_way),
.ic_rd_data(ic_rd_data),
.ictag_debug_rd_data(ictag_debug_rd_data),
.ic_eccerr(ic_eccerr),
.ic_parerr(ic_parerr),
.ic_rd_hit(ic_rd_hit),
.ic_tag_perr(ic_tag_perr),
.scan_mode(scan_mode)
);
eb1_iccm_controller iccm_controller(
.clk_i(clk),
.rst_ni(rst_l),
.rx_dv_i(rx_dv_i),
.rx_byte_i(rx_byte_i),
.we_o(iccm_instr_we),
.addr_o(iccm_instr_addr),
.wdata_o(iccm_instr_wdata),
.reset_o(core_rst)
);
always @(iccm_instr_we) begin
$display("Instruction = %h", iccm_instr_wdata);
end
eb1_uart_rx_prog uart_rx_m(
.i_Clock(clk),
.rst_ni(rst_l),
.i_Rx_Serial(uart_rx),
.CLKS_PER_BIT(CLKS_PER_BIT),
.o_Rx_DV(rx_dv_i),
.o_Rx_Byte(rx_byte_i)
);
dmi_wrapper dmi_wrapper(
.trst_n(jtag_trst_n),
.tck(jtag_tck),
.tms(jtag_tms),
.tdi(jtag_tdi),
.tdo(jtag_tdo),
.tdoEnable(),
.core_rst_n(dbg_rst_l),
.core_clk(clk),
.jtag_id(jtag_id),
.rd_data(dmi_reg_rdata),
.reg_wr_data(dmi_reg_wdata),
.reg_wr_addr(dmi_reg_addr),
.reg_en(dmi_reg_en),
.reg_wr_en(dmi_reg_wr_en),
.dmi_hard_reset()
);
endmodule
module eb1_brqrv (
clk,
rst_l,
dbg_rst_l,
rst_vec,
nmi_int,
nmi_vec,
core_rst_l,
active_l2clk,
free_l2clk,
trace_rv_i_insn_ip,
trace_rv_i_address_ip,
trace_rv_i_valid_ip,
trace_rv_i_exception_ip,
trace_rv_i_ecause_ip,
trace_rv_i_interrupt_ip,
trace_rv_i_tval_ip,
dccm_clk_override,
icm_clk_override,
dec_tlu_core_ecc_disable,
i_cpu_halt_req,
i_cpu_run_req,
o_cpu_halt_ack,
o_cpu_halt_status,
o_cpu_run_ack,
o_debug_mode_status,
core_id,
mpc_debug_halt_req,
mpc_debug_run_req,
mpc_reset_run_req,
mpc_debug_halt_ack,
mpc_debug_run_ack,
debug_brkpt_status,
dec_tlu_perfcnt0,
dec_tlu_perfcnt1,
dec_tlu_perfcnt2,
dec_tlu_perfcnt3,
dccm_wren,
dccm_rden,
dccm_wr_addr_lo,
dccm_wr_addr_hi,
dccm_rd_addr_lo,
dccm_rd_addr_hi,
dccm_wr_data_lo,
dccm_wr_data_hi,
dccm_rd_data_lo,
dccm_rd_data_hi,
iccm_rw_addr,
iccm_wren,
iccm_rden,
iccm_wr_size,
iccm_wr_data,
iccm_buf_correct_ecc,
iccm_correction_state,
iccm_rd_data,
iccm_rd_data_ecc,
ic_rw_addr,
ic_tag_valid,
ic_wr_en,
ic_rd_en,
ic_wr_data,
ic_rd_data,
ic_debug_rd_data,
ictag_debug_rd_data,
ic_debug_wr_data,
ic_eccerr,
ic_parerr,
ic_premux_data,
ic_sel_premux_data,
ic_debug_addr,
ic_debug_rd_en,
ic_debug_wr_en,
ic_debug_tag_array,
ic_debug_way,
ic_rd_hit,
ic_tag_perr,
lsu_axi_awvalid,
lsu_axi_awready,
lsu_axi_awid,
lsu_axi_awaddr,
lsu_axi_awregion,
lsu_axi_awlen,
lsu_axi_awsize,
lsu_axi_awburst,
lsu_axi_awlock,
lsu_axi_awcache,
lsu_axi_awprot,
lsu_axi_awqos,
lsu_axi_wvalid,
lsu_axi_wready,
lsu_axi_wdata,
lsu_axi_wstrb,
lsu_axi_wlast,
lsu_axi_bvalid,
lsu_axi_bready,
lsu_axi_bresp,
lsu_axi_bid,
lsu_axi_arvalid,
lsu_axi_arready,
lsu_axi_arid,
lsu_axi_araddr,
lsu_axi_arregion,
lsu_axi_arlen,
lsu_axi_arsize,
lsu_axi_arburst,
lsu_axi_arlock,
lsu_axi_arcache,
lsu_axi_arprot,
lsu_axi_arqos,
lsu_axi_rvalid,
lsu_axi_rready,
lsu_axi_rid,
lsu_axi_rdata,
lsu_axi_rresp,
lsu_axi_rlast,
ifu_axi_awvalid,
ifu_axi_awready,
ifu_axi_awid,
ifu_axi_awaddr,
ifu_axi_awregion,
ifu_axi_awlen,
ifu_axi_awsize,
ifu_axi_awburst,
ifu_axi_awlock,
ifu_axi_awcache,
ifu_axi_awprot,
ifu_axi_awqos,
ifu_axi_wvalid,
ifu_axi_wready,
ifu_axi_wdata,
ifu_axi_wstrb,
ifu_axi_wlast,
ifu_axi_bvalid,
ifu_axi_bready,
ifu_axi_bresp,
ifu_axi_bid,
ifu_axi_arvalid,
ifu_axi_arready,
ifu_axi_arid,
ifu_axi_araddr,
ifu_axi_arregion,
ifu_axi_arlen,
ifu_axi_arsize,
ifu_axi_arburst,
ifu_axi_arlock,
ifu_axi_arcache,
ifu_axi_arprot,
ifu_axi_arqos,
ifu_axi_rvalid,
ifu_axi_rready,
ifu_axi_rid,
ifu_axi_rdata,
ifu_axi_rresp,
ifu_axi_rlast,
sb_axi_awvalid,
sb_axi_awready,
sb_axi_awid,
sb_axi_awaddr,
sb_axi_awregion,
sb_axi_awlen,
sb_axi_awsize,
sb_axi_awburst,
sb_axi_awlock,
sb_axi_awcache,
sb_axi_awprot,
sb_axi_awqos,
sb_axi_wvalid,
sb_axi_wready,
sb_axi_wdata,
sb_axi_wstrb,
sb_axi_wlast,
sb_axi_bvalid,
sb_axi_bready,
sb_axi_bresp,
sb_axi_bid,
sb_axi_arvalid,
sb_axi_arready,
sb_axi_arid,
sb_axi_araddr,
sb_axi_arregion,
sb_axi_arlen,
sb_axi_arsize,
sb_axi_arburst,
sb_axi_arlock,
sb_axi_arcache,
sb_axi_arprot,
sb_axi_arqos,
sb_axi_rvalid,
sb_axi_rready,
sb_axi_rid,
sb_axi_rdata,
sb_axi_rresp,
sb_axi_rlast,
dma_axi_awvalid,
dma_axi_awready,
dma_axi_awid,
dma_axi_awaddr,
dma_axi_awsize,
dma_axi_awprot,
dma_axi_awlen,
dma_axi_awburst,
dma_axi_wvalid,
dma_axi_wready,
dma_axi_wdata,
dma_axi_wstrb,
dma_axi_wlast,
dma_axi_bvalid,
dma_axi_bready,
dma_axi_bresp,
dma_axi_bid,
dma_axi_arvalid,
dma_axi_arready,
dma_axi_arid,
dma_axi_araddr,
dma_axi_arsize,
dma_axi_arprot,
dma_axi_arlen,
dma_axi_arburst,
dma_axi_rvalid,
dma_axi_rready,
dma_axi_rid,
dma_axi_rdata,
dma_axi_rresp,
dma_axi_rlast,
haddr,
hburst,
hmastlock,
hprot,
hsize,
htrans,
hwrite,
hrdata,
hready,
hresp,
lsu_haddr,
lsu_hburst,
lsu_hmastlock,
lsu_hprot,
lsu_hsize,
lsu_htrans,
lsu_hwrite,
lsu_hwdata,
lsu_hrdata,
lsu_hready,
lsu_hresp,
sb_haddr,
sb_hburst,
sb_hmastlock,
sb_hprot,
sb_hsize,
sb_htrans,
sb_hwrite,
sb_hwdata,
sb_hrdata,
sb_hready,
sb_hresp,
dma_hsel,
dma_haddr,
dma_hburst,
dma_hmastlock,
dma_hprot,
dma_hsize,
dma_htrans,
dma_hwrite,
dma_hwdata,
dma_hreadyin,
dma_hrdata,
dma_hreadyout,
dma_hresp,
lsu_bus_clk_en,
ifu_bus_clk_en,
dbg_bus_clk_en,
dma_bus_clk_en,
dmi_reg_en,
dmi_reg_addr,
dmi_reg_wr_en,
dmi_reg_wdata,
dmi_reg_rdata,
extintsrc_req,
timer_int,
soft_int,
scan_mode
);
function automatic [0:0] sv2v_cast_1;
input reg [0:0] inp;
sv2v_cast_1 = inp;
endfunction
parameter [2270:0] pt = {232'h0808040001c0400000000000010102000060800080103c12160802000c, sv2v_cast_1(4'h0), 5'h01, 5'h01, 6'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 7'h02, 9'h00c, 7'h04, 10'h020, 7'h07, 5'h01, 10'h027, 8'h08, 9'h004, 8'h0f, 36'h0f0040000, 14'h0004, 6'h02, 7'h03, 5'h01, 7'h05, 9'h001, 6'h02, 8'h01, 5'h01, 5'h01, 7'h01, 7'h03, 6'h03, 8'h08, 7'h02, 8'h05, 8'h03, 5'h01, 18'h00200, 7'h04, 11'h040, 5'h01, 5'h00, 11'h047, 9'h00c, 11'h040, 8'h08, 8'h02, 8'h02, 7'h02, 5'h00, 8'h06, 13'h0010, 7'h01, 5'h01, 17'h00080, 7'h06, 9'h00d, 8'h02, 8'h02, 5'h01, 7'h02, 9'h003, 9'h004, 9'h00c, 5'h01, 5'h00, 8'h08, 9'h004, 5'h01, 8'h0a, 36'h0affff000, 14'h0004, 5'h01, 6'h02, 8'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 5'h00, 5'h00, 5'h01, 6'h02, 8'h03, 9'h004, 7'h02, 9'h00c, 8'h04, 5'h00, 5'h00, 36'h0f00c0000, 9'h00f, 8'h01, 8'h0f, 13'h0020, 12'h01f, 13'h0020, 8'h08, 5'h01, 6'h02, 8'h01, 5'h01};
input wire clk;
input wire rst_l;
input wire dbg_rst_l;
input wire [31:1] rst_vec;
input wire nmi_int;
input wire [31:1] nmi_vec;
output wire core_rst_l;
output wire active_l2clk;
output wire free_l2clk;
output wire [31:0] trace_rv_i_insn_ip;
output wire [31:0] trace_rv_i_address_ip;
output wire trace_rv_i_valid_ip;
output wire trace_rv_i_exception_ip;
output wire [4:0] trace_rv_i_ecause_ip;
output wire trace_rv_i_interrupt_ip;
output wire [31:0] trace_rv_i_tval_ip;
output wire dccm_clk_override;
output wire icm_clk_override;
output wire dec_tlu_core_ecc_disable;
input wire i_cpu_halt_req;
input wire i_cpu_run_req;
output wire o_cpu_halt_ack;
output wire o_cpu_halt_status;
output wire o_cpu_run_ack;
output wire o_debug_mode_status;
input wire [31:4] core_id;
input wire mpc_debug_halt_req;
input wire mpc_debug_run_req;
input wire mpc_reset_run_req;
output wire mpc_debug_halt_ack;
output wire mpc_debug_run_ack;
output wire debug_brkpt_status;
output wire dec_tlu_perfcnt0;
output wire dec_tlu_perfcnt1;
output wire dec_tlu_perfcnt2;
output wire dec_tlu_perfcnt3;
output wire dccm_wren;
output wire dccm_rden;
output wire [pt[1398-:9] - 1:0] dccm_wr_addr_lo;
output wire [pt[1398-:9] - 1:0] dccm_wr_addr_hi;
output wire [pt[1398-:9] - 1:0] dccm_rd_addr_lo;
output wire [pt[1398-:9] - 1:0] dccm_rd_addr_hi;
output wire [pt[1360-:10] - 1:0] dccm_wr_data_lo;
output wire [pt[1360-:10] - 1:0] dccm_wr_data_hi;
input wire [pt[1360-:10] - 1:0] dccm_rd_data_lo;
input wire [pt[1360-:10] - 1:0] dccm_rd_data_hi;
output wire [pt[936-:9] - 1:1] iccm_rw_addr;
output wire iccm_wren;
output wire iccm_rden;
output wire [2:0] iccm_wr_size;
output wire [77:0] iccm_wr_data;
output wire iccm_buf_correct_ecc;
output wire iccm_correction_state;
input wire [63:0] iccm_rd_data;
input wire [77:0] iccm_rd_data_ecc;
output wire [31:1] ic_rw_addr;
output wire [pt[1060-:7] - 1:0] ic_tag_valid;
output wire [pt[1060-:7] - 1:0] ic_wr_en;
output wire ic_rd_en;
output wire [(pt[1189-:7] * 71) - 1:0] ic_wr_data;
input wire [63:0] ic_rd_data;
input wire [70:0] ic_debug_rd_data;
input wire [25:0] ictag_debug_rd_data;
output wire [70:0] ic_debug_wr_data;
input wire [pt[1189-:7] - 1:0] ic_eccerr;
input wire [pt[1189-:7] - 1:0] ic_parerr;
output wire [63:0] ic_premux_data;
output wire ic_sel_premux_data;
output wire [pt[1104-:9]:3] ic_debug_addr;
output wire ic_debug_rd_en;
output wire ic_debug_wr_en;
output wire ic_debug_tag_array;
output wire [pt[1060-:7] - 1:0] ic_debug_way;
input wire [pt[1060-:7] - 1:0] ic_rd_hit;
input wire ic_tag_perr;
output wire lsu_axi_awvalid;
input wire lsu_axi_awready;
output wire [pt[181-:8] - 1:0] lsu_axi_awid;
output wire [31:0] lsu_axi_awaddr;
output wire [3:0] lsu_axi_awregion;
output wire [7:0] lsu_axi_awlen;
output wire [2:0] lsu_axi_awsize;
output wire [1:0] lsu_axi_awburst;
output wire lsu_axi_awlock;
output wire [3:0] lsu_axi_awcache;
output wire [2:0] lsu_axi_awprot;
output wire [3:0] lsu_axi_awqos;
output wire lsu_axi_wvalid;
input wire lsu_axi_wready;
output wire [63:0] lsu_axi_wdata;
output wire [7:0] lsu_axi_wstrb;
output wire lsu_axi_wlast;
input wire lsu_axi_bvalid;
output wire lsu_axi_bready;
input wire [1:0] lsu_axi_bresp;
input wire [pt[181-:8] - 1:0] lsu_axi_bid;
output wire lsu_axi_arvalid;
input wire lsu_axi_arready;
output wire [pt[181-:8] - 1:0] lsu_axi_arid;
output wire [31:0] lsu_axi_araddr;
output wire [3:0] lsu_axi_arregion;
output wire [7:0] lsu_axi_arlen;
output wire [2:0] lsu_axi_arsize;
output wire [1:0] lsu_axi_arburst;
output wire lsu_axi_arlock;
output wire [3:0] lsu_axi_arcache;
output wire [2:0] lsu_axi_arprot;
output wire [3:0] lsu_axi_arqos;
input wire lsu_axi_rvalid;
output wire lsu_axi_rready;
input wire [pt[181-:8] - 1:0] lsu_axi_rid;
input wire [63:0] lsu_axi_rdata;
input wire [1:0] lsu_axi_rresp;
input wire lsu_axi_rlast;
output wire ifu_axi_awvalid;
input wire ifu_axi_awready;
output wire [pt[826-:8] - 1:0] ifu_axi_awid;
output wire [31:0] ifu_axi_awaddr;
output wire [3:0] ifu_axi_awregion;
output wire [7:0] ifu_axi_awlen;
output wire [2:0] ifu_axi_awsize;
output wire [1:0] ifu_axi_awburst;
output wire ifu_axi_awlock;
output wire [3:0] ifu_axi_awcache;
output wire [2:0] ifu_axi_awprot;
output wire [3:0] ifu_axi_awqos;
output wire ifu_axi_wvalid;
input wire ifu_axi_wready;
output wire [63:0] ifu_axi_wdata;
output wire [7:0] ifu_axi_wstrb;
output wire ifu_axi_wlast;
input wire ifu_axi_bvalid;
output wire ifu_axi_bready;
input wire [1:0] ifu_axi_bresp;
input wire [pt[826-:8] - 1:0] ifu_axi_bid;
output wire ifu_axi_arvalid;
input wire ifu_axi_arready;
output wire [pt[826-:8] - 1:0] ifu_axi_arid;
output wire [31:0] ifu_axi_araddr;
output wire [3:0] ifu_axi_arregion;
output wire [7:0] ifu_axi_arlen;
output wire [2:0] ifu_axi_arsize;
output wire [1:0] ifu_axi_arburst;
output wire ifu_axi_arlock;
output wire [3:0] ifu_axi_arcache;
output wire [2:0] ifu_axi_arprot;
output wire [3:0] ifu_axi_arqos;
input wire ifu_axi_rvalid;
output wire ifu_axi_rready;
input wire [pt[826-:8] - 1:0] ifu_axi_rid;
input wire [63:0] ifu_axi_rdata;
input wire [1:0] ifu_axi_rresp;
input wire ifu_axi_rlast;
output wire sb_axi_awvalid;
input wire sb_axi_awready;
output wire [pt[12-:8] - 1:0] sb_axi_awid;
output wire [31:0] sb_axi_awaddr;
output wire [3:0] sb_axi_awregion;
output wire [7:0] sb_axi_awlen;
output wire [2:0] sb_axi_awsize;
output wire [1:0] sb_axi_awburst;
output wire sb_axi_awlock;
output wire [3:0] sb_axi_awcache;
output wire [2:0] sb_axi_awprot;
output wire [3:0] sb_axi_awqos;
output wire sb_axi_wvalid;
input wire sb_axi_wready;
output wire [63:0] sb_axi_wdata;
output wire [7:0] sb_axi_wstrb;
output wire sb_axi_wlast;
input wire sb_axi_bvalid;
output wire sb_axi_bready;
input wire [1:0] sb_axi_bresp;
input wire [pt[12-:8] - 1:0] sb_axi_bid;
output wire sb_axi_arvalid;
input wire sb_axi_arready;
output wire [pt[12-:8] - 1:0] sb_axi_arid;
output wire [31:0] sb_axi_araddr;
output wire [3:0] sb_axi_arregion;
output wire [7:0] sb_axi_arlen;
output wire [2:0] sb_axi_arsize;
output wire [1:0] sb_axi_arburst;
output wire sb_axi_arlock;
output wire [3:0] sb_axi_arcache;
output wire [2:0] sb_axi_arprot;
output wire [3:0] sb_axi_arqos;
input wire sb_axi_rvalid;
output wire sb_axi_rready;
input wire [pt[12-:8] - 1:0] sb_axi_rid;
input wire [63:0] sb_axi_rdata;
input wire [1:0] sb_axi_rresp;
input wire sb_axi_rlast;
input wire dma_axi_awvalid;
output wire dma_axi_awready;
input wire [pt[1235-:8] - 1:0] dma_axi_awid;
input wire [31:0] dma_axi_awaddr;
input wire [2:0] dma_axi_awsize;
input wire [2:0] dma_axi_awprot;
input wire [7:0] dma_axi_awlen;
input wire [1:0] dma_axi_awburst;
input wire dma_axi_wvalid;
output wire dma_axi_wready;
input wire [63:0] dma_axi_wdata;
input wire [7:0] dma_axi_wstrb;
input wire dma_axi_wlast;
output wire dma_axi_bvalid;
input wire dma_axi_bready;
output wire [1:0] dma_axi_bresp;
output wire [pt[1235-:8] - 1:0] dma_axi_bid;
input wire dma_axi_arvalid;
output wire dma_axi_arready;
input wire [pt[1235-:8] - 1:0] dma_axi_arid;
input wire [31:0] dma_axi_araddr;
input wire [2:0] dma_axi_arsize;
input wire [2:0] dma_axi_arprot;
input wire [7:0] dma_axi_arlen;
input wire [1:0] dma_axi_arburst;
output wire dma_axi_rvalid;
input wire dma_axi_rready;
output wire [pt[1235-:8] - 1:0] dma_axi_rid;
output wire [63:0] dma_axi_rdata;
output wire [1:0] dma_axi_rresp;
output wire dma_axi_rlast;
output wire [31:0] haddr;
output wire [2:0] hburst;
output wire hmastlock;
output wire [3:0] hprot;
output wire [2:0] hsize;
output wire [1:0] htrans;
output wire hwrite;
input wire [63:0] hrdata;
input wire hready;
input wire hresp;
output wire [31:0] lsu_haddr;
output wire [2:0] lsu_hburst;
output wire lsu_hmastlock;
output wire [3:0] lsu_hprot;
output wire [2:0] lsu_hsize;
output wire [1:0] lsu_htrans;
output wire lsu_hwrite;
output wire [63:0] lsu_hwdata;
input wire [63:0] lsu_hrdata;
input wire lsu_hready;
input wire lsu_hresp;
output wire [31:0] sb_haddr;
output wire [2:0] sb_hburst;
output wire sb_hmastlock;
output wire [3:0] sb_hprot;
output wire [2:0] sb_hsize;
output wire [1:0] sb_htrans;
output wire sb_hwrite;
output wire [63:0] sb_hwdata;
input wire [63:0] sb_hrdata;
input wire sb_hready;
input wire sb_hresp;
input wire dma_hsel;
input wire [31:0] dma_haddr;
input wire [2:0] dma_hburst;
input wire dma_hmastlock;
input wire [3:0] dma_hprot;
input wire [2:0] dma_hsize;
input wire [1:0] dma_htrans;
input wire dma_hwrite;
input wire [63:0] dma_hwdata;
input wire dma_hreadyin;
output wire [63:0] dma_hrdata;
output wire dma_hreadyout;
output wire dma_hresp;
input wire lsu_bus_clk_en;
input wire ifu_bus_clk_en;
input wire dbg_bus_clk_en;
input wire dma_bus_clk_en;
input wire dmi_reg_en;
input wire [6:0] dmi_reg_addr;
input wire dmi_reg_wr_en;
input wire [31:0] dmi_reg_wdata;
output wire [31:0] dmi_reg_rdata;
input wire [pt[56-:12]:1] extintsrc_req;
input wire timer_int;
input wire soft_int;
input wire scan_mode;
wire [63:0] hwdata_nc;
wire ifu_pmu_instr_aligned;
wire ifu_ic_error_start;
wire ifu_iccm_rd_ecc_single_err;
wire lsu_axi_awready_ahb;
wire lsu_axi_wready_ahb;
wire lsu_axi_bvalid_ahb;
wire lsu_axi_bready_ahb;
wire [1:0] lsu_axi_bresp_ahb;
wire [pt[181-:8] - 1:0] lsu_axi_bid_ahb;
wire lsu_axi_arready_ahb;
wire lsu_axi_rvalid_ahb;
wire [pt[181-:8] - 1:0] lsu_axi_rid_ahb;
wire [63:0] lsu_axi_rdata_ahb;
wire [1:0] lsu_axi_rresp_ahb;
wire lsu_axi_rlast_ahb;
wire lsu_axi_awready_int;
wire lsu_axi_wready_int;
wire lsu_axi_bvalid_int;
wire lsu_axi_bready_int;
wire [1:0] lsu_axi_bresp_int;
wire [pt[181-:8] - 1:0] lsu_axi_bid_int;
wire lsu_axi_arready_int;
wire lsu_axi_rvalid_int;
wire [pt[181-:8] - 1:0] lsu_axi_rid_int;
wire [63:0] lsu_axi_rdata_int;
wire [1:0] lsu_axi_rresp_int;
wire lsu_axi_rlast_int;
wire ifu_axi_awready_ahb;
wire ifu_axi_wready_ahb;
wire ifu_axi_bvalid_ahb;
wire ifu_axi_bready_ahb;
wire [1:0] ifu_axi_bresp_ahb;
wire [pt[826-:8] - 1:0] ifu_axi_bid_ahb;
wire ifu_axi_arready_ahb;
wire ifu_axi_rvalid_ahb;
wire [pt[826-:8] - 1:0] ifu_axi_rid_ahb;
wire [63:0] ifu_axi_rdata_ahb;
wire [1:0] ifu_axi_rresp_ahb;
wire ifu_axi_rlast_ahb;
wire ifu_axi_awready_int;
wire ifu_axi_wready_int;
wire ifu_axi_bvalid_int;
wire ifu_axi_bready_int;
wire [1:0] ifu_axi_bresp_int;
wire [pt[826-:8] - 1:0] ifu_axi_bid_int;
wire ifu_axi_arready_int;
wire ifu_axi_rvalid_int;
wire [pt[826-:8] - 1:0] ifu_axi_rid_int;
wire [63:0] ifu_axi_rdata_int;
wire [1:0] ifu_axi_rresp_int;
wire ifu_axi_rlast_int;
wire sb_axi_awready_ahb;
wire sb_axi_wready_ahb;
wire sb_axi_bvalid_ahb;
wire sb_axi_bready_ahb;
wire [1:0] sb_axi_bresp_ahb;
wire [pt[12-:8] - 1:0] sb_axi_bid_ahb;
wire sb_axi_arready_ahb;
wire sb_axi_rvalid_ahb;
wire [pt[12-:8] - 1:0] sb_axi_rid_ahb;
wire [63:0] sb_axi_rdata_ahb;
wire [1:0] sb_axi_rresp_ahb;
wire sb_axi_rlast_ahb;
wire sb_axi_awready_int;
wire sb_axi_wready_int;
wire sb_axi_bvalid_int;
wire sb_axi_bready_int;
wire [1:0] sb_axi_bresp_int;
wire [pt[12-:8] - 1:0] sb_axi_bid_int;
wire sb_axi_arready_int;
wire sb_axi_rvalid_int;
wire [pt[12-:8] - 1:0] sb_axi_rid_int;
wire [63:0] sb_axi_rdata_int;
wire [1:0] sb_axi_rresp_int;
wire sb_axi_rlast_int;
wire dma_axi_awvalid_ahb;
wire [pt[1235-:8] - 1:0] dma_axi_awid_ahb;
wire [31:0] dma_axi_awaddr_ahb;
wire [2:0] dma_axi_awsize_ahb;
wire [2:0] dma_axi_awprot_ahb;
wire [7:0] dma_axi_awlen_ahb;
wire [1:0] dma_axi_awburst_ahb;
wire dma_axi_wvalid_ahb;
wire [63:0] dma_axi_wdata_ahb;
wire [7:0] dma_axi_wstrb_ahb;
wire dma_axi_wlast_ahb;
wire dma_axi_bready_ahb;
wire dma_axi_arvalid_ahb;
wire [pt[1235-:8] - 1:0] dma_axi_arid_ahb;
wire [31:0] dma_axi_araddr_ahb;
wire [2:0] dma_axi_arsize_ahb;
wire [2:0] dma_axi_arprot_ahb;
wire [7:0] dma_axi_arlen_ahb;
wire [1:0] dma_axi_arburst_ahb;
wire dma_axi_rready_ahb;
wire dma_axi_awvalid_int;
wire [pt[1235-:8] - 1:0] dma_axi_awid_int;
wire [31:0] dma_axi_awaddr_int;
wire [2:0] dma_axi_awsize_int;
wire [2:0] dma_axi_awprot_int;
wire [7:0] dma_axi_awlen_int;
wire [1:0] dma_axi_awburst_int;
wire dma_axi_wvalid_int;
wire [63:0] dma_axi_wdata_int;
wire [7:0] dma_axi_wstrb_int;
wire dma_axi_wlast_int;
wire dma_axi_bready_int;
wire dma_axi_arvalid_int;
wire [pt[1235-:8] - 1:0] dma_axi_arid_int;
wire [31:0] dma_axi_araddr_int;
wire [2:0] dma_axi_arsize_int;
wire [2:0] dma_axi_arprot_int;
wire [7:0] dma_axi_arlen_int;
wire [1:0] dma_axi_arburst_int;
wire dma_axi_rready_int;
wire [70:0] ifu_ic_debug_rd_data;
wire ifu_ic_debug_rd_data_valid;
wire [89:0] dec_tlu_ic_diag_pkt;
wire dec_i0_rs1_en_d;
wire dec_i0_rs2_en_d;
wire [31:0] gpr_i0_rs1_d;
wire [31:0] gpr_i0_rs2_d;
wire [31:0] dec_i0_result_r;
wire [31:0] exu_i0_result_x;
wire [31:1] exu_i0_pc_x;
wire [31:1] exu_npc_r;
wire [43:0] i0_ap;
wire [151:0] trigger_pkt_any;
wire [3:0] lsu_trigger_match_m;
wire [31:0] dec_i0_immed_d;
wire [12:1] dec_i0_br_immed_d;
wire dec_i0_select_pc_d;
wire [31:1] dec_i0_pc_d;
wire [3:0] dec_i0_rs1_bypass_en_d;
wire [3:0] dec_i0_rs2_bypass_en_d;
wire dec_i0_alu_decode_d;
wire dec_i0_branch_d;
wire ifu_miss_state_idle;
wire dec_tlu_flush_noredir_r;
wire dec_tlu_flush_leak_one_r;
wire dec_tlu_flush_err_r;
wire ifu_i0_valid;
wire [31:0] ifu_i0_instr;
wire [31:1] ifu_i0_pc;
wire exu_flush_final;
wire [31:1] exu_flush_path_final;
wire [31:0] exu_lsu_rs1_d;
wire [31:0] exu_lsu_rs2_d;
wire [13:0] lsu_p;
wire dec_qual_lsu_d;
wire dec_lsu_valid_raw_d;
wire [11:0] dec_lsu_offset_d;
wire [31:0] lsu_result_m;
wire [31:0] lsu_result_corr_r;
wire lsu_single_ecc_error_incr;
wire [39:0] lsu_error_pkt_r;
wire lsu_imprecise_error_load_any;
wire lsu_imprecise_error_store_any;
wire [31:0] lsu_imprecise_error_addr_any;
wire lsu_load_stall_any;
wire lsu_store_stall_any;
wire lsu_idle_any;
wire lsu_active;
wire [31:1] lsu_fir_addr;
wire [1:0] lsu_fir_error;
wire lsu_nonblock_load_valid_m;
wire [pt[164-:7] - 1:0] lsu_nonblock_load_tag_m;
wire lsu_nonblock_load_inv_r;
wire [pt[164-:7] - 1:0] lsu_nonblock_load_inv_tag_r;
wire lsu_nonblock_load_data_valid;
wire [pt[164-:7] - 1:0] lsu_nonblock_load_data_tag;
wire [31:0] lsu_nonblock_load_data;
wire dec_csr_ren_d;
wire [31:0] dec_csr_rddata_d;
wire [31:0] exu_csr_rs1_x;
wire dec_tlu_i0_commit_cmt;
wire dec_tlu_flush_lower_r;
wire dec_tlu_flush_lower_wb;
wire dec_tlu_i0_kill_writeb_r;
wire dec_tlu_fence_i_r;
wire [31:1] dec_tlu_flush_path_r;
wire [31:0] dec_tlu_mrac_ff;
wire ifu_i0_pc4;
wire [19:0] mul_p;
wire [2:0] div_p;
wire dec_div_cancel;
wire [31:0] exu_div_result;
wire exu_div_wren;
wire dec_i0_decode_d;
wire [31:1] pred_correct_npc_x;
wire [6:0] dec_tlu_br0_r_pkt;
wire [55:0] exu_mp_pkt;
wire [pt[2236-:8] - 1:0] exu_mp_eghr;
wire [pt[2236-:8] - 1:0] exu_mp_fghr;
wire [pt[2172-:9]:pt[2163-:6]] exu_mp_index;
wire [pt[2139-:9] - 1:0] exu_mp_btag;
wire [pt[2236-:8] - 1:0] exu_i0_br_fghr_r;
wire [1:0] exu_i0_br_hist_r;
wire exu_i0_br_error_r;
wire exu_i0_br_start_error_r;
wire exu_i0_br_valid_r;
wire exu_i0_br_mp_r;
wire exu_i0_br_middle_r;
wire exu_i0_br_way_r;
wire [pt[2172-:9]:pt[2163-:6]] exu_i0_br_index_r;
wire dma_dccm_req;
wire dma_iccm_req;
wire [2:0] dma_mem_tag;
wire [31:0] dma_mem_addr;
wire [2:0] dma_mem_sz;
wire dma_mem_write;
wire [63:0] dma_mem_wdata;
wire dccm_dma_rvalid;
wire dccm_dma_ecc_error;
wire [2:0] dccm_dma_rtag;
wire [63:0] dccm_dma_rdata;
wire iccm_dma_rvalid;
wire iccm_dma_ecc_error;
wire [2:0] iccm_dma_rtag;
wire [63:0] iccm_dma_rdata;
wire dma_dccm_stall_any;
wire dma_iccm_stall_any;
wire dccm_ready;
wire iccm_ready;
wire dma_pmu_dccm_read;
wire dma_pmu_dccm_write;
wire dma_pmu_any_read;
wire dma_pmu_any_write;
wire ifu_i0_icaf;
wire [1:0] ifu_i0_icaf_type;
wire ifu_i0_icaf_second;
wire ifu_i0_dbecc;
wire iccm_dma_sb_error;
wire [50:0] i0_brp;
wire [pt[2172-:9]:pt[2163-:6]] ifu_i0_bp_index;
wire [pt[2236-:8] - 1:0] ifu_i0_bp_fghr;
wire [pt[2139-:9] - 1:0] ifu_i0_bp_btag;
wire [$clog2(pt[2061-:14]) - 1:0] ifu_i0_fa_index;
wire [$clog2(pt[2061-:14]) - 1:0] dec_fa_error_index;
wire [55:0] dec_i0_predict_p_d;
wire [pt[2236-:8] - 1:0] i0_predict_fghr_d;
wire [pt[2172-:9]:pt[2163-:6]] i0_predict_index_d;
wire [pt[2139-:9] - 1:0] i0_predict_btag_d;
wire picm_wren;
wire picm_rden;
wire picm_mken;
wire [31:0] picm_rdaddr;
wire [31:0] picm_wraddr;
wire [31:0] picm_wr_data;
wire [31:0] picm_rd_data;
wire dec_tlu_external_ldfwd_disable;
wire dec_tlu_bpred_disable;
wire dec_tlu_wb_coalescing_disable;
wire dec_tlu_sideeffect_posted_disable;
wire [2:0] dec_tlu_dma_qos_prty;
wire dec_tlu_misc_clk_override;
wire dec_tlu_ifu_clk_override;
wire dec_tlu_lsu_clk_override;
wire dec_tlu_bus_clk_override;
wire dec_tlu_pic_clk_override;
wire dec_tlu_dccm_clk_override;
wire dec_tlu_icm_clk_override;
wire dec_tlu_picio_clk_override;
assign dccm_clk_override = dec_tlu_dccm_clk_override;
assign icm_clk_override = dec_tlu_icm_clk_override;
wire [31:0] dbg_cmd_addr;
wire [31:0] dbg_cmd_wrdata;
wire dbg_cmd_valid;
wire dbg_cmd_write;
wire [1:0] dbg_cmd_type;
wire [1:0] dbg_cmd_size;
wire dbg_halt_req;
wire dbg_resume_req;
wire dbg_core_rst_l;
wire core_dbg_cmd_done;
wire core_dbg_cmd_fail;
wire [31:0] core_dbg_rddata;
wire dma_dbg_cmd_done;
wire dma_dbg_cmd_fail;
wire [31:0] dma_dbg_rddata;
wire dbg_dma_bubble;
wire dma_dbg_ready;
wire [31:0] dec_dbg_rddata;
wire dec_dbg_cmd_done;
wire dec_dbg_cmd_fail;
wire dec_tlu_mpc_halted_only;
wire dec_tlu_dbg_halted;
wire dec_tlu_resume_ack;
wire dec_tlu_debug_mode;
wire dec_debug_wdata_rs1_d;
wire dec_tlu_force_halt;
wire [1:0] dec_data_en;
wire [1:0] dec_ctl_en;
wire exu_pmu_i0_br_misp;
wire exu_pmu_i0_br_ataken;
wire exu_pmu_i0_pc4;
wire lsu_pmu_load_external_m;
wire lsu_pmu_store_external_m;
wire lsu_pmu_misaligned_m;
wire lsu_pmu_bus_trxn;
wire lsu_pmu_bus_misaligned;
wire lsu_pmu_bus_error;
wire lsu_pmu_bus_busy;
wire ifu_pmu_fetch_stall;
wire ifu_pmu_ic_miss;
wire ifu_pmu_ic_hit;
wire ifu_pmu_bus_error;
wire ifu_pmu_bus_busy;
wire ifu_pmu_bus_trxn;
wire active_state;
wire free_clk;
wire active_clk;
wire dec_pause_state_cg;
wire lsu_nonblock_load_data_error;
wire [15:0] ifu_i0_cinst;
wire [31:2] dec_tlu_meihap;
wire dec_extint_stall;
wire [103:0] trace_rv_trace_pkt;
wire lsu_fastint_stall_any;
wire [7:0] pic_claimid;
wire [3:0] pic_pl;
wire [3:0] dec_tlu_meicurpl;
wire [3:0] dec_tlu_meipt;
wire mexintpend;
wire mhwakeup;
wire dma_active;
wire pause_state;
wire halt_state;
wire dec_tlu_core_empty;
assign pause_state = (dec_pause_state_cg & ~(dma_active | lsu_active)) & dec_tlu_core_empty;
assign halt_state = o_cpu_halt_status & ~(dma_active | lsu_active);
assign active_state = ((~(halt_state | pause_state) | dec_tlu_flush_lower_r) | dec_tlu_flush_lower_wb) | dec_tlu_misc_clk_override;
rvoclkhdr free_cg2(
.clk(clk),
.en(1'b1),
.l1clk(free_l2clk),
.scan_mode(scan_mode)
);
rvoclkhdr active_cg2(
.clk(clk),
.en(active_state),
.l1clk(active_l2clk),
.scan_mode(scan_mode)
);
rvoclkhdr free_cg1(
.clk(free_l2clk),
.en(1'b1),
.l1clk(free_clk),
.scan_mode(scan_mode)
);
rvoclkhdr active_cg1(
.clk(active_l2clk),
.en(1'b1),
.l1clk(active_clk),
.scan_mode(scan_mode)
);
assign core_dbg_cmd_done = dma_dbg_cmd_done | dec_dbg_cmd_done;
assign core_dbg_cmd_fail = dma_dbg_cmd_fail | dec_dbg_cmd_fail;
assign core_dbg_rddata[31:0] = (dma_dbg_cmd_done ? dma_dbg_rddata[31:0] : dec_dbg_rddata[31:0]);
eb1_dbg #(.pt(pt)) dbg(
.rst_l(core_rst_l),
.clk(free_l2clk),
.clk_override(dec_tlu_misc_clk_override),
.sb_axi_awready(sb_axi_awready_int),
.sb_axi_wready(sb_axi_wready_int),
.sb_axi_bvalid(sb_axi_bvalid_int),
.sb_axi_bresp(sb_axi_bresp_int[1:0]),
.sb_axi_arready(sb_axi_arready_int),
.sb_axi_rvalid(sb_axi_rvalid_int),
.sb_axi_rdata(sb_axi_rdata_int[63:0]),
.sb_axi_rresp(sb_axi_rresp_int[1:0]),
.dbg_cmd_addr(dbg_cmd_addr),
.dbg_cmd_wrdata(dbg_cmd_wrdata),
.dbg_cmd_valid(dbg_cmd_valid),
.dbg_cmd_write(dbg_cmd_write),
.dbg_cmd_type(dbg_cmd_type),
.dbg_cmd_size(dbg_cmd_size),
.dbg_core_rst_l(dbg_core_rst_l),
.core_dbg_rddata(core_dbg_rddata),
.core_dbg_cmd_done(core_dbg_cmd_done),
.core_dbg_cmd_fail(core_dbg_cmd_fail),
.dbg_dma_bubble(dbg_dma_bubble),
.dma_dbg_ready(dma_dbg_ready),
.dbg_halt_req(dbg_halt_req),
.dbg_resume_req(dbg_resume_req),
.dec_tlu_debug_mode(dec_tlu_debug_mode),
.dec_tlu_dbg_halted(dec_tlu_dbg_halted),
.dec_tlu_mpc_halted_only(dec_tlu_mpc_halted_only),
.dec_tlu_resume_ack(dec_tlu_resume_ack),
.dmi_reg_en(dmi_reg_en),
.dmi_reg_addr(dmi_reg_addr),
.dmi_reg_wr_en(dmi_reg_wr_en),
.dmi_reg_wdata(dmi_reg_wdata),
.dmi_reg_rdata(dmi_reg_rdata),
.sb_axi_awvalid(sb_axi_awvalid),
.sb_axi_awid(sb_axi_awid),
.sb_axi_awaddr(sb_axi_awaddr),
.sb_axi_awregion(sb_axi_awregion),
.sb_axi_awlen(sb_axi_awlen),
.sb_axi_awsize(sb_axi_awsize),
.sb_axi_awburst(sb_axi_awburst),
.sb_axi_awlock(sb_axi_awlock),
.sb_axi_awcache(sb_axi_awcache),
.sb_axi_awprot(sb_axi_awprot),
.sb_axi_awqos(sb_axi_awqos),
.sb_axi_wvalid(sb_axi_wvalid),
.sb_axi_wdata(sb_axi_wdata),
.sb_axi_wstrb(sb_axi_wstrb),
.sb_axi_wlast(sb_axi_wlast),
.sb_axi_bready(sb_axi_bready),
.sb_axi_arvalid(sb_axi_arvalid),
.sb_axi_arid(sb_axi_arid),
.sb_axi_araddr(sb_axi_araddr),
.sb_axi_arregion(sb_axi_arregion),
.sb_axi_arlen(sb_axi_arlen),
.sb_axi_arsize(sb_axi_arsize),
.sb_axi_arburst(sb_axi_arburst),
.sb_axi_arlock(sb_axi_arlock),
.sb_axi_arcache(sb_axi_arcache),
.sb_axi_arprot(sb_axi_arprot),
.sb_axi_arqos(sb_axi_arqos),
.sb_axi_rready(sb_axi_rready),
.dbg_bus_clk_en(dbg_bus_clk_en),
.dbg_rst_l(dbg_rst_l),
.scan_mode(scan_mode)
);
assign core_rst_l = rst_l & (dbg_core_rst_l | scan_mode);
eb1_ifu #(.pt(pt)) ifu(
.clk(active_l2clk),
.rst_l(core_rst_l),
.dec_tlu_flush_err_wb(dec_tlu_flush_err_r),
.dec_tlu_flush_noredir_wb(dec_tlu_flush_noredir_r),
.dec_tlu_fence_i_wb(dec_tlu_fence_i_r),
.dec_tlu_flush_leak_one_wb(dec_tlu_flush_leak_one_r),
.dec_tlu_flush_lower_wb(dec_tlu_flush_lower_r),
.ifu_axi_arready(ifu_axi_arready_int),
.ifu_axi_rvalid(ifu_axi_rvalid_int),
.ifu_axi_rid(ifu_axi_rid_int[pt[826-:8] - 1:0]),
.ifu_axi_rdata(ifu_axi_rdata_int[63:0]),
.ifu_axi_rresp(ifu_axi_rresp_int[1:0]),
.exu_flush_final(exu_flush_final),
.free_l2clk(free_l2clk),
.active_clk(active_clk),
.dec_i0_decode_d(dec_i0_decode_d),
.dec_tlu_i0_commit_cmt(dec_tlu_i0_commit_cmt),
.exu_flush_path_final(exu_flush_path_final),
.dec_tlu_mrac_ff(dec_tlu_mrac_ff),
.dec_tlu_bpred_disable(dec_tlu_bpred_disable),
.dec_tlu_core_ecc_disable(dec_tlu_core_ecc_disable),
.dec_tlu_force_halt(dec_tlu_force_halt),
.ifu_axi_awvalid(ifu_axi_awvalid),
.ifu_axi_awid(ifu_axi_awid),
.ifu_axi_awaddr(ifu_axi_awaddr),
.ifu_axi_awregion(ifu_axi_awregion),
.ifu_axi_awlen(ifu_axi_awlen),
.ifu_axi_awsize(ifu_axi_awsize),
.ifu_axi_awburst(ifu_axi_awburst),
.ifu_axi_awlock(ifu_axi_awlock),
.ifu_axi_awcache(ifu_axi_awcache),
.ifu_axi_awprot(ifu_axi_awprot),
.ifu_axi_awqos(ifu_axi_awqos),
.ifu_axi_wvalid(ifu_axi_wvalid),
.ifu_axi_wdata(ifu_axi_wdata),
.ifu_axi_wstrb(ifu_axi_wstrb),
.ifu_axi_wlast(ifu_axi_wlast),
.ifu_axi_bready(ifu_axi_bready),
.ifu_axi_arvalid(ifu_axi_arvalid),
.ifu_axi_arid(ifu_axi_arid),
.ifu_axi_araddr(ifu_axi_araddr),
.ifu_axi_arregion(ifu_axi_arregion),
.ifu_axi_arlen(ifu_axi_arlen),
.ifu_axi_arsize(ifu_axi_arsize),
.ifu_axi_arburst(ifu_axi_arburst),
.ifu_axi_arlock(ifu_axi_arlock),
.ifu_axi_arcache(ifu_axi_arcache),
.ifu_axi_arprot(ifu_axi_arprot),
.ifu_axi_arqos(ifu_axi_arqos),
.ifu_axi_rready(ifu_axi_rready),
.ifu_bus_clk_en(ifu_bus_clk_en),
.dma_iccm_req(dma_iccm_req),
.dma_mem_addr(dma_mem_addr),
.dma_mem_sz(dma_mem_sz),
.dma_mem_write(dma_mem_write),
.dma_mem_wdata(dma_mem_wdata),
.dma_mem_tag(dma_mem_tag),
.dma_iccm_stall_any(dma_iccm_stall_any),
.iccm_dma_ecc_error(iccm_dma_ecc_error),
.iccm_dma_rvalid(iccm_dma_rvalid),
.iccm_dma_rdata(iccm_dma_rdata),
.iccm_dma_rtag(iccm_dma_rtag),
.iccm_ready(iccm_ready),
.ifu_pmu_instr_aligned(ifu_pmu_instr_aligned),
.ifu_pmu_fetch_stall(ifu_pmu_fetch_stall),
.ifu_ic_error_start(ifu_ic_error_start),
.ic_rw_addr(ic_rw_addr),
.ic_wr_en(ic_wr_en),
.ic_rd_en(ic_rd_en),
.ic_wr_data(ic_wr_data),
.ic_rd_data(ic_rd_data),
.ic_debug_rd_data(ic_debug_rd_data),
.ictag_debug_rd_data(ictag_debug_rd_data),
.ic_debug_wr_data(ic_debug_wr_data),
.ifu_ic_debug_rd_data(ifu_ic_debug_rd_data),
.ic_eccerr(ic_eccerr),
.ic_parerr(ic_parerr),
.ic_premux_data(ic_premux_data),
.ic_sel_premux_data(ic_sel_premux_data),
.ic_debug_addr(ic_debug_addr),
.ic_debug_rd_en(ic_debug_rd_en),
.ic_debug_wr_en(ic_debug_wr_en),
.ic_debug_tag_array(ic_debug_tag_array),
.ic_debug_way(ic_debug_way),
.ic_tag_valid(ic_tag_valid),
.ic_rd_hit(ic_rd_hit),
.ic_tag_perr(ic_tag_perr),
.iccm_rw_addr(iccm_rw_addr),
.iccm_wren(iccm_wren),
.iccm_rden(iccm_rden),
.iccm_wr_data(iccm_wr_data),
.iccm_wr_size(iccm_wr_size),
.iccm_rd_data(iccm_rd_data),
.iccm_rd_data_ecc(iccm_rd_data_ecc),
.ifu_iccm_rd_ecc_single_err(ifu_iccm_rd_ecc_single_err),
.ifu_pmu_ic_miss(ifu_pmu_ic_miss),
.ifu_pmu_ic_hit(ifu_pmu_ic_hit),
.ifu_pmu_bus_error(ifu_pmu_bus_error),
.ifu_pmu_bus_busy(ifu_pmu_bus_busy),
.ifu_pmu_bus_trxn(ifu_pmu_bus_trxn),
.ifu_i0_icaf(ifu_i0_icaf),
.ifu_i0_icaf_type(ifu_i0_icaf_type),
.ifu_i0_valid(ifu_i0_valid),
.ifu_i0_icaf_second(ifu_i0_icaf_second),
.ifu_i0_dbecc(ifu_i0_dbecc),
.iccm_dma_sb_error(iccm_dma_sb_error),
.ifu_i0_instr(ifu_i0_instr),
.ifu_i0_pc(ifu_i0_pc),
.ifu_i0_pc4(ifu_i0_pc4),
.ifu_miss_state_idle(ifu_miss_state_idle),
.i0_brp(i0_brp),
.ifu_i0_bp_index(ifu_i0_bp_index),
.ifu_i0_bp_fghr(ifu_i0_bp_fghr),
.ifu_i0_bp_btag(ifu_i0_bp_btag),
.ifu_i0_fa_index(ifu_i0_fa_index),
.exu_mp_pkt(exu_mp_pkt),
.exu_mp_eghr(exu_mp_eghr),
.exu_mp_fghr(exu_mp_fghr),
.exu_mp_index(exu_mp_index),
.exu_mp_btag(exu_mp_btag),
.dec_tlu_br0_r_pkt(dec_tlu_br0_r_pkt),
.exu_i0_br_fghr_r(exu_i0_br_fghr_r),
.exu_i0_br_index_r(exu_i0_br_index_r),
.dec_fa_error_index(dec_fa_error_index),
.ifu_i0_cinst(ifu_i0_cinst),
.dec_tlu_ic_diag_pkt(dec_tlu_ic_diag_pkt),
.ifu_ic_debug_rd_data_valid(ifu_ic_debug_rd_data_valid),
.iccm_buf_correct_ecc(iccm_buf_correct_ecc),
.iccm_correction_state(iccm_correction_state),
.scan_mode(scan_mode)
);
eb1_dec #(.pt(pt)) dec(
.clk(active_l2clk),
.dbg_cmd_wrdata(dbg_cmd_wrdata[1:0]),
.rst_l(core_rst_l),
.i_cpu_halt_req(i_cpu_halt_req),
.i_cpu_run_req(i_cpu_run_req),
.active_clk(active_clk),
.free_clk(free_clk),
.free_l2clk(free_l2clk),
.lsu_fastint_stall_any(lsu_fastint_stall_any),
.dec_extint_stall(dec_extint_stall),
.dec_i0_decode_d(dec_i0_decode_d),
.dec_pause_state_cg(dec_pause_state_cg),
.dec_tlu_core_empty(dec_tlu_core_empty),
.rst_vec(rst_vec),
.nmi_int(nmi_int),
.nmi_vec(nmi_vec),
.o_cpu_halt_status(o_cpu_halt_status),
.o_cpu_halt_ack(o_cpu_halt_ack),
.o_cpu_run_ack(o_cpu_run_ack),
.o_debug_mode_status(o_debug_mode_status),
.core_id(core_id),
.mpc_debug_halt_req(mpc_debug_halt_req),
.mpc_debug_run_req(mpc_debug_run_req),
.mpc_reset_run_req(mpc_reset_run_req),
.mpc_debug_halt_ack(mpc_debug_halt_ack),
.mpc_debug_run_ack(mpc_debug_run_ack),
.debug_brkpt_status(debug_brkpt_status),
.exu_pmu_i0_br_misp(exu_pmu_i0_br_misp),
.exu_pmu_i0_br_ataken(exu_pmu_i0_br_ataken),
.exu_pmu_i0_pc4(exu_pmu_i0_pc4),
.lsu_nonblock_load_valid_m(lsu_nonblock_load_valid_m),
.lsu_nonblock_load_tag_m(lsu_nonblock_load_tag_m),
.lsu_nonblock_load_inv_r(lsu_nonblock_load_inv_r),
.lsu_nonblock_load_inv_tag_r(lsu_nonblock_load_inv_tag_r),
.lsu_nonblock_load_data_valid(lsu_nonblock_load_data_valid),
.lsu_nonblock_load_data_error(lsu_nonblock_load_data_error),
.lsu_nonblock_load_data_tag(lsu_nonblock_load_data_tag),
.lsu_nonblock_load_data(lsu_nonblock_load_data),
.lsu_pmu_bus_trxn(lsu_pmu_bus_trxn),
.lsu_pmu_bus_misaligned(lsu_pmu_bus_misaligned),
.lsu_pmu_bus_error(lsu_pmu_bus_error),
.lsu_pmu_bus_busy(lsu_pmu_bus_busy),
.lsu_pmu_misaligned_m(lsu_pmu_misaligned_m),
.lsu_pmu_load_external_m(lsu_pmu_load_external_m),
.lsu_pmu_store_external_m(lsu_pmu_store_external_m),
.dma_pmu_dccm_read(dma_pmu_dccm_read),
.dma_pmu_dccm_write(dma_pmu_dccm_write),
.dma_pmu_any_read(dma_pmu_any_read),
.dma_pmu_any_write(dma_pmu_any_write),
.lsu_fir_addr(lsu_fir_addr),
.lsu_fir_error(lsu_fir_error),
.ifu_pmu_instr_aligned(ifu_pmu_instr_aligned),
.ifu_pmu_fetch_stall(ifu_pmu_fetch_stall),
.ifu_pmu_ic_miss(ifu_pmu_ic_miss),
.ifu_pmu_ic_hit(ifu_pmu_ic_hit),
.ifu_pmu_bus_error(ifu_pmu_bus_error),
.ifu_pmu_bus_busy(ifu_pmu_bus_busy),
.ifu_pmu_bus_trxn(ifu_pmu_bus_trxn),
.ifu_ic_error_start(ifu_ic_error_start),
.ifu_iccm_rd_ecc_single_err(ifu_iccm_rd_ecc_single_err),
.lsu_trigger_match_m(lsu_trigger_match_m),
.dbg_cmd_valid(dbg_cmd_valid),
.dbg_cmd_write(dbg_cmd_write),
.dbg_cmd_type(dbg_cmd_type),
.dbg_cmd_addr(dbg_cmd_addr),
.ifu_i0_icaf(ifu_i0_icaf),
.ifu_i0_icaf_type(ifu_i0_icaf_type),
.ifu_i0_icaf_second(ifu_i0_icaf_second),
.ifu_i0_dbecc(ifu_i0_dbecc),
.lsu_idle_any(lsu_idle_any),
.i0_brp(i0_brp),
.ifu_i0_bp_index(ifu_i0_bp_index),
.ifu_i0_bp_fghr(ifu_i0_bp_fghr),
.ifu_i0_bp_btag(ifu_i0_bp_btag),
.ifu_i0_fa_index(ifu_i0_fa_index),
.lsu_error_pkt_r(lsu_error_pkt_r),
.lsu_single_ecc_error_incr(lsu_single_ecc_error_incr),
.lsu_imprecise_error_load_any(lsu_imprecise_error_load_any),
.lsu_imprecise_error_store_any(lsu_imprecise_error_store_any),
.lsu_imprecise_error_addr_any(lsu_imprecise_error_addr_any),
.exu_div_result(exu_div_result),
.exu_div_wren(exu_div_wren),
.exu_csr_rs1_x(exu_csr_rs1_x),
.lsu_result_m(lsu_result_m),
.lsu_result_corr_r(lsu_result_corr_r),
.lsu_load_stall_any(lsu_load_stall_any),
.lsu_store_stall_any(lsu_store_stall_any),
.dma_dccm_stall_any(dma_dccm_stall_any),
.dma_iccm_stall_any(dma_iccm_stall_any),
.iccm_dma_sb_error(iccm_dma_sb_error),
.exu_flush_final(exu_flush_final),
.exu_npc_r(exu_npc_r),
.exu_i0_result_x(exu_i0_result_x),
.ifu_i0_valid(ifu_i0_valid),
.ifu_i0_instr(ifu_i0_instr),
.ifu_i0_pc(ifu_i0_pc),
.ifu_i0_pc4(ifu_i0_pc4),
.exu_i0_pc_x(exu_i0_pc_x),
.mexintpend(mexintpend),
.timer_int(timer_int),
.soft_int(soft_int),
.pic_claimid(pic_claimid),
.pic_pl(pic_pl),
.mhwakeup(mhwakeup),
.dec_tlu_meicurpl(dec_tlu_meicurpl),
.dec_tlu_meipt(dec_tlu_meipt),
.ifu_ic_debug_rd_data(ifu_ic_debug_rd_data),
.ifu_ic_debug_rd_data_valid(ifu_ic_debug_rd_data_valid),
.dec_tlu_ic_diag_pkt(dec_tlu_ic_diag_pkt),
.dbg_halt_req(dbg_halt_req),
.dbg_resume_req(dbg_resume_req),
.ifu_miss_state_idle(ifu_miss_state_idle),
.dec_tlu_dbg_halted(dec_tlu_dbg_halted),
.dec_tlu_debug_mode(dec_tlu_debug_mode),
.dec_tlu_resume_ack(dec_tlu_resume_ack),
.dec_tlu_flush_noredir_r(dec_tlu_flush_noredir_r),
.dec_tlu_mpc_halted_only(dec_tlu_mpc_halted_only),
.dec_tlu_flush_leak_one_r(dec_tlu_flush_leak_one_r),
.dec_tlu_flush_err_r(dec_tlu_flush_err_r),
.dec_tlu_meihap(dec_tlu_meihap),
.dec_debug_wdata_rs1_d(dec_debug_wdata_rs1_d),
.dec_dbg_rddata(dec_dbg_rddata),
.dec_dbg_cmd_done(dec_dbg_cmd_done),
.dec_dbg_cmd_fail(dec_dbg_cmd_fail),
.trigger_pkt_any(trigger_pkt_any),
.dec_tlu_force_halt(dec_tlu_force_halt),
.exu_i0_br_hist_r(exu_i0_br_hist_r),
.exu_i0_br_error_r(exu_i0_br_error_r),
.exu_i0_br_start_error_r(exu_i0_br_start_error_r),
.exu_i0_br_valid_r(exu_i0_br_valid_r),
.exu_i0_br_mp_r(exu_i0_br_mp_r),
.exu_i0_br_middle_r(exu_i0_br_middle_r),
.exu_i0_br_way_r(exu_i0_br_way_r),
.dec_i0_rs1_en_d(dec_i0_rs1_en_d),
.dec_i0_rs2_en_d(dec_i0_rs2_en_d),
.gpr_i0_rs1_d(gpr_i0_rs1_d),
.gpr_i0_rs2_d(gpr_i0_rs2_d),
.dec_i0_immed_d(dec_i0_immed_d),
.dec_i0_br_immed_d(dec_i0_br_immed_d),
.i0_ap(i0_ap),
.dec_i0_alu_decode_d(dec_i0_alu_decode_d),
.dec_i0_branch_d(dec_i0_branch_d),
.dec_i0_select_pc_d(dec_i0_select_pc_d),
.dec_i0_pc_d(dec_i0_pc_d),
.dec_i0_rs1_bypass_en_d(dec_i0_rs1_bypass_en_d),
.dec_i0_rs2_bypass_en_d(dec_i0_rs2_bypass_en_d),
.dec_i0_result_r(dec_i0_result_r),
.lsu_p(lsu_p),
.dec_qual_lsu_d(dec_qual_lsu_d),
.mul_p(mul_p),
.div_p(div_p),
.dec_div_cancel(dec_div_cancel),
.dec_lsu_offset_d(dec_lsu_offset_d),
.dec_csr_ren_d(dec_csr_ren_d),
.dec_csr_rddata_d(dec_csr_rddata_d),
.dec_tlu_flush_lower_r(dec_tlu_flush_lower_r),
.dec_tlu_flush_lower_wb(dec_tlu_flush_lower_wb),
.dec_tlu_flush_path_r(dec_tlu_flush_path_r),
.dec_tlu_i0_kill_writeb_r(dec_tlu_i0_kill_writeb_r),
.dec_tlu_fence_i_r(dec_tlu_fence_i_r),
.pred_correct_npc_x(pred_correct_npc_x),
.dec_tlu_br0_r_pkt(dec_tlu_br0_r_pkt),
.dec_tlu_perfcnt0(dec_tlu_perfcnt0),
.dec_tlu_perfcnt1(dec_tlu_perfcnt1),
.dec_tlu_perfcnt2(dec_tlu_perfcnt2),
.dec_tlu_perfcnt3(dec_tlu_perfcnt3),
.dec_i0_predict_p_d(dec_i0_predict_p_d),
.i0_predict_fghr_d(i0_predict_fghr_d),
.i0_predict_index_d(i0_predict_index_d),
.i0_predict_btag_d(i0_predict_btag_d),
.dec_fa_error_index(dec_fa_error_index),
.dec_lsu_valid_raw_d(dec_lsu_valid_raw_d),
.dec_tlu_mrac_ff(dec_tlu_mrac_ff),
.dec_data_en(dec_data_en),
.dec_ctl_en(dec_ctl_en),
.ifu_i0_cinst(ifu_i0_cinst),
.trace_rv_trace_pkt(trace_rv_trace_pkt),
.dec_tlu_external_ldfwd_disable(dec_tlu_external_ldfwd_disable),
.dec_tlu_sideeffect_posted_disable(dec_tlu_sideeffect_posted_disable),
.dec_tlu_core_ecc_disable(dec_tlu_core_ecc_disable),
.dec_tlu_bpred_disable(dec_tlu_bpred_disable),
.dec_tlu_wb_coalescing_disable(dec_tlu_wb_coalescing_disable),
.dec_tlu_dma_qos_prty(dec_tlu_dma_qos_prty),
.dec_tlu_misc_clk_override(dec_tlu_misc_clk_override),
.dec_tlu_ifu_clk_override(dec_tlu_ifu_clk_override),
.dec_tlu_lsu_clk_override(dec_tlu_lsu_clk_override),
.dec_tlu_bus_clk_override(dec_tlu_bus_clk_override),
.dec_tlu_pic_clk_override(dec_tlu_pic_clk_override),
.dec_tlu_picio_clk_override(dec_tlu_picio_clk_override),
.dec_tlu_dccm_clk_override(dec_tlu_dccm_clk_override),
.dec_tlu_icm_clk_override(dec_tlu_icm_clk_override),
.dec_tlu_i0_commit_cmt(dec_tlu_i0_commit_cmt),
.scan_mode(scan_mode)
);
eb1_exu #(.pt(pt)) exu(
.clk(active_l2clk),
.rst_l(core_rst_l),
.scan_mode(scan_mode),
.dec_data_en(dec_data_en),
.dec_ctl_en(dec_ctl_en),
.dbg_cmd_wrdata(dbg_cmd_wrdata),
.i0_ap(i0_ap),
.dec_debug_wdata_rs1_d(dec_debug_wdata_rs1_d),
.dec_i0_predict_p_d(dec_i0_predict_p_d),
.i0_predict_fghr_d(i0_predict_fghr_d),
.i0_predict_index_d(i0_predict_index_d),
.i0_predict_btag_d(i0_predict_btag_d),
.lsu_result_m(lsu_result_m),
.lsu_nonblock_load_data(lsu_nonblock_load_data),
.dec_i0_rs1_en_d(dec_i0_rs1_en_d),
.dec_i0_rs2_en_d(dec_i0_rs2_en_d),
.gpr_i0_rs1_d(gpr_i0_rs1_d),
.gpr_i0_rs2_d(gpr_i0_rs2_d),
.dec_i0_immed_d(dec_i0_immed_d),
.dec_i0_result_r(dec_i0_result_r),
.dec_i0_br_immed_d(dec_i0_br_immed_d),
.dec_i0_alu_decode_d(dec_i0_alu_decode_d),
.dec_i0_branch_d(dec_i0_branch_d),
.dec_i0_select_pc_d(dec_i0_select_pc_d),
.dec_i0_pc_d(dec_i0_pc_d),
.dec_i0_rs1_bypass_en_d(dec_i0_rs1_bypass_en_d),
.dec_i0_rs2_bypass_en_d(dec_i0_rs2_bypass_en_d),
.dec_csr_ren_d(dec_csr_ren_d),
.dec_csr_rddata_d(dec_csr_rddata_d),
.dec_qual_lsu_d(dec_qual_lsu_d),
.mul_p(mul_p),
.div_p(div_p),
.dec_div_cancel(dec_div_cancel),
.pred_correct_npc_x(pred_correct_npc_x),
.dec_tlu_flush_lower_r(dec_tlu_flush_lower_r),
.dec_tlu_flush_path_r(dec_tlu_flush_path_r),
.dec_extint_stall(dec_extint_stall),
.dec_tlu_meihap(dec_tlu_meihap),
.exu_lsu_rs1_d(exu_lsu_rs1_d),
.exu_lsu_rs2_d(exu_lsu_rs2_d),
.exu_flush_final(exu_flush_final),
.exu_flush_path_final(exu_flush_path_final),
.exu_i0_result_x(exu_i0_result_x),
.exu_i0_pc_x(exu_i0_pc_x),
.exu_csr_rs1_x(exu_csr_rs1_x),
.exu_npc_r(exu_npc_r),
.exu_i0_br_hist_r(exu_i0_br_hist_r),
.exu_i0_br_error_r(exu_i0_br_error_r),
.exu_i0_br_start_error_r(exu_i0_br_start_error_r),
.exu_i0_br_index_r(exu_i0_br_index_r),
.exu_i0_br_valid_r(exu_i0_br_valid_r),
.exu_i0_br_mp_r(exu_i0_br_mp_r),
.exu_i0_br_middle_r(exu_i0_br_middle_r),
.exu_i0_br_fghr_r(exu_i0_br_fghr_r),
.exu_i0_br_way_r(exu_i0_br_way_r),
.exu_mp_pkt(exu_mp_pkt),
.exu_mp_eghr(exu_mp_eghr),
.exu_mp_fghr(exu_mp_fghr),
.exu_mp_index(exu_mp_index),
.exu_mp_btag(exu_mp_btag),
.exu_pmu_i0_br_misp(exu_pmu_i0_br_misp),
.exu_pmu_i0_br_ataken(exu_pmu_i0_br_ataken),
.exu_pmu_i0_pc4(exu_pmu_i0_pc4),
.exu_div_result(exu_div_result),
.exu_div_wren(exu_div_wren)
);
eb1_lsu #(.pt(pt)) lsu(
.clk(active_l2clk),
.rst_l(core_rst_l),
.clk_override(dec_tlu_lsu_clk_override),
.dec_tlu_i0_kill_writeb_r(dec_tlu_i0_kill_writeb_r),
.lsu_axi_awready(lsu_axi_awready_int),
.lsu_axi_wready(lsu_axi_wready_int),
.lsu_axi_bvalid(lsu_axi_bvalid_int),
.lsu_axi_bid(lsu_axi_bid_int[pt[181-:8] - 1:0]),
.lsu_axi_bresp(lsu_axi_bresp_int[1:0]),
.lsu_axi_arready(lsu_axi_arready_int),
.lsu_axi_rvalid(lsu_axi_rvalid_int),
.lsu_axi_rid(lsu_axi_rid_int[pt[181-:8] - 1:0]),
.lsu_axi_rdata(lsu_axi_rdata_int[63:0]),
.lsu_axi_rresp(lsu_axi_rresp_int[1:0]),
.lsu_axi_rlast(lsu_axi_rlast_int),
.dec_tlu_flush_lower_r(dec_tlu_flush_lower_r),
.dec_tlu_force_halt(dec_tlu_force_halt),
.dec_tlu_external_ldfwd_disable(dec_tlu_external_ldfwd_disable),
.dec_tlu_wb_coalescing_disable(dec_tlu_wb_coalescing_disable),
.dec_tlu_sideeffect_posted_disable(dec_tlu_sideeffect_posted_disable),
.dec_tlu_core_ecc_disable(dec_tlu_core_ecc_disable),
.exu_lsu_rs1_d(exu_lsu_rs1_d),
.exu_lsu_rs2_d(exu_lsu_rs2_d),
.dec_lsu_offset_d(dec_lsu_offset_d),
.lsu_p(lsu_p),
.dec_lsu_valid_raw_d(dec_lsu_valid_raw_d),
.dec_tlu_mrac_ff(dec_tlu_mrac_ff),
.lsu_result_m(lsu_result_m),
.lsu_result_corr_r(lsu_result_corr_r),
.lsu_load_stall_any(lsu_load_stall_any),
.lsu_store_stall_any(lsu_store_stall_any),
.lsu_fastint_stall_any(lsu_fastint_stall_any),
.lsu_idle_any(lsu_idle_any),
.lsu_active(lsu_active),
.lsu_fir_addr(lsu_fir_addr),
.lsu_fir_error(lsu_fir_error),
.lsu_single_ecc_error_incr(lsu_single_ecc_error_incr),
.lsu_error_pkt_r(lsu_error_pkt_r),
.lsu_imprecise_error_load_any(lsu_imprecise_error_load_any),
.lsu_imprecise_error_store_any(lsu_imprecise_error_store_any),
.lsu_imprecise_error_addr_any(lsu_imprecise_error_addr_any),
.lsu_nonblock_load_valid_m(lsu_nonblock_load_valid_m),
.lsu_nonblock_load_tag_m(lsu_nonblock_load_tag_m),
.lsu_nonblock_load_inv_r(lsu_nonblock_load_inv_r),
.lsu_nonblock_load_inv_tag_r(lsu_nonblock_load_inv_tag_r),
.lsu_nonblock_load_data_valid(lsu_nonblock_load_data_valid),
.lsu_nonblock_load_data_error(lsu_nonblock_load_data_error),
.lsu_nonblock_load_data_tag(lsu_nonblock_load_data_tag),
.lsu_nonblock_load_data(lsu_nonblock_load_data),
.lsu_pmu_load_external_m(lsu_pmu_load_external_m),
.lsu_pmu_store_external_m(lsu_pmu_store_external_m),
.lsu_pmu_misaligned_m(lsu_pmu_misaligned_m),
.lsu_pmu_bus_trxn(lsu_pmu_bus_trxn),
.lsu_pmu_bus_misaligned(lsu_pmu_bus_misaligned),
.lsu_pmu_bus_error(lsu_pmu_bus_error),
.lsu_pmu_bus_busy(lsu_pmu_bus_busy),
.trigger_pkt_any(trigger_pkt_any),
.lsu_trigger_match_m(lsu_trigger_match_m),
.dccm_wren(dccm_wren),
.dccm_rden(dccm_rden),
.dccm_wr_addr_lo(dccm_wr_addr_lo),
.dccm_wr_addr_hi(dccm_wr_addr_hi),
.dccm_rd_addr_lo(dccm_rd_addr_lo),
.dccm_rd_addr_hi(dccm_rd_addr_hi),
.dccm_wr_data_lo(dccm_wr_data_lo),
.dccm_wr_data_hi(dccm_wr_data_hi),
.dccm_rd_data_lo(dccm_rd_data_lo),
.dccm_rd_data_hi(dccm_rd_data_hi),
.picm_wren(picm_wren),
.picm_rden(picm_rden),
.picm_mken(picm_mken),
.picm_rdaddr(picm_rdaddr),
.picm_wraddr(picm_wraddr),
.picm_wr_data(picm_wr_data),
.picm_rd_data(picm_rd_data),
.lsu_axi_awvalid(lsu_axi_awvalid),
.lsu_axi_awid(lsu_axi_awid),
.lsu_axi_awaddr(lsu_axi_awaddr),
.lsu_axi_awregion(lsu_axi_awregion),
.lsu_axi_awlen(lsu_axi_awlen),
.lsu_axi_awsize(lsu_axi_awsize),
.lsu_axi_awburst(lsu_axi_awburst),
.lsu_axi_awlock(lsu_axi_awlock),
.lsu_axi_awcache(lsu_axi_awcache),
.lsu_axi_awprot(lsu_axi_awprot),
.lsu_axi_awqos(lsu_axi_awqos),
.lsu_axi_wvalid(lsu_axi_wvalid),
.lsu_axi_wdata(lsu_axi_wdata),
.lsu_axi_wstrb(lsu_axi_wstrb),
.lsu_axi_wlast(lsu_axi_wlast),
.lsu_axi_bready(lsu_axi_bready),
.lsu_axi_arvalid(lsu_axi_arvalid),
.lsu_axi_arid(lsu_axi_arid),
.lsu_axi_araddr(lsu_axi_araddr),
.lsu_axi_arregion(lsu_axi_arregion),
.lsu_axi_arlen(lsu_axi_arlen),
.lsu_axi_arsize(lsu_axi_arsize),
.lsu_axi_arburst(lsu_axi_arburst),
.lsu_axi_arlock(lsu_axi_arlock),
.lsu_axi_arcache(lsu_axi_arcache),
.lsu_axi_arprot(lsu_axi_arprot),
.lsu_axi_arqos(lsu_axi_arqos),
.lsu_axi_rready(lsu_axi_rready),
.lsu_bus_clk_en(lsu_bus_clk_en),
.dma_dccm_req(dma_dccm_req),
.dma_mem_tag(dma_mem_tag),
.dma_mem_addr(dma_mem_addr),
.dma_mem_sz(dma_mem_sz),
.dma_mem_write(dma_mem_write),
.dma_mem_wdata(dma_mem_wdata),
.dccm_dma_rvalid(dccm_dma_rvalid),
.dccm_dma_ecc_error(dccm_dma_ecc_error),
.dccm_dma_rtag(dccm_dma_rtag),
.dccm_dma_rdata(dccm_dma_rdata),
.dccm_ready(dccm_ready),
.scan_mode(scan_mode),
.active_clk(active_clk)
);
eb1_pic_ctrl #(.pt(pt)) pic_ctrl_inst(
.clk(free_l2clk),
.clk_override(dec_tlu_pic_clk_override),
.io_clk_override(dec_tlu_picio_clk_override),
.picm_mken(picm_mken),
.extintsrc_req({extintsrc_req[pt[56-:12]:1], 1'b0}),
.pl(pic_pl[3:0]),
.claimid(pic_claimid[7:0]),
.meicurpl(dec_tlu_meicurpl[3:0]),
.meipt(dec_tlu_meipt[3:0]),
.rst_l(core_rst_l),
.free_clk(free_clk),
.picm_rdaddr(picm_rdaddr),
.picm_wraddr(picm_wraddr),
.picm_wr_data(picm_wr_data),
.picm_wren(picm_wren),
.picm_rden(picm_rden),
.mexintpend(mexintpend),
.picm_rd_data(picm_rd_data),
.mhwakeup(mhwakeup),
.scan_mode(scan_mode)
);
eb1_dma_ctrl #(.pt(pt)) dma_ctrl(
.clk(free_l2clk),
.rst_l(core_rst_l),
.clk_override(dec_tlu_misc_clk_override),
.dma_axi_awvalid(dma_axi_awvalid_int),
.dma_axi_awid(dma_axi_awid_int[pt[1235-:8] - 1:0]),
.dma_axi_awaddr(dma_axi_awaddr_int[31:0]),
.dma_axi_awsize(dma_axi_awsize_int[2:0]),
.dma_axi_wvalid(dma_axi_wvalid_int),
.dma_axi_wdata(dma_axi_wdata_int[63:0]),
.dma_axi_wstrb(dma_axi_wstrb_int[7:0]),
.dma_axi_bready(dma_axi_bready_int),
.dma_axi_arvalid(dma_axi_arvalid_int),
.dma_axi_arid(dma_axi_arid_int[pt[1235-:8] - 1:0]),
.dma_axi_araddr(dma_axi_araddr_int[31:0]),
.dma_axi_arsize(dma_axi_arsize_int[2:0]),
.dma_axi_rready(dma_axi_rready_int),
.free_clk(free_clk),
.dma_bus_clk_en(dma_bus_clk_en),
.scan_mode(scan_mode),
.dbg_cmd_addr(dbg_cmd_addr),
.dbg_cmd_wrdata(dbg_cmd_wrdata),
.dbg_cmd_valid(dbg_cmd_valid),
.dbg_cmd_write(dbg_cmd_write),
.dbg_cmd_type(dbg_cmd_type),
.dbg_cmd_size(dbg_cmd_size),
.dbg_dma_bubble(dbg_dma_bubble),
.dma_dbg_ready(dma_dbg_ready),
.dma_dbg_cmd_done(dma_dbg_cmd_done),
.dma_dbg_cmd_fail(dma_dbg_cmd_fail),
.dma_dbg_rddata(dma_dbg_rddata),
.dma_dccm_req(dma_dccm_req),
.dma_iccm_req(dma_iccm_req),
.dma_mem_tag(dma_mem_tag),
.dma_mem_addr(dma_mem_addr),
.dma_mem_sz(dma_mem_sz),
.dma_mem_write(dma_mem_write),
.dma_mem_wdata(dma_mem_wdata),
.dccm_dma_rvalid(dccm_dma_rvalid),
.dccm_dma_ecc_error(dccm_dma_ecc_error),
.dccm_dma_rtag(dccm_dma_rtag),
.dccm_dma_rdata(dccm_dma_rdata),
.iccm_dma_rvalid(iccm_dma_rvalid),
.iccm_dma_ecc_error(iccm_dma_ecc_error),
.iccm_dma_rtag(iccm_dma_rtag),
.iccm_dma_rdata(iccm_dma_rdata),
.dma_active(dma_active),
.dma_dccm_stall_any(dma_dccm_stall_any),
.dma_iccm_stall_any(dma_iccm_stall_any),
.dccm_ready(dccm_ready),
.iccm_ready(iccm_ready),
.dec_tlu_dma_qos_prty(dec_tlu_dma_qos_prty),
.dma_pmu_dccm_read(dma_pmu_dccm_read),
.dma_pmu_dccm_write(dma_pmu_dccm_write),
.dma_pmu_any_read(dma_pmu_any_read),
.dma_pmu_any_write(dma_pmu_any_write),
.dma_axi_awready(dma_axi_awready),
.dma_axi_wready(dma_axi_wready),
.dma_axi_bvalid(dma_axi_bvalid),
.dma_axi_bresp(dma_axi_bresp),
.dma_axi_bid(dma_axi_bid),
.dma_axi_arready(dma_axi_arready),
.dma_axi_rvalid(dma_axi_rvalid),
.dma_axi_rid(dma_axi_rid),
.dma_axi_rdata(dma_axi_rdata),
.dma_axi_rresp(dma_axi_rresp),
.dma_axi_rlast(dma_axi_rlast)
);
generate
if (pt[2038] == 1) begin : Gen_AXI_To_AHB
axi4_to_ahb #(
.pt(pt),
.TAG(pt[181-:8])
) lsu_axi4_to_ahb(
.clk(free_l2clk),
.free_clk(free_clk),
.rst_l(core_rst_l),
.clk_override(dec_tlu_bus_clk_override),
.bus_clk_en(lsu_bus_clk_en),
.dec_tlu_force_halt(dec_tlu_force_halt),
.axi_awvalid(lsu_axi_awvalid),
.axi_awready(lsu_axi_awready_ahb),
.axi_awid(lsu_axi_awid[pt[181-:8] - 1:0]),
.axi_awaddr(lsu_axi_awaddr[31:0]),
.axi_awsize(lsu_axi_awsize[2:0]),
.axi_awprot(lsu_axi_awprot[2:0]),
.axi_wvalid(lsu_axi_wvalid),
.axi_wready(lsu_axi_wready_ahb),
.axi_wdata(lsu_axi_wdata[63:0]),
.axi_wstrb(lsu_axi_wstrb[7:0]),
.axi_wlast(lsu_axi_wlast),
.axi_bvalid(lsu_axi_bvalid_ahb),
.axi_bready(lsu_axi_bready),
.axi_bresp(lsu_axi_bresp_ahb[1:0]),
.axi_bid(lsu_axi_bid_ahb[pt[181-:8] - 1:0]),
.axi_arvalid(lsu_axi_arvalid),
.axi_arready(lsu_axi_arready_ahb),
.axi_arid(lsu_axi_arid[pt[181-:8] - 1:0]),
.axi_araddr(lsu_axi_araddr[31:0]),
.axi_arsize(lsu_axi_arsize[2:0]),
.axi_arprot(lsu_axi_arprot[2:0]),
.axi_rvalid(lsu_axi_rvalid_ahb),
.axi_rready(lsu_axi_rready),
.axi_rid(lsu_axi_rid_ahb[pt[181-:8] - 1:0]),
.axi_rdata(lsu_axi_rdata_ahb[63:0]),
.axi_rresp(lsu_axi_rresp_ahb[1:0]),
.axi_rlast(lsu_axi_rlast_ahb),
.ahb_haddr(lsu_haddr[31:0]),
.ahb_hburst(lsu_hburst),
.ahb_hmastlock(lsu_hmastlock),
.ahb_hprot(lsu_hprot[3:0]),
.ahb_hsize(lsu_hsize[2:0]),
.ahb_htrans(lsu_htrans[1:0]),
.ahb_hwrite(lsu_hwrite),
.ahb_hwdata(lsu_hwdata[63:0]),
.ahb_hrdata(lsu_hrdata[63:0]),
.ahb_hready(lsu_hready),
.ahb_hresp(lsu_hresp),
.scan_mode(scan_mode)
);
axi4_to_ahb #(
.pt(pt),
.TAG(pt[826-:8])
) ifu_axi4_to_ahb(
.clk(free_l2clk),
.free_clk(free_clk),
.rst_l(core_rst_l),
.clk_override(dec_tlu_bus_clk_override),
.bus_clk_en(ifu_bus_clk_en),
.dec_tlu_force_halt(dec_tlu_force_halt),
.ahb_haddr(haddr[31:0]),
.ahb_hburst(hburst),
.ahb_hmastlock(hmastlock),
.ahb_hprot(hprot[3:0]),
.ahb_hsize(hsize[2:0]),
.ahb_htrans(htrans[1:0]),
.ahb_hwrite(hwrite),
.ahb_hwdata(hwdata_nc[63:0]),
.ahb_hrdata(hrdata[63:0]),
.ahb_hready(hready),
.ahb_hresp(hresp),
.axi_awvalid(ifu_axi_awvalid),
.axi_awready(ifu_axi_awready_ahb),
.axi_awid(ifu_axi_awid[pt[826-:8] - 1:0]),
.axi_awaddr(ifu_axi_awaddr[31:0]),
.axi_awsize(ifu_axi_awsize[2:0]),
.axi_awprot(ifu_axi_awprot[2:0]),
.axi_wvalid(ifu_axi_wvalid),
.axi_wready(ifu_axi_wready_ahb),
.axi_wdata(ifu_axi_wdata[63:0]),
.axi_wstrb(ifu_axi_wstrb[7:0]),
.axi_wlast(ifu_axi_wlast),
.axi_bvalid(ifu_axi_bvalid_ahb),
.axi_bready(1'b1),
.axi_bresp(ifu_axi_bresp_ahb[1:0]),
.axi_bid(ifu_axi_bid_ahb[pt[826-:8] - 1:0]),
.axi_arvalid(ifu_axi_arvalid),
.axi_arready(ifu_axi_arready_ahb),
.axi_arid(ifu_axi_arid[pt[826-:8] - 1:0]),
.axi_araddr(ifu_axi_araddr[31:0]),
.axi_arsize(ifu_axi_arsize[2:0]),
.axi_arprot(ifu_axi_arprot[2:0]),
.axi_rvalid(ifu_axi_rvalid_ahb),
.axi_rready(ifu_axi_rready),
.axi_rid(ifu_axi_rid_ahb[pt[826-:8] - 1:0]),
.axi_rdata(ifu_axi_rdata_ahb[63:0]),
.axi_rresp(ifu_axi_rresp_ahb[1:0]),
.axi_rlast(ifu_axi_rlast_ahb),
.scan_mode(scan_mode)
);
axi4_to_ahb #(
.pt(pt),
.TAG(pt[12-:8])
) sb_axi4_to_ahb(
.clk(free_l2clk),
.free_clk(free_clk),
.rst_l(dbg_rst_l),
.clk_override(dec_tlu_bus_clk_override),
.bus_clk_en(dbg_bus_clk_en),
.dec_tlu_force_halt(1'b0),
.axi_awvalid(sb_axi_awvalid),
.axi_awready(sb_axi_awready_ahb),
.axi_awid(sb_axi_awid[pt[12-:8] - 1:0]),
.axi_awaddr(sb_axi_awaddr[31:0]),
.axi_awsize(sb_axi_awsize[2:0]),
.axi_awprot(sb_axi_awprot[2:0]),
.axi_wvalid(sb_axi_wvalid),
.axi_wready(sb_axi_wready_ahb),
.axi_wdata(sb_axi_wdata[63:0]),
.axi_wstrb(sb_axi_wstrb[7:0]),
.axi_wlast(sb_axi_wlast),
.axi_bvalid(sb_axi_bvalid_ahb),
.axi_bready(sb_axi_bready),
.axi_bresp(sb_axi_bresp_ahb[1:0]),
.axi_bid(sb_axi_bid_ahb[pt[12-:8] - 1:0]),
.axi_arvalid(sb_axi_arvalid),
.axi_arready(sb_axi_arready_ahb),
.axi_arid(sb_axi_arid[pt[12-:8] - 1:0]),
.axi_araddr(sb_axi_araddr[31:0]),
.axi_arsize(sb_axi_arsize[2:0]),
.axi_arprot(sb_axi_arprot[2:0]),
.axi_rvalid(sb_axi_rvalid_ahb),
.axi_rready(sb_axi_rready),
.axi_rid(sb_axi_rid_ahb[pt[12-:8] - 1:0]),
.axi_rdata(sb_axi_rdata_ahb[63:0]),
.axi_rresp(sb_axi_rresp_ahb[1:0]),
.axi_rlast(sb_axi_rlast_ahb),
.ahb_haddr(sb_haddr[31:0]),
.ahb_hburst(sb_hburst),
.ahb_hmastlock(sb_hmastlock),
.ahb_hprot(sb_hprot[3:0]),
.ahb_hsize(sb_hsize[2:0]),
.ahb_htrans(sb_htrans[1:0]),
.ahb_hwrite(sb_hwrite),
.ahb_hwdata(sb_hwdata[63:0]),
.ahb_hrdata(sb_hrdata[63:0]),
.ahb_hready(sb_hready),
.ahb_hresp(sb_hresp),
.scan_mode(scan_mode)
);
ahb_to_axi4 #(
.pt(pt),
.TAG(pt[1235-:8])
) dma_ahb_to_axi4(
.clk(free_l2clk),
.rst_l(core_rst_l),
.clk_override(dec_tlu_bus_clk_override),
.bus_clk_en(dma_bus_clk_en),
.axi_awvalid(dma_axi_awvalid_ahb),
.axi_awready(dma_axi_awready),
.axi_awid(dma_axi_awid_ahb[pt[1235-:8] - 1:0]),
.axi_awaddr(dma_axi_awaddr_ahb[31:0]),
.axi_awsize(dma_axi_awsize_ahb[2:0]),
.axi_awprot(dma_axi_awprot_ahb[2:0]),
.axi_awlen(dma_axi_awlen_ahb[7:0]),
.axi_awburst(dma_axi_awburst_ahb[1:0]),
.axi_wvalid(dma_axi_wvalid_ahb),
.axi_wready(dma_axi_wready),
.axi_wdata(dma_axi_wdata_ahb[63:0]),
.axi_wstrb(dma_axi_wstrb_ahb[7:0]),
.axi_wlast(dma_axi_wlast_ahb),
.axi_bvalid(dma_axi_bvalid),
.axi_bready(dma_axi_bready_ahb),
.axi_bresp(dma_axi_bresp[1:0]),
.axi_bid(dma_axi_bid[pt[1235-:8] - 1:0]),
.axi_arvalid(dma_axi_arvalid_ahb),
.axi_arready(dma_axi_arready),
.axi_arid(dma_axi_arid_ahb[pt[1235-:8] - 1:0]),
.axi_araddr(dma_axi_araddr_ahb[31:0]),
.axi_arsize(dma_axi_arsize_ahb[2:0]),
.axi_arprot(dma_axi_arprot_ahb[2:0]),
.axi_arlen(dma_axi_arlen_ahb[7:0]),
.axi_arburst(dma_axi_arburst_ahb[1:0]),
.axi_rvalid(dma_axi_rvalid),
.axi_rready(dma_axi_rready_ahb),
.axi_rid(dma_axi_rid[pt[1235-:8] - 1:0]),
.axi_rdata(dma_axi_rdata[63:0]),
.axi_rresp(dma_axi_rresp[1:0]),
.ahb_haddr(dma_haddr[31:0]),
.ahb_hburst(dma_hburst),
.ahb_hmastlock(dma_hmastlock),
.ahb_hprot(dma_hprot[3:0]),
.ahb_hsize(dma_hsize[2:0]),
.ahb_htrans(dma_htrans[1:0]),
.ahb_hwrite(dma_hwrite),
.ahb_hwdata(dma_hwdata[63:0]),
.ahb_hrdata(dma_hrdata[63:0]),
.ahb_hreadyout(dma_hreadyout),
.ahb_hresp(dma_hresp),
.ahb_hreadyin(dma_hreadyin),
.ahb_hsel(dma_hsel),
.scan_mode(scan_mode)
);
end
endgenerate
assign lsu_axi_awready_int = (pt[2038] ? lsu_axi_awready_ahb : lsu_axi_awready);
assign lsu_axi_wready_int = (pt[2038] ? lsu_axi_wready_ahb : lsu_axi_wready);
assign lsu_axi_bvalid_int = (pt[2038] ? lsu_axi_bvalid_ahb : lsu_axi_bvalid);
assign lsu_axi_bready_int = (pt[2038] ? lsu_axi_bready_ahb : lsu_axi_bready);
assign lsu_axi_bresp_int[1:0] = (pt[2038] ? lsu_axi_bresp_ahb[1:0] : lsu_axi_bresp[1:0]);
assign lsu_axi_bid_int[pt[181-:8] - 1:0] = (pt[2038] ? lsu_axi_bid_ahb[pt[181-:8] - 1:0] : lsu_axi_bid[pt[181-:8] - 1:0]);
assign lsu_axi_arready_int = (pt[2038] ? lsu_axi_arready_ahb : lsu_axi_arready);
assign lsu_axi_rvalid_int = (pt[2038] ? lsu_axi_rvalid_ahb : lsu_axi_rvalid);
assign lsu_axi_rid_int[pt[181-:8] - 1:0] = (pt[2038] ? lsu_axi_rid_ahb[pt[181-:8] - 1:0] : lsu_axi_rid[pt[181-:8] - 1:0]);
assign lsu_axi_rdata_int[63:0] = (pt[2038] ? lsu_axi_rdata_ahb[63:0] : lsu_axi_rdata[63:0]);
assign lsu_axi_rresp_int[1:0] = (pt[2038] ? lsu_axi_rresp_ahb[1:0] : lsu_axi_rresp[1:0]);
assign lsu_axi_rlast_int = (pt[2038] ? lsu_axi_rlast_ahb : lsu_axi_rlast);
assign ifu_axi_awready_int = (pt[2038] ? ifu_axi_awready_ahb : ifu_axi_awready);
assign ifu_axi_wready_int = (pt[2038] ? ifu_axi_wready_ahb : ifu_axi_wready);
assign ifu_axi_bvalid_int = (pt[2038] ? ifu_axi_bvalid_ahb : ifu_axi_bvalid);
assign ifu_axi_bready_int = (pt[2038] ? ifu_axi_bready_ahb : ifu_axi_bready);
assign ifu_axi_bresp_int[1:0] = (pt[2038] ? ifu_axi_bresp_ahb[1:0] : ifu_axi_bresp[1:0]);
assign ifu_axi_bid_int[pt[826-:8] - 1:0] = (pt[2038] ? ifu_axi_bid_ahb[pt[826-:8] - 1:0] : ifu_axi_bid[pt[826-:8] - 1:0]);
assign ifu_axi_arready_int = (pt[2038] ? ifu_axi_arready_ahb : ifu_axi_arready);
assign ifu_axi_rvalid_int = (pt[2038] ? ifu_axi_rvalid_ahb : ifu_axi_rvalid);
assign ifu_axi_rid_int[pt[826-:8] - 1:0] = (pt[2038] ? ifu_axi_rid_ahb[pt[826-:8] - 1:0] : ifu_axi_rid[pt[826-:8] - 1:0]);
assign ifu_axi_rdata_int[63:0] = (pt[2038] ? ifu_axi_rdata_ahb[63:0] : ifu_axi_rdata[63:0]);
assign ifu_axi_rresp_int[1:0] = (pt[2038] ? ifu_axi_rresp_ahb[1:0] : ifu_axi_rresp[1:0]);
assign ifu_axi_rlast_int = (pt[2038] ? ifu_axi_rlast_ahb : ifu_axi_rlast);
assign sb_axi_awready_int = (pt[2038] ? sb_axi_awready_ahb : sb_axi_awready);
assign sb_axi_wready_int = (pt[2038] ? sb_axi_wready_ahb : sb_axi_wready);
assign sb_axi_bvalid_int = (pt[2038] ? sb_axi_bvalid_ahb : sb_axi_bvalid);
assign sb_axi_bready_int = (pt[2038] ? sb_axi_bready_ahb : sb_axi_bready);
assign sb_axi_bresp_int[1:0] = (pt[2038] ? sb_axi_bresp_ahb[1:0] : sb_axi_bresp[1:0]);
assign sb_axi_bid_int[pt[12-:8] - 1:0] = (pt[2038] ? sb_axi_bid_ahb[pt[12-:8] - 1:0] : sb_axi_bid[pt[12-:8] - 1:0]);
assign sb_axi_arready_int = (pt[2038] ? sb_axi_arready_ahb : sb_axi_arready);
assign sb_axi_rvalid_int = (pt[2038] ? sb_axi_rvalid_ahb : sb_axi_rvalid);
assign sb_axi_rid_int[pt[12-:8] - 1:0] = (pt[2038] ? sb_axi_rid_ahb[pt[12-:8] - 1:0] : sb_axi_rid[pt[12-:8] - 1:0]);
assign sb_axi_rdata_int[63:0] = (pt[2038] ? sb_axi_rdata_ahb[63:0] : sb_axi_rdata[63:0]);
assign sb_axi_rresp_int[1:0] = (pt[2038] ? sb_axi_rresp_ahb[1:0] : sb_axi_rresp[1:0]);
assign sb_axi_rlast_int = (pt[2038] ? sb_axi_rlast_ahb : sb_axi_rlast);
assign dma_axi_awvalid_int = (pt[2038] ? dma_axi_awvalid_ahb : dma_axi_awvalid);
assign dma_axi_awid_int[pt[1235-:8] - 1:0] = (pt[2038] ? dma_axi_awid_ahb[pt[1235-:8] - 1:0] : dma_axi_awid[pt[1235-:8] - 1:0]);
assign dma_axi_awaddr_int[31:0] = (pt[2038] ? dma_axi_awaddr_ahb[31:0] : dma_axi_awaddr[31:0]);
assign dma_axi_awsize_int[2:0] = (pt[2038] ? dma_axi_awsize_ahb[2:0] : dma_axi_awsize[2:0]);
assign dma_axi_awprot_int[2:0] = (pt[2038] ? dma_axi_awprot_ahb[2:0] : dma_axi_awprot[2:0]);
assign dma_axi_awlen_int[7:0] = (pt[2038] ? dma_axi_awlen_ahb[7:0] : dma_axi_awlen[7:0]);
assign dma_axi_awburst_int[1:0] = (pt[2038] ? dma_axi_awburst_ahb[1:0] : dma_axi_awburst[1:0]);
assign dma_axi_wvalid_int = (pt[2038] ? dma_axi_wvalid_ahb : dma_axi_wvalid);
assign dma_axi_wdata_int[63:0] = (pt[2038] ? dma_axi_wdata_ahb[63:0] : dma_axi_wdata);
assign dma_axi_wstrb_int[7:0] = (pt[2038] ? dma_axi_wstrb_ahb[7:0] : dma_axi_wstrb[7:0]);
assign dma_axi_wlast_int = (pt[2038] ? dma_axi_wlast_ahb : dma_axi_wlast);
assign dma_axi_bready_int = (pt[2038] ? dma_axi_bready_ahb : dma_axi_bready);
assign dma_axi_arvalid_int = (pt[2038] ? dma_axi_arvalid_ahb : dma_axi_arvalid);
assign dma_axi_arid_int[pt[1235-:8] - 1:0] = (pt[2038] ? dma_axi_arid_ahb[pt[1235-:8] - 1:0] : dma_axi_arid[pt[1235-:8] - 1:0]);
assign dma_axi_araddr_int[31:0] = (pt[2038] ? dma_axi_araddr_ahb[31:0] : dma_axi_araddr[31:0]);
assign dma_axi_arsize_int[2:0] = (pt[2038] ? dma_axi_arsize_ahb[2:0] : dma_axi_arsize[2:0]);
assign dma_axi_arprot_int[2:0] = (pt[2038] ? dma_axi_arprot_ahb[2:0] : dma_axi_arprot[2:0]);
assign dma_axi_arlen_int[7:0] = (pt[2038] ? dma_axi_arlen_ahb[7:0] : dma_axi_arlen[7:0]);
assign dma_axi_arburst_int[1:0] = (pt[2038] ? dma_axi_arburst_ahb[1:0] : dma_axi_arburst[1:0]);
assign dma_axi_rready_int = (pt[2038] ? dma_axi_rready_ahb : dma_axi_rready);
assign trace_rv_i_insn_ip[31:0] = trace_rv_trace_pkt[102:71];
assign trace_rv_i_address_ip[31:0] = trace_rv_trace_pkt[70:39];
assign trace_rv_i_valid_ip = trace_rv_trace_pkt[103];
assign trace_rv_i_exception_ip = trace_rv_trace_pkt[38];
assign trace_rv_i_ecause_ip[4:0] = trace_rv_trace_pkt[37:33];
assign trace_rv_i_interrupt_ip = trace_rv_trace_pkt[32];
assign trace_rv_i_tval_ip[31:0] = trace_rv_trace_pkt[31:0];
endmodule
module dmi_wrapper (
trst_n,
tck,
tms,
tdi,
tdo,
tdoEnable,
core_rst_n,
core_clk,
jtag_id,
rd_data,
reg_wr_data,
reg_wr_addr,
reg_en,
reg_wr_en,
dmi_hard_reset
);
input trst_n;
input tck;
input tms;
input tdi;
output tdo;
output tdoEnable;
input core_rst_n;
input core_clk;
input [31:1] jtag_id;
input [31:0] rd_data;
output [31:0] reg_wr_data;
output [6:0] reg_wr_addr;
output reg_en;
output reg_wr_en;
output dmi_hard_reset;
wire rd_en;
wire wr_en;
wire dmireset;
rvjtag_tap i_jtag_tap(
.trst(trst_n),
.tck(tck),
.tms(tms),
.tdi(tdi),
.tdo(tdo),
.tdoEnable(tdoEnable),
.wr_data(reg_wr_data),
.wr_addr(reg_wr_addr),
.rd_en(rd_en),
.wr_en(wr_en),
.rd_data(rd_data),
.rd_status(2'b00),
.idle(3'h0),
.dmi_stat(2'b00),
.version(4'h1),
.jtag_id(jtag_id),
.dmi_hard_reset(dmi_hard_reset),
.dmi_reset(dmireset)
);
dmi_jtag_to_core_sync i_dmi_jtag_to_core_sync(
.wr_en(wr_en),
.rd_en(rd_en),
.rst_n(core_rst_n),
.clk(core_clk),
.reg_en(reg_en),
.reg_wr_en(reg_wr_en)
);
endmodule
module eb1_uart_rx_prog (
i_Clock,
rst_ni,
i_Rx_Serial,
CLKS_PER_BIT,
o_Rx_DV,
o_Rx_Byte
);
input i_Clock;
input rst_ni;
input i_Rx_Serial;
input [15:0] CLKS_PER_BIT;
output o_Rx_DV;
output [7:0] o_Rx_Byte;
parameter s_IDLE = 3'b000;
parameter s_RX_START_BIT = 3'b001;
parameter s_RX_DATA_BITS = 3'b010;
parameter s_RX_STOP_BIT = 3'b011;
parameter s_CLEANUP = 3'b100;
reg r_Rx_Data_R;
reg r_Rx_Data;
reg [15:0] r_Clock_Count;
reg [2:0] r_Bit_Index;
reg [7:0] r_Rx_Byte;
reg r_Rx_DV;
reg [2:0] r_SM_Main;
always @(posedge i_Clock)
if (rst_ni == 1'b0) begin
r_Rx_Data_R <= 1'b1;
r_Rx_Data <= 1'b1;
end
else begin
r_Rx_Data_R <= i_Rx_Serial;
r_Rx_Data <= r_Rx_Data_R;
end
always @(posedge i_Clock or negedge rst_ni)
if (rst_ni == 1'b0) begin
r_SM_Main <= s_IDLE;
r_Rx_DV <= 1'b0;
r_Clock_Count <= 16'h0000;
r_Bit_Index <= 3'b000;
r_Rx_Byte <= 8'h00;
end
else
case (r_SM_Main)
s_IDLE: begin
r_Rx_DV <= 1'b0;
r_Clock_Count <= 0;
r_Bit_Index <= 0;
if (r_Rx_Data == 1'b0)
r_SM_Main <= s_RX_START_BIT;
else
r_SM_Main <= s_IDLE;
end
s_RX_START_BIT:
if (r_Clock_Count == ((CLKS_PER_BIT - 1) >> 1)) begin
if (r_Rx_Data == 1'b0) begin
r_Clock_Count <= 0;
r_SM_Main <= s_RX_DATA_BITS;
end
else
r_SM_Main <= s_IDLE;
end
else begin
r_Clock_Count <= r_Clock_Count + 1;
r_SM_Main <= s_RX_START_BIT;
end
s_RX_DATA_BITS:
if (r_Clock_Count < (CLKS_PER_BIT - 1)) begin
r_Clock_Count <= r_Clock_Count + 1;
r_SM_Main <= s_RX_DATA_BITS;
end
else begin
r_Clock_Count <= 0;
r_Rx_Byte[r_Bit_Index] <= r_Rx_Data;
if (r_Bit_Index < 7) begin
r_Bit_Index <= r_Bit_Index + 1;
r_SM_Main <= s_RX_DATA_BITS;
end
else begin
r_Bit_Index <= 0;
r_SM_Main <= s_RX_STOP_BIT;
end
end
s_RX_STOP_BIT:
if (r_Clock_Count < (CLKS_PER_BIT - 1)) begin
r_Clock_Count <= r_Clock_Count + 1;
r_SM_Main <= s_RX_STOP_BIT;
end
else begin
r_Rx_DV <= 1'b1;
r_Clock_Count <= 0;
r_SM_Main <= s_CLEANUP;
end
s_CLEANUP: begin
r_SM_Main <= s_IDLE;
r_Rx_DV <= 1'b0;
end
default: r_SM_Main <= s_IDLE;
endcase
assign o_Rx_DV = r_Rx_DV;
assign o_Rx_Byte = r_Rx_Byte;
endmodule
module eb1_iccm_controller (
clk_i,
rst_ni,
rx_dv_i,
rx_byte_i,
we_o,
addr_o,
wdata_o,
reset_o
);
input wire clk_i;
input wire rst_ni;
input wire rx_dv_i;
input wire [7:0] rx_byte_i;
output wire we_o;
output wire [13:0] addr_o;
output wire [31:0] wdata_o;
output wire reset_o;
reg [1:0] ctrl_fsm_cs;
reg [1:0] ctrl_fsm_ns;
wire [7:0] rx_byte_d;
reg [7:0] rx_byte_q0;
reg [7:0] rx_byte_q1;
reg [7:0] rx_byte_q2;
reg [7:0] rx_byte_q3;
reg we_q;
reg we_d;
reg [13:0] addr_q;
reg [13:0] addr_d;
reg reset_q;
reg reset_d;
reg [1:0] byte_count;
localparam [1:0] DONE = 3;
localparam [1:0] LOAD = 1;
localparam [1:0] PROG = 2;
localparam [1:0] RESET = 0;
always @(*) begin
we_d = we_q;
addr_d = addr_q;
reset_d = reset_q;
ctrl_fsm_ns = ctrl_fsm_cs;
case (ctrl_fsm_cs)
RESET: begin
we_d = 1'b0;
reset_d = 1'b0;
if (rx_dv_i)
ctrl_fsm_ns = LOAD;
else
ctrl_fsm_ns = RESET;
end
LOAD:
if (((byte_count == 2'b11) && (rx_byte_q2 != 8'h0f)) && (rx_byte_d != 8'hff)) begin
we_d = 1'b1;
ctrl_fsm_ns = PROG;
end
else
ctrl_fsm_ns = DONE;
PROG: begin
we_d = 1'b0;
ctrl_fsm_ns = DONE;
end
DONE:
if (wdata_o == 32'h00000fff) begin
ctrl_fsm_ns = DONE;
reset_d = 1'b1;
end
else if (rx_dv_i)
ctrl_fsm_ns = LOAD;
else
ctrl_fsm_ns = DONE;
default: ctrl_fsm_ns = RESET;
endcase
end
assign rx_byte_d = rx_byte_i;
assign we_o = we_q;
assign addr_o = addr_q;
assign wdata_o = {rx_byte_q0, rx_byte_q1, rx_byte_q2, rx_byte_q3};
assign reset_o = reset_q;
always @(posedge clk_i or negedge rst_ni)
if (!rst_ni) begin
we_q <= 1'b0;
addr_q <= 14'b00000000000000;
rx_byte_q0 <= 8'b00000000;
rx_byte_q1 <= 8'b00000000;
rx_byte_q2 <= 8'b00000000;
rx_byte_q3 <= 8'b00000000;
reset_q <= 1'b0;
byte_count <= 2'b00;
ctrl_fsm_cs <= RESET;
end
else begin
we_q <= we_d;
if (ctrl_fsm_cs == LOAD) begin
if (byte_count == 2'b00) begin
rx_byte_q0 <= rx_byte_d;
byte_count <= 2'b01;
end
else if (byte_count == 2'b01) begin
rx_byte_q1 <= rx_byte_d;
byte_count <= 2'b10;
end
else if (byte_count == 2'b10) begin
rx_byte_q2 <= rx_byte_d;
byte_count <= 2'b11;
end
else begin
rx_byte_q3 <= rx_byte_d;
byte_count <= 2'b00;
end
addr_q <= addr_d;
end
if (ctrl_fsm_cs == PROG)
addr_q <= addr_d + 2'h2;
reset_q <= reset_d;
ctrl_fsm_cs <= ctrl_fsm_ns;
end
endmodule
module eb1_mem (
`ifdef USE_POWER_PINS
vccd1,
vssd1,
`endif
clk,
rst_l,
dccm_clk_override,
icm_clk_override,
dec_tlu_core_ecc_disable,
dccm_wren,
dccm_rden,
dccm_wr_addr_lo,
dccm_wr_addr_hi,
dccm_rd_addr_lo,
dccm_rd_addr_hi,
dccm_wr_data_lo,
dccm_wr_data_hi,
dccm_rd_data_lo,
dccm_rd_data_hi,
dccm_ext_in_pkt,
iccm_ext_in_pkt,
iccm_rw_addr,
iccm_buf_correct_ecc,
iccm_correction_state,
iccm_wren,
iccm_rden,
iccm_wr_size,
iccm_wr_data,
iccm_rd_data,
iccm_rd_data_ecc,
ic_rw_addr,
ic_tag_valid,
ic_wr_en,
ic_rd_en,
ic_premux_data,
ic_sel_premux_data,
ic_data_ext_in_pkt,
ic_tag_ext_in_pkt,
ic_wr_data,
ic_debug_wr_data,
ic_debug_rd_data,
ic_debug_addr,
ic_debug_rd_en,
ic_debug_wr_en,
ic_debug_tag_array,
ic_debug_way,
ic_rd_data,
ictag_debug_rd_data,
ic_eccerr,
ic_parerr,
ic_rd_hit,
ic_tag_perr,
scan_mode
);
function automatic [0:0] sv2v_cast_1;
input reg [0:0] inp;
sv2v_cast_1 = inp;
endfunction
parameter [2270:0] pt = {232'h0808040001c0400000000000010102000060800080103c12160802000c, sv2v_cast_1(4'h0), 5'h01, 5'h01, 6'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 7'h02, 9'h00c, 7'h04, 10'h020, 7'h07, 5'h01, 10'h027, 8'h08, 9'h004, 8'h0f, 36'h0f0040000, 14'h0004, 6'h02, 7'h03, 5'h01, 7'h05, 9'h001, 6'h02, 8'h01, 5'h01, 5'h01, 7'h01, 7'h03, 6'h03, 8'h08, 7'h02, 8'h05, 8'h03, 5'h01, 18'h00200, 7'h04, 11'h040, 5'h01, 5'h00, 11'h047, 9'h00c, 11'h040, 8'h08, 8'h02, 8'h02, 7'h02, 5'h00, 8'h06, 13'h0010, 7'h01, 5'h01, 17'h00080, 7'h06, 9'h00d, 8'h02, 8'h02, 5'h01, 7'h02, 9'h003, 9'h004, 9'h00c, 5'h01, 5'h00, 8'h08, 9'h004, 5'h01, 8'h0a, 36'h0affff000, 14'h0004, 5'h01, 6'h02, 8'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 5'h00, 5'h00, 5'h01, 6'h02, 8'h03, 9'h004, 7'h02, 9'h00c, 8'h04, 5'h00, 5'h00, 36'h0f00c0000, 9'h00f, 8'h01, 8'h0f, 13'h0020, 12'h01f, 13'h0020, 8'h08, 5'h01, 6'h02, 8'h01, 5'h01};
`ifdef USE_POWER_PINS
inout wire vccd1;
inout wire vssd1;
`endif
input wire clk;
input wire rst_l;
input wire dccm_clk_override;
input wire icm_clk_override;
input wire dec_tlu_core_ecc_disable;
input wire dccm_wren;
input wire dccm_rden;
input wire [pt[1398-:9] - 1:0] dccm_wr_addr_lo;
input wire [pt[1398-:9] - 1:0] dccm_wr_addr_hi;
input wire [pt[1398-:9] - 1:0] dccm_rd_addr_lo;
input wire [pt[1398-:9] - 1:0] dccm_rd_addr_hi;
input wire [pt[1360-:10] - 1:0] dccm_wr_data_lo;
input wire [pt[1360-:10] - 1:0] dccm_wr_data_hi;
output wire [pt[1360-:10] - 1:0] dccm_rd_data_lo;
output wire [pt[1360-:10] - 1:0] dccm_rd_data_hi;
input wire [(pt[1342-:9] * 12) - 1:0] dccm_ext_in_pkt;
input wire [(pt[909-:9] * 12) - 1:0] iccm_ext_in_pkt;
input wire [pt[936-:9] - 1:1] iccm_rw_addr;
input wire iccm_buf_correct_ecc;
input wire iccm_correction_state;
input wire iccm_wren;
input wire iccm_rden;
input wire [2:0] iccm_wr_size;
input wire [77:0] iccm_wr_data;
output wire [63:0] iccm_rd_data;
output wire [77:0] iccm_rd_data_ecc;
input wire [31:1] ic_rw_addr;
input wire [pt[1060-:7] - 1:0] ic_tag_valid;
input wire [pt[1060-:7] - 1:0] ic_wr_en;
input wire ic_rd_en;
input wire [63:0] ic_premux_data;
input wire ic_sel_premux_data;
input wire [((pt[1060-:7] * pt[1189-:7]) * 12) - 1:0] ic_data_ext_in_pkt;
input wire [(pt[1060-:7] * 12) - 1:0] ic_tag_ext_in_pkt;
input wire [(pt[1189-:7] * 71) - 1:0] ic_wr_data;
input wire [70:0] ic_debug_wr_data;
output wire [70:0] ic_debug_rd_data;
input wire [pt[1104-:9]:3] ic_debug_addr;
input wire ic_debug_rd_en;
input wire ic_debug_wr_en;
input wire ic_debug_tag_array;
input wire [pt[1060-:7] - 1:0] ic_debug_way;
output wire [63:0] ic_rd_data;
output wire [25:0] ictag_debug_rd_data;
output wire [pt[1189-:7] - 1:0] ic_eccerr;
output wire [pt[1189-:7] - 1:0] ic_parerr;
output wire [pt[1060-:7] - 1:0] ic_rd_hit;
output wire ic_tag_perr;
input wire scan_mode;
wire active_clk;
rvoclkhdr active_cg(
.en(1'b1),
.l1clk(active_clk),
.clk(clk),
.scan_mode(scan_mode)
);
generate
if (pt[1365-:5] == 1) begin : Gen_dccm_enable
eb1_lsu_dccm_mem #(.pt(pt)) dccm(
.clk_override(dccm_clk_override),
`ifdef USE_POWER_PINS
.vccd1(vccd1),
.vssd1(vssd1),
`endif
.clk(clk),
.active_clk(active_clk),
.rst_l(rst_l),
.dccm_wren(dccm_wren),
.dccm_rden(dccm_rden),
.dccm_wr_addr_lo(dccm_wr_addr_lo),
.dccm_wr_addr_hi(dccm_wr_addr_hi),
.dccm_rd_addr_lo(dccm_rd_addr_lo),
.dccm_rd_addr_hi(dccm_rd_addr_hi),
.dccm_wr_data_lo(dccm_wr_data_lo),
.dccm_wr_data_hi(dccm_wr_data_hi),
.dccm_ext_in_pkt(dccm_ext_in_pkt),
.dccm_rd_data_lo(dccm_rd_data_lo),
.dccm_rd_data_hi(dccm_rd_data_hi),
.scan_mode(scan_mode)
);
end
else begin : Gen_dccm_disable
assign dccm_rd_data_lo = {pt[1360-:10] {1'sb0}};
assign dccm_rd_data_hi = {pt[1360-:10] {1'sb0}};
end
endgenerate
generate
if (pt[1120-:5]) begin : icache
eb1_ifu_ic_mem #(.pt(pt)) icm(
.clk_override(icm_clk_override),
.*
);
end
else begin
assign ic_rd_hit[pt[1060-:7] - 1:0] = {pt[1060-:7] {1'sb0}};
assign ic_tag_perr = 1'b0;
assign ic_rd_data = {64 {1'sb0}};
assign ictag_debug_rd_data = {26 {1'sb0}};
end
endgenerate
generate
if (pt[927-:5]) begin : iccm
eb1_ifu_iccm_mem #(.pt(pt)) iccm(
`ifdef USE_POWER_PINS
.vccd1(vccd1),
.vssd1(vssd1),
`endif
.clk(clk),
.active_clk(active_clk),
.rst_l(rst_l),
.iccm_wren(iccm_wren),
.iccm_rden(iccm_rden),
.iccm_buf_correct_ecc(iccm_buf_correct_ecc),
.iccm_correction_state(iccm_correction_state),
.iccm_wr_size(iccm_wr_size),
.iccm_wr_data(iccm_wr_data),
.iccm_ext_in_pkt(iccm_ext_in_pkt),
.iccm_rd_data_ecc(iccm_rd_data_ecc),
.scan_mode(scan_mode),
.clk_override(icm_clk_override),
.iccm_rw_addr(iccm_rw_addr[pt[936-:9] - 1:1]),
.iccm_rd_data(iccm_rd_data[63:0])
);
end
else begin
assign iccm_rd_data = {64 {1'sb0}};
assign iccm_rd_data_ecc = {78 {1'sb0}};
end
endgenerate
endmodule
module eb1_pic_ctrl (
clk,
free_clk,
rst_l,
clk_override,
io_clk_override,
extintsrc_req,
picm_rdaddr,
picm_wraddr,
picm_wr_data,
picm_wren,
picm_rden,
picm_mken,
meicurpl,
meipt,
mexintpend,
claimid,
pl,
picm_rd_data,
mhwakeup,
scan_mode
);
function automatic [0:0] sv2v_cast_1;
input reg [0:0] inp;
sv2v_cast_1 = inp;
endfunction
parameter [2270:0] pt = {232'h0808040001c0400000000000010102000060800080103c12160802000c, sv2v_cast_1(4'h0), 5'h01, 5'h01, 6'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 7'h02, 9'h00c, 7'h04, 10'h020, 7'h07, 5'h01, 10'h027, 8'h08, 9'h004, 8'h0f, 36'h0f0040000, 14'h0004, 6'h02, 7'h03, 5'h01, 7'h05, 9'h001, 6'h02, 8'h01, 5'h01, 5'h01, 7'h01, 7'h03, 6'h03, 8'h08, 7'h02, 8'h05, 8'h03, 5'h01, 18'h00200, 7'h04, 11'h040, 5'h01, 5'h00, 11'h047, 9'h00c, 11'h040, 8'h08, 8'h02, 8'h02, 7'h02, 5'h00, 8'h06, 13'h0010, 7'h01, 5'h01, 17'h00080, 7'h06, 9'h00d, 8'h02, 8'h02, 5'h01, 7'h02, 9'h003, 9'h004, 9'h00c, 5'h01, 5'h00, 8'h08, 9'h004, 5'h01, 8'h0a, 36'h0affff000, 14'h0004, 5'h01, 6'h02, 8'h03, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 36'h000000000, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 5'h00, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 36'h0ffffffff, 5'h00, 5'h00, 5'h01, 6'h02, 8'h03, 9'h004, 7'h02, 9'h00c, 8'h04, 5'h00, 5'h00, 36'h0f00c0000, 9'h00f, 8'h01, 8'h0f, 13'h0020, 12'h01f, 13'h0020, 8'h08, 5'h01, 6'h02, 8'h01, 5'h01};
input wire clk;
input wire free_clk;
input wire rst_l;
input wire clk_override;
input wire io_clk_override;
input wire [pt[44-:13] - 1:0] extintsrc_req;
input wire [31:0] picm_rdaddr;
input wire [31:0] picm_wraddr;
input wire [31:0] picm_wr_data;
input wire picm_wren;
input wire picm_rden;
input wire picm_mken;
input wire [3:0] meicurpl;
input wire [3:0] meipt;
output wire mexintpend;
output wire [7:0] claimid;
output wire [3:0] pl;
output wire [31:0] picm_rd_data;
output wire mhwakeup;
input wire scan_mode;
localparam NUM_LEVELS = $clog2(pt[44-:13]);
localparam INTPRIORITY_BASE_ADDR = pt[130-:36];
localparam INTPEND_BASE_ADDR = pt[130-:36] + 32'h00001000;
localparam INTENABLE_BASE_ADDR = pt[130-:36] + 32'h00002000;
localparam EXT_INTR_PIC_CONFIG = pt[130-:36] + 32'h00003000;
localparam EXT_INTR_GW_CONFIG = pt[130-:36] + 32'h00004000;
localparam EXT_INTR_GW_CLEAR = pt[130-:36] + 32'h00005000;
localparam INTPEND_SIZE = (pt[44-:13] < 32 ? 32 : (pt[44-:13] < 64 ? 64 : (pt[44-:13] < 128 ? 128 : (pt[44-:13] < 256 ? 256 : (pt[44-:13] < 512 ? 512 : 1024)))));
localparam INT_GRPS = INTPEND_SIZE / 32;
localparam INTPRIORITY_BITS = 4;
localparam ID_BITS = 8;
localparam signed [(pt[44-:13] * 32) - 1:0] GW_CONFIG = {pt[44-:13] {32'sd0}};
localparam INT_ENABLE_GRPS = (pt[44-:13] - 1) / 4;
wire [pt[44-:13] - 1:0] intenable_clk_enable;
wire [INT_ENABLE_GRPS:0] intenable_clk_enable_grp;
wire [INT_ENABLE_GRPS:0] gw_clk;
wire addr_intpend_base_match;
wire raddr_config_pic_match;
wire raddr_intenable_base_match;
wire raddr_intpriority_base_match;
wire raddr_config_gw_base_match;
wire waddr_config_pic_match;
wire waddr_intpriority_base_match;
wire waddr_intenable_base_match;
wire waddr_config_gw_base_match;
wire addr_clear_gw_base_match;
wire mexintpend_in;
wire mhwakeup_in;
wire intpend_reg_read;
wire [31:0] picm_rd_data_in;
reg [31:0] intpend_rd_out;
reg intenable_rd_out;
reg [3:0] intpriority_rd_out;
reg [1:0] gw_config_rd_out;
wire [(pt[44-:13] * 4) - 1:0] intpriority_reg;
wire [(pt[44-:13] * 4) - 1:0] intpriority_reg_inv;
wire [pt[44-:13] - 1:0] intpriority_reg_we;
wire [pt[44-:13] - 1:0] intpriority_reg_re;
wire [(pt[44-:13] * 2) - 1:0] gw_config_reg;
wire [pt[44-:13] - 1:0] intenable_reg;
wire [pt[44-:13] - 1:0] intenable_reg_we;
wire [pt[44-:13] - 1:0] intenable_reg_re;
wire [pt[44-:13] - 1:0] gw_config_reg_we;
wire [pt[44-:13] - 1:0] gw_config_reg_re;
wire [pt[44-:13] - 1:0] gw_clear_reg_we;
wire [INTPEND_SIZE - 1:0] intpend_reg_extended;
wire [(pt[44-:13] * 4) - 1:0] intpend_w_prior_en;
wire [(pt[44-:13] * 8) - 1:0] intpend_id;
wire [3:0] maxint;
wire [3:0] selected_int_priority;
wire [(INT_GRPS * 32) - 1:0] intpend_rd_part_out;
wire config_reg;
wire intpriord;
wire config_reg_we;
wire config_reg_re;
wire config_reg_in;
wire prithresh_reg_write;
wire prithresh_reg_read;
wire intpriority_reg_read;
wire intenable_reg_read;
wire gw_config_reg_read;
wire picm_wren_ff;
wire picm_rden_ff;
wire [31:0] picm_raddr_ff;
wire [31:0] picm_waddr_ff;
wire [31:0] picm_wr_data_ff;
reg [3:0] mask;
wire picm_mken_ff;
wire [7:0] claimid_in;
wire [3:0] pl_in;
wire [3:0] pl_in_q;
wire [pt[44-:13] - 1:0] extintsrc_req_sync;
wire [pt[44-:13] - 1:0] extintsrc_req_gw;
wire picm_bypass_ff;
wire pic_raddr_c1_clken;
wire pic_waddr_c1_clken;
wire pic_data_c1_clken;
wire pic_pri_c1_clken;
wire pic_int_c1_clken;
wire gw_config_c1_clken;
wire pic_raddr_c1_clk;
wire pic_data_c1_clk;
wire pic_pri_c1_clk;
wire pic_int_c1_clk;
wire gw_config_c1_clk;
assign pic_raddr_c1_clken = (picm_mken | picm_rden) | clk_override;
assign pic_data_c1_clken = picm_wren | clk_override;
assign pic_pri_c1_clken = ((waddr_intpriority_base_match & picm_wren_ff) | (raddr_intpriority_base_match & picm_rden_ff)) | clk_override;
assign pic_int_c1_clken = ((waddr_intenable_base_match & picm_wren_ff) | (raddr_intenable_base_match & picm_rden_ff)) | clk_override;
assign gw_config_c1_clken = ((waddr_config_gw_base_match & picm_wren_ff) | (raddr_config_gw_base_match & picm_rden_ff)) | clk_override;
rvoclkhdr pic_addr_c1_cgc(
.en(pic_raddr_c1_clken),
.l1clk(pic_raddr_c1_clk),
.clk(clk),
.scan_mode(scan_mode)
);
rvoclkhdr pic_data_c1_cgc(
.en(pic_data_c1_clken),
.l1clk(pic_data_c1_clk),
.clk(clk),
.scan_mode(scan_mode)
);
rvoclkhdr pic_pri_c1_cgc(
.en(pic_pri_c1_clken),
.l1clk(pic_pri_c1_clk),
.clk(clk),
.scan_mode(scan_mode)
);
rvoclkhdr pic_int_c1_cgc(
.en(pic_int_c1_clken),
.l1clk(pic_int_c1_clk),
.clk(clk),
.scan_mode(scan_mode)
);
rvoclkhdr gw_config_c1_cgc(
.en(gw_config_c1_clken),
.l1clk(gw_config_c1_clk),
.clk(clk),
.scan_mode(scan_mode)
);
assign raddr_intenable_base_match = picm_raddr_ff[31:NUM_LEVELS + 2] == INTENABLE_BASE_ADDR[31:NUM_LEVELS + 2];
assign raddr_intpriority_base_match = picm_raddr_ff[31:NUM_LEVELS + 2] == INTPRIORITY_BASE_ADDR[31:NUM_LEVELS + 2];
assign raddr_config_gw_base_match = picm_raddr_ff[31:NUM_LEVELS + 2] == EXT_INTR_GW_CONFIG[31:NUM_LEVELS + 2];
assign raddr_config_pic_match = picm_raddr_ff[31:0] == EXT_INTR_PIC_CONFIG[31:0];
assign addr_intpend_base_match = picm_raddr_ff[31:6] == INTPEND_BASE_ADDR[31:6];
assign waddr_config_pic_match = picm_waddr_ff[31:0] == EXT_INTR_PIC_CONFIG[31:0];
assign addr_clear_gw_base_match = picm_waddr_ff[31:NUM_LEVELS + 2] == EXT_INTR_GW_CLEAR[31:NUM_LEVELS + 2];
assign waddr_intpriority_base_match = picm_waddr_ff[31:NUM_LEVELS + 2] == INTPRIORITY_BASE_ADDR[31:NUM_LEVELS + 2];
assign waddr_intenable_base_match = picm_waddr_ff[31:NUM_LEVELS + 2] == INTENABLE_BASE_ADDR[31:NUM_LEVELS + 2];
assign waddr_config_gw_base_match = picm_waddr_ff[31:NUM_LEVELS + 2] == EXT_INTR_GW_CONFIG[31:NUM_LEVELS + 2];
assign picm_bypass_ff = (picm_rden_ff & picm_wren_ff) & (picm_raddr_ff[31:0] == picm_waddr_ff[31:0]);
rvdff #(.WIDTH(32)) picm_radd_flop(
.rst_l(rst_l),
.din(picm_rdaddr),
.dout(picm_raddr_ff),
.clk(pic_raddr_c1_clk)
);
rvdff #(.WIDTH(32)) picm_wadd_flop(
.rst_l(rst_l),
.din(picm_wraddr),
.dout(picm_waddr_ff),
.clk(pic_data_c1_clk)
);
rvdff #(.WIDTH(1)) picm_wre_flop(
.rst_l(rst_l),
.din(picm_wren),
.dout(picm_wren_ff),
.clk(free_clk)
);
rvdff #(.WIDTH(1)) picm_rde_flop(
.rst_l(rst_l),
.din(picm_rden),
.dout(picm_rden_ff),
.clk(free_clk)
);
rvdff #(.WIDTH(1)) picm_mke_flop(
.rst_l(rst_l),
.din(picm_mken),
.dout(picm_mken_ff),
.clk(free_clk)
);
rvdff #(.WIDTH(32)) picm_dat_flop(
.rst_l(rst_l),
.din(picm_wr_data[31:0]),
.dout(picm_wr_data_ff[31:0]),
.clk(pic_data_c1_clk)
);
genvar p;
generate
for (p = 0; p <= INT_ENABLE_GRPS; p = p + 1) begin : IO_CLK_GRP
if (p == INT_ENABLE_GRPS) begin : LAST_GRP
assign intenable_clk_enable_grp[p] = |intenable_clk_enable[pt[44-:13] - 1:p * 4] | io_clk_override;
rvoclkhdr intenable_c1_cgc(
.en(intenable_clk_enable_grp[p]),
.l1clk(gw_clk[p]),
.clk(clk),
.scan_mode(scan_mode)
);
end
else begin : CLK_GRPS
assign intenable_clk_enable_grp[p] = |intenable_clk_enable[(p * 4) + 3:p * 4] | io_clk_override;
rvoclkhdr intenable_c1_cgc(
.en(intenable_clk_enable_grp[p]),
.l1clk(gw_clk[p]),
.clk(clk),
.scan_mode(scan_mode)
);
end
end
endgenerate
genvar i;
generate
for (i = 0; i < pt[44-:13]; i = i + 1) begin : SETREG
if (i > 0) begin : NON_ZERO_INT
assign intpriority_reg_we[i] = (waddr_intpriority_base_match & (picm_waddr_ff[NUM_LEVELS + 1:2] == i)) & picm_wren_ff;
assign intpriority_reg_re[i] = (raddr_intpriority_base_match & (picm_raddr_ff[NUM_LEVELS + 1:2] == i)) & picm_rden_ff;
assign intenable_reg_we[i] = (waddr_intenable_base_match & (picm_waddr_ff[NUM_LEVELS + 1:2] == i)) & picm_wren_ff;
assign intenable_reg_re[i] = (raddr_intenable_base_match & (picm_raddr_ff[NUM_LEVELS + 1:2] == i)) & picm_rden_ff;
assign gw_config_reg_we[i] = (waddr_config_gw_base_match & (picm_waddr_ff[NUM_LEVELS + 1:2] == i)) & picm_wren_ff;
assign gw_config_reg_re[i] = (raddr_config_gw_base_match & (picm_raddr_ff[NUM_LEVELS + 1:2] == i)) & picm_rden_ff;
assign gw_clear_reg_we[i] = (addr_clear_gw_base_match & (picm_waddr_ff[NUM_LEVELS + 1:2] == i)) & picm_wren_ff;
rvdffs #(.WIDTH(INTPRIORITY_BITS)) intpriority_ff(
.rst_l(rst_l),
.en(intpriority_reg_we[i]),
.din(picm_wr_data_ff[3:0]),
.dout(intpriority_reg[i * 4+:4]),
.clk(pic_pri_c1_clk)
);
rvdffs #(.WIDTH(1)) intenable_ff(
.rst_l(rst_l),
.en(intenable_reg_we[i]),
.din(picm_wr_data_ff[0]),
.dout(intenable_reg[i]),
.clk(pic_int_c1_clk)
);
assign intenable_clk_enable[i] = ((gw_config_reg[(i * 2) + 1] | intenable_reg_we[i]) | intenable_reg[i]) | gw_clear_reg_we[i];
rvsyncss_fpga #(.WIDTH(1)) sync_inst(
.gw_clk(gw_clk[i / 4]),
.rawclk(clk),
.clken(intenable_clk_enable_grp[i / 4]),
.dout(extintsrc_req_sync[i]),
.din(extintsrc_req[i]),
.rst_l(rst_l)
);
rvdffs #(.WIDTH(2)) gw_config_ff(
.rst_l(rst_l),
.en(gw_config_reg_we[i]),
.din(picm_wr_data_ff[1:0]),
.dout(gw_config_reg[i * 2+:2]),
.clk(gw_config_c1_clk)
);
eb1_configurable_gw config_gw_inst(
.rst_l(rst_l),
.gw_clk(gw_clk[i / 4]),
.rawclk(clk),
.clken(intenable_clk_enable_grp[i / 4]),
.extintsrc_req_sync(extintsrc_req_sync[i]),
.meigwctrl_polarity(gw_config_reg[i * 2]),
.meigwctrl_type(gw_config_reg[(i * 2) + 1]),
.meigwclr(gw_clear_reg_we[i]),
.extintsrc_req_config(extintsrc_req_gw[i])
);
end
else begin : INT_ZERO
assign intpriority_reg_we[i] = 1'b0;
assign intpriority_reg_re[i] = 1'b0;
assign intenable_reg_we[i] = 1'b0;
assign intenable_reg_re[i] = 1'b0;
assign gw_config_reg_we[i] = 1'b0;
assign gw_config_reg_re[i] = 1'b0;
assign gw_clear_reg_we[i] = 1'b0;
assign gw_config_reg[i * 2+:2] = {2 {1'sb0}};
assign intpriority_reg[i * 4+:4] = {INTPRIORITY_BITS {1'b0}};
assign intenable_reg[i] = 1'b0;
assign extintsrc_req_gw[i] = 1'b0;
assign extintsrc_req_sync[i] = 1'b0;
assign intenable_clk_enable[i] = 1'b0;
end
assign intpriority_reg_inv[i * 4+:4] = (intpriord ? ~intpriority_reg[i * 4+:4] : intpriority_reg[i * 4+:4]);
assign intpend_w_prior_en[i * 4+:4] = {INTPRIORITY_BITS {extintsrc_req_gw[i] & intenable_reg[i]}} & intpriority_reg_inv[i * 4+:4];
assign intpend_id[i * 8+:8] = i;
end
endgenerate
assign pl_in[3:0] = selected_int_priority[3:0];
genvar l;
genvar m;
genvar j;
genvar k;
generate
if (pt[135-:5] == 1) begin : genblock
wire [(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))))) + 1) * 4) + ((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) * 4) - 1) : (((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1)))) + 1) * 4) + ((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) * 4) - 1)):(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) * 4 : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) * 4)] level_intpend_w_prior_en;
wire [(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))))) + 1) * 8) + ((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) * 8) - 1) : (((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1)))) + 1) * 8) + ((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) * 8) - 1)):(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) * 8 : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) * 8)] level_intpend_id;
wire [((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))))) + 1) * 4) + (((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) * 4) - 1) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)))) + 1) * 4) + (((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) * 4) - 1)):((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) * 4 : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) * 4)] levelx_intpend_w_prior_en;
wire [((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))))) + 1) * 8) + (((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) * 8) - 1) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)))) + 1) * 8) + (((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) * 8) - 1)):((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) * 8 : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) * 8)] levelx_intpend_id;
assign level_intpend_w_prior_en[4 * (((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) - (((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2)) - 1) : ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - ((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) - (((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2)) - 1) : ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1)))))+:4 * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))] = {12'b000000000000, intpend_w_prior_en[4 * ((pt[44-:13] - 1) - (pt[44-:13] - 1))+:4 * pt[44-:13]]};
assign level_intpend_id[8 * (((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) - (((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2)) - 1) : ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - ((((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) - (((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2)) - 1) : ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) : (((((NUM_LEVELS / 2) >= 0 ? 0 : NUM_LEVELS / 2) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1) : (pt[44-:13] + 2) - ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 2 : ((pt[44-:13] + 2) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1))) + ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) - 1)) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1)))))+:8 * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))] = {24'b000000000000000000000000, intpend_id[8 * ((pt[44-:13] - 1) - (pt[44-:13] - 1))+:8 * pt[44-:13]]};
wire [((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) * 4) - 1 : ((1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2)))) * 4) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) * 4) - 1)):((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? 0 : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) * 4)] l2_intpend_w_prior_en_ff;
wire [((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) * 8) - 1 : ((1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2)))) * 8) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) * 8) - 1)):((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? 0 : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) * 8)] l2_intpend_id_ff;
assign levelx_intpend_w_prior_en[4 * ((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) - ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)) - 1) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - (((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) - ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)) - 1) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)))))+:4 * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))] = {{4 {1'b0}}, l2_intpend_w_prior_en_ff[4 * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2)))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1)) : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2)))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1)))+:4 * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))]};
assign levelx_intpend_id[8 * ((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) - ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)) - 1) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - (((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) - ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)) - 1) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) : ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - ((NUM_LEVELS / 2) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) - 1)) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)))))+:8 * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))] = {{8 {1'b1}}, l2_intpend_id_ff[8 * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2)))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1)) : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1) - (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2)))) - 1) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? pt[44-:13] / (2 ** (NUM_LEVELS / 2)) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))) - 1)))+:8 * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1 : 1 - (pt[44-:13] / (2 ** (NUM_LEVELS / 2))))]};
for (l = 0; l < (NUM_LEVELS / 2); l = l + 1) begin : TOP_LEVEL
for (m = 0; m <= (pt[44-:13] / (2 ** (l + 1))); m = m + 1) begin : COMPARE
if (m == (pt[44-:13] / (2 ** (l + 1)))) begin
assign level_intpend_w_prior_en[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m + 1 : (pt[44-:13] + 2) - (m + 1)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m + 1 : (pt[44-:13] + 2) - (m + 1))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 4+:4] = {4 {1'sb0}};
assign level_intpend_id[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m + 1 : (pt[44-:13] + 2) - (m + 1)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m + 1 : (pt[44-:13] + 2) - (m + 1))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 8+:8] = {8 {1'sb0}};
end
eb1_cmp_and_mux #(
.ID_BITS(ID_BITS),
.INTPRIORITY_BITS(INTPRIORITY_BITS)
) cmp_l1(
.a_id(level_intpend_id[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? 2 * m : (pt[44-:13] + 2) - (2 * m)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? 2 * m : (pt[44-:13] + 2) - (2 * m))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 8+:8]),
.a_priority(level_intpend_w_prior_en[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? 2 * m : (pt[44-:13] + 2) - (2 * m)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? 2 * m : (pt[44-:13] + 2) - (2 * m))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 4+:4]),
.b_id(level_intpend_id[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? (2 * m) + 1 : (pt[44-:13] + 2) - ((2 * m) + 1)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? (2 * m) + 1 : (pt[44-:13] + 2) - ((2 * m) + 1))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 8+:8]),
.b_priority(level_intpend_w_prior_en[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? (2 * m) + 1 : (pt[44-:13] + 2) - ((2 * m) + 1)) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l : (NUM_LEVELS / 2) - l) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? (2 * m) + 1 : (pt[44-:13] + 2) - ((2 * m) + 1))) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 4+:4]),
.out_id(level_intpend_id[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m : (pt[44-:13] + 2) - m) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m : (pt[44-:13] + 2) - m)) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 8+:8]),
.out_priority(level_intpend_w_prior_en[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m : (pt[44-:13] + 2) - m) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? l + 1 : (NUM_LEVELS / 2) - (l + 1)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? m : (pt[44-:13] + 2) - m)) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 4+:4])
);
end
end
for (i = 0; i <= (pt[44-:13] / (2 ** (NUM_LEVELS / 2))); i = i + 1) begin : MIDDLE_FLOPS
rvdff #(.WIDTH(INTPRIORITY_BITS)) leveb1_intpend_prior_reg(
.rst_l(rst_l),
.din(level_intpend_w_prior_en[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - (NUM_LEVELS / 2)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? i : (pt[44-:13] + 2) - i) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - (NUM_LEVELS / 2)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? i : (pt[44-:13] + 2) - i)) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 4+:4]),
.dout(l2_intpend_w_prior_en_ff[((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? i : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) - i) * 4+:4]),
.clk(free_clk)
);
rvdff #(.WIDTH(ID_BITS)) leveb1_intpend_id_reg(
.rst_l(rst_l),
.din(level_intpend_id[(((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))) >= ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) ? (((NUM_LEVELS / 2) >= 0 ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - (NUM_LEVELS / 2)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? i : (pt[44-:13] + 2) - i) : ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? 0 : pt[44-:13] + 2) : ((pt[44-:13] + 2) >= 0 ? (NUM_LEVELS / 2) * (pt[44-:13] + 3) : (pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2))))) - (((((NUM_LEVELS / 2) >= 0 ? NUM_LEVELS / 2 : (NUM_LEVELS / 2) - (NUM_LEVELS / 2)) * ((pt[44-:13] + 2) >= 0 ? pt[44-:13] + 3 : 1 - (pt[44-:13] + 2))) + ((pt[44-:13] + 2) >= 0 ? i : (pt[44-:13] + 2) - i)) - ((NUM_LEVELS / 2) >= 0 ? ((pt[44-:13] + 2) >= 0 ? (((NUM_LEVELS / 2) + 1) * (pt[44-:13] + 3)) - 1 : (((NUM_LEVELS / 2) + 1) * (1 - (pt[44-:13] + 2))) + (pt[44-:13] + 1)) : ((pt[44-:13] + 2) >= 0 ? ((1 - (NUM_LEVELS / 2)) * (pt[44-:13] + 3)) + (((NUM_LEVELS / 2) * (pt[44-:13] + 3)) - 1) : ((1 - (NUM_LEVELS / 2)) * (1 - (pt[44-:13] + 2))) + (((pt[44-:13] + 2) + ((NUM_LEVELS / 2) * (1 - (pt[44-:13] + 2)))) - 1))))) * 8+:8]),
.dout(l2_intpend_id_ff[((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) >= 0 ? i : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) - i) * 8+:8]),
.clk(free_clk)
);
end
for (j = NUM_LEVELS / 2; j < NUM_LEVELS; j = j + 1) begin : BOT_LEVELS
for (k = 0; k <= (pt[44-:13] / (2 ** (j + 1))); k = k + 1) begin : COMPARE
if (k == (pt[44-:13] / (2 ** (j + 1)))) begin
assign levelx_intpend_w_prior_en[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (k + 1)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (k + 1))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 4+:4] = {4 {1'sb0}};
assign levelx_intpend_id[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (k + 1)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (k + 1))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 8+:8] = {8 {1'sb0}};
end
eb1_cmp_and_mux #(
.ID_BITS(ID_BITS),
.INTPRIORITY_BITS(INTPRIORITY_BITS)
) cmp_l1(
.a_id(levelx_intpend_id[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 2 * k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (2 * k)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 2 * k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (2 * k))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 8+:8]),
.a_priority(levelx_intpend_w_prior_en[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 2 * k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (2 * k)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 2 * k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - (2 * k))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 4+:4]),
.b_id(levelx_intpend_id[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (2 * k) + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - ((2 * k) + 1)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (2 * k) + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - ((2 * k) + 1))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 8+:8]),
.b_priority(levelx_intpend_w_prior_en[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (2 * k) + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - ((2 * k) + 1)) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j : (NUM_LEVELS / 2) - (j - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (2 * k) + 1 : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - ((2 * k) + 1))) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 4+:4]),
.out_id(levelx_intpend_id[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - k) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - k)) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 8+:8]),
.out_priority(levelx_intpend_w_prior_en[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - k) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? j + 1 : (NUM_LEVELS / 2) - ((j + 1) - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? k : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) - k)) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 4+:4])
);
end
end
assign claimid_in[7:0] = levelx_intpend_id[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS : (NUM_LEVELS / 2) - (NUM_LEVELS - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 0 : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS : (NUM_LEVELS / 2) - (NUM_LEVELS - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 0 : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 8+:8];
assign selected_int_priority[3:0] = levelx_intpend_w_prior_en[((NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))) >= (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) ? ((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS : (NUM_LEVELS / 2) - (NUM_LEVELS - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 0 : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) : (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2) : ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))))) - ((((NUM_LEVELS >= (NUM_LEVELS / 2) ? NUM_LEVELS : (NUM_LEVELS / 2) - (NUM_LEVELS - NUM_LEVELS)) * (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2 : 1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? 0 : (pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)) - (NUM_LEVELS >= (NUM_LEVELS / 2) ? (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + (((NUM_LEVELS / 2) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : (((NUM_LEVELS - (NUM_LEVELS / 2)) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + ((NUM_LEVELS / 2) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1)) : (((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) >= 0 ? ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) + ((NUM_LEVELS * ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 2)) - 1) : ((((NUM_LEVELS / 2) - NUM_LEVELS) + 1) * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1))) + ((((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1) + (NUM_LEVELS * (1 - ((pt[44-:13] / (2 ** (NUM_LEVELS / 2))) + 1)))) - 1))))) * 4+:4];
end
else begin : genblock
wire [((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) - (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))))) + 1) * 4) + (((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) * 4) - 1) : ((((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) - (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1)))) + 1) * 4) + (((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) * 4) - 1)):((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) * 4 : (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) * 4)] level_intpend_w_prior_en;
wire [((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) - (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))))) + 1) * 8) + (((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) * 8) - 1) : ((((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) - (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1)))) + 1) * 8) + (((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) * 8) - 1)):((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) * 8 : (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) * 8)] level_intpend_id;
assign level_intpend_w_prior_en[4 * ((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) - (((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1)) - 1) : ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) - (((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) - (((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1)) - 1) : ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) - (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1)))))+:4 * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))] = {{8 {1'b0}}, intpend_w_prior_en[4 * ((pt[44-:13] - 1) - (pt[44-:13] - 1))+:4 * pt[44-:13]]};
assign level_intpend_id[8 * ((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) - (((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1)) - 1) : ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) - (((NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1))) >= (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? 0 : pt[44-:13] + 1) : ((pt[44-:13] + 1) >= 0 ? NUM_LEVELS * (pt[44-:13] + 2) : (pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1))))) ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) - (((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1)) - 1) : ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) : ((((NUM_LEVELS >= 0 ? 0 : NUM_LEVELS) * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) + ((pt[44-:13] + 1) >= 0 ? ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1) : (pt[44-:13] + 1) - ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 1 : ((pt[44-:13] + 1) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1))) + ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))) - 1)) - (NUM_LEVELS >= 0 ? ((pt[44-:13] + 1) >= 0 ? ((NUM_LEVELS + 1) * (pt[44-:13] + 2)) - 1 : ((NUM_LEVELS + 1) * (1 - (pt[44-:13] + 1))) + pt[44-:13]) : ((pt[44-:13] + 1) >= 0 ? ((1 - NUM_LEVELS) * (pt[44-:13] + 2)) + ((NUM_LEVELS * (pt[44-:13] + 2)) - 1) : ((1 - NUM_LEVELS) * (1 - (pt[44-:13] + 1))) + (((pt[44-:13] + 1) + (NUM_LEVELS * (1 - (pt[44-:13] + 1)))) - 1)))))+:8 * ((pt[44-:13] + 1) >= 0 ? pt[44-:13] + 2 : 1 - (pt[44-:13] + 1))] = {{16 {1'b1}}, intpend_id[8 * ((pt[44-:13] - 1) - (pt[44-:13] - 1))+:8 * pt[44-:13]]};
for (l = 0; l < NUM_LEVELS; l = l + 1) begin : LEVEL
for (m = 0; m <= (pt[44-:13] / (2 ** (l + 1))); m = m + 1) begin : COMPARE