vertigo_vhdl 0.8.5 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vertigo/parser.rb +28 -5
  3. data/lib/vertigo/tb_generator.rb +20 -7
  4. data/lib/vertigo/version.rb +1 -1
  5. data/tests/parser_tests/test_adder_rca_vhdl93.vhd +37 -0
  6. metadata +4 -85
  7. data/tests/ghdl_tests/test_fsm.vhd +0 -162
  8. data/tests/parser_tests/else.vhd +0 -64
  9. data/tests/parser_tests/pingpong.vhd +0 -34
  10. data/tests/parser_tests/test_accelerator_pp.vhd +0 -144
  11. data/tests/parser_tests/test_aggregate_pp.vhd +0 -15
  12. data/tests/parser_tests/test_archi_1_pp.vhd +0 -41
  13. data/tests/parser_tests/test_array_array_00_pp.vhd +0 -25
  14. data/tests/parser_tests/test_array_urange_pp.vhd +0 -25
  15. data/tests/parser_tests/test_chu-1_pp.vhd +0 -104
  16. data/tests/parser_tests/test_concat_pp.vhd +0 -14
  17. data/tests/parser_tests/test_counter_pp.vhd +0 -35
  18. data/tests/parser_tests/test_de2_pp.vhd +0 -274
  19. data/tests/parser_tests/test_encode_pp.vhd +0 -2549
  20. data/tests/parser_tests/test_fsm_pp.vhd +0 -125
  21. data/tests/parser_tests/test_fsm_synth_pp.vhd +0 -197
  22. data/tests/parser_tests/test_function-01_pp.vhd +0 -18
  23. data/tests/parser_tests/test_lfsr_pp.vhd +0 -44
  24. data/tests/parser_tests/test_microwatt_cache_ram_pp.vhd +0 -68
  25. data/tests/parser_tests/test_microwatt_common_pp.vhd +0 -336
  26. data/tests/parser_tests/test_microwatt_control_pp.vhd +0 -187
  27. data/tests/parser_tests/test_microwatt_core_debug_pp.vhd +0 -104
  28. data/tests/parser_tests/test_microwatt_core_pp.vhd +0 -231
  29. data/tests/parser_tests/test_microwatt_core_tb_pp.vhd +0 -43
  30. data/tests/parser_tests/test_microwatt_countzero_pp.vhd +0 -120
  31. data/tests/parser_tests/test_microwatt_countzero_tb_pp.vhd +0 -70
  32. data/tests/parser_tests/test_microwatt_cr_file_pp.vhd +0 -74
  33. data/tests/parser_tests/test_microwatt_cr_hazard_pp.vhd +0 -51
  34. data/tests/parser_tests/test_microwatt_crhelpers_pp.vhd +0 -48
  35. data/tests/parser_tests/test_microwatt_dcache_pp.vhd +0 -481
  36. data/tests/parser_tests/test_microwatt_dcache_tb_pp.vhd +0 -98
  37. data/tests/parser_tests/test_microwatt_decode1_pp.vhd +0 -138
  38. data/tests/parser_tests/test_microwatt_decode2_pp.vhd +0 -300
  39. data/tests/parser_tests/test_microwatt_decode_types_pp.vhd +0 -67
  40. data/tests/parser_tests/test_microwatt_divider_pp.vhd +0 -132
  41. data/tests/parser_tests/test_microwatt_divider_tb_pp.vhd +0 -95
  42. data/tests/parser_tests/test_microwatt_dmi_dtm_dummy_pp.vhd +0 -29
  43. data/tests/parser_tests/test_microwatt_dmi_dtm_tb_pp.vhd +0 -197
  44. data/tests/parser_tests/test_microwatt_dmi_dtm_xilinx_pp.vhd +0 -139
  45. data/tests/parser_tests/test_microwatt_execute1_pp.vhd +0 -689
  46. data/tests/parser_tests/test_microwatt_fetch1_pp.vhd +0 -88
  47. data/tests/parser_tests/test_microwatt_fetch2_pp.vhd +0 -79
  48. data/tests/parser_tests/test_microwatt_glibc_random_helpers_pp.vhd +0 -25
  49. data/tests/parser_tests/test_microwatt_glibc_random_pp.vhd +0 -41
  50. data/tests/parser_tests/test_microwatt_gpr_hazard_pp.vhd +0 -68
  51. data/tests/parser_tests/test_microwatt_helpers_pp.vhd +0 -153
  52. data/tests/parser_tests/test_microwatt_icache_pp.vhd +0 -337
  53. data/tests/parser_tests/test_microwatt_icache_tb_pp.vhd +0 -104
  54. data/tests/parser_tests/test_microwatt_insn_helpers_pp.vhd +0 -208
  55. data/tests/parser_tests/test_microwatt_loadstore1_pp.vhd +0 -222
  56. data/tests/parser_tests/test_microwatt_logical_pp.vhd +0 -87
  57. data/tests/parser_tests/test_microwatt_multiply_pp.vhd +0 -84
  58. data/tests/parser_tests/test_microwatt_multiply_tb_pp.vhd +0 -75
  59. data/tests/parser_tests/test_microwatt_plru_pp.vhd +0 -46
  60. data/tests/parser_tests/test_microwatt_plru_tb_pp.vhd +0 -93
  61. data/tests/parser_tests/test_microwatt_ppc_fx_insns_pp.vhd +0 -665
  62. data/tests/parser_tests/test_microwatt_register_file_pp.vhd +0 -86
  63. data/tests/parser_tests/test_microwatt_rotator_pp.vhd +0 -149
  64. data/tests/parser_tests/test_microwatt_rotator_tb_pp.vhd +0 -134
  65. data/tests/parser_tests/test_microwatt_sim_bram_helpers_pp.vhd +0 -52
  66. data/tests/parser_tests/test_microwatt_sim_bram_pp.vhd +0 -53
  67. data/tests/parser_tests/test_microwatt_sim_console_pp.vhd +0 -43
  68. data/tests/parser_tests/test_microwatt_sim_jtag_pp.vhd +0 -64
  69. data/tests/parser_tests/test_microwatt_sim_jtag_socket_pp.vhd +0 -36
  70. data/tests/parser_tests/test_microwatt_sim_uart_pp.vhd +0 -90
  71. data/tests/parser_tests/test_microwatt_soc_pp.vhd +0 -195
  72. data/tests/parser_tests/test_microwatt_utils_pp.vhd +0 -39
  73. data/tests/parser_tests/test_microwatt_wishbone_arbiter_pp.vhd +0 -54
  74. data/tests/parser_tests/test_microwatt_wishbone_bram_tb_pp.vhd +0 -157
  75. data/tests/parser_tests/test_microwatt_wishbone_bram_wrapper_pp.vhd +0 -62
  76. data/tests/parser_tests/test_microwatt_wishbone_debug_master_pp.vhd +0 -124
  77. data/tests/parser_tests/test_microwatt_wishbone_types_pp.vhd +0 -38
  78. data/tests/parser_tests/test_microwatt_writeback_pp.vhd +0 -87
  79. data/tests/parser_tests/test_package-1_pp.vhd +0 -53
  80. data/tests/parser_tests/test_precedence_pp.vhd +0 -16
  81. data/tests/parser_tests/test_selected_sig_pp.vhd +0 -10
  82. data/tests/parser_tests/test_slice_pp.vhd +0 -16
  83. data/tests/parser_tests/test_tb-00_pp.vhd +0 -71
  84. data/tests/parser_tests/test_type_decl_02_pp.vhd +0 -11
  85. data/tests/parser_tests/test_use_pp.vhd +0 -10
  86. data/tests/parser_tests/test_while_1_pp.vhd +0 -26
  87. data/tests/parser_tests/test_with-00_pp.vhd +0 -12
  88. data/tests/tb_gen_tests/test_accelerator.vhd +0 -160
@@ -1,43 +0,0 @@
1
- -- generated by Vertigo VHDL tool
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
-
5
- package sim_console is
6
-
7
- procedure sim_console_read(
8
- val : out std_ulogic_vector(63 downto 0));
9
- attribute foreign of sim_console_read : procedure is "vhpidirect sim_console_read";
10
-
11
- procedure sim_console_poll(
12
- val : out std_ulogic_vector(63 downto 0));
13
- attribute foreign of sim_console_poll : procedure is "vhpidirect sim_console_poll";
14
-
15
- procedure sim_console_write(
16
- val : std_ulogic_vector(63 downto 0));
17
- attribute foreign of sim_console_write : procedure is "vhpidirect sim_console_write";
18
-
19
- end sim_console;
20
-
21
- package body sim_console is
22
-
23
- procedure sim_console_read(
24
- val : out std_ulogic_vector(63 downto 0)) is
25
- begin
26
- assert false
27
- report "vhpi" severity failure;
28
- end sim_console_read;
29
-
30
- procedure sim_console_poll(
31
- val : out std_ulogic_vector(63 downto 0)) is
32
- begin
33
- assert false
34
- report "vhpi" severity failure;
35
- end sim_console_poll;
36
-
37
- procedure sim_console_write(
38
- val : std_ulogic_vector(63 downto 0)) is
39
- begin
40
- assert false
41
- report "vhpi" severity failure;
42
- end sim_console_write;
43
- end sim_console;
@@ -1,64 +0,0 @@
1
- -- generated by Vertigo VHDL tool
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
- use ieee.numeric_std.all;
5
- library work;
6
- use work.sim_jtag_socket.all;
7
- library unisim;
8
- use unisim.vcomponents.all;
9
-
10
- entity sim_jtag is
11
- end entity sim_jtag;
12
-
13
- architecture behaviour of sim_jtag is
14
- begin
15
-
16
-
17
- jtag : process
18
- alias j : glob_jtag_t is glob_jtag ;
19
- constant jclk_period : time := 1 ns;
20
- constant poll_period : time := 100 ns;
21
- constant dummy_clocks : integer := 80;
22
-
23
- procedure clock(
24
- count : in integer) is
25
- begin
26
- ;
27
- end clock;
28
-
29
- procedure clock_command(
30
- cmd : in std_ulogic_vector;
31
- rsp : out std_ulogic_vector) is
32
- begin
33
- j.capture <= '1';
34
- ()
35
- j.capture <= '0';
36
- ()
37
- j.shift <= '1';
38
- j.shift <= '0';
39
- j.update <= '1';
40
- ()
41
- j.update <= '0';
42
- ()
43
- end clock_command;
44
- variable cmd : std_ulogic_vector(0 to 247);
45
- variable rsp : std_ulogic_vector(0 to 247);
46
- variable msize : std_ulogic_vector(7 downto 0);
47
- variable size : integer;
48
- begin
49
- j.reset <= '1';
50
- j.sel <= "0000";
51
- j.capture <= '0';
52
- j.update <= '0';
53
- j.shift <= '0';
54
- j.tdi <= '0';
55
- j.tms <= '0';
56
- j.runtest <= '0';
57
- ()
58
- j.reset <= '0';
59
- ()
60
- j.sel <= "0010";
61
- ()
62
- rsp := (others => '0');
63
- end process;
64
- end behaviour;
@@ -1,36 +0,0 @@
1
- -- generated by Vertigo VHDL tool
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
-
5
- package sim_jtag_socket is
6
-
7
- procedure sim_jtag_read_msg(
8
- out_msg : out std_ulogic_vector(247 downto 0);
9
- out_size : out std_ulogic_vector(7 downto 0));
10
- attribute foreign of sim_jtag_read_msg : procedure is "vhpidirect sim_jtag_read_msg";
11
-
12
- procedure sim_jtag_write_msg(
13
- in_msg : in std_ulogic_vector(247 downto 0);
14
- in_size : in std_ulogic_vector(7 downto 0));
15
- attribute foreign of sim_jtag_write_msg : procedure is "vhpidirect sim_jtag_write_msg";
16
-
17
- end sim_jtag_socket;
18
-
19
- package body sim_jtag_socket is
20
-
21
- procedure sim_jtag_read_msg(
22
- out_msg : out std_ulogic_vector(247 downto 0);
23
- out_size : out std_ulogic_vector(7 downto 0)) is
24
- begin
25
- assert false
26
- report "vhpi" severity failure;
27
- end sim_jtag_read_msg;
28
-
29
- procedure sim_jtag_write_msg(
30
- in_msg : in std_ulogic_vector(247 downto 0);
31
- in_size : in std_ulogic_vector(7 downto 0)) is
32
- begin
33
- assert false
34
- report "vhpi" severity failure;
35
- end sim_jtag_write_msg;
36
- end sim_jtag_socket;
@@ -1,90 +0,0 @@
1
- -- generated by Vertigo VHDL tool
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
- use ieee.numeric_std.all;
5
- library work;
6
- use work.wishbone_types.all;
7
- use work.sim_console.all;
8
-
9
- entity pp_soc_uart is
10
- generic(
11
- fifo_depth : natural64 := 64);
12
- port(
13
- clk : in std_logic;
14
- reset : in std_logic;
15
- txd : out std_logic;
16
- rxd : in std_logic;
17
- wb_adr_in : in std_logic_vector(11 downto 0);
18
- wb_dat_in : in std_logic_vector(7 downto 0);
19
- wb_dat_out : out std_logic_vector(7 downto 0);
20
- wb_we_in : in std_logic;
21
- wb_cyc_in : in std_logic;
22
- wb_stb_in : in std_logic;
23
- wb_ack_out : out std_logic);
24
- end entity pp_soc_uart;
25
-
26
- architecture behaviour of pp_soc_uart is
27
- signal sample_clk_divisor : std_logic_vector(7 downto 0);
28
- signal irq_recv_enable : std_logic;
29
- signal irq_tx_ready_enable : std_logic := '0';
30
-
31
- type wb_state_type is (idle,write_ack,read_ack);
32
- signal wb_state : wb_state_type;
33
- signal wb_ack : std_logic;
34
- begin
35
-
36
- wb_ack_out <= wb_ack and wb_cyc_in and wb_stb_in;
37
-
38
- wishbone : process(clk)
39
- variable sim_tmp : std_logic_vector(63 downto 0);
40
- begin
41
- if rising_edge(clk) then
42
- if reset = '1' then
43
- wb_ack <= '0';
44
- wb_state <= idle;
45
- sample_clk_divisor <= (others => '0');
46
- irq_recv_enable <= '0';
47
- irq_tx_ready_enable <= '0';
48
- else
49
- case wb_state is
50
- when idle =>
51
- if wb_cyc_in = '1' and wb_stb_in = '1' then
52
- if wb_we_in = '1' then
53
- if wb_adr_in(11 downto 0) = x"000" then
54
- ()
55
- elsif wb_adr_in(11 downto 0) = x"018" then
56
- sample_clk_divisor <= wb_dat_in;
57
- elsif wb_adr_in(11 downto 0) = x"020" then
58
- irq_recv_enable <= wb_dat_in(0);
59
- irq_tx_ready_enable <= wb_dat_in(1);
60
- end if;
61
- wb_ack <= '1';
62
- wb_state <= write_ack;
63
- else
64
- if wb_adr_in(11 downto 0) = x"008" then
65
- ()
66
- wb_dat_out <= sim_tmp(7 downto 0);
67
- elsif wb_adr_in(11 downto 0) = x"010" then
68
- ()
69
- wb_dat_out <= "00000" & sim_tmp(0) & '1' & sim_tmp(0);
70
- elsif wb_adr_in(11 downto 0) = x"018" then
71
- wb_dat_out <= sample_clk_divisor;
72
- elsif wb_adr_in(11 downto 0) = x"020" then
73
- wb_dat_out <= (0 => irq_recv_enable,1 => irq_tx_ready_enable,others => '0');
74
- else
75
- wb_dat_out <= (others => '0');
76
- end if;
77
- wb_ack <= '1';
78
- wb_state <= read_ack;
79
- end if;
80
- end if;
81
- when write_ack | read_ack =>
82
- if wb_stb_in = '0' then
83
- wb_ack <= '0';
84
- wb_state <= idle;
85
- end if;
86
- end case;
87
- end if;
88
- end if;
89
- end process;
90
- end behaviour;
@@ -1,195 +0,0 @@
1
- -- generated by Vertigo VHDL tool
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
- use ieee.numeric_std.all;
5
- use ieee.math_real.all;
6
- use std.textio.all;
7
- use std.env.stop;
8
- library work;
9
- use work.common.all;
10
- use work.wishbone_types.all;
11
-
12
- entity soc is
13
- generic(
14
- memory_size : positive;
15
- ram_init_file : string;
16
- reset_low : boolean;
17
- sim : boolean;
18
- disable_flatten_core : booleanfalse := false);
19
- port(
20
- rst : in std_ulogic;
21
- system_clk : in std_ulogic;
22
- uart0_txd : out std_ulogic;
23
- uart0_rxd : in std_ulogic);
24
- end entity soc;
25
-
26
- architecture behaviour of soc is
27
- signal wishbone_dcore_in : wishbone_slave_out;
28
- signal wishbone_dcore_out : wishbone_master_out;
29
- signal wishbone_icore_in : wishbone_slave_out;
30
- signal wishbone_icore_out : wishbone_master_out;
31
- signal wishbone_debug_in : wishbone_slave_out;
32
- signal wishbone_debug_out : wishbone_master_out;
33
- constant num_wb_masters : positive := 3;
34
- signal wb_masters_out : wishbone_master_out_vector(0 to num_wb_masters - 1);
35
- signal wb_masters_in : wishbone_slave_out_vector(0 to num_wb_masters - 1);
36
- signal wb_master_in : wishbone_slave_out;
37
- signal wb_master_out : wishbone_master_out;
38
- signal wb_uart0_in : wishbone_master_out;
39
- signal wb_uart0_out : wishbone_slave_out;
40
- signal uart_dat8 : std_ulogic_vector(7 downto 0);
41
- signal wb_bram_in : wishbone_master_out;
42
- signal wb_bram_out : wishbone_slave_out;
43
- constant mem_adr_bits : positive := positive(ceil(log2(real(memory_size))));
44
- signal dmi_addr : std_ulogic_vector(7 downto 0);
45
- signal dmi_din : std_ulogic_vector(63 downto 0);
46
- signal dmi_dout : std_ulogic_vector(63 downto 0);
47
- signal dmi_req : std_ulogic;
48
- signal dmi_wr : std_ulogic;
49
- signal dmi_ack : std_ulogic;
50
- signal dmi_wb_dout : std_ulogic_vector(63 downto 0);
51
- signal dmi_wb_req : std_ulogic;
52
- signal dmi_wb_ack : std_ulogic;
53
- signal dmi_core_dout : std_ulogic_vector(63 downto 0);
54
- signal dmi_core_req : std_ulogic;
55
- signal dmi_core_ack : std_ulogic;
56
- begin
57
-
58
- processor : entity work.core
59
- port map(
60
- clk => system_clk,
61
- rst => rst,
62
- wishbone_insn_in => wishbone_icore_in,
63
- wishbone_insn_out => wishbone_icore_out,
64
- wishbone_data_in => wishbone_dcore_in,
65
- wishbone_data_out => wishbone_dcore_out,
66
- dmi_addr => dmi_addr(3 downto 0),
67
- dmi_dout => dmi_core_dout,
68
- dmi_din => dmi_dout,
69
- dmi_wr => dmi_wr,
70
- dmi_ack => dmi_core_ack,
71
- dmi_req => dmi_core_req);
72
-
73
- wb_masters_out <= (0 => wishbone_dcore_out,1 => wishbone_icore_out,2 => wishbone_debug_out);
74
- wishbone_dcore_in <= wb_masters_in(0);
75
- wishbone_icore_in <= wb_masters_in(1);
76
- wishbone_debug_in <= wb_masters_in(2);
77
- wishbone_arbiter_0 : entity work.wishbone_arbiter
78
- port map(
79
- clk => system_clk,
80
- rst => rst,
81
- wb_masters_in => wb_masters_out,
82
- wb_masters_out => wb_masters_in,
83
- wb_slave_out => wb_master_out,
84
- wb_slave_in => wb_master_in);
85
-
86
-
87
- slave_intercon : process(wb_master_out,wb_bram_out,wb_uart0_out)
88
-
89
- type slave_type is (slave_uart_0,slave_memory,slave_none);
90
- variable slave : slave_type;
91
- begin
92
- slave := slave_none;
93
- if wb_master_out.adr(31 downto 24) = x"00" then
94
- slave := slave_memory;
95
- elsif wb_master_out.adr(31 downto 24) = x"c0" then
96
- if wb_master_out.adr(23 downto 12) = x"002" then
97
- slave := slave_uart_0;
98
- end if;
99
- end if;
100
- wb_bram_in <= wb_master_out;
101
- wb_bram_in.cyc <= '0';
102
- wb_uart0_in <= wb_master_out;
103
- wb_uart0_in.cyc <= '0';
104
- case slave is
105
- when slave_memory =>
106
- wb_bram_in.cyc <= wb_master_out.cyc;
107
- wb_master_in <= wb_bram_out;
108
- when slave_uart_0 =>
109
- wb_uart0_in.cyc <= wb_master_out.cyc;
110
- wb_master_in <= wb_uart0_out;
111
- when others =>
112
- wb_master_in.dat <= (others => '1');
113
- wb_master_in.ack <= wb_master_out.stb and wb_master_out.cyc;
114
- wb_master_in.stall <= '0';
115
- end case;
116
- end process;
117
- uart0 : entity work.pp_soc_uart
118
- port map(
119
- clk => system_clk,
120
- reset => rst,
121
- txd => uart0_txd,
122
- rxd => uart0_rxd,
123
- wb_adr_in => wb_uart0_in.adr(11 downto 0),
124
- wb_dat_in => wb_uart0_in.dat(7 downto 0),
125
- wb_dat_out => uart_dat8,
126
- wb_cyc_in => wb_uart0_in.cyc,
127
- wb_stb_in => wb_uart0_in.stb,
128
- wb_we_in => wb_uart0_in.we,
129
- wb_ack_out => wb_uart0_out.ack);
130
-
131
- wb_uart0_out.dat <= x"00000000000000" & uart_dat8;
132
- wb_uart0_out.stall <= '0' when wb_uart0_in.cyc = '0' else wb_uart0_out.ack;
133
- bram0 : entity work.wishbone_bram_wrapper
134
- port map(
135
- clk => system_clk,
136
- rst => rst,
137
- wishbone_in => wb_bram_in,
138
- wishbone_out => wb_bram_out);
139
-
140
- dtm : entity work.dmi_dtm
141
- port map(
142
- sys_clk => system_clk,
143
- sys_reset => rst,
144
- dmi_addr => dmi_addr,
145
- dmi_din => dmi_din,
146
- dmi_dout => dmi_dout,
147
- dmi_req => dmi_req,
148
- dmi_wr => dmi_wr,
149
- dmi_ack => dmi_ack);
150
-
151
-
152
- dmi_intercon : process(dmi_addr,dmi_req,dmi_wb_ack,dmi_wb_dout,dmi_core_ack,dmi_core_dout)
153
-
154
- type slave_type is (slave_wb,slave_core,slave_none);
155
- variable slave : slave_type;
156
- begin
157
- slave := slave_none;
158
- if std_match(dmi_addr,"000000--") then
159
- slave := slave_wb;
160
- elsif std_match(dmi_addr,"0001----") then
161
- slave := slave_core;
162
- end if;
163
- dmi_wb_req <= '0';
164
- dmi_core_req <= '0';
165
- case slave is
166
- when slave_wb =>
167
- dmi_wb_req <= dmi_req;
168
- dmi_ack <= dmi_wb_ack;
169
- dmi_din <= dmi_wb_dout;
170
- when slave_core =>
171
- dmi_core_req <= dmi_req;
172
- dmi_ack <= dmi_core_ack;
173
- dmi_din <= dmi_core_dout;
174
- when others =>
175
- dmi_ack <= dmi_req;
176
- dmi_din <= (others => '1');
177
- end case;
178
- if sim and dmi_req = '1' and dmi_addr = "11111111" and dmi_wr = '1' then
179
- ()
180
- end if;
181
- end process;
182
- wishbone_debug : entity work.wishbone_debug_master
183
- port map(
184
- clk => system_clk,
185
- rst => rst,
186
- dmi_addr => dmi_addr(1 downto 0),
187
- dmi_dout => dmi_wb_dout,
188
- dmi_din => dmi_dout,
189
- dmi_wr => dmi_wr,
190
- dmi_ack => dmi_wb_ack,
191
- dmi_req => dmi_wb_req,
192
- wb_in => wishbone_debug_in,
193
- wb_out => wishbone_debug_out);
194
-
195
- end behaviour;
@@ -1,39 +0,0 @@
1
- -- generated by Vertigo VHDL tool
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
- use ieee.numeric_std.all;
5
-
6
- package utils is
7
- function log2(i : natural) return integer
8
- function log2ceil(i : natural) return integer
9
- function ispow2(i : integer) return boolean
10
-
11
- end utils;
12
-
13
- package body utils is
14
-
15
- function log2(i : natural) return integer is
16
- variable tmp : integer := i;
17
- variable ret : integer := 0;
18
- begin
19
- ;
20
- return ret;
21
- end function log2;
22
-
23
- function log2ceil(i : natural) return integer is
24
- variable tmp : integer := i;
25
- variable ret : integer := 0;
26
- begin
27
- ;
28
- return ret;
29
- end function log2ceil;
30
-
31
- function ispow2(i : integer) return boolean is
32
- begin
33
- if to_integer(to_unsigned(i,32) and to_unsigned(i - 1,32)) = 0 then
34
- return true;
35
- else
36
- return false;
37
- end if;
38
- end function ispow2;
39
- end utils;