OpenCores
URL https://opencores.org/ocsvn/mkjpeg/mkjpeg/trunk

Subversion Repositories mkjpeg

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /mkjpeg/trunk
    from Rev 66 to Rev 67
    Reverse comparison

Rev 66 → Rev 67

/design/BufFifo/BUF_FIFO.vhd
28,7 → 28,7
-- generic packages/libraries:
-------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use IEEE.STD_LOGIC_1164.all;
use ieee.numeric_std.all;
 
-------------------------------------------------------------------------------
71,17 → 71,39
architecture RTL of BUF_FIFO is
 
constant C_NUM_LINES : integer := 8 + C_EXTRA_LINES;
 
--constant C_NUM_LINES : integer := 8 + C_EXTRA_LINES;
-- No Exstra Lines
constant C_NUM_LINES : integer := 8;
signal pixel_cnt : unsigned(15 downto 0);
signal line_cnt : unsigned(15 downto 0);
 
signal ramq : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal ramd : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal ramwaddr : unsigned(log2(C_MAX_LINE_WIDTH*C_NUM_LINES)-1 downto 0);
signal ramenw : STD_LOGIC;
signal ramraddr : unsigned(log2(C_MAX_LINE_WIDTH*C_NUM_LINES)-1 downto 0);
--signal ramq : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal q : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
--signal ramd : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal ram_data : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal wr_ptr : unsigned(log2(C_MAX_LINE_WIDTH*C_NUM_LINES)-1 downto 0);
signal ram_write : STD_LOGIC;
signal rd_ptr : unsigned(log2(C_MAX_LINE_WIDTH*C_NUM_LINES)-1 downto 0);
signal wr_addr : unsigned(log2(C_MAX_LINE_WIDTH)-1 downto 0);
signal we : STD_LOGIC;
signal rd_addr : unsigned(log2(C_MAX_LINE_WIDTH)-1 downto 0);
signal data_out : STD_LOGIC_VECTOR(15 downto 0);
--signal ramd : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal data_in : unsigned(15 downto 0);
signal wr_addr2 : unsigned(log2(C_MAX_LINE_WIDTH)-1 downto 0);
signal we2 : STD_LOGIC;
signal rd_addr2 : unsigned(log2(C_MAX_LINE_WIDTH)-1 downto 0);
signal data_out2 : STD_LOGIC_VECTOR(15 downto 0);
--signal ramd : STD_LOGIC_VECTOR(C_PIXEL_BITS-1 downto 0);
signal data_in2 : unsigned(15 downto 0);
signal pix_inblk_cnt : unsigned(3 downto 0);
signal pix_inblk_cnt_d1 : unsigned(3 downto 0);
signal line_inblk_cnt : unsigned(2 downto 0);
93,7 → 115,7
signal ramraddr_int : unsigned(16+log2(C_NUM_LINES)-1 downto 0);
signal raddr_base_line : unsigned(16+log2(C_NUM_LINES)-1 downto 0);
signal raddr_tmp : unsigned(15 downto 0);
signal ramwaddr_d1 : unsigned(ramwaddr'range);
--signal ramwaddr_d1 : unsigned(ramwaddr'range);
signal line_lock : unsigned(log2(C_NUM_LINES)-1 downto 0);
107,8 → 129,34
signal image_write_end : std_logic;
signal result :std_logic_vector(31 downto 0);
signal threshold :std_logic_vector(31 downto 0);
signal wr_counter : unsigned(15 downto 0);
signal rd_counter : unsigned(15 downto 0);
signal wr_mod : unsigned(15 downto 0);
signal rd_mod : unsigned(15 downto 0);
signal wr_counter_total : unsigned(31 downto 0);
signal rd_counter_total : unsigned(31 downto 0);
signal counter : unsigned(31 downto 0);
signal counter2 : unsigned(31 downto 0);
signal init_table_wr : std_logic;
signal init_table_rd : std_logic;
signal do1 : unsigned(15 downto 0);
signal do2 : unsigned(15 downto 0);
signal data_temp : unsigned(15 downto 0);
signal data_temp2 : unsigned(15 downto 0);
signal temp :std_logic_vector(23 downto 0);
signal fifo_almost_full_i : std_logic;
-------------------------------------------------------------------------------
-- Architecture: begin
-------------------------------------------------------------------------------
116,6 → 164,8
-------------------------------------------------------------------
-- RAM for SUB_FIFOs
-------------------------------------------------------------------
fifo_almost_full <= fifo_almost_full_i;
U_SUB_RAMZ : entity work.SUB_RAMZ
generic map
(
124,198 → 174,320
)
port map
(
d => ramd,
waddr => std_logic_vector(ramwaddr_d1),
raddr => std_logic_vector(ramraddr),
we => ramenw,
d => ram_data,
waddr => std_logic_vector(wr_ptr),
raddr => std_logic_vector(rd_ptr),
we => ram_write,
clk => clk,
q => ramq
q => q
);
-------------------------------------------------------------------
-- register RAM data input
-------------------------------------------------------------------
p_mux1 : process(CLK, RST)
begin
if RST = '1' then
ramenw <= '0';
ramd <= (others => '0');
elsif CLK'event and CLK = '1' then
ramd <= iram_wdata;
ramenw <= iram_wren;
end if;
end process;
MULTIPLIER : entity work.multiplier
PORT MAP(
CLK => CLK,
RST => RST,
img_size_x => img_size_x,
img_size_y => img_size_y,
result => result,
threshold => threshold
);
U_SUB_RAMZ_WR_ADRESS_LUT : entity work.SUB_RAMZ_LUT
generic map
(
RAMADDR_W => log2( C_MAX_LINE_WIDTH ),
RAMDATA_W => 16
)
port map
(
d => std_logic_vector(data_in),
waddr => std_logic_vector(wr_addr),
raddr => std_logic_vector(rd_addr),
we => we,
clk => CLK,
q => data_out
);
-------------------------------------------------------------------
-- resolve RAM write address
-------------------------------------------------------------------
p_pixel_cnt : process(CLK, RST)
U_SUB_RAMZ_RD_ADRESS_LUT : entity work.SUB_RAMZ_LUT
generic map
(
RAMADDR_W => log2( C_MAX_LINE_WIDTH ),
RAMDATA_W => 16
)
port map
(
d => std_logic_vector(data_in2),
waddr => std_logic_vector(wr_addr2),
raddr => std_logic_vector(rd_addr2),
we => we2,
clk => CLK,
q => data_out2
);
process (CLK, RST)
begin
if RST = '1' then
pixel_cnt <= (others => '0');
memwr_line_cnt <= (others => '0');
wr_line_idx <= (others => '0');
ramwaddr <= (others => '0');
ramwaddr_d1 <= (others => '0');
image_write_end <= '0';
elsif CLK'event and CLK = '1' then
ramwaddr_d1 <= ramwaddr;
if iram_wren = '1' then
-- end of line
if pixel_cnt = unsigned(img_size_x)-1 then
pixel_cnt <= (others => '0');
-- absolute write line index
wr_line_idx <= wr_line_idx + 1;
if wr_line_idx = unsigned(img_size_y)-1 then
image_write_end <= '1';
end if;
-- memory line index
if memwr_line_cnt = C_NUM_LINES-1 then
memwr_line_cnt <= (others => '0');
ramwaddr <= (others => '0');
else
memwr_line_cnt <= memwr_line_cnt + 1;
ramwaddr <= ramwaddr + 1;
end if;
else
pixel_cnt <= pixel_cnt + 1;
ramwaddr <= ramwaddr + 1;
end if;
end if;
if (RST = '1') then
wr_counter <= (others => '0');
wr_counter_total <= (others => '0');
wr_mod <= (others => '0');
wr_ptr <= (others => '0');
ram_write <= '0';
init_table_wr <= '0';
do1 <= (others => '0');
data_temp <= (others => '0');
wr_addr <= (others => '0');
rd_addr <= (others => '0');
we <= '0';
counter <= (others => '0');
elsif (CLK'event and CLK = '1') then
if (init_table_wr = '0') then
if (iram_wren = '1') then
if (wr_mod /= 0 and wr_counter mod 8 = "000") then
wr_ptr <= resize(do1(5 downto 3) * unsigned(img_size_x), log2(C_MAX_LINE_WIDTH*C_NUM_LINES)) + resize(do1(15 downto 6) * 8, log2(C_MAX_LINE_WIDTH*C_NUM_LINES));
data_temp <= resize(do1(5 downto 3) * unsigned(img_size_x), 16) + resize(do1(15 downto 6) * 8, 16);
--wr_ptr <= do1 / 8 mod 8 * unsigned(img_size_x) + do1 / 8 / 8 * 8;
--data_temp <= do1 / 8 mod 8 * unsigned(img_size_x) + do1 / 8 / 8 * 8;
else
if (wr_counter = 0) then
wr_ptr <= (others => '0');
else
wr_ptr <= wr_ptr + 1;
end if;
end if;
if (wr_mod /= 0 and wr_counter mod 8 = "011") then
if (wr_counter = unsigned(img_size_x) * 8 - 5) then
rd_addr <= (others => '0');
else
rd_addr <= resize((wr_counter + 5) / 8, log2(C_MAX_LINE_WIDTH));
end if;
end if;
if (wr_mod /= 0 and wr_counter mod 8 = "101") then
do1 <= unsigned(data_out);
we <= '1';
if (wr_mod = unsigned(img_size_y) / 8 - 1) then
wr_addr <= resize(counter, log2(C_MAX_LINE_WIDTH));
data_in <= resize(counter * 8, 16);
counter <= counter + 1;
else
data_in <= data_temp;
if (wr_counter = unsigned(img_size_x) * 8 - 3) then
wr_addr <= (others => '0');
else
wr_addr <= resize((wr_counter + 3) / 8 - 1, log2(C_MAX_LINE_WIDTH));
end if;
end if;
else
we <= '0';
end if;
ram_write <= '1';
ram_data <= iram_wdata;
wr_counter_total <= wr_counter_total + 1;
if (wr_counter_total = unsigned(result) - 1) then
init_table_wr <= '1';
counter <= (others => '0');
end if;
if (wr_counter = unsigned(img_size_x) * 8 - 1) then
wr_counter <= (others => '0');
wr_mod <= wr_mod + 1;
else
wr_counter <= wr_counter + 1;
end if;
else
ram_write <= '0';
end if;
if sof = '1' then
pixel_cnt <= (others => '0');
ramwaddr <= (others => '0');
memwr_line_cnt <= (others => '0');
wr_line_idx <= (others => '0');
image_write_end <= '0';
wr_counter <= (others => '0');
wr_counter_total <= (others => '0');
wr_mod <= (others => '0');
wr_ptr <= (others => '0');
ram_write <= '0';
init_table_wr <= '0';
do1 <= (others => '0');
data_temp <= (others => '0');
wr_addr <= (others => '0');
rd_addr <= (others => '0');
we <= '0';
counter <= (others => '0');
end if;
end if;
end if;
end if;
end process;
-------------------------------------------------------------------
-- FIFO half full / almost full flag generation
-------------------------------------------------------------------
p_mux3 : process(CLK, RST)
begin
if RST = '1' then
fdct_fifo_hf_full <= '0';
fifo_almost_full <= '0';
elsif CLK'event and CLK = '1' then
process (CLK, RST)
begin
if (RST = '1') then
fifo_almost_full_i <= '0';
fdct_fifo_hf_full <= '0';
elsif (CLK'event and CLK = '1') then
if (fifo_almost_full_i = '0' and wr_counter_total = rd_counter_total + unsigned(img_size_x)*8-2) then
fifo_almost_full_i <= '1';
end if;
if (fifo_almost_full_i = '1' and wr_counter_total < rd_counter_total + unsigned(threshold) ) then
fifo_almost_full_i <= '0';
end if;
if (wr_counter = unsigned(img_size_x) * 8 - 1) then
fdct_fifo_hf_full <= '1';
end if;
if (rd_counter = unsigned(img_size_x) * 8 - 1) then
fdct_fifo_hf_full <= '0';
fifo_almost_full_i <= '0';
end if;
if rd_line_idx + 8 <= wr_line_idx then
fdct_fifo_hf_full <= '1';
else
fdct_fifo_hf_full <= '0';
end if;
fifo_almost_full <= '0';
if wr_line_idx = rd_line_idx + C_NUM_LINES-1 then
if pixel_cnt >= unsigned(img_size_x)-1-1 then
fifo_almost_full <= '1';
if sof = '1' then
fifo_almost_full_i <= '0';
fdct_fifo_hf_full <= '0';
end if;
elsif wr_line_idx > rd_line_idx + C_NUM_LINES-1 then
fifo_almost_full <= '1';
end if;
end if;
end process;
process (CLK, RST)
begin
if (RST = '1') then
fdct_fifo_q <= (others => '0');
temp <= (others => '0');
rd_counter <= (others => '0');
rd_counter_total <= (others => '0');
rd_mod <= x"0001";
rd_ptr <= (others => '0');
init_table_rd <= '0';
do2 <= (others => '0');
data_temp2 <= (others => '0');
wr_addr2 <= (others => '0');
rd_addr2 <= (others => '0');
we2 <= '0';
counter2 <= (others => '0');
elsif (CLK'event and CLK = '1') then
if (init_table_rd = '0') then
if (fdct_fifo_rd = '1') then
if (rd_counter mod 8 = "000") then
--rd_ptr <= resize(do2(5 downto 3) * unsigned(img_size_x) + do2(15 downto 7) * 8, log2(C_MAX_LINE_WIDTH*C_NUM_LINES));
--data_temp2 <= resize(do2(5 downto 3) * unsigned(img_size_x) + do2(15 downto 7) * 8, 16);
rd_ptr <= resize(do2(5 downto 3) * unsigned(img_size_x), log2(C_MAX_LINE_WIDTH*C_NUM_LINES)) + resize(do2(15 downto 6) * 8, log2(C_MAX_LINE_WIDTH*C_NUM_LINES));
data_temp2 <= resize(do2(5 downto 3) * unsigned(img_size_x), 16) + resize(do2(15 downto 6) * 8, 16);
else
rd_ptr <= rd_ptr + 1;
end if;
if (rd_counter mod 8 = "011") then
if (rd_counter = unsigned(img_size_x) * 8 - 5) then
rd_addr2 <= (others => '0');
else
rd_addr2 <= resize(unsigned(rd_counter + 5) / 8, log2(C_MAX_LINE_WIDTH));
end if;
end if;
if (rd_counter mod 8 = "101") then
do2 <= unsigned(data_out2);
we2 <= '1';
if (rd_mod = unsigned(img_size_y) / 8) then
data_in2 <= resize(counter2 * 8, 16);
wr_addr2 <= resize(counter2, log2(C_MAX_LINE_WIDTH));
counter2 <= counter2 + 1;
else
data_in2 <= data_temp2;
if (rd_counter = unsigned(img_size_x) * 8 - 3) then
wr_addr2 <= (others => '0');
else
wr_addr2 <= resize(unsigned(rd_counter + 3) / 8 - 1, log2(C_MAX_LINE_WIDTH));
end if;
end if;
else
we2 <= '0';
end if;
rd_counter_total <= rd_counter_total + 1;
if (rd_counter_total = unsigned(result) - 1) then
init_table_rd <= '1';
counter2 <= (others => '0');
end if;
if (rd_counter = unsigned(img_size_x) * 8 - 1) then
rd_counter <= (others => '0');
rd_mod <= rd_mod + 1;
else
rd_counter <= rd_counter + 1;
end if;
end if;
if sof = '1' then
fdct_fifo_q <= (others => '0');
temp <= (others => '0');
rd_counter <= (others => '0');
rd_counter_total <= (others => '0');
rd_mod <= x"0001";
rd_ptr <= (others => '0');
init_table_rd <= '0';
do2 <= (others => '0');
data_temp2 <= (others => '0');
wr_addr2 <= (others => '0');
rd_addr2 <= (others => '0');
we2 <= '0';
counter2 <= (others => '0');
end if;
-- fdct_fifo_q <= (temp(15 downto 11) & "000" &
-- temp(10 downto 5) & "00" &
-- temp(4 downto 0) & "000") when C_PIXEL_BITS = 16 else
-- std_logic_vector(resize(unsigned(temp), 24));
end if;
temp <= q;
if (C_PIXEL_BITS = 16) then
fdct_fifo_q <= (temp(15 downto 11) & "000" &
temp(10 downto 5) & "00" &
temp(4 downto 0) & "000");
else
fdct_fifo_q <= temp;
end if;
 
end if;
end process;
end if;
end process;
-------------------------------------------------------------------
-- read side
-------------------------------------------------------------------
p_mux5 : process(CLK, RST)
begin
if RST = '1' then
memrd_offs_cnt <= (others => '0');
read_block_cnt <= (others => '0');
pix_inblk_cnt <= (others => '0');
line_inblk_cnt <= (others => '0');
rd_line_idx <= (others => '0');
pix_inblk_cnt_d1 <= (others => '0');
read_block_cnt_d1 <= (others => '0');
elsif CLK'event and CLK = '1' then
pix_inblk_cnt_d1 <= pix_inblk_cnt;
read_block_cnt_d1 <= read_block_cnt;
-- BUF FIFO read
if fdct_fifo_rd = '1' then
-- last pixel in block
if pix_inblk_cnt = 8-1 then
pix_inblk_cnt <= (others => '0');
 
-- last line in 8
if line_inblk_cnt = 8-1 then
line_inblk_cnt <= (others => '0');
 
-- last block in last line
if read_block_cnt = unsigned(img_size_x(15 downto 3))-1 then
read_block_cnt <= (others => '0');
rd_line_idx <= rd_line_idx + 8;
if memrd_offs_cnt + 8 > C_NUM_LINES-1 then
memrd_offs_cnt <= memrd_offs_cnt + 8 - C_NUM_LINES;
else
memrd_offs_cnt <= memrd_offs_cnt + 8;
end if;
else
read_block_cnt <= read_block_cnt + 1;
end if;
else
line_inblk_cnt <= line_inblk_cnt + 1;
end if;
else
pix_inblk_cnt <= pix_inblk_cnt + 1;
end if;
end if;
if memrd_offs_cnt + (line_inblk_cnt) > C_NUM_LINES-1 then
memrd_line <= memrd_offs_cnt(memrd_line'range) + (line_inblk_cnt) - (C_NUM_LINES);
else
memrd_line <= memrd_offs_cnt(memrd_line'range) + (line_inblk_cnt);
end if;
if sof = '1' then
memrd_line <= (others => '0');
memrd_offs_cnt <= (others => '0');
read_block_cnt <= (others => '0');
pix_inblk_cnt <= (others => '0');
line_inblk_cnt <= (others => '0');
rd_line_idx <= (others => '0');
end if;
end if;
end process;
-- generate RAM data output based on 16 or 24 bit mode selection
fdct_fifo_q <= (ramq(15 downto 11) & "000" &
ramq(10 downto 5) & "00" &
ramq(4 downto 0) & "000") when C_PIXEL_BITS = 16 else
std_logic_vector(resize(unsigned(ramq), 24));
ramraddr <= ramraddr_int(ramraddr'range);
-------------------------------------------------------------------
-- resolve RAM read address
-------------------------------------------------------------------
p_mux4 : process(CLK, RST)
begin
if RST = '1' then
ramraddr_int <= (others => '0');
elsif CLK'event and CLK = '1' then
raddr_base_line <= (memrd_line) * unsigned(img_size_x);
raddr_tmp <= (read_block_cnt_d1 & "000") + pix_inblk_cnt_d1;
ramraddr_int <= raddr_tmp + raddr_base_line;
end if;
end process;
 
end architecture RTL;
-------------------------------------------------------------------------------
-- Architecture: end
/design/BufFifo/counter_8.txt
0,0 → 1,8192
0000
0008
0010
0018
0020
0028
0030
0038
0040
0048
0050
0058
0060
0068
0070
0078
0080
0088
0090
0098
00a0
00a8
00b0
00b8
00c0
00c8
00d0
00d8
00e0
00e8
00f0
00f8
0100
0108
0110
0118
0120
0128
0130
0138
0140
0148
0150
0158
0160
0168
0170
0178
0180
0188
0190
0198
01a0
01a8
01b0
01b8
01c0
01c8
01d0
01d8
01e0
01e8
01f0
01f8
0200
0208
0210
0218
0220
0228
0230
0238
0240
0248
0250
0258
0260
0268
0270
0278
0280
0288
0290
0298
02a0
02a8
02b0
02b8
02c0
02c8
02d0
02d8
02e0
02e8
02f0
02f8
0300
0308
0310
0318
0320
0328
0330
0338
0340
0348
0350
0358
0360
0368
0370
0378
0380
0388
0390
0398
03a0
03a8
03b0
03b8
03c0
03c8
03d0
03d8
03e0
03e8
03f0
03f8
0400
0408
0410
0418
0420
0428
0430
0438
0440
0448
0450
0458
0460
0468
0470
0478
0480
0488
0490
0498
04a0
04a8
04b0
04b8
04c0
04c8
04d0
04d8
04e0
04e8
04f0
04f8
0500
0508
0510
0518
0520
0528
0530
0538
0540
0548
0550
0558
0560
0568
0570
0578
0580
0588
0590
0598
05a0
05a8
05b0
05b8
05c0
05c8
05d0
05d8
05e0
05e8
05f0
05f8
0600
0608
0610
0618
0620
0628
0630
0638
0640
0648
0650
0658
0660
0668
0670
0678
0680
0688
0690
0698
06a0
06a8
06b0
06b8
06c0
06c8
06d0
06d8
06e0
06e8
06f0
06f8
0700
0708
0710
0718
0720
0728
0730
0738
0740
0748
0750
0758
0760
0768
0770
0778
0780
0788
0790
0798
07a0
07a8
07b0
07b8
07c0
07c8
07d0
07d8
07e0
07e8
07f0
07f8
0800
0808
0810
0818
0820
0828
0830
0838
0840
0848
0850
0858
0860
0868
0870
0878
0880
0888
0890
0898
08a0
08a8
08b0
08b8
08c0
08c8
08d0
08d8
08e0
08e8
08f0
08f8
0900
0908
0910
0918
0920
0928
0930
0938
0940
0948
0950
0958
0960
0968
0970
0978
0980
0988
0990
0998
09a0
09a8
09b0
09b8
09c0
09c8
09d0
09d8
09e0
09e8
09f0
09f8
0a00
0a08
0a10
0a18
0a20
0a28
0a30
0a38
0a40
0a48
0a50
0a58
0a60
0a68
0a70
0a78
0a80
0a88
0a90
0a98
0aa0
0aa8
0ab0
0ab8
0ac0
0ac8
0ad0
0ad8
0ae0
0ae8
0af0
0af8
0b00
0b08
0b10
0b18
0b20
0b28
0b30
0b38
0b40
0b48
0b50
0b58
0b60
0b68
0b70
0b78
0b80
0b88
0b90
0b98
0ba0
0ba8
0bb0
0bb8
0bc0
0bc8
0bd0
0bd8
0be0
0be8
0bf0
0bf8
0c00
0c08
0c10
0c18
0c20
0c28
0c30
0c38
0c40
0c48
0c50
0c58
0c60
0c68
0c70
0c78
0c80
0c88
0c90
0c98
0ca0
0ca8
0cb0
0cb8
0cc0
0cc8
0cd0
0cd8
0ce0
0ce8
0cf0
0cf8
0d00
0d08
0d10
0d18
0d20
0d28
0d30
0d38
0d40
0d48
0d50
0d58
0d60
0d68
0d70
0d78
0d80
0d88
0d90
0d98
0da0
0da8
0db0
0db8
0dc0
0dc8
0dd0
0dd8
0de0
0de8
0df0
0df8
0e00
0e08
0e10
0e18
0e20
0e28
0e30
0e38
0e40
0e48
0e50
0e58
0e60
0e68
0e70
0e78
0e80
0e88
0e90
0e98
0ea0
0ea8
0eb0
0eb8
0ec0
0ec8
0ed0
0ed8
0ee0
0ee8
0ef0
0ef8
0f00
0f08
0f10
0f18
0f20
0f28
0f30
0f38
0f40
0f48
0f50
0f58
0f60
0f68
0f70
0f78
0f80
0f88
0f90
0f98
0fa0
0fa8
0fb0
0fb8
0fc0
0fc8
0fd0
0fd8
0fe0
0fe8
0ff0
0ff8
1000
1008
1010
1018
1020
1028
1030
1038
1040
1048
1050
1058
1060
1068
1070
1078
1080
1088
1090
1098
10a0
10a8
10b0
10b8
10c0
10c8
10d0
10d8
10e0
10e8
10f0
10f8
1100
1108
1110
1118
1120
1128
1130
1138
1140
1148
1150
1158
1160
1168
1170
1178
1180
1188
1190
1198
11a0
11a8
11b0
11b8
11c0
11c8
11d0
11d8
11e0
11e8
11f0
11f8
1200
1208
1210
1218
1220
1228
1230
1238
1240
1248
1250
1258
1260
1268
1270
1278
1280
1288
1290
1298
12a0
12a8
12b0
12b8
12c0
12c8
12d0
12d8
12e0
12e8
12f0
12f8
1300
1308
1310
1318
1320
1328
1330
1338
1340
1348
1350
1358
1360
1368
1370
1378
1380
1388
1390
1398
13a0
13a8
13b0
13b8
13c0
13c8
13d0
13d8
13e0
13e8
13f0
13f8
1400
1408
1410
1418
1420
1428
1430
1438
1440
1448
1450
1458
1460
1468
1470
1478
1480
1488
1490
1498
14a0
14a8
14b0
14b8
14c0
14c8
14d0
14d8
14e0
14e8
14f0
14f8
1500
1508
1510
1518
1520
1528
1530
1538
1540
1548
1550
1558
1560
1568
1570
1578
1580
1588
1590
1598
15a0
15a8
15b0
15b8
15c0
15c8
15d0
15d8
15e0
15e8
15f0
15f8
1600
1608
1610
1618
1620
1628
1630
1638
1640
1648
1650
1658
1660
1668
1670
1678
1680
1688
1690
1698
16a0
16a8
16b0
16b8
16c0
16c8
16d0
16d8
16e0
16e8
16f0
16f8
1700
1708
1710
1718
1720
1728
1730
1738
1740
1748
1750
1758
1760
1768
1770
1778
1780
1788
1790
1798
17a0
17a8
17b0
17b8
17c0
17c8
17d0
17d8
17e0
17e8
17f0
17f8
1800
1808
1810
1818
1820
1828
1830
1838
1840
1848
1850
1858
1860
1868
1870
1878
1880
1888
1890
1898
18a0
18a8
18b0
18b8
18c0
18c8
18d0
18d8
18e0
18e8
18f0
18f8
1900
1908
1910
1918
1920
1928
1930
1938
1940
1948
1950
1958
1960
1968
1970
1978
1980
1988
1990
1998
19a0
19a8
19b0
19b8
19c0
19c8
19d0
19d8
19e0
19e8
19f0
19f8
1a00
1a08
1a10
1a18
1a20
1a28
1a30
1a38
1a40
1a48
1a50
1a58
1a60
1a68
1a70
1a78
1a80
1a88
1a90
1a98
1aa0
1aa8
1ab0
1ab8
1ac0
1ac8
1ad0
1ad8
1ae0
1ae8
1af0
1af8
1b00
1b08
1b10
1b18
1b20
1b28
1b30
1b38
1b40
1b48
1b50
1b58
1b60
1b68
1b70
1b78
1b80
1b88
1b90
1b98
1ba0
1ba8
1bb0
1bb8
1bc0
1bc8
1bd0
1bd8
1be0
1be8
1bf0
1bf8
1c00
1c08
1c10
1c18
1c20
1c28
1c30
1c38
1c40
1c48
1c50
1c58
1c60
1c68
1c70
1c78
1c80
1c88
1c90
1c98
1ca0
1ca8
1cb0
1cb8
1cc0
1cc8
1cd0
1cd8
1ce0
1ce8
1cf0
1cf8
1d00
1d08
1d10
1d18
1d20
1d28
1d30
1d38
1d40
1d48
1d50
1d58
1d60
1d68
1d70
1d78
1d80
1d88
1d90
1d98
1da0
1da8
1db0
1db8
1dc0
1dc8
1dd0
1dd8
1de0
1de8
1df0
1df8
1e00
1e08
1e10
1e18
1e20
1e28
1e30
1e38
1e40
1e48
1e50
1e58
1e60
1e68
1e70
1e78
1e80
1e88
1e90
1e98
1ea0
1ea8
1eb0
1eb8
1ec0
1ec8
1ed0
1ed8
1ee0
1ee8
1ef0
1ef8
1f00
1f08
1f10
1f18
1f20
1f28
1f30
1f38
1f40
1f48
1f50
1f58
1f60
1f68
1f70
1f78
1f80
1f88
1f90
1f98
1fa0
1fa8
1fb0
1fb8
1fc0
1fc8
1fd0
1fd8
1fe0
1fe8
1ff0
1ff8
2000
2008
2010
2018
2020
2028
2030
2038
2040
2048
2050
2058
2060
2068
2070
2078
2080
2088
2090
2098
20a0
20a8
20b0
20b8
20c0
20c8
20d0
20d8
20e0
20e8
20f0
20f8
2100
2108
2110
2118
2120
2128
2130
2138
2140
2148
2150
2158
2160
2168
2170
2178
2180
2188
2190
2198
21a0
21a8
21b0
21b8
21c0
21c8
21d0
21d8
21e0
21e8
21f0
21f8
2200
2208
2210
2218
2220
2228
2230
2238
2240
2248
2250
2258
2260
2268
2270
2278
2280
2288
2290
2298
22a0
22a8
22b0
22b8
22c0
22c8
22d0
22d8
22e0
22e8
22f0
22f8
2300
2308
2310
2318
2320
2328
2330
2338
2340
2348
2350
2358
2360
2368
2370
2378
2380
2388
2390
2398
23a0
23a8
23b0
23b8
23c0
23c8
23d0
23d8
23e0
23e8
23f0
23f8
2400
2408
2410
2418
2420
2428
2430
2438
2440
2448
2450
2458
2460
2468
2470
2478
2480
2488
2490
2498
24a0
24a8
24b0
24b8
24c0
24c8
24d0
24d8
24e0
24e8
24f0
24f8
2500
2508
2510
2518
2520
2528
2530
2538
2540
2548
2550
2558
2560
2568
2570
2578
2580
2588
2590
2598
25a0
25a8
25b0
25b8
25c0
25c8
25d0
25d8
25e0
25e8
25f0
25f8
2600
2608
2610
2618
2620
2628
2630
2638
2640
2648
2650
2658
2660
2668
2670
2678
2680
2688
2690
2698
26a0
26a8
26b0
26b8
26c0
26c8
26d0
26d8
26e0
26e8
26f0
26f8
2700
2708
2710
2718
2720
2728
2730
2738
2740
2748
2750
2758
2760
2768
2770
2778
2780
2788
2790
2798
27a0
27a8
27b0
27b8
27c0
27c8
27d0
27d8
27e0
27e8
27f0
27f8
2800
2808
2810
2818
2820
2828
2830
2838
2840
2848
2850
2858
2860
2868
2870
2878
2880
2888
2890
2898
28a0
28a8
28b0
28b8
28c0
28c8
28d0
28d8
28e0
28e8
28f0
28f8
2900
2908
2910
2918
2920
2928
2930
2938
2940
2948
2950
2958
2960
2968
2970
2978
2980
2988
2990
2998
29a0
29a8
29b0
29b8
29c0
29c8
29d0
29d8
29e0
29e8
29f0
29f8
2a00
2a08
2a10
2a18
2a20
2a28
2a30
2a38
2a40
2a48
2a50
2a58
2a60
2a68
2a70
2a78
2a80
2a88
2a90
2a98
2aa0
2aa8
2ab0
2ab8
2ac0
2ac8
2ad0
2ad8
2ae0
2ae8
2af0
2af8
2b00
2b08
2b10
2b18
2b20
2b28
2b30
2b38
2b40
2b48
2b50
2b58
2b60
2b68
2b70
2b78
2b80
2b88
2b90
2b98
2ba0
2ba8
2bb0
2bb8
2bc0
2bc8
2bd0
2bd8
2be0
2be8
2bf0
2bf8
2c00
2c08
2c10
2c18
2c20
2c28
2c30
2c38
2c40
2c48
2c50
2c58
2c60
2c68
2c70
2c78
2c80
2c88
2c90
2c98
2ca0
2ca8
2cb0
2cb8
2cc0
2cc8
2cd0
2cd8
2ce0
2ce8
2cf0
2cf8
2d00
2d08
2d10
2d18
2d20
2d28
2d30
2d38
2d40
2d48
2d50
2d58
2d60
2d68
2d70
2d78
2d80
2d88
2d90
2d98
2da0
2da8
2db0
2db8
2dc0
2dc8
2dd0
2dd8
2de0
2de8
2df0
2df8
2e00
2e08
2e10
2e18
2e20
2e28
2e30
2e38
2e40
2e48
2e50
2e58
2e60
2e68
2e70
2e78
2e80
2e88
2e90
2e98
2ea0
2ea8
2eb0
2eb8
2ec0
2ec8
2ed0
2ed8
2ee0
2ee8
2ef0
2ef8
2f00
2f08
2f10
2f18
2f20
2f28
2f30
2f38
2f40
2f48
2f50
2f58
2f60
2f68
2f70
2f78
2f80
2f88
2f90
2f98
2fa0
2fa8
2fb0
2fb8
2fc0
2fc8
2fd0
2fd8
2fe0
2fe8
2ff0
2ff8
3000
3008
3010
3018
3020
3028
3030
3038
3040
3048
3050
3058
3060
3068
3070
3078
3080
3088
3090
3098
30a0
30a8
30b0
30b8
30c0
30c8
30d0
30d8
30e0
30e8
30f0
30f8
3100
3108
3110
3118
3120
3128
3130
3138
3140
3148
3150
3158
3160
3168
3170
3178
3180
3188
3190
3198
31a0
31a8
31b0
31b8
31c0
31c8
31d0
31d8
31e0
31e8
31f0
31f8
3200
3208
3210
3218
3220
3228
3230
3238
3240
3248
3250
3258
3260
3268
3270
3278
3280
3288
3290
3298
32a0
32a8
32b0
32b8
32c0
32c8
32d0
32d8
32e0
32e8
32f0
32f8
3300
3308
3310
3318
3320
3328
3330
3338
3340
3348
3350
3358
3360
3368
3370
3378
3380
3388
3390
3398
33a0
33a8
33b0
33b8
33c0
33c8
33d0
33d8
33e0
33e8
33f0
33f8
3400
3408
3410
3418
3420
3428
3430
3438
3440
3448
3450
3458
3460
3468
3470
3478
3480
3488
3490
3498
34a0
34a8
34b0
34b8
34c0
34c8
34d0
34d8
34e0
34e8
34f0
34f8
3500
3508
3510
3518
3520
3528
3530
3538
3540
3548
3550
3558
3560
3568
3570
3578
3580
3588
3590
3598
35a0
35a8
35b0
35b8
35c0
35c8
35d0
35d8
35e0
35e8
35f0
35f8
3600
3608
3610
3618
3620
3628
3630
3638
3640
3648
3650
3658
3660
3668
3670
3678
3680
3688
3690
3698
36a0
36a8
36b0
36b8
36c0
36c8
36d0
36d8
36e0
36e8
36f0
36f8
3700
3708
3710
3718
3720
3728
3730
3738
3740
3748
3750
3758
3760
3768
3770
3778
3780
3788
3790
3798
37a0
37a8
37b0
37b8
37c0
37c8
37d0
37d8
37e0
37e8
37f0
37f8
3800
3808
3810
3818
3820
3828
3830
3838
3840
3848
3850
3858
3860
3868
3870
3878
3880
3888
3890
3898
38a0
38a8
38b0
38b8
38c0
38c8
38d0
38d8
38e0
38e8
38f0
38f8
3900
3908
3910
3918
3920
3928
3930
3938
3940
3948
3950
3958
3960
3968
3970
3978
3980
3988
3990
3998
39a0
39a8
39b0
39b8
39c0
39c8
39d0
39d8
39e0
39e8
39f0
39f8
3a00
3a08
3a10
3a18
3a20
3a28
3a30
3a38
3a40
3a48
3a50
3a58
3a60
3a68
3a70
3a78
3a80
3a88
3a90
3a98
3aa0
3aa8
3ab0
3ab8
3ac0
3ac8
3ad0
3ad8
3ae0
3ae8
3af0
3af8
3b00
3b08
3b10
3b18
3b20
3b28
3b30
3b38
3b40
3b48
3b50
3b58
3b60
3b68
3b70
3b78
3b80
3b88
3b90
3b98
3ba0
3ba8
3bb0
3bb8
3bc0
3bc8
3bd0
3bd8
3be0
3be8
3bf0
3bf8
3c00
3c08
3c10
3c18
3c20
3c28
3c30
3c38
3c40
3c48
3c50
3c58
3c60
3c68
3c70
3c78
3c80
3c88
3c90
3c98
3ca0
3ca8
3cb0
3cb8
3cc0
3cc8
3cd0
3cd8
3ce0
3ce8
3cf0
3cf8
3d00
3d08
3d10
3d18
3d20
3d28
3d30
3d38
3d40
3d48
3d50
3d58
3d60
3d68
3d70
3d78
3d80
3d88
3d90
3d98
3da0
3da8
3db0
3db8
3dc0
3dc8
3dd0
3dd8
3de0
3de8
3df0
3df8
3e00
3e08
3e10
3e18
3e20
3e28
3e30
3e38
3e40
3e48
3e50
3e58
3e60
3e68
3e70
3e78
3e80
3e88
3e90
3e98
3ea0
3ea8
3eb0
3eb8
3ec0
3ec8
3ed0
3ed8
3ee0
3ee8
3ef0
3ef8
3f00
3f08
3f10
3f18
3f20
3f28
3f30
3f38
3f40
3f48
3f50
3f58
3f60
3f68
3f70
3f78
3f80
3f88
3f90
3f98
3fa0
3fa8
3fb0
3fb8
3fc0
3fc8
3fd0
3fd8
3fe0
3fe8
3ff0
3ff8
4000
4008
4010
4018
4020
4028
4030
4038
4040
4048
4050
4058
4060
4068
4070
4078
4080
4088
4090
4098
40a0
40a8
40b0
40b8
40c0
40c8
40d0
40d8
40e0
40e8
40f0
40f8
4100
4108
4110
4118
4120
4128
4130
4138
4140
4148
4150
4158
4160
4168
4170
4178
4180
4188
4190
4198
41a0
41a8
41b0
41b8
41c0
41c8
41d0
41d8
41e0
41e8
41f0
41f8
4200
4208
4210
4218
4220
4228
4230
4238
4240
4248
4250
4258
4260
4268
4270
4278
4280
4288
4290
4298
42a0
42a8
42b0
42b8
42c0
42c8
42d0
42d8
42e0
42e8
42f0
42f8
4300
4308
4310
4318
4320
4328
4330
4338
4340
4348
4350
4358
4360
4368
4370
4378
4380
4388
4390
4398
43a0
43a8
43b0
43b8
43c0
43c8
43d0
43d8
43e0
43e8
43f0
43f8
4400
4408
4410
4418
4420
4428
4430
4438
4440
4448
4450
4458
4460
4468
4470
4478
4480
4488
4490
4498
44a0
44a8
44b0
44b8
44c0
44c8
44d0
44d8
44e0
44e8
44f0
44f8
4500
4508
4510
4518
4520
4528
4530
4538
4540
4548
4550
4558
4560
4568
4570
4578
4580
4588
4590
4598
45a0
45a8
45b0
45b8
45c0
45c8
45d0
45d8
45e0
45e8
45f0
45f8
4600
4608
4610
4618
4620
4628
4630
4638
4640
4648
4650
4658
4660
4668
4670
4678
4680
4688
4690
4698
46a0
46a8
46b0
46b8
46c0
46c8
46d0
46d8
46e0
46e8
46f0
46f8
4700
4708
4710
4718
4720
4728
4730
4738
4740
4748
4750
4758
4760
4768
4770
4778
4780
4788
4790
4798
47a0
47a8
47b0
47b8
47c0
47c8
47d0
47d8
47e0
47e8
47f0
47f8
4800
4808
4810
4818
4820
4828
4830
4838
4840
4848
4850
4858
4860
4868
4870
4878
4880
4888
4890
4898
48a0
48a8
48b0
48b8
48c0
48c8
48d0
48d8
48e0
48e8
48f0
48f8
4900
4908
4910
4918
4920
4928
4930
4938
4940
4948
4950
4958
4960
4968
4970
4978
4980
4988
4990
4998
49a0
49a8
49b0
49b8
49c0
49c8
49d0
49d8
49e0
49e8
49f0
49f8
4a00
4a08
4a10
4a18
4a20
4a28
4a30
4a38
4a40
4a48
4a50
4a58
4a60
4a68
4a70
4a78
4a80
4a88
4a90
4a98
4aa0
4aa8
4ab0
4ab8
4ac0
4ac8
4ad0
4ad8
4ae0
4ae8
4af0
4af8
4b00
4b08
4b10
4b18
4b20
4b28
4b30
4b38
4b40
4b48
4b50
4b58
4b60
4b68
4b70
4b78
4b80
4b88
4b90
4b98
4ba0
4ba8
4bb0
4bb8
4bc0
4bc8
4bd0
4bd8
4be0
4be8
4bf0
4bf8
4c00
4c08
4c10
4c18
4c20
4c28
4c30
4c38
4c40
4c48
4c50
4c58
4c60
4c68
4c70
4c78
4c80
4c88
4c90
4c98
4ca0
4ca8
4cb0
4cb8
4cc0
4cc8
4cd0
4cd8
4ce0
4ce8
4cf0
4cf8
4d00
4d08
4d10
4d18
4d20
4d28
4d30
4d38
4d40
4d48
4d50
4d58
4d60
4d68
4d70
4d78
4d80
4d88
4d90
4d98
4da0
4da8
4db0
4db8
4dc0
4dc8
4dd0
4dd8
4de0
4de8
4df0
4df8
4e00
4e08
4e10
4e18
4e20
4e28
4e30
4e38
4e40
4e48
4e50
4e58
4e60
4e68
4e70
4e78
4e80
4e88
4e90
4e98
4ea0
4ea8
4eb0
4eb8
4ec0
4ec8
4ed0
4ed8
4ee0
4ee8
4ef0
4ef8
4f00
4f08
4f10
4f18
4f20
4f28
4f30
4f38
4f40
4f48
4f50
4f58
4f60
4f68
4f70
4f78
4f80
4f88
4f90
4f98
4fa0
4fa8
4fb0
4fb8
4fc0
4fc8
4fd0
4fd8
4fe0
4fe8
4ff0
4ff8
5000
5008
5010
5018
5020
5028
5030
5038
5040
5048
5050
5058
5060
5068
5070
5078
5080
5088
5090
5098
50a0
50a8
50b0
50b8
50c0
50c8
50d0
50d8
50e0
50e8
50f0
50f8
5100
5108
5110
5118
5120
5128
5130
5138
5140
5148
5150
5158
5160
5168
5170
5178
5180
5188
5190
5198
51a0
51a8
51b0
51b8
51c0
51c8
51d0
51d8
51e0
51e8
51f0
51f8
5200
5208
5210
5218
5220
5228
5230
5238
5240
5248
5250
5258
5260
5268
5270
5278
5280
5288
5290
5298
52a0
52a8
52b0
52b8
52c0
52c8
52d0
52d8
52e0
52e8
52f0
52f8
5300
5308
5310
5318
5320
5328
5330
5338
5340
5348
5350
5358
5360
5368
5370
5378
5380
5388
5390
5398
53a0
53a8
53b0
53b8
53c0
53c8
53d0
53d8
53e0
53e8
53f0
53f8
5400
5408
5410
5418
5420
5428
5430
5438
5440
5448
5450
5458
5460
5468
5470
5478
5480
5488
5490
5498
54a0
54a8
54b0
54b8
54c0
54c8
54d0
54d8
54e0
54e8
54f0
54f8
5500
5508
5510
5518
5520
5528
5530
5538
5540
5548
5550
5558
5560
5568
5570
5578
5580
5588
5590
5598
55a0
55a8
55b0
55b8
55c0
55c8
55d0
55d8
55e0
55e8
55f0
55f8
5600
5608
5610
5618
5620
5628
5630
5638
5640
5648
5650
5658
5660
5668
5670
5678
5680
5688
5690
5698
56a0
56a8
56b0
56b8
56c0
56c8
56d0
56d8
56e0
56e8
56f0
56f8
5700
5708
5710
5718
5720
5728
5730
5738
5740
5748
5750
5758
5760
5768
5770
5778
5780
5788
5790
5798
57a0
57a8
57b0
57b8
57c0
57c8
57d0
57d8
57e0
57e8
57f0
57f8
5800
5808
5810
5818
5820
5828
5830
5838
5840
5848
5850
5858
5860
5868
5870
5878
5880
5888
5890
5898
58a0
58a8
58b0
58b8
58c0
58c8
58d0
58d8
58e0
58e8
58f0
58f8
5900
5908
5910
5918
5920
5928
5930
5938
5940
5948
5950
5958
5960
5968
5970
5978
5980
5988
5990
5998
59a0
59a8
59b0
59b8
59c0
59c8
59d0
59d8
59e0
59e8
59f0
59f8
5a00
5a08
5a10
5a18
5a20
5a28
5a30
5a38
5a40
5a48
5a50
5a58
5a60
5a68
5a70
5a78
5a80
5a88
5a90
5a98
5aa0
5aa8
5ab0
5ab8
5ac0
5ac8
5ad0
5ad8
5ae0
5ae8
5af0
5af8
5b00
5b08
5b10
5b18
5b20
5b28
5b30
5b38
5b40
5b48
5b50
5b58
5b60
5b68
5b70
5b78
5b80
5b88
5b90
5b98
5ba0
5ba8
5bb0
5bb8
5bc0
5bc8
5bd0
5bd8
5be0
5be8
5bf0
5bf8
5c00
5c08
5c10
5c18
5c20
5c28
5c30
5c38
5c40
5c48
5c50
5c58
5c60
5c68
5c70
5c78
5c80
5c88
5c90
5c98
5ca0
5ca8
5cb0
5cb8
5cc0
5cc8
5cd0
5cd8
5ce0
5ce8
5cf0
5cf8
5d00
5d08
5d10
5d18
5d20
5d28
5d30
5d38
5d40
5d48
5d50
5d58
5d60
5d68
5d70
5d78
5d80
5d88
5d90
5d98
5da0
5da8
5db0
5db8
5dc0
5dc8
5dd0
5dd8
5de0
5de8
5df0
5df8
5e00
5e08
5e10
5e18
5e20
5e28
5e30
5e38
5e40
5e48
5e50
5e58
5e60
5e68
5e70
5e78
5e80
5e88
5e90
5e98
5ea0
5ea8
5eb0
5eb8
5ec0
5ec8
5ed0
5ed8
5ee0
5ee8
5ef0
5ef8
5f00
5f08
5f10
5f18
5f20
5f28
5f30
5f38
5f40
5f48
5f50
5f58
5f60
5f68
5f70
5f78
5f80
5f88
5f90
5f98
5fa0
5fa8
5fb0
5fb8
5fc0
5fc8
5fd0
5fd8
5fe0
5fe8
5ff0
5ff8
6000
6008
6010
6018
6020
6028
6030
6038
6040
6048
6050
6058
6060
6068
6070
6078
6080
6088
6090
6098
60a0
60a8
60b0
60b8
60c0
60c8
60d0
60d8
60e0
60e8
60f0
60f8
6100
6108
6110
6118
6120
6128
6130
6138
6140
6148
6150
6158
6160
6168
6170
6178
6180
6188
6190
6198
61a0
61a8
61b0
61b8
61c0
61c8
61d0
61d8
61e0
61e8
61f0
61f8
6200
6208
6210
6218
6220
6228
6230
6238
6240
6248
6250
6258
6260
6268
6270
6278
6280
6288
6290
6298
62a0
62a8
62b0
62b8
62c0
62c8
62d0
62d8
62e0
62e8
62f0
62f8
6300
6308
6310
6318
6320
6328
6330
6338
6340
6348
6350
6358
6360
6368
6370
6378
6380
6388
6390
6398
63a0
63a8
63b0
63b8
63c0
63c8
63d0
63d8
63e0
63e8
63f0
63f8
6400
6408
6410
6418
6420
6428
6430
6438
6440
6448
6450
6458
6460
6468
6470
6478
6480
6488
6490
6498
64a0
64a8
64b0
64b8
64c0
64c8
64d0
64d8
64e0
64e8
64f0
64f8
6500
6508
6510
6518
6520
6528
6530
6538
6540
6548
6550
6558
6560
6568
6570
6578
6580
6588
6590
6598
65a0
65a8
65b0
65b8
65c0
65c8
65d0
65d8
65e0
65e8
65f0
65f8
6600
6608
6610
6618
6620
6628
6630
6638
6640
6648
6650
6658
6660
6668
6670
6678
6680
6688
6690
6698
66a0
66a8
66b0
66b8
66c0
66c8
66d0
66d8
66e0
66e8
66f0
66f8
6700
6708
6710
6718
6720
6728
6730
6738
6740
6748
6750
6758
6760
6768
6770
6778
6780
6788
6790
6798
67a0
67a8
67b0
67b8
67c0
67c8
67d0
67d8
67e0
67e8
67f0
67f8
6800
6808
6810
6818
6820
6828
6830
6838
6840
6848
6850
6858
6860
6868
6870
6878
6880
6888
6890
6898
68a0
68a8
68b0
68b8
68c0
68c8
68d0
68d8
68e0
68e8
68f0
68f8
6900
6908
6910
6918
6920
6928
6930
6938
6940
6948
6950
6958
6960
6968
6970
6978
6980
6988
6990
6998
69a0
69a8
69b0
69b8
69c0
69c8
69d0
69d8
69e0
69e8
69f0
69f8
6a00
6a08
6a10
6a18
6a20
6a28
6a30
6a38
6a40
6a48
6a50
6a58
6a60
6a68
6a70
6a78
6a80
6a88
6a90
6a98
6aa0
6aa8
6ab0
6ab8
6ac0
6ac8
6ad0
6ad8
6ae0
6ae8
6af0
6af8
6b00
6b08
6b10
6b18
6b20
6b28
6b30
6b38
6b40
6b48
6b50
6b58
6b60
6b68
6b70
6b78
6b80
6b88
6b90
6b98
6ba0
6ba8
6bb0
6bb8
6bc0
6bc8
6bd0
6bd8
6be0
6be8
6bf0
6bf8
6c00
6c08
6c10
6c18
6c20
6c28
6c30
6c38
6c40
6c48
6c50
6c58
6c60
6c68
6c70
6c78
6c80
6c88
6c90
6c98
6ca0
6ca8
6cb0
6cb8
6cc0
6cc8
6cd0
6cd8
6ce0
6ce8
6cf0
6cf8
6d00
6d08
6d10
6d18
6d20
6d28
6d30
6d38
6d40
6d48
6d50
6d58
6d60
6d68
6d70
6d78
6d80
6d88
6d90
6d98
6da0
6da8
6db0
6db8
6dc0
6dc8
6dd0
6dd8
6de0
6de8
6df0
6df8
6e00
6e08
6e10
6e18
6e20
6e28
6e30
6e38
6e40
6e48
6e50
6e58
6e60
6e68
6e70
6e78
6e80
6e88
6e90
6e98
6ea0
6ea8
6eb0
6eb8
6ec0
6ec8
6ed0
6ed8
6ee0
6ee8
6ef0
6ef8
6f00
6f08
6f10
6f18
6f20
6f28
6f30
6f38
6f40
6f48
6f50
6f58
6f60
6f68
6f70
6f78
6f80
6f88
6f90
6f98
6fa0
6fa8
6fb0
6fb8
6fc0
6fc8
6fd0
6fd8
6fe0
6fe8
6ff0
6ff8
7000
7008
7010
7018
7020
7028
7030
7038
7040
7048
7050
7058
7060
7068
7070
7078
7080
7088
7090
7098
70a0
70a8
70b0
70b8
70c0
70c8
70d0
70d8
70e0
70e8
70f0
70f8
7100
7108
7110
7118
7120
7128
7130
7138
7140
7148
7150
7158
7160
7168
7170
7178
7180
7188
7190
7198
71a0
71a8
71b0
71b8
71c0
71c8
71d0
71d8
71e0
71e8
71f0
71f8
7200
7208
7210
7218
7220
7228
7230
7238
7240
7248
7250
7258
7260
7268
7270
7278
7280
7288
7290
7298
72a0
72a8
72b0
72b8
72c0
72c8
72d0
72d8
72e0
72e8
72f0
72f8
7300
7308
7310
7318
7320
7328
7330
7338
7340
7348
7350
7358
7360
7368
7370
7378
7380
7388
7390
7398
73a0
73a8
73b0
73b8
73c0
73c8
73d0
73d8
73e0
73e8
73f0
73f8
7400
7408
7410
7418
7420
7428
7430
7438
7440
7448
7450
7458
7460
7468
7470
7478
7480
7488
7490
7498
74a0
74a8
74b0
74b8
74c0
74c8
74d0
74d8
74e0
74e8
74f0
74f8
7500
7508
7510
7518
7520
7528
7530
7538
7540
7548
7550
7558
7560
7568
7570
7578
7580
7588
7590
7598
75a0
75a8
75b0
75b8
75c0
75c8
75d0
75d8
75e0
75e8
75f0
75f8
7600
7608
7610
7618
7620
7628
7630
7638
7640
7648
7650
7658
7660
7668
7670
7678
7680
7688
7690
7698
76a0
76a8
76b0
76b8
76c0
76c8
76d0
76d8
76e0
76e8
76f0
76f8
7700
7708
7710
7718
7720
7728
7730
7738
7740
7748
7750
7758
7760
7768
7770
7778
7780
7788
7790
7798
77a0
77a8
77b0
77b8
77c0
77c8
77d0
77d8
77e0
77e8
77f0
77f8
7800
7808
7810
7818
7820
7828
7830
7838
7840
7848
7850
7858
7860
7868
7870
7878
7880
7888
7890
7898
78a0
78a8
78b0
78b8
78c0
78c8
78d0
78d8
78e0
78e8
78f0
78f8
7900
7908
7910
7918
7920
7928
7930
7938
7940
7948
7950
7958
7960
7968
7970
7978
7980
7988
7990
7998
79a0
79a8
79b0
79b8
79c0
79c8
79d0
79d8
79e0
79e8
79f0
79f8
7a00
7a08
7a10
7a18
7a20
7a28
7a30
7a38
7a40
7a48
7a50
7a58
7a60
7a68
7a70
7a78
7a80
7a88
7a90
7a98
7aa0
7aa8
7ab0
7ab8
7ac0
7ac8
7ad0
7ad8
7ae0
7ae8
7af0
7af8
7b00
7b08
7b10
7b18
7b20
7b28
7b30
7b38
7b40
7b48
7b50
7b58
7b60
7b68
7b70
7b78
7b80
7b88
7b90
7b98
7ba0
7ba8
7bb0
7bb8
7bc0
7bc8
7bd0
7bd8
7be0
7be8
7bf0
7bf8
7c00
7c08
7c10
7c18
7c20
7c28
7c30
7c38
7c40
7c48
7c50
7c58
7c60
7c68
7c70
7c78
7c80
7c88
7c90
7c98
7ca0
7ca8
7cb0
7cb8
7cc0
7cc8
7cd0
7cd8
7ce0
7ce8
7cf0
7cf8
7d00
7d08
7d10
7d18
7d20
7d28
7d30
7d38
7d40
7d48
7d50
7d58
7d60
7d68
7d70
7d78
7d80
7d88
7d90
7d98
7da0
7da8
7db0
7db8
7dc0
7dc8
7dd0
7dd8
7de0
7de8
7df0
7df8
7e00
7e08
7e10
7e18
7e20
7e28
7e30
7e38
7e40
7e48
7e50
7e58
7e60
7e68
7e70
7e78
7e80
7e88
7e90
7e98
7ea0
7ea8
7eb0
7eb8
7ec0
7ec8
7ed0
7ed8
7ee0
7ee8
7ef0
7ef8
7f00
7f08
7f10
7f18
7f20
7f28
7f30
7f38
7f40
7f48
7f50
7f58
7f60
7f68
7f70
7f78
7f80
7f88
7f90
7f98
7fa0
7fa8
7fb0
7fb8
7fc0
7fc8
7fd0
7fd8
7fe0
7fe8
7ff0
7ff8
8000
8008
8010
8018
8020
8028
8030
8038
8040
8048
8050
8058
8060
8068
8070
8078
8080
8088
8090
8098
80a0
80a8
80b0
80b8
80c0
80c8
80d0
80d8
80e0
80e8
80f0
80f8
8100
8108
8110
8118
8120
8128
8130
8138
8140
8148
8150
8158
8160
8168
8170
8178
8180
8188
8190
8198
81a0
81a8
81b0
81b8
81c0
81c8
81d0
81d8
81e0
81e8
81f0
81f8
8200
8208
8210
8218
8220
8228
8230
8238
8240
8248
8250
8258
8260
8268
8270
8278
8280
8288
8290
8298
82a0
82a8
82b0
82b8
82c0
82c8
82d0
82d8
82e0
82e8
82f0
82f8
8300
8308
8310
8318
8320
8328
8330
8338
8340
8348
8350
8358
8360
8368
8370
8378
8380
8388
8390
8398
83a0
83a8
83b0
83b8
83c0
83c8
83d0
83d8
83e0
83e8
83f0
83f8
8400
8408
8410
8418
8420
8428
8430
8438
8440
8448
8450
8458
8460
8468
8470
8478
8480
8488
8490
8498
84a0
84a8
84b0
84b8
84c0
84c8
84d0
84d8
84e0
84e8
84f0
84f8
8500
8508
8510
8518
8520
8528
8530
8538
8540
8548
8550
8558
8560
8568
8570
8578
8580
8588
8590
8598
85a0
85a8
85b0
85b8
85c0
85c8
85d0
85d8
85e0
85e8
85f0
85f8
8600
8608
8610
8618
8620
8628
8630
8638
8640
8648
8650
8658
8660
8668
8670
8678
8680
8688
8690
8698
86a0
86a8
86b0
86b8
86c0
86c8
86d0
86d8
86e0
86e8
86f0
86f8
8700
8708
8710
8718
8720
8728
8730
8738
8740
8748
8750
8758
8760
8768
8770
8778
8780
8788
8790
8798
87a0
87a8
87b0
87b8
87c0
87c8
87d0
87d8
87e0
87e8
87f0
87f8
8800
8808
8810
8818
8820
8828
8830
8838
8840
8848
8850
8858
8860
8868
8870
8878
8880
8888
8890
8898
88a0
88a8
88b0
88b8
88c0
88c8
88d0
88d8
88e0
88e8
88f0
88f8
8900
8908
8910
8918
8920
8928
8930
8938
8940
8948
8950
8958
8960
8968
8970
8978
8980
8988
8990
8998
89a0
89a8
89b0
89b8
89c0
89c8
89d0
89d8
89e0
89e8
89f0
89f8
8a00
8a08
8a10
8a18
8a20
8a28
8a30
8a38
8a40
8a48
8a50
8a58
8a60
8a68
8a70
8a78
8a80
8a88
8a90
8a98
8aa0
8aa8
8ab0
8ab8
8ac0
8ac8
8ad0
8ad8
8ae0
8ae8
8af0
8af8
8b00
8b08
8b10
8b18
8b20
8b28
8b30
8b38
8b40
8b48
8b50
8b58
8b60
8b68
8b70
8b78
8b80
8b88
8b90
8b98
8ba0
8ba8
8bb0
8bb8
8bc0
8bc8
8bd0
8bd8
8be0
8be8
8bf0
8bf8
8c00
8c08
8c10
8c18
8c20
8c28
8c30
8c38
8c40
8c48
8c50
8c58
8c60
8c68
8c70
8c78
8c80
8c88
8c90
8c98
8ca0
8ca8
8cb0
8cb8
8cc0
8cc8
8cd0
8cd8
8ce0
8ce8
8cf0
8cf8
8d00
8d08
8d10
8d18
8d20
8d28
8d30
8d38
8d40
8d48
8d50
8d58
8d60
8d68
8d70
8d78
8d80
8d88
8d90
8d98
8da0
8da8
8db0
8db8
8dc0
8dc8
8dd0
8dd8
8de0
8de8
8df0
8df8
8e00
8e08
8e10
8e18
8e20
8e28
8e30
8e38
8e40
8e48
8e50
8e58
8e60
8e68
8e70
8e78
8e80
8e88
8e90
8e98
8ea0
8ea8
8eb0
8eb8
8ec0
8ec8
8ed0
8ed8
8ee0
8ee8
8ef0
8ef8
8f00
8f08
8f10
8f18
8f20
8f28
8f30
8f38
8f40
8f48
8f50
8f58
8f60
8f68
8f70
8f78
8f80
8f88
8f90
8f98
8fa0
8fa8
8fb0
8fb8
8fc0
8fc8
8fd0
8fd8
8fe0
8fe8
8ff0
8ff8
9000
9008
9010
9018
9020
9028
9030
9038
9040
9048
9050
9058
9060
9068
9070
9078
9080
9088
9090
9098
90a0
90a8
90b0
90b8
90c0
90c8
90d0
90d8
90e0
90e8
90f0
90f8
9100
9108
9110
9118
9120
9128
9130
9138
9140
9148
9150
9158
9160
9168
9170
9178
9180
9188
9190
9198
91a0
91a8
91b0
91b8
91c0
91c8
91d0
91d8
91e0
91e8
91f0
91f8
9200
9208
9210
9218
9220
9228
9230
9238
9240
9248
9250
9258
9260
9268
9270
9278
9280
9288
9290
9298
92a0
92a8
92b0
92b8
92c0
92c8
92d0
92d8
92e0
92e8
92f0
92f8
9300
9308
9310
9318
9320
9328
9330
9338
9340
9348
9350
9358
9360
9368
9370
9378
9380
9388
9390
9398
93a0
93a8
93b0
93b8
93c0
93c8
93d0
93d8
93e0
93e8
93f0
93f8
9400
9408
9410
9418
9420
9428
9430
9438
9440
9448
9450
9458
9460
9468
9470
9478
9480
9488
9490
9498
94a0
94a8
94b0
94b8
94c0
94c8
94d0
94d8
94e0
94e8
94f0
94f8
9500
9508
9510
9518
9520
9528
9530
9538
9540
9548
9550
9558
9560
9568
9570
9578
9580
9588
9590
9598
95a0
95a8
95b0
95b8
95c0
95c8
95d0
95d8
95e0
95e8
95f0
95f8
9600
9608
9610
9618
9620
9628
9630
9638
9640
9648
9650
9658
9660
9668
9670
9678
9680
9688
9690
9698
96a0
96a8
96b0
96b8
96c0
96c8
96d0
96d8
96e0
96e8
96f0
96f8
9700
9708
9710
9718
9720
9728
9730
9738
9740
9748
9750
9758
9760
9768
9770
9778
9780
9788
9790
9798
97a0
97a8
97b0
97b8
97c0
97c8
97d0
97d8
97e0
97e8
97f0
97f8
9800
9808
9810
9818
9820
9828
9830
9838
9840
9848
9850
9858
9860
9868
9870
9878
9880
9888
9890
9898
98a0
98a8
98b0
98b8
98c0
98c8
98d0
98d8
98e0
98e8
98f0
98f8
9900
9908
9910
9918
9920
9928
9930
9938
9940
9948
9950
9958
9960
9968
9970
9978
9980
9988
9990
9998
99a0
99a8
99b0
99b8
99c0
99c8
99d0
99d8
99e0
99e8
99f0
99f8
9a00
9a08
9a10
9a18
9a20
9a28
9a30
9a38
9a40
9a48
9a50
9a58
9a60
9a68
9a70
9a78
9a80
9a88
9a90
9a98
9aa0
9aa8
9ab0
9ab8
9ac0
9ac8
9ad0
9ad8
9ae0
9ae8
9af0
9af8
9b00
9b08
9b10
9b18
9b20
9b28
9b30
9b38
9b40
9b48
9b50
9b58
9b60
9b68
9b70
9b78
9b80
9b88
9b90
9b98
9ba0
9ba8
9bb0
9bb8
9bc0
9bc8
9bd0
9bd8
9be0
9be8
9bf0
9bf8
9c00
9c08
9c10
9c18
9c20
9c28
9c30
9c38
9c40
9c48
9c50
9c58
9c60
9c68
9c70
9c78
9c80
9c88
9c90
9c98
9ca0
9ca8
9cb0
9cb8
9cc0
9cc8
9cd0
9cd8
9ce0
9ce8
9cf0
9cf8
9d00
9d08
9d10
9d18
9d20
9d28
9d30
9d38
9d40
9d48
9d50
9d58
9d60
9d68
9d70
9d78
9d80
9d88
9d90
9d98
9da0
9da8
9db0
9db8
9dc0
9dc8
9dd0
9dd8
9de0
9de8
9df0
9df8
9e00
9e08
9e10
9e18
9e20
9e28
9e30
9e38
9e40
9e48
9e50
9e58
9e60
9e68
9e70
9e78
9e80
9e88
9e90
9e98
9ea0
9ea8
9eb0
9eb8
9ec0
9ec8
9ed0
9ed8
9ee0
9ee8
9ef0
9ef8
9f00
9f08
9f10
9f18
9f20
9f28
9f30
9f38
9f40
9f48
9f50
9f58
9f60
9f68
9f70
9f78
9f80
9f88
9f90
9f98
9fa0
9fa8
9fb0
9fb8
9fc0
9fc8
9fd0
9fd8
9fe0
9fe8
9ff0
9ff8
a000
a008
a010
a018
a020
a028
a030
a038
a040
a048
a050
a058
a060
a068
a070
a078
a080
a088
a090
a098
a0a0
a0a8
a0b0
a0b8
a0c0
a0c8
a0d0
a0d8
a0e0
a0e8
a0f0
a0f8
a100
a108
a110
a118
a120
a128
a130
a138
a140
a148
a150
a158
a160
a168
a170
a178
a180
a188
a190
a198
a1a0
a1a8
a1b0
a1b8
a1c0
a1c8
a1d0
a1d8
a1e0
a1e8
a1f0
a1f8
a200
a208
a210
a218
a220
a228
a230
a238
a240
a248
a250
a258
a260
a268
a270
a278
a280
a288
a290
a298
a2a0
a2a8
a2b0
a2b8
a2c0
a2c8
a2d0
a2d8
a2e0
a2e8
a2f0
a2f8
a300
a308
a310
a318
a320
a328
a330
a338
a340
a348
a350
a358
a360
a368
a370
a378
a380
a388
a390
a398
a3a0
a3a8
a3b0
a3b8
a3c0
a3c8
a3d0
a3d8
a3e0
a3e8
a3f0
a3f8
a400
a408
a410
a418
a420
a428
a430
a438
a440
a448
a450
a458
a460
a468
a470
a478
a480
a488
a490
a498
a4a0
a4a8
a4b0
a4b8
a4c0
a4c8
a4d0
a4d8
a4e0
a4e8
a4f0
a4f8
a500
a508
a510
a518
a520
a528
a530
a538
a540
a548
a550
a558
a560
a568
a570
a578
a580
a588
a590
a598
a5a0
a5a8
a5b0
a5b8
a5c0
a5c8
a5d0
a5d8
a5e0
a5e8
a5f0
a5f8
a600
a608
a610
a618
a620
a628
a630
a638
a640
a648
a650
a658
a660
a668
a670
a678
a680
a688
a690
a698
a6a0
a6a8
a6b0
a6b8
a6c0
a6c8
a6d0
a6d8
a6e0
a6e8
a6f0
a6f8
a700
a708
a710
a718
a720
a728
a730
a738
a740
a748
a750
a758
a760
a768
a770
a778
a780
a788
a790
a798
a7a0
a7a8
a7b0
a7b8
a7c0
a7c8
a7d0
a7d8
a7e0
a7e8
a7f0
a7f8
a800
a808
a810
a818
a820
a828
a830
a838
a840
a848
a850
a858
a860
a868
a870
a878
a880
a888
a890
a898
a8a0
a8a8
a8b0
a8b8
a8c0
a8c8
a8d0
a8d8
a8e0
a8e8
a8f0
a8f8
a900
a908
a910
a918
a920
a928
a930
a938
a940
a948
a950
a958
a960
a968
a970
a978
a980
a988
a990
a998
a9a0
a9a8
a9b0
a9b8
a9c0
a9c8
a9d0
a9d8
a9e0
a9e8
a9f0
a9f8
aa00
aa08
aa10
aa18
aa20
aa28
aa30
aa38
aa40
aa48
aa50
aa58
aa60
aa68
aa70
aa78
aa80
aa88
aa90
aa98
aaa0
aaa8
aab0
aab8
aac0
aac8
aad0
aad8
aae0
aae8
aaf0
aaf8
ab00
ab08
ab10
ab18
ab20
ab28
ab30
ab38
ab40
ab48
ab50
ab58
ab60
ab68
ab70
ab78
ab80
ab88
ab90
ab98
aba0
aba8
abb0
abb8
abc0
abc8
abd0
abd8
abe0
abe8
abf0
abf8
ac00
ac08
ac10
ac18
ac20
ac28
ac30
ac38
ac40
ac48
ac50
ac58
ac60
ac68
ac70
ac78
ac80
ac88
ac90
ac98
aca0
aca8
acb0
acb8
acc0
acc8
acd0
acd8
ace0
ace8
acf0
acf8
ad00
ad08
ad10
ad18
ad20
ad28
ad30
ad38
ad40
ad48
ad50
ad58
ad60
ad68
ad70
ad78
ad80
ad88
ad90
ad98
ada0
ada8
adb0
adb8
adc0
adc8
add0
add8
ade0
ade8
adf0
adf8
ae00
ae08
ae10
ae18
ae20
ae28
ae30
ae38
ae40
ae48
ae50
ae58
ae60
ae68
ae70
ae78
ae80
ae88
ae90
ae98
aea0
aea8
aeb0
aeb8
aec0
aec8
aed0
aed8
aee0
aee8
aef0
aef8
af00
af08
af10
af18
af20
af28
af30
af38
af40
af48
af50
af58
af60
af68
af70
af78
af80
af88
af90
af98
afa0
afa8
afb0
afb8
afc0
afc8
afd0
afd8
afe0
afe8
aff0
aff8
b000
b008
b010
b018
b020
b028
b030
b038
b040
b048
b050
b058
b060
b068
b070
b078
b080
b088
b090
b098
b0a0
b0a8
b0b0
b0b8
b0c0
b0c8
b0d0
b0d8
b0e0
b0e8
b0f0
b0f8
b100
b108
b110
b118
b120
b128
b130
b138
b140
b148
b150
b158
b160
b168
b170
b178
b180
b188
b190
b198
b1a0
b1a8
b1b0
b1b8
b1c0
b1c8
b1d0
b1d8
b1e0
b1e8
b1f0
b1f8
b200
b208
b210
b218
b220
b228
b230
b238
b240
b248
b250
b258
b260
b268
b270
b278
b280
b288
b290
b298
b2a0
b2a8
b2b0
b2b8
b2c0
b2c8
b2d0
b2d8
b2e0
b2e8
b2f0
b2f8
b300
b308
b310
b318
b320
b328
b330
b338
b340
b348
b350
b358
b360
b368
b370
b378
b380
b388
b390
b398
b3a0
b3a8
b3b0
b3b8
b3c0
b3c8
b3d0
b3d8
b3e0
b3e8
b3f0
b3f8
b400
b408
b410
b418
b420
b428
b430
b438
b440
b448
b450
b458
b460
b468
b470
b478
b480
b488
b490
b498
b4a0
b4a8
b4b0
b4b8
b4c0
b4c8
b4d0
b4d8
b4e0
b4e8
b4f0
b4f8
b500
b508
b510
b518
b520
b528
b530
b538
b540
b548
b550
b558
b560
b568
b570
b578
b580
b588
b590
b598
b5a0
b5a8
b5b0
b5b8
b5c0
b5c8
b5d0
b5d8
b5e0
b5e8
b5f0
b5f8
b600
b608
b610
b618
b620
b628
b630
b638
b640
b648
b650
b658
b660
b668
b670
b678
b680
b688
b690
b698
b6a0
b6a8
b6b0
b6b8
b6c0
b6c8
b6d0
b6d8
b6e0
b6e8
b6f0
b6f8
b700
b708
b710
b718
b720
b728
b730
b738
b740
b748
b750
b758
b760
b768
b770
b778
b780
b788
b790
b798
b7a0
b7a8
b7b0
b7b8
b7c0
b7c8
b7d0
b7d8
b7e0
b7e8
b7f0
b7f8
b800
b808
b810
b818
b820
b828
b830
b838
b840
b848
b850
b858
b860
b868
b870
b878
b880
b888
b890
b898
b8a0
b8a8
b8b0
b8b8
b8c0
b8c8
b8d0
b8d8
b8e0
b8e8
b8f0
b8f8
b900
b908
b910
b918
b920
b928
b930
b938
b940
b948
b950
b958
b960
b968
b970
b978
b980
b988
b990
b998
b9a0
b9a8
b9b0
b9b8
b9c0
b9c8
b9d0
b9d8
b9e0
b9e8
b9f0
b9f8
ba00
ba08
ba10
ba18
ba20
ba28
ba30
ba38
ba40
ba48
ba50
ba58
ba60
ba68
ba70
ba78
ba80
ba88
ba90
ba98
baa0
baa8
bab0
bab8
bac0
bac8
bad0
bad8
bae0
bae8
baf0
baf8
bb00
bb08
bb10
bb18
bb20
bb28
bb30
bb38
bb40
bb48
bb50
bb58
bb60
bb68
bb70
bb78
bb80
bb88
bb90
bb98
bba0
bba8
bbb0
bbb8
bbc0
bbc8
bbd0
bbd8
bbe0
bbe8
bbf0
bbf8
bc00
bc08
bc10
bc18
bc20
bc28
bc30
bc38
bc40
bc48
bc50
bc58
bc60
bc68
bc70
bc78
bc80
bc88
bc90
bc98
bca0
bca8
bcb0
bcb8
bcc0
bcc8
bcd0
bcd8
bce0
bce8
bcf0
bcf8
bd00
bd08
bd10
bd18
bd20
bd28
bd30
bd38
bd40
bd48
bd50
bd58
bd60
bd68
bd70
bd78
bd80
bd88
bd90
bd98
bda0
bda8
bdb0
bdb8
bdc0
bdc8
bdd0
bdd8
bde0
bde8
bdf0
bdf8
be00
be08
be10
be18
be20
be28
be30
be38
be40
be48
be50
be58
be60
be68
be70
be78
be80
be88
be90
be98
bea0
bea8
beb0
beb8
bec0
bec8
bed0
bed8
bee0
bee8
bef0
bef8
bf00
bf08
bf10
bf18
bf20
bf28
bf30
bf38
bf40
bf48
bf50
bf58
bf60
bf68
bf70
bf78
bf80
bf88
bf90
bf98
bfa0
bfa8
bfb0
bfb8
bfc0
bfc8
bfd0
bfd8
bfe0
bfe8
bff0
bff8
c000
c008
c010
c018
c020
c028
c030
c038
c040
c048
c050
c058
c060
c068
c070
c078
c080
c088
c090
c098
c0a0
c0a8
c0b0
c0b8
c0c0
c0c8
c0d0
c0d8
c0e0
c0e8
c0f0
c0f8
c100
c108
c110
c118
c120
c128
c130
c138
c140
c148
c150
c158
c160
c168
c170
c178
c180
c188
c190
c198
c1a0
c1a8
c1b0
c1b8
c1c0
c1c8
c1d0
c1d8
c1e0
c1e8
c1f0
c1f8
c200
c208
c210
c218
c220
c228
c230
c238
c240
c248
c250
c258
c260
c268
c270
c278
c280
c288
c290
c298
c2a0
c2a8
c2b0
c2b8
c2c0
c2c8
c2d0
c2d8
c2e0
c2e8
c2f0
c2f8
c300
c308
c310
c318
c320
c328
c330
c338
c340
c348
c350
c358
c360
c368
c370
c378
c380
c388
c390
c398
c3a0
c3a8
c3b0
c3b8
c3c0
c3c8
c3d0
c3d8
c3e0
c3e8
c3f0
c3f8
c400
c408
c410
c418
c420
c428
c430
c438
c440
c448
c450
c458
c460
c468
c470
c478
c480
c488
c490
c498
c4a0
c4a8
c4b0
c4b8
c4c0
c4c8
c4d0
c4d8
c4e0
c4e8
c4f0
c4f8
c500
c508
c510
c518
c520
c528
c530
c538
c540
c548
c550
c558
c560
c568
c570
c578
c580
c588
c590
c598
c5a0
c5a8
c5b0
c5b8
c5c0
c5c8
c5d0
c5d8
c5e0
c5e8
c5f0
c5f8
c600
c608
c610
c618
c620
c628
c630
c638
c640
c648
c650
c658
c660
c668
c670
c678
c680
c688
c690
c698
c6a0
c6a8
c6b0
c6b8
c6c0
c6c8
c6d0
c6d8
c6e0
c6e8
c6f0
c6f8
c700
c708
c710
c718
c720
c728
c730
c738
c740
c748
c750
c758
c760
c768
c770
c778
c780
c788
c790
c798
c7a0
c7a8
c7b0
c7b8
c7c0
c7c8
c7d0
c7d8
c7e0
c7e8
c7f0
c7f8
c800
c808
c810
c818
c820
c828
c830
c838
c840
c848
c850
c858
c860
c868
c870
c878
c880
c888
c890
c898
c8a0
c8a8
c8b0
c8b8
c8c0
c8c8
c8d0
c8d8
c8e0
c8e8
c8f0
c8f8
c900
c908
c910
c918
c920
c928
c930
c938
c940
c948
c950
c958
c960
c968
c970
c978
c980
c988
c990
c998
c9a0
c9a8
c9b0
c9b8
c9c0
c9c8
c9d0
c9d8
c9e0
c9e8
c9f0
c9f8
ca00
ca08
ca10
ca18
ca20
ca28
ca30
ca38
ca40
ca48
ca50
ca58
ca60
ca68
ca70
ca78
ca80
ca88
ca90
ca98
caa0
caa8
cab0
cab8
cac0
cac8
cad0
cad8
cae0
cae8
caf0
caf8
cb00
cb08
cb10
cb18
cb20
cb28
cb30
cb38
cb40
cb48
cb50
cb58
cb60
cb68
cb70
cb78
cb80
cb88
cb90
cb98
cba0
cba8
cbb0
cbb8
cbc0
cbc8
cbd0
cbd8
cbe0
cbe8
cbf0
cbf8
cc00
cc08
cc10
cc18
cc20
cc28
cc30
cc38
cc40
cc48
cc50
cc58
cc60
cc68
cc70
cc78
cc80
cc88
cc90
cc98
cca0
cca8
ccb0
ccb8
ccc0
ccc8
ccd0
ccd8
cce0
cce8
ccf0
ccf8
cd00
cd08
cd10
cd18
cd20
cd28
cd30
cd38
cd40
cd48
cd50
cd58
cd60
cd68
cd70
cd78
cd80
cd88
cd90
cd98
cda0
cda8
cdb0
cdb8
cdc0
cdc8
cdd0
cdd8
cde0
cde8
cdf0
cdf8
ce00
ce08
ce10
ce18
ce20
ce28
ce30
ce38
ce40
ce48
ce50
ce58
ce60
ce68
ce70
ce78
ce80
ce88
ce90
ce98
cea0
cea8
ceb0
ceb8
cec0
cec8
ced0
ced8
cee0
cee8
cef0
cef8
cf00
cf08
cf10
cf18
cf20
cf28
cf30
cf38
cf40
cf48
cf50
cf58
cf60
cf68
cf70
cf78
cf80
cf88
cf90
cf98
cfa0
cfa8
cfb0
cfb8
cfc0
cfc8
cfd0
cfd8
cfe0
cfe8
cff0
cff8
d000
d008
d010
d018
d020
d028
d030
d038
d040
d048
d050
d058
d060
d068
d070
d078
d080
d088
d090
d098
d0a0
d0a8
d0b0
d0b8
d0c0
d0c8
d0d0
d0d8
d0e0
d0e8
d0f0
d0f8
d100
d108
d110
d118
d120
d128
d130
d138
d140
d148
d150
d158
d160
d168
d170
d178
d180
d188
d190
d198
d1a0
d1a8
d1b0
d1b8
d1c0
d1c8
d1d0
d1d8
d1e0
d1e8
d1f0
d1f8
d200
d208
d210
d218
d220
d228
d230
d238
d240
d248
d250
d258
d260
d268
d270
d278
d280
d288
d290
d298
d2a0
d2a8
d2b0
d2b8
d2c0
d2c8
d2d0
d2d8
d2e0
d2e8
d2f0
d2f8
d300
d308
d310
d318
d320
d328
d330
d338
d340
d348
d350
d358
d360
d368
d370
d378
d380
d388
d390
d398
d3a0
d3a8
d3b0
d3b8
d3c0
d3c8
d3d0
d3d8
d3e0
d3e8
d3f0
d3f8
d400
d408
d410
d418
d420
d428
d430
d438
d440
d448
d450
d458
d460
d468
d470
d478
d480
d488
d490
d498
d4a0
d4a8
d4b0
d4b8
d4c0
d4c8
d4d0
d4d8
d4e0
d4e8
d4f0
d4f8
d500
d508
d510
d518
d520
d528
d530
d538
d540
d548
d550
d558
d560
d568
d570
d578
d580
d588
d590
d598
d5a0
d5a8
d5b0
d5b8
d5c0
d5c8
d5d0
d5d8
d5e0
d5e8
d5f0
d5f8
d600
d608
d610
d618
d620
d628
d630
d638
d640
d648
d650
d658
d660
d668
d670
d678
d680
d688
d690
d698
d6a0
d6a8
d6b0
d6b8
d6c0
d6c8
d6d0
d6d8
d6e0
d6e8
d6f0
d6f8
d700
d708
d710
d718
d720
d728
d730
d738
d740
d748
d750
d758
d760
d768
d770
d778
d780
d788
d790
d798
d7a0
d7a8
d7b0
d7b8
d7c0
d7c8
d7d0
d7d8
d7e0
d7e8
d7f0
d7f8
d800
d808
d810
d818
d820
d828
d830
d838
d840
d848
d850
d858
d860
d868
d870
d878
d880
d888
d890
d898
d8a0
d8a8
d8b0
d8b8
d8c0
d8c8
d8d0
d8d8
d8e0
d8e8
d8f0
d8f8
d900
d908
d910
d918
d920
d928
d930
d938
d940
d948
d950
d958
d960
d968
d970
d978
d980
d988
d990
d998
d9a0
d9a8
d9b0
d9b8
d9c0
d9c8
d9d0
d9d8
d9e0
d9e8
d9f0
d9f8
da00
da08
da10
da18
da20
da28
da30
da38
da40
da48
da50
da58
da60
da68
da70
da78
da80
da88
da90
da98
daa0
daa8
dab0
dab8
dac0
dac8
dad0
dad8
dae0
dae8
daf0
daf8
db00
db08
db10
db18
db20
db28
db30
db38
db40
db48
db50
db58
db60
db68
db70
db78
db80
db88
db90
db98
dba0
dba8
dbb0
dbb8
dbc0
dbc8
dbd0
dbd8
dbe0
dbe8
dbf0
dbf8
dc00
dc08
dc10
dc18
dc20
dc28
dc30
dc38
dc40
dc48
dc50
dc58
dc60
dc68
dc70
dc78
dc80
dc88
dc90
dc98
dca0
dca8
dcb0
dcb8
dcc0
dcc8
dcd0
dcd8
dce0
dce8
dcf0
dcf8
dd00
dd08
dd10
dd18
dd20
dd28
dd30
dd38
dd40
dd48
dd50
dd58
dd60
dd68
dd70
dd78
dd80
dd88
dd90
dd98
dda0
dda8
ddb0
ddb8
ddc0
ddc8
ddd0
ddd8
dde0
dde8
ddf0
ddf8
de00
de08
de10
de18
de20
de28
de30
de38
de40
de48
de50
de58
de60
de68
de70
de78
de80
de88
de90
de98
dea0
dea8
deb0
deb8
dec0
dec8
ded0
ded8
dee0
dee8
def0
def8
df00
df08
df10
df18
df20
df28
df30
df38
df40
df48
df50
df58
df60
df68
df70
df78
df80
df88
df90
df98
dfa0
dfa8
dfb0
dfb8
dfc0
dfc8
dfd0
dfd8
dfe0
dfe8
dff0
dff8
e000
e008
e010
e018
e020
e028
e030
e038
e040
e048
e050
e058
e060
e068
e070
e078
e080
e088
e090
e098
e0a0
e0a8
e0b0
e0b8
e0c0
e0c8
e0d0
e0d8
e0e0
e0e8
e0f0
e0f8
e100
e108
e110
e118
e120
e128
e130
e138
e140
e148
e150
e158
e160
e168
e170
e178
e180
e188
e190
e198
e1a0
e1a8
e1b0
e1b8
e1c0
e1c8
e1d0
e1d8
e1e0
e1e8
e1f0
e1f8
e200
e208
e210
e218
e220
e228
e230
e238
e240
e248
e250
e258
e260
e268
e270
e278
e280
e288
e290
e298
e2a0
e2a8
e2b0
e2b8
e2c0
e2c8
e2d0
e2d8
e2e0
e2e8
e2f0
e2f8
e300
e308
e310
e318
e320
e328
e330
e338
e340
e348
e350
e358
e360
e368
e370
e378
e380
e388
e390
e398
e3a0
e3a8
e3b0
e3b8
e3c0
e3c8
e3d0
e3d8
e3e0
e3e8
e3f0
e3f8
e400
e408
e410
e418
e420
e428
e430
e438
e440
e448
e450
e458
e460
e468
e470
e478
e480
e488
e490
e498
e4a0
e4a8
e4b0
e4b8
e4c0
e4c8
e4d0
e4d8
e4e0
e4e8
e4f0
e4f8
e500
e508
e510
e518
e520
e528
e530
e538
e540
e548
e550
e558
e560
e568
e570
e578
e580
e588
e590
e598
e5a0
e5a8
e5b0
e5b8
e5c0
e5c8
e5d0
e5d8
e5e0
e5e8
e5f0
e5f8
e600
e608
e610
e618
e620
e628
e630
e638
e640
e648
e650
e658
e660
e668
e670
e678
e680
e688
e690
e698
e6a0
e6a8
e6b0
e6b8
e6c0
e6c8
e6d0
e6d8
e6e0
e6e8
e6f0
e6f8
e700
e708
e710
e718
e720
e728
e730
e738
e740
e748
e750
e758
e760
e768
e770
e778
e780
e788
e790
e798
e7a0
e7a8
e7b0
e7b8
e7c0
e7c8
e7d0
e7d8
e7e0
e7e8
e7f0
e7f8
e800
e808
e810
e818
e820
e828
e830
e838
e840
e848
e850
e858
e860
e868
e870
e878
e880
e888
e890
e898
e8a0
e8a8
e8b0
e8b8
e8c0
e8c8
e8d0
e8d8
e8e0
e8e8
e8f0
e8f8
e900
e908
e910
e918
e920
e928
e930
e938
e940
e948
e950
e958
e960
e968
e970
e978
e980
e988
e990
e998
e9a0
e9a8
e9b0
e9b8
e9c0
e9c8
e9d0
e9d8
e9e0
e9e8
e9f0
e9f8
ea00
ea08
ea10
ea18
ea20
ea28
ea30
ea38
ea40
ea48
ea50
ea58
ea60
ea68
ea70
ea78
ea80
ea88
ea90
ea98
eaa0
eaa8
eab0
eab8
eac0
eac8
ead0
ead8
eae0
eae8
eaf0
eaf8
eb00
eb08
eb10
eb18
eb20
eb28
eb30
eb38
eb40
eb48
eb50
eb58
eb60
eb68
eb70
eb78
eb80
eb88
eb90
eb98
eba0
eba8
ebb0
ebb8
ebc0
ebc8
ebd0
ebd8
ebe0
ebe8
ebf0
ebf8
ec00
ec08
ec10
ec18
ec20
ec28
ec30
ec38
ec40
ec48
ec50
ec58
ec60
ec68
ec70
ec78
ec80
ec88
ec90
ec98
eca0
eca8
ecb0
ecb8
ecc0
ecc8
ecd0
ecd8
ece0
ece8
ecf0
ecf8
ed00
ed08
ed10
ed18
ed20
ed28
ed30
ed38
ed40
ed48
ed50
ed58
ed60
ed68
ed70
ed78
ed80
ed88
ed90
ed98
eda0
eda8
edb0
edb8
edc0
edc8
edd0
edd8
ede0
ede8
edf0
edf8
ee00
ee08
ee10
ee18
ee20
ee28
ee30
ee38
ee40
ee48
ee50
ee58
ee60
ee68
ee70
ee78
ee80
ee88
ee90
ee98
eea0
eea8
eeb0
eeb8
eec0
eec8
eed0
eed8
eee0
eee8
eef0
eef8
ef00
ef08
ef10
ef18
ef20
ef28
ef30
ef38
ef40
ef48
ef50
ef58
ef60
ef68
ef70
ef78
ef80
ef88
ef90
ef98
efa0
efa8
efb0
efb8
efc0
efc8
efd0
efd8
efe0
efe8
eff0
eff8
f000
f008
f010
f018
f020
f028
f030
f038
f040
f048
f050
f058
f060
f068
f070
f078
f080
f088
f090
f098
f0a0
f0a8
f0b0
f0b8
f0c0
f0c8
f0d0
f0d8
f0e0
f0e8
f0f0
f0f8
f100
f108
f110
f118
f120
f128
f130
f138
f140
f148
f150
f158
f160
f168
f170
f178
f180
f188
f190
f198
f1a0
f1a8
f1b0
f1b8
f1c0
f1c8
f1d0
f1d8
f1e0
f1e8
f1f0
f1f8
f200
f208
f210
f218
f220
f228
f230
f238
f240
f248
f250
f258
f260
f268
f270
f278
f280
f288
f290
f298
f2a0
f2a8
f2b0
f2b8
f2c0
f2c8
f2d0
f2d8
f2e0
f2e8
f2f0
f2f8
f300
f308
f310
f318
f320
f328
f330
f338
f340
f348
f350
f358
f360
f368
f370
f378
f380
f388
f390
f398
f3a0
f3a8
f3b0
f3b8
f3c0
f3c8
f3d0
f3d8
f3e0
f3e8
f3f0
f3f8
f400
f408
f410
f418
f420
f428
f430
f438
f440
f448
f450
f458
f460
f468
f470
f478
f480
f488
f490
f498
f4a0
f4a8
f4b0
f4b8
f4c0
f4c8
f4d0
f4d8
f4e0
f4e8
f4f0
f4f8
f500
f508
f510
f518
f520
f528
f530
f538
f540
f548
f550
f558
f560
f568
f570
f578
f580
f588
f590
f598
f5a0
f5a8
f5b0
f5b8
f5c0
f5c8
f5d0
f5d8
f5e0
f5e8
f5f0
f5f8
f600
f608
f610
f618
f620
f628
f630
f638
f640
f648
f650
f658
f660
f668
f670
f678
f680
f688
f690
f698
f6a0
f6a8
f6b0
f6b8
f6c0
f6c8
f6d0
f6d8
f6e0
f6e8
f6f0
f6f8
f700
f708
f710
f718
f720
f728
f730
f738
f740
f748
f750
f758
f760
f768
f770
f778
f780
f788
f790
f798
f7a0
f7a8
f7b0
f7b8
f7c0
f7c8
f7d0
f7d8
f7e0
f7e8
f7f0
f7f8
f800
f808
f810
f818
f820
f828
f830
f838
f840
f848
f850
f858
f860
f868
f870
f878
f880
f888
f890
f898
f8a0
f8a8
f8b0
f8b8
f8c0
f8c8
f8d0
f8d8
f8e0
f8e8
f8f0
f8f8
f900
f908
f910
f918
f920
f928
f930
f938
f940
f948
f950
f958
f960
f968
f970
f978
f980
f988
f990
f998
f9a0
f9a8
f9b0
f9b8
f9c0
f9c8
f9d0
f9d8
f9e0
f9e8
f9f0
f9f8
fa00
fa08
fa10
fa18
fa20
fa28
fa30
fa38
fa40
fa48
fa50
fa58
fa60
fa68
fa70
fa78
fa80
fa88
fa90
fa98
faa0
faa8
fab0
fab8
fac0
fac8
fad0
fad8
fae0
fae8
faf0
faf8
fb00
fb08
fb10
fb18
fb20
fb28
fb30
fb38
fb40
fb48
fb50
fb58
fb60
fb68
fb70
fb78
fb80
fb88
fb90
fb98
fba0
fba8
fbb0
fbb8
fbc0
fbc8
fbd0
fbd8
fbe0
fbe8
fbf0
fbf8
fc00
fc08
fc10
fc18
fc20
fc28
fc30
fc38
fc40
fc48
fc50
fc58
fc60
fc68
fc70
fc78
fc80
fc88
fc90
fc98
fca0
fca8
fcb0
fcb8
fcc0
fcc8
fcd0
fcd8
fce0
fce8
fcf0
fcf8
fd00
fd08
fd10
fd18
fd20
fd28
fd30
fd38
fd40
fd48
fd50
fd58
fd60
fd68
fd70
fd78
fd80
fd88
fd90
fd98
fda0
fda8
fdb0
fdb8
fdc0
fdc8
fdd0
fdd8
fde0
fde8
fdf0
fdf8
fe00
fe08
fe10
fe18
fe20
fe28
fe30
fe38
fe40
fe48
fe50
fe58
fe60
fe68
fe70
fe78
fe80
fe88
fe90
fe98
fea0
fea8
feb0
feb8
fec0
fec8
fed0
fed8
fee0
fee8
fef0
fef8
ff00
ff08
ff10
ff18
ff20
ff28
ff30
ff38
ff40
ff48
ff50
ff58
ff60
ff68
ff70
ff78
ff80
ff88
ff90
ff98
ffa0
ffa8
ffb0
ffb8
ffc0
ffc8
ffd0
ffd8
ffe0
ffe8
fff0
fff8
/design/BufFifo/SUB_RAMZ_LUT.vhd
0,0 → 1,109
--------------------------------------------------------------------------------
-- --
-- V H D L F I L E --
-- COPYRIGHT (C) 2006 --
-- --
--------------------------------------------------------------------------------
-- --
-- Title : SUB_RAMZ --
-- Design : EV_JPEG_ENC --
-- Author : Michal Krepa -- -- --
-- --
--------------------------------------------------------------------------------
--
-- File : SUB_RAMZ.VHD
-- Created : 22/03/2009
--
--------------------------------------------------------------------------------
--
-- Description : RAM memory simulation model
--
--------------------------------------------------------------------------------
 
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use IEEE.NUMERIC_STD.all;
use IEEE.std_logic_textio.all;
 
library std;
use std.textio.all;
entity SUB_RAMZ_LUT is
generic
(
RAMADDR_W : INTEGER := 6;
RAMDATA_W : INTEGER := 12
);
port (
d : in STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
waddr : in STD_LOGIC_VECTOR(RAMADDR_W-1 downto 0);
raddr : in STD_LOGIC_VECTOR(RAMADDR_W-1 downto 0);
we : in STD_LOGIC;
clk : in STD_LOGIC;
q : out STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0)
);
end SUB_RAMZ_LUT;
 
architecture RTL of SUB_RAMZ_LUT is
type mem_type is array ((2**RAMADDR_W)-1 downto 0) of
STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
--type mem_type is array (( 1296*8)-1 downto 0) of --/*1296*8*/
-- STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
impure function InitRamFromFile (RamFileName : in string) return mem_type is
FILE RamFile : text is in RamFileName;
variable RamFileLine : line;
variable RAM : mem_type;
begin
for I in 0 to (2**RAMADDR_W)-1 loop
readline (RamFile, RamFileLine);
--Write (RamFileLine, I * 8);
hread(RamFileLine, RAM(I));
--write( (I * 8),RamFileLine );
--read (RamFileLine, RAM(I), LEFT, 10);
end loop;
return RAM;
end function;
signal mem : mem_type := InitRamFromFile("../design/BufFifo/counter_8.txt") ;
signal read_addr : STD_LOGIC_VECTOR(RAMADDR_W-1 downto 0);
--attribute ram_style: string;
--attribute ram_style of mem : signal is "distributed";
begin
-------------------------------------------------------------------------------
q_sg:
-------------------------------------------------------------------------------
q <= mem(TO_INTEGER(UNSIGNED(read_addr)));
-------------------------------------------------------------------------------
read_proc: -- register read address
-------------------------------------------------------------------------------
process (clk)
begin
if clk = '1' and clk'event then
read_addr <= raddr;
end if;
end process;
-------------------------------------------------------------------------------
write_proc: --write access
-------------------------------------------------------------------------------
process (clk) begin
if clk = '1' and clk'event then
if we = '1' then
mem(TO_INTEGER(UNSIGNED(waddr))) <= d;
end if;
end if;
end process;
end RTL;
/design/BufFifo/multiplier.vhd
0,0 → 1,80
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 12:18:01 03/12/2011
-- Design Name:
-- Module Name: multiplier - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
 
 
 
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
 
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
 
entity multiplier is
port (
CLK : in std_logic;
RST : in std_logic;
--
img_size_x : in std_logic_vector(15 downto 0);
img_size_y : in std_logic_vector(15 downto 0);
--
result : out std_logic_vector(31 downto 0);
threshold : out std_logic_vector(31 downto 0)
);
end multiplier;
 
architecture Behavioral of multiplier is
 
signal prev_x : std_logic_vector(15 downto 0);
signal prev_y : std_logic_vector(15 downto 0);
 
begin
process(CLK, RST)
begin
if (RST = '1') then
result <= x"00000000";
threshold <= x"00000000";
prev_x <= x"0000";
prev_y <= x"0000";
elsif (CLK'event and CLK = '1') then
if (prev_x /= img_size_x or prev_y /= img_size_y) then
result <= img_size_x * img_size_y;
threshold <= img_size_x * x"0007";
end if;
prev_x <= img_size_x;
prev_y <= img_size_y;
end if;
end process;
 
end Behavioral;
 
/design/mdct/DCT1D.vhd
1,334 → 1,386
--------------------------------------------------------------------------------
-- --
-- V H D L F I L E --
-- COPYRIGHT (C) 2006 --
-- --
--------------------------------------------------------------------------------
--
-- Title : DCT1D
-- Design : MDCT Core
-- Author : Michal Krepa
--
--------------------------------------------------------------------------------
--
-- File : DCT1D.VHD
-- Created : Sat Mar 5 7:37 2006
--
--------------------------------------------------------------------------------
--
-- Description : 1D Discrete Cosine Transform (1st stage)
--
--------------------------------------------------------------------------------
 
 
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.all;
 
library WORK;
use WORK.MDCT_PKG.all;
 
--------------------------------------------------------------------------------
-- ENTITY
--------------------------------------------------------------------------------
entity DCT1D is
port(
clk : in STD_LOGIC;
rst : in std_logic;
dcti : in std_logic_vector(IP_W-1 downto 0);
idv : in STD_LOGIC;
romedatao : in T_ROM1DATAO;
romodatao : in T_ROM1DATAO;
 
odv : out STD_LOGIC;
dcto : out std_logic_vector(OP_W-1 downto 0);
romeaddro : out T_ROM1ADDRO;
romoaddro : out T_ROM1ADDRO;
ramwaddro : out STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
ramdatai : out STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
ramwe : out STD_LOGIC;
wmemsel : out STD_LOGIC
);
end DCT1D;
 
--------------------------------------------------------------------------------
-- ARCHITECTURE
--------------------------------------------------------------------------------
architecture RTL of DCT1D is
type INPUT_DATA is array (N-1 downto 0) of SIGNED(IP_W downto 0);
signal databuf_reg : INPUT_DATA;
signal latchbuf_reg : INPUT_DATA;
signal col_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal row_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rowr_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal inpcnt_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal ramwe_s : STD_LOGIC;
signal wmemsel_reg : STD_LOGIC;
signal stage2_reg : STD_LOGIC;
signal stage2_cnt_reg : UNSIGNED(RAMADRR_W-1 downto 0);
signal col_2_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal ramwaddro_s : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal even_not_odd : std_logic;
signal even_not_odd_d1 : std_logic;
signal even_not_odd_d2 : std_logic;
signal even_not_odd_d3 : std_logic;
signal ramwe_d1 : STD_LOGIC;
signal ramwe_d2 : STD_LOGIC;
signal ramwe_d3 : STD_LOGIC;
signal ramwe_d4 : STD_LOGIC;
signal ramwaddro_d1 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d2 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d3 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d4 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal wmemsel_d1 : STD_LOGIC;
signal wmemsel_d2 : STD_LOGIC;
signal wmemsel_d3 : STD_LOGIC;
signal wmemsel_d4 : STD_LOGIC;
signal romedatao_d1 : T_ROM1DATAO;
signal romodatao_d1 : T_ROM1DATAO;
signal romedatao_d2 : T_ROM1DATAO;
signal romodatao_d2 : T_ROM1DATAO;
signal romedatao_d3 : T_ROM1DATAO;
signal romodatao_d3 : T_ROM1DATAO;
signal dcto_1 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal dcto_2 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal dcto_3 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal dcto_4 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
begin
 
ramwaddro <= ramwaddro_d4;
ramwe <= ramwe_d4;
ramdatai <= dcto_4(DA_W-1 downto 12);
wmemsel <= wmemsel_d4;
process(clk,rst)
begin
if rst = '1' then
inpcnt_reg <= (others => '0');
latchbuf_reg <= (others => (others => '0'));
databuf_reg <= (others => (others => '0'));
stage2_reg <= '0';
stage2_cnt_reg <= (others => '1');
ramwe_s <= '0';
ramwaddro_s <= (others => '0');
col_reg <= (others => '0');
row_reg <= (others => '0');
wmemsel_reg <= '0';
col_2_reg <= (others => '0');
elsif clk = '1' and clk'event then
stage2_reg <= '0';
ramwe_s <= '0';
--------------------------------
-- 1st stage
--------------------------------
if idv = '1' then
inpcnt_reg <= inpcnt_reg + 1;
 
-- right shift input data
latchbuf_reg(N-2 downto 0) <= latchbuf_reg(N-1 downto 1);
latchbuf_reg(N-1) <= SIGNED('0' & dcti) - LEVEL_SHIFT;
 
if inpcnt_reg = N-1 then
-- after this sum databuf_reg is in range of -256 to 254 (min to max)
databuf_reg(0) <= latchbuf_reg(1)+(SIGNED('0' & dcti) - LEVEL_SHIFT);
databuf_reg(1) <= latchbuf_reg(2)+latchbuf_reg(7);
databuf_reg(2) <= latchbuf_reg(3)+latchbuf_reg(6);
databuf_reg(3) <= latchbuf_reg(4)+latchbuf_reg(5);
databuf_reg(4) <= latchbuf_reg(1)-(SIGNED('0' & dcti) - LEVEL_SHIFT);
databuf_reg(5) <= latchbuf_reg(2)-latchbuf_reg(7);
databuf_reg(6) <= latchbuf_reg(3)-latchbuf_reg(6);
databuf_reg(7) <= latchbuf_reg(4)-latchbuf_reg(5);
stage2_reg <= '1';
end if;
end if;
--------------------------------
--------------------------------
-- 2nd stage
--------------------------------
if stage2_cnt_reg < N then
stage2_cnt_reg <= stage2_cnt_reg + 1;
-- write RAM
ramwe_s <= '1';
-- reverse col/row order for transposition purpose
ramwaddro_s <= STD_LOGIC_VECTOR(col_2_reg & row_reg);
-- increment column counter
col_reg <= col_reg + 1;
col_2_reg <= col_2_reg + 1;
-- finished processing one input row
if col_reg = 0 then
row_reg <= row_reg + 1;
-- switch to 2nd memory
if row_reg = N - 1 then
wmemsel_reg <= not wmemsel_reg;
col_reg <= (others => '0');
end if;
end if;
end if;
if stage2_reg = '1' then
stage2_cnt_reg <= (others => '0');
col_reg <= (0=>'1',others => '0');
col_2_reg <= (others => '0');
end if;
----------------------------------
end if;
end process;
-- output data pipeline
p_data_out_pipe : process(CLK, RST)
begin
if RST = '1' then
even_not_odd <= '0';
even_not_odd_d1 <= '0';
even_not_odd_d2 <= '0';
even_not_odd_d3 <= '0';
ramwe_d1 <= '0';
ramwe_d2 <= '0';
ramwe_d3 <= '0';
ramwe_d4 <= '0';
ramwaddro_d1 <= (others => '0');
ramwaddro_d2 <= (others => '0');
ramwaddro_d3 <= (others => '0');
ramwaddro_d4 <= (others => '0');
wmemsel_d1 <= '0';
wmemsel_d2 <= '0';
wmemsel_d3 <= '0';
wmemsel_d4 <= '0';
dcto_1 <= (others => '0');
dcto_2 <= (others => '0');
dcto_3 <= (others => '0');
dcto_4 <= (others => '0');
elsif CLK'event and CLK = '1' then
even_not_odd <= stage2_cnt_reg(0);
even_not_odd_d1 <= even_not_odd;
even_not_odd_d2 <= even_not_odd_d1;
even_not_odd_d3 <= even_not_odd_d2;
ramwe_d1 <= ramwe_s;
ramwe_d2 <= ramwe_d1;
ramwe_d3 <= ramwe_d2;
ramwe_d4 <= ramwe_d3;
ramwaddro_d1 <= ramwaddro_s;
ramwaddro_d2 <= ramwaddro_d1;
ramwaddro_d3 <= ramwaddro_d2;
ramwaddro_d4 <= ramwaddro_d3;
wmemsel_d1 <= wmemsel_reg;
wmemsel_d2 <= wmemsel_d1;
wmemsel_d3 <= wmemsel_d2;
wmemsel_d4 <= wmemsel_d3;
if even_not_odd = '0' then
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romedatao(0)),DA_W) +
(RESIZE(SIGNED(romedatao(1)),DA_W-1) & '0') +
(RESIZE(SIGNED(romedatao(2)),DA_W-2) & "00"),
DA_W));
else
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romodatao(0)),DA_W) +
(RESIZE(SIGNED(romodatao(1)),DA_W-1) & '0') +
(RESIZE(SIGNED(romodatao(2)),DA_W-2) & "00"),
DA_W));
end if;
if even_not_odd_d1 = '0' then
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romedatao_d1(3)),DA_W-3) & "000") +
(RESIZE(SIGNED(romedatao_d1(4)),DA_W-4) & "0000"),
DA_W));
else
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romodatao_d1(3)),DA_W-3) & "000") +
(RESIZE(SIGNED(romodatao_d1(4)),DA_W-4) & "0000"),
DA_W));
end if;
if even_not_odd_d2 = '0' then
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romedatao_d2(5)),DA_W-5) & "00000") +
(RESIZE(SIGNED(romedatao_d2(6)),DA_W-6) & "000000"),
DA_W));
else
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romodatao_d2(5)),DA_W-5) & "00000") +
(RESIZE(SIGNED(romodatao_d2(6)),DA_W-6) & "000000"),
DA_W));
end if;
if even_not_odd_d3 = '0' then
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romedatao_d3(7)),DA_W-7) & "0000000") -
(RESIZE(SIGNED(romedatao_d3(8)),DA_W-8) & "00000000"),
DA_W));
else
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romodatao_d3(7)),DA_W-7) & "0000000") -
(RESIZE(SIGNED(romodatao_d3(8)),DA_W-8) & "00000000"),
DA_W));
end if;
end if;
end process;
-- read precomputed MAC results from LUT
p_romaddr : process(CLK, RST)
begin
if RST = '1' then
romeaddro <= (others => (others => '0'));
romoaddro <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
for i in 0 to 8 loop
-- even
romeaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(0)(i) &
databuf_reg(1)(i) &
databuf_reg(2)(i) &
databuf_reg(3)(i);
-- odd
romoaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(4)(i) &
databuf_reg(5)(i) &
databuf_reg(6)(i) &
databuf_reg(7)(i);
end loop;
end if;
end process;
p_romdatao_d1 : process(CLK, RST)
begin
if RST = '1' then
romedatao_d1 <= (others => (others => '0'));
romodatao_d1 <= (others => (others => '0'));
romedatao_d2 <= (others => (others => '0'));
romodatao_d2 <= (others => (others => '0'));
romedatao_d3 <= (others => (others => '0'));
romodatao_d3 <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
romedatao_d1 <= romedatao;
romodatao_d1 <= romodatao;
romedatao_d2 <= romedatao_d1;
romodatao_d2 <= romodatao_d1;
romedatao_d3 <= romedatao_d2;
romodatao_d3 <= romodatao_d2;
end if;
end process;
end RTL;
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- --
-- V H D L F I L E --
-- COPYRIGHT (C) 2006 --
-- --
--------------------------------------------------------------------------------
--
-- Title : DCT1D
-- Design : MDCT Core
-- Author : Michal Krepa
--
--------------------------------------------------------------------------------
--
-- File : DCT1D.VHD
-- Created : Sat Mar 5 7:37 2006
--
--------------------------------------------------------------------------------
--
-- Description : 1D Discrete Cosine Transform (1st stage)
--
--------------------------------------------------------------------------------
 
 
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.all;
 
library WORK;
use WORK.MDCT_PKG.all;
 
--------------------------------------------------------------------------------
-- ENTITY
--------------------------------------------------------------------------------
entity DCT1D is
port(
clk : in STD_LOGIC;
rst : in std_logic;
dcti : in std_logic_vector(IP_W-1 downto 0);
idv : in STD_LOGIC;
romedatao : in T_ROM1DATAO;
romodatao : in T_ROM1DATAO;
 
odv : out STD_LOGIC;
dcto : out std_logic_vector(OP_W-1 downto 0);
romeaddro : out T_ROM1ADDRO;
romoaddro : out T_ROM1ADDRO;
ramwaddro : out STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
ramdatai : out STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
ramwe : out STD_LOGIC;
wmemsel : out STD_LOGIC
);
end DCT1D;
 
--------------------------------------------------------------------------------
-- ARCHITECTURE
--------------------------------------------------------------------------------
architecture RTL of DCT1D is
type INPUT_DATA is array (N-1 downto 0) of SIGNED(IP_W downto 0);
signal databuf_reg : INPUT_DATA;
signal latchbuf_reg : INPUT_DATA;
signal col_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal row_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rowr_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal inpcnt_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal ramwe_s : STD_LOGIC;
signal wmemsel_reg : STD_LOGIC;
signal stage2_reg : STD_LOGIC;
signal stage2_cnt_reg : UNSIGNED(RAMADRR_W-1 downto 0);
signal col_2_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal ramwaddro_s : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal even_not_odd : std_logic;
signal even_not_odd_d1 : std_logic;
signal even_not_odd_d2 : std_logic;
signal even_not_odd_d3 : std_logic;
signal ramwe_d1 : STD_LOGIC;
signal ramwe_d2 : STD_LOGIC;
signal ramwe_d3 : STD_LOGIC;
signal ramwe_d4 : STD_LOGIC;
signal ramwaddro_d1 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d2 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d3 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d4 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d5 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal ramwaddro_d6 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
signal wmemsel_d1 : STD_LOGIC;
signal wmemsel_d2 : STD_LOGIC;
signal wmemsel_d3 : STD_LOGIC;
signal wmemsel_d4 : STD_LOGIC;
signal wmemsel_d5 : STD_LOGIC;
signal wmemsel_d6 : STD_LOGIC;
signal romedatao_d1 : T_ROM1DATAO;
signal romodatao_d1 : T_ROM1DATAO;
signal romedatao_d2 : T_ROM1DATAO;
signal romodatao_d2 : T_ROM1DATAO;
signal romedatao_d3 : T_ROM1DATAO;
signal romodatao_d3 : T_ROM1DATAO;
signal dcto_1 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal dcto_2 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal dcto_3 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal dcto_4 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
signal fpr_out : STD_LOGIC_VECTOR(DA_W-12-1 downto 0);
 
component FinitePrecRndNrst is
generic
(
C_IN_SZ : natural := 37;
C_OUT_SZ : natural := 16;
C_FRAC_SZ : natural := 15
);
port (
CLK : in std_logic;
RST : in std_logic;
datain : in STD_LOGIC_VECTOR(C_IN_SZ-1 downto 0);
dataval : in std_logic;
dataout : out STD_LOGIC_VECTOR(C_OUT_SZ-1 downto 0);
clip_inc : out std_logic;
dval_out : out std_logic
);
end component;
begin
 
ramwaddro <= ramwaddro_d6;
--ramwe <= ramwe_d4;
--ramdatai <= dcto_4(DA_W-1 downto 12);
wmemsel <= wmemsel_d4;
odv <= ramwe_d4;
dcto <= STD_LOGIC_VECTOR(RESIZE(SIGNED(fpr_out),12));
ramdatai <= fpr_out;
U_FinitePrecRndNrst : FinitePrecRndNrst
generic map(
C_IN_SZ => DA_W,
C_OUT_SZ => DA_W-12,
C_FRAC_SZ => 12
)
port map(
CLK => clk,
RST => rst,
 
datain => dcto_4,
dataval => ramwe_d4,
dataout => fpr_out,
 
clip_inc => open,
dval_out => ramwe
);
process(clk,rst)
begin
if rst = '1' then
inpcnt_reg <= (others => '0');
latchbuf_reg <= (others => (others => '0'));
databuf_reg <= (others => (others => '0'));
stage2_reg <= '0';
stage2_cnt_reg <= (others => '1');
ramwe_s <= '0';
ramwaddro_s <= (others => '0');
col_reg <= (others => '0');
row_reg <= (others => '0');
wmemsel_reg <= '0';
col_2_reg <= (others => '0');
elsif clk = '1' and clk'event then
stage2_reg <= '0';
ramwe_s <= '0';
--------------------------------
-- 1st stage
--------------------------------
if idv = '1' then
inpcnt_reg <= inpcnt_reg + 1;
 
-- right shift input data
latchbuf_reg(N-2 downto 0) <= latchbuf_reg(N-1 downto 1);
latchbuf_reg(N-1) <= SIGNED('0' & dcti) - LEVEL_SHIFT;
 
if inpcnt_reg = N-1 then
-- after this sum databuf_reg is in range of -256 to 254 (min to max)
databuf_reg(0) <= latchbuf_reg(1)+(SIGNED('0' & dcti) - LEVEL_SHIFT);
databuf_reg(1) <= latchbuf_reg(2)+latchbuf_reg(7);
databuf_reg(2) <= latchbuf_reg(3)+latchbuf_reg(6);
databuf_reg(3) <= latchbuf_reg(4)+latchbuf_reg(5);
databuf_reg(4) <= latchbuf_reg(1)-(SIGNED('0' & dcti) - LEVEL_SHIFT);
databuf_reg(5) <= latchbuf_reg(2)-latchbuf_reg(7);
databuf_reg(6) <= latchbuf_reg(3)-latchbuf_reg(6);
databuf_reg(7) <= latchbuf_reg(4)-latchbuf_reg(5);
stage2_reg <= '1';
end if;
end if;
--------------------------------
--------------------------------
-- 2nd stage
--------------------------------
if stage2_cnt_reg < N then
stage2_cnt_reg <= stage2_cnt_reg + 1;
-- write RAM
ramwe_s <= '1';
-- reverse col/row order for transposition purpose
ramwaddro_s <= STD_LOGIC_VECTOR(col_2_reg & row_reg);
-- increment column counter
col_reg <= col_reg + 1;
col_2_reg <= col_2_reg + 1;
-- finished processing one input row
if col_reg = 0 then
row_reg <= row_reg + 1;
-- switch to 2nd memory
if row_reg = N - 1 then
wmemsel_reg <= not wmemsel_reg;
col_reg <= (others => '0');
end if;
end if;
end if;
if stage2_reg = '1' then
stage2_cnt_reg <= (others => '0');
col_reg <= (0=>'1',others => '0');
col_2_reg <= (others => '0');
end if;
----------------------------------
end if;
end process;
-- output data pipeline
p_data_out_pipe : process(CLK, RST)
begin
if RST = '1' then
even_not_odd <= '0';
even_not_odd_d1 <= '0';
even_not_odd_d2 <= '0';
even_not_odd_d3 <= '0';
ramwe_d1 <= '0';
ramwe_d2 <= '0';
ramwe_d3 <= '0';
ramwe_d4 <= '0';
ramwaddro_d1 <= (others => '0');
ramwaddro_d2 <= (others => '0');
ramwaddro_d3 <= (others => '0');
ramwaddro_d4 <= (others => '0');
wmemsel_d1 <= '0';
wmemsel_d2 <= '0';
wmemsel_d3 <= '0';
wmemsel_d4 <= '0';
dcto_1 <= (others => '0');
dcto_2 <= (others => '0');
dcto_3 <= (others => '0');
dcto_4 <= (others => '0');
elsif CLK'event and CLK = '1' then
even_not_odd <= stage2_cnt_reg(0);
even_not_odd_d1 <= even_not_odd;
even_not_odd_d2 <= even_not_odd_d1;
even_not_odd_d3 <= even_not_odd_d2;
ramwe_d1 <= ramwe_s;
ramwe_d2 <= ramwe_d1;
ramwe_d3 <= ramwe_d2;
ramwe_d4 <= ramwe_d3;
ramwaddro_d1 <= ramwaddro_s;
ramwaddro_d2 <= ramwaddro_d1;
ramwaddro_d3 <= ramwaddro_d2;
ramwaddro_d4 <= ramwaddro_d3;
ramwaddro_d5 <= ramwaddro_d4;
ramwaddro_d6 <= ramwaddro_d5;
wmemsel_d1 <= wmemsel_reg;
wmemsel_d2 <= wmemsel_d1;
wmemsel_d3 <= wmemsel_d2;
wmemsel_d4 <= wmemsel_d3;
wmemsel_d5 <= wmemsel_d4;
wmemsel_d6 <= wmemsel_d5;
if even_not_odd = '0' then
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romedatao(0)),DA_W) +
(RESIZE(SIGNED(romedatao(1)),DA_W-1) & '0') +
(RESIZE(SIGNED(romedatao(2)),DA_W-2) & "00"),
DA_W));
else
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romodatao(0)),DA_W) +
(RESIZE(SIGNED(romodatao(1)),DA_W-1) & '0') +
(RESIZE(SIGNED(romodatao(2)),DA_W-2) & "00"),
DA_W));
end if;
if even_not_odd_d1 = '0' then
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romedatao_d1(3)),DA_W-3) & "000") +
(RESIZE(SIGNED(romedatao_d1(4)),DA_W-4) & "0000"),
DA_W));
else
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romodatao_d1(3)),DA_W-3) & "000") +
(RESIZE(SIGNED(romodatao_d1(4)),DA_W-4) & "0000"),
DA_W));
end if;
if even_not_odd_d2 = '0' then
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romedatao_d2(5)),DA_W-5) & "00000") +
(RESIZE(SIGNED(romedatao_d2(6)),DA_W-6) & "000000"),
DA_W));
else
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romodatao_d2(5)),DA_W-5) & "00000") +
(RESIZE(SIGNED(romodatao_d2(6)),DA_W-6) & "000000"),
DA_W));
end if;
if even_not_odd_d3 = '0' then
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romedatao_d3(7)),DA_W-7) & "0000000") -
(RESIZE(SIGNED(romedatao_d3(8)),DA_W-8) & "00000000"),
DA_W));
else
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romodatao_d3(7)),DA_W-7) & "0000000") -
(RESIZE(SIGNED(romodatao_d3(8)),DA_W-8) & "00000000"),
DA_W));
end if;
end if;
end process;
-- read precomputed MAC results from LUT
p_romaddr : process(CLK, RST)
begin
if RST = '1' then
romeaddro <= (others => (others => '0'));
romoaddro <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
for i in 0 to 8 loop
-- even
romeaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(0)(i) &
databuf_reg(1)(i) &
databuf_reg(2)(i) &
databuf_reg(3)(i);
-- odd
romoaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(4)(i) &
databuf_reg(5)(i) &
databuf_reg(6)(i) &
databuf_reg(7)(i);
end loop;
end if;
end process;
p_romdatao_d1 : process(CLK, RST)
begin
if RST = '1' then
romedatao_d1 <= (others => (others => '0'));
romodatao_d1 <= (others => (others => '0'));
romedatao_d2 <= (others => (others => '0'));
romodatao_d2 <= (others => (others => '0'));
romedatao_d3 <= (others => (others => '0'));
romodatao_d3 <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
romedatao_d1 <= romedatao;
romodatao_d1 <= romodatao;
romedatao_d2 <= romedatao_d1;
romodatao_d2 <= romodatao_d1;
romedatao_d3 <= romedatao_d2;
romodatao_d3 <= romodatao_d2;
end if;
end process;
end RTL;
--------------------------------------------------------------------------------
/design/mdct/DCT2D.VHD
1,357 → 1,398
--------------------------------------------------------------------------------
-- --
-- V H D L F I L E --
-- COPYRIGHT (C) 2006 --
-- --
--------------------------------------------------------------------------------
--
-- Title : DCT2D
-- Design : MDCT Core
-- Author : Michal Krepa
--
--------------------------------------------------------------------------------
--
-- File : DCT2D.VHD
-- Created : Sat Mar 28 22:32 2006
--
--------------------------------------------------------------------------------
--
-- Description : 1D Discrete Cosine Transform (second stage)
--
--------------------------------------------------------------------------------
 
 
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use ieee.numeric_std.all;
 
library WORK;
use WORK.MDCT_PKG.all;
 
entity DCT2D is
port(
clk : in STD_LOGIC;
rst : in std_logic;
romedatao : in T_ROM2DATAO;
romodatao : in T_ROM2DATAO;
ramdatao : in STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
dataready : in STD_LOGIC;
odv : out STD_LOGIC;
dcto : out std_logic_vector(OP_W-1 downto 0);
romeaddro : out T_ROM2ADDRO;
romoaddro : out T_ROM2ADDRO;
ramraddro : out STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
rmemsel : out STD_LOGIC;
datareadyack : out STD_LOGIC
);
end DCT2D;
 
architecture RTL of DCT2D is
type input_data2 is array (N-1 downto 0) of SIGNED(RAMDATA_W downto 0);
signal databuf_reg : input_data2;
signal latchbuf_reg : input_data2;
signal col_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal row_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal colram_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rowram_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal colr_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rowr_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rmemsel_reg : STD_LOGIC;
signal stage1_reg : STD_LOGIC;
signal stage2_reg : STD_LOGIC;
signal stage2_cnt_reg : UNSIGNED(RAMADRR_W-1 downto 0);
signal dataready_2_reg : STD_LOGIC;
signal even_not_odd : std_logic;
signal even_not_odd_d1 : std_logic;
signal even_not_odd_d2 : std_logic;
signal even_not_odd_d3 : std_logic;
signal even_not_odd_d4 : std_logic;
signal odv_d0 : std_logic;
signal odv_d1 : std_logic;
signal odv_d2 : std_logic;
signal odv_d3 : std_logic;
signal odv_d4 : std_logic;
signal odv_d5 : std_logic;
signal dcto_1 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_2 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_3 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_4 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_5 : std_logic_vector(DA2_W-1 downto 0);
signal romedatao_d1 : T_ROM2DATAO;
signal romodatao_d1 : T_ROM2DATAO;
signal romedatao_d2 : T_ROM2DATAO;
signal romodatao_d2 : T_ROM2DATAO;
signal romedatao_d3 : T_ROM2DATAO;
signal romodatao_d3 : T_ROM2DATAO;
signal romedatao_d4 : T_ROM2DATAO;
signal romodatao_d4 : T_ROM2DATAO;
begin
 
ramraddro_sg:
ramraddro <= STD_LOGIC_VECTOR(rowr_reg & colr_reg);
rmemsel_sg:
rmemsel <= rmemsel_reg;
process(clk,rst)
begin
if rst = '1' then
stage2_cnt_reg <= (others => '1');
rmemsel_reg <= '0';
stage1_reg <= '0';
stage2_reg <= '0';
colram_reg <= (others => '0');
rowram_reg <= (others => '0');
col_reg <= (others => '0');
row_reg <= (others => '0');
latchbuf_reg <= (others => (others => '0'));
databuf_reg <= (others => (others => '0'));
odv_d0 <= '0';
colr_reg <= (others => '0');
rowr_reg <= (others => '0');
dataready_2_reg <= '0';
elsif clk='1' and clk'event then
stage2_reg <= '0';
odv_d0 <= '0';
datareadyack <= '0';
dataready_2_reg <= dataready;
----------------------------------
-- read DCT 1D to barrel shifer
----------------------------------
if stage1_reg = '1' then
 
-- right shift input data
latchbuf_reg(N-2 downto 0) <= latchbuf_reg(N-1 downto 1);
latchbuf_reg(N-1) <= RESIZE(SIGNED(ramdatao),RAMDATA_W+1);
colram_reg <= colram_reg + 1;
colr_reg <= colr_reg + 1;
if colram_reg = N-2 then
rowr_reg <= rowr_reg + 1;
end if;
if colram_reg = N-1 then
rowram_reg <= rowram_reg + 1;
if rowram_reg = N-1 then
stage1_reg <= '0';
colr_reg <= (others => '0');
-- release memory
rmemsel_reg <= not rmemsel_reg;
end if;
-- after this sum databuf_reg is in range of -256 to 254 (min to max)
databuf_reg(0) <= latchbuf_reg(1)+RESIZE(SIGNED(ramdatao),RAMDATA_W+1);
databuf_reg(1) <= latchbuf_reg(2)+latchbuf_reg(7);
databuf_reg(2) <= latchbuf_reg(3)+latchbuf_reg(6);
databuf_reg(3) <= latchbuf_reg(4)+latchbuf_reg(5);
databuf_reg(4) <= latchbuf_reg(1)-RESIZE(SIGNED(ramdatao),RAMDATA_W+1);
databuf_reg(5) <= latchbuf_reg(2)-latchbuf_reg(7);
databuf_reg(6) <= latchbuf_reg(3)-latchbuf_reg(6);
databuf_reg(7) <= latchbuf_reg(4)-latchbuf_reg(5);
-- 8 point input latched
stage2_reg <= '1';
end if;
end if;
--------------------------------
-- 2nd stage
--------------------------------
if stage2_cnt_reg < N then
stage2_cnt_reg <= stage2_cnt_reg + 1;
-- output data valid
odv_d0 <= '1';
-- increment column counter
col_reg <= col_reg + 1;
-- finished processing one input row
if col_reg = N - 1 then
row_reg <= row_reg + 1;
end if;
end if;
if stage2_reg = '1' then
stage2_cnt_reg <= (others => '0');
col_reg <= (0=>'1',others => '0');
end if;
--------------------------------
----------------------------------
-- wait for new data
----------------------------------
-- one of ram buffers has new data, process it
if dataready = '1' and dataready_2_reg = '0' then
stage1_reg <= '1';
-- to account for 1T RAM delay, increment RAM address counter
colram_reg <= (others => '0');
colr_reg <= (0=>'1',others => '0');
datareadyack <= '1';
end if;
----------------------------------
end if;
end process;
p_data_pipe : process(CLK, RST)
begin
if RST = '1' then
even_not_odd <= '0';
even_not_odd_d1 <= '0';
even_not_odd_d2 <= '0';
even_not_odd_d3 <= '0';
even_not_odd_d4 <= '0';
odv_d1 <= '0';
odv_d2 <= '0';
odv_d3 <= '0';
odv_d4 <= '0';
odv_d5 <= '0';
dcto_1 <= (others => '0');
dcto_2 <= (others => '0');
dcto_3 <= (others => '0');
dcto_4 <= (others => '0');
dcto_5 <= (others => '0');
elsif CLK'event and CLK = '1' then
even_not_odd <= stage2_cnt_reg(0);
even_not_odd_d1 <= even_not_odd;
even_not_odd_d2 <= even_not_odd_d1;
even_not_odd_d3 <= even_not_odd_d2;
even_not_odd_d4 <= even_not_odd_d3;
odv_d1 <= odv_d0;
odv_d2 <= odv_d1;
odv_d3 <= odv_d2;
odv_d4 <= odv_d3;
odv_d5 <= odv_d4;
if even_not_odd = '0' then
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romedatao(0)),DA2_W) +
(RESIZE(SIGNED(romedatao(1)),DA2_W-1) & '0') +
(RESIZE(SIGNED(romedatao(2)),DA2_W-2) & "00"),
DA2_W));
else
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romodatao(0)),DA2_W) +
(RESIZE(SIGNED(romodatao(1)),DA2_W-1) & '0') +
(RESIZE(SIGNED(romodatao(2)),DA2_W-2) & "00"),
DA2_W));
end if;
if even_not_odd_d1 = '0' then
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romedatao_d1(3)),DA2_W-3) & "000") +
(RESIZE(SIGNED(romedatao_d1(4)),DA2_W-4) & "0000"),
DA2_W));
else
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romodatao_d1(3)),DA2_W-3) & "000") +
(RESIZE(SIGNED(romodatao_d1(4)),DA2_W-4) & "0000"),
DA2_W));
end if;
if even_not_odd_d2 = '0' then
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romedatao_d2(5)),DA2_W-5) & "00000") +
(RESIZE(SIGNED(romedatao_d2(6)),DA2_W-6) & "000000"),
DA2_W));
else
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romodatao_d2(5)),DA2_W-5) & "00000") +
(RESIZE(SIGNED(romodatao_d2(6)),DA2_W-6) & "000000"),
DA2_W));
end if;
if even_not_odd_d3 = '0' then
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romedatao_d3(7)),DA2_W-7) & "0000000") +
(RESIZE(SIGNED(romedatao_d3(8)),DA2_W-8) & "00000000"),
DA2_W));
else
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romodatao_d3(7)),DA2_W-7) & "0000000") +
(RESIZE(SIGNED(romodatao_d3(8)),DA2_W-8) & "00000000"),
DA2_W));
end if;
if even_not_odd_d4 = '0' then
dcto_5 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_4) +
(RESIZE(SIGNED(romedatao_d4(9)),DA2_W-9) & "000000000") -
(RESIZE(SIGNED(romedatao_d4(10)),DA2_W-10) & "0000000000"),
DA2_W));
else
dcto_5 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_4) +
(RESIZE(SIGNED(romodatao_d4(9)),DA2_W-9) & "000000000") -
(RESIZE(SIGNED(romodatao_d4(10)),DA2_W-10) & "0000000000"),
DA2_W));
end if;
end if;
end process;
dcto <= dcto_5(DA2_W-1 downto 12);
odv <= odv_d5;
p_romaddr : process(CLK, RST)
begin
if RST = '1' then
romeaddro <= (others => (others => '0'));
romoaddro <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
for i in 0 to 10 loop
-- read precomputed MAC results from LUT
romeaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(0)(i) &
databuf_reg(1)(i) &
databuf_reg(2)(i) &
databuf_reg(3)(i);
-- odd
romoaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(4)(i) &
databuf_reg(5)(i) &
databuf_reg(6)(i) &
databuf_reg(7)(i);
end loop;
end if;
end process;
 
p_romdatao_dly : process(CLK, RST)
begin
if RST = '1' then
romedatao_d1 <= (others => (others => '0'));
romodatao_d1 <= (others => (others => '0'));
romedatao_d2 <= (others => (others => '0'));
romodatao_d2 <= (others => (others => '0'));
romedatao_d3 <= (others => (others => '0'));
romodatao_d3 <= (others => (others => '0'));
romedatao_d4 <= (others => (others => '0'));
romodatao_d4 <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
romedatao_d1 <= romedatao;
romodatao_d1 <= romodatao;
romedatao_d2 <= romedatao_d1;
romodatao_d2 <= romodatao_d1;
romedatao_d3 <= romedatao_d2;
romodatao_d3 <= romodatao_d2;
romedatao_d4 <= romedatao_d3;
romodatao_d4 <= romodatao_d3;
end if;
end process;
end RTL;
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
-- --
-- V H D L F I L E --
-- COPYRIGHT (C) 2006 --
-- --
--------------------------------------------------------------------------------
--
-- Title : DCT2D
-- Design : MDCT Core
-- Author : Michal Krepa
--
--------------------------------------------------------------------------------
--
-- File : DCT2D.VHD
-- Created : Sat Mar 28 22:32 2006
--
--------------------------------------------------------------------------------
--
-- Description : 1D Discrete Cosine Transform (second stage)
--
--------------------------------------------------------------------------------
 
 
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use ieee.numeric_std.all;
 
library WORK;
use WORK.MDCT_PKG.all;
 
entity DCT2D is
port(
clk : in STD_LOGIC;
rst : in std_logic;
romedatao : in T_ROM2DATAO;
romodatao : in T_ROM2DATAO;
ramdatao : in STD_LOGIC_VECTOR(RAMDATA_W-1 downto 0);
dataready : in STD_LOGIC;
odv : out STD_LOGIC;
dcto : out std_logic_vector(OP_W-1 downto 0);
romeaddro : out T_ROM2ADDRO;
romoaddro : out T_ROM2ADDRO;
ramraddro : out STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
rmemsel : out STD_LOGIC;
datareadyack : out STD_LOGIC
);
end DCT2D;
 
architecture RTL of DCT2D is
type input_data2 is array (N-1 downto 0) of SIGNED(RAMDATA_W downto 0);
signal databuf_reg : input_data2;
signal latchbuf_reg : input_data2;
signal col_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal row_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal colram_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rowram_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal colr_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rowr_reg : UNSIGNED(RAMADRR_W/2-1 downto 0);
signal rmemsel_reg : STD_LOGIC;
signal stage1_reg : STD_LOGIC;
signal stage2_reg : STD_LOGIC;
signal stage2_cnt_reg : UNSIGNED(RAMADRR_W-1 downto 0);
signal dataready_2_reg : STD_LOGIC;
signal even_not_odd : std_logic;
signal even_not_odd_d1 : std_logic;
signal even_not_odd_d2 : std_logic;
signal even_not_odd_d3 : std_logic;
signal even_not_odd_d4 : std_logic;
signal odv_d0 : std_logic;
signal odv_d1 : std_logic;
signal odv_d2 : std_logic;
signal odv_d3 : std_logic;
signal odv_d4 : std_logic;
signal odv_d5 : std_logic;
signal dcto_1 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_2 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_3 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_4 : std_logic_vector(DA2_W-1 downto 0);
signal dcto_5 : std_logic_vector(DA2_W-1 downto 0);
signal romedatao_d1 : T_ROM2DATAO;
signal romodatao_d1 : T_ROM2DATAO;
signal romedatao_d2 : T_ROM2DATAO;
signal romodatao_d2 : T_ROM2DATAO;
signal romedatao_d3 : T_ROM2DATAO;
signal romodatao_d3 : T_ROM2DATAO;
signal romedatao_d4 : T_ROM2DATAO;
signal romodatao_d4 : T_ROM2DATAO;
signal odv_s : std_logic;
signal dcto_s : std_logic_vector(OP_W-1 downto 0);
 
component FinitePrecRndNrst is
generic
(
C_IN_SZ : natural := 37;
C_OUT_SZ : natural := 16;
C_FRAC_SZ : natural := 15
);
port (
CLK : in std_logic;
RST : in std_logic;
datain : in STD_LOGIC_VECTOR(C_IN_SZ-1 downto 0);
dataval : in std_logic;
dataout : out STD_LOGIC_VECTOR(C_OUT_SZ-1 downto 0);
clip_inc : out std_logic;
dval_out : out std_logic
);
end component;
 
begin
 
ramraddro_sg:
ramraddro <= STD_LOGIC_VECTOR(rowr_reg & colr_reg);
rmemsel_sg:
rmemsel <= rmemsel_reg;
process(clk,rst)
begin
if rst = '1' then
stage2_cnt_reg <= (others => '1');
rmemsel_reg <= '0';
stage1_reg <= '0';
stage2_reg <= '0';
colram_reg <= (others => '0');
rowram_reg <= (others => '0');
col_reg <= (others => '0');
row_reg <= (others => '0');
latchbuf_reg <= (others => (others => '0'));
databuf_reg <= (others => (others => '0'));
odv_d0 <= '0';
colr_reg <= (others => '0');
rowr_reg <= (others => '0');
dataready_2_reg <= '0';
elsif clk='1' and clk'event then
stage2_reg <= '0';
odv_d0 <= '0';
datareadyack <= '0';
dataready_2_reg <= dataready;
----------------------------------
-- read DCT 1D to barrel shifer
----------------------------------
if stage1_reg = '1' then
 
-- right shift input data
latchbuf_reg(N-2 downto 0) <= latchbuf_reg(N-1 downto 1);
latchbuf_reg(N-1) <= RESIZE(SIGNED(ramdatao),RAMDATA_W+1);
colram_reg <= colram_reg + 1;
colr_reg <= colr_reg + 1;
if colram_reg = N-2 then
rowr_reg <= rowr_reg + 1;
end if;
if colram_reg = N-1 then
rowram_reg <= rowram_reg + 1;
if rowram_reg = N-1 then
stage1_reg <= '0';
colr_reg <= (others => '0');
-- release memory
rmemsel_reg <= not rmemsel_reg;
end if;
-- after this sum databuf_reg is in range of -256 to 254 (min to max)
databuf_reg(0) <= latchbuf_reg(1)+RESIZE(SIGNED(ramdatao),RAMDATA_W+1);
databuf_reg(1) <= latchbuf_reg(2)+latchbuf_reg(7);
databuf_reg(2) <= latchbuf_reg(3)+latchbuf_reg(6);
databuf_reg(3) <= latchbuf_reg(4)+latchbuf_reg(5);
databuf_reg(4) <= latchbuf_reg(1)-RESIZE(SIGNED(ramdatao),RAMDATA_W+1);
databuf_reg(5) <= latchbuf_reg(2)-latchbuf_reg(7);
databuf_reg(6) <= latchbuf_reg(3)-latchbuf_reg(6);
databuf_reg(7) <= latchbuf_reg(4)-latchbuf_reg(5);
-- 8 point input latched
stage2_reg <= '1';
end if;
end if;
--------------------------------
-- 2nd stage
--------------------------------
if stage2_cnt_reg < N then
stage2_cnt_reg <= stage2_cnt_reg + 1;
-- output data valid
odv_d0 <= '1';
-- increment column counter
col_reg <= col_reg + 1;
-- finished processing one input row
if col_reg = N - 1 then
row_reg <= row_reg + 1;
end if;
end if;
if stage2_reg = '1' then
stage2_cnt_reg <= (others => '0');
col_reg <= (0=>'1',others => '0');
end if;
--------------------------------
----------------------------------
-- wait for new data
----------------------------------
-- one of ram buffers has new data, process it
if dataready = '1' and dataready_2_reg = '0' then
stage1_reg <= '1';
-- to account for 1T RAM delay, increment RAM address counter
colram_reg <= (others => '0');
colr_reg <= (0=>'1',others => '0');
datareadyack <= '1';
end if;
----------------------------------
end if;
end process;
p_data_pipe : process(CLK, RST)
begin
if RST = '1' then
even_not_odd <= '0';
even_not_odd_d1 <= '0';
even_not_odd_d2 <= '0';
even_not_odd_d3 <= '0';
even_not_odd_d4 <= '0';
odv_d1 <= '0';
odv_d2 <= '0';
odv_d3 <= '0';
odv_d4 <= '0';
odv_d5 <= '0';
dcto_1 <= (others => '0');
dcto_2 <= (others => '0');
dcto_3 <= (others => '0');
dcto_4 <= (others => '0');
dcto_5 <= (others => '0');
elsif CLK'event and CLK = '1' then
even_not_odd <= stage2_cnt_reg(0);
even_not_odd_d1 <= even_not_odd;
even_not_odd_d2 <= even_not_odd_d1;
even_not_odd_d3 <= even_not_odd_d2;
even_not_odd_d4 <= even_not_odd_d3;
odv_d1 <= odv_d0;
odv_d2 <= odv_d1;
odv_d3 <= odv_d2;
odv_d4 <= odv_d3;
odv_d5 <= odv_d4;
if even_not_odd = '0' then
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romedatao(0)),DA2_W) +
(RESIZE(SIGNED(romedatao(1)),DA2_W-1) & '0') +
(RESIZE(SIGNED(romedatao(2)),DA2_W-2) & "00"),
DA2_W));
else
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
(RESIZE(SIGNED(romodatao(0)),DA2_W) +
(RESIZE(SIGNED(romodatao(1)),DA2_W-1) & '0') +
(RESIZE(SIGNED(romodatao(2)),DA2_W-2) & "00"),
DA2_W));
end if;
if even_not_odd_d1 = '0' then
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romedatao_d1(3)),DA2_W-3) & "000") +
(RESIZE(SIGNED(romedatao_d1(4)),DA2_W-4) & "0000"),
DA2_W));
else
dcto_2 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_1) +
(RESIZE(SIGNED(romodatao_d1(3)),DA2_W-3) & "000") +
(RESIZE(SIGNED(romodatao_d1(4)),DA2_W-4) & "0000"),
DA2_W));
end if;
if even_not_odd_d2 = '0' then
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romedatao_d2(5)),DA2_W-5) & "00000") +
(RESIZE(SIGNED(romedatao_d2(6)),DA2_W-6) & "000000"),
DA2_W));
else
dcto_3 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_2) +
(RESIZE(SIGNED(romodatao_d2(5)),DA2_W-5) & "00000") +
(RESIZE(SIGNED(romodatao_d2(6)),DA2_W-6) & "000000"),
DA2_W));
end if;
if even_not_odd_d3 = '0' then
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romedatao_d3(7)),DA2_W-7) & "0000000") +
(RESIZE(SIGNED(romedatao_d3(8)),DA2_W-8) & "00000000"),
DA2_W));
else
dcto_4 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_3) +
(RESIZE(SIGNED(romodatao_d3(7)),DA2_W-7) & "0000000") +
(RESIZE(SIGNED(romodatao_d3(8)),DA2_W-8) & "00000000"),
DA2_W));
end if;
if even_not_odd_d4 = '0' then
dcto_5 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_4) +
(RESIZE(SIGNED(romedatao_d4(9)),DA2_W-9) & "000000000") -
(RESIZE(SIGNED(romedatao_d4(10)),DA2_W-10) & "0000000000"),
DA2_W));
else
dcto_5 <= STD_LOGIC_VECTOR(RESIZE
(signed(dcto_4) +
(RESIZE(SIGNED(romodatao_d4(9)),DA2_W-9) & "000000000") -
(RESIZE(SIGNED(romodatao_d4(10)),DA2_W-10) & "0000000000"),
DA2_W));
end if;
end if;
end process;
dcto <= dcto_s;
odv <= odv_s;
U_FinitePrecRndNrst : FinitePrecRndNrst
generic map(
C_IN_SZ => DA2_W,
C_OUT_SZ => DA2_W-12,
C_FRAC_SZ => 12
)
port map(
CLK => clk,
RST => rst,
 
datain => dcto_5,
dataval => odv_d5,
dataout => dcto_s,
 
clip_inc => open,
dval_out => odv_s
);
p_romaddr : process(CLK, RST)
begin
if RST = '1' then
romeaddro <= (others => (others => '0'));
romoaddro <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
for i in 0 to 10 loop
-- read precomputed MAC results from LUT
romeaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(0)(i) &
databuf_reg(1)(i) &
databuf_reg(2)(i) &
databuf_reg(3)(i);
-- odd
romoaddro(i) <= STD_LOGIC_VECTOR(col_reg(RAMADRR_W/2-1 downto 1)) &
databuf_reg(4)(i) &
databuf_reg(5)(i) &
databuf_reg(6)(i) &
databuf_reg(7)(i);
end loop;
end if;
end process;
 
p_romdatao_dly : process(CLK, RST)
begin
if RST = '1' then
romedatao_d1 <= (others => (others => '0'));
romodatao_d1 <= (others => (others => '0'));
romedatao_d2 <= (others => (others => '0'));
romodatao_d2 <= (others => (others => '0'));
romedatao_d3 <= (others => (others => '0'));
romodatao_d3 <= (others => (others => '0'));
romedatao_d4 <= (others => (others => '0'));
romodatao_d4 <= (others => (others => '0'));
elsif CLK'event and CLK = '1' then
romedatao_d1 <= romedatao;
romodatao_d1 <= romodatao;
romedatao_d2 <= romedatao_d1;
romodatao_d2 <= romodatao_d1;
romedatao_d3 <= romedatao_d2;
romodatao_d3 <= romodatao_d2;
romedatao_d4 <= romedatao_d3;
romodatao_d4 <= romodatao_d3;
end if;
end process;
end RTL;
--------------------------------------------------------------------------------
 
/design/mdct/FinitePrecRndNrst.v
0,0 → 1,111
//-----------------------------------------------------------------------------
// Title : Finite Precision Symmetric Reduction module
 
// Introduces 2 clock cycles of latency
 
`timescale 1 ns / 100 ps
 
module FinitePrecRndNrst
#(
parameter C_IN_SZ=37,
C_OUT_SZ=16,
C_FRAC_SZ=15
)
( input wire CLK,
input wire RST,
input wire signed [C_IN_SZ-1:0] datain,
input wire dataval,
output wire signed [C_OUT_SZ-1:0] dataout,
output reg clip_inc,
output reg dval_out
);
wire sign;
wire signed [C_IN_SZ-1:0] rc_val;
reg signed [C_IN_SZ-1:0] data_round_f;
wire signed [C_IN_SZ-C_FRAC_SZ-1:0] data_round;
reg signed [C_OUT_SZ-1:0] data_rs;
reg dataval_d1;
reg sign_d1;
assign sign = datain[C_IN_SZ-1];
assign rc_val = { {(C_IN_SZ-C_FRAC_SZ){1'b0}}, 1'b1, {(C_FRAC_SZ-1){1'b0}} };
 
always @(posedge CLK or posedge RST)
if(RST)
begin
data_round_f <= 'b0;
dataval_d1 <= 1'b0;
sign_d1 <= 1'b0;
dval_out <= 1'b0;
end
else
begin
data_round_f <= datain + rc_val;
dataval_d1 <= dataval;
dval_out <= dataval_d1;
sign_d1 <= sign;
end
assign data_round = data_round_f[C_IN_SZ-1:C_FRAC_SZ];
// saturation / clipping
always @(posedge CLK or posedge RST)
if(RST)
begin
data_rs <= 'b0;
clip_inc <= 1'b0;
end
else
begin
clip_inc <= 1'b0;
// clipping condition
if(
(
(C_IN_SZ-C_FRAC_SZ != C_OUT_SZ) &&
(~(&data_round[C_IN_SZ-C_FRAC_SZ-1 : C_OUT_SZ-1])) ==
(|(data_round[C_IN_SZ-C_FRAC_SZ-1 : C_OUT_SZ-1]))
)
|| // special case
(
(C_IN_SZ-C_FRAC_SZ == C_OUT_SZ) &&
(data_round[C_IN_SZ-C_FRAC_SZ-1] != sign_d1) &&
data_round != {C_OUT_SZ{1'b0}}
)
)
begin
// clipping counter
if(dataval_d1)
clip_inc <= 1'b1;
if(sign_d1)
// do saturation
data_rs <= -(2**(C_OUT_SZ)/2)+1;
else
// do saturation
data_rs <= (2**(C_OUT_SZ)/2)-1;
end
else
data_rs <= data_round[C_OUT_SZ-1:0];
end
assign dataout = data_rs;
//always @(posedge CLK or posedge RST)
// if(RST)
// begin
// dataout <= 0;
// end
// else
// begin
// dataout <= data_rs;
// end
 
 
endmodule
 
/design/common/JPEG_PKG.vhd
32,12 → 32,12
-- warning! this parameter heavily affects memory size required
-- if expected image width is known change this parameter to match this
-- otherwise some onchip RAM will be wasted and never used
constant C_MAX_LINE_WIDTH : integer := 2048;
constant C_MAX_LINE_WIDTH : integer := 640;
-- memory/performance tradeoff
-- 8 extra lines highest performance
-- 0 extra lines lowest area
constant C_EXTRA_LINES : integer := 8; -- from 0 to 8
--constant C_EXTRA_LINES : integer := 0; -- from 0 to 8
 
-- 24 bit format RGB/YCbCr 888 bits

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.