library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_shifter is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    x_stall_i : in std_logic;
    d_valid_i : in std_logic;
    d_rs1_i : in std_logic_vector (31 downto 0);
    d_shamt_i : in std_logic_vector (4 downto 0);
    d_fun_i : in std_logic_vector (2 downto 0);
    d_shifter_sign_i : in std_logic;
    w_rd_o : out std_logic_vector (31 downto 0));
end entity urv_shifter;

architecture rtl of urv_shifter is
  signal extend_sign : std_logic;
  signal n2450_o : std_logic;
  signal n2451_o : std_logic;
  signal n2452_o : std_logic;
  signal n2454_o : std_logic;
  signal shift_pre : std_logic_vector (31 downto 0);
  signal shift_16 : std_logic_vector (31 downto 0);
  signal shift_8 : std_logic_vector (31 downto 0);
  signal s1_out : std_logic_vector (31 downto 0);
  signal s2_extend_sign : std_logic;
  signal s2_shift : std_logic_vector (4 downto 0);
  signal s2_func : std_logic_vector (2 downto 0);
  signal shift_4 : std_logic_vector (31 downto 0);
  signal shift_2 : std_logic_vector (31 downto 0);
  signal shift_1 : std_logic_vector (31 downto 0);
  signal shift_post : std_logic_vector (31 downto 0);
  signal n2456_o : std_logic;
  signal n2457_o : std_logic;
  signal n2458_o : std_logic;
  signal n2459_o : std_logic;
  signal n2460_o : std_logic;
  signal n2461_o : std_logic;
  signal n2462_o : std_logic;
  signal n2463_o : std_logic;
  signal n2464_o : std_logic;
  signal n2465_o : std_logic;
  signal n2466_o : std_logic;
  signal n2467_o : std_logic;
  signal n2468_o : std_logic;
  signal n2469_o : std_logic;
  signal n2470_o : std_logic;
  signal n2471_o : std_logic;
  signal n2472_o : std_logic;
  signal n2473_o : std_logic;
  signal n2474_o : std_logic;
  signal n2475_o : std_logic;
  signal n2476_o : std_logic;
  signal n2477_o : std_logic;
  signal n2478_o : std_logic;
  signal n2479_o : std_logic;
  signal n2480_o : std_logic;
  signal n2481_o : std_logic;
  signal n2482_o : std_logic;
  signal n2483_o : std_logic;
  signal n2484_o : std_logic;
  signal n2485_o : std_logic;
  signal n2486_o : std_logic;
  signal n2487_o : std_logic;
  signal n2488_o : std_logic;
  signal n2489_o : std_logic_vector (31 downto 0);
  signal n2490_o : std_logic_vector (31 downto 0);
  signal n2491_o : std_logic;
  signal n2492_o : std_logic_vector (15 downto 0);
  signal n2493_o : std_logic_vector (15 downto 0);
  signal n2494_o : std_logic_vector (31 downto 0);
  signal n2495_o : std_logic_vector (31 downto 0);
  signal n2496_o : std_logic;
  signal n2497_o : std_logic_vector (7 downto 0);
  signal n2498_o : std_logic_vector (23 downto 0);
  signal n2499_o : std_logic_vector (31 downto 0);
  signal n2500_o : std_logic_vector (31 downto 0);
  signal n2502_o : std_logic;
  signal n2511_o : std_logic_vector (31 downto 0);
  signal n2512_q : std_logic_vector (31 downto 0);
  signal n2513_o : std_logic;
  signal n2514_q : std_logic;
  signal n2515_o : std_logic_vector (4 downto 0);
  signal n2516_q : std_logic_vector (4 downto 0);
  signal n2517_o : std_logic_vector (2 downto 0);
  signal n2518_q : std_logic_vector (2 downto 0);
  signal n2519_o : std_logic;
  signal n2520_o : std_logic_vector (3 downto 0);
  signal n2521_o : std_logic_vector (27 downto 0);
  signal n2522_o : std_logic_vector (31 downto 0);
  signal n2523_o : std_logic_vector (31 downto 0);
  signal n2524_o : std_logic;
  signal n2525_o : std_logic_vector (1 downto 0);
  signal n2526_o : std_logic_vector (29 downto 0);
  signal n2527_o : std_logic_vector (31 downto 0);
  signal n2528_o : std_logic_vector (31 downto 0);
  signal n2529_o : std_logic;
  signal n2530_o : std_logic_vector (30 downto 0);
  signal n2531_o : std_logic_vector (31 downto 0);
  signal n2532_o : std_logic_vector (31 downto 0);
  signal n2534_o : std_logic;
  signal n2535_o : std_logic;
  signal n2536_o : std_logic;
  signal n2537_o : std_logic;
  signal n2538_o : std_logic;
  signal n2539_o : std_logic;
  signal n2540_o : std_logic;
  signal n2541_o : std_logic;
  signal n2542_o : std_logic;
  signal n2543_o : std_logic;
  signal n2544_o : std_logic;
  signal n2545_o : std_logic;
  signal n2546_o : std_logic;
  signal n2547_o : std_logic;
  signal n2548_o : std_logic;
  signal n2549_o : std_logic;
  signal n2550_o : std_logic;
  signal n2551_o : std_logic;
  signal n2552_o : std_logic;
  signal n2553_o : std_logic;
  signal n2554_o : std_logic;
  signal n2555_o : std_logic;
  signal n2556_o : std_logic;
  signal n2557_o : std_logic;
  signal n2558_o : std_logic;
  signal n2559_o : std_logic;
  signal n2560_o : std_logic;
  signal n2561_o : std_logic;
  signal n2562_o : std_logic;
  signal n2563_o : std_logic;
  signal n2564_o : std_logic;
  signal n2565_o : std_logic;
  signal n2566_o : std_logic;
  signal n2567_o : std_logic_vector (31 downto 0);
  signal n2568_o : std_logic_vector (31 downto 0);
begin
  w_rd_o <= shift_post;
  -- urv_shifter.v:53:18
  extend_sign <= n2454_o; -- (signal)
  -- urv_shifter.v:53:42
  n2450_o <= '1' when d_fun_i = "101" else '0';
  -- urv_shifter.v:53:55
  n2451_o <= n2450_o and d_shifter_sign_i;
  -- urv_exceptions.v:57:18
  n2452_o <= d_rs1_i (31);
  -- urv_shifter.v:53:76
  n2454_o <= '0' when n2451_o = '0' else n2452_o;
  -- urv_shifter.v:55:15
  shift_pre <= n2490_o; -- (signal)
  -- urv_shifter.v:55:26
  shift_16 <= n2495_o; -- (signal)
  -- urv_shifter.v:55:36
  shift_8 <= n2500_o; -- (signal)
  -- urv_shifter.v:55:45
  s1_out <= n2512_q; -- (signal)
  -- urv_shifter.v:65:8
  s2_extend_sign <= n2514_q; -- (signal)
  -- urv_shifter.v:66:14
  s2_shift <= n2516_q; -- (signal)
  -- urv_shifter.v:67:14
  s2_func <= n2518_q; -- (signal)
  -- urv_shifter.v:81:15
  shift_4 <= n2523_o; -- (signal)
  -- urv_shifter.v:81:24
  shift_2 <= n2528_o; -- (signal)
  -- urv_shifter.v:81:33
  shift_1 <= n2532_o; -- (signal)
  -- urv_shifter.v:81:42
  shift_post <= n2568_o; -- (signal)
  -- urv_shifter.v:60:31
  n2456_o <= '1' when d_fun_i = "001" else '0';
  n2457_o <= d_rs1_i (0);
  n2458_o <= d_rs1_i (1);
  n2459_o <= d_rs1_i (2);
  n2460_o <= d_rs1_i (3);
  n2461_o <= d_rs1_i (4);
  n2462_o <= d_rs1_i (5);
  n2463_o <= d_rs1_i (6);
  n2464_o <= d_rs1_i (7);
  n2465_o <= d_rs1_i (8);
  n2466_o <= d_rs1_i (9);
  n2467_o <= d_rs1_i (10);
  n2468_o <= d_rs1_i (11);
  n2469_o <= d_rs1_i (12);
  n2470_o <= d_rs1_i (13);
  n2471_o <= d_rs1_i (14);
  n2472_o <= d_rs1_i (15);
  n2473_o <= d_rs1_i (16);
  n2474_o <= d_rs1_i (17);
  n2475_o <= d_rs1_i (18);
  n2476_o <= d_rs1_i (19);
  n2477_o <= d_rs1_i (20);
  n2478_o <= d_rs1_i (21);
  n2479_o <= d_rs1_i (22);
  n2480_o <= d_rs1_i (23);
  n2481_o <= d_rs1_i (24);
  n2482_o <= d_rs1_i (25);
  n2483_o <= d_rs1_i (26);
  n2484_o <= d_rs1_i (27);
  n2485_o <= d_rs1_i (28);
  n2486_o <= d_rs1_i (29);
  n2487_o <= d_rs1_i (30);
  n2488_o <= d_rs1_i (31);
  n2489_o <= n2457_o & n2458_o & n2459_o & n2460_o & n2461_o & n2462_o & n2463_o & n2464_o & n2465_o & n2466_o & n2467_o & n2468_o & n2469_o & n2470_o & n2471_o & n2472_o & n2473_o & n2474_o & n2475_o & n2476_o & n2477_o & n2478_o & n2479_o & n2480_o & n2481_o & n2482_o & n2483_o & n2484_o & n2485_o & n2486_o & n2487_o & n2488_o;
  -- urv_shifter.v:60:44
  n2490_o <= d_rs1_i when n2456_o = '0' else n2489_o;
  n2491_o <= d_shamt_i (4);
  n2492_o <= extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign;
  n2493_o <= shift_pre (31 downto 16);
  n2494_o <= n2492_o & n2493_o;
  -- urv_shifter.v:61:34
  n2495_o <= shift_pre when n2491_o = '0' else n2494_o;
  n2496_o <= d_shamt_i (3);
  n2497_o <= extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign & extend_sign;
  n2498_o <= shift_16 (31 downto 8);
  n2499_o <= n2497_o & n2498_o;
  -- urv_shifter.v:62:33
  n2500_o <= shift_16 when n2496_o = '0' else n2499_o;
  -- urv_shifter.v:73:10
  n2502_o <= not x_stall_i;
  -- urv_shifter.v:72:4
  n2511_o <= s1_out when n2502_o = '0' else shift_8;
  -- urv_shifter.v:72:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2512_q <= n2511_o;
    end if;
  end process;
  -- urv_shifter.v:72:4
  n2513_o <= s2_extend_sign when n2502_o = '0' else extend_sign;
  -- urv_shifter.v:72:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2514_q <= n2513_o;
    end if;
  end process;
  -- urv_shifter.v:72:4
  n2515_o <= s2_shift when n2502_o = '0' else d_shamt_i;
  -- urv_shifter.v:72:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2516_q <= n2515_o;
    end if;
  end process;
  -- urv_shifter.v:72:4
  n2517_o <= s2_func when n2502_o = '0' else d_fun_i;
  -- urv_shifter.v:72:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2518_q <= n2517_o;
    end if;
  end process;
  -- urv_shifter.v:72:4
  n2519_o <= s2_shift (2);
  n2520_o <= s2_extend_sign & s2_extend_sign & s2_extend_sign & s2_extend_sign;
  n2521_o <= s1_out (31 downto 4);
  n2522_o <= n2520_o & n2521_o;
  -- urv_shifter.v:86:32
  n2523_o <= s1_out when n2519_o = '0' else n2522_o;
  n2524_o <= s2_shift (1);
  n2525_o <= s2_extend_sign & s2_extend_sign;
  n2526_o <= shift_4 (31 downto 2);
  n2527_o <= n2525_o & n2526_o;
  -- urv_shifter.v:87:32
  n2528_o <= shift_4 when n2524_o = '0' else n2527_o;
  n2529_o <= s2_shift (0);
  n2530_o <= shift_2 (31 downto 1);
  n2531_o <= s2_extend_sign & n2530_o;
  -- urv_shifter.v:88:32
  n2532_o <= shift_2 when n2529_o = '0' else n2531_o;
  -- urv_shifter.v:89:32
  n2534_o <= '1' when s2_func = "001" else '0';
  n2535_o <= shift_1 (0);
  n2536_o <= shift_1 (1);
  n2537_o <= shift_1 (2);
  n2538_o <= shift_1 (3);
  n2539_o <= shift_1 (4);
  n2540_o <= shift_1 (5);
  n2541_o <= shift_1 (6);
  n2542_o <= shift_1 (7);
  n2543_o <= shift_1 (8);
  n2544_o <= shift_1 (9);
  n2545_o <= shift_1 (10);
  n2546_o <= shift_1 (11);
  n2547_o <= shift_1 (12);
  n2548_o <= shift_1 (13);
  n2549_o <= shift_1 (14);
  n2550_o <= shift_1 (15);
  n2551_o <= shift_1 (16);
  n2552_o <= shift_1 (17);
  n2553_o <= shift_1 (18);
  n2554_o <= shift_1 (19);
  n2555_o <= shift_1 (20);
  n2556_o <= shift_1 (21);
  n2557_o <= shift_1 (22);
  n2558_o <= shift_1 (23);
  n2559_o <= shift_1 (24);
  n2560_o <= shift_1 (25);
  n2561_o <= shift_1 (26);
  n2562_o <= shift_1 (27);
  n2563_o <= shift_1 (28);
  n2564_o <= shift_1 (29);
  n2565_o <= shift_1 (30);
  n2566_o <= shift_1 (31);
  n2567_o <= n2535_o & n2536_o & n2537_o & n2538_o & n2539_o & n2540_o & n2541_o & n2542_o & n2543_o & n2544_o & n2545_o & n2546_o & n2547_o & n2548_o & n2549_o & n2550_o & n2551_o & n2552_o & n2553_o & n2554_o & n2555_o & n2556_o & n2557_o & n2558_o & n2559_o & n2560_o & n2561_o & n2562_o & n2563_o & n2564_o & n2565_o & n2566_o;
  -- urv_shifter.v:89:45
  n2568_o <= shift_1 when n2534_o = '0' else n2567_o;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_exceptions is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    x_stall_i : in std_logic;
    x_kill_i : in std_logic;
    d_is_csr_i : in std_logic;
    d_is_mret_i : in std_logic;
    d_csr_imm_i : in std_logic_vector (4 downto 0);
    d_csr_sel_i : in std_logic_vector (11 downto 0);
    exp_irq_i : in std_logic;
    exp_tick_i : in std_logic;
    x_csr_write_value_i : in std_logic_vector (31 downto 0);
    x_exception_i : in std_logic;
    x_exception_cause_i : in std_logic_vector (3 downto 0);
    x_interrupt_i : in std_logic;
    x_exception_pc_i : in std_logic_vector (31 downto 0);
    exp_ei_pending_o : out std_logic;
    exp_ti_pending_o : out std_logic;
    x_exception_pc_o : out std_logic_vector (31 downto 0);
    csr_mstatus_o : out std_logic_vector (31 downto 0);
    csr_mip_o : out std_logic_vector (31 downto 0);
    csr_mie_o : out std_logic_vector (31 downto 0);
    csr_mepc_o : out std_logic_vector (31 downto 0);
    csr_mcause_o : out std_logic_vector (31 downto 0));
end entity urv_exceptions;

architecture rtl of urv_exceptions is
  signal csr_mepc : std_logic_vector (31 downto 0);
  signal csr_mie : std_logic_vector (31 downto 0);
  signal csr_status_mie : std_logic;
  signal csr_status_mpie : std_logic;
  signal csr_mcause_code : std_logic_vector (3 downto 0);
  signal csr_mcause_interrupt : std_logic;
  signal n2352_o : std_logic_vector (31 downto 0);
  constant n2356_o : std_logic_vector (31 downto 0) := "00000000000000000000000000000000";
  signal n2357_o : std_logic;
  signal n2358_o : std_logic;
  signal n2359_o : std_logic;
  signal n2360_o : std_logic;
  signal n2361_o : std_logic;
  signal n2362_o : std_logic;
  constant n2367_o : std_logic_vector (31 downto 0) := "00000000000000000000000000000000";
  signal n2371_o : std_logic_vector (31 downto 0);
  signal n2372_o : std_logic;
  signal n2373_o : std_logic;
  signal n2374_o : std_logic_vector (3 downto 0);
  signal n2375_o : std_logic;
  signal n2376_o : std_logic;
  signal n2377_o : std_logic;
  signal n2378_o : std_logic;
  signal n2379_o : std_logic;
  signal n2380_o : std_logic;
  signal n2381_o : std_logic;
  signal n2383_o : std_logic;
  signal n2384_o : std_logic;
  signal n2385_o : std_logic;
  signal n2386_o : std_logic;
  signal n2387_o : std_logic;
  signal n2389_o : std_logic;
  signal n2390_o : std_logic_vector (31 downto 0);
  signal n2391_o : std_logic;
  signal n2392_o : std_logic;
  signal n2393_o : std_logic;
  signal n2394_o : std_logic;
  signal n2396_o : std_logic;
  signal n2397_o : std_logic_vector (31 downto 0);
  signal n2398_o : std_logic;
  signal n2399_o : std_logic;
  signal n2400_o : std_logic;
  signal n2401_o : std_logic;
  signal n2402_o : std_logic;
  signal n2403_o : std_logic_vector (31 downto 0);
  signal n2404_o : std_logic;
  signal n2405_o : std_logic;
  signal n2406_o : std_logic;
  signal n2407_o : std_logic;
  signal n2408_o : std_logic;
  signal n2409_o : std_logic;
  signal n2410_o : std_logic;
  signal n2412_o : std_logic;
  signal n2414_o : std_logic;
  signal n2415_o : std_logic;
  signal n2416_o : std_logic_vector (31 downto 0);
  signal n2417_o : std_logic_vector (6 downto 0);
  signal n2418_o : std_logic_vector (6 downto 0);
  signal n2419_o : std_logic_vector (6 downto 0);
  signal n2420_o : std_logic;
  signal n2421_o : std_logic;
  signal n2422_o : std_logic_vector (2 downto 0);
  signal n2423_o : std_logic_vector (2 downto 0);
  signal n2424_o : std_logic_vector (2 downto 0);
  signal n2425_o : std_logic;
  signal n2426_o : std_logic;
  signal n2427_o : std_logic_vector (19 downto 0);
  signal n2428_o : std_logic_vector (19 downto 0);
  signal n2429_o : std_logic_vector (19 downto 0);
  signal n2430_o : std_logic;
  signal n2431_o : std_logic;
  signal n2432_o : std_logic_vector (3 downto 0);
  signal n2433_o : std_logic;
  signal n2435_o : std_logic_vector (31 downto 0);
  signal n2441_q : std_logic_vector (31 downto 0);
  signal n2442_q : std_logic_vector (31 downto 0);
  signal n2443_q : std_logic;
  signal n2444_q : std_logic;
  signal n2445_q : std_logic_vector (3 downto 0);
  signal n2446_q : std_logic;
  signal n2447_o : std_logic_vector (31 downto 0);
begin
  exp_ei_pending_o <= n2359_o;
  exp_ti_pending_o <= n2362_o;
  x_exception_pc_o <= csr_mepc;
  csr_mstatus_o <= n2447_o;
  csr_mip_o <= n2356_o;
  csr_mie_o <= csr_mie;
  csr_mepc_o <= csr_mepc;
  csr_mcause_o <= n2352_o;
  -- urv_exceptions.v:66:18
  csr_mepc <= n2441_q; -- (signal)
  -- urv_exceptions.v:67:18
  csr_mie <= n2442_q; -- (signal)
  -- urv_exceptions.v:68:26
  csr_status_mie <= n2443_q; -- (signal)
  -- urv_exceptions.v:69:26
  csr_status_mpie <= n2444_q; -- (signal)
  -- urv_exceptions.v:70:18
  csr_mcause_code <= n2445_q; -- (signal)
  -- urv_exceptions.v:71:18
  csr_mcause_interrupt <= n2446_q; -- (signal)
  n2352_o <= csr_mcause_interrupt & "000000000000000000000000000" & csr_mcause_code;
  n2357_o <= csr_mie (11);
  -- urv_exceptions.v:85:40
  n2358_o <= exp_irq_i and n2357_o;
  -- urv_exceptions.v:85:63
  n2359_o <= n2358_o and csr_status_mie;
  n2360_o <= csr_mie (7);
  -- urv_exceptions.v:86:41
  n2361_o <= exp_tick_i and n2360_o;
  -- urv_exceptions.v:86:66
  n2362_o <= n2361_o and csr_status_mie;
  -- urv_exceptions.v:100:11
  n2371_o <= csr_mepc when x_exception_i = '0' else x_exception_pc_i;
  -- urv_exceptions.v:100:11
  n2372_o <= csr_status_mie when x_exception_i = '0' else '0';
  -- urv_exceptions.v:100:11
  n2373_o <= csr_status_mpie when x_exception_i = '0' else csr_status_mie;
  -- urv_exceptions.v:100:11
  n2374_o <= csr_mcause_code when x_exception_i = '0' else x_exception_cause_i;
  -- urv_exceptions.v:100:11
  n2375_o <= csr_mcause_interrupt when x_exception_i = '0' else x_interrupt_i;
  -- urv_exceptions.v:111:15
  n2376_o <= not x_stall_i;
  -- urv_exceptions.v:111:29
  n2377_o <= not x_kill_i;
  -- urv_exceptions.v:111:26
  n2378_o <= n2376_o and n2377_o;
  n2379_o <= x_csr_write_value_i (3);
  n2380_o <= x_csr_write_value_i (7);
  n2381_o <= x_csr_write_value_i (11);
  -- urv_defs.v:111:20
  n2383_o <= '1' when std_logic_vector'("001100000100") = d_csr_sel_i else '0';
  n2384_o <= csr_mie (7);
  -- urv_defs.v:111:20
  n2385_o <= n2384_o when n2383_o = '0' else n2380_o;
  n2386_o <= csr_mie (11);
  -- urv_defs.v:111:20
  n2387_o <= n2386_o when n2383_o = '0' else n2381_o;
  -- urv_defs.v:107:21
  n2389_o <= '1' when std_logic_vector'("001101000001") = d_csr_sel_i else '0';
  -- urv_defs.v:107:21
  n2390_o <= n2371_o when n2389_o = '0' else x_csr_write_value_i;
  n2391_o <= csr_mie (7);
  -- urv_defs.v:107:21
  n2392_o <= n2385_o when n2389_o = '0' else n2391_o;
  n2393_o <= csr_mie (11);
  -- urv_defs.v:107:21
  n2394_o <= n2387_o when n2389_o = '0' else n2393_o;
  -- urv_defs.v:108:24
  n2396_o <= '1' when std_logic_vector'("001100000000") = d_csr_sel_i else '0';
  -- urv_defs.v:108:24
  n2397_o <= n2390_o when n2396_o = '0' else n2371_o;
  n2398_o <= csr_mie (7);
  -- urv_defs.v:108:24
  n2399_o <= n2392_o when n2396_o = '0' else n2398_o;
  n2400_o <= csr_mie (11);
  -- urv_defs.v:108:24
  n2401_o <= n2394_o when n2396_o = '0' else n2400_o;
  -- urv_exceptions.v:113:16
  n2402_o <= n2372_o when n2408_o = '0' else n2379_o;
  -- urv_exceptions.v:111:11
  n2403_o <= n2371_o when n2410_o = '0' else n2397_o;
  n2404_o <= csr_mie (7);
  -- urv_exceptions.v:111:11
  n2405_o <= n2404_o when n2412_o = '0' else n2399_o;
  n2406_o <= csr_mie (11);
  -- urv_exceptions.v:111:11
  n2407_o <= n2406_o when n2414_o = '0' else n2401_o;
  -- urv_exceptions.v:113:16
  n2408_o <= d_is_csr_i and n2396_o;
  -- urv_exceptions.v:128:16
  n2409_o <= n2402_o when d_is_mret_i = '0' else csr_status_mpie;
  -- urv_exceptions.v:111:11
  n2410_o <= n2378_o and d_is_csr_i;
  -- urv_exceptions.v:111:11
  n2412_o <= n2378_o and d_is_csr_i;
  -- urv_exceptions.v:111:11
  n2414_o <= n2378_o and d_is_csr_i;
  -- urv_exceptions.v:111:11
  n2415_o <= n2372_o when n2378_o = '0' else n2409_o;
  -- urv_exceptions.v:89:6
  n2416_o <= n2403_o when rst_i = '0' else "00000000000000000000000000000000";
  n2417_o <= n2367_o (6 downto 0);
  n2418_o <= csr_mie (6 downto 0);
  -- urv_exceptions.v:89:6
  n2419_o <= n2418_o when rst_i = '0' else n2417_o;
  n2420_o <= n2367_o (7);
  -- urv_exceptions.v:89:6
  n2421_o <= n2405_o when rst_i = '0' else n2420_o;
  n2422_o <= n2367_o (10 downto 8);
  n2423_o <= csr_mie (10 downto 8);
  -- urv_exceptions.v:89:6
  n2424_o <= n2423_o when rst_i = '0' else n2422_o;
  n2425_o <= n2367_o (11);
  -- urv_exceptions.v:89:6
  n2426_o <= n2407_o when rst_i = '0' else n2425_o;
  n2427_o <= n2367_o (31 downto 12);
  n2428_o <= csr_mie (31 downto 12);
  -- urv_exceptions.v:89:6
  n2429_o <= n2428_o when rst_i = '0' else n2427_o;
  -- urv_exceptions.v:89:6
  n2430_o <= n2415_o when rst_i = '0' else '0';
  -- urv_exceptions.v:89:6
  n2431_o <= n2373_o when rst_i = '0' else '0';
  -- urv_exceptions.v:89:6
  n2432_o <= n2374_o when rst_i = '0' else "0000";
  -- urv_exceptions.v:89:6
  n2433_o <= n2375_o when rst_i = '0' else '0';
  n2435_o <= n2429_o & n2426_o & n2424_o & n2421_o & n2419_o;
  -- urv_exceptions.v:88:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2441_q <= n2416_o;
    end if;
  end process;
  -- urv_exceptions.v:88:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2442_q <= n2435_o;
    end if;
  end process;
  -- urv_exceptions.v:88:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2443_q <= n2430_o;
    end if;
  end process;
  -- urv_exceptions.v:88:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2444_q <= n2431_o;
    end if;
  end process;
  -- urv_exceptions.v:88:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2445_q <= n2432_o;
    end if;
  end process;
  -- urv_exceptions.v:88:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2446_q <= n2433_o;
    end if;
  end process;
  -- urv_exceptions.v:88:4
  n2447_o <= "000000000000000000000000" & csr_status_mpie & "000" & csr_status_mie & "000";
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_csr is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    x_stall_i : in std_logic;
    x_kill_i : in std_logic;
    d_is_csr_i : in std_logic;
    d_fun_i : in std_logic_vector (2 downto 0);
    d_csr_imm_i : in std_logic_vector (4 downto 0);
    d_csr_sel_i : in std_logic_vector (11 downto 0);
    d_rs1_i : in std_logic_vector (31 downto 0);
    csr_time_i : in std_logic_vector (39 downto 0);
    csr_cycles_i : in std_logic_vector (39 downto 0);
    csr_mstatus_i : in std_logic_vector (31 downto 0);
    csr_mip_i : in std_logic_vector (31 downto 0);
    csr_mie_i : in std_logic_vector (31 downto 0);
    csr_mepc_i : in std_logic_vector (31 downto 0);
    csr_mcause_i : in std_logic_vector (31 downto 0);
    dbg_mbx_data_i : in std_logic_vector (31 downto 0);
    dbg_mbx_write_i : in std_logic;
    x_rd_o : out std_logic_vector (31 downto 0);
    x_csr_write_value_o : out std_logic_vector (31 downto 0);
    dbg_mbx_data_o : out std_logic_vector (31 downto 0));
end entity urv_csr;

architecture rtl of urv_csr is
  signal csr_mscratch : std_logic_vector (31 downto 0);
  signal mbx_data : std_logic_vector (31 downto 0);
  signal csr_in1 : std_logic_vector (31 downto 0);
  signal csr_in2 : std_logic_vector (31 downto 0);
  signal csr_out : std_logic_vector (31 downto 0);
  signal n1367_o : std_logic_vector (31 downto 0);
  signal n1368_o : std_logic_vector (7 downto 0);
  signal n1370_o : std_logic_vector (31 downto 0);
  signal n1371_o : std_logic_vector (31 downto 0);
  signal n1372_o : std_logic_vector (7 downto 0);
  signal n1374_o : std_logic_vector (31 downto 0);
  signal n1378_o : std_logic;
  signal n1379_o : std_logic_vector (31 downto 0);
  signal n1381_o : std_logic;
  signal n1382_o : std_logic_vector (31 downto 0);
  signal n1384_o : std_logic;
  signal n1385_o : std_logic_vector (31 downto 0);
  signal n1387_o : std_logic;
  signal n1388_o : std_logic_vector (31 downto 0);
  signal n1390_o : std_logic;
  signal n1391_o : std_logic_vector (31 downto 0);
  signal n1393_o : std_logic;
  signal n1394_o : std_logic_vector (31 downto 0);
  signal n1396_o : std_logic;
  signal n1397_o : std_logic_vector (31 downto 0);
  signal n1399_o : std_logic;
  signal n1400_o : std_logic_vector (31 downto 0);
  signal n1402_o : std_logic;
  signal n1403_o : std_logic_vector (31 downto 0);
  signal n1405_o : std_logic;
  signal n1406_o : std_logic_vector (31 downto 0);
  signal n1408_o : std_logic;
  signal n1409_o : std_logic_vector (31 downto 0);
  signal n1411_o : std_logic;
  signal n1412_o : std_logic_vector (31 downto 0);
  signal n1414_o : std_logic_vector (31 downto 0);
  signal n1416_o : std_logic;
  signal n1418_o : std_logic;
  signal n1419_o : std_logic;
  signal n1421_o : std_logic;
  signal n1422_o : std_logic;
  signal n1423_o : std_logic_vector (31 downto 0);
  signal n1424_o : std_logic;
  signal n1425_o : std_logic;
  signal n1426_o : std_logic;
  signal n1428_o : std_logic;
  signal n1429_o : std_logic;
  signal n1430_o : std_logic;
  signal n1432_o : std_logic;
  signal n1435_o : std_logic;
  signal n1437_o : std_logic;
  signal n1438_o : std_logic;
  signal n1439_o : std_logic;
  signal n1441_o : std_logic;
  signal n1443_o : std_logic;
  signal n1444_o : std_logic;
  signal n1445_o : std_logic;
  signal n1447_o : std_logic;
  signal n1449_o : std_logic;
  signal n1450_o : std_logic;
  signal n1451_o : std_logic;
  signal n1452_o : std_logic;
  signal n1453_o : std_logic;
  signal n1454_o : std_logic;
  signal n1456_o : std_logic;
  signal n1457_o : std_logic;
  signal n1458_o : std_logic;
  signal n1460_o : std_logic;
  signal n1463_o : std_logic;
  signal n1465_o : std_logic;
  signal n1466_o : std_logic;
  signal n1467_o : std_logic;
  signal n1469_o : std_logic;
  signal n1471_o : std_logic;
  signal n1472_o : std_logic;
  signal n1473_o : std_logic;
  signal n1475_o : std_logic;
  signal n1477_o : std_logic;
  signal n1478_o : std_logic;
  signal n1479_o : std_logic;
  signal n1480_o : std_logic;
  signal n1481_o : std_logic;
  signal n1482_o : std_logic;
  signal n1484_o : std_logic;
  signal n1485_o : std_logic;
  signal n1486_o : std_logic;
  signal n1488_o : std_logic;
  signal n1491_o : std_logic;
  signal n1493_o : std_logic;
  signal n1494_o : std_logic;
  signal n1495_o : std_logic;
  signal n1497_o : std_logic;
  signal n1499_o : std_logic;
  signal n1500_o : std_logic;
  signal n1501_o : std_logic;
  signal n1503_o : std_logic;
  signal n1505_o : std_logic;
  signal n1506_o : std_logic;
  signal n1507_o : std_logic;
  signal n1508_o : std_logic;
  signal n1509_o : std_logic;
  signal n1510_o : std_logic;
  signal n1512_o : std_logic;
  signal n1513_o : std_logic;
  signal n1514_o : std_logic;
  signal n1516_o : std_logic;
  signal n1519_o : std_logic;
  signal n1521_o : std_logic;
  signal n1522_o : std_logic;
  signal n1523_o : std_logic;
  signal n1525_o : std_logic;
  signal n1527_o : std_logic;
  signal n1528_o : std_logic;
  signal n1529_o : std_logic;
  signal n1531_o : std_logic;
  signal n1533_o : std_logic;
  signal n1534_o : std_logic;
  signal n1535_o : std_logic;
  signal n1536_o : std_logic;
  signal n1537_o : std_logic;
  signal n1538_o : std_logic;
  signal n1540_o : std_logic;
  signal n1541_o : std_logic;
  signal n1542_o : std_logic;
  signal n1544_o : std_logic;
  signal n1547_o : std_logic;
  signal n1549_o : std_logic;
  signal n1550_o : std_logic;
  signal n1551_o : std_logic;
  signal n1553_o : std_logic;
  signal n1555_o : std_logic;
  signal n1556_o : std_logic;
  signal n1557_o : std_logic;
  signal n1559_o : std_logic;
  signal n1561_o : std_logic;
  signal n1562_o : std_logic;
  signal n1563_o : std_logic;
  signal n1564_o : std_logic;
  signal n1565_o : std_logic;
  signal n1566_o : std_logic;
  signal n1568_o : std_logic;
  signal n1569_o : std_logic;
  signal n1570_o : std_logic;
  signal n1572_o : std_logic;
  signal n1575_o : std_logic;
  signal n1577_o : std_logic;
  signal n1578_o : std_logic;
  signal n1579_o : std_logic;
  signal n1581_o : std_logic;
  signal n1583_o : std_logic;
  signal n1584_o : std_logic;
  signal n1585_o : std_logic;
  signal n1587_o : std_logic;
  signal n1589_o : std_logic;
  signal n1590_o : std_logic;
  signal n1591_o : std_logic;
  signal n1592_o : std_logic;
  signal n1593_o : std_logic;
  signal n1594_o : std_logic;
  signal n1596_o : std_logic;
  signal n1597_o : std_logic;
  signal n1598_o : std_logic;
  signal n1600_o : std_logic;
  signal n1603_o : std_logic;
  signal n1605_o : std_logic;
  signal n1606_o : std_logic;
  signal n1607_o : std_logic;
  signal n1609_o : std_logic;
  signal n1611_o : std_logic;
  signal n1612_o : std_logic;
  signal n1613_o : std_logic;
  signal n1615_o : std_logic;
  signal n1617_o : std_logic;
  signal n1618_o : std_logic;
  signal n1619_o : std_logic;
  signal n1620_o : std_logic;
  signal n1621_o : std_logic;
  signal n1622_o : std_logic;
  signal n1624_o : std_logic;
  signal n1625_o : std_logic;
  signal n1626_o : std_logic;
  signal n1628_o : std_logic;
  signal n1631_o : std_logic;
  signal n1633_o : std_logic;
  signal n1634_o : std_logic;
  signal n1635_o : std_logic;
  signal n1637_o : std_logic;
  signal n1639_o : std_logic;
  signal n1640_o : std_logic;
  signal n1641_o : std_logic;
  signal n1643_o : std_logic;
  signal n1645_o : std_logic;
  signal n1646_o : std_logic;
  signal n1647_o : std_logic;
  signal n1648_o : std_logic;
  signal n1649_o : std_logic;
  signal n1650_o : std_logic;
  signal n1652_o : std_logic;
  signal n1653_o : std_logic;
  signal n1654_o : std_logic;
  signal n1656_o : std_logic;
  signal n1659_o : std_logic;
  signal n1661_o : std_logic;
  signal n1662_o : std_logic;
  signal n1663_o : std_logic;
  signal n1665_o : std_logic;
  signal n1667_o : std_logic;
  signal n1668_o : std_logic;
  signal n1669_o : std_logic;
  signal n1671_o : std_logic;
  signal n1673_o : std_logic;
  signal n1674_o : std_logic;
  signal n1675_o : std_logic;
  signal n1676_o : std_logic;
  signal n1677_o : std_logic;
  signal n1678_o : std_logic;
  signal n1680_o : std_logic;
  signal n1681_o : std_logic;
  signal n1682_o : std_logic;
  signal n1684_o : std_logic;
  signal n1687_o : std_logic;
  signal n1689_o : std_logic;
  signal n1690_o : std_logic;
  signal n1691_o : std_logic;
  signal n1693_o : std_logic;
  signal n1695_o : std_logic;
  signal n1696_o : std_logic;
  signal n1697_o : std_logic;
  signal n1699_o : std_logic;
  signal n1701_o : std_logic;
  signal n1702_o : std_logic;
  signal n1703_o : std_logic;
  signal n1704_o : std_logic;
  signal n1705_o : std_logic;
  signal n1706_o : std_logic;
  signal n1708_o : std_logic;
  signal n1709_o : std_logic;
  signal n1710_o : std_logic;
  signal n1712_o : std_logic;
  signal n1715_o : std_logic;
  signal n1717_o : std_logic;
  signal n1718_o : std_logic;
  signal n1719_o : std_logic;
  signal n1721_o : std_logic;
  signal n1723_o : std_logic;
  signal n1724_o : std_logic;
  signal n1725_o : std_logic;
  signal n1727_o : std_logic;
  signal n1729_o : std_logic;
  signal n1730_o : std_logic;
  signal n1731_o : std_logic;
  signal n1732_o : std_logic;
  signal n1733_o : std_logic;
  signal n1734_o : std_logic;
  signal n1736_o : std_logic;
  signal n1737_o : std_logic;
  signal n1738_o : std_logic;
  signal n1740_o : std_logic;
  signal n1743_o : std_logic;
  signal n1745_o : std_logic;
  signal n1746_o : std_logic;
  signal n1747_o : std_logic;
  signal n1749_o : std_logic;
  signal n1751_o : std_logic;
  signal n1752_o : std_logic;
  signal n1753_o : std_logic;
  signal n1755_o : std_logic;
  signal n1757_o : std_logic;
  signal n1758_o : std_logic;
  signal n1759_o : std_logic;
  signal n1760_o : std_logic;
  signal n1761_o : std_logic;
  signal n1762_o : std_logic;
  signal n1764_o : std_logic;
  signal n1765_o : std_logic;
  signal n1766_o : std_logic;
  signal n1768_o : std_logic;
  signal n1771_o : std_logic;
  signal n1773_o : std_logic;
  signal n1774_o : std_logic;
  signal n1775_o : std_logic;
  signal n1777_o : std_logic;
  signal n1779_o : std_logic;
  signal n1780_o : std_logic;
  signal n1781_o : std_logic;
  signal n1783_o : std_logic;
  signal n1785_o : std_logic;
  signal n1786_o : std_logic;
  signal n1787_o : std_logic;
  signal n1788_o : std_logic;
  signal n1789_o : std_logic;
  signal n1790_o : std_logic;
  signal n1792_o : std_logic;
  signal n1793_o : std_logic;
  signal n1794_o : std_logic;
  signal n1796_o : std_logic;
  signal n1799_o : std_logic;
  signal n1801_o : std_logic;
  signal n1802_o : std_logic;
  signal n1803_o : std_logic;
  signal n1805_o : std_logic;
  signal n1807_o : std_logic;
  signal n1808_o : std_logic;
  signal n1809_o : std_logic;
  signal n1811_o : std_logic;
  signal n1813_o : std_logic;
  signal n1814_o : std_logic;
  signal n1815_o : std_logic;
  signal n1816_o : std_logic;
  signal n1817_o : std_logic;
  signal n1818_o : std_logic;
  signal n1820_o : std_logic;
  signal n1821_o : std_logic;
  signal n1822_o : std_logic;
  signal n1824_o : std_logic;
  signal n1827_o : std_logic;
  signal n1829_o : std_logic;
  signal n1830_o : std_logic;
  signal n1831_o : std_logic;
  signal n1833_o : std_logic;
  signal n1835_o : std_logic;
  signal n1836_o : std_logic;
  signal n1837_o : std_logic;
  signal n1839_o : std_logic;
  signal n1841_o : std_logic;
  signal n1842_o : std_logic;
  signal n1843_o : std_logic;
  signal n1844_o : std_logic;
  signal n1845_o : std_logic;
  signal n1846_o : std_logic;
  signal n1848_o : std_logic;
  signal n1849_o : std_logic;
  signal n1850_o : std_logic;
  signal n1852_o : std_logic;
  signal n1855_o : std_logic;
  signal n1857_o : std_logic;
  signal n1858_o : std_logic;
  signal n1859_o : std_logic;
  signal n1861_o : std_logic;
  signal n1863_o : std_logic;
  signal n1864_o : std_logic;
  signal n1865_o : std_logic;
  signal n1867_o : std_logic;
  signal n1869_o : std_logic;
  signal n1870_o : std_logic;
  signal n1871_o : std_logic;
  signal n1872_o : std_logic;
  signal n1873_o : std_logic;
  signal n1874_o : std_logic;
  signal n1876_o : std_logic;
  signal n1877_o : std_logic;
  signal n1878_o : std_logic;
  signal n1880_o : std_logic;
  signal n1883_o : std_logic;
  signal n1885_o : std_logic;
  signal n1886_o : std_logic;
  signal n1887_o : std_logic;
  signal n1889_o : std_logic;
  signal n1891_o : std_logic;
  signal n1892_o : std_logic;
  signal n1893_o : std_logic;
  signal n1895_o : std_logic;
  signal n1897_o : std_logic;
  signal n1898_o : std_logic;
  signal n1899_o : std_logic;
  signal n1900_o : std_logic;
  signal n1901_o : std_logic;
  signal n1902_o : std_logic;
  signal n1904_o : std_logic;
  signal n1905_o : std_logic;
  signal n1906_o : std_logic;
  signal n1908_o : std_logic;
  signal n1911_o : std_logic;
  signal n1913_o : std_logic;
  signal n1914_o : std_logic;
  signal n1915_o : std_logic;
  signal n1917_o : std_logic;
  signal n1919_o : std_logic;
  signal n1920_o : std_logic;
  signal n1921_o : std_logic;
  signal n1923_o : std_logic;
  signal n1925_o : std_logic;
  signal n1926_o : std_logic;
  signal n1927_o : std_logic;
  signal n1928_o : std_logic;
  signal n1929_o : std_logic;
  signal n1930_o : std_logic;
  signal n1932_o : std_logic;
  signal n1933_o : std_logic;
  signal n1934_o : std_logic;
  signal n1936_o : std_logic;
  signal n1939_o : std_logic;
  signal n1941_o : std_logic;
  signal n1942_o : std_logic;
  signal n1943_o : std_logic;
  signal n1945_o : std_logic;
  signal n1947_o : std_logic;
  signal n1948_o : std_logic;
  signal n1949_o : std_logic;
  signal n1951_o : std_logic;
  signal n1953_o : std_logic;
  signal n1954_o : std_logic;
  signal n1955_o : std_logic;
  signal n1956_o : std_logic;
  signal n1957_o : std_logic;
  signal n1958_o : std_logic;
  signal n1960_o : std_logic;
  signal n1961_o : std_logic;
  signal n1962_o : std_logic;
  signal n1964_o : std_logic;
  signal n1967_o : std_logic;
  signal n1969_o : std_logic;
  signal n1970_o : std_logic;
  signal n1971_o : std_logic;
  signal n1973_o : std_logic;
  signal n1975_o : std_logic;
  signal n1976_o : std_logic;
  signal n1977_o : std_logic;
  signal n1979_o : std_logic;
  signal n1981_o : std_logic;
  signal n1982_o : std_logic;
  signal n1983_o : std_logic;
  signal n1984_o : std_logic;
  signal n1985_o : std_logic;
  signal n1986_o : std_logic;
  signal n1988_o : std_logic;
  signal n1989_o : std_logic;
  signal n1990_o : std_logic;
  signal n1992_o : std_logic;
  signal n1995_o : std_logic;
  signal n1997_o : std_logic;
  signal n1998_o : std_logic;
  signal n1999_o : std_logic;
  signal n2001_o : std_logic;
  signal n2003_o : std_logic;
  signal n2004_o : std_logic;
  signal n2005_o : std_logic;
  signal n2007_o : std_logic;
  signal n2009_o : std_logic;
  signal n2010_o : std_logic;
  signal n2011_o : std_logic;
  signal n2012_o : std_logic;
  signal n2013_o : std_logic;
  signal n2014_o : std_logic;
  signal n2016_o : std_logic;
  signal n2017_o : std_logic;
  signal n2018_o : std_logic;
  signal n2020_o : std_logic;
  signal n2023_o : std_logic;
  signal n2025_o : std_logic;
  signal n2026_o : std_logic;
  signal n2027_o : std_logic;
  signal n2029_o : std_logic;
  signal n2031_o : std_logic;
  signal n2032_o : std_logic;
  signal n2033_o : std_logic;
  signal n2035_o : std_logic;
  signal n2037_o : std_logic;
  signal n2038_o : std_logic;
  signal n2039_o : std_logic;
  signal n2040_o : std_logic;
  signal n2041_o : std_logic;
  signal n2042_o : std_logic;
  signal n2044_o : std_logic;
  signal n2045_o : std_logic;
  signal n2046_o : std_logic;
  signal n2048_o : std_logic;
  signal n2051_o : std_logic;
  signal n2053_o : std_logic;
  signal n2054_o : std_logic;
  signal n2055_o : std_logic;
  signal n2057_o : std_logic;
  signal n2059_o : std_logic;
  signal n2060_o : std_logic;
  signal n2061_o : std_logic;
  signal n2063_o : std_logic;
  signal n2065_o : std_logic;
  signal n2066_o : std_logic;
  signal n2067_o : std_logic;
  signal n2068_o : std_logic;
  signal n2069_o : std_logic;
  signal n2070_o : std_logic;
  signal n2072_o : std_logic;
  signal n2073_o : std_logic;
  signal n2074_o : std_logic;
  signal n2076_o : std_logic;
  signal n2079_o : std_logic;
  signal n2081_o : std_logic;
  signal n2082_o : std_logic;
  signal n2083_o : std_logic;
  signal n2085_o : std_logic;
  signal n2087_o : std_logic;
  signal n2088_o : std_logic;
  signal n2089_o : std_logic;
  signal n2091_o : std_logic;
  signal n2093_o : std_logic;
  signal n2094_o : std_logic;
  signal n2095_o : std_logic;
  signal n2096_o : std_logic;
  signal n2097_o : std_logic;
  signal n2098_o : std_logic;
  signal n2100_o : std_logic;
  signal n2101_o : std_logic;
  signal n2102_o : std_logic;
  signal n2104_o : std_logic;
  signal n2107_o : std_logic;
  signal n2109_o : std_logic;
  signal n2110_o : std_logic;
  signal n2111_o : std_logic;
  signal n2113_o : std_logic;
  signal n2115_o : std_logic;
  signal n2116_o : std_logic;
  signal n2117_o : std_logic;
  signal n2119_o : std_logic;
  signal n2121_o : std_logic;
  signal n2122_o : std_logic;
  signal n2123_o : std_logic;
  signal n2124_o : std_logic;
  signal n2125_o : std_logic;
  signal n2126_o : std_logic;
  signal n2128_o : std_logic;
  signal n2129_o : std_logic;
  signal n2130_o : std_logic;
  signal n2132_o : std_logic;
  signal n2135_o : std_logic;
  signal n2137_o : std_logic;
  signal n2138_o : std_logic;
  signal n2139_o : std_logic;
  signal n2141_o : std_logic;
  signal n2143_o : std_logic;
  signal n2144_o : std_logic;
  signal n2145_o : std_logic;
  signal n2147_o : std_logic;
  signal n2149_o : std_logic;
  signal n2150_o : std_logic;
  signal n2151_o : std_logic;
  signal n2152_o : std_logic;
  signal n2153_o : std_logic;
  signal n2154_o : std_logic;
  signal n2156_o : std_logic;
  signal n2157_o : std_logic;
  signal n2158_o : std_logic;
  signal n2160_o : std_logic;
  signal n2163_o : std_logic;
  signal n2165_o : std_logic;
  signal n2166_o : std_logic;
  signal n2167_o : std_logic;
  signal n2169_o : std_logic;
  signal n2171_o : std_logic;
  signal n2172_o : std_logic;
  signal n2173_o : std_logic;
  signal n2175_o : std_logic;
  signal n2177_o : std_logic;
  signal n2178_o : std_logic;
  signal n2179_o : std_logic;
  signal n2180_o : std_logic;
  signal n2181_o : std_logic;
  signal n2182_o : std_logic;
  signal n2184_o : std_logic;
  signal n2185_o : std_logic;
  signal n2186_o : std_logic;
  signal n2188_o : std_logic;
  signal n2191_o : std_logic;
  signal n2193_o : std_logic;
  signal n2194_o : std_logic;
  signal n2195_o : std_logic;
  signal n2197_o : std_logic;
  signal n2199_o : std_logic;
  signal n2200_o : std_logic;
  signal n2201_o : std_logic;
  signal n2203_o : std_logic;
  signal n2205_o : std_logic;
  signal n2206_o : std_logic;
  signal n2207_o : std_logic;
  signal n2208_o : std_logic;
  signal n2209_o : std_logic;
  signal n2210_o : std_logic;
  signal n2212_o : std_logic;
  signal n2213_o : std_logic;
  signal n2214_o : std_logic;
  signal n2216_o : std_logic;
  signal n2219_o : std_logic;
  signal n2221_o : std_logic;
  signal n2222_o : std_logic;
  signal n2223_o : std_logic;
  signal n2225_o : std_logic;
  signal n2227_o : std_logic;
  signal n2228_o : std_logic;
  signal n2229_o : std_logic;
  signal n2231_o : std_logic;
  signal n2233_o : std_logic;
  signal n2234_o : std_logic;
  signal n2235_o : std_logic;
  signal n2236_o : std_logic;
  signal n2237_o : std_logic;
  signal n2238_o : std_logic;
  signal n2240_o : std_logic;
  signal n2241_o : std_logic;
  signal n2242_o : std_logic;
  signal n2244_o : std_logic;
  signal n2247_o : std_logic;
  signal n2249_o : std_logic;
  signal n2250_o : std_logic;
  signal n2251_o : std_logic;
  signal n2253_o : std_logic;
  signal n2255_o : std_logic;
  signal n2256_o : std_logic;
  signal n2257_o : std_logic;
  signal n2259_o : std_logic;
  signal n2261_o : std_logic;
  signal n2262_o : std_logic;
  signal n2263_o : std_logic;
  signal n2264_o : std_logic;
  signal n2265_o : std_logic;
  signal n2266_o : std_logic;
  signal n2268_o : std_logic;
  signal n2269_o : std_logic;
  signal n2270_o : std_logic;
  signal n2272_o : std_logic;
  signal n2275_o : std_logic;
  signal n2277_o : std_logic;
  signal n2278_o : std_logic;
  signal n2279_o : std_logic;
  signal n2281_o : std_logic;
  signal n2283_o : std_logic;
  signal n2284_o : std_logic;
  signal n2285_o : std_logic;
  signal n2287_o : std_logic;
  signal n2289_o : std_logic;
  signal n2290_o : std_logic;
  signal n2291_o : std_logic;
  signal n2292_o : std_logic;
  signal n2293_o : std_logic;
  signal n2294_o : std_logic;
  signal n2296_o : std_logic;
  signal n2297_o : std_logic;
  signal n2298_o : std_logic;
  signal n2300_o : std_logic;
  signal n2303_o : std_logic;
  signal n2305_o : std_logic;
  signal n2306_o : std_logic;
  signal n2307_o : std_logic;
  signal n2309_o : std_logic;
  signal n2311_o : std_logic;
  signal n2312_o : std_logic;
  signal n2313_o : std_logic;
  signal n2315_o : std_logic;
  signal n2317_o : std_logic;
  signal n2318_o : std_logic;
  signal n2319_o : std_logic;
  signal n2324_o : std_logic;
  signal n2325_o : std_logic_vector (31 downto 0);
  signal n2326_o : std_logic;
  signal n2327_o : std_logic;
  signal n2328_o : std_logic;
  signal n2329_o : std_logic;
  signal n2333_o : std_logic;
  signal n2334_o : std_logic_vector (31 downto 0);
  signal n2335_o : std_logic;
  signal n2336_o : std_logic_vector (31 downto 0);
  signal n2337_o : std_logic_vector (31 downto 0);
  signal n2340_q : std_logic_vector (31 downto 0);
  signal n2341_q : std_logic_vector (31 downto 0);
  signal n2342_o : std_logic_vector (31 downto 0);
begin
  x_rd_o <= csr_in1;
  x_csr_write_value_o <= csr_out;
  dbg_mbx_data_o <= mbx_data;
  -- urv_csr.v:70:17
  csr_mscratch <= n2340_q; -- (signal)
  -- urv_csr.v:71:17
  mbx_data <= n2341_q; -- (signal)
  -- urv_csr.v:73:17
  csr_in1 <= n1412_o; -- (signal)
  -- urv_csr.v:74:17
  csr_in2 <= n1423_o; -- (signal)
  -- urv_csr.v:75:17
  csr_out <= n2342_o; -- (signal)
  n1367_o <= csr_cycles_i (31 downto 0);
  -- urv_regfile.v:40:29
  n1368_o <= csr_cycles_i (39 downto 32);
  -- urv_regfile.v:53:4
  n1370_o <= "000000000000000000000000" & n1368_o;
  n1371_o <= csr_time_i (31 downto 0);
  n1372_o <= csr_time_i (39 downto 32);
  n1374_o <= "000000000000000000000000" & n1372_o;
  -- urv_defs.v:113:23
  n1378_o <= '1' when std_logic_vector'("111100010011") = d_csr_sel_i else '0';
  -- urv_defs.v:113:23
  n1379_o <= "00000000000000000000000000000000" when n1378_o = '0' else "00100000000110010000000100110001";
  -- urv_defs.v:112:23
  n1381_o <= '1' when std_logic_vector'("011111010000") = d_csr_sel_i else '0';
  -- urv_defs.v:112:23
  n1382_o <= n1379_o when n1381_o = '0' else mbx_data;
  -- urv_defs.v:111:20
  n1384_o <= '1' when std_logic_vector'("001100000100") = d_csr_sel_i else '0';
  -- urv_defs.v:111:20
  n1385_o <= n1382_o when n1384_o = '0' else csr_mie_i;
  -- urv_defs.v:110:20
  n1387_o <= '1' when std_logic_vector'("001101000100") = d_csr_sel_i else '0';
  -- urv_defs.v:110:20
  n1388_o <= n1385_o when n1387_o = '0' else csr_mip_i;
  -- urv_defs.v:109:23
  n1390_o <= '1' when std_logic_vector'("001101000010") = d_csr_sel_i else '0';
  -- urv_defs.v:109:23
  n1391_o <= n1388_o when n1390_o = '0' else csr_mcause_i;
  -- urv_defs.v:108:24
  n1393_o <= '1' when std_logic_vector'("001100000000") = d_csr_sel_i else '0';
  -- urv_defs.v:108:24
  n1394_o <= n1391_o when n1393_o = '0' else csr_mstatus_i;
  -- urv_defs.v:107:21
  n1396_o <= '1' when std_logic_vector'("001101000001") = d_csr_sel_i else '0';
  -- urv_defs.v:107:21
  n1397_o <= n1394_o when n1396_o = '0' else csr_mepc_i;
  -- urv_defs.v:106:25
  n1399_o <= '1' when std_logic_vector'("001101000000") = d_csr_sel_i else '0';
  -- urv_defs.v:106:25
  n1400_o <= n1397_o when n1399_o = '0' else csr_mscratch;
  -- urv_defs.v:104:22
  n1402_o <= '1' when std_logic_vector'("110010000001") = d_csr_sel_i else '0';
  -- urv_defs.v:104:22
  n1403_o <= n1400_o when n1402_o = '0' else n1374_o;
  -- urv_defs.v:105:22
  n1405_o <= '1' when std_logic_vector'("110000000001") = d_csr_sel_i else '0';
  -- urv_defs.v:105:22
  n1406_o <= n1403_o when n1405_o = '0' else n1371_o;
  -- urv_defs.v:102:24
  n1408_o <= '1' when std_logic_vector'("110010000000") = d_csr_sel_i else '0';
  -- urv_defs.v:102:24
  n1409_o <= n1406_o when n1408_o = '0' else n1370_o;
  -- urv_defs.v:103:24
  n1411_o <= '1' when std_logic_vector'("110000000000") = d_csr_sel_i else '0';
  -- urv_defs.v:103:24
  n1412_o <= n1409_o when n1411_o = '0' else n1367_o;
  n1414_o <= "000000000000000000000000000" & d_csr_imm_i;
  -- urv_defs.v:82:23
  n1416_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:83:23
  n1418_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:83:23
  n1419_o <= n1416_o or n1418_o;
  -- urv_defs.v:84:23
  n1421_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:84:23
  n1422_o <= n1419_o or n1421_o;
  -- urv_defs.v:82:23
  n1423_o <= d_rs1_i when n1422_o = '0' else n1414_o;
  n1424_o <= csr_in2 (0);
  n1425_o <= csr_in2 (0);
  n1426_o <= csr_in1 (0);
  -- urv_csr.v:119:43
  n1428_o <= n1426_o when n1425_o = '0' else '0';
  n1429_o <= csr_in2 (0);
  n1430_o <= csr_in1 (0);
  -- urv_csr.v:122:43
  n1432_o <= n1430_o when n1429_o = '0' else '1';
  -- urv_defs.v:83:23
  n1435_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1437_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1438_o <= n1435_o or n1437_o;
  -- urv_defs.v:83:23
  n1439_o <= 'X' when n1438_o = '0' else n1432_o;
  -- urv_defs.v:84:23
  n1441_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1443_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1444_o <= n1441_o or n1443_o;
  -- urv_defs.v:84:23
  n1445_o <= n1439_o when n1444_o = '0' else n1428_o;
  -- urv_defs.v:82:23
  n1447_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1449_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1450_o <= n1447_o or n1449_o;
  -- urv_defs.v:82:23
  n1451_o <= n1445_o when n1450_o = '0' else n1424_o;
  n1452_o <= csr_in2 (1);
  n1453_o <= csr_in2 (1);
  n1454_o <= csr_in1 (1);
  -- urv_csr.v:119:43
  n1456_o <= n1454_o when n1453_o = '0' else '0';
  n1457_o <= csr_in2 (1);
  n1458_o <= csr_in1 (1);
  -- urv_csr.v:122:43
  n1460_o <= n1458_o when n1457_o = '0' else '1';
  -- urv_defs.v:83:23
  n1463_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1465_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1466_o <= n1463_o or n1465_o;
  -- urv_defs.v:83:23
  n1467_o <= 'X' when n1466_o = '0' else n1460_o;
  -- urv_defs.v:84:23
  n1469_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1471_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1472_o <= n1469_o or n1471_o;
  -- urv_defs.v:84:23
  n1473_o <= n1467_o when n1472_o = '0' else n1456_o;
  -- urv_defs.v:82:23
  n1475_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1477_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1478_o <= n1475_o or n1477_o;
  -- urv_defs.v:82:23
  n1479_o <= n1473_o when n1478_o = '0' else n1452_o;
  n1480_o <= csr_in2 (2);
  n1481_o <= csr_in2 (2);
  n1482_o <= csr_in1 (2);
  -- urv_csr.v:119:43
  n1484_o <= n1482_o when n1481_o = '0' else '0';
  n1485_o <= csr_in2 (2);
  n1486_o <= csr_in1 (2);
  -- urv_csr.v:122:43
  n1488_o <= n1486_o when n1485_o = '0' else '1';
  -- urv_defs.v:83:23
  n1491_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1493_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1494_o <= n1491_o or n1493_o;
  -- urv_defs.v:83:23
  n1495_o <= 'X' when n1494_o = '0' else n1488_o;
  -- urv_defs.v:84:23
  n1497_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1499_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1500_o <= n1497_o or n1499_o;
  -- urv_defs.v:84:23
  n1501_o <= n1495_o when n1500_o = '0' else n1484_o;
  -- urv_defs.v:82:23
  n1503_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1505_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1506_o <= n1503_o or n1505_o;
  -- urv_defs.v:82:23
  n1507_o <= n1501_o when n1506_o = '0' else n1480_o;
  n1508_o <= csr_in2 (3);
  n1509_o <= csr_in2 (3);
  n1510_o <= csr_in1 (3);
  -- urv_csr.v:119:43
  n1512_o <= n1510_o when n1509_o = '0' else '0';
  n1513_o <= csr_in2 (3);
  n1514_o <= csr_in1 (3);
  -- urv_csr.v:122:43
  n1516_o <= n1514_o when n1513_o = '0' else '1';
  -- urv_defs.v:83:23
  n1519_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1521_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1522_o <= n1519_o or n1521_o;
  -- urv_defs.v:83:23
  n1523_o <= 'X' when n1522_o = '0' else n1516_o;
  -- urv_defs.v:84:23
  n1525_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1527_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1528_o <= n1525_o or n1527_o;
  -- urv_defs.v:84:23
  n1529_o <= n1523_o when n1528_o = '0' else n1512_o;
  -- urv_defs.v:82:23
  n1531_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1533_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1534_o <= n1531_o or n1533_o;
  -- urv_defs.v:82:23
  n1535_o <= n1529_o when n1534_o = '0' else n1508_o;
  n1536_o <= csr_in2 (4);
  n1537_o <= csr_in2 (4);
  n1538_o <= csr_in1 (4);
  -- urv_csr.v:119:43
  n1540_o <= n1538_o when n1537_o = '0' else '0';
  n1541_o <= csr_in2 (4);
  n1542_o <= csr_in1 (4);
  -- urv_csr.v:122:43
  n1544_o <= n1542_o when n1541_o = '0' else '1';
  -- urv_defs.v:83:23
  n1547_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1549_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1550_o <= n1547_o or n1549_o;
  -- urv_defs.v:83:23
  n1551_o <= 'X' when n1550_o = '0' else n1544_o;
  -- urv_defs.v:84:23
  n1553_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1555_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1556_o <= n1553_o or n1555_o;
  -- urv_defs.v:84:23
  n1557_o <= n1551_o when n1556_o = '0' else n1540_o;
  -- urv_defs.v:82:23
  n1559_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1561_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1562_o <= n1559_o or n1561_o;
  -- urv_defs.v:82:23
  n1563_o <= n1557_o when n1562_o = '0' else n1536_o;
  n1564_o <= csr_in2 (5);
  n1565_o <= csr_in2 (5);
  n1566_o <= csr_in1 (5);
  -- urv_csr.v:119:43
  n1568_o <= n1566_o when n1565_o = '0' else '0';
  n1569_o <= csr_in2 (5);
  n1570_o <= csr_in1 (5);
  -- urv_csr.v:122:43
  n1572_o <= n1570_o when n1569_o = '0' else '1';
  -- urv_defs.v:83:23
  n1575_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1577_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1578_o <= n1575_o or n1577_o;
  -- urv_defs.v:83:23
  n1579_o <= 'X' when n1578_o = '0' else n1572_o;
  -- urv_defs.v:84:23
  n1581_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1583_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1584_o <= n1581_o or n1583_o;
  -- urv_defs.v:84:23
  n1585_o <= n1579_o when n1584_o = '0' else n1568_o;
  -- urv_defs.v:82:23
  n1587_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1589_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1590_o <= n1587_o or n1589_o;
  -- urv_defs.v:82:23
  n1591_o <= n1585_o when n1590_o = '0' else n1564_o;
  n1592_o <= csr_in2 (6);
  n1593_o <= csr_in2 (6);
  n1594_o <= csr_in1 (6);
  -- urv_csr.v:119:43
  n1596_o <= n1594_o when n1593_o = '0' else '0';
  n1597_o <= csr_in2 (6);
  n1598_o <= csr_in1 (6);
  -- urv_csr.v:122:43
  n1600_o <= n1598_o when n1597_o = '0' else '1';
  -- urv_defs.v:83:23
  n1603_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1605_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1606_o <= n1603_o or n1605_o;
  -- urv_defs.v:83:23
  n1607_o <= 'X' when n1606_o = '0' else n1600_o;
  -- urv_defs.v:84:23
  n1609_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1611_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1612_o <= n1609_o or n1611_o;
  -- urv_defs.v:84:23
  n1613_o <= n1607_o when n1612_o = '0' else n1596_o;
  -- urv_defs.v:82:23
  n1615_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1617_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1618_o <= n1615_o or n1617_o;
  -- urv_defs.v:82:23
  n1619_o <= n1613_o when n1618_o = '0' else n1592_o;
  n1620_o <= csr_in2 (7);
  n1621_o <= csr_in2 (7);
  n1622_o <= csr_in1 (7);
  -- urv_csr.v:119:43
  n1624_o <= n1622_o when n1621_o = '0' else '0';
  n1625_o <= csr_in2 (7);
  n1626_o <= csr_in1 (7);
  -- urv_csr.v:122:43
  n1628_o <= n1626_o when n1625_o = '0' else '1';
  -- urv_defs.v:83:23
  n1631_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1633_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1634_o <= n1631_o or n1633_o;
  -- urv_defs.v:83:23
  n1635_o <= 'X' when n1634_o = '0' else n1628_o;
  -- urv_defs.v:84:23
  n1637_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1639_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1640_o <= n1637_o or n1639_o;
  -- urv_defs.v:84:23
  n1641_o <= n1635_o when n1640_o = '0' else n1624_o;
  -- urv_defs.v:82:23
  n1643_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1645_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1646_o <= n1643_o or n1645_o;
  -- urv_defs.v:82:23
  n1647_o <= n1641_o when n1646_o = '0' else n1620_o;
  n1648_o <= csr_in2 (8);
  n1649_o <= csr_in2 (8);
  n1650_o <= csr_in1 (8);
  -- urv_csr.v:119:43
  n1652_o <= n1650_o when n1649_o = '0' else '0';
  n1653_o <= csr_in2 (8);
  n1654_o <= csr_in1 (8);
  -- urv_csr.v:122:43
  n1656_o <= n1654_o when n1653_o = '0' else '1';
  -- urv_defs.v:83:23
  n1659_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1661_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1662_o <= n1659_o or n1661_o;
  -- urv_defs.v:83:23
  n1663_o <= 'X' when n1662_o = '0' else n1656_o;
  -- urv_defs.v:84:23
  n1665_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1667_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1668_o <= n1665_o or n1667_o;
  -- urv_defs.v:84:23
  n1669_o <= n1663_o when n1668_o = '0' else n1652_o;
  -- urv_defs.v:82:23
  n1671_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1673_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1674_o <= n1671_o or n1673_o;
  -- urv_defs.v:82:23
  n1675_o <= n1669_o when n1674_o = '0' else n1648_o;
  n1676_o <= csr_in2 (9);
  n1677_o <= csr_in2 (9);
  n1678_o <= csr_in1 (9);
  -- urv_csr.v:119:43
  n1680_o <= n1678_o when n1677_o = '0' else '0';
  n1681_o <= csr_in2 (9);
  n1682_o <= csr_in1 (9);
  -- urv_csr.v:122:43
  n1684_o <= n1682_o when n1681_o = '0' else '1';
  -- urv_defs.v:83:23
  n1687_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1689_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1690_o <= n1687_o or n1689_o;
  -- urv_defs.v:83:23
  n1691_o <= 'X' when n1690_o = '0' else n1684_o;
  -- urv_defs.v:84:23
  n1693_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1695_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1696_o <= n1693_o or n1695_o;
  -- urv_defs.v:84:23
  n1697_o <= n1691_o when n1696_o = '0' else n1680_o;
  -- urv_defs.v:82:23
  n1699_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1701_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1702_o <= n1699_o or n1701_o;
  -- urv_defs.v:82:23
  n1703_o <= n1697_o when n1702_o = '0' else n1676_o;
  n1704_o <= csr_in2 (10);
  n1705_o <= csr_in2 (10);
  n1706_o <= csr_in1 (10);
  -- urv_csr.v:119:43
  n1708_o <= n1706_o when n1705_o = '0' else '0';
  n1709_o <= csr_in2 (10);
  n1710_o <= csr_in1 (10);
  -- urv_csr.v:122:43
  n1712_o <= n1710_o when n1709_o = '0' else '1';
  -- urv_defs.v:83:23
  n1715_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1717_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1718_o <= n1715_o or n1717_o;
  -- urv_defs.v:83:23
  n1719_o <= 'X' when n1718_o = '0' else n1712_o;
  -- urv_defs.v:84:23
  n1721_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1723_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1724_o <= n1721_o or n1723_o;
  -- urv_defs.v:84:23
  n1725_o <= n1719_o when n1724_o = '0' else n1708_o;
  -- urv_defs.v:82:23
  n1727_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1729_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1730_o <= n1727_o or n1729_o;
  -- urv_defs.v:82:23
  n1731_o <= n1725_o when n1730_o = '0' else n1704_o;
  n1732_o <= csr_in2 (11);
  n1733_o <= csr_in2 (11);
  n1734_o <= csr_in1 (11);
  -- urv_csr.v:119:43
  n1736_o <= n1734_o when n1733_o = '0' else '0';
  n1737_o <= csr_in2 (11);
  n1738_o <= csr_in1 (11);
  -- urv_csr.v:122:43
  n1740_o <= n1738_o when n1737_o = '0' else '1';
  -- urv_defs.v:83:23
  n1743_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1745_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1746_o <= n1743_o or n1745_o;
  -- urv_defs.v:83:23
  n1747_o <= 'X' when n1746_o = '0' else n1740_o;
  -- urv_defs.v:84:23
  n1749_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1751_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1752_o <= n1749_o or n1751_o;
  -- urv_defs.v:84:23
  n1753_o <= n1747_o when n1752_o = '0' else n1736_o;
  -- urv_defs.v:82:23
  n1755_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1757_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1758_o <= n1755_o or n1757_o;
  -- urv_defs.v:82:23
  n1759_o <= n1753_o when n1758_o = '0' else n1732_o;
  n1760_o <= csr_in2 (12);
  n1761_o <= csr_in2 (12);
  n1762_o <= csr_in1 (12);
  -- urv_csr.v:119:43
  n1764_o <= n1762_o when n1761_o = '0' else '0';
  n1765_o <= csr_in2 (12);
  n1766_o <= csr_in1 (12);
  -- urv_csr.v:122:43
  n1768_o <= n1766_o when n1765_o = '0' else '1';
  -- urv_defs.v:83:23
  n1771_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1773_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1774_o <= n1771_o or n1773_o;
  -- urv_defs.v:83:23
  n1775_o <= 'X' when n1774_o = '0' else n1768_o;
  -- urv_defs.v:84:23
  n1777_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1779_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1780_o <= n1777_o or n1779_o;
  -- urv_defs.v:84:23
  n1781_o <= n1775_o when n1780_o = '0' else n1764_o;
  -- urv_defs.v:82:23
  n1783_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1785_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1786_o <= n1783_o or n1785_o;
  -- urv_defs.v:82:23
  n1787_o <= n1781_o when n1786_o = '0' else n1760_o;
  n1788_o <= csr_in2 (13);
  n1789_o <= csr_in2 (13);
  n1790_o <= csr_in1 (13);
  -- urv_csr.v:119:43
  n1792_o <= n1790_o when n1789_o = '0' else '0';
  n1793_o <= csr_in2 (13);
  n1794_o <= csr_in1 (13);
  -- urv_csr.v:122:43
  n1796_o <= n1794_o when n1793_o = '0' else '1';
  -- urv_defs.v:83:23
  n1799_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1801_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1802_o <= n1799_o or n1801_o;
  -- urv_defs.v:83:23
  n1803_o <= 'X' when n1802_o = '0' else n1796_o;
  -- urv_defs.v:84:23
  n1805_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1807_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1808_o <= n1805_o or n1807_o;
  -- urv_defs.v:84:23
  n1809_o <= n1803_o when n1808_o = '0' else n1792_o;
  -- urv_defs.v:82:23
  n1811_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1813_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1814_o <= n1811_o or n1813_o;
  -- urv_defs.v:82:23
  n1815_o <= n1809_o when n1814_o = '0' else n1788_o;
  n1816_o <= csr_in2 (14);
  n1817_o <= csr_in2 (14);
  n1818_o <= csr_in1 (14);
  -- urv_csr.v:119:43
  n1820_o <= n1818_o when n1817_o = '0' else '0';
  n1821_o <= csr_in2 (14);
  n1822_o <= csr_in1 (14);
  -- urv_csr.v:122:43
  n1824_o <= n1822_o when n1821_o = '0' else '1';
  -- urv_defs.v:83:23
  n1827_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1829_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1830_o <= n1827_o or n1829_o;
  -- urv_defs.v:83:23
  n1831_o <= 'X' when n1830_o = '0' else n1824_o;
  -- urv_defs.v:84:23
  n1833_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1835_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1836_o <= n1833_o or n1835_o;
  -- urv_defs.v:84:23
  n1837_o <= n1831_o when n1836_o = '0' else n1820_o;
  -- urv_defs.v:82:23
  n1839_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1841_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1842_o <= n1839_o or n1841_o;
  -- urv_defs.v:82:23
  n1843_o <= n1837_o when n1842_o = '0' else n1816_o;
  n1844_o <= csr_in2 (15);
  n1845_o <= csr_in2 (15);
  n1846_o <= csr_in1 (15);
  -- urv_csr.v:119:43
  n1848_o <= n1846_o when n1845_o = '0' else '0';
  n1849_o <= csr_in2 (15);
  n1850_o <= csr_in1 (15);
  -- urv_csr.v:122:43
  n1852_o <= n1850_o when n1849_o = '0' else '1';
  -- urv_defs.v:83:23
  n1855_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1857_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1858_o <= n1855_o or n1857_o;
  -- urv_defs.v:83:23
  n1859_o <= 'X' when n1858_o = '0' else n1852_o;
  -- urv_defs.v:84:23
  n1861_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1863_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1864_o <= n1861_o or n1863_o;
  -- urv_defs.v:84:23
  n1865_o <= n1859_o when n1864_o = '0' else n1848_o;
  -- urv_defs.v:82:23
  n1867_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1869_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1870_o <= n1867_o or n1869_o;
  -- urv_defs.v:82:23
  n1871_o <= n1865_o when n1870_o = '0' else n1844_o;
  n1872_o <= csr_in2 (16);
  n1873_o <= csr_in2 (16);
  n1874_o <= csr_in1 (16);
  -- urv_csr.v:119:43
  n1876_o <= n1874_o when n1873_o = '0' else '0';
  n1877_o <= csr_in2 (16);
  n1878_o <= csr_in1 (16);
  -- urv_csr.v:122:43
  n1880_o <= n1878_o when n1877_o = '0' else '1';
  -- urv_defs.v:83:23
  n1883_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1885_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1886_o <= n1883_o or n1885_o;
  -- urv_defs.v:83:23
  n1887_o <= 'X' when n1886_o = '0' else n1880_o;
  -- urv_defs.v:84:23
  n1889_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1891_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1892_o <= n1889_o or n1891_o;
  -- urv_defs.v:84:23
  n1893_o <= n1887_o when n1892_o = '0' else n1876_o;
  -- urv_defs.v:82:23
  n1895_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1897_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1898_o <= n1895_o or n1897_o;
  -- urv_defs.v:82:23
  n1899_o <= n1893_o when n1898_o = '0' else n1872_o;
  n1900_o <= csr_in2 (17);
  n1901_o <= csr_in2 (17);
  n1902_o <= csr_in1 (17);
  -- urv_csr.v:119:43
  n1904_o <= n1902_o when n1901_o = '0' else '0';
  n1905_o <= csr_in2 (17);
  n1906_o <= csr_in1 (17);
  -- urv_csr.v:122:43
  n1908_o <= n1906_o when n1905_o = '0' else '1';
  -- urv_defs.v:83:23
  n1911_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1913_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1914_o <= n1911_o or n1913_o;
  -- urv_defs.v:83:23
  n1915_o <= 'X' when n1914_o = '0' else n1908_o;
  -- urv_defs.v:84:23
  n1917_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1919_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1920_o <= n1917_o or n1919_o;
  -- urv_defs.v:84:23
  n1921_o <= n1915_o when n1920_o = '0' else n1904_o;
  -- urv_defs.v:82:23
  n1923_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1925_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1926_o <= n1923_o or n1925_o;
  -- urv_defs.v:82:23
  n1927_o <= n1921_o when n1926_o = '0' else n1900_o;
  n1928_o <= csr_in2 (18);
  n1929_o <= csr_in2 (18);
  n1930_o <= csr_in1 (18);
  -- urv_csr.v:119:43
  n1932_o <= n1930_o when n1929_o = '0' else '0';
  n1933_o <= csr_in2 (18);
  n1934_o <= csr_in1 (18);
  -- urv_csr.v:122:43
  n1936_o <= n1934_o when n1933_o = '0' else '1';
  -- urv_defs.v:83:23
  n1939_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1941_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1942_o <= n1939_o or n1941_o;
  -- urv_defs.v:83:23
  n1943_o <= 'X' when n1942_o = '0' else n1936_o;
  -- urv_defs.v:84:23
  n1945_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1947_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1948_o <= n1945_o or n1947_o;
  -- urv_defs.v:84:23
  n1949_o <= n1943_o when n1948_o = '0' else n1932_o;
  -- urv_defs.v:82:23
  n1951_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1953_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1954_o <= n1951_o or n1953_o;
  -- urv_defs.v:82:23
  n1955_o <= n1949_o when n1954_o = '0' else n1928_o;
  n1956_o <= csr_in2 (19);
  n1957_o <= csr_in2 (19);
  n1958_o <= csr_in1 (19);
  -- urv_csr.v:119:43
  n1960_o <= n1958_o when n1957_o = '0' else '0';
  n1961_o <= csr_in2 (19);
  n1962_o <= csr_in1 (19);
  -- urv_csr.v:122:43
  n1964_o <= n1962_o when n1961_o = '0' else '1';
  -- urv_defs.v:83:23
  n1967_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1969_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1970_o <= n1967_o or n1969_o;
  -- urv_defs.v:83:23
  n1971_o <= 'X' when n1970_o = '0' else n1964_o;
  -- urv_defs.v:84:23
  n1973_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1975_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n1976_o <= n1973_o or n1975_o;
  -- urv_defs.v:84:23
  n1977_o <= n1971_o when n1976_o = '0' else n1960_o;
  -- urv_defs.v:82:23
  n1979_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1981_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n1982_o <= n1979_o or n1981_o;
  -- urv_defs.v:82:23
  n1983_o <= n1977_o when n1982_o = '0' else n1956_o;
  n1984_o <= csr_in2 (20);
  n1985_o <= csr_in2 (20);
  n1986_o <= csr_in1 (20);
  -- urv_csr.v:119:43
  n1988_o <= n1986_o when n1985_o = '0' else '0';
  n1989_o <= csr_in2 (20);
  n1990_o <= csr_in1 (20);
  -- urv_csr.v:122:43
  n1992_o <= n1990_o when n1989_o = '0' else '1';
  -- urv_defs.v:83:23
  n1995_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1997_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n1998_o <= n1995_o or n1997_o;
  -- urv_defs.v:83:23
  n1999_o <= 'X' when n1998_o = '0' else n1992_o;
  -- urv_defs.v:84:23
  n2001_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2003_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2004_o <= n2001_o or n2003_o;
  -- urv_defs.v:84:23
  n2005_o <= n1999_o when n2004_o = '0' else n1988_o;
  -- urv_defs.v:82:23
  n2007_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2009_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2010_o <= n2007_o or n2009_o;
  -- urv_defs.v:82:23
  n2011_o <= n2005_o when n2010_o = '0' else n1984_o;
  n2012_o <= csr_in2 (21);
  n2013_o <= csr_in2 (21);
  n2014_o <= csr_in1 (21);
  -- urv_csr.v:119:43
  n2016_o <= n2014_o when n2013_o = '0' else '0';
  n2017_o <= csr_in2 (21);
  n2018_o <= csr_in1 (21);
  -- urv_csr.v:122:43
  n2020_o <= n2018_o when n2017_o = '0' else '1';
  -- urv_defs.v:83:23
  n2023_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2025_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2026_o <= n2023_o or n2025_o;
  -- urv_defs.v:83:23
  n2027_o <= 'X' when n2026_o = '0' else n2020_o;
  -- urv_defs.v:84:23
  n2029_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2031_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2032_o <= n2029_o or n2031_o;
  -- urv_defs.v:84:23
  n2033_o <= n2027_o when n2032_o = '0' else n2016_o;
  -- urv_defs.v:82:23
  n2035_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2037_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2038_o <= n2035_o or n2037_o;
  -- urv_defs.v:82:23
  n2039_o <= n2033_o when n2038_o = '0' else n2012_o;
  n2040_o <= csr_in2 (22);
  n2041_o <= csr_in2 (22);
  n2042_o <= csr_in1 (22);
  -- urv_csr.v:119:43
  n2044_o <= n2042_o when n2041_o = '0' else '0';
  n2045_o <= csr_in2 (22);
  n2046_o <= csr_in1 (22);
  -- urv_csr.v:122:43
  n2048_o <= n2046_o when n2045_o = '0' else '1';
  -- urv_defs.v:83:23
  n2051_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2053_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2054_o <= n2051_o or n2053_o;
  -- urv_defs.v:83:23
  n2055_o <= 'X' when n2054_o = '0' else n2048_o;
  -- urv_defs.v:84:23
  n2057_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2059_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2060_o <= n2057_o or n2059_o;
  -- urv_defs.v:84:23
  n2061_o <= n2055_o when n2060_o = '0' else n2044_o;
  -- urv_defs.v:82:23
  n2063_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2065_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2066_o <= n2063_o or n2065_o;
  -- urv_defs.v:82:23
  n2067_o <= n2061_o when n2066_o = '0' else n2040_o;
  n2068_o <= csr_in2 (23);
  n2069_o <= csr_in2 (23);
  n2070_o <= csr_in1 (23);
  -- urv_csr.v:119:43
  n2072_o <= n2070_o when n2069_o = '0' else '0';
  n2073_o <= csr_in2 (23);
  n2074_o <= csr_in1 (23);
  -- urv_csr.v:122:43
  n2076_o <= n2074_o when n2073_o = '0' else '1';
  -- urv_defs.v:83:23
  n2079_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2081_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2082_o <= n2079_o or n2081_o;
  -- urv_defs.v:83:23
  n2083_o <= 'X' when n2082_o = '0' else n2076_o;
  -- urv_defs.v:84:23
  n2085_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2087_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2088_o <= n2085_o or n2087_o;
  -- urv_defs.v:84:23
  n2089_o <= n2083_o when n2088_o = '0' else n2072_o;
  -- urv_defs.v:82:23
  n2091_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2093_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2094_o <= n2091_o or n2093_o;
  -- urv_defs.v:82:23
  n2095_o <= n2089_o when n2094_o = '0' else n2068_o;
  n2096_o <= csr_in2 (24);
  n2097_o <= csr_in2 (24);
  n2098_o <= csr_in1 (24);
  -- urv_csr.v:119:43
  n2100_o <= n2098_o when n2097_o = '0' else '0';
  n2101_o <= csr_in2 (24);
  n2102_o <= csr_in1 (24);
  -- urv_csr.v:122:43
  n2104_o <= n2102_o when n2101_o = '0' else '1';
  -- urv_defs.v:83:23
  n2107_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2109_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2110_o <= n2107_o or n2109_o;
  -- urv_defs.v:83:23
  n2111_o <= 'X' when n2110_o = '0' else n2104_o;
  -- urv_defs.v:84:23
  n2113_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2115_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2116_o <= n2113_o or n2115_o;
  -- urv_defs.v:84:23
  n2117_o <= n2111_o when n2116_o = '0' else n2100_o;
  -- urv_defs.v:82:23
  n2119_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2121_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2122_o <= n2119_o or n2121_o;
  -- urv_defs.v:82:23
  n2123_o <= n2117_o when n2122_o = '0' else n2096_o;
  n2124_o <= csr_in2 (25);
  n2125_o <= csr_in2 (25);
  n2126_o <= csr_in1 (25);
  -- urv_csr.v:119:43
  n2128_o <= n2126_o when n2125_o = '0' else '0';
  n2129_o <= csr_in2 (25);
  n2130_o <= csr_in1 (25);
  -- urv_csr.v:122:43
  n2132_o <= n2130_o when n2129_o = '0' else '1';
  -- urv_defs.v:83:23
  n2135_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2137_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2138_o <= n2135_o or n2137_o;
  -- urv_defs.v:83:23
  n2139_o <= 'X' when n2138_o = '0' else n2132_o;
  -- urv_defs.v:84:23
  n2141_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2143_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2144_o <= n2141_o or n2143_o;
  -- urv_defs.v:84:23
  n2145_o <= n2139_o when n2144_o = '0' else n2128_o;
  -- urv_defs.v:82:23
  n2147_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2149_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2150_o <= n2147_o or n2149_o;
  -- urv_defs.v:82:23
  n2151_o <= n2145_o when n2150_o = '0' else n2124_o;
  n2152_o <= csr_in2 (26);
  n2153_o <= csr_in2 (26);
  n2154_o <= csr_in1 (26);
  -- urv_csr.v:119:43
  n2156_o <= n2154_o when n2153_o = '0' else '0';
  n2157_o <= csr_in2 (26);
  n2158_o <= csr_in1 (26);
  -- urv_csr.v:122:43
  n2160_o <= n2158_o when n2157_o = '0' else '1';
  -- urv_defs.v:83:23
  n2163_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2165_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2166_o <= n2163_o or n2165_o;
  -- urv_defs.v:83:23
  n2167_o <= 'X' when n2166_o = '0' else n2160_o;
  -- urv_defs.v:84:23
  n2169_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2171_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2172_o <= n2169_o or n2171_o;
  -- urv_defs.v:84:23
  n2173_o <= n2167_o when n2172_o = '0' else n2156_o;
  -- urv_defs.v:82:23
  n2175_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2177_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2178_o <= n2175_o or n2177_o;
  -- urv_defs.v:82:23
  n2179_o <= n2173_o when n2178_o = '0' else n2152_o;
  n2180_o <= csr_in2 (27);
  n2181_o <= csr_in2 (27);
  n2182_o <= csr_in1 (27);
  -- urv_csr.v:119:43
  n2184_o <= n2182_o when n2181_o = '0' else '0';
  n2185_o <= csr_in2 (27);
  n2186_o <= csr_in1 (27);
  -- urv_csr.v:122:43
  n2188_o <= n2186_o when n2185_o = '0' else '1';
  -- urv_defs.v:83:23
  n2191_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2193_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2194_o <= n2191_o or n2193_o;
  -- urv_defs.v:83:23
  n2195_o <= 'X' when n2194_o = '0' else n2188_o;
  -- urv_defs.v:84:23
  n2197_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2199_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2200_o <= n2197_o or n2199_o;
  -- urv_defs.v:84:23
  n2201_o <= n2195_o when n2200_o = '0' else n2184_o;
  -- urv_defs.v:82:23
  n2203_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2205_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2206_o <= n2203_o or n2205_o;
  -- urv_defs.v:82:23
  n2207_o <= n2201_o when n2206_o = '0' else n2180_o;
  n2208_o <= csr_in2 (28);
  n2209_o <= csr_in2 (28);
  n2210_o <= csr_in1 (28);
  -- urv_csr.v:119:43
  n2212_o <= n2210_o when n2209_o = '0' else '0';
  n2213_o <= csr_in2 (28);
  n2214_o <= csr_in1 (28);
  -- urv_csr.v:122:43
  n2216_o <= n2214_o when n2213_o = '0' else '1';
  -- urv_defs.v:83:23
  n2219_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2221_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2222_o <= n2219_o or n2221_o;
  -- urv_defs.v:83:23
  n2223_o <= 'X' when n2222_o = '0' else n2216_o;
  -- urv_defs.v:84:23
  n2225_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2227_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2228_o <= n2225_o or n2227_o;
  -- urv_defs.v:84:23
  n2229_o <= n2223_o when n2228_o = '0' else n2212_o;
  -- urv_defs.v:82:23
  n2231_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2233_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2234_o <= n2231_o or n2233_o;
  -- urv_defs.v:82:23
  n2235_o <= n2229_o when n2234_o = '0' else n2208_o;
  n2236_o <= csr_in2 (29);
  n2237_o <= csr_in2 (29);
  n2238_o <= csr_in1 (29);
  -- urv_csr.v:119:43
  n2240_o <= n2238_o when n2237_o = '0' else '0';
  n2241_o <= csr_in2 (29);
  n2242_o <= csr_in1 (29);
  -- urv_csr.v:122:43
  n2244_o <= n2242_o when n2241_o = '0' else '1';
  -- urv_defs.v:83:23
  n2247_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2249_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2250_o <= n2247_o or n2249_o;
  -- urv_defs.v:83:23
  n2251_o <= 'X' when n2250_o = '0' else n2244_o;
  -- urv_defs.v:84:23
  n2253_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2255_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2256_o <= n2253_o or n2255_o;
  -- urv_defs.v:84:23
  n2257_o <= n2251_o when n2256_o = '0' else n2240_o;
  -- urv_defs.v:82:23
  n2259_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2261_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2262_o <= n2259_o or n2261_o;
  -- urv_defs.v:82:23
  n2263_o <= n2257_o when n2262_o = '0' else n2236_o;
  n2264_o <= csr_in2 (30);
  n2265_o <= csr_in2 (30);
  n2266_o <= csr_in1 (30);
  -- urv_csr.v:119:43
  n2268_o <= n2266_o when n2265_o = '0' else '0';
  n2269_o <= csr_in2 (30);
  n2270_o <= csr_in1 (30);
  -- urv_csr.v:122:43
  n2272_o <= n2270_o when n2269_o = '0' else '1';
  -- urv_defs.v:83:23
  n2275_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2277_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2278_o <= n2275_o or n2277_o;
  -- urv_defs.v:83:23
  n2279_o <= 'X' when n2278_o = '0' else n2272_o;
  -- urv_defs.v:84:23
  n2281_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2283_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2284_o <= n2281_o or n2283_o;
  -- urv_defs.v:84:23
  n2285_o <= n2279_o when n2284_o = '0' else n2268_o;
  -- urv_defs.v:82:23
  n2287_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2289_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2290_o <= n2287_o or n2289_o;
  -- urv_defs.v:82:23
  n2291_o <= n2285_o when n2290_o = '0' else n2264_o;
  n2292_o <= csr_in2 (31);
  n2293_o <= csr_in2 (31);
  n2294_o <= csr_in1 (31);
  -- urv_csr.v:119:43
  n2296_o <= n2294_o when n2293_o = '0' else '0';
  n2297_o <= csr_in2 (31);
  n2298_o <= csr_in1 (31);
  -- urv_csr.v:122:43
  n2300_o <= n2298_o when n2297_o = '0' else '1';
  -- urv_defs.v:83:23
  n2303_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2305_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:80:22
  n2306_o <= n2303_o or n2305_o;
  -- urv_defs.v:83:23
  n2307_o <= 'X' when n2306_o = '0' else n2300_o;
  -- urv_defs.v:84:23
  n2309_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2311_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:81:22
  n2312_o <= n2309_o or n2311_o;
  -- urv_defs.v:84:23
  n2313_o <= n2307_o when n2312_o = '0' else n2296_o;
  -- urv_defs.v:82:23
  n2315_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2317_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:79:22
  n2318_o <= n2315_o or n2317_o;
  -- urv_defs.v:82:23
  n2319_o <= n2313_o when n2318_o = '0' else n2292_o;
  -- urv_csr.v:138:31
  n2324_o <= dbg_mbx_write_i and '0';
  -- urv_csr.v:138:11
  n2325_o <= mbx_data when n2324_o = '0' else dbg_mbx_data_i;
  -- urv_csr.v:141:14
  n2326_o <= not x_stall_i;
  -- urv_csr.v:141:28
  n2327_o <= not x_kill_i;
  -- urv_csr.v:141:25
  n2328_o <= n2326_o and n2327_o;
  -- urv_csr.v:141:38
  n2329_o <= n2328_o and d_is_csr_i;
  -- urv_defs.v:106:25
  n2333_o <= '1' when std_logic_vector'("001101000000") = d_csr_sel_i else '0';
  -- urv_csr.v:141:11
  n2334_o <= csr_mscratch when n2335_o = '0' else csr_out;
  -- urv_csr.v:141:11
  n2335_o <= n2329_o and n2333_o;
  -- urv_csr.v:131:6
  n2336_o <= n2334_o when rst_i = '0' else "00000000000000000000000000000000";
  -- urv_csr.v:131:6
  n2337_o <= n2325_o when rst_i = '0' else "00000000000000000000000000000000";
  -- urv_csr.v:130:5
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2340_q <= n2336_o;
    end if;
  end process;
  -- urv_csr.v:130:5
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n2341_q <= n2337_o;
    end if;
  end process;
  -- urv_csr.v:130:5
  n2342_o <= n2319_o & n2291_o & n2263_o & n2235_o & n2207_o & n2179_o & n2151_o & n2123_o & n2095_o & n2067_o & n2039_o & n2011_o & n1983_o & n1955_o & n1927_o & n1899_o & n1871_o & n1843_o & n1815_o & n1787_o & n1759_o & n1731_o & n1703_o & n1675_o & n1647_o & n1619_o & n1591_o & n1563_o & n1535_o & n1507_o & n1479_o & n1451_o;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_regmem is
  port (
    clk_i : in std_logic;
    en1_i : in std_logic;
    a1_i : in std_logic_vector (4 downto 0);
    a2_i : in std_logic_vector (4 downto 0);
    d2_i : in std_logic_vector (31 downto 0);
    we2_i : in std_logic;
    q1_o : out std_logic_vector (31 downto 0));
end entity urv_regmem;

architecture rtl of urv_regmem is
  signal n1362_data : std_logic_vector (31 downto 0);
begin
  q1_o <= n1362_data;
  -- urv_regfile.v:51:24
  process (clk_i, clk_i) is
    type ram_type is array (0 to 31)
      of std_logic_vector (31 downto 0);
    variable ram : ram_type;
  begin
    if rising_edge (clk_i) and (en1_i = '1') then
      n1362_data <= ram(to_integer (unsigned (a1_i)));
    end if;
    if rising_edge (clk_i) and (we2_i = '1') then
      ram (to_integer (unsigned (a2_i))) := d2_i;
    end if;
  end process;
  -- urv_regfile.v:49:4
  -- urv_regfile.v:55:16
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_writeback is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    x_fun_i : in std_logic_vector (2 downto 0);
    x_load_i : in std_logic;
    x_store_i : in std_logic;
    x_dm_addr_i : in std_logic_vector (31 downto 0);
    x_rd_i : in std_logic_vector (4 downto 0);
    x_rd_value_i : in std_logic_vector (31 downto 0);
    x_rd_write_i : in std_logic;
    x_valid_i : in std_logic;
    x_shifter_rd_value_i : in std_logic_vector (31 downto 0);
    x_multiply_rd_value_i : in std_logic_vector (31 downto 0);
    x_rd_source_i : in std_logic_vector (1 downto 0);
    x_ecc_flip_i : in std_logic_vector (1 downto 0);
    dm_data_l_i : in std_logic_vector (31 downto 0);
    dm_load_done_i : in std_logic;
    dm_store_done_i : in std_logic;
    w_stall_req_o : out std_logic;
    rf_rd_value_o : out std_logic_vector (31 downto 0);
    rf_rd_o : out std_logic_vector (4 downto 0);
    rf_rd_ecc_o : out std_logic_vector (6 downto 0);
    rf_rd_ecc_flip_o : out std_logic_vector (1 downto 0);
    rf_rd_write_o : out std_logic);
end entity urv_writeback;

architecture rtl of urv_writeback is
  signal load_value : std_logic_vector (31 downto 0);
  signal rf_rd_write : std_logic;
  signal rf_rd_value : std_logic_vector (31 downto 0);
  signal n1222_o : std_logic_vector (1 downto 0);
  signal n1223_o : std_logic;
  signal n1224_o : std_logic_vector (23 downto 0);
  signal n1225_o : std_logic_vector (7 downto 0);
  signal n1226_o : std_logic_vector (31 downto 0);
  signal n1227_o : std_logic;
  signal n1228_o : std_logic_vector (23 downto 0);
  signal n1229_o : std_logic_vector (7 downto 0);
  signal n1230_o : std_logic_vector (31 downto 0);
  signal n1231_o : std_logic;
  signal n1232_o : std_logic_vector (23 downto 0);
  signal n1233_o : std_logic_vector (7 downto 0);
  signal n1234_o : std_logic_vector (31 downto 0);
  signal n1235_o : std_logic;
  signal n1236_o : std_logic_vector (23 downto 0);
  signal n1237_o : std_logic_vector (7 downto 0);
  signal n1238_o : std_logic_vector (31 downto 0);
  signal n1241_o : std_logic;
  signal n1242_o : std_logic_vector (31 downto 0);
  signal n1244_o : std_logic;
  signal n1245_o : std_logic_vector (31 downto 0);
  signal n1247_o : std_logic;
  signal n1248_o : std_logic_vector (31 downto 0);
  signal n1250_o : std_logic;
  signal n1251_o : std_logic_vector (31 downto 0);
  signal n1252_o : std_logic_vector (1 downto 0);
  signal n1253_o : std_logic_vector (7 downto 0);
  signal n1255_o : std_logic_vector (31 downto 0);
  signal n1256_o : std_logic_vector (7 downto 0);
  signal n1258_o : std_logic_vector (31 downto 0);
  signal n1259_o : std_logic_vector (7 downto 0);
  signal n1261_o : std_logic_vector (31 downto 0);
  signal n1262_o : std_logic_vector (7 downto 0);
  signal n1264_o : std_logic_vector (31 downto 0);
  signal n1267_o : std_logic;
  signal n1268_o : std_logic_vector (31 downto 0);
  signal n1270_o : std_logic;
  signal n1271_o : std_logic_vector (31 downto 0);
  signal n1273_o : std_logic;
  signal n1274_o : std_logic_vector (31 downto 0);
  signal n1276_o : std_logic;
  signal n1277_o : std_logic_vector (31 downto 0);
  signal n1278_o : std_logic;
  signal n1279_o : std_logic;
  signal n1280_o : std_logic_vector (15 downto 0);
  signal n1281_o : std_logic_vector (15 downto 0);
  signal n1282_o : std_logic_vector (31 downto 0);
  signal n1283_o : std_logic;
  signal n1284_o : std_logic_vector (15 downto 0);
  signal n1285_o : std_logic_vector (15 downto 0);
  signal n1286_o : std_logic_vector (31 downto 0);
  signal n1289_o : std_logic;
  signal n1290_o : std_logic_vector (31 downto 0);
  signal n1292_o : std_logic;
  signal n1293_o : std_logic_vector (31 downto 0);
  signal n1294_o : std_logic;
  signal n1295_o : std_logic_vector (15 downto 0);
  signal n1297_o : std_logic_vector (31 downto 0);
  signal n1298_o : std_logic_vector (15 downto 0);
  signal n1300_o : std_logic_vector (31 downto 0);
  signal n1303_o : std_logic;
  signal n1304_o : std_logic_vector (31 downto 0);
  signal n1306_o : std_logic;
  signal n1307_o : std_logic_vector (31 downto 0);
  signal n1310_o : std_logic;
  signal n1311_o : std_logic_vector (31 downto 0);
  signal n1313_o : std_logic;
  signal n1314_o : std_logic_vector (31 downto 0);
  signal n1316_o : std_logic;
  signal n1317_o : std_logic_vector (31 downto 0);
  signal n1319_o : std_logic;
  signal n1320_o : std_logic_vector (31 downto 0);
  signal n1322_o : std_logic;
  signal n1323_o : std_logic_vector (31 downto 0);
  signal n1324_o : std_logic_vector (2 downto 0);
  signal n1326_o : std_logic;
  signal n1327_o : std_logic_vector (2 downto 0);
  signal n1329_o : std_logic;
  signal n1330_o : std_logic_vector (31 downto 0);
  signal n1331_o : std_logic_vector (31 downto 0);
  signal n1332_o : std_logic_vector (31 downto 0);
  signal n1333_o : std_logic;
  signal n1334_o : std_logic;
  signal n1335_o : std_logic;
  constant n1336_o : std_logic_vector (6 downto 0) := "0XXXXXX";
  signal n1337_o : std_logic;
  signal n1338_o : std_logic;
  signal n1339_o : std_logic;
  signal n1340_o : std_logic;
  signal n1341_o : std_logic;
  signal n1342_o : std_logic;
  constant n1343_o : std_logic_vector (1 downto 0) := "XX";
begin
  w_stall_req_o <= n1342_o;
  rf_rd_value_o <= rf_rd_value;
  rf_rd_o <= x_rd_i;
  rf_rd_ecc_o <= n1336_o;
  rf_rd_ecc_flip_o <= n1343_o;
  rf_rd_write_o <= rf_rd_write;
  -- urv_writeback.v:68:18
  load_value <= n1323_o; -- (signal)
  -- urv_writeback.v:110:8
  rf_rd_write <= n1335_o; -- (signal)
  -- urv_writeback.v:111:15
  rf_rd_value <= n1332_o; -- (signal)
  -- urv_exec.v:104:22
  n1222_o <= x_dm_addr_i (1 downto 0);
  -- urv_exec.v:103:22
  n1223_o <= dm_data_l_i (7);
  -- urv_exec.v:102:22
  n1224_o <= n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o & n1223_o;
  -- urv_exec.v:101:22
  n1225_o <= dm_data_l_i (7 downto 0);
  -- urv_exec.v:100:22
  n1226_o <= n1224_o & n1225_o;
  -- urv_exec.v:99:22
  n1227_o <= dm_data_l_i (15);
  -- urv_exec.v:97:22
  n1228_o <= n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o & n1227_o;
  -- urv_exec.v:96:22
  n1229_o <= dm_data_l_i (15 downto 8);
  -- urv_exec.v:95:22
  n1230_o <= n1228_o & n1229_o;
  -- urv_exec.v:90:22
  n1231_o <= dm_data_l_i (23);
  -- urv_exec.v:89:22
  n1232_o <= n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o & n1231_o;
  -- urv_exec.v:88:22
  n1233_o <= dm_data_l_i (23 downto 16);
  -- urv_exec.v:41:22
  n1234_o <= n1232_o & n1233_o;
  -- urv_exec.v:38:22
  n1235_o <= dm_data_l_i (31);
  n1236_o <= n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o & n1235_o;
  n1237_o <= dm_data_l_i (31 downto 24);
  n1238_o <= n1236_o & n1237_o;
  -- urv_writeback.v:78:12
  n1241_o <= '1' when std_logic_vector'("11") = n1222_o else '0';
  -- urv_writeback.v:78:12
  n1242_o <= (31 downto 0 => 'X') when n1241_o = '0' else n1238_o;
  -- urv_writeback.v:77:12
  n1244_o <= '1' when std_logic_vector'("10") = n1222_o else '0';
  -- urv_writeback.v:77:12
  n1245_o <= n1242_o when n1244_o = '0' else n1234_o;
  -- urv_writeback.v:76:12
  n1247_o <= '1' when std_logic_vector'("01") = n1222_o else '0';
  -- urv_writeback.v:76:12
  n1248_o <= n1245_o when n1247_o = '0' else n1230_o;
  -- urv_writeback.v:75:12
  n1250_o <= '1' when std_logic_vector'("00") = n1222_o else '0';
  -- urv_writeback.v:75:12
  n1251_o <= n1248_o when n1250_o = '0' else n1226_o;
  n1252_o <= x_dm_addr_i (1 downto 0);
  n1253_o <= dm_data_l_i (7 downto 0);
  n1255_o <= "000000000000000000000000" & n1253_o;
  n1256_o <= dm_data_l_i (15 downto 8);
  n1258_o <= "000000000000000000000000" & n1256_o;
  n1259_o <= dm_data_l_i (23 downto 16);
  n1261_o <= "000000000000000000000000" & n1259_o;
  n1262_o <= dm_data_l_i (31 downto 24);
  n1264_o <= "000000000000000000000000" & n1262_o;
  -- urv_writeback.v:87:12
  n1267_o <= '1' when std_logic_vector'("11") = n1252_o else '0';
  -- urv_writeback.v:87:12
  n1268_o <= (31 downto 0 => 'X') when n1267_o = '0' else n1264_o;
  -- urv_writeback.v:86:12
  n1270_o <= '1' when std_logic_vector'("10") = n1252_o else '0';
  -- urv_writeback.v:86:12
  n1271_o <= n1268_o when n1270_o = '0' else n1261_o;
  -- urv_writeback.v:85:12
  n1273_o <= '1' when std_logic_vector'("01") = n1252_o else '0';
  -- urv_writeback.v:85:12
  n1274_o <= n1271_o when n1273_o = '0' else n1258_o;
  -- urv_writeback.v:84:12
  n1276_o <= '1' when std_logic_vector'("00") = n1252_o else '0';
  -- urv_writeback.v:84:12
  n1277_o <= n1274_o when n1276_o = '0' else n1255_o;
  n1278_o <= x_dm_addr_i (1);
  n1279_o <= dm_data_l_i (15);
  n1280_o <= n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o & n1279_o;
  n1281_o <= dm_data_l_i (15 downto 0);
  n1282_o <= n1280_o & n1281_o;
  n1283_o <= dm_data_l_i (31);
  n1284_o <= n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o & n1283_o;
  n1285_o <= dm_data_l_i (31 downto 16);
  n1286_o <= n1284_o & n1285_o;
  -- urv_writeback.v:94:12
  n1289_o <= '1' when std_logic'('1') = n1278_o else '0';
  -- urv_writeback.v:94:12
  n1290_o <= (31 downto 0 => 'X') when n1289_o = '0' else n1286_o;
  -- urv_writeback.v:93:12
  n1292_o <= '1' when std_logic'('0') = n1278_o else '0';
  -- urv_writeback.v:93:12
  n1293_o <= n1290_o when n1292_o = '0' else n1282_o;
  n1294_o <= x_dm_addr_i (1);
  n1295_o <= dm_data_l_i (15 downto 0);
  n1297_o <= "0000000000000000" & n1295_o;
  n1298_o <= dm_data_l_i (31 downto 16);
  n1300_o <= "0000000000000000" & n1298_o;
  -- urv_writeback.v:101:12
  n1303_o <= '1' when std_logic'('1') = n1294_o else '0';
  -- urv_writeback.v:101:12
  n1304_o <= (31 downto 0 => 'X') when n1303_o = '0' else n1300_o;
  -- urv_writeback.v:100:12
  n1306_o <= '1' when std_logic'('0') = n1294_o else '0';
  -- urv_writeback.v:100:12
  n1307_o <= n1304_o when n1306_o = '0' else n1297_o;
  -- urv_defs.v:53:16
  n1310_o <= '1' when std_logic_vector'("010") = x_fun_i else '0';
  -- urv_defs.v:53:16
  n1311_o <= (31 downto 0 => 'X') when n1310_o = '0' else dm_data_l_i;
  -- urv_defs.v:55:17
  n1313_o <= '1' when std_logic_vector'("101") = x_fun_i else '0';
  -- urv_defs.v:55:17
  n1314_o <= n1311_o when n1313_o = '0' else n1307_o;
  -- urv_defs.v:52:16
  n1316_o <= '1' when std_logic_vector'("001") = x_fun_i else '0';
  -- urv_defs.v:52:16
  n1317_o <= n1314_o when n1316_o = '0' else n1293_o;
  -- urv_defs.v:54:25
  n1319_o <= '1' when std_logic_vector'("100") = x_fun_i else '0';
  -- urv_defs.v:54:25
  n1320_o <= n1317_o when n1319_o = '0' else n1277_o;
  -- urv_defs.v:51:16
  n1322_o <= '1' when std_logic_vector'("000") = x_fun_i else '0';
  -- urv_defs.v:51:16
  n1323_o <= n1320_o when n1322_o = '0' else n1251_o;
  -- urv_writeback.v:116:16
  n1324_o <= "0" & x_rd_source_i;  --  uext
  -- urv_writeback.v:116:30
  n1326_o <= '1' when n1324_o = "010" else '0';
  -- urv_writeback.v:118:16
  n1327_o <= "0" & x_rd_source_i;  --  uext
  -- urv_writeback.v:118:30
  n1329_o <= '1' when n1327_o = "001" else '0';
  -- urv_writeback.v:118:11
  n1330_o <= x_rd_value_i when n1329_o = '0' else x_multiply_rd_value_i;
  -- urv_writeback.v:116:11
  n1331_o <= n1330_o when n1326_o = '0' else x_shifter_rd_value_i;
  -- urv_writeback.v:114:6
  n1332_o <= n1331_o when x_load_i = '0' else load_value;
  -- urv_writeback.v:124:19
  n1333_o <= x_load_i and dm_load_done_i;
  -- urv_writeback.v:127:36
  n1334_o <= x_rd_write_i and x_valid_i;
  -- urv_writeback.v:124:6
  n1335_o <= n1334_o when n1333_o = '0' else x_valid_i;
  -- urv_writeback.v:153:54
  n1337_o <= not dm_load_done_i;
  -- urv_writeback.v:153:51
  n1338_o <= x_load_i and n1337_o;
  -- urv_writeback.v:153:88
  n1339_o <= not dm_store_done_i;
  -- urv_writeback.v:153:85
  n1340_o <= x_store_i and n1339_o;
  -- urv_writeback.v:153:71
  n1341_o <= n1338_o or n1340_o;
  -- urv_writeback.v:153:37
  n1342_o <= x_valid_i and n1341_o;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_exec is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    x_stall_i : in std_logic;
    x_kill_i : in std_logic;
    d_pc_i : in std_logic_vector (31 downto 0);
    d_rd_i : in std_logic_vector (4 downto 0);
    d_fun_i : in std_logic_vector (2 downto 0);
    rf_rs1_value_i : in std_logic_vector (31 downto 0);
    rf_rs2_value_i : in std_logic_vector (31 downto 0);
    rf_rs1_ecc_err_i : in std_logic;
    rf_rs2_ecc_err_i : in std_logic;
    d_valid_i : in std_logic;
    d_opcode_i : in std_logic_vector (4 downto 0);
    d_shifter_sign_i : in std_logic;
    d_is_csr_i : in std_logic;
    d_is_mret_i : in std_logic;
    d_is_ebreak_i : in std_logic;
    d_dbg_mode_i : in std_logic;
    d_csr_imm_i : in std_logic_vector (4 downto 0);
    d_csr_sel_i : in std_logic_vector (11 downto 0);
    d_imm_i : in std_logic_vector (31 downto 0);
    d_is_signed_alu_op_i : in std_logic;
    d_is_add_i : in std_logic;
    d_is_load_i : in std_logic;
    d_is_store_i : in std_logic;
    d_is_divide_i : in std_logic;
    d_is_multiply_i : in std_logic;
    d_is_undef_i : in std_logic;
    d_is_write_ecc_i : in std_logic;
    d_is_fix_ecc_i : in std_logic;
    d_alu_op1_i : in std_logic_vector (31 downto 0);
    d_alu_op2_i : in std_logic_vector (31 downto 0);
    d_use_op1_i : in std_logic;
    d_use_op2_i : in std_logic;
    d_use_rs1_i : in std_logic;
    d_use_rs2_i : in std_logic;
    d_rd_source_i : in std_logic_vector (2 downto 0);
    d_rd_write_i : in std_logic;
    irq_i : in std_logic;
    csr_time_i : in std_logic_vector (39 downto 0);
    csr_cycles_i : in std_logic_vector (39 downto 0);
    timer_tick_i : in std_logic;
    dbg_mbx_data_i : in std_logic_vector (31 downto 0);
    dbg_mbx_write_i : in std_logic;
    x_stall_req_o : out std_logic;
    x_fault_o : out std_logic;
    f_branch_target_o : out std_logic_vector (31 downto 0);
    f_branch_take_o : out std_logic;
    f_dbg_toggle_o : out std_logic;
    w_fun_o : out std_logic_vector (2 downto 0);
    w_load_o : out std_logic;
    w_store_o : out std_logic;
    w_valid_o : out std_logic;
    w_rd_o : out std_logic_vector (4 downto 0);
    w_rd_value_o : out std_logic_vector (31 downto 0);
    w_rd_write_o : out std_logic;
    w_dm_addr_o : out std_logic_vector (31 downto 0);
    w_rd_source_o : out std_logic_vector (1 downto 0);
    w_rd_shifter_o : out std_logic_vector (31 downto 0);
    w_rd_multiply_o : out std_logic_vector (31 downto 0);
    w_ecc_flip_o : out std_logic_vector (1 downto 0);
    dm_addr_o : out std_logic_vector (31 downto 0);
    dm_data_s_o : out std_logic_vector (31 downto 0);
    dm_data_select_o : out std_logic_vector (3 downto 0);
    dm_store_o : out std_logic;
    dm_load_o : out std_logic;
    dbg_mbx_data_o : out std_logic_vector (31 downto 0));
end entity urv_exec;

architecture rtl of urv_exec is
  signal rs1 : std_logic_vector (31 downto 0);
  signal rs2 : std_logic_vector (31 downto 0);
  signal alu_op1 : std_logic_vector (31 downto 0);
  signal alu_op2 : std_logic_vector (31 downto 0);
  signal alu_result : std_logic_vector (31 downto 0);
  signal rd_value : std_logic_vector (31 downto 0);
  signal x_exception : std_logic;
  signal x_exception_cause : std_logic_vector (3 downto 0);
  signal x_interrupt : std_logic;
  signal branch_take : std_logic;
  signal branch_condition_met : std_logic;
  signal branch_target : std_logic_vector (31 downto 0);
  signal dm_addr : std_logic_vector (31 downto 0);
  signal dm_data_s : std_logic_vector (31 downto 0);
  signal dm_select_s : std_logic_vector (3 downto 0);
  signal cmp_op1 : std_logic_vector (32 downto 0);
  signal n833_o : std_logic;
  signal n835_o : std_logic;
  signal n836_o : std_logic_vector (32 downto 0);
  signal cmp_op2 : std_logic_vector (32 downto 0);
  signal n837_o : std_logic;
  signal n839_o : std_logic;
  signal n840_o : std_logic_vector (32 downto 0);
  signal cmp_rs : std_logic_vector (32 downto 0);
  signal n841_o : std_logic_vector (32 downto 0);
  signal cmp_equal : std_logic;
  signal n842_o : std_logic;
  signal cmp_lt : std_logic;
  signal n843_o : std_logic;
  signal f_branch_take : std_logic;
  signal rd_csr : std_logic_vector (31 downto 0);
  signal rd_mulh : std_logic_vector (31 downto 0);
  signal csr_mie : std_logic_vector (31 downto 0);
  signal csr_mip : std_logic_vector (31 downto 0);
  signal csr_mepc : std_logic_vector (31 downto 0);
  signal csr_mstatus : std_logic_vector (31 downto 0);
  signal csr_mcause : std_logic_vector (31 downto 0);
  signal csr_write_value : std_logic_vector (31 downto 0);
  signal exception_address : std_logic_vector (31 downto 0);
  signal exception_pc : std_logic_vector (31 downto 0);
  signal irq_pending : std_logic;
  signal timer_pending : std_logic;
  signal alu_addsub_op1 : std_logic_vector (32 downto 0);
  signal n844_o : std_logic;
  signal n846_o : std_logic;
  signal n847_o : std_logic_vector (32 downto 0);
  signal alu_addsub_op2 : std_logic_vector (32 downto 0);
  signal n848_o : std_logic;
  signal n850_o : std_logic;
  signal n851_o : std_logic_vector (32 downto 0);
  signal alu_add : std_logic_vector (32 downto 0);
  signal n852_o : std_logic_vector (32 downto 0);
  signal alu_sub : std_logic_vector (32 downto 0);
  signal n853_o : std_logic_vector (32 downto 0);
  signal divider_stall_req : std_logic;
  signal multiply_stall_req : std_logic;
  signal rd_divide : std_logic_vector (31 downto 0);
  signal unaligned_addr : std_logic;
  signal csr_regs_x_rd_o : std_logic_vector (31 downto 0);
  signal csr_regs_x_csr_write_value_o : std_logic_vector (31 downto 0);
  signal csr_regs_dbg_mbx_data_o : std_logic_vector (31 downto 0);
  signal exception_unit_exp_ei_pending_o : std_logic;
  signal exception_unit_exp_ti_pending_o : std_logic;
  signal exception_unit_x_exception_pc_o : std_logic_vector (31 downto 0);
  signal exception_unit_csr_mstatus_o : std_logic_vector (31 downto 0);
  signal exception_unit_csr_mip_o : std_logic_vector (31 downto 0);
  signal exception_unit_csr_mie_o : std_logic_vector (31 downto 0);
  signal exception_unit_csr_mepc_o : std_logic_vector (31 downto 0);
  signal exception_unit_csr_mcause_o : std_logic_vector (31 downto 0);
  signal n854_o : std_logic;
  signal n855_o : std_logic;
  signal n856_o : std_logic;
  signal n857_o : std_logic;
  signal n858_o : std_logic;
  signal n861_o : std_logic;
  signal n862_o : std_logic;
  signal n864_o : std_logic;
  signal n865_o : std_logic;
  signal n867_o : std_logic;
  signal n868_o : std_logic;
  signal n870_o : std_logic;
  signal n871_o : std_logic;
  signal n873_o : std_logic;
  signal n874_o : std_logic;
  signal n876_o : std_logic;
  signal n877_o : std_logic;
  signal n880_o : std_logic;
  signal n882_o : std_logic;
  signal n883_o : std_logic_vector (31 downto 0);
  signal n884_o : std_logic_vector (31 downto 0);
  signal n885_o : std_logic_vector (31 downto 0);
  signal n886_o : std_logic_vector (31 downto 0);
  signal n887_o : std_logic_vector (31 downto 0);
  signal n888_o : std_logic_vector (31 downto 0);
  signal n889_o : std_logic_vector (31 downto 0);
  signal n890_o : std_logic_vector (31 downto 0);
  signal n891_o : std_logic_vector (31 downto 0);
  signal n892_o : std_logic_vector (31 downto 0);
  signal n893_o : std_logic_vector (31 downto 0);
  signal n894_o : std_logic_vector (31 downto 0);
  signal n895_o : std_logic_vector (31 downto 0);
  signal n896_o : std_logic_vector (31 downto 0);
  signal n897_o : std_logic;
  signal n899_o : std_logic_vector (31 downto 0);
  signal n902_o : std_logic;
  signal n904_o : std_logic;
  signal n905_o : std_logic;
  signal n906_o : std_logic_vector (31 downto 0);
  signal n908_o : std_logic;
  signal n909_o : std_logic_vector (31 downto 0);
  signal n911_o : std_logic;
  signal n912_o : std_logic_vector (31 downto 0);
  signal n914_o : std_logic;
  signal n915_o : std_logic_vector (31 downto 0);
  signal n917_o : std_logic;
  signal n918_o : std_logic_vector (31 downto 0);
  signal n920_o : std_logic;
  signal n921_o : std_logic_vector (31 downto 0);
  signal n923_o : std_logic;
  signal n924_o : std_logic_vector (31 downto 0);
  signal shifter_w_rd_o : std_logic_vector (31 downto 0);
  signal n925_o : std_logic_vector (4 downto 0);
  constant n927_o : std_logic_vector (31 downto 0) := "00000000000000000000000000000000";
  signal n931_o : std_logic;
  signal n932_o : std_logic_vector (31 downto 0);
  signal n934_o : std_logic;
  signal n935_o : std_logic_vector (31 downto 0);
  signal n937_o : std_logic;
  signal n938_o : std_logic_vector (31 downto 0);
  signal n940_o : std_logic;
  signal n941_o : std_logic_vector (31 downto 0);
  signal n942_o : std_logic_vector (31 downto 0);
  signal n944_o : std_logic;
  signal n945_o : std_logic_vector (1 downto 0);
  signal n947_o : std_logic;
  signal n950_o : std_logic;
  signal n951_o : std_logic;
  signal n953_o : std_logic;
  signal n955_o : std_logic;
  signal n956_o : std_logic;
  signal n957_o : std_logic;
  signal n959_o : std_logic;
  signal n961_o : std_logic;
  signal n962_o : std_logic;
  signal n963_o : std_logic;
  signal n967_o : std_logic;
  signal n968_o : std_logic;
  signal n969_o : std_logic;
  signal n973_o : std_logic;
  signal n974_o : std_logic;
  signal n975_o : std_logic;
  signal n976_o : std_logic;
  signal n977_o : std_logic;
  signal n982_o : std_logic;
  signal n984_o : std_logic;
  signal n985_o : std_logic;
  signal n986_o : std_logic;
  signal n993_o : std_logic;
  signal n994_o : std_logic_vector (3 downto 0);
  signal n996_o : std_logic;
  signal n997_o : std_logic_vector (3 downto 0);
  signal n998_o : std_logic;
  signal n999_o : std_logic;
  signal n1003_o : std_logic;
  signal n1004_o : std_logic;
  signal n1008_o : std_logic;
  signal n1009_o : std_logic_vector (3 downto 0);
  signal n1010_o : std_logic;
  signal n1011_o : std_logic;
  signal n1012_o : std_logic_vector (3 downto 0);
  signal n1013_o : std_logic;
  signal n1014_o : std_logic;
  signal n1015_o : std_logic_vector (3 downto 0);
  signal n1016_o : std_logic;
  signal n1017_o : std_logic;
  signal n1018_o : std_logic_vector (3 downto 0);
  signal n1019_o : std_logic;
  signal n1020_o : std_logic;
  signal n1021_o : std_logic_vector (3 downto 0);
  signal n1022_o : std_logic;
  signal n1023_o : std_logic;
  signal n1024_o : std_logic_vector (3 downto 0);
  signal n1025_o : std_logic;
  signal n1026_o : std_logic_vector (7 downto 0);
  signal n1027_o : std_logic_vector (7 downto 0);
  signal n1028_o : std_logic_vector (7 downto 0);
  signal n1029_o : std_logic_vector (7 downto 0);
  signal n1030_o : std_logic_vector (31 downto 0);
  signal n1031_o : std_logic_vector (1 downto 0);
  signal n1033_o : std_logic;
  signal n1034_o : std_logic_vector (1 downto 0);
  signal n1036_o : std_logic;
  signal n1037_o : std_logic_vector (1 downto 0);
  signal n1039_o : std_logic;
  signal n1040_o : std_logic_vector (1 downto 0);
  signal n1042_o : std_logic;
  signal n1043_o : std_logic_vector (15 downto 0);
  signal n1044_o : std_logic_vector (15 downto 0);
  signal n1045_o : std_logic_vector (31 downto 0);
  signal n1046_o : std_logic;
  signal n1048_o : std_logic;
  signal n1049_o : std_logic;
  signal n1051_o : std_logic;
  signal n1052_o : std_logic;
  signal n1054_o : std_logic;
  signal n1055_o : std_logic;
  signal n1057_o : std_logic;
  signal n1062_o : std_logic;
  signal n1063_o : std_logic_vector (31 downto 0);
  signal n1064_o : std_logic_vector (3 downto 0);
  signal n1066_o : std_logic;
  signal n1067_o : std_logic_vector (31 downto 0);
  signal n1068_o : std_logic_vector (3 downto 0);
  signal n1069_o : std_logic_vector (3 downto 0);
  signal n1071_o : std_logic;
  signal n1072_o : std_logic_vector (31 downto 0);
  signal n1073_o : std_logic_vector (3 downto 0);
  signal n1074_o : std_logic_vector (3 downto 0);
  signal n1077_o : std_logic;
  signal n1078_o : std_logic;
  signal n1079_o : std_logic;
  signal n1082_o : std_logic;
  signal n1083_o : std_logic;
  signal n1085_o : std_logic;
  signal n1086_o : std_logic;
  signal n1088_o : std_logic;
  signal n1090_o : std_logic;
  signal n1091_o : std_logic;
  signal n1092_o : std_logic;
  signal n1093_o : std_logic;
  signal n1094_o : std_logic;
  signal n1095_o : std_logic;
  signal n1096_o : std_logic;
  signal n1097_o : std_logic;
  signal n1098_o : std_logic;
  signal n1099_o : std_logic;
  signal n1100_o : std_logic;
  signal n1101_o : std_logic;
  signal n1102_o : std_logic;
  signal n1103_o : std_logic;
  signal n1104_o : std_logic;
  signal n1105_o : std_logic;
  signal n1106_o : std_logic;
  signal n1107_o : std_logic;
  signal n1120_o : std_logic;
  signal n1121_o : std_logic;
  signal n1122_o : std_logic_vector (1 downto 0);
  signal n1123_o : std_logic_vector (1 downto 0);
  signal n1124_o : std_logic_vector (1 downto 0);
  signal n1125_o : std_logic;
  signal n1126_o : std_logic;
  signal n1127_o : std_logic;
  signal n1128_o : std_logic;
  signal n1129_o : std_logic;
  signal n1130_o : std_logic;
  signal n1131_o : std_logic;
  signal n1132_o : std_logic;
  signal n1133_o : std_logic;
  signal n1134_o : std_logic;
  signal n1135_o : std_logic;
  signal n1136_o : std_logic;
  signal n1137_o : std_logic;
  signal n1138_o : std_logic;
  signal n1139_o : std_logic;
  signal n1140_o : std_logic;
  signal n1141_o : std_logic;
  signal n1142_o : std_logic;
  signal n1143_o : std_logic;
  signal n1144_o : std_logic;
  signal n1145_o : std_logic;
  signal n1146_o : std_logic;
  signal n1147_o : std_logic;
  signal n1148_o : std_logic_vector (1 downto 0);
  signal n1149_o : std_logic;
  signal n1151_o : std_logic;
  signal n1152_o : std_logic;
  signal n1153_o : std_logic_vector (31 downto 0);
  signal n1154_o : std_logic;
  signal n1155_o : std_logic_vector (2 downto 0);
  signal n1156_o : std_logic;
  signal n1157_o : std_logic;
  signal n1158_o : std_logic;
  signal n1159_o : std_logic_vector (4 downto 0);
  signal n1160_o : std_logic_vector (31 downto 0);
  signal n1161_o : std_logic;
  signal n1162_o : std_logic_vector (31 downto 0);
  signal n1163_o : std_logic_vector (1 downto 0);
  signal n1164_o : std_logic_vector (1 downto 0);
  signal n1165_o : std_logic;
  signal n1166_o : std_logic;
  signal n1167_o : std_logic_vector (31 downto 0);
  signal n1168_o : std_logic;
  signal n1169_o : std_logic_vector (2 downto 0);
  signal n1170_o : std_logic;
  signal n1171_o : std_logic;
  signal n1172_o : std_logic;
  signal n1173_o : std_logic_vector (4 downto 0);
  signal n1174_o : std_logic_vector (31 downto 0);
  signal n1175_o : std_logic;
  signal n1176_o : std_logic_vector (31 downto 0);
  signal n1177_o : std_logic_vector (1 downto 0);
  signal n1178_o : std_logic_vector (1 downto 0);
  signal n1179_o : std_logic;
  signal n1194_q : std_logic;
  signal n1195_q : std_logic_vector (31 downto 0);
  signal n1196_q : std_logic;
  signal n1197_q : std_logic_vector (2 downto 0);
  signal n1198_q : std_logic;
  signal n1199_q : std_logic;
  signal n1200_q : std_logic;
  signal n1201_q : std_logic_vector (4 downto 0);
  signal n1202_q : std_logic_vector (31 downto 0);
  signal n1203_q : std_logic;
  signal n1204_q : std_logic_vector (31 downto 0);
  signal n1205_q : std_logic_vector (1 downto 0);
  signal n1206_q : std_logic_vector (1 downto 0);
  signal n1207_q : std_logic;
  signal n1209_o : std_logic;
  signal n1212_o : std_logic;
  signal n1213_o : std_logic;
begin
  x_stall_req_o <= n1213_o;
  x_fault_o <= n1194_q;
  f_branch_target_o <= n1195_q;
  f_branch_take_o <= f_branch_take;
  f_dbg_toggle_o <= n1196_q;
  w_fun_o <= n1197_q;
  w_load_o <= n1198_q;
  w_store_o <= n1199_q;
  w_valid_o <= n1200_q;
  w_rd_o <= n1201_q;
  w_rd_value_o <= n1202_q;
  w_rd_write_o <= n1203_q;
  w_dm_addr_o <= n1204_q;
  w_rd_source_o <= n1205_q;
  w_rd_shifter_o <= shifter_w_rd_o;
  w_rd_multiply_o <= n927_o;
  w_ecc_flip_o <= n1206_q;
  dm_addr_o <= dm_addr;
  dm_data_s_o <= dm_data_s;
  dm_data_select_o <= dm_select_s;
  dm_store_o <= n1107_o;
  dm_load_o <= n1100_o;
  dbg_mbx_data_o <= csr_regs_dbg_mbx_data_o;
  -- urv_exec.v:132:26
  rs1 <= rf_rs1_value_i; -- (signal)
  -- urv_exec.v:132:31
  rs2 <= rf_rs2_value_i; -- (signal)
  -- urv_exec.v:136:18
  alu_op1 <= n888_o; -- (signal)
  -- urv_exec.v:136:27
  alu_op2 <= n889_o; -- (signal)
  -- urv_exec.v:137:18
  alu_result <= n924_o; -- (signal)
  -- urv_exec.v:137:30
  rd_value <= n941_o; -- (signal)
  -- urv_exec.v:139:18
  x_exception <= n1023_o; -- (signal)
  -- urv_exec.v:140:18
  x_exception_cause <= n1024_o; -- (signal)
  -- urv_exec.v:141:18
  x_interrupt <= n1025_o; -- (signal)
  -- urv_exec.v:142:26
  branch_take <= n1093_o; -- (signal)
  -- urv_exec.v:143:26
  branch_condition_met <= n877_o; -- (signal)
  -- urv_exec.v:145:18
  branch_target <= n887_o; -- (signal)
  -- urv_exec.v:147:18
  dm_addr <= n942_o; -- (signal)
  -- urv_exec.v:148:18
  dm_data_s <= n1072_o; -- (signal)
  -- urv_exec.v:149:18
  dm_select_s <= n1074_o; -- (signal)
  -- urv_exec.v:152:26
  cmp_op1 <= n836_o; -- (signal)
  n833_o <= rs1 (31);
  -- urv_exec.v:152:59
  n835_o <= '0' when d_is_signed_alu_op_i = '0' else n833_o;
  n836_o <= n835_o & rs1;
  -- urv_exec.v:153:26
  cmp_op2 <= n840_o; -- (signal)
  n837_o <= rs2 (31);
  -- urv_exec.v:153:59
  n839_o <= '0' when d_is_signed_alu_op_i = '0' else n837_o;
  n840_o <= n839_o & rs2;
  -- urv_exec.v:154:26
  cmp_rs <= n841_o; -- (signal)
  -- urv_exec.v:154:43
  n841_o <= std_logic_vector (unsigned (cmp_op1) - unsigned (cmp_op2));
  -- urv_exec.v:155:18
  cmp_equal <= n842_o; -- (signal)
  -- urv_exec.v:155:39
  n842_o <= '1' when cmp_op1 = cmp_op2 else '0';
  -- urv_exec.v:156:18
  cmp_lt <= n843_o; -- (signal)
  n843_o <= cmp_rs (32);
  -- urv_exec.v:158:26
  f_branch_take <= n1207_q; -- (signal)
  -- urv_exec.v:160:26
  rd_csr <= csr_regs_x_rd_o; -- (signal)
  -- urv_exec.v:161:26
  rd_mulh <= (31 downto 0 => 'X'); -- (signal)
  -- urv_exec.v:163:26
  csr_mie <= exception_unit_csr_mie_o; -- (signal)
  -- urv_exec.v:163:35
  csr_mip <= exception_unit_csr_mip_o; -- (signal)
  -- urv_exec.v:163:44
  csr_mepc <= exception_unit_csr_mepc_o; -- (signal)
  -- urv_exec.v:163:54
  csr_mstatus <= exception_unit_csr_mstatus_o; -- (signal)
  -- urv_exec.v:163:66
  csr_mcause <= exception_unit_csr_mcause_o; -- (signal)
  -- urv_exec.v:164:26
  csr_write_value <= csr_regs_x_csr_write_value_o; -- (signal)
  -- urv_exec.v:165:18
  exception_address <= exception_unit_x_exception_pc_o; -- (signal)
  -- urv_exec.v:166:18
  exception_pc <= d_pc_i; -- (signal)
  -- urv_exec.v:167:18
  irq_pending <= exception_unit_exp_ei_pending_o; -- (signal)
  -- urv_exec.v:168:18
  timer_pending <= exception_unit_exp_ti_pending_o; -- (signal)
  -- urv_exec.v:267:16
  alu_addsub_op1 <= n847_o; -- (signal)
  n844_o <= alu_op1 (31);
  -- urv_exec.v:267:55
  n846_o <= '0' when d_is_signed_alu_op_i = '0' else n844_o;
  n847_o <= n846_o & alu_op1;
  -- urv_exec.v:268:16
  alu_addsub_op2 <= n851_o; -- (signal)
  n848_o <= alu_op2 (31);
  -- urv_exec.v:268:55
  n850_o <= '0' when d_is_signed_alu_op_i = '0' else n848_o;
  n851_o <= n850_o & alu_op2;
  -- urv_exec.v:271:17
  alu_add <= n852_o; -- (signal)
  -- urv_exec.v:271:42
  n852_o <= std_logic_vector (unsigned (alu_addsub_op1) + unsigned (alu_addsub_op2));
  -- urv_exec.v:272:25
  alu_sub <= n853_o; -- (signal)
  -- urv_exec.v:272:50
  n853_o <= std_logic_vector (unsigned (alu_addsub_op1) - unsigned (alu_addsub_op2));
  -- urv_exec.v:305:9
  divider_stall_req <= '0'; -- (signal)
  -- urv_exec.v:306:9
  multiply_stall_req <= '0'; -- (signal)
  -- urv_exec.v:335:16
  rd_divide <= (31 downto 0 => 'X'); -- (signal)
  -- urv_exec.v:373:8
  unaligned_addr <= n963_o; -- (signal)
  -- urv_exec.v:174:6
  csr_regs : entity work.urv_csr port map (
    clk_i => clk_i,
    rst_i => rst_i,
    x_stall_i => x_stall_i,
    x_kill_i => x_kill_i,
    d_is_csr_i => d_is_csr_i,
    d_fun_i => d_fun_i,
    d_csr_imm_i => d_csr_imm_i,
    d_csr_sel_i => d_csr_sel_i,
    d_rs1_i => rs1,
    csr_time_i => csr_time_i,
    csr_cycles_i => csr_cycles_i,
    csr_mstatus_i => csr_mstatus,
    csr_mip_i => csr_mip,
    csr_mie_i => csr_mie,
    csr_mepc_i => csr_mepc,
    csr_mcause_i => csr_mcause,
    dbg_mbx_data_i => dbg_mbx_data_i,
    dbg_mbx_write_i => dbg_mbx_write_i,
    x_rd_o => csr_regs_x_rd_o,
    x_csr_write_value_o => csr_regs_x_csr_write_value_o,
    dbg_mbx_data_o => csr_regs_dbg_mbx_data_o);
  -- urv_exec.v:207:19
  exception_unit : entity work.urv_exceptions port map (
    clk_i => clk_i,
    rst_i => rst_i,
    x_stall_i => x_stall_i,
    x_kill_i => x_kill_i,
    d_is_csr_i => d_is_csr_i,
    d_is_mret_i => d_is_mret_i,
    d_csr_imm_i => d_csr_imm_i,
    d_csr_sel_i => d_csr_sel_i,
    exp_irq_i => irq_i,
    exp_tick_i => timer_tick_i,
    x_csr_write_value_i => csr_write_value,
    x_exception_i => x_exception,
    x_exception_cause_i => x_exception_cause,
    x_interrupt_i => x_interrupt,
    x_exception_pc_i => exception_pc,
    exp_ei_pending_o => exception_unit_exp_ei_pending_o,
    exp_ti_pending_o => exception_unit_exp_ti_pending_o,
    x_exception_pc_o => exception_unit_x_exception_pc_o,
    csr_mstatus_o => exception_unit_csr_mstatus_o,
    csr_mip_o => exception_unit_csr_mip_o,
    csr_mie_o => exception_unit_csr_mie_o,
    csr_mepc_o => exception_unit_csr_mepc_o,
    csr_mcause_o => exception_unit_csr_mcause_o);
  -- urv_exec.v:243:42
  n854_o <= not cmp_equal;
  -- urv_exec.v:244:42
  n855_o <= not cmp_lt;
  -- urv_exec.v:244:50
  n856_o <= n855_o or cmp_equal;
  -- urv_exec.v:246:42
  n857_o <= not cmp_lt;
  -- urv_exec.v:246:50
  n858_o <= n857_o or cmp_equal;
  -- urv_defs.v:47:17
  n861_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:47:17
  n862_o <= '0' when n861_o = '0' else cmp_lt;
  -- urv_defs.v:48:17
  n864_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:48:17
  n865_o <= n862_o when n864_o = '0' else n858_o;
  -- urv_defs.v:45:16
  n867_o <= '1' when std_logic_vector'("100") = d_fun_i else '0';
  -- urv_defs.v:45:16
  n868_o <= n865_o when n867_o = '0' else cmp_lt;
  -- urv_defs.v:46:16
  n870_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:46:16
  n871_o <= n868_o when n870_o = '0' else n856_o;
  -- urv_defs.v:44:18
  n873_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:44:18
  n874_o <= n871_o when n873_o = '0' else n854_o;
  -- urv_defs.v:43:16
  n876_o <= '1' when std_logic_vector'("000") = d_fun_i else '0';
  -- urv_defs.v:43:16
  n877_o <= n874_o when n876_o = '0' else cmp_equal;
  -- urv_exec.v:257:29
  n880_o <= d_is_ebreak_i and '0';
  -- urv_exec.v:260:47
  n882_o <= '1' when d_opcode_i = "11001" else '0';
  -- urv_exec.v:260:60
  n883_o <= d_pc_i when n882_o = '0' else rs1;
  -- urv_exec.v:260:33
  n884_o <= std_logic_vector (unsigned (d_imm_i) + unsigned (n883_o));
  -- urv_exec.v:257:11
  n885_o <= n884_o when n880_o = '0' else d_pc_i;
  -- urv_exec.v:255:11
  n886_o <= n885_o when x_exception = '0' else "00000000000000000000000000001000";
  -- urv_exec.v:253:6
  n887_o <= n886_o when d_is_mret_i = '0' else exception_address;
  -- urv_exec.v:263:33
  n888_o <= rs1 when d_use_op1_i = '0' else d_alu_op1_i;
  -- urv_exec.v:264:33
  n889_o <= rs2 when d_use_op2_i = '0' else d_alu_op2_i;
  n890_o <= alu_add (31 downto 0);
  n891_o <= alu_sub (31 downto 0);
  -- urv_exec.v:278:47
  n892_o <= n891_o when d_is_add_i = '0' else n890_o;
  -- urv_exec.v:279:44
  n893_o <= alu_op1 xor alu_op2;
  -- urv_exec.v:280:44
  n894_o <= alu_op1 or alu_op2;
  -- urv_exec.v:281:44
  n895_o <= alu_op1 and alu_op2;
  -- urv_exec.v:282:53
  n896_o <= alu_op1 when rf_rs1_ecc_err_i = '0' else alu_op2;
  n897_o <= alu_sub (32);
  n899_o <= "0000000000000000000000000000000" & n897_o;
  -- urv_defs.v:59:18
  n902_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:60:19
  n904_o <= '1' when std_logic_vector'("011") = d_fun_i else '0';
  -- urv_defs.v:60:19
  n905_o <= n902_o or n904_o;
  -- urv_defs.v:59:18
  n906_o <= (31 downto 0 => 'X') when n905_o = '0' else n899_o;
  -- urv_defs.v:64:17
  n908_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:64:17
  n909_o <= n906_o when n908_o = '0' else alu_op1;
  -- urv_defs.v:65:17
  n911_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:65:17
  n912_o <= n909_o when n911_o = '0' else n896_o;
  -- urv_defs.v:63:18
  n914_o <= '1' when std_logic_vector'("111") = d_fun_i else '0';
  -- urv_defs.v:63:18
  n915_o <= n912_o when n914_o = '0' else n895_o;
  -- urv_defs.v:62:17
  n917_o <= '1' when std_logic_vector'("110") = d_fun_i else '0';
  -- urv_defs.v:62:17
  n918_o <= n915_o when n917_o = '0' else n894_o;
  -- urv_defs.v:61:18
  n920_o <= '1' when std_logic_vector'("100") = d_fun_i else '0';
  -- urv_defs.v:61:18
  n921_o <= n918_o when n920_o = '0' else n893_o;
  -- urv_defs.v:58:18
  n923_o <= '1' when std_logic_vector'("000") = d_fun_i else '0';
  -- urv_defs.v:58:18
  n924_o <= n921_o when n923_o = '0' else n892_o;
  -- urv_exec.v:290:16
  shifter : entity work.urv_shifter port map (
    clk_i => clk_i,
    rst_i => rst_i,
    x_stall_i => x_stall_i,
    d_valid_i => d_valid_i,
    d_rs1_i => rs1,
    d_shamt_i => n925_o,
    d_fun_i => d_fun_i,
    d_shifter_sign_i => d_shifter_sign_i,
    w_rd_o => shifter_w_rd_o);
  n925_o <= alu_op2 (4 downto 0);
  -- urv_defs.v:100:24
  n931_o <= '1' when std_logic_vector'("111") = d_rd_source_i else '0';
  -- urv_defs.v:100:24
  n932_o <= (31 downto 0 => 'X') when n931_o = '0' else rd_mulh;
  -- urv_defs.v:98:26
  n934_o <= '1' when std_logic_vector'("100") = d_rd_source_i else '0';
  -- urv_defs.v:98:26
  n935_o <= n932_o when n934_o = '0' else rd_divide;
  -- urv_defs.v:99:23
  n937_o <= '1' when std_logic_vector'("011") = d_rd_source_i else '0';
  -- urv_defs.v:99:23
  n938_o <= n935_o when n937_o = '0' else rd_csr;
  -- urv_defs.v:95:23
  n940_o <= '1' when std_logic_vector'("000") = d_rd_source_i else '0';
  -- urv_defs.v:95:23
  n941_o <= n938_o when n940_o = '0' else alu_result;
  -- urv_exec.v:371:29
  n942_o <= std_logic_vector (unsigned (d_imm_i) + unsigned (rs1));
  n944_o <= dm_addr (0);
  n945_o <= dm_addr (1 downto 0);
  -- urv_exec.v:386:42
  n947_o <= '1' when n945_o /= "00" else '0';
  -- urv_defs.v:53:16
  n950_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:53:16
  n951_o <= '0' when n950_o = '0' else n947_o;
  -- urv_defs.v:52:16
  n953_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:55:17
  n955_o <= '1' when std_logic_vector'("101") = d_fun_i else '0';
  -- urv_defs.v:55:17
  n956_o <= n953_o or n955_o;
  -- urv_defs.v:52:16
  n957_o <= n951_o when n956_o = '0' else n944_o;
  -- urv_defs.v:51:16
  n959_o <= '1' when std_logic_vector'("000") = d_fun_i else '0';
  -- urv_defs.v:54:25
  n961_o <= '1' when std_logic_vector'("100") = d_fun_i else '0';
  -- urv_defs.v:54:25
  n962_o <= n959_o or n961_o;
  -- urv_defs.v:51:16
  n963_o <= n957_o when n962_o = '0' else '0';
  -- urv_exec.v:398:23
  n967_o <= x_stall_i or x_kill_i;
  -- urv_exec.v:398:38
  n968_o <= not d_valid_i;
  -- urv_exec.v:398:35
  n969_o <= n967_o or n968_o;
  -- urv_exec.v:408:18
  n973_o <= not d_is_fix_ecc_i;
  -- urv_exec.v:409:35
  n974_o <= d_use_rs1_i and rf_rs1_ecc_err_i;
  -- urv_exec.v:410:38
  n975_o <= d_use_rs2_i and rf_rs2_ecc_err_i;
  -- urv_exec.v:410:22
  n976_o <= n974_o or n975_o;
  -- urv_exec.v:409:18
  n977_o <= n973_o and n976_o;
  -- urv_exec.v:418:33
  n982_o <= '1' when d_opcode_i = "00000" else '0';
  -- urv_exec.v:418:60
  n984_o <= '1' when d_opcode_i = "01000" else '0';
  -- urv_exec.v:418:46
  n985_o <= n982_o or n984_o;
  -- urv_exec.v:418:18
  n986_o <= unaligned_addr and n985_o;
  -- urv_defs.v:33:20
  n993_o <= '1' when std_logic_vector'("01000") = d_opcode_i else '0';
  -- urv_defs.v:33:20
  n994_o <= "XXXX" when n993_o = '0' else "0110";
  -- urv_defs.v:30:20
  n996_o <= '1' when std_logic_vector'("00000") = d_opcode_i else '0';
  -- urv_defs.v:30:20
  n997_o <= n994_o when n996_o = '0' else "0100";
  -- urv_exec.v:431:35
  n998_o <= not d_dbg_mode_i;
  -- urv_exec.v:431:32
  n999_o <= timer_pending and n998_o;
  -- urv_exec.v:437:33
  n1003_o <= not d_dbg_mode_i;
  -- urv_exec.v:437:30
  n1004_o <= irq_pending and n1003_o;
  -- urv_exec.v:437:14
  n1008_o <= '0' when n1004_o = '0' else '1';
  -- urv_exec.v:437:14
  n1009_o <= "XXXX" when n1004_o = '0' else "1011";
  -- urv_exec.v:437:14
  n1010_o <= '0' when n1004_o = '0' else '1';
  -- urv_exec.v:431:14
  n1011_o <= n1008_o when n999_o = '0' else '1';
  -- urv_exec.v:431:14
  n1012_o <= n1009_o when n999_o = '0' else "0111";
  -- urv_exec.v:431:14
  n1013_o <= n1010_o when n999_o = '0' else '1';
  -- urv_exec.v:417:14
  n1014_o <= n1011_o when n986_o = '0' else '1';
  -- urv_exec.v:417:14
  n1015_o <= n1012_o when n986_o = '0' else n997_o;
  -- urv_exec.v:417:14
  n1016_o <= n1013_o when n986_o = '0' else '0';
  -- urv_exec.v:408:14
  n1017_o <= n1014_o when n977_o = '0' else '1';
  -- urv_exec.v:408:14
  n1018_o <= n1015_o when n977_o = '0' else "1111";
  -- urv_exec.v:408:14
  n1019_o <= n1016_o when n977_o = '0' else '0';
  -- urv_exec.v:402:14
  n1020_o <= n1017_o when d_is_undef_i = '0' else '1';
  -- urv_exec.v:402:14
  n1021_o <= n1018_o when d_is_undef_i = '0' else "0010";
  -- urv_exec.v:402:14
  n1022_o <= n1019_o when d_is_undef_i = '0' else '0';
  -- urv_exec.v:398:9
  n1023_o <= n1020_o when n969_o = '0' else '0';
  -- urv_exec.v:398:9
  n1024_o <= n1021_o when n969_o = '0' else "XXXX";
  -- urv_exec.v:398:9
  n1025_o <= n1022_o when n969_o = '0' else '0';
  n1026_o <= rs2 (7 downto 0);
  n1027_o <= rs2 (7 downto 0);
  n1028_o <= rs2 (7 downto 0);
  n1029_o <= rs2 (7 downto 0);
  n1030_o <= n1026_o & n1027_o & n1028_o & n1029_o;
  n1031_o <= dm_addr (1 downto 0);
  -- urv_exec.v:452:49
  n1033_o <= '1' when n1031_o = "00" else '0';
  n1034_o <= dm_addr (1 downto 0);
  -- urv_exec.v:453:49
  n1036_o <= '1' when n1034_o = "01" else '0';
  n1037_o <= dm_addr (1 downto 0);
  -- urv_exec.v:454:49
  n1039_o <= '1' when n1037_o = "10" else '0';
  n1040_o <= dm_addr (1 downto 0);
  -- urv_exec.v:455:49
  n1042_o <= '1' when n1040_o = "11" else '0';
  n1043_o <= rs2 (15 downto 0);
  n1044_o <= rs2 (15 downto 0);
  n1045_o <= n1043_o & n1044_o;
  n1046_o <= dm_addr (1);
  -- urv_exec.v:461:47
  n1048_o <= '1' when n1046_o = '0' else '0';
  n1049_o <= dm_addr (1);
  -- urv_exec.v:462:47
  n1051_o <= '1' when n1049_o = '0' else '0';
  n1052_o <= dm_addr (1);
  -- urv_exec.v:463:47
  n1054_o <= '1' when n1052_o = '1' else '0';
  n1055_o <= dm_addr (1);
  -- urv_exec.v:464:47
  n1057_o <= '1' when n1055_o = '1' else '0';
  -- urv_defs.v:53:16
  n1062_o <= '1' when std_logic_vector'("010") = d_fun_i else '0';
  -- urv_defs.v:53:16
  n1063_o <= (31 downto 0 => 'X') when n1062_o = '0' else rs2;
  -- urv_defs.v:53:16
  n1064_o <= "XXXX" when n1062_o = '0' else "1111";
  -- urv_defs.v:52:16
  n1066_o <= '1' when std_logic_vector'("001") = d_fun_i else '0';
  -- urv_defs.v:52:16
  n1067_o <= n1063_o when n1066_o = '0' else n1045_o;
  n1068_o <= n1057_o & n1054_o & n1051_o & n1048_o;
  -- urv_defs.v:52:16
  n1069_o <= n1064_o when n1066_o = '0' else n1068_o;
  -- urv_defs.v:51:16
  n1071_o <= '1' when std_logic_vector'("000") = d_fun_i else '0';
  -- urv_defs.v:51:16
  n1072_o <= n1067_o when n1071_o = '0' else n1030_o;
  n1073_o <= n1042_o & n1039_o & n1036_o & n1033_o;
  -- urv_defs.v:51:16
  n1074_o <= n1069_o when n1071_o = '0' else n1073_o;
  -- urv_exec.v:492:79
  n1077_o <= not d_dbg_mode_i;
  -- urv_exec.v:492:76
  n1078_o <= d_is_ebreak_i and n1077_o;
  -- urv_exec.v:492:39
  n1079_o <= d_is_mret_i or n1078_o;
  -- urv_defs.v:40:20
  n1082_o <= '1' when std_logic_vector'("11100") = d_opcode_i else '0';
  -- urv_defs.v:40:20
  n1083_o <= '0' when n1082_o = '0' else n1079_o;
  -- urv_defs.v:37:20
  n1085_o <= '1' when std_logic_vector'("11000") = d_opcode_i else '0';
  -- urv_defs.v:37:20
  n1086_o <= n1083_o when n1085_o = '0' else branch_condition_met;
  -- urv_defs.v:39:20
  n1088_o <= '1' when std_logic_vector'("11011") = d_opcode_i else '0';
  -- urv_defs.v:38:20
  n1090_o <= '1' when std_logic_vector'("11001") = d_opcode_i else '0';
  -- urv_defs.v:38:20
  n1091_o <= n1088_o or n1090_o;
  -- urv_defs.v:39:20
  n1092_o <= n1086_o when n1091_o = '0' else '1';
  -- urv_exec.v:483:6
  n1093_o <= n1092_o when x_exception = '0' else '1';
  -- urv_exec.v:504:36
  n1094_o <= d_is_load_i and d_valid_i;
  -- urv_exec.v:504:50
  n1095_o <= not x_kill_i;
  -- urv_exec.v:504:48
  n1096_o <= n1094_o and n1095_o;
  -- urv_exec.v:504:62
  n1097_o <= not x_stall_i;
  -- urv_exec.v:504:60
  n1098_o <= n1096_o and n1097_o;
  -- urv_exec.v:504:75
  n1099_o <= not x_exception;
  -- urv_exec.v:504:73
  n1100_o <= n1098_o and n1099_o;
  -- urv_exec.v:505:37
  n1101_o <= d_is_store_i and d_valid_i;
  -- urv_exec.v:505:51
  n1102_o <= not x_kill_i;
  -- urv_exec.v:505:49
  n1103_o <= n1101_o and n1102_o;
  -- urv_exec.v:505:63
  n1104_o <= not x_stall_i;
  -- urv_exec.v:505:61
  n1105_o <= n1103_o and n1104_o;
  -- urv_exec.v:505:76
  n1106_o <= not x_exception;
  -- urv_exec.v:505:74
  n1107_o <= n1105_o and n1106_o;
  -- urv_exec.v:527:15
  n1120_o <= not x_stall_i;
  -- urv_exec.v:530:29
  n1121_o <= not x_exception;
  n1122_o <= d_is_write_ecc_i & d_is_write_ecc_i;
  n1123_o <= rs2 (1 downto 0);
  -- urv_exec.v:535:54
  n1124_o <= n1122_o and n1123_o;
  -- urv_exec.v:536:44
  n1125_o <= d_is_fix_ecc_i and rf_rs1_ecc_err_i;
  -- urv_exec.v:536:63
  n1126_o <= n1125_o and rf_rs2_ecc_err_i;
  -- urv_exec.v:538:48
  n1127_o <= not x_kill_i;
  -- urv_exec.v:538:45
  n1128_o <= branch_take and n1127_o;
  -- urv_exec.v:538:58
  n1129_o <= n1128_o and d_valid_i;
  -- urv_exec.v:539:70
  n1130_o <= not x_kill_i;
  -- urv_exec.v:539:67
  n1131_o <= d_is_ebreak_i and n1130_o;
  -- urv_exec.v:539:80
  n1132_o <= n1131_o and d_valid_i;
  -- urv_exec.v:540:48
  n1133_o <= not x_kill_i;
  -- urv_exec.v:540:45
  n1134_o <= d_rd_write_i and n1133_o;
  -- urv_exec.v:540:58
  n1135_o <= n1134_o and d_valid_i;
  -- urv_exec.v:540:74
  n1136_o <= not x_exception;
  -- urv_exec.v:540:71
  n1137_o <= n1135_o and n1136_o;
  -- urv_exec.v:541:43
  n1138_o <= not x_kill_i;
  -- urv_exec.v:541:40
  n1139_o <= d_is_load_i and n1138_o;
  -- urv_exec.v:541:53
  n1140_o <= n1139_o and d_valid_i;
  -- urv_exec.v:541:69
  n1141_o <= not x_exception;
  -- urv_exec.v:541:66
  n1142_o <= n1140_o and n1141_o;
  -- urv_exec.v:542:45
  n1143_o <= not x_kill_i;
  -- urv_exec.v:542:42
  n1144_o <= d_is_store_i and n1143_o;
  -- urv_exec.v:542:55
  n1145_o <= n1144_o and d_valid_i;
  -- urv_exec.v:542:71
  n1146_o <= not x_exception;
  -- urv_exec.v:542:68
  n1147_o <= n1145_o and n1146_o;
  -- urv_exec.v:544:33
  n1148_o <= d_rd_source_i (1 downto 0);  --  trunc
  -- urv_exec.v:548:36
  n1149_o <= divider_stall_req or multiply_stall_req;
  -- urv_exec.v:548:14
  n1151_o <= n1200_q when n1149_o = '0' else '0';
  -- urv_exec.v:527:11
  n1152_o <= n1194_q when n1120_o = '0' else n1126_o;
  -- urv_exec.v:527:11
  n1153_o <= n1195_q when n1120_o = '0' else branch_target;
  -- urv_exec.v:527:11
  n1154_o <= n1196_q when n1120_o = '0' else n1132_o;
  -- urv_exec.v:527:11
  n1155_o <= n1197_q when n1120_o = '0' else d_fun_i;
  -- urv_exec.v:527:11
  n1156_o <= n1198_q when n1120_o = '0' else n1142_o;
  -- urv_exec.v:527:11
  n1157_o <= n1199_q when n1120_o = '0' else n1147_o;
  -- urv_exec.v:527:11
  n1158_o <= n1151_o when n1120_o = '0' else n1121_o;
  -- urv_exec.v:527:11
  n1159_o <= n1201_q when n1120_o = '0' else d_rd_i;
  -- urv_exec.v:527:11
  n1160_o <= n1202_q when n1120_o = '0' else rd_value;
  -- urv_exec.v:527:11
  n1161_o <= n1203_q when n1120_o = '0' else n1137_o;
  -- urv_exec.v:527:11
  n1162_o <= n1204_q when n1120_o = '0' else dm_addr;
  -- urv_exec.v:527:11
  n1163_o <= n1205_q when n1120_o = '0' else n1148_o;
  -- urv_exec.v:527:11
  n1164_o <= n1206_q when n1120_o = '0' else n1124_o;
  -- urv_exec.v:527:11
  n1165_o <= f_branch_take when n1120_o = '0' else n1129_o;
  -- urv_exec.v:510:6
  n1166_o <= n1152_o when rst_i = '0' else '0';
  -- urv_exec.v:510:6
  n1167_o <= n1153_o when rst_i = '0' else n1195_q;
  -- urv_exec.v:510:6
  n1168_o <= n1154_o when rst_i = '0' else '0';
  -- urv_exec.v:510:6
  n1169_o <= n1155_o when rst_i = '0' else n1197_q;
  -- urv_exec.v:510:6
  n1170_o <= n1156_o when rst_i = '0' else '0';
  -- urv_exec.v:510:6
  n1171_o <= n1157_o when rst_i = '0' else '0';
  -- urv_exec.v:510:6
  n1172_o <= n1158_o when rst_i = '0' else '1';
  -- urv_exec.v:510:6
  n1173_o <= n1159_o when rst_i = '0' else "00000";
  -- urv_exec.v:510:6
  n1174_o <= n1160_o when rst_i = '0' else "00000000000000000000000000000000";
  -- urv_exec.v:510:6
  n1175_o <= n1161_o when rst_i = '0' else '1';
  -- urv_exec.v:510:6
  n1176_o <= n1162_o when rst_i = '0' else n1204_q;
  -- urv_exec.v:510:6
  n1177_o <= n1163_o when rst_i = '0' else "00";
  -- urv_exec.v:510:6
  n1178_o <= n1164_o when rst_i = '0' else "00";
  -- urv_exec.v:510:6
  n1179_o <= n1165_o when rst_i = '0' else '0';
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1194_q <= n1166_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1195_q <= n1167_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1196_q <= n1168_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1197_q <= n1169_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1198_q <= n1170_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1199_q <= n1171_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1200_q <= n1172_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1201_q <= n1173_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1202_q <= n1174_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1203_q <= n1175_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1204_q <= n1176_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1205_q <= n1177_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1206_q <= n1178_o;
    end if;
  end process;
  -- urv_exec.v:509:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n1207_q <= n1179_o;
    end if;
  end process;
  -- urv_exec.v:564:32
  n1209_o <= divider_stall_req or multiply_stall_req;
  -- urv_exec.v:564:11
  n1212_o <= '0' when n1209_o = '0' else '1';
  -- urv_exec.v:562:6
  n1213_o <= n1212_o when f_branch_take = '0' else '0';
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_regfile is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    d_stall_i : in std_logic;
    rf_rs1_i : in std_logic_vector (4 downto 0);
    rf_rs2_i : in std_logic_vector (4 downto 0);
    d_rs1_i : in std_logic_vector (4 downto 0);
    d_rs2_i : in std_logic_vector (4 downto 0);
    w_rd_i : in std_logic_vector (4 downto 0);
    w_rd_value_i : in std_logic_vector (31 downto 0);
    w_rd_ecc_i : in std_logic_vector (6 downto 0);
    w_rd_ecc_flip_i : in std_logic_vector (1 downto 0);
    w_rd_store_i : in std_logic;
    w_bypass_rd_write_i : in std_logic;
    w_bypass_rd_value_i : in std_logic_vector (31 downto 0);
    x_rs1_value_o : out std_logic_vector (31 downto 0);
    x_rs2_value_o : out std_logic_vector (31 downto 0);
    x_rs1_ecc_err_o : out std_logic;
    x_rs2_ecc_err_o : out std_logic);
end entity urv_regfile;

architecture rtl of urv_regfile is
  signal w_rd_value_1 : std_logic_vector (31 downto 0);
  signal w_rd_value_2 : std_logic_vector (31 downto 0);
  signal rs1_regfile : std_logic_vector (31 downto 0);
  signal rs2_regfile : std_logic_vector (31 downto 0);
  signal write : std_logic;
  signal rs1_ecc_err : std_logic;
  signal rs2_ecc_err : std_logic;
  signal rs1_bypass_x : std_logic;
  signal n744_o : std_logic;
  signal n745_o : std_logic;
  signal n746_o : std_logic_vector (31 downto 0);
  signal n748_o : std_logic;
  signal n749_o : std_logic;
  signal rs2_bypass_x : std_logic;
  signal n750_o : std_logic;
  signal n751_o : std_logic;
  signal n752_o : std_logic_vector (31 downto 0);
  signal n754_o : std_logic;
  signal n755_o : std_logic;
  signal rs1_bypass_w : std_logic;
  signal rs2_bypass_w : std_logic;
  signal bypass_w : std_logic_vector (31 downto 0);
  signal bank1_q1_o : std_logic_vector (31 downto 0);
  signal n756_o : std_logic;
  signal bank2_q1_o : std_logic_vector (31 downto 0);
  signal n757_o : std_logic;
  signal n763_o : std_logic;
  signal n764_o : std_logic;
  signal n765_o : std_logic;
  signal n766_o : std_logic;
  signal n767_o : std_logic;
  signal n768_o : std_logic;
  signal n769_o : std_logic;
  signal n770_o : std_logic;
  signal n771_o : std_logic;
  signal n774_q : std_logic;
  signal n775_q : std_logic;
  signal n779_o : std_logic_vector (31 downto 0);
  signal n780_q : std_logic_vector (31 downto 0);
  signal n781_o : std_logic_vector (1 downto 0);
  signal n785_o : std_logic;
  signal n786_o : std_logic_vector (31 downto 0);
  signal n787_o : std_logic;
  signal n789_o : std_logic;
  signal n791_o : std_logic;
  signal n792_o : std_logic;
  signal n793_o : std_logic_vector (31 downto 0);
  signal n794_o : std_logic;
  signal n795_o : std_logic_vector (1 downto 0);
  signal n799_o : std_logic;
  signal n800_o : std_logic_vector (31 downto 0);
  signal n801_o : std_logic;
  signal n803_o : std_logic;
  signal n805_o : std_logic;
  signal n806_o : std_logic;
  signal n807_o : std_logic_vector (31 downto 0);
  signal n808_o : std_logic;
begin
  x_rs1_value_o <= n793_o;
  x_rs2_value_o <= n807_o;
  x_rs1_ecc_err_o <= n794_o;
  x_rs2_ecc_err_o <= n808_o;
  -- urv_regfile.v:102:23
  w_rd_value_1 <= w_rd_value_i; -- (signal)
  -- urv_regfile.v:103:23
  w_rd_value_2 <= w_rd_value_i; -- (signal)
  -- urv_regfile.v:104:23
  rs1_regfile <= bank1_q1_o; -- (signal)
  -- urv_regfile.v:105:23
  rs2_regfile <= bank2_q1_o; -- (signal)
  -- urv_regfile.v:106:16
  write <= w_rd_store_i; -- (signal)
  -- urv_regfile.v:108:16
  rs1_ecc_err <= '0'; -- (signal)
  -- urv_regfile.v:109:16
  rs2_ecc_err <= '0'; -- (signal)
  -- urv_regfile.v:172:10
  rs1_bypass_x <= n749_o; -- (signal)
  -- urv_regfile.v:172:56
  n744_o <= '1' when w_rd_i = d_rs1_i else '0';
  -- urv_regfile.v:172:45
  n745_o <= w_bypass_rd_write_i and n744_o;
  -- urv_regfile.v:172:72
  n746_o <= "000000000000000000000000000" & w_rd_i;  --  uext
  -- urv_regfile.v:172:79
  n748_o <= '1' when n746_o /= "00000000000000000000000000000000" else '0';
  -- urv_regfile.v:172:68
  n749_o <= n745_o and n748_o;
  -- urv_regfile.v:173:10
  rs2_bypass_x <= n755_o; -- (signal)
  -- urv_regfile.v:173:56
  n750_o <= '1' when w_rd_i = d_rs2_i else '0';
  -- urv_regfile.v:173:45
  n751_o <= w_bypass_rd_write_i and n750_o;
  -- urv_regfile.v:173:72
  n752_o <= "000000000000000000000000000" & w_rd_i;  --  uext
  -- urv_regfile.v:173:79
  n754_o <= '1' when n752_o /= "00000000000000000000000000000000" else '0';
  -- urv_regfile.v:173:68
  n755_o <= n751_o and n754_o;
  -- urv_regfile.v:175:10
  rs1_bypass_w <= n774_q; -- (signal)
  -- urv_regfile.v:175:24
  rs2_bypass_w <= n775_q; -- (signal)
  -- urv_regfile.v:187:19
  bypass_w <= n780_q; -- (signal)
  -- urv_regfile.v:127:4
  bank1 : entity work.urv_regmem port map (
    clk_i => clk_i,
    en1_i => n756_o,
    a1_i => rf_rs1_i,
    a2_i => w_rd_i,
    d2_i => w_rd_value_1,
    we2_i => write,
    q1_o => bank1_q1_o);
  -- urv_regfile.v:130:14
  n756_o <= not d_stall_i;
  -- urv_regfile.v:140:4
  bank2 : entity work.urv_regmem port map (
    clk_i => clk_i,
    en1_i => n757_o,
    a1_i => rf_rs2_i,
    a2_i => w_rd_i,
    d2_i => w_rd_value_2,
    we2_i => write,
    q1_o => bank2_q1_o);
  -- urv_regfile.v:143:14
  n757_o <= not d_stall_i;
  -- urv_regfile.v:182:20
  n763_o <= not d_stall_i;
  -- urv_regfile.v:183:46
  n764_o <= '1' when rf_rs1_i = w_rd_i else '0';
  -- urv_regfile.v:183:33
  n765_o <= write and n764_o;
  -- urv_regfile.v:184:46
  n766_o <= '1' when rf_rs2_i = w_rd_i else '0';
  -- urv_regfile.v:184:33
  n767_o <= write and n766_o;
  -- urv_regfile.v:182:17
  n768_o <= rs1_bypass_w when n763_o = '0' else n765_o;
  -- urv_regfile.v:182:17
  n769_o <= rs2_bypass_w when n763_o = '0' else n767_o;
  -- urv_regfile.v:178:6
  n770_o <= n768_o when rst_i = '0' else '0';
  -- urv_regfile.v:178:6
  n771_o <= n769_o when rst_i = '0' else '0';
  -- urv_regfile.v:177:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n774_q <= n770_o;
    end if;
  end process;
  -- urv_regfile.v:177:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n775_q <= n771_o;
    end if;
  end process;
  -- urv_regfile.v:189:4
  n779_o <= bypass_w when write = '0' else w_rd_value_i;
  -- urv_regfile.v:189:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n780_q <= n779_o;
    end if;
  end process;
  -- urv_regfile.v:189:4
  n781_o <= rs1_bypass_x & rs1_bypass_w;
  -- urv_regfile.v:200:11
  n785_o <= '1' when std_logic_vector'("01") = n781_o else '0';
  -- urv_regfile.v:200:11
  n786_o <= rs1_regfile when n785_o = '0' else bypass_w;
  -- urv_regfile.v:200:11
  n787_o <= rs1_ecc_err when n785_o = '0' else '0';
  -- urv_regfile.v:195:91
  n789_o <= '1' when std_logic_vector'("10") = n781_o else '0';
  -- urv_regfile.v:195:98
  n791_o <= '1' when std_logic_vector'("11") = n781_o else '0';
  -- urv_regfile.v:195:98
  n792_o <= n789_o or n791_o;
  -- urv_regfile.v:195:91
  n793_o <= n786_o when n792_o = '0' else w_bypass_rd_value_i;
  -- urv_regfile.v:195:91
  n794_o <= n787_o when n792_o = '0' else '0';
  n795_o <= rs2_bypass_x & rs2_bypass_w;
  -- urv_regfile.v:217:11
  n799_o <= '1' when std_logic_vector'("01") = n795_o else '0';
  -- urv_regfile.v:217:11
  n800_o <= rs2_regfile when n799_o = '0' else bypass_w;
  -- urv_regfile.v:217:11
  n801_o <= rs2_ecc_err when n799_o = '0' else '0';
  -- urv_regfile.v:212:91
  n803_o <= '1' when std_logic_vector'("10") = n795_o else '0';
  -- urv_regfile.v:212:98
  n805_o <= '1' when std_logic_vector'("11") = n795_o else '0';
  -- urv_regfile.v:212:98
  n806_o <= n803_o or n805_o;
  -- urv_regfile.v:212:91
  n807_o <= n800_o when n806_o = '0' else w_bypass_rd_value_i;
  -- urv_regfile.v:212:91
  n808_o <= n801_o when n806_o = '0' else '0';
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_decode is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    d_stall_i : in std_logic;
    d_kill_i : in std_logic;
    f_ir_i : in std_logic_vector (31 downto 0);
    f_pc_i : in std_logic_vector (31 downto 0);
    f_valid_i : in std_logic;
    d_stall_req_o : out std_logic;
    rf_rs1_o : out std_logic_vector (4 downto 0);
    rf_rs2_o : out std_logic_vector (4 downto 0);
    x_valid_o : out std_logic;
    x_pc_o : out std_logic_vector (31 downto 0);
    x_rs1_o : out std_logic_vector (4 downto 0);
    x_rs2_o : out std_logic_vector (4 downto 0);
    x_rd_o : out std_logic_vector (4 downto 0);
    x_fun_o : out std_logic_vector (2 downto 0);
    x_opcode_o : out std_logic_vector (4 downto 0);
    x_shifter_sign_o : out std_logic;
    x_is_signed_alu_op_o : out std_logic;
    x_is_add_o : out std_logic;
    x_is_load_o : out std_logic;
    x_is_store_o : out std_logic;
    x_is_undef_o : out std_logic;
    x_is_write_ecc_o : out std_logic;
    x_is_fix_ecc_o : out std_logic;
    x_rd_source_o : out std_logic_vector (2 downto 0);
    x_rd_write_o : out std_logic;
    x_csr_sel_o : out std_logic_vector (11 downto 0);
    x_csr_imm_o : out std_logic_vector (4 downto 0);
    x_is_csr_o : out std_logic;
    x_is_mret_o : out std_logic;
    x_is_ebreak_o : out std_logic;
    x_imm_o : out std_logic_vector (31 downto 0);
    x_alu_op1_o : out std_logic_vector (31 downto 0);
    x_alu_op2_o : out std_logic_vector (31 downto 0);
    x_use_op1_o : out std_logic;
    x_use_op2_o : out std_logic;
    x_use_rs1_o : out std_logic;
    x_use_rs2_o : out std_logic;
    x_is_divide_o : out std_logic;
    x_is_multiply_o : out std_logic);
end entity urv_decode;

architecture rtl of urv_decode is
  signal f_rs1 : std_logic_vector (4 downto 0);
  signal n197_o : std_logic_vector (4 downto 0);
  signal f_rs2 : std_logic_vector (4 downto 0);
  signal n198_o : std_logic_vector (4 downto 0);
  signal f_rd : std_logic_vector (4 downto 0);
  signal n199_o : std_logic_vector (4 downto 0);
  signal d_opcode : std_logic_vector (4 downto 0);
  signal n200_o : std_logic_vector (4 downto 0);
  signal d_fun : std_logic_vector (2 downto 0);
  signal n201_o : std_logic_vector (2 downto 0);
  signal x_rs1 : std_logic_vector (4 downto 0);
  signal x_rs2 : std_logic_vector (4 downto 0);
  signal x_rd : std_logic_vector (4 downto 0);
  signal x_opcode : std_logic_vector (4 downto 0);
  signal x_valid : std_logic;
  signal x_is_shift : std_logic;
  signal x_rd_write : std_logic;
  signal load_hazard : std_logic;
  signal d_is_shift : std_logic;
  signal n202_o : std_logic;
  signal n203_o : std_logic;
  signal n205_o : std_logic;
  signal n207_o : std_logic;
  signal n208_o : std_logic;
  signal n209_o : std_logic;
  signal n211_o : std_logic;
  signal n213_o : std_logic;
  signal n214_o : std_logic;
  signal n215_o : std_logic;
  signal x_is_mul : std_logic;
  signal d_is_mul : std_logic;
  signal n216_o : std_logic;
  signal n218_o : std_logic;
  signal n220_o : std_logic;
  signal n221_o : std_logic;
  signal n223_o : std_logic;
  signal n224_o : std_logic;
  signal n226_o : std_logic;
  signal n227_o : std_logic;
  signal n228_o : std_logic;
  signal inserting_nop : std_logic;
  signal d_imm_i : std_logic_vector (31 downto 0);
  signal n229_o : std_logic;
  signal n230_o : std_logic_vector (20 downto 0);
  signal n231_o : std_logic_vector (5 downto 0);
  signal n232_o : std_logic_vector (3 downto 0);
  signal n233_o : std_logic;
  signal n234_o : std_logic_vector (31 downto 0);
  signal d_imm_s : std_logic_vector (31 downto 0);
  signal n235_o : std_logic;
  signal n236_o : std_logic_vector (20 downto 0);
  signal n237_o : std_logic_vector (5 downto 0);
  signal n238_o : std_logic_vector (3 downto 0);
  signal n239_o : std_logic;
  signal n240_o : std_logic_vector (31 downto 0);
  signal d_imm_b : std_logic_vector (31 downto 0);
  signal n241_o : std_logic;
  signal n242_o : std_logic_vector (19 downto 0);
  signal n243_o : std_logic;
  signal n244_o : std_logic_vector (5 downto 0);
  signal n245_o : std_logic_vector (3 downto 0);
  signal n247_o : std_logic_vector (31 downto 0);
  signal d_imm_u : std_logic_vector (31 downto 0);
  signal n248_o : std_logic;
  signal n249_o : std_logic_vector (10 downto 0);
  signal n250_o : std_logic_vector (7 downto 0);
  signal n252_o : std_logic_vector (31 downto 0);
  signal d_imm_j : std_logic_vector (31 downto 0);
  signal n253_o : std_logic;
  signal n254_o : std_logic_vector (11 downto 0);
  signal n255_o : std_logic_vector (7 downto 0);
  signal n256_o : std_logic;
  signal n257_o : std_logic_vector (5 downto 0);
  signal n258_o : std_logic_vector (3 downto 0);
  signal n260_o : std_logic_vector (31 downto 0);
  signal d_imm : std_logic_vector (31 downto 0);
  signal d_rd_nonzero : std_logic;
  signal n261_o : std_logic_vector (31 downto 0);
  signal n263_o : std_logic;
  signal n264_o : std_logic;
  signal n265_o : std_logic;
  signal n266_o : std_logic;
  signal n267_o : std_logic;
  signal n268_o : std_logic;
  signal n269_o : std_logic;
  signal n270_o : std_logic;
  signal n272_o : std_logic;
  signal n275_o : std_logic;
  signal n276_o : std_logic;
  signal n278_o : std_logic;
  signal n279_o : std_logic;
  signal n281_o : std_logic;
  signal n282_o : std_logic;
  signal n284_o : std_logic;
  signal n287_o : std_logic;
  signal n288_o : std_logic;
  signal n289_o : std_logic;
  signal n290_o : std_logic;
  signal n291_o : std_logic;
  signal n293_q : std_logic;
  signal n294_o : std_logic;
  signal n295_o : std_logic;
  signal n297_o : std_logic;
  signal n300_o : std_logic;
  signal n301_o : std_logic;
  signal n302_o : std_logic;
  signal n304_o : std_logic;
  signal n305_o : std_logic_vector (31 downto 0);
  signal n306_o : std_logic_vector (4 downto 0);
  signal n307_o : std_logic_vector (4 downto 0);
  signal n308_o : std_logic_vector (4 downto 0);
  signal n309_o : std_logic_vector (4 downto 0);
  signal n310_o : std_logic;
  signal n311_o : std_logic_vector (31 downto 0);
  signal n312_o : std_logic_vector (4 downto 0);
  signal n313_o : std_logic_vector (4 downto 0);
  signal n314_o : std_logic_vector (4 downto 0);
  signal n315_o : std_logic_vector (4 downto 0);
  signal n316_o : std_logic;
  signal n323_q : std_logic_vector (31 downto 0);
  signal n324_q : std_logic_vector (4 downto 0);
  signal n325_q : std_logic_vector (4 downto 0);
  signal n326_q : std_logic_vector (4 downto 0);
  signal n327_q : std_logic_vector (4 downto 0);
  signal n328_q : std_logic;
  signal n330_o : std_logic;
  signal n333_o : std_logic;
  signal n335_o : std_logic;
  signal n336_o : std_logic;
  signal n338_o : std_logic;
  signal n339_o : std_logic;
  signal n341_o : std_logic;
  signal n342_o : std_logic;
  signal n343_o : std_logic_vector (2 downto 0);
  signal n346_o : std_logic_vector (2 downto 0);
  signal n347_q : std_logic_vector (2 downto 0);
  signal n349_o : std_logic;
  signal n350_o : std_logic;
  signal n353_o : std_logic;
  signal n354_q : std_logic;
  signal n357_o : std_logic;
  signal n358_o : std_logic_vector (31 downto 0);
  signal n360_o : std_logic;
  signal n361_o : std_logic_vector (31 downto 0);
  signal n363_o : std_logic;
  signal n364_o : std_logic_vector (31 downto 0);
  signal n366_o : std_logic;
  signal n367_o : std_logic_vector (31 downto 0);
  signal n369_o : std_logic;
  signal n371_o : std_logic;
  signal n372_o : std_logic;
  signal n373_o : std_logic_vector (31 downto 0);
  signal n375_o : std_logic;
  signal n377_o : std_logic;
  signal n378_o : std_logic;
  signal n379_o : std_logic_vector (31 downto 0);
  signal n381_o : std_logic;
  signal n384_o : std_logic_vector (31 downto 0);
  signal n385_q : std_logic_vector (31 downto 0);
  signal n387_o : std_logic;
  signal n394_o : std_logic;
  signal n396_o : std_logic;
  signal n397_o : std_logic;
  signal n398_o : std_logic_vector (31 downto 0);
  signal n399_o : std_logic;
  signal n401_o : std_logic;
  signal n403_o : std_logic;
  signal n404_o : std_logic;
  signal n405_o : std_logic_vector (31 downto 0);
  signal n406_o : std_logic;
  signal n414_o : std_logic;
  signal n415_o : std_logic_vector (31 downto 0);
  signal n416_o : std_logic;
  signal n418_o : std_logic;
  signal n420_o : std_logic;
  signal n421_o : std_logic;
  signal n423_o : std_logic;
  signal n424_o : std_logic;
  signal n425_o : std_logic_vector (31 downto 0);
  signal n426_o : std_logic;
  signal n428_o : std_logic;
  signal n429_o : std_logic_vector (31 downto 0);
  signal n430_o : std_logic;
  signal n439_o : std_logic_vector (31 downto 0);
  signal n440_q : std_logic_vector (31 downto 0);
  signal n441_o : std_logic_vector (31 downto 0);
  signal n442_q : std_logic_vector (31 downto 0);
  signal n443_o : std_logic;
  signal n444_q : std_logic;
  signal n445_o : std_logic;
  signal n446_q : std_logic;
  signal n448_o : std_logic;
  signal n453_o : std_logic;
  signal n455_o : std_logic;
  signal n456_o : std_logic_vector (1 downto 0);
  signal n458_o : std_logic;
  signal n459_o : std_logic;
  signal n464_o : std_logic;
  signal n465_o : std_logic;
  signal n466_o : std_logic;
  signal n468_o : std_logic;
  signal n470_o : std_logic;
  signal n471_o : std_logic;
  signal n473_o : std_logic;
  signal n474_o : std_logic;
  signal n476_o : std_logic;
  signal n477_o : std_logic;
  signal n478_o : std_logic;
  signal n479_o : std_logic;
  signal n481_o : std_logic;
  signal n483_o : std_logic;
  signal n484_o : std_logic;
  signal n486_o : std_logic;
  signal n487_o : std_logic;
  signal n488_o : std_logic;
  signal n489_o : std_logic;
  signal n494_o : std_logic;
  signal n495_q : std_logic;
  signal n496_o : std_logic;
  signal n497_q : std_logic;
  signal n499_o : std_logic;
  signal n501_o : std_logic;
  signal n502_o : std_logic;
  signal n503_o : std_logic;
  signal n505_o : std_logic;
  signal n506_o : std_logic;
  signal n507_o : std_logic;
  signal n509_o : std_logic;
  signal n511_o : std_logic;
  signal n513_o : std_logic;
  signal n514_o : std_logic;
  signal n516_o : std_logic;
  signal n518_o : std_logic;
  signal n519_o : std_logic;
  signal n521_o : std_logic;
  signal n523_o : std_logic;
  signal n524_o : std_logic;
  signal n526_o : std_logic;
  signal n528_o : std_logic;
  signal n529_o : std_logic;
  signal n530_o : std_logic;
  signal n531_o : std_logic;
  signal n536_o : std_logic;
  signal n537_o : std_logic;
  signal n539_o : std_logic;
  signal n540_o : std_logic;
  signal n542_o : std_logic;
  signal n543_o : std_logic;
  signal n545_o : std_logic;
  signal n546_o : std_logic;
  signal n547_o : std_logic;
  signal n561_o : std_logic;
  signal n563_o : std_logic;
  signal n564_o : std_logic;
  signal n566_o : std_logic;
  signal n567_o : std_logic;
  signal n569_o : std_logic;
  signal n570_o : std_logic;
  signal n571_o : std_logic;
  signal n572_o : std_logic;
  signal n573_o : std_logic;
  signal n575_o : std_logic;
  signal n577_o : std_logic;
  signal n578_o : std_logic;
  signal n580_o : std_logic;
  signal n581_o : std_logic;
  signal n582_o : std_logic;
  signal n583_o : std_logic;
  signal n584_o : std_logic;
  signal n586_o : std_logic;
  signal n587_o : std_logic;
  signal n588_o : std_logic;
  signal n589_o : std_logic;
  signal n593_o : std_logic;
  signal n594_o : std_logic;
  signal n595_o : std_logic;
  signal n598_o : std_logic;
  signal n601_o : std_logic;
  signal n602_o : std_logic;
  signal n603_o : std_logic;
  signal n604_o : std_logic;
  signal n605_o : std_logic;
  signal n607_o : std_logic;
  signal n610_o : std_logic_vector (2 downto 0);
  signal n612_o : std_logic_vector (2 downto 0);
  signal n614_o : std_logic_vector (2 downto 0);
  signal n615_o : std_logic_vector (2 downto 0);
  signal n616_o : std_logic_vector (2 downto 0);
  signal n617_o : std_logic_vector (31 downto 0);
  signal n619_o : std_logic;
  signal n620_o : std_logic;
  signal n624_o : std_logic;
  signal n625_o : std_logic;
  signal n627_o : std_logic;
  signal n628_o : std_logic;
  signal n630_o : std_logic;
  signal n632_o : std_logic;
  signal n633_o : std_logic;
  signal n635_o : std_logic;
  signal n636_o : std_logic;
  signal n638_o : std_logic;
  signal n639_o : std_logic;
  signal n641_o : std_logic;
  signal n642_o : std_logic;
  signal n644_o : std_logic;
  signal n645_o : std_logic;
  signal n646_o : std_logic;
  signal n673_o : std_logic;
  signal n674_q : std_logic;
  signal n675_o : std_logic;
  signal n676_q : std_logic;
  signal n677_o : std_logic;
  signal n678_q : std_logic;
  signal n679_o : std_logic;
  signal n680_q : std_logic;
  signal n681_o : std_logic;
  signal n682_q : std_logic;
  signal n683_o : std_logic;
  signal n684_q : std_logic;
  signal n685_o : std_logic;
  signal n686_q : std_logic;
  signal n687_o : std_logic_vector (2 downto 0);
  signal n688_q : std_logic_vector (2 downto 0);
  signal n689_o : std_logic;
  signal n690_q : std_logic;
  signal n691_o : std_logic;
  signal n692_q : std_logic;
  signal n693_o : std_logic;
  signal n694_q : std_logic;
  signal n695_o : std_logic;
  signal n696_q : std_logic;
  signal n697_o : std_logic;
  signal n698_q : std_logic;
  signal n700_o : std_logic;
  signal n701_o : std_logic_vector (4 downto 0);
  signal n702_o : std_logic_vector (11 downto 0);
  signal n704_o : std_logic;
  signal n705_o : std_logic_vector (31 downto 0);
  signal n707_o : std_logic;
  signal n708_o : std_logic;
  signal n710_o : std_logic;
  signal n711_o : std_logic_vector (31 downto 0);
  signal n713_o : std_logic;
  signal n714_o : std_logic;
  signal n715_o : std_logic_vector (11 downto 0);
  signal n717_o : std_logic;
  signal n718_o : std_logic;
  signal n730_o : std_logic_vector (11 downto 0);
  signal n731_q : std_logic_vector (11 downto 0);
  signal n732_o : std_logic_vector (4 downto 0);
  signal n733_q : std_logic_vector (4 downto 0);
  signal n734_o : std_logic;
  signal n735_q : std_logic;
  signal n736_o : std_logic;
  signal n737_q : std_logic;
  signal n738_o : std_logic;
  signal n739_q : std_logic;
begin
  d_stall_req_o <= n295_o;
  rf_rs1_o <= f_rs1;
  rf_rs2_o <= f_rs2;
  x_valid_o <= x_valid;
  x_pc_o <= n323_q;
  x_rs1_o <= x_rs1;
  x_rs2_o <= x_rs2;
  x_rd_o <= x_rd;
  x_fun_o <= n347_q;
  x_opcode_o <= x_opcode;
  x_shifter_sign_o <= n354_q;
  x_is_signed_alu_op_o <= n674_q;
  x_is_add_o <= n676_q;
  x_is_load_o <= n678_q;
  x_is_store_o <= n680_q;
  x_is_undef_o <= n682_q;
  x_is_write_ecc_o <= n684_q;
  x_is_fix_ecc_o <= n686_q;
  x_rd_source_o <= n688_q;
  x_rd_write_o <= x_rd_write;
  x_csr_sel_o <= n731_q;
  x_csr_imm_o <= n733_q;
  x_is_csr_o <= n735_q;
  x_is_mret_o <= n737_q;
  x_is_ebreak_o <= n739_q;
  x_imm_o <= n385_q;
  x_alu_op1_o <= n440_q;
  x_alu_op2_o <= n442_q;
  x_use_op1_o <= n444_q;
  x_use_op2_o <= n446_q;
  x_use_rs1_o <= n495_q;
  x_use_rs2_o <= n497_q;
  x_is_divide_o <= n690_q;
  x_is_multiply_o <= n692_q;
  -- urv_decode.v:89:15
  f_rs1 <= n197_o; -- (signal)
  n197_o <= f_ir_i (19 downto 15);
  -- urv_decode.v:90:15
  f_rs2 <= n198_o; -- (signal)
  n198_o <= f_ir_i (24 downto 20);
  -- urv_decode.v:91:15
  f_rd <= n199_o; -- (signal)
  n199_o <= f_ir_i (11 downto 7);
  -- urv_decode.v:93:15
  d_opcode <= n200_o; -- (signal)
  n200_o <= f_ir_i (6 downto 2);
  -- urv_decode.v:94:15
  d_fun <= n201_o; -- (signal)
  n201_o <= f_ir_i (14 downto 12);
  -- urv_decode.v:96:15
  x_rs1 <= n324_q; -- (signal)
  -- urv_decode.v:97:15
  x_rs2 <= n325_q; -- (signal)
  -- urv_decode.v:98:15
  x_rd <= n326_q; -- (signal)
  -- urv_decode.v:99:15
  x_opcode <= n327_q; -- (signal)
  -- urv_decode.v:100:23
  x_valid <= n328_q; -- (signal)
  -- urv_decode.v:101:23
  x_is_shift <= n694_q; -- (signal)
  -- urv_decode.v:102:23
  x_rd_write <= n696_q; -- (signal)
  -- urv_decode.v:114:23
  load_hazard <= n284_o; -- (signal)
  -- urv_decode.v:116:9
  d_is_shift <= n215_o; -- (signal)
  n202_o <= f_ir_i (25);
  -- urv_decode.v:116:22
  n203_o <= not n202_o;
  -- urv_decode.v:116:44
  n205_o <= '1' when d_fun = "001" else '0';
  -- urv_decode.v:116:65
  n207_o <= '1' when d_fun = "101" else '0';
  -- urv_decode.v:116:56
  n208_o <= n205_o or n207_o;
  -- urv_decode.v:116:34
  n209_o <= n203_o and n208_o;
  -- urv_decode.v:117:19
  n211_o <= '1' when d_opcode = "01100" else '0';
  -- urv_decode.v:117:42
  n213_o <= '1' when d_opcode = "00100" else '0';
  -- urv_decode.v:117:30
  n214_o <= n211_o or n213_o;
  -- urv_decode.v:116:78
  n215_o <= n209_o and n214_o;
  -- urv_decode.v:119:17
  x_is_mul <= n698_q; -- (signal)
  -- urv_decode.v:120:9
  d_is_mul <= n228_o; -- (signal)
  n216_o <= f_ir_i (25);
  -- urv_decode.v:120:42
  n218_o <= '1' when d_fun = "000" else '0';
  -- urv_decode.v:120:64
  n220_o <= '1' when d_fun = "001" else '0';
  -- urv_decode.v:120:55
  n221_o <= n218_o or n220_o;
  -- urv_decode.v:120:87
  n223_o <= '1' when d_fun = "011" else '0';
  -- urv_decode.v:120:78
  n224_o <= n221_o or n223_o;
  -- urv_decode.v:120:111
  n226_o <= '1' when d_fun = "010" else '0';
  -- urv_decode.v:120:102
  n227_o <= n224_o or n226_o;
  -- urv_decode.v:120:32
  n228_o <= n216_o and n227_o;
  -- urv_decode.v:142:17
  inserting_nop <= n293_q; -- (signal)
  -- urv_decode.v:192:15
  d_imm_i <= n234_o; -- (signal)
  n229_o <= f_ir_i (31);
  n230_o <= n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o & n229_o;
  n231_o <= f_ir_i (30 downto 25);
  n232_o <= f_ir_i (24 downto 21);
  n233_o <= f_ir_i (20);
  n234_o <= n230_o & n231_o & n232_o & n233_o;
  -- urv_decode.v:193:16
  d_imm_s <= n240_o; -- (signal)
  n235_o <= f_ir_i (31);
  n236_o <= n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o & n235_o;
  n237_o <= f_ir_i (30 downto 25);
  n238_o <= f_ir_i (11 downto 8);
  n239_o <= f_ir_i (7);
  n240_o <= n236_o & n237_o & n238_o & n239_o;
  -- urv_decode.v:194:16
  d_imm_b <= n247_o; -- (signal)
  n241_o <= f_ir_i (31);
  n242_o <= n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o & n241_o;
  n243_o <= f_ir_i (7);
  n244_o <= f_ir_i (30 downto 25);
  n245_o <= f_ir_i (11 downto 8);
  n247_o <= n242_o & n243_o & n244_o & n245_o & '0';
  -- urv_decode.v:195:16
  d_imm_u <= n252_o; -- (signal)
  n248_o <= f_ir_i (31);
  n249_o <= f_ir_i (30 downto 20);
  n250_o <= f_ir_i (19 downto 12);
  n252_o <= n248_o & n249_o & n250_o & "000000000000";
  -- urv_decode.v:196:16
  d_imm_j <= n260_o; -- (signal)
  n253_o <= f_ir_i (31);
  n254_o <= n253_o & n253_o & n253_o & n253_o & n253_o & n253_o & n253_o & n253_o & n253_o & n253_o & n253_o & n253_o;
  n255_o <= f_ir_i (19 downto 12);
  n256_o <= f_ir_i (20);
  n257_o <= f_ir_i (30 downto 25);
  n258_o <= f_ir_i (24 downto 21);
  n260_o <= n254_o & n255_o & n256_o & n257_o & n258_o & '0';
  -- urv_decode.v:201:15
  d_imm <= n379_o; -- (signal)
  -- urv_decode.v:297:9
  d_rd_nonzero <= n263_o; -- (signal)
  -- urv_decode.v:297:25
  n261_o <= "000000000000000000000000000" & f_rd;  --  uext
  -- urv_decode.v:297:30
  n263_o <= '1' when n261_o /= "00000000000000000000000000000000" else '0';
  -- urv_decode.v:124:19
  n264_o <= x_valid and f_valid_i;
  -- urv_decode.v:124:44
  n265_o <= '1' when f_rs1 = x_rd else '0';
  -- urv_decode.v:124:64
  n266_o <= '1' when f_rs2 = x_rd else '0';
  -- urv_decode.v:124:54
  n267_o <= n265_o or n266_o;
  -- urv_decode.v:124:32
  n268_o <= n264_o and n267_o;
  -- urv_decode.v:124:79
  n269_o <= not d_kill_i;
  -- urv_decode.v:124:75
  n270_o <= n268_o and n269_o;
  -- urv_decode.v:131:41
  n272_o <= x_is_shift or x_is_mul;
  -- urv_defs.v:31:20
  n275_o <= '1' when std_logic_vector'("00100") = x_opcode else '0';
  -- urv_defs.v:31:20
  n276_o <= '0' when n275_o = '0' else x_is_shift;
  -- urv_defs.v:34:20
  n278_o <= '1' when std_logic_vector'("01100") = x_opcode else '0';
  -- urv_defs.v:34:20
  n279_o <= n276_o when n278_o = '0' else n272_o;
  -- urv_defs.v:30:20
  n281_o <= '1' when std_logic_vector'("00000") = x_opcode else '0';
  -- urv_defs.v:30:20
  n282_o <= n279_o when n281_o = '0' else '1';
  -- urv_decode.v:124:6
  n284_o <= '0' when n270_o = '0' else n282_o;
  -- urv_decode.v:148:15
  n287_o <= not d_stall_i;
  -- urv_decode.v:149:40
  n288_o <= not inserting_nop;
  -- urv_decode.v:149:37
  n289_o <= load_hazard and n288_o;
  -- urv_decode.v:148:11
  n290_o <= inserting_nop when n287_o = '0' else n289_o;
  -- urv_decode.v:146:6
  n291_o <= n290_o when rst_i = '0' else '0';
  -- urv_decode.v:145:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n293_q <= n291_o;
    end if;
  end process;
  -- urv_decode.v:151:42
  n294_o <= not inserting_nop;
  -- urv_decode.v:151:39
  n295_o <= load_hazard and n294_o;
  -- urv_decode.v:157:15
  n297_o <= rst_i or d_kill_i;
  -- urv_decode.v:162:14
  n300_o <= not d_stall_i;
  -- urv_decode.v:166:30
  n301_o <= not inserting_nop;
  -- urv_decode.v:166:27
  n302_o <= load_hazard and n301_o;
  -- urv_decode.v:166:11
  n304_o <= f_valid_i when n302_o = '0' else '0';
  -- urv_decode.v:162:11
  n305_o <= n323_q when n300_o = '0' else f_pc_i;
  -- urv_decode.v:162:11
  n306_o <= x_rs1 when n300_o = '0' else f_rs1;
  -- urv_decode.v:162:11
  n307_o <= x_rs2 when n300_o = '0' else f_rs2;
  -- urv_decode.v:162:11
  n308_o <= x_rd when n300_o = '0' else f_rd;
  -- urv_decode.v:162:11
  n309_o <= x_opcode when n300_o = '0' else d_opcode;
  -- urv_decode.v:162:11
  n310_o <= x_valid when n300_o = '0' else n304_o;
  -- urv_decode.v:157:6
  n311_o <= n305_o when n297_o = '0' else "00000000000000000000000000000000";
  -- urv_decode.v:157:6
  n312_o <= n306_o when n297_o = '0' else x_rs1;
  -- urv_decode.v:157:6
  n313_o <= n307_o when n297_o = '0' else x_rs2;
  -- urv_decode.v:157:6
  n314_o <= n308_o when n297_o = '0' else x_rd;
  -- urv_decode.v:157:6
  n315_o <= n309_o when n297_o = '0' else x_opcode;
  -- urv_decode.v:157:6
  n316_o <= n310_o when n297_o = '0' else '0';
  -- urv_decode.v:156:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n323_q <= n311_o;
    end if;
  end process;
  -- urv_decode.v:156:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n324_q <= n312_o;
    end if;
  end process;
  -- urv_decode.v:156:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n325_q <= n313_o;
    end if;
  end process;
  -- urv_decode.v:156:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n326_q <= n314_o;
    end if;
  end process;
  -- urv_decode.v:156:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n327_q <= n315_o;
    end if;
  end process;
  -- urv_decode.v:156:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n328_q <= n316_o;
    end if;
  end process;
  -- urv_decode.v:180:9
  n330_o <= not d_stall_i;
  -- urv_defs.v:39:20
  n333_o <= '1' when std_logic_vector'("11011") = d_opcode else '0';
  -- urv_defs.v:38:20
  n335_o <= '1' when std_logic_vector'("11001") = d_opcode else '0';
  -- urv_defs.v:38:20
  n336_o <= n333_o or n335_o;
  -- urv_defs.v:35:20
  n338_o <= '1' when std_logic_vector'("01101") = d_opcode else '0';
  -- urv_defs.v:35:20
  n339_o <= n336_o or n338_o;
  -- urv_defs.v:32:20
  n341_o <= '1' when std_logic_vector'("00101") = d_opcode else '0';
  -- urv_defs.v:32:20
  n342_o <= n339_o or n341_o;
  -- urv_defs.v:39:20
  n343_o <= d_fun when n342_o = '0' else "000";
  -- urv_decode.v:179:4
  n346_o <= n347_q when n330_o = '0' else n343_o;
  -- urv_decode.v:179:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n347_q <= n346_o;
    end if;
  end process;
  -- urv_decode.v:189:9
  n349_o <= not d_stall_i;
  n350_o <= f_ir_i (30);
  -- urv_decode.v:188:4
  n353_o <= n354_q when n349_o = '0' else n350_o;
  -- urv_decode.v:188:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n354_q <= n353_o;
    end if;
  end process;
  -- urv_defs.v:37:20
  n357_o <= '1' when std_logic_vector'("11000") = d_opcode else '0';
  -- urv_defs.v:37:20
  n358_o <= (31 downto 0 => 'X') when n357_o = '0' else d_imm_b;
  -- urv_defs.v:38:20
  n360_o <= '1' when std_logic_vector'("11001") = d_opcode else '0';
  -- urv_defs.v:38:20
  n361_o <= n358_o when n360_o = '0' else d_imm_i;
  -- urv_defs.v:39:20
  n363_o <= '1' when std_logic_vector'("11011") = d_opcode else '0';
  -- urv_defs.v:39:20
  n364_o <= n361_o when n363_o = '0' else d_imm_j;
  -- urv_defs.v:33:20
  n366_o <= '1' when std_logic_vector'("01000") = d_opcode else '0';
  -- urv_defs.v:33:20
  n367_o <= n364_o when n366_o = '0' else d_imm_s;
  -- urv_defs.v:31:20
  n369_o <= '1' when std_logic_vector'("00100") = d_opcode else '0';
  -- urv_defs.v:30:20
  n371_o <= '1' when std_logic_vector'("00000") = d_opcode else '0';
  -- urv_defs.v:30:20
  n372_o <= n369_o or n371_o;
  -- urv_defs.v:31:20
  n373_o <= n367_o when n372_o = '0' else d_imm_i;
  -- urv_defs.v:35:20
  n375_o <= '1' when std_logic_vector'("01101") = d_opcode else '0';
  -- urv_defs.v:32:20
  n377_o <= '1' when std_logic_vector'("00101") = d_opcode else '0';
  -- urv_defs.v:32:20
  n378_o <= n375_o or n377_o;
  -- urv_defs.v:35:20
  n379_o <= n373_o when n378_o = '0' else d_imm_u;
  -- urv_decode.v:218:9
  n381_o <= not d_stall_i;
  -- urv_decode.v:217:4
  n384_o <= n385_q when n381_o = '0' else d_imm;
  -- urv_decode.v:217:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n385_q <= n384_o;
    end if;
  end process;
  -- urv_decode.v:224:9
  n387_o <= not d_stall_i;
  -- urv_defs.v:39:20
  n394_o <= '1' when std_logic_vector'("11011") = d_opcode else '0';
  -- urv_defs.v:38:20
  n396_o <= '1' when std_logic_vector'("11001") = d_opcode else '0';
  -- urv_defs.v:38:20
  n397_o <= n394_o or n396_o;
  -- urv_defs.v:39:20
  n398_o <= (31 downto 0 => 'X') when n397_o = '0' else "00000000000000000000000000000100";
  -- urv_defs.v:39:20
  n399_o <= '0' when n397_o = '0' else '1';
  -- urv_defs.v:35:20
  n401_o <= '1' when std_logic_vector'("01101") = d_opcode else '0';
  -- urv_defs.v:32:20
  n403_o <= '1' when std_logic_vector'("00101") = d_opcode else '0';
  -- urv_defs.v:32:20
  n404_o <= n401_o or n403_o;
  -- urv_defs.v:35:20
  n405_o <= n398_o when n404_o = '0' else d_imm;
  -- urv_defs.v:35:20
  n406_o <= n399_o when n404_o = '0' else '1';
  -- urv_defs.v:31:20
  n414_o <= '1' when std_logic_vector'("00100") = d_opcode else '0';
  -- urv_defs.v:31:20
  n415_o <= (31 downto 0 => 'X') when n414_o = '0' else d_imm;
  -- urv_defs.v:31:20
  n416_o <= '0' when n414_o = '0' else '1';
  -- urv_defs.v:32:20
  n418_o <= '1' when std_logic_vector'("00101") = d_opcode else '0';
  -- urv_defs.v:39:20
  n420_o <= '1' when std_logic_vector'("11011") = d_opcode else '0';
  -- urv_defs.v:39:20
  n421_o <= n418_o or n420_o;
  -- urv_defs.v:38:20
  n423_o <= '1' when std_logic_vector'("11001") = d_opcode else '0';
  -- urv_defs.v:38:20
  n424_o <= n421_o or n423_o;
  -- urv_defs.v:32:20
  n425_o <= n415_o when n424_o = '0' else f_pc_i;
  -- urv_defs.v:32:20
  n426_o <= n416_o when n424_o = '0' else '1';
  -- urv_defs.v:35:20
  n428_o <= '1' when std_logic_vector'("01101") = d_opcode else '0';
  -- urv_defs.v:35:20
  n429_o <= n425_o when n428_o = '0' else "00000000000000000000000000000000";
  -- urv_defs.v:35:20
  n430_o <= n426_o when n428_o = '0' else '1';
  -- urv_decode.v:223:4
  n439_o <= n440_q when n387_o = '0' else n405_o;
  -- urv_decode.v:223:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n440_q <= n439_o;
    end if;
  end process;
  -- urv_decode.v:223:4
  n441_o <= n442_q when n387_o = '0' else n429_o;
  -- urv_decode.v:223:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n442_q <= n441_o;
    end if;
  end process;
  -- urv_decode.v:223:4
  n443_o <= n444_q when n387_o = '0' else n406_o;
  -- urv_decode.v:223:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n444_q <= n443_o;
    end if;
  end process;
  -- urv_decode.v:223:4
  n445_o <= n446_q when n387_o = '0' else n430_o;
  -- urv_decode.v:223:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n446_q <= n445_o;
    end if;
  end process;
  -- urv_decode.v:273:9
  n448_o <= not d_stall_i;
  n453_o <= d_fun (2);
  -- urv_decode.v:287:39
  n455_o <= '1' when n453_o = '0' else '0';
  n456_o <= d_fun (1 downto 0);
  -- urv_decode.v:287:61
  n458_o <= '1' when n456_o /= "00" else '0';
  -- urv_decode.v:287:47
  n459_o <= n455_o and n458_o;
  -- urv_defs.v:40:20
  n464_o <= '1' when std_logic_vector'("11100") = d_opcode else '0';
  -- urv_defs.v:40:20
  n465_o <= '0' when n464_o = '0' else n459_o;
  -- urv_defs.v:40:20
  n466_o <= '0' when n464_o = '0' else '0';
  -- urv_defs.v:33:20
  n468_o <= '1' when std_logic_vector'("01000") = d_opcode else '0';
  -- urv_defs.v:37:20
  n470_o <= '1' when std_logic_vector'("11000") = d_opcode else '0';
  -- urv_defs.v:37:20
  n471_o <= n468_o or n470_o;
  -- urv_defs.v:34:20
  n473_o <= '1' when std_logic_vector'("01100") = d_opcode else '0';
  -- urv_defs.v:34:20
  n474_o <= n471_o or n473_o;
  -- urv_defs.v:36:20
  n476_o <= '1' when std_logic_vector'("10110") = d_opcode else '0';
  -- urv_defs.v:36:20
  n477_o <= n474_o or n476_o;
  -- urv_defs.v:33:20
  n478_o <= n465_o when n477_o = '0' else '1';
  -- urv_defs.v:33:20
  n479_o <= n466_o when n477_o = '0' else '1';
  -- urv_defs.v:38:20
  n481_o <= '1' when std_logic_vector'("11001") = d_opcode else '0';
  -- urv_defs.v:30:20
  n483_o <= '1' when std_logic_vector'("00000") = d_opcode else '0';
  -- urv_defs.v:30:20
  n484_o <= n481_o or n483_o;
  -- urv_defs.v:31:20
  n486_o <= '1' when std_logic_vector'("00100") = d_opcode else '0';
  -- urv_defs.v:31:20
  n487_o <= n484_o or n486_o;
  -- urv_defs.v:38:20
  n488_o <= n478_o when n487_o = '0' else '1';
  -- urv_defs.v:38:20
  n489_o <= n479_o when n487_o = '0' else '0';
  -- urv_decode.v:272:4
  n494_o <= n495_q when n448_o = '0' else n488_o;
  -- urv_decode.v:272:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n495_q <= n494_o;
    end if;
  end process;
  -- urv_decode.v:272:4
  n496_o <= n497_q when n448_o = '0' else n489_o;
  -- urv_decode.v:272:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n497_q <= n496_o;
    end if;
  end process;
  -- urv_decode.v:301:9
  n499_o <= not d_stall_i;
  -- urv_decode.v:305:35
  n501_o <= '1' when d_opcode = "00000" else '0';
  -- urv_decode.v:305:51
  n502_o <= not load_hazard;
  -- urv_decode.v:305:48
  n503_o <= n501_o and n502_o;
  -- urv_decode.v:306:36
  n505_o <= '1' when d_opcode = "01000" else '0';
  -- urv_decode.v:306:53
  n506_o <= not load_hazard;
  -- urv_decode.v:306:50
  n507_o <= n505_o and n506_o;
  -- urv_decode.v:308:32
  n509_o <= d_is_mul and '0';
  -- urv_decode.v:310:40
  n511_o <= '1' when d_opcode = "10110" else '0';
  -- urv_decode.v:310:63
  n513_o <= '1' when d_fun = "001" else '0';
  -- urv_decode.v:310:54
  n514_o <= n511_o and n513_o;
  -- urv_decode.v:311:38
  n516_o <= '1' when d_opcode = "10110" else '0';
  -- urv_decode.v:311:61
  n518_o <= '1' when d_fun = "101" else '0';
  -- urv_decode.v:311:52
  n519_o <= n516_o and n518_o;
  -- urv_decode.v:315:46
  n521_o <= '1' when d_fun = "101" else '0';
  -- urv_decode.v:315:66
  n523_o <= '1' when d_fun = "100" else '0';
  -- urv_decode.v:315:57
  n524_o <= n521_o or n523_o;
  -- urv_decode.v:317:46
  n526_o <= '1' when d_fun = "010" else '0';
  -- urv_defs.v:37:20
  n528_o <= '1' when std_logic_vector'("11000") = d_opcode else '0';
  -- urv_defs.v:37:20
  n529_o <= n526_o when n528_o = '0' else n524_o;
  n530_o <= f_ir_i (30);
  -- urv_decode.v:322:29
  n531_o <= not n530_o;
  -- urv_defs.v:37:20
  n536_o <= '1' when std_logic_vector'("11000") = d_opcode else '0';
  -- urv_defs.v:37:20
  n537_o <= '1' when n536_o = '0' else '0';
  -- urv_defs.v:31:20
  n539_o <= '1' when std_logic_vector'("00100") = d_opcode else '0';
  -- urv_defs.v:31:20
  n540_o <= n537_o when n539_o = '0' else '1';
  -- urv_defs.v:34:20
  n542_o <= '1' when std_logic_vector'("01100") = d_opcode else '0';
  -- urv_defs.v:34:20
  n543_o <= n540_o when n542_o = '0' else n531_o;
  -- urv_decode.v:332:24
  n545_o <= '1' when d_opcode = "01100" else '0';
  n546_o <= f_ir_i (25);
  -- urv_decode.v:332:35
  n547_o <= n545_o and n546_o;
  -- urv_defs.v:72:18
  n561_o <= '1' when std_logic_vector'("100") = d_fun else '0';
  -- urv_defs.v:73:19
  n563_o <= '1' when std_logic_vector'("101") = d_fun else '0';
  -- urv_defs.v:73:19
  n564_o <= n561_o or n563_o;
  -- urv_defs.v:74:18
  n566_o <= '1' when std_logic_vector'("110") = d_fun else '0';
  -- urv_defs.v:74:18
  n567_o <= n564_o or n566_o;
  -- urv_defs.v:75:19
  n569_o <= '1' when std_logic_vector'("111") = d_fun else '0';
  -- urv_defs.v:75:19
  n570_o <= n567_o or n569_o;
  -- urv_defs.v:72:18
  n571_o <= '0' when n570_o = '0' else '1';
  -- urv_defs.v:72:18
  n572_o <= '0' when n570_o = '0' else '1';
  -- urv_defs.v:72:18
  n573_o <= '0' when n570_o = '0' else '0';
  -- urv_defs.v:69:19
  n575_o <= '1' when std_logic_vector'("001") = d_fun else '0';
  -- urv_defs.v:71:20
  n577_o <= '1' when std_logic_vector'("011") = d_fun else '0';
  -- urv_defs.v:71:20
  n578_o <= n575_o or n577_o;
  -- urv_defs.v:70:21
  n580_o <= '1' when std_logic_vector'("010") = d_fun else '0';
  -- urv_defs.v:70:21
  n581_o <= n578_o or n580_o;
  -- urv_defs.v:69:19
  n582_o <= n571_o when n581_o = '0' else '1';
  -- urv_defs.v:69:19
  n583_o <= n572_o when n581_o = '0' else '0';
  -- urv_defs.v:69:19
  n584_o <= n573_o when n581_o = '0' else '0';
  -- urv_defs.v:68:18
  n586_o <= '1' when std_logic_vector'("000") = d_fun else '0';
  -- urv_defs.v:68:18
  n587_o <= n582_o when n586_o = '0' else '1';
  -- urv_defs.v:68:18
  n588_o <= n583_o when n586_o = '0' else '0';
  -- urv_defs.v:68:18
  n589_o <= n584_o when n586_o = '0' else '0';
  -- urv_decode.v:332:11
  n593_o <= '0' when n547_o = '0' else n587_o;
  -- urv_decode.v:332:11
  n594_o <= '0' when n547_o = '0' else n588_o;
  -- urv_decode.v:332:11
  n595_o <= '0' when n547_o = '0' else n589_o;
  -- urv_decode.v:373:29
  n598_o <= '1' when d_opcode = "11100" else '0';
  -- urv_decode.v:375:29
  n601_o <= '1' when d_opcode = "01100" else '0';
  n602_o <= f_ir_i (25);
  -- urv_decode.v:375:40
  n603_o <= n601_o and n602_o;
  n604_o <= d_fun (2);
  -- urv_decode.v:378:20
  n605_o <= not n604_o;
  -- urv_decode.v:380:31
  n607_o <= '1' when d_fun = "000" else '0';
  -- urv_decode.v:380:21
  n610_o <= "111" when n607_o = '0' else "001";
  -- urv_decode.v:378:16
  n612_o <= "100" when n605_o = '0' else n610_o;
  -- urv_decode.v:375:16
  n614_o <= "000" when n603_o = '0' else n612_o;
  -- urv_decode.v:373:16
  n615_o <= n614_o when n598_o = '0' else "011";
  -- urv_decode.v:371:11
  n616_o <= n615_o when d_is_shift = '0' else "010";
  -- urv_decode.v:397:46
  n617_o <= "00000000000000000000000000000" & d_fun;  --  uext
  -- urv_decode.v:397:52
  n619_o <= '1' when n617_o /= "00000000000000000000000000000000" else '0';
  -- urv_decode.v:397:42
  n620_o <= d_rd_nonzero and n619_o;
  -- urv_defs.v:36:20
  n624_o <= '1' when std_logic_vector'("10110") = d_opcode else '0';
  -- urv_defs.v:36:20
  n625_o <= '0' when n624_o = '0' else '1';
  -- urv_defs.v:40:20
  n627_o <= '1' when std_logic_vector'("11100") = d_opcode else '0';
  -- urv_defs.v:40:20
  n628_o <= n625_o when n627_o = '0' else n620_o;
  -- urv_defs.v:31:20
  n630_o <= '1' when std_logic_vector'("00100") = d_opcode else '0';
  -- urv_defs.v:34:20
  n632_o <= '1' when std_logic_vector'("01100") = d_opcode else '0';
  -- urv_defs.v:34:20
  n633_o <= n630_o or n632_o;
  -- urv_defs.v:39:20
  n635_o <= '1' when std_logic_vector'("11011") = d_opcode else '0';
  -- urv_defs.v:39:20
  n636_o <= n633_o or n635_o;
  -- urv_defs.v:38:20
  n638_o <= '1' when std_logic_vector'("11001") = d_opcode else '0';
  -- urv_defs.v:38:20
  n639_o <= n636_o or n638_o;
  -- urv_defs.v:35:20
  n641_o <= '1' when std_logic_vector'("01101") = d_opcode else '0';
  -- urv_defs.v:35:20
  n642_o <= n639_o or n641_o;
  -- urv_defs.v:32:20
  n644_o <= '1' when std_logic_vector'("00101") = d_opcode else '0';
  -- urv_defs.v:32:20
  n645_o <= n642_o or n644_o;
  -- urv_defs.v:31:20
  n646_o <= n628_o when n645_o = '0' else d_rd_nonzero;
  -- urv_decode.v:300:4
  n673_o <= n674_q when n499_o = '0' else n529_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n674_q <= n673_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n675_o <= n676_q when n499_o = '0' else n543_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n676_q <= n675_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n677_o <= n678_q when n499_o = '0' else n503_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n678_q <= n677_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n679_o <= n680_q when n499_o = '0' else n507_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n680_q <= n679_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n681_o <= n682_q when n499_o = '0' else n593_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n682_q <= n681_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n683_o <= n684_q when n499_o = '0' else n514_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n684_q <= n683_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n685_o <= n686_q when n499_o = '0' else n519_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n686_q <= n685_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n687_o <= n688_q when n499_o = '0' else n616_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n688_q <= n687_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n689_o <= n690_q when n499_o = '0' else n594_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n690_q <= n689_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n691_o <= n692_q when n499_o = '0' else n595_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n692_q <= n691_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n693_o <= x_is_shift when n499_o = '0' else d_is_shift;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n694_q <= n693_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n695_o <= x_rd_write when n499_o = '0' else n646_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n696_q <= n695_o;
    end if;
  end process;
  -- urv_decode.v:300:4
  n697_o <= x_is_mul when n499_o = '0' else n509_o;
  -- urv_decode.v:300:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n698_q <= n697_o;
    end if;
  end process;
  -- urv_decode.v:408:13
  n700_o <= not d_stall_i;
  n701_o <= f_ir_i (19 downto 15);
  n702_o <= f_ir_i (31 downto 20);
  -- urv_decode.v:412:38
  n704_o <= '1' when d_opcode = "11100" else '0';
  -- urv_decode.v:412:58
  n705_o <= "00000000000000000000000000000" & d_fun;  --  uext
  -- urv_decode.v:412:64
  n707_o <= '1' when n705_o /= "00000000000000000000000000000000" else '0';
  -- urv_decode.v:412:54
  n708_o <= n704_o and n707_o;
  -- urv_decode.v:413:39
  n710_o <= '1' when d_opcode = "11100" else '0';
  -- urv_decode.v:413:59
  n711_o <= "00000000000000000000000000000" & d_fun;  --  uext
  -- urv_decode.v:413:65
  n713_o <= '1' when n711_o = "00000000000000000000000000000000" else '0';
  -- urv_decode.v:413:55
  n714_o <= n710_o and n713_o;
  n715_o <= f_ir_i (31 downto 20);
  -- urv_decode.v:413:90
  n717_o <= '1' when n715_o = "001100000010" else '0';
  -- urv_decode.v:413:71
  n718_o <= n714_o and n717_o;
  -- urv_decode.v:407:4
  n730_o <= n731_q when n700_o = '0' else n702_o;
  -- urv_decode.v:407:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n731_q <= n730_o;
    end if;
  end process;
  -- urv_decode.v:407:4
  n732_o <= n733_q when n700_o = '0' else n701_o;
  -- urv_decode.v:407:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n733_q <= n732_o;
    end if;
  end process;
  -- urv_decode.v:407:4
  n734_o <= n735_q when n700_o = '0' else n708_o;
  -- urv_decode.v:407:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n735_q <= n734_o;
    end if;
  end process;
  -- urv_decode.v:407:4
  n736_o <= n737_q when n700_o = '0' else n718_o;
  -- urv_decode.v:407:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n737_q <= n736_o;
    end if;
  end process;
  -- urv_decode.v:407:4
  n738_o <= n739_q when n700_o = '0' else '0';
  -- urv_decode.v:407:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n739_q <= n738_o;
    end if;
  end process;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_fetch is
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    f_stall_i : in std_logic;
    im_data_i : in std_logic_vector (31 downto 0);
    im_valid_i : in std_logic;
    x_pc_bra_i : in std_logic_vector (31 downto 0);
    x_bra_i : in std_logic;
    dbg_force_i : in std_logic;
    dbg_insn_i : in std_logic_vector (31 downto 0);
    dbg_insn_set_i : in std_logic;
    x_dbg_toggle_i : in std_logic;
    im_addr_o : out std_logic_vector (31 downto 0);
    im_rd_o : out std_logic;
    f_valid_o : out std_logic;
    f_ir_o : out std_logic_vector (31 downto 0);
    f_pc_o : out std_logic_vector (31 downto 0);
    dbg_enabled_o : out std_logic;
    dbg_insn_ready_o : out std_logic);
end entity urv_fetch;

architecture rtl of urv_fetch is
  signal pc : std_logic_vector (31 downto 0);
  signal rst_d : std_logic;
  signal pc_next : std_logic_vector (31 downto 0);
  signal dbg_mode : std_logic;
  signal pipeline_cnt : std_logic_vector (2 downto 0);
  signal frozen : std_logic;
  signal f_kill : std_logic;
  signal n48_o : std_logic;
  signal n49_o : std_logic;
  signal n50_o : std_logic_vector (31 downto 0);
  signal n52_o : std_logic;
  signal n53_o : std_logic;
  signal n54_o : std_logic;
  signal n55_o : std_logic;
  signal n56_o : std_logic;
  signal n57_o : std_logic;
  signal n59_o : std_logic_vector (31 downto 0);
  signal n60_o : std_logic_vector (31 downto 0);
  signal n61_o : std_logic_vector (31 downto 0);
  signal n62_o : std_logic;
  signal n63_o : std_logic;
  signal n64_o : std_logic;
  signal n65_o : std_logic_vector (31 downto 0);
  signal n67_o : std_logic;
  signal n77_o : std_logic;
  signal n78_o : std_logic;
  signal n79_o : std_logic;
  signal n80_o : std_logic_vector (31 downto 0);
  signal n82_o : std_logic;
  signal n83_o : std_logic;
  signal n84_o : std_logic;
  signal n86_o : std_logic_vector (31 downto 0);
  signal n88_o : std_logic;
  signal n89_o : std_logic;
  signal n93_o : std_logic_vector (2 downto 0);
  signal n94_o : std_logic;
  signal n95_o : std_logic_vector (2 downto 0);
  signal n99_o : std_logic;
  signal n100_o : std_logic_vector (31 downto 0);
  signal n101_o : std_logic;
  signal n102_o : std_logic;
  signal n104_o : std_logic_vector (31 downto 0);
  signal n106_o : std_logic;
  signal n108_o : std_logic_vector (2 downto 0);
  signal n109_o : std_logic_vector (2 downto 0);
  signal n110_o : std_logic_vector (2 downto 0);
  signal n111_o : std_logic;
  signal n112_o : std_logic;
  signal n113_o : std_logic;
  signal n114_o : std_logic;
  signal n115_o : std_logic;
  signal n117_o : std_logic;
  signal n119_o : std_logic;
  signal n120_o : std_logic_vector (31 downto 0);
  signal n121_o : std_logic;
  signal n122_o : std_logic;
  signal n123_o : std_logic_vector (31 downto 0);
  signal n124_o : std_logic;
  signal n125_o : std_logic_vector (2 downto 0);
  signal n126_o : std_logic;
  signal n127_o : std_logic;
  signal n128_o : std_logic_vector (31 downto 0);
  signal n129_o : std_logic;
  signal n130_o : std_logic_vector (2 downto 0);
  signal n131_o : std_logic;
  signal n132_o : std_logic;
  signal n133_o : std_logic_vector (31 downto 0);
  signal n134_o : std_logic_vector (31 downto 0);
  signal n135_o : std_logic_vector (31 downto 0);
  signal n136_o : std_logic;
  signal n137_o : std_logic_vector (2 downto 0);
  signal n138_o : std_logic;
  signal n139_o : std_logic;
  signal n140_o : std_logic_vector (31 downto 0);
  signal n141_o : std_logic_vector (31 downto 0);
  signal n142_o : std_logic_vector (31 downto 0);
  signal n143_o : std_logic;
  signal n144_o : std_logic;
  signal n145_o : std_logic_vector (2 downto 0);
  signal n146_o : std_logic;
  signal n155_q : std_logic;
  signal n156_q : std_logic_vector (31 downto 0);
  signal n157_q : std_logic_vector (31 downto 0);
  signal n158_q : std_logic_vector (31 downto 0);
  signal n159_q : std_logic;
  signal n160_q : std_logic;
  signal n161_q : std_logic_vector (2 downto 0);
  signal n162_q : std_logic;
begin
  im_addr_o <= pc_next;
  im_rd_o <= n64_o;
  f_valid_o <= n155_q;
  f_ir_o <= n156_q;
  f_pc_o <= n157_q;
  dbg_enabled_o <= dbg_mode;
  dbg_insn_ready_o <= n67_o;
  -- urv_fetch.v:64:15
  pc <= n158_q; -- (signal)
  -- urv_fetch.v:65:23
  rst_d <= n159_q; -- (signal)
  -- urv_fetch.v:67:16
  pc_next <= n61_o; -- (signal)
  -- urv_fetch.v:68:16
  dbg_mode <= n160_q; -- (signal)
  -- urv_fetch.v:69:16
  pipeline_cnt <= n161_q; -- (signal)
  -- urv_fetch.v:70:16
  frozen <= n53_o; -- (signal)
  -- urv_fetch.v:74:16
  f_kill <= n162_q; -- (signal)
  -- urv_fetch.v:78:21
  n48_o <= f_stall_i or dbg_mode;
  -- urv_fetch.v:78:33
  n49_o <= n48_o or dbg_force_i;
  -- urv_fetch.v:78:51
  n50_o <= "00000000000000000000000000000" & pipeline_cnt;  --  uext
  -- urv_fetch.v:78:64
  n52_o <= '1' when n50_o /= "00000000000000000000000000000000" else '0';
  -- urv_fetch.v:78:48
  n53_o <= n49_o or n52_o;
  -- urv_fetch.v:83:21
  n54_o <= rst_d or frozen;
  -- urv_fetch.v:83:31
  n55_o <= n54_o or f_kill;
  -- urv_fetch.v:83:44
  n56_o <= not im_valid_i;
  -- urv_fetch.v:83:41
  n57_o <= n55_o or n56_o;
  -- urv_fetch.v:86:22
  n59_o <= std_logic_vector (unsigned (pc) + unsigned'("00000000000000000000000000000100"));
  -- urv_fetch.v:83:11
  n60_o <= n59_o when n57_o = '0' else pc;
  -- urv_fetch.v:81:6
  n61_o <= n60_o when x_bra_i = '0' else x_pc_bra_i;
  -- urv_fetch.v:90:41
  n62_o <= frozen or rst_i;
  -- urv_fetch.v:90:32
  n63_o <= not n62_o;
  -- urv_fetch.v:90:29
  n64_o <= x_bra_i or n63_o;
  -- urv_fetch.v:93:30
  n65_o <= "00000000000000000000000000000" & pipeline_cnt;  --  uext
  -- urv_fetch.v:93:43
  n67_o <= '1' when n65_o = "00000000000000000000000000000100" else '0';
  -- urv_fetch.v:119:15
  n77_o <= not f_stall_i;
  -- urv_fetch.v:125:22
  n78_o <= not dbg_mode;
  -- urv_fetch.v:126:35
  n79_o <= dbg_force_i or x_dbg_toggle_i;
  -- urv_fetch.v:126:56
  n80_o <= "00000000000000000000000000000" & pipeline_cnt;  --  uext
  -- urv_fetch.v:126:69
  n82_o <= '1' when n80_o /= "00000000000000000000000000000000" else '0';
  -- urv_fetch.v:126:53
  n83_o <= n79_o or n82_o;
  -- urv_fetch.v:126:19
  n84_o <= n78_o and n83_o;
  -- urv_fetch.v:134:25
  n86_o <= "00000000000000000000000000000" & pipeline_cnt;  --  uext
  -- urv_fetch.v:134:38
  n88_o <= '1' when n86_o = "00000000000000000000000000000100" else '0';
  -- urv_fetch.v:134:43
  n89_o <= n88_o or x_dbg_toggle_i;
  -- urv_fetch.v:140:52
  n93_o <= std_logic_vector (unsigned (pipeline_cnt) + unsigned'("001"));
  -- urv_fetch.v:134:21
  n94_o <= dbg_mode when n89_o = '0' else '1';
  -- urv_fetch.v:134:21
  n95_o <= n93_o when n89_o = '0' else "000";
  -- urv_fetch.v:145:21
  n99_o <= '1' when x_dbg_toggle_i = '0' else '0';
  -- urv_fetch.v:145:21
  n100_o <= dbg_insn_i when x_dbg_toggle_i = '0' else n156_q;
  -- urv_fetch.v:142:21
  n101_o <= dbg_mode when n124_o = '0' else '0';
  -- urv_fetch.v:158:40
  n102_o <= x_dbg_toggle_i or dbg_insn_set_i;
  -- urv_fetch.v:160:30
  n104_o <= "00000000000000000000000000000" & pipeline_cnt;  --  uext
  -- urv_fetch.v:160:43
  n106_o <= '1' when n104_o /= "00000000000000000000000000000100" else '0';
  -- urv_fetch.v:161:52
  n108_o <= std_logic_vector (unsigned (pipeline_cnt) + unsigned'("001"));
  -- urv_fetch.v:160:26
  n109_o <= pipeline_cnt when n106_o = '0' else n108_o;
  -- urv_fetch.v:158:21
  n110_o <= n109_o when n102_o = '0' else "000";
  -- urv_fetch.v:168:35
  n111_o <= not rst_d;
  -- urv_fetch.v:168:45
  n112_o <= not x_bra_i;
  -- urv_fetch.v:168:42
  n113_o <= n111_o and n112_o;
  -- urv_fetch.v:168:57
  n114_o <= not f_kill;
  -- urv_fetch.v:168:54
  n115_o <= n113_o and n114_o;
  -- urv_fetch.v:176:38
  n117_o <= f_kill or x_bra_i;
  -- urv_fetch.v:163:21
  n119_o <= '0' when im_valid_i = '0' else n115_o;
  -- urv_fetch.v:163:21
  n120_o <= n156_q when im_valid_i = '0' else im_data_i;
  -- urv_fetch.v:163:21
  n121_o <= n117_o when im_valid_i = '0' else '0';
  -- urv_fetch.v:142:21
  n122_o <= n119_o when dbg_mode = '0' else n99_o;
  -- urv_fetch.v:142:21
  n123_o <= n120_o when dbg_mode = '0' else n100_o;
  -- urv_fetch.v:142:21
  n124_o <= dbg_mode and x_dbg_toggle_i;
  -- urv_fetch.v:142:21
  n125_o <= pipeline_cnt when dbg_mode = '0' else n110_o;
  -- urv_fetch.v:142:21
  n126_o <= n121_o when dbg_mode = '0' else f_kill;
  -- urv_fetch.v:124:16
  n127_o <= n122_o when n84_o = '0' else '0';
  -- urv_fetch.v:124:16
  n128_o <= n123_o when n84_o = '0' else n156_q;
  -- urv_fetch.v:124:16
  n129_o <= n101_o when n84_o = '0' else n94_o;
  -- urv_fetch.v:124:16
  n130_o <= n125_o when n84_o = '0' else n95_o;
  -- urv_fetch.v:124:16
  n131_o <= n126_o when n84_o = '0' else f_kill;
  -- urv_fetch.v:119:11
  n132_o <= n155_q when n77_o = '0' else n127_o;
  -- urv_fetch.v:119:11
  n133_o <= n156_q when n77_o = '0' else n128_o;
  -- urv_fetch.v:119:11
  n134_o <= n157_q when n77_o = '0' else pc;
  -- urv_fetch.v:119:11
  n135_o <= pc when n77_o = '0' else pc_next;
  -- urv_fetch.v:119:11
  n136_o <= dbg_mode when n77_o = '0' else n129_o;
  -- urv_fetch.v:119:11
  n137_o <= pipeline_cnt when n77_o = '0' else n130_o;
  -- urv_fetch.v:119:11
  n138_o <= f_kill when n77_o = '0' else n131_o;
  -- urv_fetch.v:96:6
  n139_o <= n132_o when rst_i = '0' else '0';
  -- urv_fetch.v:96:6
  n140_o <= n133_o when rst_i = '0' else "00000000000000000000000000000000";
  -- urv_fetch.v:96:6
  n141_o <= n134_o when rst_i = '0' else "00000000000000000000000000000000";
  -- urv_fetch.v:96:6
  n142_o <= n135_o when rst_i = '0' else "00000000000000000000000000000000";
  -- urv_fetch.v:96:6
  n143_o <= '0' when rst_i = '0' else '1';
  -- urv_fetch.v:96:6
  n144_o <= n136_o when rst_i = '0' else dbg_force_i;
  -- urv_fetch.v:96:6
  n145_o <= n137_o when rst_i = '0' else "000";
  -- urv_fetch.v:96:6
  n146_o <= n138_o when rst_i = '0' else '0';
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n155_q <= n139_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n156_q <= n140_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n157_q <= n141_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n158_q <= n142_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n159_q <= n143_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n160_q <= n144_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n161_q <= n145_o;
    end if;
  end process;
  -- urv_fetch.v:95:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n162_q <= n146_o;
    end if;
  end process;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity urv_cpu is
  generic (
    g_timer_frequency : natural := 1000;
    g_clock_frequency : natural := 100000000;
    g_with_hw_div : natural := 0;
    g_with_hw_mul : natural := 0;
    g_with_hw_mulh : natural := 0;
    g_with_hw_debug : natural := 0;
    g_with_compressed_insns : natural := 0;
    g_with_ecc : natural := 0);
  port (
    clk_i : in std_logic;
    rst_i : in std_logic;
    irq_i : in std_logic;
    im_data_i : in std_logic_vector (31 downto 0);
    im_valid_i : in std_logic;
    dm_data_l_i : in std_logic_vector (31 downto 0);
    dm_load_done_i : in std_logic;
    dm_store_done_i : in std_logic;
    dbg_force_i : in std_logic;
    dbg_insn_i : in std_logic_vector (31 downto 0);
    dbg_insn_set_i : in std_logic;
    dbg_mbx_data_i : in std_logic_vector (31 downto 0);
    dbg_mbx_write_i : in std_logic;
    fault_o : out std_logic;
    im_addr_o : out std_logic_vector (31 downto 0);
    im_rd_o : out std_logic;
    dm_addr_o : out std_logic_vector (31 downto 0);
    dm_data_s_o : out std_logic_vector (31 downto 0);
    dm_data_select_o : out std_logic_vector (3 downto 0);
    dm_store_o : out std_logic;
    dm_load_o : out std_logic;
    dbg_enabled_o : out std_logic;
    dbg_insn_ready_o : out std_logic;
    dbg_mbx_data_o : out std_logic_vector (31 downto 0));
end entity urv_cpu;

architecture rtl of urv_cpu is
  signal f_stall : std_logic;
  signal x_stall : std_logic;
  signal x_kill : std_logic;
  signal d_stall : std_logic;
  signal d_kill : std_logic;
  signal d_stall_req : std_logic;
  signal w_stall_req : std_logic;
  signal x_stall_req : std_logic;
  signal x_fault : std_logic;
  signal x2f_pc_bra : std_logic_vector (31 downto 0);
  signal x2f_bra : std_logic;
  signal x2f_dbg_toggle : std_logic;
  signal f2d_pc : std_logic_vector (31 downto 0);
  signal f2d_ir : std_logic_vector (31 downto 0);
  signal f2d_valid : std_logic;
  signal rf_rs1 : std_logic_vector (4 downto 0);
  signal rf_rs2 : std_logic_vector (4 downto 0);
  signal rf_rd : std_logic_vector (4 downto 0);
  signal rf_rd_value : std_logic_vector (31 downto 0);
  signal rf_rd_ecc : std_logic_vector (6 downto 0);
  signal rf_rd_ecc_flip : std_logic_vector (1 downto 0);
  signal rf_rd_write : std_logic;
  signal d2x_valid : std_logic;
  signal d2x_pc : std_logic_vector (31 downto 0);
  signal d2x_rs1 : std_logic_vector (4 downto 0);
  signal d2x_rs2 : std_logic_vector (4 downto 0);
  signal d2x_rd : std_logic_vector (4 downto 0);
  signal d2x_fun : std_logic_vector (2 downto 0);
  signal d2x_opcode : std_logic_vector (4 downto 0);
  signal d2x_shifter_sign : std_logic;
  signal d2x_is_load : std_logic;
  signal d2x_is_store : std_logic;
  signal d2x_is_undef : std_logic;
  signal d2x_is_write_ecc : std_logic;
  signal d2x_is_fix_ecc : std_logic;
  signal d2x_imm : std_logic_vector (31 downto 0);
  signal d2x_is_signed_alu_op : std_logic;
  signal d2x_rd_source : std_logic_vector (2 downto 0);
  signal d2x_rd_write : std_logic;
  signal d2x_csr_sel : std_logic_vector (11 downto 0);
  signal d2x_csr_imm : std_logic_vector (4 downto 0);
  signal d2x_is_csr : std_logic;
  signal d2x_is_mret : std_logic;
  signal d2x_is_ebreak : std_logic;
  signal d2x_alu_op1 : std_logic_vector (31 downto 0);
  signal d2x_alu_op2 : std_logic_vector (31 downto 0);
  signal d2x_use_op1 : std_logic;
  signal d2x_use_op2 : std_logic;
  signal d2x_use_rs1 : std_logic;
  signal d2x_use_rs2 : std_logic;
  signal d2x_is_multiply : std_logic;
  signal d2x_is_divide : std_logic;
  signal x2w_rd : std_logic_vector (4 downto 0);
  signal x2w_rd_value : std_logic_vector (31 downto 0);
  signal x2w_rd_shifter : std_logic_vector (31 downto 0);
  signal x2w_rd_multiply : std_logic_vector (31 downto 0);
  signal x2w_dm_addr : std_logic_vector (31 downto 0);
  signal x2w_rd_write : std_logic;
  signal x2w_fun : std_logic_vector (2 downto 0);
  signal x2w_store : std_logic;
  signal x2w_load : std_logic;
  signal x2w_rd_source : std_logic_vector (1 downto 0);
  signal x2w_valid : std_logic;
  signal x2w_ecc_flip : std_logic_vector (1 downto 0);
  signal x_rs2_value : std_logic_vector (31 downto 0);
  signal x_rs1_value : std_logic_vector (31 downto 0);
  signal x_rs1_ecc_err : std_logic;
  signal x_rs2_ecc_err : std_logic;
  signal rf_bypass_rd_value : std_logic_vector (31 downto 0);
  signal rf_bypass_rd_write : std_logic;
  signal n11_o : std_logic;
  signal n12_o : std_logic;
  signal csr_time : std_logic_vector (39 downto 0);
  signal csr_cycles : std_logic_vector (39 downto 0);
  signal d2x_is_add : std_logic;
  signal sys_tick : std_logic;
  signal x2f_bra_d0 : std_logic;
  signal x2f_bra_d1 : std_logic;
  signal fetch_im_addr_o : std_logic_vector (31 downto 0);
  signal fetch_im_rd_o : std_logic;
  signal fetch_f_valid_o : std_logic;
  signal fetch_f_ir_o : std_logic_vector (31 downto 0);
  signal fetch_f_pc_o : std_logic_vector (31 downto 0);
  signal fetch_dbg_enabled_o : std_logic;
  signal fetch_dbg_insn_ready_o : std_logic;
  signal decode_d_stall_req_o : std_logic;
  signal decode_rf_rs1_o : std_logic_vector (4 downto 0);
  signal decode_rf_rs2_o : std_logic_vector (4 downto 0);
  signal decode_x_valid_o : std_logic;
  signal decode_x_pc_o : std_logic_vector (31 downto 0);
  signal decode_x_rs1_o : std_logic_vector (4 downto 0);
  signal decode_x_rs2_o : std_logic_vector (4 downto 0);
  signal decode_x_rd_o : std_logic_vector (4 downto 0);
  signal decode_x_fun_o : std_logic_vector (2 downto 0);
  signal decode_x_opcode_o : std_logic_vector (4 downto 0);
  signal decode_x_shifter_sign_o : std_logic;
  signal decode_x_is_signed_alu_op_o : std_logic;
  signal decode_x_is_add_o : std_logic;
  signal decode_x_is_load_o : std_logic;
  signal decode_x_is_store_o : std_logic;
  signal decode_x_is_undef_o : std_logic;
  signal decode_x_is_write_ecc_o : std_logic;
  signal decode_x_is_fix_ecc_o : std_logic;
  signal decode_x_rd_source_o : std_logic_vector (2 downto 0);
  signal decode_x_rd_write_o : std_logic;
  signal decode_x_csr_sel_o : std_logic_vector (11 downto 0);
  signal decode_x_csr_imm_o : std_logic_vector (4 downto 0);
  signal decode_x_is_csr_o : std_logic;
  signal decode_x_is_mret_o : std_logic;
  signal decode_x_is_ebreak_o : std_logic;
  signal decode_x_imm_o : std_logic_vector (31 downto 0);
  signal decode_x_alu_op1_o : std_logic_vector (31 downto 0);
  signal decode_x_alu_op2_o : std_logic_vector (31 downto 0);
  signal decode_x_use_op1_o : std_logic;
  signal decode_x_use_op2_o : std_logic;
  signal decode_x_use_rs1_o : std_logic;
  signal decode_x_use_rs2_o : std_logic;
  signal decode_x_is_divide_o : std_logic;
  signal decode_x_is_multiply_o : std_logic;
  signal regfile_x_rs1_value_o : std_logic_vector (31 downto 0);
  signal regfile_x_rs2_value_o : std_logic_vector (31 downto 0);
  signal regfile_x_rs1_ecc_err_o : std_logic;
  signal regfile_x_rs2_ecc_err_o : std_logic;
  signal execute_x_stall_req_o : std_logic;
  signal execute_x_fault_o : std_logic;
  signal execute_f_branch_target_o : std_logic_vector (31 downto 0);
  signal execute_f_branch_take_o : std_logic;
  signal execute_f_dbg_toggle_o : std_logic;
  signal execute_w_fun_o : std_logic_vector (2 downto 0);
  signal execute_w_load_o : std_logic;
  signal execute_w_store_o : std_logic;
  signal execute_w_valid_o : std_logic;
  signal execute_w_rd_o : std_logic_vector (4 downto 0);
  signal execute_w_rd_value_o : std_logic_vector (31 downto 0);
  signal execute_w_rd_write_o : std_logic;
  signal execute_w_dm_addr_o : std_logic_vector (31 downto 0);
  signal execute_w_rd_source_o : std_logic_vector (1 downto 0);
  signal execute_w_rd_shifter_o : std_logic_vector (31 downto 0);
  signal execute_w_rd_multiply_o : std_logic_vector (31 downto 0);
  signal execute_w_ecc_flip_o : std_logic_vector (1 downto 0);
  signal execute_dm_addr_o : std_logic_vector (31 downto 0);
  signal execute_dm_data_s_o : std_logic_vector (31 downto 0);
  signal execute_dm_data_select_o : std_logic_vector (3 downto 0);
  signal execute_dm_store_o : std_logic;
  signal execute_dm_load_o : std_logic;
  signal execute_dbg_mbx_data_o : std_logic_vector (31 downto 0);
  signal writeback_w_stall_req_o : std_logic;
  signal writeback_rf_rd_value_o : std_logic_vector (31 downto 0);
  signal writeback_rf_rd_o : std_logic_vector (4 downto 0);
  signal writeback_rf_rd_ecc_o : std_logic_vector (6 downto 0);
  signal writeback_rf_rd_ecc_flip_o : std_logic_vector (1 downto 0);
  signal writeback_rf_rd_write_o : std_logic;
  signal n13_o : std_logic_vector (31 downto 0);
  signal n15_o : std_logic_vector (31 downto 0);
  signal n16_o : std_logic;
  signal n21_o : std_logic;
  signal n22_o : std_logic;
  signal n23_o : std_logic;
  signal n24_o : std_logic;
  signal n25_o : std_logic;
  signal n28_q : std_logic;
  signal n29_q : std_logic;
  signal n30_o : std_logic;
  signal n31_o : std_logic;
  signal n32_o : std_logic;
  signal n33_o : std_logic;
  signal n34_o : std_logic;
  signal n35_o : std_logic;
  signal n36_o : std_logic;
begin
  fault_o <= n16_o;
  im_addr_o <= fetch_im_addr_o;
  im_rd_o <= fetch_im_rd_o;
  dm_addr_o <= execute_dm_addr_o;
  dm_data_s_o <= execute_dm_data_s_o;
  dm_data_select_o <= execute_dm_data_select_o;
  dm_store_o <= execute_dm_store_o;
  dm_load_o <= execute_dm_load_o;
  dbg_enabled_o <= fetch_dbg_enabled_o;
  dbg_insn_ready_o <= fetch_dbg_insn_ready_o;
  dbg_mbx_data_o <= execute_dbg_mbx_data_o;
  -- urv_cpu.v:92:18
  f_stall <= n31_o; -- (signal)
  -- urv_cpu.v:93:18
  x_stall <= n33_o; -- (signal)
  -- urv_cpu.v:94:18
  x_kill <= n35_o; -- (signal)
  -- urv_cpu.v:95:18
  d_stall <= n32_o; -- (signal)
  -- urv_cpu.v:96:18
  d_kill <= n36_o; -- (signal)
  -- urv_cpu.v:97:18
  d_stall_req <= decode_d_stall_req_o; -- (signal)
  -- urv_cpu.v:98:18
  w_stall_req <= writeback_w_stall_req_o; -- (signal)
  -- urv_cpu.v:99:18
  x_stall_req <= execute_x_stall_req_o; -- (signal)
  -- urv_cpu.v:101:18
  x_fault <= execute_x_fault_o; -- (signal)
  -- urv_cpu.v:104:26
  x2f_pc_bra <= execute_f_branch_target_o; -- (signal)
  -- urv_cpu.v:105:18
  x2f_bra <= execute_f_branch_take_o; -- (signal)
  -- urv_cpu.v:106:18
  x2f_dbg_toggle <= execute_f_dbg_toggle_o; -- (signal)
  -- urv_cpu.v:109:26
  f2d_pc <= fetch_f_pc_o; -- (signal)
  -- urv_cpu.v:109:34
  f2d_ir <= fetch_f_ir_o; -- (signal)
  -- urv_cpu.v:110:18
  f2d_valid <= fetch_f_valid_o; -- (signal)
  -- urv_cpu.v:113:18
  rf_rs1 <= decode_rf_rs1_o; -- (signal)
  -- urv_cpu.v:113:26
  rf_rs2 <= decode_rf_rs2_o; -- (signal)
  -- urv_cpu.v:116:18
  rf_rd <= writeback_rf_rd_o; -- (signal)
  -- urv_cpu.v:117:26
  rf_rd_value <= writeback_rf_rd_value_o; -- (signal)
  -- urv_cpu.v:118:18
  rf_rd_ecc <= writeback_rf_rd_ecc_o; -- (signal)
  -- urv_cpu.v:119:18
  rf_rd_ecc_flip <= writeback_rf_rd_ecc_flip_o; -- (signal)
  -- urv_cpu.v:120:18
  rf_rd_write <= writeback_rf_rd_write_o; -- (signal)
  -- urv_cpu.v:123:18
  d2x_valid <= decode_x_valid_o; -- (signal)
  -- urv_cpu.v:124:26
  d2x_pc <= decode_x_pc_o; -- (signal)
  -- urv_cpu.v:125:18
  d2x_rs1 <= decode_x_rs1_o; -- (signal)
  -- urv_cpu.v:126:18
  d2x_rs2 <= decode_x_rs2_o; -- (signal)
  -- urv_cpu.v:127:18
  d2x_rd <= decode_x_rd_o; -- (signal)
  -- urv_cpu.v:128:18
  d2x_fun <= decode_x_fun_o; -- (signal)
  -- urv_cpu.v:129:18
  d2x_opcode <= decode_x_opcode_o; -- (signal)
  -- urv_cpu.v:130:18
  d2x_shifter_sign <= decode_x_shifter_sign_o; -- (signal)
  -- urv_cpu.v:131:18
  d2x_is_load <= decode_x_is_load_o; -- (signal)
  -- urv_cpu.v:131:31
  d2x_is_store <= decode_x_is_store_o; -- (signal)
  -- urv_cpu.v:131:45
  d2x_is_undef <= decode_x_is_undef_o; -- (signal)
  -- urv_cpu.v:132:18
  d2x_is_write_ecc <= decode_x_is_write_ecc_o; -- (signal)
  -- urv_cpu.v:133:18
  d2x_is_fix_ecc <= decode_x_is_fix_ecc_o; -- (signal)
  -- urv_cpu.v:134:26
  d2x_imm <= decode_x_imm_o; -- (signal)
  -- urv_cpu.v:135:18
  d2x_is_signed_alu_op <= decode_x_is_signed_alu_op_o; -- (signal)
  -- urv_cpu.v:137:18
  d2x_rd_source <= decode_x_rd_source_o; -- (signal)
  -- urv_cpu.v:138:18
  d2x_rd_write <= decode_x_rd_write_o; -- (signal)
  -- urv_cpu.v:139:26
  d2x_csr_sel <= decode_x_csr_sel_o; -- (signal)
  -- urv_cpu.v:140:18
  d2x_csr_imm <= decode_x_csr_imm_o; -- (signal)
  -- urv_cpu.v:141:18
  d2x_is_csr <= decode_x_is_csr_o; -- (signal)
  -- urv_cpu.v:141:30
  d2x_is_mret <= decode_x_is_mret_o; -- (signal)
  -- urv_cpu.v:141:43
  d2x_is_ebreak <= decode_x_is_ebreak_o; -- (signal)
  -- urv_cpu.v:142:26
  d2x_alu_op1 <= decode_x_alu_op1_o; -- (signal)
  -- urv_cpu.v:142:39
  d2x_alu_op2 <= decode_x_alu_op2_o; -- (signal)
  -- urv_cpu.v:143:18
  d2x_use_op1 <= decode_x_use_op1_o; -- (signal)
  -- urv_cpu.v:143:31
  d2x_use_op2 <= decode_x_use_op2_o; -- (signal)
  -- urv_cpu.v:144:18
  d2x_use_rs1 <= decode_x_use_rs1_o; -- (signal)
  -- urv_cpu.v:144:31
  d2x_use_rs2 <= decode_x_use_rs2_o; -- (signal)
  -- urv_cpu.v:145:18
  d2x_is_multiply <= decode_x_is_multiply_o; -- (signal)
  -- urv_cpu.v:145:35
  d2x_is_divide <= decode_x_is_divide_o; -- (signal)
  -- urv_cpu.v:148:18
  x2w_rd <= execute_w_rd_o; -- (signal)
  -- urv_cpu.v:149:26
  x2w_rd_value <= execute_w_rd_value_o; -- (signal)
  -- urv_cpu.v:150:26
  x2w_rd_shifter <= execute_w_rd_shifter_o; -- (signal)
  -- urv_cpu.v:151:26
  x2w_rd_multiply <= execute_w_rd_multiply_o; -- (signal)
  -- urv_cpu.v:152:26
  x2w_dm_addr <= execute_w_dm_addr_o; -- (signal)
  -- urv_cpu.v:153:18
  x2w_rd_write <= execute_w_rd_write_o; -- (signal)
  -- urv_cpu.v:154:18
  x2w_fun <= execute_w_fun_o; -- (signal)
  -- urv_cpu.v:155:18
  x2w_store <= execute_w_store_o; -- (signal)
  -- urv_cpu.v:156:18
  x2w_load <= execute_w_load_o; -- (signal)
  -- urv_cpu.v:157:18
  x2w_rd_source <= execute_w_rd_source_o; -- (signal)
  -- urv_cpu.v:158:18
  x2w_valid <= execute_w_valid_o; -- (signal)
  -- urv_cpu.v:159:18
  x2w_ecc_flip <= execute_w_ecc_flip_o; -- (signal)
  -- urv_cpu.v:162:26
  x_rs2_value <= regfile_x_rs2_value_o; -- (signal)
  -- urv_cpu.v:162:39
  x_rs1_value <= regfile_x_rs1_value_o; -- (signal)
  -- urv_cpu.v:163:18
  x_rs1_ecc_err <= regfile_x_rs1_ecc_err_o; -- (signal)
  -- urv_cpu.v:163:33
  x_rs2_ecc_err <= regfile_x_rs2_ecc_err_o; -- (signal)
  -- urv_cpu.v:164:26
  rf_bypass_rd_value <= x2w_rd_value; -- (signal)
  -- urv_cpu.v:165:18
  rf_bypass_rd_write <= n12_o; -- (signal)
  -- urv_cpu.v:165:54
  n11_o <= not x2w_load;
  -- urv_cpu.v:165:51
  n12_o <= rf_rd_write and n11_o;
  -- urv_cpu.v:168:26
  csr_time <= (39 downto 0 => 'X'); -- (signal)
  -- urv_cpu.v:168:36
  csr_cycles <= (39 downto 0 => 'X'); -- (signal)
  -- urv_cpu.v:248:19
  d2x_is_add <= decode_x_is_add_o; -- (signal)
  -- urv_cpu.v:390:21
  sys_tick <= '0'; -- (signal)
  -- urv_cpu.v:461:26
  x2f_bra_d0 <= n28_q; -- (signal)
  -- urv_cpu.v:461:38
  x2f_bra_d1 <= n29_q; -- (signal)
  -- urv_cpu.v:178:4
  fetch : entity work.urv_fetch port map (
    clk_i => clk_i,
    rst_i => rst_i,
    f_stall_i => f_stall,
    im_data_i => im_data_i,
    im_valid_i => im_valid_i,
    x_pc_bra_i => x2f_pc_bra,
    x_bra_i => x2f_bra,
    dbg_force_i => dbg_force_i,
    dbg_insn_i => dbg_insn_i,
    dbg_insn_set_i => dbg_insn_set_i,
    x_dbg_toggle_i => x2f_dbg_toggle,
    im_addr_o => fetch_im_addr_o,
    im_rd_o => fetch_im_rd_o,
    f_valid_o => fetch_f_valid_o,
    f_ir_o => fetch_f_ir_o,
    f_pc_o => fetch_f_pc_o,
    dbg_enabled_o => fetch_dbg_enabled_o,
    dbg_insn_ready_o => fetch_dbg_insn_ready_o);
  -- urv_cpu.v:216:4
  decode : entity work.urv_decode port map (
    clk_i => clk_i,
    rst_i => rst_i,
    d_stall_i => d_stall,
    d_kill_i => d_kill,
    f_ir_i => f2d_ir,
    f_pc_i => f2d_pc,
    f_valid_i => f2d_valid,
    d_stall_req_o => decode_d_stall_req_o,
    rf_rs1_o => decode_rf_rs1_o,
    rf_rs2_o => decode_rf_rs2_o,
    x_valid_o => decode_x_valid_o,
    x_pc_o => decode_x_pc_o,
    x_rs1_o => decode_x_rs1_o,
    x_rs2_o => decode_x_rs2_o,
    x_rd_o => decode_x_rd_o,
    x_fun_o => decode_x_fun_o,
    x_opcode_o => decode_x_opcode_o,
    x_shifter_sign_o => decode_x_shifter_sign_o,
    x_is_signed_alu_op_o => decode_x_is_signed_alu_op_o,
    x_is_add_o => decode_x_is_add_o,
    x_is_load_o => decode_x_is_load_o,
    x_is_store_o => decode_x_is_store_o,
    x_is_undef_o => decode_x_is_undef_o,
    x_is_write_ecc_o => decode_x_is_write_ecc_o,
    x_is_fix_ecc_o => decode_x_is_fix_ecc_o,
    x_rd_source_o => decode_x_rd_source_o,
    x_rd_write_o => decode_x_rd_write_o,
    x_csr_sel_o => decode_x_csr_sel_o,
    x_csr_imm_o => decode_x_csr_imm_o,
    x_is_csr_o => decode_x_is_csr_o,
    x_is_mret_o => decode_x_is_mret_o,
    x_is_ebreak_o => decode_x_is_ebreak_o,
    x_imm_o => decode_x_imm_o,
    x_alu_op1_o => decode_x_alu_op1_o,
    x_alu_op2_o => decode_x_alu_op2_o,
    x_use_op1_o => decode_x_use_op1_o,
    x_use_op2_o => decode_x_use_op2_o,
    x_use_rs1_o => decode_x_use_rs1_o,
    x_use_rs2_o => decode_x_use_rs2_o,
    x_is_divide_o => decode_x_is_divide_o,
    x_is_multiply_o => decode_x_is_multiply_o);
  -- urv_cpu.v:274:4
  regfile : entity work.urv_regfile port map (
    clk_i => clk_i,
    rst_i => rst_i,
    d_stall_i => d_stall,
    rf_rs1_i => rf_rs1,
    rf_rs2_i => rf_rs2,
    d_rs1_i => d2x_rs1,
    d_rs2_i => d2x_rs2,
    w_rd_i => rf_rd,
    w_rd_value_i => rf_rd_value,
    w_rd_ecc_i => rf_rd_ecc,
    w_rd_ecc_flip_i => rf_rd_ecc_flip,
    w_rd_store_i => rf_rd_write,
    w_bypass_rd_write_i => rf_bypass_rd_write,
    w_bypass_rd_value_i => rf_bypass_rd_value,
    x_rs1_value_o => regfile_x_rs1_value_o,
    x_rs2_value_o => regfile_x_rs2_value_o,
    x_rs1_ecc_err_o => regfile_x_rs1_ecc_err_o,
    x_rs2_ecc_err_o => regfile_x_rs2_ecc_err_o);
  -- urv_cpu.v:309:4
  execute : entity work.urv_exec port map (
    clk_i => clk_i,
    rst_i => rst_i,
    x_stall_i => x_stall,
    x_kill_i => x_kill,
    d_pc_i => d2x_pc,
    d_rd_i => d2x_rd,
    d_fun_i => d2x_fun,
    rf_rs1_value_i => x_rs1_value,
    rf_rs2_value_i => x_rs2_value,
    rf_rs1_ecc_err_i => x_rs1_ecc_err,
    rf_rs2_ecc_err_i => x_rs2_ecc_err,
    d_valid_i => d2x_valid,
    d_opcode_i => d2x_opcode,
    d_shifter_sign_i => d2x_shifter_sign,
    d_is_csr_i => d2x_is_csr,
    d_is_mret_i => d2x_is_mret,
    d_is_ebreak_i => d2x_is_ebreak,
    d_dbg_mode_i => fetch_dbg_enabled_o,
    d_csr_imm_i => d2x_csr_imm,
    d_csr_sel_i => d2x_csr_sel,
    d_imm_i => d2x_imm,
    d_is_signed_alu_op_i => d2x_is_signed_alu_op,
    d_is_add_i => d2x_is_add,
    d_is_load_i => d2x_is_load,
    d_is_store_i => d2x_is_store,
    d_is_divide_i => d2x_is_divide,
    d_is_multiply_i => d2x_is_multiply,
    d_is_undef_i => d2x_is_undef,
    d_is_write_ecc_i => d2x_is_write_ecc,
    d_is_fix_ecc_i => d2x_is_fix_ecc,
    d_alu_op1_i => d2x_alu_op1,
    d_alu_op2_i => d2x_alu_op2,
    d_use_op1_i => d2x_use_op1,
    d_use_op2_i => d2x_use_op2,
    d_use_rs1_i => d2x_use_rs1,
    d_use_rs2_i => d2x_use_rs2,
    d_rd_source_i => d2x_rd_source,
    d_rd_write_i => d2x_rd_write,
    irq_i => irq_i,
    csr_time_i => csr_time,
    csr_cycles_i => csr_cycles,
    timer_tick_i => sys_tick,
    dbg_mbx_data_i => dbg_mbx_data_i,
    dbg_mbx_write_i => dbg_mbx_write_i,
    x_stall_req_o => execute_x_stall_req_o,
    x_fault_o => execute_x_fault_o,
    f_branch_target_o => execute_f_branch_target_o,
    f_branch_take_o => execute_f_branch_take_o,
    f_dbg_toggle_o => execute_f_dbg_toggle_o,
    w_fun_o => execute_w_fun_o,
    w_load_o => execute_w_load_o,
    w_store_o => execute_w_store_o,
    w_valid_o => execute_w_valid_o,
    w_rd_o => execute_w_rd_o,
    w_rd_value_o => execute_w_rd_value_o,
    w_rd_write_o => execute_w_rd_write_o,
    w_dm_addr_o => execute_w_dm_addr_o,
    w_rd_source_o => execute_w_rd_source_o,
    w_rd_shifter_o => execute_w_rd_shifter_o,
    w_rd_multiply_o => execute_w_rd_multiply_o,
    w_ecc_flip_o => execute_w_ecc_flip_o,
    dm_addr_o => execute_dm_addr_o,
    dm_data_s_o => execute_dm_data_s_o,
    dm_data_select_o => execute_dm_data_select_o,
    dm_store_o => execute_dm_store_o,
    dm_load_o => execute_dm_load_o,
    dbg_mbx_data_o => execute_dbg_mbx_data_o);
  -- urv_cpu.v:401:4
  writeback : entity work.urv_writeback port map (
    clk_i => clk_i,
    rst_i => rst_i,
    x_fun_i => x2w_fun,
    x_load_i => x2w_load,
    x_store_i => x2w_store,
    x_dm_addr_i => x2w_dm_addr,
    x_rd_i => x2w_rd,
    x_rd_value_i => x2w_rd_value,
    x_rd_write_i => x2w_rd_write,
    x_valid_i => x2w_valid,
    x_shifter_rd_value_i => x2w_rd_shifter,
    x_multiply_rd_value_i => x2w_rd_multiply,
    x_rd_source_i => x2w_rd_source,
    x_ecc_flip_i => x2w_ecc_flip,
    dm_data_l_i => dm_data_l_i,
    dm_load_done_i => dm_load_done_i,
    dm_store_done_i => dm_store_done_i,
    w_stall_req_o => writeback_w_stall_req_o,
    rf_rd_value_o => writeback_rf_rd_value_o,
    rf_rd_o => writeback_rf_rd_o,
    rf_rd_ecc_o => writeback_rf_rd_ecc_o,
    rf_rd_ecc_flip_o => writeback_rf_rd_ecc_flip_o,
    rf_rd_write_o => writeback_rf_rd_write_o);
  -- urv_cpu.v:436:21
  n13_o <= "0000000000000000000000000000000" & x_fault;  --  uext
  -- urv_cpu.v:436:29
  n15_o <= n13_o and "00000000000000000000000000000000";
  n16_o <= n15_o (0);
  -- urv_cpu.v:467:19
  n21_o <= not x_stall;
  -- urv_cpu.v:467:15
  n22_o <= x2f_bra_d0 when n21_o = '0' else x2f_bra;
  -- urv_cpu.v:467:15
  n23_o <= x2f_bra_d1 when n21_o = '0' else x2f_bra_d0;
  -- urv_cpu.v:464:6
  n24_o <= n22_o when rst_i = '0' else '0';
  -- urv_cpu.v:464:6
  n25_o <= n23_o when rst_i = '0' else '0';
  -- urv_cpu.v:463:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n28_q <= n24_o;
    end if;
  end process;
  -- urv_cpu.v:463:4
  process (clk_i)
  begin
    if rising_edge (clk_i) then
      n29_q <= n25_o;
    end if;
  end process;
  -- urv_cpu.v:473:33
  n30_o <= x_stall_req or w_stall_req;
  -- urv_cpu.v:473:48
  n31_o <= n30_o or d_stall_req;
  -- urv_cpu.v:474:33
  n32_o <= x_stall_req or w_stall_req;
  -- urv_cpu.v:475:33
  n33_o <= x_stall_req or w_stall_req;
  -- urv_cpu.v:477:28
  n34_o <= x2f_bra or x2f_bra_d0;
  -- urv_cpu.v:477:42
  n35_o <= n34_o or x2f_bra_d1;
  -- urv_cpu.v:478:28
  n36_o <= x2f_bra or x2f_bra_d0;
end rtl;

