repo_name
stringlengths
6
79
path
stringlengths
5
236
copies
stringclasses
54 values
size
stringlengths
1
8
content
stringlengths
0
1.04M
license
stringclasses
15 values
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_ModFile_simple/Libraries/Benchy/spi_transmitter.vhd
13
4301
---------------------------------------------------------------------------------- -- spi_transmitter.vhd -- -- Copyright (C) 2006 Michael Poppitz -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- -- This program is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA -- ---------------------------------------------------------------------------------- -- -- Details: http://www.sump.org/projects/analyzer/ -- -- Takes 32bit (one sample) and sends it out on the SPI port. -- End of transmission is signalled by taking back the busy flag. -- ---------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity spi_transmitter is port( data : in std_logic_vector (31 downto 0); tx_bytes : in integer range 0 to 4; send : in std_logic; clock : in std_logic; sclk : in std_logic; tx : out std_logic := '0'; cs : in std_logic; busy: out std_logic := '0'; reset : in std_logic; dataReady : out std_logic := '0' ); end spi_transmitter; architecture behavioral of spi_transmitter is type states is (IDLE, START, WAIT_CS_LO, SEND_BITS, WAIT_CS_HI); signal tx_buf : std_logic_vector (39 downto 0) := (others => '0'); signal bits : integer range 0 to 7; signal bytes, end_byte : integer range 0 to 4; signal rsync_sclk, rsync_cs : std_logic_vector(1 downto 0) := (others => '0'); signal state: states; signal send_i: std_logic := '1'; signal timeout : std_logic_vector(31 downto 0) := (others => '0'); begin process(clock) begin if rising_edge(clock) then rsync_sclk <= rsync_sclk(0) & sclk; rsync_cs <= rsync_cs(0) & cs; case state is when IDLE => if send = '1' then state <= START; busy <= '1'; dataReady <= '1'; end if; tx_buf <= x"aa" & data(7 downto 0) & data(15 downto 8) & data(23 downto 16) & data(31 downto 24); end_byte <= tx_bytes; bytes <= 0; bits <= 0; when START => -- tx starts at cs falling edge --if rsync_cs = "10" then -- timeout <= timeout +1; -- if timeout = x"ffffffffff" then -- timeout <= (others => '0'); -- state <= WAIT_CS_HI; -- elsif rsync_cs = "10" or cs = '0' then if reset = '1' then state <= IDLE; elsif rsync_cs = "10" or cs = '0' then state <= WAIT_CS_LO; tx <= tx_buf(39); -- timeout <= (others => '0'); end if; when WAIT_CS_LO => -- wait for cs before sending the next byte if cs = '0' and rsync_sclk = "01" then state <= SEND_BITS; tx_buf <= tx_buf(38 downto 0) & '0'; bytes <= bytes + 1; elsif bytes = end_byte+1 then state <= WAIT_CS_HI; dataReady <= '0'; end if; tx <= tx_buf(39); when SEND_BITS => -- If we are waiting more then 200ns then something is off. We have a 100Mhz clock so 0x14 is 200ns. -- timeout <= timeout +1; -- if timeout = x"0b" then -- timeout <= (others => '0'); -- state <= START; -- bits <= 0; -- bytes <= bytes - 1; -- -- transfer bits at rising edge of sclk -- elsif rsync_sclk = "01" then if reset = '1' then state <= IDLE; elsif rsync_sclk = "01" then tx_buf <= tx_buf(38 downto 0) & '0'; bits <= bits + 1; -- timeout <= (others => '0'); elsif bits = 7 then state <= WAIT_CS_LO; bits <= 0; -- timeout <= (others => '0'); end if; tx <= tx_buf(39); when WAIT_CS_HI => -- tx stops until cs rising edge -- if rsync_cs = "01" or cs = '0' then state <= IDLE; busy <= '0'; -- end if; end case; end if; end process; end behavioral;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer_JTAG/Libraries/Wishbone_Peripherals/clk_32to100_dcm.vhd
13
6307
-- file: clk_32to100_dcm.vhd -- -- (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- ------------------------------------------------------------------------------ -- User entered comments ------------------------------------------------------------------------------ -- None -- ------------------------------------------------------------------------------ -- "Output Output Phase Duty Pk-to-Pk Phase" -- "Clock Freq (MHz) (degrees) Cycle (%) Jitter (ps) Error (ps)" ------------------------------------------------------------------------------ -- CLK_OUT1____50.000______0.000______50.0______600.000____150.000 -- ------------------------------------------------------------------------------ -- "Input Clock Freq (MHz) Input Jitter (UI)" ------------------------------------------------------------------------------ -- __primary__________32.000____________0.010 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use ieee.numeric_std.all; library unisim; use unisim.vcomponents.all; entity clk_32to100_dcm is port (-- Clock in ports CLK_IN1 : in std_logic; -- Clock out ports CLK_OUT1 : out std_logic ); end clk_32to100_dcm; architecture xilinx of clk_32to100_dcm is attribute CORE_GENERATION_INFO : string; attribute CORE_GENERATION_INFO of xilinx : architecture is "clk_32to100_dcm,clk_wiz_v3_6,{component_name=clk_32to100_dcm,use_phase_alignment=false,use_min_o_jitter=false,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,feedback_source=FDBK_AUTO,primtype_sel=DCM_SP,num_out_clk=1,clkin1_period=31.25,clkin2_period=31.25,use_power_down=false,use_reset=false,use_locked=false,use_inclk_stopped=false,use_status=false,use_freeze=false,use_clk_valid=false,feedback_type=SINGLE,clock_mgr_type=AUTO,manual_override=false}"; -- Input clock buffering / unused connectors signal clkin1 : std_logic; -- Output clock buffering signal clkfb : std_logic; signal clk0 : std_logic; signal clkfx : std_logic; signal clkfbout : std_logic; signal locked_internal : std_logic; signal status_internal : std_logic_vector(7 downto 0); begin -- Input buffering -------------------------------------- --clkin1 <= CLK_IN1; clkin2_inst: BUFG port map ( I => CLK_IN1, O => clkin1 ); -- Clocking primitive -------------------------------------- -- Instantiation of the DCM primitive -- * Unused inputs are tied off -- * Unused outputs are labeled unused dcm_sp_inst: DCM_SP generic map (CLKDV_DIVIDE => 2.000, CLKFX_DIVIDE => 8, CLKFX_MULTIPLY => 25, CLKIN_DIVIDE_BY_2 => FALSE, CLKIN_PERIOD => 31.25, CLKOUT_PHASE_SHIFT => "NONE", CLK_FEEDBACK => "NONE", DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", PHASE_SHIFT => 0, STARTUP_WAIT => FALSE) port map -- Input clock (CLKIN => clkin1, CLKFB => clkfb, -- Output clocks CLK0 => clk0, CLK90 => open, CLK180 => open, CLK270 => open, CLK2X => open, CLK2X180 => open, CLKFX => clkfx, CLKFX180 => open, CLKDV => open, -- Ports for dynamic phase shift PSCLK => '0', PSEN => '0', PSINCDEC => '0', PSDONE => open, -- Other control and status signals LOCKED => locked_internal, STATUS => status_internal, RST => '0', -- Unused pin, tie low DSSEN => '0'); -- Output buffering ------------------------------------- -- no phase alignment active, connect to ground clkfb <= '0'; -- clkout1_buf : BUFG -- port map -- (O => CLK_OUT1, -- I => clkfx); CLK_OUT1 <= clkfx; end xilinx;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Template_PSL_Base/Libraries/Wishbone_Peripherals/clk_32to100_dcm.vhd
13
6307
-- file: clk_32to100_dcm.vhd -- -- (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- ------------------------------------------------------------------------------ -- User entered comments ------------------------------------------------------------------------------ -- None -- ------------------------------------------------------------------------------ -- "Output Output Phase Duty Pk-to-Pk Phase" -- "Clock Freq (MHz) (degrees) Cycle (%) Jitter (ps) Error (ps)" ------------------------------------------------------------------------------ -- CLK_OUT1____50.000______0.000______50.0______600.000____150.000 -- ------------------------------------------------------------------------------ -- "Input Clock Freq (MHz) Input Jitter (UI)" ------------------------------------------------------------------------------ -- __primary__________32.000____________0.010 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use ieee.numeric_std.all; library unisim; use unisim.vcomponents.all; entity clk_32to100_dcm is port (-- Clock in ports CLK_IN1 : in std_logic; -- Clock out ports CLK_OUT1 : out std_logic ); end clk_32to100_dcm; architecture xilinx of clk_32to100_dcm is attribute CORE_GENERATION_INFO : string; attribute CORE_GENERATION_INFO of xilinx : architecture is "clk_32to100_dcm,clk_wiz_v3_6,{component_name=clk_32to100_dcm,use_phase_alignment=false,use_min_o_jitter=false,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,feedback_source=FDBK_AUTO,primtype_sel=DCM_SP,num_out_clk=1,clkin1_period=31.25,clkin2_period=31.25,use_power_down=false,use_reset=false,use_locked=false,use_inclk_stopped=false,use_status=false,use_freeze=false,use_clk_valid=false,feedback_type=SINGLE,clock_mgr_type=AUTO,manual_override=false}"; -- Input clock buffering / unused connectors signal clkin1 : std_logic; -- Output clock buffering signal clkfb : std_logic; signal clk0 : std_logic; signal clkfx : std_logic; signal clkfbout : std_logic; signal locked_internal : std_logic; signal status_internal : std_logic_vector(7 downto 0); begin -- Input buffering -------------------------------------- --clkin1 <= CLK_IN1; clkin2_inst: BUFG port map ( I => CLK_IN1, O => clkin1 ); -- Clocking primitive -------------------------------------- -- Instantiation of the DCM primitive -- * Unused inputs are tied off -- * Unused outputs are labeled unused dcm_sp_inst: DCM_SP generic map (CLKDV_DIVIDE => 2.000, CLKFX_DIVIDE => 8, CLKFX_MULTIPLY => 25, CLKIN_DIVIDE_BY_2 => FALSE, CLKIN_PERIOD => 31.25, CLKOUT_PHASE_SHIFT => "NONE", CLK_FEEDBACK => "NONE", DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", PHASE_SHIFT => 0, STARTUP_WAIT => FALSE) port map -- Input clock (CLKIN => clkin1, CLKFB => clkfb, -- Output clocks CLK0 => clk0, CLK90 => open, CLK180 => open, CLK270 => open, CLK2X => open, CLK2X180 => open, CLKFX => clkfx, CLKFX180 => open, CLKDV => open, -- Ports for dynamic phase shift PSCLK => '0', PSEN => '0', PSINCDEC => '0', PSDONE => open, -- Other control and status signals LOCKED => locked_internal, STATUS => status_internal, RST => '0', -- Unused pin, tie low DSSEN => '0'); -- Output buffering ------------------------------------- -- no phase alignment active, connect to ground clkfb <= '0'; -- clkout1_buf : BUFG -- port map -- (O => CLK_OUT1, -- I => clkfx); CLK_OUT1 <= clkfx; end xilinx;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_YM2149_simple/Libraries/Benchy/transmitter.vhd
13
4797
---------------------------------------------------------------------------------- -- transmitter.vhd -- -- Copyright (C) 2006 Michael Poppitz -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- -- This program is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA -- ---------------------------------------------------------------------------------- -- -- Details: http://www.sump.org/projects/analyzer/ -- -- Takes 32bit (one sample) and sends it out on the serial port. -- End of transmission is signalled by taking back the busy flag. -- Supports xon/xoff flow control. -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity transmitter is generic ( FREQ : integer; RATE : integer ); Port ( data : in STD_LOGIC_VECTOR (31 downto 0); disabledGroups : in std_logic_vector (3 downto 0); write : in std_logic; id : in std_logic; xon : in std_logic; xoff : in std_logic; clock : in STD_LOGIC; trxClock : IN std_logic; reset : in std_logic; tx : out STD_LOGIC; busy: out std_logic -- pause: out std_logic ); end transmitter; architecture Behavioral of transmitter is type TX_STATES is (IDLE, SEND, POLL); -- constant BITLENGTH : integer := FREQ / RATE; --FREQ = 100000000/28=3571428 : RATE = 115200 : FREQ/RATE = 3571428/115200 = 31 constant BITLENGTH : integer := 16; signal dataBuffer : STD_LOGIC_VECTOR (31 downto 0); signal disabledBuffer : std_logic_vector (3 downto 0); signal txBuffer : std_logic_vector (9 downto 0) := "1000000000"; signal byte : std_logic_vector (7 downto 0); signal counter : integer range 0 to BITLENGTH; signal bits : integer range 0 to 10; signal bytes : integer range 0 to 4; signal state : TX_STATES; signal paused, writeByte, byteDone, disabled : std_logic; begin -- pause <= paused; tx <= txBuffer(0); -- sends one byte process(clock) begin if rising_edge(clock) then if writeByte = '1' then counter <= 0; bits <= 0; byteDone <= disabled; txBuffer <= '1' & byte & "0"; elsif counter = BITLENGTH then counter <= 0; txBuffer <= '1' & txBuffer(9 downto 1); if bits = 10 then byteDone <= '1'; else bits <= bits + 1; end if; elsif trxClock = '1' then counter <= counter + 1; end if; end if; end process; -- control mechanism for sending a 32 bit word process(clock, reset) begin if reset = '1' then writeByte <= '0'; state <= IDLE; dataBuffer <= (others => '0'); disabledBuffer <= (others => '0'); elsif rising_edge(clock) then if (state /= IDLE) or (write = '1') or (paused = '1') then busy <= '1'; else busy <= '0'; end if; case state is -- when write is '1', data will be available with next cycle when IDLE => if write = '1' then dataBuffer <= data; disabledBuffer <= disabledGroups; state <= SEND; bytes <= 0; elsif id = '1' then dataBuffer <= x"534c4131"; disabledBuffer <= "0000"; state <= SEND; bytes <= 0; end if; when SEND => if bytes = 4 then state <= IDLE; else bytes <= bytes + 1; case bytes is when 0 => byte <= dataBuffer(7 downto 0); disabled <= disabledBuffer(0); when 1 => byte <= dataBuffer(15 downto 8); disabled <= disabledBuffer(1); when 2 => byte <= dataBuffer(23 downto 16); disabled <= disabledBuffer(2); when others => byte <= dataBuffer(31 downto 24); disabled <= disabledBuffer(3); end case; writeByte <= '1'; state <= POLL; end if; when POLL => writeByte <= '0'; if byteDone = '1' and writeByte = '0' and paused = '0' then state <= SEND; end if; end case; end if; end process; -- set paused mode according to xon/xoff commands process(clock, reset) begin if reset = '1' then paused <= '0'; elsif rising_edge(clock) then if xon = '1' then paused <= '0'; elsif xoff = '1' then paused <= '1'; end if; end if; end process; end Behavioral;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_RetroCade_Synth/Libraries/Benchy/transmitter.vhd
13
4797
---------------------------------------------------------------------------------- -- transmitter.vhd -- -- Copyright (C) 2006 Michael Poppitz -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- -- This program is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA -- ---------------------------------------------------------------------------------- -- -- Details: http://www.sump.org/projects/analyzer/ -- -- Takes 32bit (one sample) and sends it out on the serial port. -- End of transmission is signalled by taking back the busy flag. -- Supports xon/xoff flow control. -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity transmitter is generic ( FREQ : integer; RATE : integer ); Port ( data : in STD_LOGIC_VECTOR (31 downto 0); disabledGroups : in std_logic_vector (3 downto 0); write : in std_logic; id : in std_logic; xon : in std_logic; xoff : in std_logic; clock : in STD_LOGIC; trxClock : IN std_logic; reset : in std_logic; tx : out STD_LOGIC; busy: out std_logic -- pause: out std_logic ); end transmitter; architecture Behavioral of transmitter is type TX_STATES is (IDLE, SEND, POLL); -- constant BITLENGTH : integer := FREQ / RATE; --FREQ = 100000000/28=3571428 : RATE = 115200 : FREQ/RATE = 3571428/115200 = 31 constant BITLENGTH : integer := 16; signal dataBuffer : STD_LOGIC_VECTOR (31 downto 0); signal disabledBuffer : std_logic_vector (3 downto 0); signal txBuffer : std_logic_vector (9 downto 0) := "1000000000"; signal byte : std_logic_vector (7 downto 0); signal counter : integer range 0 to BITLENGTH; signal bits : integer range 0 to 10; signal bytes : integer range 0 to 4; signal state : TX_STATES; signal paused, writeByte, byteDone, disabled : std_logic; begin -- pause <= paused; tx <= txBuffer(0); -- sends one byte process(clock) begin if rising_edge(clock) then if writeByte = '1' then counter <= 0; bits <= 0; byteDone <= disabled; txBuffer <= '1' & byte & "0"; elsif counter = BITLENGTH then counter <= 0; txBuffer <= '1' & txBuffer(9 downto 1); if bits = 10 then byteDone <= '1'; else bits <= bits + 1; end if; elsif trxClock = '1' then counter <= counter + 1; end if; end if; end process; -- control mechanism for sending a 32 bit word process(clock, reset) begin if reset = '1' then writeByte <= '0'; state <= IDLE; dataBuffer <= (others => '0'); disabledBuffer <= (others => '0'); elsif rising_edge(clock) then if (state /= IDLE) or (write = '1') or (paused = '1') then busy <= '1'; else busy <= '0'; end if; case state is -- when write is '1', data will be available with next cycle when IDLE => if write = '1' then dataBuffer <= data; disabledBuffer <= disabledGroups; state <= SEND; bytes <= 0; elsif id = '1' then dataBuffer <= x"534c4131"; disabledBuffer <= "0000"; state <= SEND; bytes <= 0; end if; when SEND => if bytes = 4 then state <= IDLE; else bytes <= bytes + 1; case bytes is when 0 => byte <= dataBuffer(7 downto 0); disabled <= disabledBuffer(0); when 1 => byte <= dataBuffer(15 downto 8); disabled <= disabledBuffer(1); when 2 => byte <= dataBuffer(23 downto 16); disabled <= disabledBuffer(2); when others => byte <= dataBuffer(31 downto 24); disabled <= disabledBuffer(3); end case; writeByte <= '1'; state <= POLL; end if; when POLL => writeByte <= '0'; if byteDone = '1' and writeByte = '0' and paused = '0' then state <= SEND; end if; end case; end if; end process; -- set paused mode according to xon/xoff commands process(clock, reset) begin if reset = '1' then paused <= '0'; elsif rising_edge(clock) then if xon = '1' then paused <= '0'; elsif xoff = '1' then paused <= '1'; end if; end if; end process; end Behavioral;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer_JTAG/Libraries/ZPUino_1/zpu_core_extreme.vhd
13
42722
-- ZPU -- -- Copyright 2004-2008 oharboe - Øyvind Harboe - [email protected] -- Copyright 2010-2012 Alvaro Lopes - [email protected] -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE ZPU PROJECT ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- The views and conclusions contained in the software and documentation -- are those of the authors and should not be interpreted as representing -- official policies, either expressed or implied, of the ZPU Project. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.wishbonepkg.all; --library UNISIM; --use UNISIM.vcomponents.all; entity zpu_core_extreme is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; -- Master wishbone interface wb_ack_i: in std_logic; wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_adr_o: out std_logic_vector(maxAddrBitIncIO downto 0); wb_cyc_o: out std_logic; wb_stb_o: out std_logic; wb_we_o: out std_logic; wb_inta_i: in std_logic; poppc_inst: out std_logic; break: out std_logic; -- STACK stack_a_read: in std_logic_vector(wordSize-1 downto 0); stack_b_read: in std_logic_vector(wordSize-1 downto 0); stack_a_write: out std_logic_vector(wordSize-1 downto 0); stack_b_write: out std_logic_vector(wordSize-1 downto 0); stack_a_writeenable: out std_logic; stack_a_enable: out std_logic; stack_b_writeenable: out std_logic; stack_b_enable: out std_logic; stack_a_addr: out std_logic_vector(stackSize_bits+1 downto 2); stack_b_addr: out std_logic_vector(stackSize_bits+1 downto 2); stack_clk: out std_logic; -- ROM wb interface rom_wb_ack_i: in std_logic; rom_wb_dat_i: in std_logic_vector(wordSize-1 downto 0); rom_wb_adr_o: out std_logic_vector(maxAddrBit downto 0); rom_wb_cyc_o: out std_logic; rom_wb_stb_o: out std_logic; rom_wb_cti_o: out std_logic_vector(2 downto 0); rom_wb_stall_i: in std_logic; -- Debug interface dbg_out: out zpu_dbg_out_type; dbg_in: in zpu_dbg_in_type ); end zpu_core_extreme; architecture behave of zpu_core_extreme is component lshifter is port ( clk: in std_logic; rst: in std_logic; enable: in std_logic; done: out std_logic; inputA: in std_logic_vector(31 downto 0); inputB: in std_logic_vector(31 downto 0); output: out std_logic_vector(63 downto 0); multorshift: in std_logic ); end component; signal lshifter_enable: std_logic; signal lshifter_done: std_logic; signal lshifter_input: std_logic_vector(31 downto 0); signal lshifter_amount: std_logic_vector(31 downto 0); signal lshifter_output: std_logic_vector(63 downto 0); signal lshifter_multorshift: std_logic; signal begin_inst: std_logic; signal trace_opcode: std_logic_vector(7 downto 0); signal trace_pc: std_logic_vector(maxAddrBitIncIO downto 0); signal trace_sp: std_logic_vector(maxAddrBitIncIO downto minAddrBit); signal trace_topOfStack: std_logic_vector(wordSize-1 downto 0); signal trace_topOfStackB: std_logic_vector(wordSize-1 downto 0); -- state machine. type State_Type is ( State_Execute, State_Store, State_StoreB, State_StoreB2, State_Load, State_LoadMemory, State_LoadStack, State_Loadb, State_Resync1, State_Resync2, State_LoadSP, State_WaitSPB, State_ResyncFromStoreStack, State_Neqbranch, State_Ashiftleft, State_Mult, State_MultF16 ); type DecodedOpcodeType is ( Decoded_Nop, Decoded_Idle, Decoded_Im0, Decoded_ImN, Decoded_LoadSP, Decoded_Dup, Decoded_DupStackB, Decoded_StoreSP, Decoded_Pop, Decoded_PopDown, Decoded_AddSP, Decoded_AddStackB, Decoded_Shift, Decoded_Emulate, Decoded_Break, Decoded_PushSP, Decoded_PopPC, Decoded_Add, Decoded_Or, Decoded_And, Decoded_Load, Decoded_Not, Decoded_Flip, Decoded_Store, Decoded_PopSP, Decoded_Interrupt, Decoded_Neqbranch, Decoded_Eq, Decoded_Storeb, Decoded_Storeh, Decoded_Ulessthan, Decoded_Lessthan, Decoded_Ashiftleft, Decoded_Ashiftright, Decoded_Loadb, Decoded_Call, Decoded_Mult, Decoded_MultF16 ); constant spMaxBit: integer := 10; constant minimal_implementation: boolean := false; subtype index is integer range 0 to 3; signal tOpcode_sel : index; function pc_to_cpuword(pc: unsigned) return unsigned is variable r: unsigned(wordSize-1 downto 0); begin r := (others => DontCareValue); r(maxAddrBit downto 0) := pc; return r; end pc_to_cpuword; function pc_to_memaddr(pc: unsigned) return unsigned is variable r: unsigned(maxAddrBit downto 0); begin r := (others => '0'); r(maxAddrBit downto minAddrBit) := pc(maxAddrBit downto minAddrBit); return r; end pc_to_memaddr; -- Prefetch stage registers type stackChangeType is ( Stack_Same, Stack_Push, Stack_Pop, Stack_DualPop ); type tosSourceType is ( Tos_Source_PC, Tos_Source_FetchPC, Tos_Source_Idim0, Tos_Source_IdimN, Tos_Source_StackB, Tos_Source_SP, Tos_Source_Add, Tos_Source_And, Tos_Source_Or, Tos_Source_Eq, Tos_Source_Not, Tos_Source_Flip, Tos_Source_LoadSP, Tos_Source_AddSP, Tos_Source_AddStackB, Tos_Source_Shift, Tos_Source_Ulessthan, Tos_Source_Lessthan, Tos_Source_None ); type decoderstate_type is ( State_Run, State_Jump, State_Inject, State_InjectJump ); type decoderegs_type is record valid: std_logic; decodedOpcode: DecodedOpcodeType; tosSource: tosSourceType; opWillFreeze: std_logic; -- '1' if we know in advance this opcode will freeze pipeline opcode: std_logic_vector(OpCode_Size-1 downto 0); pc: unsigned(maxAddrBit downto 0); fetchpc: unsigned(maxAddrBit downto 0); pcint: unsigned(maxAddrBit downto 0); idim: std_logic; im: std_logic; stackOperation: stackChangeType; spOffset: unsigned(4 downto 0); im_emu: std_logic; --emumode: std_logic; break: std_logic; state: decoderstate_type; end record; type prefetchregs_type is record sp: unsigned(spMaxBit downto 2); spnext: unsigned(spMaxBit downto 2); valid: std_logic; decodedOpcode: DecodedOpcodeType; tosSource: tosSourceType; opcode: std_logic_vector(OpCode_Size-1 downto 0); pc: unsigned(maxAddrBit downto 0); fetchpc: unsigned(maxAddrBit downto 0); idim: std_logic; break: std_logic; load: std_logic; opWillFreeze: std_logic; recompute_sp: std_logic; end record; type exuregs_type is record idim: std_logic; break: std_logic; inInterrupt:std_logic; tos: unsigned(wordSize-1 downto 0); tos_save: unsigned(wordSize-1 downto 0); nos_save: unsigned(wordSize-1 downto 0); state: State_Type; -- Wishbone control signals (registered) wb_cyc: std_logic; wb_stb: std_logic; wb_we: std_logic; end record; -- Registers for each stage signal exr: exuregs_type; signal prefr: prefetchregs_type; signal decr: decoderegs_type; signal pcnext: unsigned(maxAddrBit downto 0); -- Helper only. TODO: move into variable signal sp_load: unsigned(spMaxBit downto 2); -- SP value to load, coming from EXU into PFU signal decode_load_sp: std_logic; -- Load SP signal from EXU to PFU signal exu_busy: std_logic; -- EXU busy ( stalls PFU ) signal pfu_busy: std_logic; -- PFU busy ( stalls DFU ) signal decode_jump: std_logic; -- Jump signal from EXU to DFU signal jump_address: unsigned(maxAddrBit downto 0); -- Jump address from EXU to DFU signal do_interrupt: std_logic; -- Helper. -- Sampled signals from the opcode. Left as signals -- in order to simulate design. signal sampledOpcode: std_logic_vector(OpCode_Size-1 downto 0); signal sampledDecodedOpcode: DecodedOpcodeType; signal sampledOpWillFreeze: std_logic; signal sampledStackOperation: stackChangeType; signal sampledspOffset: unsigned(4 downto 0); signal sampledTosSource: tosSourceType; signal nos: unsigned(wordSize-1 downto 0); -- This is only a helper signal wroteback_q: std_logic; -- TODO: get rid of this here, move to EXU regs -- Test debug signals signal freeze_all: std_logic := '0'; signal single_step: std_logic := '0'; begin -- Debug interface dbg_out.pc <= std_logic_vector(prefr.pc); dbg_out.opcode <= prefr.opcode; dbg_out.sp <= std_logic_vector(prefr.sp); dbg_out.brk <= exr.break; dbg_out.stacka <= std_logic_vector(exr.tos); dbg_out.stackb <= std_logic_vector(nos); dbg_out.idim <= prefr.idim; shl: lshifter port map ( clk => wb_clk_i, rst => wb_rst_i, enable => lshifter_enable, done => lshifter_done, inputA => lshifter_input, inputB => lshifter_amount, output => lshifter_output, multorshift => lshifter_multorshift ); stack_clk <= wb_clk_i; traceFileGenerate: if Generate_Trace generate trace_file: trace port map ( clk => wb_clk_i, begin_inst => begin_inst, pc => trace_pc, opcode => trace_opcode, sp => trace_sp, memA => trace_topOfStack, memB => trace_topOfStackB, busy => '0',--busy, intsp => (others => 'U') ); end generate; tOpcode_sel <= to_integer(decr.pcint(minAddrBit-1 downto 0)); do_interrupt <= '1' when wb_inta_i='1' and exr.inInterrupt='0' else '0'; decodeControl: process(rom_wb_dat_i, tOpcode_sel, sp_load, decr, do_interrupt, dbg_in.inject, dbg_in.opcode) variable tOpcode : std_logic_vector(OpCode_Size-1 downto 0); variable localspOffset: unsigned(4 downto 0); begin if dbg_in.inject='1' then tOpcode := dbg_in.opcode; else case (tOpcode_sel) is when 0 => tOpcode := std_logic_vector(rom_wb_dat_i(31 downto 24)); when 1 => tOpcode := std_logic_vector(rom_wb_dat_i(23 downto 16)); when 2 => tOpcode := std_logic_vector(rom_wb_dat_i(15 downto 8)); when 3 => tOpcode := std_logic_vector(rom_wb_dat_i(7 downto 0)); when others => null; end case; end if; sampledOpcode <= tOpcode; sampledStackOperation <= Stack_Same; sampledTosSource <= Tos_Source_None; sampledOpWillFreeze <= '0'; localspOffset(4):=not tOpcode(4); localspOffset(3 downto 0) := unsigned(tOpcode(3 downto 0)); if do_interrupt='1' and decr.im='0' then sampledDecodedOpcode <= Decoded_Interrupt; sampledStackOperation <= Stack_Push; sampledTosSource <= Tos_Source_PC; else if (tOpcode(7 downto 7)=OpCode_Im) then if decr.im='0' then sampledStackOperation <= Stack_Push; sampledTosSource <= Tos_Source_Idim0; sampledDecodedOpcode<=Decoded_Im0; else sampledTosSource <= Tos_Source_IdimN; sampledDecodedOpcode<=Decoded_ImN; end if; elsif (tOpcode(7 downto 5)=OpCode_StoreSP) then sampledStackOperation <= Stack_Pop; sampledTosSource <= Tos_Source_StackB; if localspOffset=0 then sampledDecodedOpcode<=Decoded_Pop; sampledTosSource <= Tos_Source_StackB; elsif localspOffset=1 then sampledDecodedOpcode<=Decoded_PopDown; sampledTosSource <= Tos_Source_None; else sampledDecodedOpcode<=Decoded_StoreSP; sampledOpWillFreeze<='1'; sampledTosSource <= Tos_Source_StackB; end if; elsif (tOpcode(7 downto 5)=OpCode_LoadSP) then sampledStackOperation <= Stack_Push; if localspOffset=0 then sampledDecodedOpcode<=Decoded_Dup; elsif localspOffset=1 then sampledDecodedOpcode<=Decoded_DupStackB; sampledTosSource <= Tos_Source_StackB; else sampledDecodedOpcode<=Decoded_LoadSP; sampledTosSource <= Tos_Source_LoadSP; end if; elsif (tOpcode(7 downto 5)=OpCode_Emulate) then -- Emulated instructions implemented in hardware if minimal_implementation then sampledDecodedOpcode<=Decoded_Emulate; sampledStackOperation<=Stack_Push; -- will push PC sampledTosSource <= Tos_Source_FetchPC; else if (tOpcode(5 downto 0)=OpCode_Loadb) then sampledStackOperation<=Stack_Same; sampledDecodedOpcode<=Decoded_Loadb; sampledOpWillFreeze<='1'; elsif (tOpcode(5 downto 0)=OpCode_Neqbranch) then sampledStackOperation<=Stack_DualPop; sampledDecodedOpcode<=Decoded_Neqbranch; sampledOpWillFreeze <= '1'; elsif (tOpcode(5 downto 0)=OpCode_Call) then sampledDecodedOpcode<=Decoded_Call; sampledStackOperation<=Stack_Same; sampledTosSource<=Tos_Source_FetchPC; elsif (tOpcode(5 downto 0)=OpCode_Eq) then sampledDecodedOpcode<=Decoded_Eq; sampledStackOperation<=Stack_Pop; sampledTosSource<=Tos_Source_Eq; elsif (tOpcode(5 downto 0)=OpCode_Ulessthan) then sampledDecodedOpcode<=Decoded_Ulessthan; sampledStackOperation<=Stack_Pop; sampledTosSource<=Tos_Source_Ulessthan; elsif (tOpcode(5 downto 0)=OpCode_Lessthan) then sampledDecodedOpcode<=Decoded_Lessthan; sampledStackOperation<=Stack_Pop; sampledTosSource<=Tos_Source_Lessthan; elsif (tOpcode(5 downto 0)=OpCode_StoreB) then sampledDecodedOpcode<=Decoded_StoreB; sampledStackOperation<=Stack_DualPop; sampledOpWillFreeze<='1'; elsif (tOpcode(5 downto 0)=OpCode_Mult) then sampledDecodedOpcode<=Decoded_Mult; sampledStackOperation<=Stack_Pop; sampledOpWillFreeze<='1'; elsif (tOpcode(5 downto 0)=OpCode_Ashiftleft) then sampledDecodedOpcode<=Decoded_Ashiftleft; sampledStackOperation<=Stack_Pop; sampledOpWillFreeze<='1'; else sampledDecodedOpcode<=Decoded_Emulate; sampledStackOperation<=Stack_Push; -- will push PC sampledTosSource <= Tos_Source_FetchPC; end if; end if; elsif (tOpcode(7 downto 4)=OpCode_AddSP) then if localspOffset=0 then sampledDecodedOpcode<=Decoded_Shift; sampledTosSource <= Tos_Source_Shift; elsif localspOffset=1 then sampledDecodedOpcode<=Decoded_AddStackB; sampledTosSource <= Tos_Source_AddStackB; else sampledDecodedOpcode<=Decoded_AddSP; sampledTosSource <= Tos_Source_AddSP; end if; else case tOpcode(3 downto 0) is when OpCode_Break => sampledDecodedOpcode<=Decoded_Break; sampledOpWillFreeze <= '1'; when OpCode_PushSP => sampledStackOperation <= Stack_Push; sampledDecodedOpcode<=Decoded_PushSP; sampledTosSource <= Tos_Source_SP; when OpCode_PopPC => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_PopPC; sampledTosSource <= Tos_Source_StackB; when OpCode_Add => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_Add; sampledTosSource <= Tos_Source_Add; when OpCode_Or => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_Or; sampledTosSource <= Tos_Source_Or; when OpCode_And => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_And; sampledTosSource <= Tos_Source_And; when OpCode_Load => sampledDecodedOpcode<=Decoded_Load; sampledOpWillFreeze<='1'; when OpCode_Not => sampledDecodedOpcode<=Decoded_Not; sampledTosSource <= Tos_Source_Not; when OpCode_Flip => sampledDecodedOpcode<=Decoded_Flip; sampledTosSource <= Tos_Source_Flip; when OpCode_Store => sampledStackOperation <= Stack_DualPop; sampledDecodedOpcode<=Decoded_Store; sampledOpWillFreeze<='1'; when OpCode_PopSP => sampledDecodedOpcode<=Decoded_PopSP; sampledOpWillFreeze<='1'; when OpCode_NA4 => if enable_fmul16 then sampledDecodedOpcode<=Decoded_MultF16; sampledStackOperation<=Stack_Pop; sampledOpWillFreeze<='1'; else sampledDecodedOpcode<=Decoded_Nop; end if; when others => sampledDecodedOpcode<=Decoded_Nop; end case; end if; end if; sampledspOffset <= localspOffset; end process; -- Decode/Fetch unit rom_wb_stb_o <= not exu_busy; process(decr, jump_address, decode_jump, wb_clk_i, sp_load, sampledDecodedOpcode,sampledOpcode,decode_load_sp, exu_busy, pfu_busy, pcnext, rom_wb_ack_i, wb_rst_i, sampledStackOperation, sampledspOffset, sampledTosSource, prefr.recompute_sp, sampledOpWillFreeze, dbg_in.flush, dbg_in.inject,dbg_in.injectmode, prefr.valid, prefr.break, rom_wb_stall_i ) variable w: decoderegs_type; begin w := decr; pcnext <= decr.fetchpc + 1; rom_wb_adr_o <= std_logic_vector(pc_to_memaddr(decr.fetchpc)); rom_wb_cti_o <= CTI_CYCLE_INCRADDR; if wb_rst_i='1' then w.pc := (others => '0'); w.pcint := (others => '0'); w.valid := '0'; w.fetchpc := (others => '0'); w.im:='0'; w.im_emu:='0'; w.state := State_Run; w.break := '0'; rom_wb_cyc_o <= '0'; else rom_wb_cyc_o <= '1'; case decr.state is when State_Run => if pfu_busy='0' then if dbg_in.injectmode='0' and decr.break='0' and rom_wb_stall_i='0' then w.fetchpc := pcnext; end if; -- Jump request if decode_jump='1' then w.valid := '0'; w.im := '0'; w.break := '0'; -- Invalidate eventual break after branch instruction --rom_wb_cti_o <= CTI_CYCLE_ENDOFBURST; rom_wb_cyc_o<='0'; --if rom_wb_stall_i='0' then w.fetchpc := jump_address; --else w.state := State_Jump; --end if; else if dbg_in.injectmode='1' then --or decr.break='1' then -- At this point we ought to push a new op into the pipeline. -- Since we're entering inject mode, invalidate next operation, -- but save the current IM flag. w.im_emu := decr.im; w.valid := '0'; --rom_wb_cti_o <= CTI_CYCLE_ENDOFBURST; rom_wb_cyc_o <='0'; -- Wait until no work is to be done if prefr.valid='0' and decr.valid='0' and exu_busy='0' then w.state := State_Inject; w.im:='0'; end if; if decr.break='0' then w.pc := decr.pcint; end if; else if decr.break='1' then w.valid := '0'; else w.valid := rom_wb_ack_i; end if; if rom_wb_ack_i='1' then w.im := sampledOpcode(7); if sampledDecodedOpcode=Decoded_Break then w.break:='1'; end if; end if; if prefr.break='0' and rom_wb_stall_i='0' then w.pcint := decr.fetchpc; w.pc := decr.pcint; end if; if rom_wb_stall_i='0' then w.opcode := sampledOpcode; end if; end if; end if; w.opWillFreeze := sampledOpWillFreeze; w.decodedOpcode := sampledDecodedOpcode; w.stackOperation := sampledStackOperation; w.spOffset := sampledspOffset; w.tosSource := sampledTosSource; w.idim := decr.im; end if; when State_Jump => w.valid := '0'; w.pcint := decr.fetchpc; w.fetchpc := pcnext; w.state := State_Run; when State_InjectJump => w.valid := '0'; w.pcint := decr.fetchpc; w.fetchpc := pcnext; w.state := State_Inject; when State_Inject => -- NOTE: disable ROM rom_wb_cyc_o <= '0'; if dbg_in.injectmode='0' then w.im := decr.im_emu; w.fetchpc := decr.pcint; w.state := State_Run; w.break := '0'; else -- Handle opcode injection -- TODO: merge this with main decode. -- NOTE: we don't check busy here, it's up to debug unit to do it --if pfu_busy='0' then --w.fetchpc := pcnext; -- Jump request if decode_jump='1' then w.fetchpc := jump_address; w.valid := '0'; w.im := '0'; w.state := State_InjectJump; else w.valid := dbg_in.inject; if dbg_in.inject='1' then w.im := sampledOpcode(7); --w.break := '0'; --w.pcint := decr.fetchpc; w.opcode := sampledOpcode; --w.pc := decr.pcint; end if; end if; w.opWillFreeze := sampledOpWillFreeze; w.decodedOpcode := sampledDecodedOpcode; w.stackOperation := sampledStackOperation; w.spOffset := sampledspOffset; w.tosSource := sampledTosSource; w.idim := decr.im; end if; --end if; end case; end if; -- rst if rising_edge(wb_clk_i) then decr <= w; end if; end process; -- Prefetch/Load unit. sp_load <= exr.tos(spMaxBit downto 2); -- Will be delayed one clock cycle process(wb_clk_i, wb_rst_i, decr, prefr, exu_busy, decode_jump, sp_load, decode_load_sp, dbg_in.flush) variable w: prefetchregs_type; variable i_op_freeze: std_logic; begin w := prefr; pfu_busy<='0'; stack_b_addr <= std_logic_vector(prefr.spnext + 1); w.recompute_sp:='0'; -- Stack w.load := decode_load_sp; if decode_load_sp='1' then pfu_busy <= '1'; w.spnext := sp_load; w.recompute_sp := '1'; else pfu_busy <= exu_busy; if decr.valid='1' then if (exu_busy='0' and decode_jump='0') or prefr.recompute_sp='1' then case decr.stackOperation is when Stack_Push => w.spnext := prefr.spnext - 1; when Stack_Pop => w.spnext := prefr.spnext + 1; when Stack_DualPop => w.spnext := prefr.spnext + 2; when others => end case; w.sp := prefr.spnext; end if; end if; end if; case decr.decodedOpcode is when Decoded_LoadSP | decoded_AddSP => stack_b_addr <= std_logic_vector(prefr.spnext + decr.spOffset); when others => end case; if decode_jump='1' then -- this is a pipeline "invalidate" flag. w.valid := '0'; else if dbg_in.flush='1' then w.valid := '0'; else w.valid := decr.valid; end if; end if; -- Moved op_will_freeze from decoder to here case decr.decodedOpcode is when Decoded_StoreSP | Decoded_LoadB | Decoded_Neqbranch | Decoded_StoreB | Decoded_Mult | Decoded_Ashiftleft | Decoded_Break | Decoded_Load | Decoded_Store | Decoded_PopSP | Decoded_MultF16 => i_op_freeze := '1'; when others => i_op_freeze := '0'; end case; if exu_busy='0' then w.decodedOpcode := decr.decodedOpcode; w.tosSource := decr.tosSource; w.opcode := decr.opcode; w.opWillFreeze := i_op_freeze; w.pc := decr.pc; w.fetchpc := decr.pcint; w.idim := decr.idim; w.break := decr.break; end if; if wb_rst_i='1' then w.spnext := unsigned(spStart(10 downto 2)); --w.sp := unsigned(spStart(10 downto 2)); w.valid := '0'; w.idim := '0'; w.recompute_sp:='0'; end if; if rising_edge(wb_clk_i) then prefr <= w; end if; end process; process(prefr,exr,nos) begin trace_pc <= (others => '0'); trace_pc(maxAddrBit downto 0) <= std_logic_vector(prefr.pc); trace_opcode <= prefr.opcode; trace_sp <= (others => '0'); trace_sp(10 downto 2) <= std_logic_vector(prefr.sp); trace_topOfStack <= std_logic_vector( exr.tos ); trace_topOfStackB <= std_logic_vector( nos ); end process; -- IO/Memory Accesses wb_adr_o(maxAddrBitIncIO downto 0) <= std_logic_vector(exr.tos_save(maxAddrBitIncIO downto 0)); wb_cyc_o <= exr.wb_cyc; wb_stb_o <= exr.wb_stb; wb_we_o <= exr.wb_we; wb_dat_o <= std_logic_vector( exr.nos_save ); freeze_all <= dbg_in.freeze; process(exr, wb_inta_i, wb_clk_i, wb_rst_i, pcnext, stack_a_read,stack_b_read, wb_ack_i, wb_dat_i, do_interrupt,exr, prefr, nos, single_step, freeze_all, dbg_in.step, wroteback_q,lshifter_done,lshifter_output ) variable spOffset: unsigned(4 downto 0); variable w: exuregs_type; variable instruction_executed: std_logic; variable wroteback: std_logic; begin w := exr; instruction_executed := '0'; -- used for single stepping stack_b_writeenable <= '0'; stack_a_enable <= '1'; stack_b_enable <= '1'; exu_busy <= '0'; decode_jump <= '0'; jump_address <= (others => DontCareValue); lshifter_enable <= '0'; lshifter_amount <= std_logic_vector(exr.tos_save); lshifter_input <= std_logic_vector(exr.nos_save); lshifter_multorshift <= '0'; poppc_inst <= '0'; begin_inst<='0'; stack_a_addr <= std_logic_vector( prefr.sp ); stack_a_writeenable <= '0'; wroteback := wroteback_q; stack_b_writeenable <= '0'; stack_a_write <= std_logic_vector(exr.tos); spOffset(4):=not prefr.opcode(4); spOffset(3 downto 0) := unsigned(prefr.opcode(3 downto 0)); if wb_inta_i='0' then w.inInterrupt := '0'; end if; stack_b_write<=(others => DontCareValue); if wroteback_q='1' then nos <= unsigned(stack_a_read); else nos <= unsigned(stack_b_read); end if; decode_load_sp <= '0'; case exr.state is when State_Resync1 => exu_busy <= '1'; stack_a_enable<='1'; w.state := State_Resync2; wroteback := '0'; when State_ResyncFromStoreStack => exu_busy <= '1'; stack_a_addr <= std_logic_vector(prefr.spnext); stack_a_enable<='1'; w.state := State_Resync2; wroteback := '0'; when State_Resync2 => w.tos := unsigned(stack_a_read); instruction_executed := '1'; exu_busy <= '0'; wroteback := '0'; stack_b_enable <= '1'; w.state := State_Execute; when State_Execute => instruction_executed:='0'; if prefr.valid='1' then exu_busy <= prefr.opWillFreeze; if freeze_all='0' or single_step='1' then wroteback := '0'; w.nos_save := nos; w.tos_save := exr.tos; w.idim := prefr.idim; w.break:= prefr.break; begin_inst<='1'; instruction_executed := '1'; -- TOS big muxer case prefr.tosSource is when Tos_Source_PC => w.tos := (others => '0'); w.tos(maxAddrBit downto 0) := prefr.pc; when Tos_Source_FetchPC => w.tos := (others => '0'); w.tos(maxAddrBit downto 0) := prefr.fetchpc; when Tos_Source_Idim0 => for i in wordSize-1 downto 7 loop w.tos(i) := prefr.opcode(6); end loop; w.tos(6 downto 0) := unsigned(prefr.opcode(6 downto 0)); when Tos_Source_IdimN => w.tos(wordSize-1 downto 7) := exr.tos(wordSize-8 downto 0); w.tos(6 downto 0) := unsigned(prefr.opcode(6 downto 0)); when Tos_Source_StackB => w.tos := nos; when Tos_Source_SP => w.tos := (others => '0'); w.tos(31) := '1'; -- Stack address w.tos(10 downto 2) := prefr.sp; when Tos_Source_Add => w.tos := exr.tos + nos; when Tos_Source_And => w.tos := exr.tos and nos; when Tos_Source_Or => w.tos := exr.tos or nos; when Tos_Source_Eq => w.tos := (others => '0'); if nos = exr.tos then w.tos(0) := '1'; end if; when Tos_Source_Ulessthan => w.tos := (others => '0'); if exr.tos < nos then w.tos(0) := '1'; end if; when Tos_Source_Lessthan => w.tos := (others => '0'); if signed(exr.tos) < signed(nos) then w.tos(0) := '1'; end if; when Tos_Source_Not => w.tos := not exr.tos; when Tos_Source_Flip => for i in 0 to wordSize-1 loop w.tos(i) := exr.tos(wordSize-1-i); end loop; when Tos_Source_LoadSP => w.tos := unsigned(stack_b_read); when Tos_Source_AddSP => w.tos := w.tos + unsigned(stack_b_read); when Tos_Source_AddStackB => w.tos := w.tos + nos; when Tos_Source_Shift => w.tos := exr.tos + exr.tos; when others => end case; case prefr.decodedOpcode is when Decoded_Interrupt => w.inInterrupt := '1'; jump_address <= to_unsigned(32, maxAddrBit+1); decode_jump <= '1'; stack_a_writeenable<='1'; wroteback:='1'; stack_b_enable<='0'; instruction_executed := '0'; w.state := State_WaitSPB; when Decoded_Im0 => stack_a_writeenable<='1'; wroteback:='1'; when Decoded_ImN => when Decoded_Nop => when Decoded_PopPC | Decoded_Call => decode_jump <= '1'; jump_address <= exr.tos(maxAddrBit downto 0); poppc_inst <= '1'; stack_b_enable<='0'; -- Delay instruction_executed := '0'; w.state := State_WaitSPB; when Decoded_Emulate => decode_jump <= '1'; jump_address <= (others => '0'); jump_address(9 downto 5) <= unsigned(prefr.opcode(4 downto 0)); stack_a_writeenable<='1'; wroteback:='1'; when Decoded_PushSP => stack_a_writeenable<='1'; wroteback:='1'; when Decoded_LoadSP => stack_a_writeenable <= '1'; wroteback:='1'; when Decoded_DupStackB => stack_a_writeenable <= '1'; wroteback:='1'; when Decoded_Dup => stack_a_writeenable<='1'; wroteback:='1'; when Decoded_AddSP => stack_a_writeenable <= '1'; when Decoded_StoreSP => stack_a_writeenable <= '1'; wroteback:='1'; stack_a_addr <= std_logic_vector(prefr.sp + spOffset); instruction_executed := '0'; w.state := State_WaitSPB; when Decoded_PopDown => stack_a_writeenable<='1'; when Decoded_Pop => when Decoded_Ashiftleft => w.state := State_Ashiftleft; when Decoded_Mult => w.state := State_Mult; when Decoded_MultF16 => w.state := State_MultF16; when Decoded_Store => if exr.tos(31)='1' then stack_a_addr <= std_logic_vector(exr.tos(10 downto 2)); stack_a_write <= std_logic_vector(nos); stack_a_writeenable<='1'; w.state := State_ResyncFromStoreStack; else w.wb_we := '1'; w.wb_cyc := '1'; w.wb_stb := '1'; wroteback := wroteback_q; -- Keep WB stack_a_enable<='0'; stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); stack_b_enable<='0'; instruction_executed := '0'; w.state := State_Store; end if; when Decoded_Load | Decoded_Loadb | Decoded_StoreB => --w.tos_save := exr.tos; -- Byte select instruction_executed := '0'; wroteback := wroteback_q; -- Keep WB if exr.tos(wordSize-1)='1' then stack_a_addr<=std_logic_vector(exr.tos(10 downto 2)); stack_a_enable<='1'; w.state := State_LoadStack; else stack_a_enable <= '0'; stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); w.wb_we :='0'; w.wb_cyc :='1'; w.wb_stb :='1'; w.state := State_Load; end if; when Decoded_PopSP => decode_load_sp <= '1'; instruction_executed := '0'; stack_a_addr <= std_logic_vector(exr.tos(10 downto 2)); w.state := State_Resync2; --when Decoded_Break => -- w.break := '1'; when Decoded_Neqbranch => instruction_executed := '0'; w.state := State_NeqBranch; when others => end case; else -- freeze_all -- -- Freeze the entire pipeline. -- exu_busy<='1'; stack_a_enable<='0'; stack_b_enable<='0'; stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); end if; end if; -- valid when State_Ashiftleft => exu_busy <= '1'; lshifter_enable <= '1'; w.tos := unsigned(lshifter_output(31 downto 0)); if lshifter_done='1' then exu_busy<='0'; w.state := State_Execute; end if; when State_Mult => exu_busy <= '1'; lshifter_enable <= '1'; lshifter_multorshift <='1'; w.tos := unsigned(lshifter_output(31 downto 0)); if lshifter_done='1' then exu_busy<='0'; w.state := State_Execute; end if; when State_MultF16 => exu_busy <= '1'; lshifter_enable <= '1'; lshifter_multorshift <='1'; w.tos := unsigned(lshifter_output(47 downto 16)); if lshifter_done='1' then exu_busy<='0'; w.state := State_Execute; end if; when State_WaitSPB => instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; when State_Store => exu_busy <= '1'; -- Keep writeback flag wroteback := wroteback_q; if wb_ack_i='1' then stack_a_addr <= std_logic_vector(prefr.spnext); stack_a_enable<='1'; stack_b_enable<='1'; wroteback := '0'; --exu_busy <= '1'; w.wb_cyc := '0'; w.state := State_Resync2; else stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); stack_a_enable<='0'; stack_b_enable<='0'; end if; when State_Loadb => w.tos(wordSize-1 downto 8) := (others => '0'); case exr.tos_save(1 downto 0) is when "11" => w.tos(7 downto 0) := unsigned(exr.tos(7 downto 0)); when "10" => w.tos(7 downto 0) := unsigned(exr.tos(15 downto 8)); when "01" => w.tos(7 downto 0) := unsigned(exr.tos(23 downto 16)); when "00" => w.tos(7 downto 0) := unsigned(exr.tos(31 downto 24)); when others => null; end case; instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; when State_Load => if wb_ack_i='0' then exu_busy<='1'; else w.tos := unsigned(wb_dat_i); w.wb_cyc := '0'; if prefr.decodedOpcode=Decoded_Loadb then exu_busy<='1'; w.state := State_Loadb; elsif prefr.decodedOpcode=Decoded_Storeb then exu_busy<='1'; w.state := State_Storeb; else instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; end if; end if; when State_LoadStack => w.tos := unsigned(stack_a_read); if prefr.decodedOpcode=Decoded_Loadb then exu_busy<='1'; w.state:=State_Loadb; elsif prefr.decodedOpcode=Decoded_Storeb then exu_busy<='1'; w.state:=State_Storeb; else instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; end if; when State_NeqBranch => if exr.nos_save/=0 then decode_jump <= '1'; jump_address <= exr.tos(maxAddrBit downto 0) + prefr.pc; poppc_inst <= '1'; exu_busy <= '0'; else exu_busy <='1'; end if; instruction_executed := '0'; stack_a_addr <= std_logic_vector(prefr.spnext); wroteback:='0'; w.state := State_Resync2; when State_StoreB => exu_busy <= '1'; -- -- At this point, we have loaded the 32-bit, and it's in TOS -- The IO address is still saved in save_TOS. -- The original write value is still at save_NOS -- -- So we mangle the write value, and update save_NOS, and restore -- the IO address to TOS -- -- This is still buggy - don't use. Problems arise when writing to stack. -- w.nos_save := exr.tos; case exr.tos_save(1 downto 0) is when "00" => w.nos_save(31 downto 24) := exr.nos_save(7 downto 0); when "01" => w.nos_save(23 downto 16) := exr.nos_save(7 downto 0); when "10" => w.nos_save(15 downto 8) := exr.nos_save(7 downto 0); when "11" => w.nos_save(7 downto 0) := exr.nos_save(7 downto 0); when others => null; end case; w.tos := exr.tos_save; w.state := State_StoreB2; when State_StoreB2 => exu_busy <= '1'; if exr.tos(31)='1' then stack_a_addr <= std_logic_vector(exr.tos(10 downto 2)); stack_a_write <= std_logic_vector(exr.nos_save); -- hmm I don't like this stack_a_writeenable<='1'; w.state := State_ResyncFromStoreStack; else w.wb_we := '1'; w.wb_cyc := '1'; w.wb_stb := '1'; wroteback := wroteback_q; -- Keep WB stack_a_enable<='0'; stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); stack_b_enable<='0'; instruction_executed := '0'; w.state := State_Store; end if; when others => null; end case; if rising_edge(wb_clk_i) then if wb_rst_i='1' then exr.state <= State_Execute; exr.idim <= DontCareValue; exr.inInterrupt <= '0'; exr.break <= '0'; exr.wb_cyc <= '0'; exr.wb_stb <= '1'; else exr <= w; -- TODO: move wroteback_q into EXU regs wroteback_q <= wroteback; if exr.break='1' then report "BREAK" severity failure; end if; -- Some sanity checks, to be caught in simulation if prefr.valid='1' then if prefr.tosSource=Tos_Source_Idim0 and prefr.idim='1' then report "Invalid IDIM flag 0" severity error; end if; if prefr.tosSource=Tos_Source_IdimN and prefr.idim='0' then report "Invalid IDIM flag 1" severity error; end if; end if; end if; end if; end process; single_step <= dbg_in.step; dbg_out.valid <= '1' when prefr.valid='1' else '0'; -- Let pipeline finish dbg_out.ready <= '1' when exr.state=state_execute and decode_load_sp='0' and decode_jump='0' and decr.state = State_Inject --and jump_q='0' else '0'; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_SID_simple/Libraries/ZPUino_1/zpuino_crc16.vhd
13
2754
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity zpuino_crc16 is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(maxIOBit downto minIOBit); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o:out std_logic ); end entity zpuino_crc16; architecture behave of zpuino_crc16 is signal crc_q: std_logic_vector(15 downto 0); signal crcA_q: std_logic_vector(15 downto 0); signal crcB_q: std_logic_vector(15 downto 0); signal poly_q: std_logic_vector(15 downto 0); signal data_q: std_logic_vector(7 downto 0); signal count_q: integer range 0 to 7; signal ready_q: std_logic; begin wb_ack_o<='1' when ready_q='1' and ( wb_cyc_i='1' and wb_stb_i='1') else '0'; wb_inta_o <= '0'; process(wb_adr_i,crc_q,poly_q, crcA_q, crcB_q) begin case wb_adr_i(4 downto 2) is when "000" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crc_q; when "001" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= poly_q; when "100" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcA_q; when "101" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcB_q; when others => wb_dat_o <= (others => DontCareValue); end case; end process; process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then poly_q <= x"A001"; crc_q <= x"FFFF"; ready_q <= '1'; else if wb_cyc_i='1' and wb_stb_i='1' and wb_we_i='1' and ready_q='1' then case wb_adr_i(4 downto 2) is when "000" => crc_q <= wb_dat_i(15 downto 0); when "001" => poly_q <= wb_dat_i(15 downto 0); when "010" => ready_q <= '0'; count_q <= 0; data_q <= wb_dat_i(7 downto 0); crcA_q <= crc_q; crcB_q <= crcA_q; when others => end case; end if; if ready_q='0' then if (crc_q(0) xor data_q(0))='1' then crc_q <= ( '0' & crc_q(15 downto 1)) xor poly_q; else crc_q <= '0' & crc_q(15 downto 1); end if; data_q <= '0' & data_q(7 downto 1); if count_q=7 then count_q <= 0; ready_q <= '1'; else count_q <= count_q + 1; end if; end if; end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/Libraries/ZPUino_1/zpuino_crc16.vhd
13
2754
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity zpuino_crc16 is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(maxIOBit downto minIOBit); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o:out std_logic ); end entity zpuino_crc16; architecture behave of zpuino_crc16 is signal crc_q: std_logic_vector(15 downto 0); signal crcA_q: std_logic_vector(15 downto 0); signal crcB_q: std_logic_vector(15 downto 0); signal poly_q: std_logic_vector(15 downto 0); signal data_q: std_logic_vector(7 downto 0); signal count_q: integer range 0 to 7; signal ready_q: std_logic; begin wb_ack_o<='1' when ready_q='1' and ( wb_cyc_i='1' and wb_stb_i='1') else '0'; wb_inta_o <= '0'; process(wb_adr_i,crc_q,poly_q, crcA_q, crcB_q) begin case wb_adr_i(4 downto 2) is when "000" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crc_q; when "001" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= poly_q; when "100" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcA_q; when "101" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcB_q; when others => wb_dat_o <= (others => DontCareValue); end case; end process; process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then poly_q <= x"A001"; crc_q <= x"FFFF"; ready_q <= '1'; else if wb_cyc_i='1' and wb_stb_i='1' and wb_we_i='1' and ready_q='1' then case wb_adr_i(4 downto 2) is when "000" => crc_q <= wb_dat_i(15 downto 0); when "001" => poly_q <= wb_dat_i(15 downto 0); when "010" => ready_q <= '0'; count_q <= 0; data_q <= wb_dat_i(7 downto 0); crcA_q <= crc_q; crcB_q <= crcA_q; when others => end case; end if; if ready_q='0' then if (crc_q(0) xor data_q(0))='1' then crc_q <= ( '0' & crc_q(15 downto 1)) xor poly_q; else crc_q <= '0' & crc_q(15 downto 1); end if; data_q <= '0' & data_q(7 downto 1); if count_q=7 then count_q <= 0; ready_q <= '1'; else count_q <= count_q + 1; end if; end if; end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_RetroCade_Synth/Libraries/ZPUino_1/zpuino_crc16.vhd
13
2754
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity zpuino_crc16 is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(maxIOBit downto minIOBit); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o:out std_logic ); end entity zpuino_crc16; architecture behave of zpuino_crc16 is signal crc_q: std_logic_vector(15 downto 0); signal crcA_q: std_logic_vector(15 downto 0); signal crcB_q: std_logic_vector(15 downto 0); signal poly_q: std_logic_vector(15 downto 0); signal data_q: std_logic_vector(7 downto 0); signal count_q: integer range 0 to 7; signal ready_q: std_logic; begin wb_ack_o<='1' when ready_q='1' and ( wb_cyc_i='1' and wb_stb_i='1') else '0'; wb_inta_o <= '0'; process(wb_adr_i,crc_q,poly_q, crcA_q, crcB_q) begin case wb_adr_i(4 downto 2) is when "000" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crc_q; when "001" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= poly_q; when "100" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcA_q; when "101" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcB_q; when others => wb_dat_o <= (others => DontCareValue); end case; end process; process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then poly_q <= x"A001"; crc_q <= x"FFFF"; ready_q <= '1'; else if wb_cyc_i='1' and wb_stb_i='1' and wb_we_i='1' and ready_q='1' then case wb_adr_i(4 downto 2) is when "000" => crc_q <= wb_dat_i(15 downto 0); when "001" => poly_q <= wb_dat_i(15 downto 0); when "010" => ready_q <= '0'; count_q <= 0; data_q <= wb_dat_i(7 downto 0); crcA_q <= crc_q; crcB_q <= crcA_q; when others => end case; end if; if ready_q='0' then if (crc_q(0) xor data_q(0))='1' then crc_q <= ( '0' & crc_q(15 downto 1)) xor poly_q; else crc_q <= '0' & crc_q(15 downto 1); end if; data_q <= '0' & data_q(7 downto 1); if count_q=7 then count_q <= 0; ready_q <= '1'; else count_q <= count_q + 1; end if; end if; end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer/Libraries/ZPUino_1/zpu_core_extreme_icache.vhd
13
47502
-- ZPU -- -- Copyright 2004-2008 oharboe - Øyvind Harboe - [email protected] -- Copyright 2010-2012 Alvaro Lopes - [email protected] -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE ZPU PROJECT ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- The views and conclusions contained in the software and documentation -- are those of the authors and should not be interpreted as representing -- official policies, either expressed or implied, of the ZPU Project. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.wishbonepkg.all; --library UNISIM; --use UNISIM.vcomponents.all; entity zpu_core_extreme_icache is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; -- Master wishbone interface wb_ack_i: in std_logic; wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_adr_o: out std_logic_vector(maxAddrBitIncIO downto 0); wb_cyc_o: out std_logic; wb_stb_o: out std_logic; wb_sel_o: out std_logic_vector(3 downto 0); wb_we_o: out std_logic; wb_inta_i: in std_logic; poppc_inst: out std_logic; break: out std_logic; -- STACK stack_a_read: in std_logic_vector(wordSize-1 downto 0); stack_b_read: in std_logic_vector(wordSize-1 downto 0); stack_a_write: out std_logic_vector(wordSize-1 downto 0); stack_b_write: out std_logic_vector(wordSize-1 downto 0); stack_a_writeenable: out std_logic_vector(3 downto 0); stack_a_enable: out std_logic; stack_b_writeenable: out std_logic_vector(3 downto 0); stack_b_enable: out std_logic; stack_a_addr: out std_logic_vector(stackSize_bits-1 downto 2); stack_b_addr: out std_logic_vector(stackSize_bits-1 downto 2); stack_clk: out std_logic; -- ROM wb interface rom_wb_ack_i: in std_logic; rom_wb_dat_i: in std_logic_vector(wordSize-1 downto 0); rom_wb_adr_o: out std_logic_vector(maxAddrBit downto 0); rom_wb_cyc_o: out std_logic; rom_wb_stb_o: out std_logic; rom_wb_cti_o: out std_logic_vector(2 downto 0); rom_wb_stall_i: in std_logic; cache_flush: in std_logic; -- Debug interface dbg_out: out zpu_dbg_out_type; dbg_in: in zpu_dbg_in_type ); end zpu_core_extreme_icache; architecture behave of zpu_core_extreme_icache is component lshifter is port ( clk: in std_logic; rst: in std_logic; enable: in std_logic; done: out std_logic; inputA: in std_logic_vector(31 downto 0); inputB: in std_logic_vector(31 downto 0); output: out std_logic_vector(63 downto 0); multorshift: in std_logic ); end component; component zpuino_icache is generic ( ADDRESS_HIGH: integer := 26 ); port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; valid: out std_logic; data: out std_logic_vector(wordSize-1 downto 0); address: in std_logic_vector(maxAddrBit downto 0); strobe: in std_logic; enable: in std_logic; stall: out std_logic; flush: in std_logic; -- Master wishbone interface m_wb_ack_i: in std_logic; m_wb_dat_i: in std_logic_vector(wordSize-1 downto 0); m_wb_dat_o: out std_logic_vector(wordSize-1 downto 0); m_wb_adr_o: out std_logic_vector(maxAddrBit downto 0); m_wb_cyc_o: out std_logic; m_wb_stb_o: out std_logic; m_wb_stall_i: in std_logic; m_wb_we_o: out std_logic ); end component; component zpuino_lsu is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_ack_i: in std_logic; wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_adr_o: out std_logic_vector(maxAddrBitIncIO downto 2); wb_cyc_o: out std_logic; wb_stb_o: out std_logic; wb_sel_o: out std_logic_vector(3 downto 0); wb_we_o: out std_logic; -- Connection to cpu req: in std_logic; we: in std_logic; busy: out std_logic; data_read: out std_logic_vector(wordSize-1 downto 0); data_write: in std_logic_vector(wordSize-1 downto 0); data_sel: in std_logic_vector(3 downto 0); address: in std_logic_vector(maxAddrBitIncIO downto 0) ); end component; signal cache_valid: std_logic; signal cache_data: std_logic_vector(wordSize-1 downto 0); signal cache_address: std_logic_vector(maxAddrBit downto 0); signal cache_strobe: std_logic; signal cache_enable: std_logic; signal cache_stall: std_logic; signal lshifter_enable: std_logic; signal lshifter_done: std_logic; signal lshifter_input: std_logic_vector(31 downto 0); signal lshifter_amount: std_logic_vector(31 downto 0); signal lshifter_output: std_logic_vector(63 downto 0); signal lshifter_multorshift: std_logic; signal begin_inst: std_logic; signal trace_opcode: std_logic_vector(7 downto 0); signal trace_pc: std_logic_vector(maxAddrBitIncIO downto 0); signal trace_sp: std_logic_vector(maxAddrBitIncIO downto minAddrBit); signal trace_topOfStack: std_logic_vector(wordSize-1 downto 0); signal trace_topOfStackB: std_logic_vector(wordSize-1 downto 0); -- state machine. type State_Type is ( State_Execute, State_LoadStack, State_Loadb, State_Loadh, State_Resync2, State_WaitSPB, State_ResyncFromStoreStack, State_Neqbranch, State_Ashiftleft, State_Mult, State_MultF16 ); type DecodedOpcodeType is ( Decoded_Nop, Decoded_Idle, Decoded_Im0, Decoded_ImN, Decoded_LoadSP, Decoded_Dup, Decoded_DupStackB, Decoded_StoreSP, Decoded_Pop, Decoded_PopDown, Decoded_AddSP, Decoded_AddStackB, Decoded_Shift, Decoded_Emulate, Decoded_Break, Decoded_PushSP, Decoded_PopPC, Decoded_Add, Decoded_Or, Decoded_And, Decoded_Load, Decoded_Not, Decoded_Flip, Decoded_Store, Decoded_PopSP, Decoded_Interrupt, Decoded_Neqbranch, Decoded_Eq, Decoded_Storeb, Decoded_Storeh, Decoded_Ulessthan, Decoded_Lessthan, Decoded_Ashiftleft, Decoded_Ashiftright, Decoded_Loadb, Decoded_Loadh, Decoded_Call, Decoded_Mult, Decoded_MultF16 ); constant spMaxBit: integer := stackSize_bits-1; constant minimal_implementation: boolean := false; subtype index is integer range 0 to 3; signal tOpcode_sel : index; function pc_to_cpuword(pc: unsigned) return unsigned is variable r: unsigned(wordSize-1 downto 0); begin r := (others => DontCareValue); r(maxAddrBit downto 0) := pc; return r; end pc_to_cpuword; function pc_to_memaddr(pc: unsigned) return unsigned is variable r: unsigned(maxAddrBit downto 0); begin r := (others => '0'); r(maxAddrBit downto minAddrBit) := pc(maxAddrBit downto minAddrBit); return r; end pc_to_memaddr; -- Prefetch stage registers type stackChangeType is ( Stack_Same, Stack_Push, Stack_Pop, Stack_DualPop ); type tosSourceType is ( Tos_Source_PC, Tos_Source_FetchPC, Tos_Source_Idim0, Tos_Source_IdimN, Tos_Source_StackB, Tos_Source_SP, Tos_Source_Add, Tos_Source_And, Tos_Source_Or, Tos_Source_Eq, Tos_Source_Not, Tos_Source_Flip, Tos_Source_LoadSP, Tos_Source_AddSP, Tos_Source_AddStackB, Tos_Source_Shift, Tos_Source_Ulessthan, Tos_Source_Lessthan, Tos_Source_LSU, Tos_Source_None ); type decoderstate_type is ( State_Run, State_Jump, State_Inject, State_InjectJump ); type decoderegs_type is record valid: std_logic; decodedOpcode: DecodedOpcodeType; tosSource: tosSourceType; opWillFreeze: std_logic; -- '1' if we know in advance this opcode will freeze pipeline opcode: std_logic_vector(OpCode_Size-1 downto 0); pc: unsigned(maxAddrBit downto 0); fetchpc: unsigned(maxAddrBit downto 0); pcint: unsigned(maxAddrBit downto 0); idim: std_logic; im: std_logic; stackOperation: stackChangeType; spOffset: unsigned(4 downto 0); im_emu: std_logic; --emumode: std_logic; break: std_logic; state: decoderstate_type; end record; type prefetchregs_type is record sp: unsigned(spMaxBit downto 2); spnext: unsigned(spMaxBit downto 2); valid: std_logic; decodedOpcode: DecodedOpcodeType; tosSource: tosSourceType; opcode: std_logic_vector(OpCode_Size-1 downto 0); pc: unsigned(maxAddrBit downto 0); fetchpc: unsigned(maxAddrBit downto 0); idim: std_logic; break: std_logic; load: std_logic; opWillFreeze: std_logic; recompute_sp: std_logic; end record; type exuregs_type is record idim: std_logic; break: std_logic; inInterrupt:std_logic; tos: unsigned(wordSize-1 downto 0); tos_save: unsigned(wordSize-1 downto 0); nos_save: unsigned(wordSize-1 downto 0); state: State_Type; -- Wishbone control signals (registered) wb_cyc: std_logic; wb_stb: std_logic; wb_we: std_logic; end record; -- Registers for each stage signal exr: exuregs_type; signal prefr: prefetchregs_type; signal decr: decoderegs_type; signal pcnext: unsigned(maxAddrBit downto 0); -- Helper only. TODO: move into variable signal sp_load: unsigned(spMaxBit downto 2); -- SP value to load, coming from EXU into PFU signal decode_load_sp: std_logic; -- Load SP signal from EXU to PFU signal exu_busy: std_logic; -- EXU busy ( stalls PFU ) signal pfu_busy: std_logic; -- PFU busy ( stalls DFU ) signal decode_jump: std_logic; -- Jump signal from EXU to DFU signal jump_address: unsigned(maxAddrBit downto 0); -- Jump address from EXU to DFU signal do_interrupt: std_logic; -- Helper. -- Sampled signals from the opcode. Left as signals -- in order to simulate design. signal sampledOpcode: std_logic_vector(OpCode_Size-1 downto 0); signal sampledDecodedOpcode: DecodedOpcodeType; signal sampledOpWillFreeze: std_logic; signal sampledStackOperation: stackChangeType; signal sampledspOffset: unsigned(4 downto 0); signal sampledTosSource: tosSourceType; signal nos: unsigned(wordSize-1 downto 0); -- This is only a helper signal wroteback_q: std_logic; -- TODO: get rid of this here, move to EXU regs -- Test debug signals signal freeze_all: std_logic := '0'; signal single_step: std_logic := '0'; -- LSU signal lsu_req: std_logic; signal lsu_we: std_logic; signal lsu_busy: std_logic; signal lsu_data_read: std_logic_vector(wordSize-1 downto 0); signal lsu_data_write: std_logic_vector(wordSize-1 downto 0); signal lsu_data_sel: std_logic_vector(3 downto 0); signal lsu_address: std_logic_vector(maxAddrBitIncIO downto 0); begin -- Debug interface dbg_out.pc <= std_logic_vector(prefr.pc); dbg_out.opcode <= prefr.opcode; --dbg_out.sp <= std_logic_vector(prefr.sp); dbg_out.brk <= exr.break; --dbg_out.stacka <= std_logic_vector(exr.tos); --dbg_out.stackb <= std_logic_vector(nos); dbg_out.idim <= prefr.idim; shl: lshifter port map ( clk => wb_clk_i, rst => wb_rst_i, enable => lshifter_enable, done => lshifter_done, inputA => lshifter_input, inputB => lshifter_amount, output => lshifter_output, multorshift => lshifter_multorshift ); stack_clk <= wb_clk_i; -- synopsys translate_off traceFileGenerate: if Generate_Trace generate trace_file: trace port map ( clk => wb_clk_i, begin_inst => begin_inst, pc => trace_pc, opcode => trace_opcode, sp => trace_sp, memA => trace_topOfStack, memB => trace_topOfStackB, busy => '0',--busy, intsp => (others => 'U') ); end generate; -- synopsys translate_on cache: zpuino_icache generic map ( ADDRESS_HIGH => maxAddrBitBRAM ) port map ( wb_clk_i => wb_clk_i, wb_rst_i => wb_rst_i, valid => cache_valid, data => cache_data, address => cache_address, strobe => cache_strobe, stall => cache_stall, enable => cache_enable, flush => cache_flush, -- Master wishbone interface m_wb_ack_i => rom_wb_ack_i, m_wb_dat_i => rom_wb_dat_i, m_wb_adr_o => rom_wb_adr_o, m_wb_cyc_o => rom_wb_cyc_o, m_wb_stb_o => rom_wb_stb_o, m_wb_stall_i => rom_wb_stall_i ); lsu: zpuino_lsu port map ( wb_clk_i => wb_clk_i, wb_rst_i => wb_rst_i, wb_ack_i => wb_ack_i, wb_dat_i => wb_dat_i, wb_dat_o => wb_dat_o, wb_adr_o => wb_adr_o(maxAddrBitIncIO downto 2), wb_cyc_o => wb_cyc_o, wb_stb_o => wb_stb_o, wb_sel_o => wb_sel_o, wb_we_o => wb_we_o, req => lsu_req, we => lsu_we, busy => lsu_busy, data_read => lsu_data_read, data_write => lsu_data_write, data_sel => lsu_data_sel, address => lsu_address ); tOpcode_sel <= to_integer(decr.pcint(minAddrBit-1 downto 0)); do_interrupt <= '1' when wb_inta_i='1' and exr.inInterrupt='0' else '0'; decodeControl: process(cache_data, tOpcode_sel, sp_load, decr, do_interrupt, dbg_in.inject, dbg_in.opcode) variable tOpcode : std_logic_vector(OpCode_Size-1 downto 0); variable localspOffset: unsigned(4 downto 0); begin if dbg_in.inject='1' then tOpcode := dbg_in.opcode; else case (tOpcode_sel) is when 0 => tOpcode := std_logic_vector(cache_data(31 downto 24)); when 1 => tOpcode := std_logic_vector(cache_data(23 downto 16)); when 2 => tOpcode := std_logic_vector(cache_data(15 downto 8)); when 3 => tOpcode := std_logic_vector(cache_data(7 downto 0)); when others => null; end case; end if; sampledOpcode <= tOpcode; sampledStackOperation <= Stack_Same; sampledTosSource <= Tos_Source_None; sampledOpWillFreeze <= '0'; localspOffset(4):=not tOpcode(4); localspOffset(3 downto 0) := unsigned(tOpcode(3 downto 0)); if do_interrupt='1' and decr.im='0' then sampledDecodedOpcode <= Decoded_Interrupt; sampledStackOperation <= Stack_Push; sampledTosSource <= Tos_Source_PC; else if (tOpcode(7 downto 7)=OpCode_Im) then if decr.im='0' then sampledStackOperation <= Stack_Push; sampledTosSource <= Tos_Source_Idim0; sampledDecodedOpcode<=Decoded_Im0; else sampledTosSource <= Tos_Source_IdimN; sampledDecodedOpcode<=Decoded_ImN; end if; elsif (tOpcode(7 downto 5)=OpCode_StoreSP) then sampledStackOperation <= Stack_Pop; sampledTosSource <= Tos_Source_StackB; if localspOffset=0 then sampledDecodedOpcode<=Decoded_Pop; sampledTosSource <= Tos_Source_StackB; elsif localspOffset=1 then sampledDecodedOpcode<=Decoded_PopDown; sampledTosSource <= Tos_Source_None; else sampledDecodedOpcode<=Decoded_StoreSP; sampledOpWillFreeze<='1'; sampledTosSource <= Tos_Source_StackB; end if; elsif (tOpcode(7 downto 5)=OpCode_LoadSP) then sampledStackOperation <= Stack_Push; if localspOffset=0 then sampledDecodedOpcode<=Decoded_Dup; elsif localspOffset=1 then sampledDecodedOpcode<=Decoded_DupStackB; sampledTosSource <= Tos_Source_StackB; else sampledDecodedOpcode<=Decoded_LoadSP; sampledTosSource <= Tos_Source_LoadSP; end if; elsif (tOpcode(7 downto 5)=OpCode_Emulate) then -- Emulated instructions implemented in hardware if minimal_implementation then sampledDecodedOpcode<=Decoded_Emulate; sampledStackOperation<=Stack_Push; -- will push PC sampledTosSource <= Tos_Source_FetchPC; else if (tOpcode(5 downto 0)=OpCode_Loadb) then sampledStackOperation<=Stack_Same; sampledDecodedOpcode<=Decoded_Loadb; sampledTosSource <= Tos_Source_LSU; elsif (tOpcode(5 downto 0)=OpCode_Loadh) then sampledStackOperation<=Stack_Same; sampledDecodedOpcode<=Decoded_Loadh; sampledTosSource <= Tos_Source_LSU; elsif (tOpcode(5 downto 0)=OpCode_Neqbranch) then sampledStackOperation<=Stack_DualPop; sampledDecodedOpcode<=Decoded_Neqbranch; sampledOpWillFreeze <= '1'; elsif (tOpcode(5 downto 0)=OpCode_Call) then sampledDecodedOpcode<=Decoded_Call; sampledStackOperation<=Stack_Same; sampledTosSource<=Tos_Source_FetchPC; elsif (tOpcode(5 downto 0)=OpCode_Eq) then sampledDecodedOpcode<=Decoded_Eq; sampledStackOperation<=Stack_Pop; sampledTosSource<=Tos_Source_Eq; elsif (tOpcode(5 downto 0)=OpCode_Ulessthan) then sampledDecodedOpcode<=Decoded_Ulessthan; sampledStackOperation<=Stack_Pop; sampledTosSource<=Tos_Source_Ulessthan; elsif (tOpcode(5 downto 0)=OpCode_Lessthan) then sampledDecodedOpcode<=Decoded_Lessthan; sampledStackOperation<=Stack_Pop; sampledTosSource<=Tos_Source_Lessthan; elsif (tOpcode(5 downto 0)=OpCode_StoreB) then sampledDecodedOpcode<=Decoded_StoreB; sampledStackOperation<=Stack_DualPop; sampledOpWillFreeze<='1'; elsif (tOpcode(5 downto 0)=OpCode_StoreH) then sampledDecodedOpcode<=Decoded_StoreH; sampledStackOperation<=Stack_DualPop; sampledOpWillFreeze<='1'; elsif (tOpcode(5 downto 0)=OpCode_Mult) then sampledDecodedOpcode<=Decoded_Mult; sampledStackOperation<=Stack_Pop; sampledOpWillFreeze<='1'; elsif (tOpcode(5 downto 0)=OpCode_Ashiftleft) then sampledDecodedOpcode<=Decoded_Ashiftleft; sampledStackOperation<=Stack_Pop; sampledOpWillFreeze<='1'; else sampledDecodedOpcode<=Decoded_Emulate; sampledStackOperation<=Stack_Push; -- will push PC sampledTosSource <= Tos_Source_FetchPC; end if; end if; elsif (tOpcode(7 downto 4)=OpCode_AddSP) then if localspOffset=0 then sampledDecodedOpcode<=Decoded_Shift; sampledTosSource <= Tos_Source_Shift; elsif localspOffset=1 then sampledDecodedOpcode<=Decoded_AddStackB; sampledTosSource <= Tos_Source_AddStackB; else sampledDecodedOpcode<=Decoded_AddSP; sampledTosSource <= Tos_Source_AddSP; end if; else case tOpcode(3 downto 0) is when OpCode_Break => sampledDecodedOpcode<=Decoded_Break; sampledOpWillFreeze <= '1'; when OpCode_PushSP => sampledStackOperation <= Stack_Push; sampledDecodedOpcode<=Decoded_PushSP; sampledTosSource <= Tos_Source_SP; when OpCode_PopPC => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_PopPC; sampledTosSource <= Tos_Source_StackB; when OpCode_Add => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_Add; sampledTosSource <= Tos_Source_Add; when OpCode_Or => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_Or; sampledTosSource <= Tos_Source_Or; when OpCode_And => sampledStackOperation <= Stack_Pop; sampledDecodedOpcode<=Decoded_And; sampledTosSource <= Tos_Source_And; when OpCode_Load => sampledDecodedOpcode<=Decoded_Load; --sampledOpWillFreeze<='1'; sampledTosSource <= Tos_Source_LSU; when OpCode_Not => sampledDecodedOpcode<=Decoded_Not; sampledTosSource <= Tos_Source_Not; when OpCode_Flip => sampledDecodedOpcode<=Decoded_Flip; sampledTosSource <= Tos_Source_Flip; when OpCode_Store => sampledStackOperation <= Stack_DualPop; sampledDecodedOpcode<=Decoded_Store; sampledOpWillFreeze<='1'; when OpCode_PopSP => sampledDecodedOpcode<=Decoded_PopSP; sampledOpWillFreeze<='1'; when OpCode_NA4 => if enable_fmul16 then sampledDecodedOpcode<=Decoded_MultF16; sampledStackOperation<=Stack_Pop; sampledOpWillFreeze<='1'; else sampledDecodedOpcode<=Decoded_Nop; end if; when others => sampledDecodedOpcode<=Decoded_Nop; end case; end if; end if; sampledspOffset <= localspOffset; end process; -- Decode/Fetch unit cache_enable <= not exu_busy; process(decr, jump_address, decode_jump, wb_clk_i, sp_load, sampledDecodedOpcode,sampledOpcode,decode_load_sp, exu_busy, pfu_busy, pcnext, cache_valid, wb_rst_i, sampledStackOperation, sampledspOffset, sampledTosSource, prefr.recompute_sp, sampledOpWillFreeze, dbg_in.flush, dbg_in.inject,dbg_in.injectmode, prefr.valid, prefr.break, cache_stall ) variable w: decoderegs_type; begin w := decr; pcnext <= decr.fetchpc + 1; cache_address(maxAddrBit downto 0) <= std_logic_vector(decr.fetchpc(maxAddrBit downto 0)); if wb_rst_i='1' then w.pc := (others => '0'); w.pcint := (others => '0'); w.valid := '0'; w.fetchpc := (others => '0'); w.im:='0'; w.im_emu:='0'; w.state := State_Run; w.break := '0'; cache_strobe <= DontCareValue; else cache_strobe <= '1'; case decr.state is when State_Run => if pfu_busy='0' then if dbg_in.injectmode='0' and decr.break='0' and cache_stall='0' then w.fetchpc := pcnext; end if; -- Jump request if decode_jump='1' then w.valid := '0'; w.im := '0'; w.break := '0'; -- Invalidate eventual break after branch instruction --rom_wb_cyc_o<='0'; cache_strobe<='0'; --if rom_wb_stall_i='0' then w.fetchpc := jump_address; --else w.state := State_Jump; --end if; else if dbg_in.injectmode='1' then --or decr.break='1' then -- At this point we ought to push a new op into the pipeline. -- Since we're entering inject mode, invalidate next operation, -- but save the current IM flag. w.im_emu := decr.im; w.valid := '0'; --rom_wb_cti_o <= CTI_CYCLE_ENDOFBURST; --rom_wb_cyc_o <='0'; cache_strobe <= '0'; -- Wait until no work is to be done if prefr.valid='0' and decr.valid='0' and exu_busy='0' then w.state := State_Inject; w.im:='0'; end if; if decr.break='0' then w.pc := decr.pcint; end if; else if decr.break='1' then w.valid := '0'; else --if exu_busy='0' then w.valid := cache_valid; --end if; end if; if cache_valid='1' then --if exu_busy='0' then w.im := sampledOpcode(7); --end if; if sampledDecodedOpcode=Decoded_Break then w.break:='1'; end if; end if; if prefr.break='0' and cache_stall='0' then w.pcint := decr.fetchpc; w.pc := decr.pcint; end if; --if cache_stall='0' then if exu_busy='0' then w.opcode := sampledOpcode; end if; --end if; end if; end if; w.opWillFreeze := sampledOpWillFreeze; w.decodedOpcode := sampledDecodedOpcode; w.stackOperation := sampledStackOperation; w.spOffset := sampledspOffset; w.tosSource := sampledTosSource; w.idim := decr.im; end if; when State_Jump => w.valid := '0'; if cache_stall='0' then w.pcint := decr.fetchpc; w.fetchpc := pcnext; w.state := State_Run; end if; when State_InjectJump => w.valid := '0'; w.pcint := decr.fetchpc; w.fetchpc := pcnext; w.state := State_Inject; when State_Inject => -- NOTE: disable ROM --rom_wb_cyc_o <= '0'; if dbg_in.injectmode='0' then w.im := decr.im_emu; w.fetchpc := decr.pcint; w.state := State_Run; w.break := '0'; else -- Handle opcode injection -- TODO: merge this with main decode. -- NOTE: we don't check busy here, it's up to debug unit to do it --if pfu_busy='0' then --w.fetchpc := pcnext; -- Jump request if decode_jump='1' then w.fetchpc := jump_address; w.valid := '0'; w.im := '0'; w.state := State_InjectJump; else w.valid := dbg_in.inject; if dbg_in.inject='1' then w.im := sampledOpcode(7); --w.break := '0'; --w.pcint := decr.fetchpc; w.opcode := sampledOpcode; --w.pc := decr.pcint; end if; end if; w.opWillFreeze := sampledOpWillFreeze; w.decodedOpcode := sampledDecodedOpcode; w.stackOperation := sampledStackOperation; w.spOffset := sampledspOffset; w.tosSource := sampledTosSource; w.idim := decr.im; end if; --end if; end case; end if; -- rst if rising_edge(wb_clk_i) then decr <= w; end if; end process; -- Prefetch/Load unit. sp_load <= exr.tos(spMaxBit downto 2); -- Will be delayed one clock cycle process(wb_clk_i, wb_rst_i, decr, prefr, exu_busy, decode_jump, sp_load, decode_load_sp, dbg_in.flush) variable w: prefetchregs_type; variable i_op_freeze: std_logic; begin w := prefr; pfu_busy<='0'; stack_b_addr <= std_logic_vector(prefr.spnext + 1); w.recompute_sp:='0'; -- Stack w.load := decode_load_sp; if decode_load_sp='1' then pfu_busy <= '1'; w.spnext := sp_load; w.recompute_sp := '1'; else pfu_busy <= exu_busy; if decr.valid='1' then if (exu_busy='0' and decode_jump='0') or prefr.recompute_sp='1' then case decr.stackOperation is when Stack_Push => w.spnext := prefr.spnext - 1; when Stack_Pop => w.spnext := prefr.spnext + 1; when Stack_DualPop => w.spnext := prefr.spnext + 2; when others => end case; w.sp := prefr.spnext; end if; end if; end if; case decr.decodedOpcode is when Decoded_LoadSP | decoded_AddSP => stack_b_addr <= std_logic_vector(prefr.spnext + decr.spOffset); when others => end case; if decode_jump='1' then -- this is a pipeline "invalidate" flag. w.valid := '0'; else if dbg_in.flush='1' then w.valid := '0'; else if exu_busy='0' then w.valid := decr.valid; end if; end if; end if; -- Moved op_will_freeze from decoder to here case decr.decodedOpcode is when Decoded_StoreSP | Decoded_LoadB | Decoded_Neqbranch | Decoded_StoreB | Decoded_Mult | Decoded_Ashiftleft | Decoded_Break --| Decoded_Load | Decoded_LoadH | Decoded_Store | Decoded_StoreH | Decoded_PopSP | Decoded_MultF16 => i_op_freeze := '1'; when others => i_op_freeze := '0'; end case; if exu_busy='0' then w.decodedOpcode := decr.decodedOpcode; w.tosSource := decr.tosSource; w.opcode := decr.opcode; w.opWillFreeze := i_op_freeze; w.pc := decr.pc; w.fetchpc := decr.pcint; w.idim := decr.idim; w.break := decr.break; end if; if wb_rst_i='1' then w.spnext := unsigned(spStart(spMaxBit downto 2)); --w.sp := unsigned(spStart(10 downto 2)); w.valid := '0'; w.idim := '0'; w.recompute_sp:='0'; end if; if rising_edge(wb_clk_i) then prefr <= w; end if; end process; process(prefr,exr,nos) begin trace_pc <= (others => '0'); trace_pc(maxAddrBit downto 0) <= std_logic_vector(prefr.pc); trace_opcode <= prefr.opcode; trace_sp <= (others => '0'); trace_sp(spMaxBit downto 2) <= std_logic_vector(prefr.sp); trace_topOfStack <= std_logic_vector( exr.tos ); trace_topOfStackB <= std_logic_vector( nos ); end process; -- IO/Memory Accesses lsu_address <= std_logic_vector(exr.tos(maxAddrBitIncIO downto 0)); --wb_cyc_o <= exr.wb_cyc; --wb_stb_o <= exr.wb_stb; --wb_we_o <= exr.wb_we; --lsu_data_write <= std_logic_vector( nos ); freeze_all <= dbg_in.freeze; process(exr, wb_inta_i, wb_clk_i, wb_rst_i, pcnext, stack_a_read,stack_b_read, wb_ack_i, wb_dat_i, do_interrupt,exr, prefr, nos, single_step, freeze_all, dbg_in.step, wroteback_q,lshifter_done,lshifter_output, lsu_busy, lsu_data_read ) variable spOffset: unsigned(4 downto 0); variable w: exuregs_type; variable instruction_executed: std_logic; variable wroteback: std_logic; variable datawrite: std_logic_vector(wordSize-1 downto 0); variable sel: std_logic_vector(3 downto 0); begin w := exr; instruction_executed := '0'; -- used for single stepping stack_b_writeenable <= (others => '0'); stack_a_enable <= '1'; stack_b_enable <= '1'; exu_busy <= '0'; decode_jump <= '0'; jump_address <= (others => DontCareValue); lshifter_enable <= '0'; lshifter_amount <= std_logic_vector(exr.tos_save); lshifter_input <= std_logic_vector(exr.nos_save); lshifter_multorshift <= '0'; poppc_inst <= '0'; begin_inst<='0'; stack_a_addr <= std_logic_vector( prefr.sp ); stack_a_writeenable <= (others => '0'); wroteback := wroteback_q; stack_a_write <= std_logic_vector(exr.tos); spOffset(4):=not prefr.opcode(4); spOffset(3 downto 0) := unsigned(prefr.opcode(3 downto 0)); if wb_inta_i='0' then w.inInterrupt := '0'; end if; stack_b_write<=(others => DontCareValue); if wroteback_q='1' then nos <= unsigned(stack_a_read); else nos <= unsigned(stack_b_read); end if; decode_load_sp <= '0'; lsu_req <= '0'; lsu_we <= DontCareValue; lsu_data_sel <= (others => DontCareValue); lsu_data_write <= (others => DontCareValue); case exr.state is when State_ResyncFromStoreStack => exu_busy <= '1'; stack_a_addr <= std_logic_vector(prefr.spnext); stack_a_enable<='1'; w.state := State_Resync2; wroteback := '0'; when State_Resync2 => w.tos := unsigned(stack_a_read); instruction_executed := '1'; exu_busy <= '0'; wroteback := '0'; stack_b_enable <= '1'; w.state := State_Execute; when State_Execute => instruction_executed:='0'; if prefr.valid='1' then exu_busy <= prefr.opWillFreeze; if freeze_all='0' or single_step='1' then wroteback := '0'; w.nos_save := nos; w.tos_save := exr.tos; w.idim := prefr.idim; w.break:= prefr.break; begin_inst<='1'; instruction_executed := '1'; -- TOS big muxer case prefr.tosSource is when Tos_Source_PC => w.tos := (others => '0'); w.tos(maxAddrBit downto 0) := prefr.pc; when Tos_Source_FetchPC => w.tos := (others => '0'); w.tos(maxAddrBit downto 0) := prefr.fetchpc; when Tos_Source_Idim0 => for i in wordSize-1 downto 7 loop w.tos(i) := prefr.opcode(6); end loop; w.tos(6 downto 0) := unsigned(prefr.opcode(6 downto 0)); when Tos_Source_IdimN => w.tos(wordSize-1 downto 7) := exr.tos(wordSize-8 downto 0); w.tos(6 downto 0) := unsigned(prefr.opcode(6 downto 0)); when Tos_Source_StackB => w.tos := nos; when Tos_Source_SP => w.tos := (others => '0'); w.tos(31) := '1'; -- Stack address w.tos(spMaxBit downto 2) := prefr.sp; when Tos_Source_Add => w.tos := exr.tos + nos; when Tos_Source_And => w.tos := exr.tos and nos; when Tos_Source_Or => w.tos := exr.tos or nos; when Tos_Source_Eq => w.tos := (others => '0'); if nos = exr.tos then w.tos(0) := '1'; end if; when Tos_Source_Ulessthan => w.tos := (others => '0'); if exr.tos < nos then w.tos(0) := '1'; end if; when Tos_Source_Lessthan => w.tos := (others => '0'); if signed(exr.tos) < signed(nos) then w.tos(0) := '1'; end if; when Tos_Source_Not => w.tos := not exr.tos; when Tos_Source_Flip => for i in 0 to wordSize-1 loop w.tos(i) := exr.tos(wordSize-1-i); end loop; when Tos_Source_LoadSP => w.tos := unsigned(stack_b_read); when Tos_Source_AddSP => w.tos := w.tos + unsigned(stack_b_read); when Tos_Source_AddStackB => w.tos := w.tos + nos; when Tos_Source_Shift => w.tos := exr.tos + exr.tos; when Tos_Source_LSU => if lsu_busy='0' then w.tos := unsigned(lsu_data_read); end if; when others => end case; case prefr.decodedOpcode is when Decoded_Interrupt => w.inInterrupt := '1'; jump_address <= to_unsigned(32, maxAddrBit+1); decode_jump <= '1'; stack_a_writeenable<=(others =>'1'); wroteback:='1'; stack_b_enable<= '0'; instruction_executed := '0'; w.state := State_WaitSPB; when Decoded_Im0 => stack_a_writeenable<= (others =>'1'); wroteback:='1'; when Decoded_ImN => when Decoded_Nop => when Decoded_PopPC | Decoded_Call => decode_jump <= '1'; jump_address <= exr.tos(maxAddrBit downto 0); poppc_inst <= '1'; stack_b_enable<='0'; -- Delay instruction_executed := '0'; w.state := State_WaitSPB; when Decoded_Emulate => decode_jump <= '1'; jump_address <= (others => '0'); jump_address(9 downto 5) <= unsigned(prefr.opcode(4 downto 0)); stack_a_writeenable<=(others =>'1'); wroteback:='1'; when Decoded_PushSP => stack_a_writeenable<=(others =>'1'); wroteback:='1'; when Decoded_LoadSP => stack_a_writeenable <= (others =>'1'); wroteback:='1'; when Decoded_DupStackB => stack_a_writeenable <= (others => '1'); wroteback:='1'; when Decoded_Dup => stack_a_writeenable<= (others =>'1'); wroteback:='1'; when Decoded_AddSP => stack_a_writeenable <= (others =>'1'); when Decoded_StoreSP => stack_a_writeenable <= (others =>'1'); wroteback:='1'; stack_a_addr <= std_logic_vector(prefr.sp + spOffset); instruction_executed := '0'; w.state := State_WaitSPB; when Decoded_PopDown => stack_a_writeenable<=(others =>'1'); when Decoded_Pop => when Decoded_Ashiftleft => w.state := State_Ashiftleft; when Decoded_Mult => w.state := State_Mult; when Decoded_MultF16 => w.state := State_MultF16; when Decoded_Store | Decoded_StoreB | Decoded_StoreH => if prefr.decodedOpcode=Decoded_Store then datawrite := std_logic_vector(nos); sel := "1111"; elsif prefr.decodedOpcode=Decoded_StoreH then datawrite := (others => DontCareValue); if exr.tos(1)='1' then datawrite(15 downto 0) := std_logic_vector(nos(15 downto 0)) ; sel := "0011"; else datawrite(31 downto 16) := std_logic_vector(nos(15 downto 0)) ; sel := "1100"; end if; else datawrite := (others => DontCareValue); case exr.tos(1 downto 0) is when "11" => datawrite(7 downto 0) := std_logic_vector(nos(7 downto 0)) ; sel := "0001"; when "10" => datawrite(15 downto 8) := std_logic_vector(nos(7 downto 0)) ; sel := "0010"; when "01" => datawrite(23 downto 16) := std_logic_vector(nos(7 downto 0)) ; sel := "0100"; when "00" => datawrite(31 downto 24) := std_logic_vector(nos(7 downto 0)) ; sel := "1000"; when others => end case; end if; stack_a_writeenable <=sel; lsu_data_sel <= sel; if exr.tos(31)='1' then stack_a_addr <= std_logic_vector(exr.tos(spMaxBit downto 2)); stack_a_write <= datawrite; stack_a_writeenable <= sel; w.state := State_ResyncFromStoreStack; else --w.wb_we := '1'; --w.wb_cyc := '1'; --w.wb_stb := '1'; wroteback := wroteback_q; -- Keep WB -- stack_a_enable<='0'; stack_a_enable<=not lsu_busy; stack_a_writeenable <= (others => '0'); -- stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); stack_a_addr <= std_logic_vector(prefr.spnext); stack_b_enable<= not lsu_busy; lsu_data_write <= datawrite; instruction_executed := '0'; exu_busy <= '1'; lsu_req <= '1'; lsu_we <= '1'; if lsu_busy='0' then wroteback := '0'; w.state := State_Resync2; end if; end if; when Decoded_Load | Decoded_Loadb | Decoded_Loadh => --w.tos_save := exr.tos; -- Byte select instruction_executed := '0'; wroteback := wroteback_q; -- Keep WB if exr.tos(wordSize-1)='1' then stack_a_addr<=std_logic_vector(exr.tos(spMaxBit downto 2)); stack_a_enable<='1'; exu_busy <= '1'; w.state := State_LoadStack; else exu_busy <= lsu_busy; lsu_req <= '1'; lsu_we <= '0'; stack_a_enable <= '0'; stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); stack_b_enable <= not lsu_busy; if lsu_busy='0' then if prefr.decodedOpcode=Decoded_Loadb then exu_busy<='1'; w.state:=State_Loadb; elsif prefr.decodedOpcode=Decoded_Loadh then exu_busy<='1'; w.state:=State_Loadh; end if; end if; end if; when Decoded_PopSP => decode_load_sp <= '1'; instruction_executed := '0'; stack_a_addr <= std_logic_vector(exr.tos(spMaxBit downto 2)); w.state := State_Resync2; --when Decoded_Break => -- w.break := '1'; when Decoded_Neqbranch => instruction_executed := '0'; w.state := State_NeqBranch; when others => end case; else -- freeze_all -- -- Freeze the entire pipeline. -- exu_busy<='1'; stack_a_enable<='0'; stack_b_enable<='0'; stack_a_addr <= (others => DontCareValue); stack_a_write <= (others => DontCareValue); end if; end if; -- valid when State_Ashiftleft => exu_busy <= '1'; lshifter_enable <= '1'; w.tos := unsigned(lshifter_output(31 downto 0)); if lshifter_done='1' then exu_busy<='0'; w.state := State_Execute; end if; when State_Mult => exu_busy <= '1'; lshifter_enable <= '1'; lshifter_multorshift <='1'; w.tos := unsigned(lshifter_output(31 downto 0)); if lshifter_done='1' then exu_busy<='0'; w.state := State_Execute; end if; when State_MultF16 => exu_busy <= '1'; lshifter_enable <= '1'; lshifter_multorshift <='1'; w.tos := unsigned(lshifter_output(47 downto 16)); if lshifter_done='1' then exu_busy<='0'; w.state := State_Execute; end if; when State_WaitSPB => instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; when State_Loadb => w.tos(wordSize-1 downto 8) := (others => '0'); case exr.tos_save(1 downto 0) is when "11" => w.tos(7 downto 0) := unsigned(exr.tos(7 downto 0)); when "10" => w.tos(7 downto 0) := unsigned(exr.tos(15 downto 8)); when "01" => w.tos(7 downto 0) := unsigned(exr.tos(23 downto 16)); when "00" => w.tos(7 downto 0) := unsigned(exr.tos(31 downto 24)); when others => null; end case; instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; when State_Loadh => w.tos(wordSize-1 downto 8) := (others => '0'); case exr.tos_save(1) is when '1' => w.tos(15 downto 0) := unsigned(exr.tos(15 downto 0)); when '0' => w.tos(15 downto 0) := unsigned(exr.tos(31 downto 16)); when others => null; end case; instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; when State_LoadStack => w.tos := unsigned(stack_a_read); if prefr.decodedOpcode=Decoded_Loadb then exu_busy<='1'; w.state:=State_Loadb; elsif prefr.decodedOpcode=Decoded_Loadh then exu_busy<='1'; w.state:=State_Loadh; else instruction_executed:='1'; wroteback := '0'; w.state := State_Execute; end if; when State_NeqBranch => if exr.nos_save/=0 then decode_jump <= '1'; jump_address <= exr.tos(maxAddrBit downto 0) + prefr.pc; poppc_inst <= '1'; exu_busy <= '0'; else exu_busy <='1'; end if; instruction_executed := '0'; stack_a_addr <= std_logic_vector(prefr.spnext); wroteback:='0'; w.state := State_Resync2; when others => null; end case; if rising_edge(wb_clk_i) then if wb_rst_i='1' then exr.state <= State_Execute; exr.idim <= DontCareValue; exr.inInterrupt <= '0'; exr.break <= '0'; exr.wb_cyc <= '0'; exr.wb_stb <= '1'; wroteback_q <= '0'; else exr <= w; -- TODO: move wroteback_q into EXU regs wroteback_q <= wroteback; if exr.break='1' then report "BREAK" severity failure; end if; -- Some sanity checks, to be caught in simulation if prefr.valid='1' then if prefr.tosSource=Tos_Source_Idim0 and prefr.idim='1' then report "Invalid IDIM flag 0" severity error; end if; if prefr.tosSource=Tos_Source_IdimN and prefr.idim='0' then report "Invalid IDIM flag 1" severity error; end if; end if; end if; end if; end process; single_step <= dbg_in.step; dbg_out.valid <= '1' when prefr.valid='1' else '0'; -- Let pipeline finish dbg_out.ready <= '1' when exr.state=state_execute and decode_load_sp='0' and decode_jump='0' and decr.state = State_Inject --and jump_q='0' else '0'; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_SID_simple/Libraries/Wishbone_Peripherals/zpuino_vga_ram.vhd
13
4286
-- -- VGA RAM for ZPUINO (and others) -- -- Copyright 2011 Alvaro Lopes <[email protected]> -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.numeric_std.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; library board; use board.zpu_config.all; use board.zpuino_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity zpuino_vga_ram is port ( -- Scan v_clk: in std_logic; v_en: in std_logic; v_addr: in std_logic_vector(14 downto 0); v_data: out std_logic_vector(7 downto 0); -- Memory interface mi_clk: in std_logic; mi_dat_i: in std_logic_vector(7 downto 0); -- Data write mi_we: in std_logic; mi_en: in std_logic; mi_dat_o: out std_logic_vector(7 downto 0); mi_addr: in std_logic_vector(14 downto 0) ); end entity zpuino_vga_ram; -- -- Address 0 to 15: 1st char -- Address 16 to 31: 2st char -- -- architecture behave of zpuino_vga_ram is signal v_ram_0_en, v_ram_1_en: std_logic; signal v_ram_0_data, v_ram_1_data: std_logic_vector(7 downto 0); signal v_addrh_q: std_logic; signal mi_ram_0_en, mi_ram_1_en: std_logic; signal mi_ram_0_dat_o, mi_ram_1_dat_o: std_logic_vector(7 downto 0); signal mi_addrh_q: std_logic; signal nodata: std_logic_vector(7 downto 0) := (others => '0'); begin -- vport enable signals v_ram_0_en <= v_en and not v_addr(14); v_ram_1_en <= v_en and v_addr(14); -- vport address decode process(v_clk) begin if rising_edge(v_clk) then v_addrh_q <= v_ram_1_en; end if; end process; -- vport Output select v_data <= v_ram_0_data when v_addrh_q='0' else v_ram_1_data; -- miport enable signals mi_ram_0_en <= mi_en and not mi_addr(14); mi_ram_1_en <= mi_en and mi_addr(14); -- vport address decode process(mi_clk) begin if rising_edge(mi_clk) then mi_addrh_q <= mi_ram_1_en; end if; end process; -- vport Output select mi_dat_o <= mi_ram_0_dat_o when mi_addrh_q='0' else mi_ram_1_dat_o; ram0: generic_dp_ram generic map ( address_bits => 14, data_bits => 8 ) port map ( clka => v_clk, ena => v_ram_0_en, wea => '0', addra => v_addr(13 downto 0), dia => nodata, doa => v_ram_0_data, clkb => mi_clk, enb => mi_ram_0_en, web => mi_we, addrb => mi_addr(13 downto 0), dib => mi_dat_i, dob => mi_ram_0_dat_o ); ram1: generic_dp_ram generic map ( address_bits => 12, data_bits => 8 ) port map ( clka => v_clk, ena => v_ram_1_en, wea => '0', addra => v_addr(11 downto 0), dia => nodata, doa => v_ram_1_data, clkb => mi_clk, enb => mi_ram_1_en, web => mi_we, addrb => mi_addr(11 downto 0), dib => mi_dat_i, dob => mi_ram_1_dat_o ); end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer/Libraries/Wishbone_Peripherals/zpuino_vga_ram.vhd
13
4286
-- -- VGA RAM for ZPUINO (and others) -- -- Copyright 2011 Alvaro Lopes <[email protected]> -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.numeric_std.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; library board; use board.zpu_config.all; use board.zpuino_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity zpuino_vga_ram is port ( -- Scan v_clk: in std_logic; v_en: in std_logic; v_addr: in std_logic_vector(14 downto 0); v_data: out std_logic_vector(7 downto 0); -- Memory interface mi_clk: in std_logic; mi_dat_i: in std_logic_vector(7 downto 0); -- Data write mi_we: in std_logic; mi_en: in std_logic; mi_dat_o: out std_logic_vector(7 downto 0); mi_addr: in std_logic_vector(14 downto 0) ); end entity zpuino_vga_ram; -- -- Address 0 to 15: 1st char -- Address 16 to 31: 2st char -- -- architecture behave of zpuino_vga_ram is signal v_ram_0_en, v_ram_1_en: std_logic; signal v_ram_0_data, v_ram_1_data: std_logic_vector(7 downto 0); signal v_addrh_q: std_logic; signal mi_ram_0_en, mi_ram_1_en: std_logic; signal mi_ram_0_dat_o, mi_ram_1_dat_o: std_logic_vector(7 downto 0); signal mi_addrh_q: std_logic; signal nodata: std_logic_vector(7 downto 0) := (others => '0'); begin -- vport enable signals v_ram_0_en <= v_en and not v_addr(14); v_ram_1_en <= v_en and v_addr(14); -- vport address decode process(v_clk) begin if rising_edge(v_clk) then v_addrh_q <= v_ram_1_en; end if; end process; -- vport Output select v_data <= v_ram_0_data when v_addrh_q='0' else v_ram_1_data; -- miport enable signals mi_ram_0_en <= mi_en and not mi_addr(14); mi_ram_1_en <= mi_en and mi_addr(14); -- vport address decode process(mi_clk) begin if rising_edge(mi_clk) then mi_addrh_q <= mi_ram_1_en; end if; end process; -- vport Output select mi_dat_o <= mi_ram_0_dat_o when mi_addrh_q='0' else mi_ram_1_dat_o; ram0: generic_dp_ram generic map ( address_bits => 14, data_bits => 8 ) port map ( clka => v_clk, ena => v_ram_0_en, wea => '0', addra => v_addr(13 downto 0), dia => nodata, doa => v_ram_0_data, clkb => mi_clk, enb => mi_ram_0_en, web => mi_we, addrb => mi_addr(13 downto 0), dib => mi_dat_i, dob => mi_ram_0_dat_o ); ram1: generic_dp_ram generic map ( address_bits => 12, data_bits => 8 ) port map ( clka => v_clk, ena => v_ram_1_en, wea => '0', addra => v_addr(11 downto 0), dia => nodata, doa => v_ram_1_data, clkb => mi_clk, enb => mi_ram_1_en, web => mi_we, addrb => mi_addr(11 downto 0), dib => mi_dat_i, dob => mi_ram_1_dat_o ); end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/WING_Analog/Libraries/ZPUino_1/board_Papilio_One_500k/zpuino_config.vhd
13
2502
-- -- Configuration file for ZPUINO -- -- Copyright 2010 Alvaro Lopes <[email protected]> -- -- Version: 1.0 -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; package zpuino_config is -- General ZPUino configuration type zpu_core_type is ( small, large ); -- ZPUino large is buggy, don't use it. constant zpuinocore: zpu_core_type := small; -- Set iobusyinput to 'true' to allow registered input to IO core. This also allows for IO -- to become busy without needing to register its inputs. However, an extra clock-cycle is -- required to access IO if this is used. constant zpuino_iobusyinput: boolean := true; -- For SPI blocking operation, you need to define also iobusyinput constant zpuino_spiblocking: boolean := true; -- Number of GPIO to map (number of FPGA pins) constant zpuino_gpio_count: integer := 49; -- Peripheral Pin Select constant zpuino_pps_enabled: boolean := false; -- Internal SPI ADC constant zpuino_adc_enabled: boolean := false; constant zpuino_number_io_select_bits: integer := 4; end package zpuino_config;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/Libraries/ZPUino_1/board_Papilio_One_500k/zpuino_config.vhd
13
2502
-- -- Configuration file for ZPUINO -- -- Copyright 2010 Alvaro Lopes <[email protected]> -- -- Version: 1.0 -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; package zpuino_config is -- General ZPUino configuration type zpu_core_type is ( small, large ); -- ZPUino large is buggy, don't use it. constant zpuinocore: zpu_core_type := small; -- Set iobusyinput to 'true' to allow registered input to IO core. This also allows for IO -- to become busy without needing to register its inputs. However, an extra clock-cycle is -- required to access IO if this is used. constant zpuino_iobusyinput: boolean := true; -- For SPI blocking operation, you need to define also iobusyinput constant zpuino_spiblocking: boolean := true; -- Number of GPIO to map (number of FPGA pins) constant zpuino_gpio_count: integer := 49; -- Peripheral Pin Select constant zpuino_pps_enabled: boolean := false; -- Internal SPI ADC constant zpuino_adc_enabled: boolean := false; constant zpuino_number_io_select_bits: integer := 4; end package zpuino_config;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Template_Wishbone_Example/Libraries/Wishbone_Peripherals/VIDEO_zpuino_wb_vga_hqvga.vhd
13
10522
-- -- VGA interface for ZPUINO (and others) -- -- Copyright 2011 Alvaro Lopes <[email protected]> -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.numeric_std.all; use ieee.std_logic_unsigned.all; library board; use board.zpu_config.all; use board.zpuino_config.all; use board.zpupkg.all; use board.zpuinopkg.all; library UNISIM; use UNISIM.vcomponents.all; entity VIDEO_zpuino_wb_vga_hqvga is generic( vgaclk_divider: integer := 1 ); port ( wishbone_in : in std_logic_vector(61 downto 0); wishbone_out : out std_logic_vector(33 downto 0); -- VGA interface clk_50Mhz: in std_logic; vga_hsync: out std_logic; vga_vsync: out std_logic; vga_r2: out std_logic; vga_r1: out std_logic; vga_r0: out std_logic; vga_g2: out std_logic; vga_g1: out std_logic; vga_g0: out std_logic; vga_b1: out std_logic; vga_b0: out std_logic -- vga_r: out std_logic_vector(2 downto 0); -- vga_g: out std_logic_vector(2 downto 0); -- vga_b: out std_logic_vector(1 downto 0) ); end entity VIDEO_zpuino_wb_vga_hqvga; architecture behave of VIDEO_zpuino_wb_vga_hqvga is -- Clock is 50 MHz Hor Vert -- Disp FP Sync BP Disp FP Sync BP -- 800x600, 72Hz 50.000 800 56 120 64 600 37 6 23 constant VGA_H_SYNC: integer := 120; constant VGA_H_FRONTPORCH: integer := 56; constant VGA_H_DISPLAY: integer := 800; constant VGA_H_BACKPORCH: integer := 64; constant VGA_V_FRONTPORCH: integer := 37; constant VGA_V_SYNC: integer := 6; constant VGA_V_DISPLAY: integer := 600; constant VGA_V_BACKPORCH: integer := 23; constant VGA_HCOUNT: integer := VGA_H_SYNC + VGA_H_FRONTPORCH + VGA_H_DISPLAY + VGA_H_BACKPORCH; constant VGA_VCOUNT: integer := VGA_V_SYNC + VGA_V_FRONTPORCH + VGA_V_DISPLAY + VGA_V_BACKPORCH; constant v_polarity: std_logic := '0'; constant h_polarity: std_logic := '0'; -- Pixel counters signal hcount_q: integer range 0 to VGA_HCOUNT; signal vcount_q: integer range 0 to VGA_VCOUNT; signal h_sync_tick: std_logic; signal vgarst: std_logic := '0'; component zpuino_vga_ram is port ( -- Scan v_clk: in std_logic; v_en: in std_logic; v_addr: in std_logic_vector(14 downto 0); v_data: out std_logic_vector(7 downto 0); -- Memory interface mi_clk: in std_logic; mi_dat_i: in std_logic_vector(7 downto 0); -- Data write mi_we: in std_logic; mi_en: in std_logic; mi_dat_o: out std_logic_vector(7 downto 0); -- 9 bits mi_addr: in std_logic_vector(14 downto 0) ); end component zpuino_vga_ram; signal rstq1,rstq2: std_logic; signal vga_ram_address: unsigned(14 downto 0); signal vga_ram_data: std_logic_vector(7 downto 0); signal v_display: std_logic; signal ram_read: std_logic_vector(7 downto 0); signal ram_we: std_logic; signal vga_v_offset: unsigned(14 downto 0); signal hoff: unsigned(2 downto 0); -- will count from 0 to 4 signal voff: unsigned(2 downto 0); -- will count from 0 to 4 signal hdisp: unsigned(13 downto 2); signal read_ended: std_logic; signal wb_clk_i: std_logic; -- Wishbone clock signal wb_rst_i: std_logic; -- Wishbone reset (synchronous) signal wb_dat_i: std_logic_vector(31 downto 0); -- Wishbone data input (32 bits) signal wb_adr_i: std_logic_vector(26 downto 2); -- Wishbone address input (32 bits) signal wb_we_i: std_logic; -- Wishbone write enable signal signal wb_cyc_i: std_logic; -- Wishbone cycle signal signal wb_stb_i: std_logic; -- Wishbone strobe signal signal wb_dat_o: std_logic_vector(31 downto 0); -- Wishbone data output (32 bits) signal wb_ack_o: std_logic; -- Wishbone acknowledge out signal signal wb_inta_o: std_logic; signal vga_r: std_logic_vector(2 downto 0); signal vga_g: std_logic_vector(2 downto 0); signal vga_b: std_logic_vector(1 downto 0); begin -- Unpack the wishbone array into signals so the modules code is not confusing. wb_clk_i <= wishbone_in(61); wb_rst_i <= wishbone_in(60); wb_dat_i <= wishbone_in(59 downto 28); wb_adr_i <= wishbone_in(27 downto 3); wb_we_i <= wishbone_in(2); wb_cyc_i <= wishbone_in(1); wb_stb_i <= wishbone_in(0); wishbone_out(33 downto 2) <= wb_dat_o; wishbone_out(1) <= wb_ack_o; wishbone_out(0) <= wb_inta_o; -- Finish unpacking Wishbone signals. -- vga_r: out std_logic_vector(2 downto 0); -- vga_g: out std_logic_vector(2 downto 0); -- vga_b: out std_logic_vector(1 downto 0) vga_r2 <= vga_r(2); vga_r1 <= vga_r(1); vga_r0 <= vga_r(0); vga_g2 <= vga_g(2); vga_g1 <= vga_g(1); vga_g0 <= vga_g(0); vga_b1 <= vga_b(1); vga_b0 <= vga_b(0); wb_inta_o <= '0'; process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then read_ended<='0'; else read_ended<=wb_stb_i and wb_cyc_i and not wb_we_i; end if; end if; end process; wb_ack_o <= wb_stb_i and wb_cyc_i and (read_ended or wb_we_i); -- Read muxer process(wb_adr_i,ram_read) begin wb_dat_o <= (others => '0'); wb_dat_o(7 downto 0) <= ram_read; end process; process(wb_we_i,wb_cyc_i,wb_stb_i,wb_adr_i) begin ram_we <= wb_we_i and wb_cyc_i and wb_stb_i; end process; -- VGA reset generator. process(clk_50Mhz, wb_rst_i) begin if wb_rst_i='1' then rstq1 <= '1'; rstq2 <= '1'; elsif rising_edge(clk_50Mhz) then rstq1 <= rstq2; rstq2 <= '0'; end if; end process; vgarst <= rstq1; -- Compute the VGA RAM offset we need to use to fetch the character. vga_ram_address <= hdisp + vga_v_offset; ram:zpuino_vga_ram port map ( v_clk => clk_50Mhz, v_en => '1', v_addr => std_logic_vector(vga_ram_address), v_data => vga_ram_data, -- Memory interface mi_clk => wb_clk_i, mi_dat_i => wb_dat_i(7 downto 0), mi_we => ram_we, mi_en => '1', mi_dat_o => ram_read, mi_addr => wb_adr_i(16 downto 2) ); -- Horizontal counter hcounter: process(clk_50Mhz) begin if rising_edge(clk_50Mhz) then if vgarst='1' then hcount_q <= VGA_H_DISPLAY + VGA_H_BACKPORCH - 1; else if hcount_q = VGA_HCOUNT then hcount_q <= 0; hoff <= (others =>'0'); hdisp <= (others => '0'); else hcount_q <= hcount_q + 1; if hoff="100" then hoff <= (others => '0'); hdisp <= hdisp + 1; else hoff <= hoff + 1; end if; end if; end if; end if; end process; process(clk_50Mhz) begin if rising_edge(clk_50Mhz) then if hcount_q < VGA_H_DISPLAY and vcount_q < VGA_V_DISPLAY then v_display<='1'; else v_display<='0'; end if; end if; end process; hsyncgen: process(clk_50Mhz) begin if rising_edge(clk_50Mhz) then if vgarst='1' then vga_hsync<=h_polarity; else h_sync_tick <= '0'; if hcount_q = (VGA_H_DISPLAY + VGA_H_BACKPORCH) then h_sync_tick <= '1'; vga_hsync <= not h_polarity; elsif hcount_q = (VGA_HCOUNT - VGA_H_FRONTPORCH) then vga_hsync <= h_polarity; end if; end if; end if; end process; vcounter: process(clk_50Mhz) begin if rising_edge(clk_50Mhz) then if vgarst='1' then vcount_q <= VGA_V_DISPLAY + VGA_V_BACKPORCH - 1; vga_v_offset <= (others => '0'); -- Reset VGA vertical offset voff<=(others => '0'); else if vcount_q = VGA_VCOUNT then vcount_q <= 0; voff <= (others => '0'); vga_v_offset <= (others => '0'); -- Reset VGA vertical offset report "V finished" severity note; else if h_sync_tick='1' then vcount_q <= vcount_q + 1; if voff="100" then voff <= (others => '0'); vga_v_offset <= vga_v_offset + 160; else voff <= voff + 1; end if; end if; end if; end if; end if; end process; vsyncgen: process(clk_50Mhz) begin if rising_edge(clk_50Mhz) then if vgarst='1' then vga_vsync<=v_polarity; else if vcount_q = (VGA_V_DISPLAY + VGA_V_BACKPORCH) then vga_vsync <= not v_polarity; elsif vcount_q = (VGA_VCOUNT - VGA_V_FRONTPORCH) then vga_vsync <= v_polarity; end if; end if; end if; end process; -- Synchronous output process(clk_50Mhz) begin if rising_edge(clk_50Mhz) then if v_display='0' then vga_b <= (others =>'0'); vga_r <= (others =>'0'); vga_g <= (others =>'0'); else vga_r <= vga_ram_data(7 downto 5); vga_g <= vga_ram_data(4 downto 2); vga_b <= vga_ram_data(1 downto 0); end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_RetroCade_Synth/Libraries/Benchy/stage.vhd
13
6197
---------------------------------------------------------------------------------- -- stage.vhd -- -- Copyright (C) 2006 Michael Poppitz -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- -- This program is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA -- ---------------------------------------------------------------------------------- -- -- Details: http://www.sump.org/projects/analyzer/ -- -- Programmable 32 channel trigger stage. It can operate in serial -- and parallel mode. In serial mode any of the la_input channels -- can be used as la_input for the 32bit shift register. Comparison -- is done using the value and mask registers on the la_input in -- parallel mode and on the shift register in serial mode. -- If armed and 'level' has reached the configured minimum value, -- the stage will start to check for a match. -- The match and run output signal delay can be configured. -- The stage will disarm itself after a match occured or when reset is set. -- -- The stage supports "high speed demux" operation in serial and parallel -- mode. (Lower and upper 16 channels contain a 16bit sample each.) -- -- Matching is done using a pipeline. This should not increase the minimum -- time needed between two dependend trigger stage matches, because the -- dependence is evaluated in the last pipeline step. -- It does however increase the delay for the capturing process, but this -- can easily be compensated by software. -- (By adjusting the before/after ratio.) -- -- Changes: Synchronous reset. ---------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity stage is port( la_input : in std_logic_vector (31 downto 0); la_inputReady : in std_logic; data : in std_logic_vector (31 downto 0); clock : in std_logic; reset : in std_logic; wrMask : in std_logic; wrValue : in std_logic; wrConfig : in std_logic; arm : in std_logic; level : in std_logic_vector (1 downto 0); demuxed : in std_logic; run : out std_logic; match : out std_logic ); end stage; architecture behavioral of stage is type STATES is (OFF, ARMED, MATCHED); signal maskRegister, valueRegister : std_logic_vector (31 downto 0); signal intermediateRegister, shiftRegister : std_logic_vector (31 downto 0); signal testValue: std_logic_vector (31 downto 0); signal cfgStart, cfgSerial : std_logic; signal cfgChannel : std_logic_vector(4 downto 0); signal cfgLevel : std_logic_vector(1 downto 0); signal counter, cfgDelay : std_logic_vector(15 downto 0); signal matchL16, matchH16, match32Register : std_logic; signal state : STATES; signal serialChannelL16, serialChannelH16 : std_logic; begin -- use shift register or la_input depending on configuration testValue <= shiftRegister when cfgSerial = '1' else la_input; -- apply mask and value and create a additional pipeline step process(clock) begin if rising_edge(clock) then intermediateRegister <= (testValue xor valueRegister) and maskRegister; end if; end process; -- match upper and lower word separately matchL16 <= '1' when intermediateRegister(15 downto 0) = "0000000000000000" else '0'; matchH16 <= '1' when intermediateRegister(31 downto 16) = "0000000000000000" else '0'; -- in demux mode only one half must match, in normal mode both words must match process(clock) begin if rising_edge(clock) then if demuxed = '1' then match32Register <= matchL16 or matchH16; else match32Register <= matchL16 and matchH16; end if; end if; end process; -- select serial channel based on cfgChannel process(la_input, cfgChannel) begin for i in 0 to 15 loop if conv_integer(cfgChannel(3 downto 0)) = i then serialChannelL16 <= la_input(i); serialChannelH16 <= la_input(i + 16); end if; end loop; end process; -- shift in bit from selected channel whenever la_input is ready process(clock) begin if rising_edge(clock) then if la_inputReady = '1' then if demuxed = '1' then -- in demux mode two bits come in per sample shiftRegister <= shiftRegister(29 downto 0) & serialChannelH16 & serialChannelL16; elsif cfgChannel(4) = '1' then shiftRegister <= shiftRegister(30 downto 0) & serialChannelH16; else shiftRegister <= shiftRegister(30 downto 0) & serialChannelL16; end if; end if; end if; end process; -- trigger state machine process(clock, reset) begin if rising_edge(clock) then if reset = '1' then state <= OFF; else run <= '0'; match <= '0'; case state is when OFF => if arm = '1' then state <= ARMED; end if; when ARMED => if match32Register = '1' and level >= cfgLevel then counter <= cfgDelay; state <= MATCHED; end if; when MATCHED => if la_inputReady = '1' then if counter = "0000000000000000" then run <= cfgStart; match <= not cfgStart; state <= OFF; else counter <= counter - 1; end if; end if; end case; end if; end if; end process; -- handle mask, value & config register write requests process(clock) begin if rising_edge(clock) then if wrMask = '1' then maskRegister <= data; end if; if wrValue = '1' then valueRegister <= data; end if; if wrConfig = '1' then cfgStart <= data(27); cfgSerial <= data(26); cfgChannel <= data(24 downto 20); cfgLevel <= data(17 downto 16); cfgDelay <= data(15 downto 0); end if; end if; end process; end behavioral;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/Libraries/ZPUino_1/LogicStart_MegaWing_Pinout.vhd
13
11130
-------------------------------------------------------------------------------- -- Copyright (c) 1995-2012 Xilinx, Inc. All rights reserved. -------------------------------------------------------------------------------- -- ____ ____ -- / /\/ / -- /___/ \ / Vendor: Xilinx -- \ \ \/ Version : 14.3 -- \ \ Application : -- / / Filename : xil_10080_19 -- /___/ /\ Timestamp : 02/08/2013 16:21:11 -- \ \ / \ -- \___\/\___\ -- --Command: --Design Name: -- library ieee; use ieee.std_logic_1164.ALL; use ieee.numeric_std.ALL; library UNISIM; use UNISIM.Vcomponents.ALL; library board; use board.zpupkg.all; use board.zpuinopkg.all; use board.zpuino_config.all; use board.zpu_config.all; library zpuino; use zpuino.pad.all; use zpuino.papilio_pkg.all; entity LogicStart_MegaWing_Pinout is port ( Audio : in std_logic; Seg7_dot : in std_logic; Seg7_enable : in std_logic_vector (3 downto 0); Seg7_segdata : in std_logic_vector (6 downto 0); -- VGA_Red : in std_logic_vector (2 downto 0); -- VGA_Green : in std_logic_vector (2 downto 0); -- VGA_Blue : in std_logic_vector (1 downto 0); VGA_Red2 : in std_logic; VGA_Red1 : in std_logic; VGA_Red0 : in std_logic; VGA_Green2 : in std_logic; VGA_Green1 : in std_logic; VGA_Green0 : in std_logic; VGA_Blue1 : in std_logic; VGA_Blue0 : in std_logic; VGA_Hsync : in std_logic; VGA_Vsync : in std_logic; SPI_CLK : in std_logic; SPI_MOSI : in std_logic; SPI_MISO : out std_logic; SPI_CS : in std_logic; gpio_bus_in : out std_logic_vector(97 downto 0); gpio_bus_out : in std_logic_vector(147 downto 0); WING_AH0 : inout std_logic; WING_AH1 : inout std_logic; WING_AH2 : inout std_logic; WING_AH3 : inout std_logic; WING_AH4 : inout std_logic; WING_AH5 : inout std_logic; WING_AH6 : inout std_logic; WING_AH7 : inout std_logic; WING_AL0 : inout std_logic; WING_AL1 : inout std_logic; WING_AL2 : inout std_logic; WING_AL3 : inout std_logic; WING_AL4 : inout std_logic; WING_AL5 : inout std_logic; WING_AL6 : inout std_logic; WING_AL7 : inout std_logic; WING_BH0 : inout std_logic; WING_BH1 : inout std_logic; WING_BH2 : inout std_logic; WING_BH3 : inout std_logic; WING_BH4 : inout std_logic; WING_BH5 : inout std_logic; WING_BH6 : inout std_logic; WING_BH7 : inout std_logic; WING_BL0 : inout std_logic; WING_BL1 : inout std_logic; WING_BL2 : inout std_logic; WING_BL3 : inout std_logic; WING_BL4 : inout std_logic; WING_BL5 : inout std_logic; WING_BL6 : inout std_logic; WING_BL7 : inout std_logic; WING_CH0 : inout std_logic; WING_CH1 : inout std_logic; WING_CH2 : inout std_logic; WING_CH3 : inout std_logic; WING_CH4 : inout std_logic; WING_CH5 : inout std_logic; WING_CH6 : inout std_logic; WING_CH7 : inout std_logic; WING_CL0 : inout std_logic; WING_CL1 : inout std_logic; WING_CL2 : inout std_logic; WING_CL3 : inout std_logic; WING_CL4 : inout std_logic; WING_CL5 : inout std_logic; WING_CL6 : inout std_logic; WING_CL7 : inout std_logic ); end LogicStart_MegaWing_Pinout; architecture BEHAVIORAL of LogicStart_MegaWing_Pinout is -- signal gpio_o: std_logic_vector(zpuino_gpio_count-1 downto 0); -- signal gpio_t: std_logic_vector(zpuino_gpio_count-1 downto 0); -- signal gpio_i: std_logic_vector(zpuino_gpio_count-1 downto 0); -- -- -- SPP signal is one more than GPIO count -- signal gpio_spp_data: std_logic_vector(zpuino_gpio_count-1 downto 0); -- signal gpio_spp_read: std_logic_vector(zpuino_gpio_count-1 downto 0); -- -- constant spp_cap_in: std_logic_vector(zpuino_gpio_count-1 downto 0) := -- "0" & -- "1111111111111111" & -- "1111111111111111" & -- "1111111111111111"; -- constant spp_cap_out: std_logic_vector(zpuino_gpio_count-1 downto 0) := -- "0" & -- "1111111111111111" & -- "1111111111111111" & -- "1111111111111111"; signal gpio_o: std_logic_vector(48 downto 0); signal gpio_t: std_logic_vector(48 downto 0); signal gpio_i: std_logic_vector(48 downto 0); signal gpio_spp_data: std_logic_vector(48 downto 0); signal gpio_spp_read: std_logic_vector(48 downto 0); signal gpio_clk: std_logic; begin --gpio_bus_in(97 downto 49) <= gpio_spp_data; --gpio_bus_in(48 downto 0) <= gpio_i; gpio_clk <= gpio_bus_out(147); gpio_o <= gpio_bus_out(146 downto 98); gpio_t <= gpio_bus_out(97 downto 49); gpio_spp_read <= gpio_bus_out(48 downto 0); WING_BH2 <= Audio; --7 Segment WING_AL0 <= Seg7_enable(3); WING_AL1 <= Seg7_dot; WING_AL2 <= Seg7_enable(2); WING_AL3 <= Seg7_segdata(4); WING_AL4 <= Seg7_segdata(5); WING_AL5 <= Seg7_segdata(2); WING_AL6 <= Seg7_segdata(3); WING_AL7 <= Seg7_segdata(0); WING_AH0 <= Seg7_enable(1); WING_AH1 <= Seg7_segdata(6); WING_AH2 <= Seg7_segdata(1); WING_AH3 <= Seg7_enable(0); --VGA WING_BL0 <= VGA_Vsync; WING_BL1 <= VGA_Hsync; WING_BL2 <= VGA_Blue0; WING_BL3 <= VGA_Blue1; WING_BL4 <= VGA_Green0; WING_BL5 <= VGA_Green1; WING_BL6 <= VGA_Green2; WING_BL7 <= VGA_Red0; WING_BH0 <= VGA_Red1; WING_BH1 <= VGA_Red2; --SPI ADC WING_AH7 <= SPI_CLK; WING_AH6 <= SPI_MOSI; SPI_MISO <= WING_AH5; --WING_AH4 <= SPI_CS; -- pin00: IOPAD port map(I => gpio_o(0), O => gpio_i(0), T => gpio_t(0), C => gpio_clk,PAD => WING_AL0 ); -- pin01: IOPAD port map(I => gpio_o(1), O => gpio_i(1), T => gpio_t(1), C => gpio_clk,PAD => WING_AL1 ); -- pin02: IOPAD port map(I => gpio_o(2), O => gpio_i(2), T => gpio_t(2), C => gpio_clk,PAD => WING_AL2 ); -- pin03: IOPAD port map(I => gpio_o(3), O => gpio_i(3), T => gpio_t(3), C => gpio_clk,PAD => WING_AL3 ); -- pin04: IOPAD port map(I => gpio_o(4), O => gpio_i(4), T => gpio_t(4), C => gpio_clk,PAD => WING_AL4 ); -- pin05: IOPAD port map(I => gpio_o(5), O => gpio_i(5), T => gpio_t(5), C => gpio_clk,PAD => WING_AL5 ); -- pin06: IOPAD port map(I => gpio_o(6), O => gpio_i(6), T => gpio_t(6), C => gpio_clk,PAD => WING_AL6 ); -- pin07: IOPAD port map(I => gpio_o(7), O => gpio_i(7), T => gpio_t(7), C => gpio_clk,PAD => WING_AL7 ); -- pin08: IOPAD port map(I => gpio_o(8), O => gpio_i(8), T => gpio_t(8), C => gpio_clk,PAD => WING_AH0 ); -- pin09: IOPAD port map(I => gpio_o(9), O => gpio_i(9), T => gpio_t(9), C => gpio_clk,PAD => WING_AH1 ); -- pin10: IOPAD port map(I => gpio_o(10),O => gpio_i(10),T => gpio_t(10),C => gpio_clk,PAD => WING_AH2 ); -- pin11: IOPAD port map(I => gpio_o(11),O => gpio_i(11),T => gpio_t(11),C => gpio_clk,PAD => WING_AH3 ); pin12: IOPAD port map(I => gpio_o(12),O => gpio_i(12),T => gpio_t(12),C => gpio_clk,PAD => WING_AH4 ); -- pin13: IOPAD port map(I => gpio_o(13),O => gpio_i(13),T => gpio_t(13),C => gpio_clk,PAD => WING_AH5 ); -- pin14: IOPAD port map(I => gpio_o(14),O => gpio_i(14),T => gpio_t(14),C => gpio_clk,PAD => WING_AH6 ); -- pin15: IOPAD port map(I => gpio_o(15),O => gpio_i(15),T => gpio_t(15),C => gpio_clk,PAD => WING_AH7 ); -- pin16: IOPAD port map(I => gpio_o(16),O => gpio_i(16),T => gpio_t(16),C => gpio_clk,PAD => WING_BL0 ); -- pin17: IOPAD port map(I => gpio_o(17),O => gpio_i(17),T => gpio_t(17),C => gpio_clk,PAD => WING_BL1 ); -- pin18: IOPAD port map(I => gpio_o(18),O => gpio_i(18),T => gpio_t(18),C => gpio_clk,PAD => WING_BL2 ); -- pin19: IOPAD port map(I => gpio_o(19),O => gpio_i(19),T => gpio_t(19),C => gpio_clk,PAD => WING_BL3 ); -- pin20: IOPAD port map(I => gpio_o(20),O => gpio_i(20),T => gpio_t(20),C => gpio_clk,PAD => WING_BL4 ); -- pin21: IOPAD port map(I => gpio_o(21),O => gpio_i(21),T => gpio_t(21),C => gpio_clk,PAD => WING_BL5 ); -- pin22: IOPAD port map(I => gpio_o(22),O => gpio_i(22),T => gpio_t(22),C => gpio_clk,PAD => WING_BL6 ); -- pin23: IOPAD port map(I => gpio_o(23),O => gpio_i(23),T => gpio_t(23),C => gpio_clk,PAD => WING_BL7 ); -- pin24: IOPAD port map(I => gpio_o(24),O => gpio_i(24),T => gpio_t(24),C => gpio_clk,PAD => WING_BH0 ); -- pin25: IOPAD port map(I => gpio_o(25),O => gpio_i(25),T => gpio_t(25),C => gpio_clk,PAD => WING_BH1 ); -- pin26: IOPAD port map(I => gpio_o(26),O => gpio_i(26),T => gpio_t(26),C => gpio_clk,PAD => WING_BH2 ); pin27: IOPAD port map(I => gpio_o(27),O => gpio_bus_in(27),T => gpio_t(27),C => gpio_clk,PAD => WING_BH3 ); pin28: IOPAD port map(I => gpio_o(28),O => gpio_bus_in(28),T => gpio_t(28),C => gpio_clk,PAD => WING_BH4 ); pin29: IOPAD port map(I => gpio_o(29),O => gpio_bus_in(29),T => gpio_t(29),C => gpio_clk,PAD => WING_BH5 ); pin30: IOPAD port map(I => gpio_o(30),O => gpio_bus_in(30),T => gpio_t(30),C => gpio_clk,PAD => WING_BH6 ); pin31: IOPAD port map(I => gpio_o(31),O => gpio_bus_in(31),T => gpio_t(31),C => gpio_clk,PAD => WING_BH7 ); pin32: IOPAD port map(I => gpio_o(32),O => gpio_bus_in(32),T => gpio_t(32),C => gpio_clk,PAD => WING_CL0 ); pin33: IOPAD port map(I => gpio_o(33),O => gpio_bus_in(33),T => gpio_t(33),C => gpio_clk,PAD => WING_CL1 ); pin34: IOPAD port map(I => gpio_o(34),O => gpio_bus_in(34),T => gpio_t(34),C => gpio_clk,PAD => WING_CL2 ); pin35: IOPAD port map(I => gpio_o(35),O => gpio_bus_in(35),T => gpio_t(35),C => gpio_clk,PAD => WING_CL3 ); pin36: IOPAD port map(I => gpio_o(36),O => gpio_bus_in(36),T => gpio_t(36),C => gpio_clk,PAD => WING_CL4 ); pin37: IOPAD port map(I => gpio_o(37),O => gpio_bus_in(37),T => gpio_t(37),C => gpio_clk,PAD => WING_CL5 ); pin38: IOPAD port map(I => gpio_o(38),O => gpio_bus_in(38),T => gpio_t(38),C => gpio_clk,PAD => WING_CL6 ); pin39: IOPAD port map(I => gpio_o(39),O => gpio_bus_in(39),T => gpio_t(39),C => gpio_clk,PAD => WING_CL7 ); pin40: IOPAD port map(I => gpio_o(40),O => gpio_bus_in(40),T => gpio_t(40),C => gpio_clk,PAD => WING_CH0 ); pin41: IOPAD port map(I => gpio_o(41),O => gpio_bus_in(41),T => gpio_t(41),C => gpio_clk,PAD => WING_CH1 ); pin42: IOPAD port map(I => gpio_o(42),O => gpio_bus_in(42),T => gpio_t(42),C => gpio_clk,PAD => WING_CH2 ); pin43: IOPAD port map(I => gpio_o(43),O => gpio_bus_in(43),T => gpio_t(43),C => gpio_clk,PAD => WING_CH3 ); pin44: IOPAD port map(I => gpio_o(44),O => gpio_bus_in(44),T => gpio_t(44),C => gpio_clk,PAD => WING_CH4 ); pin45: IOPAD port map(I => gpio_o(45),O => gpio_bus_in(45),T => gpio_t(45),C => gpio_clk,PAD => WING_CH5 ); pin46: IOPAD port map(I => gpio_o(46),O => gpio_bus_in(46),T => gpio_t(46),C => gpio_clk,PAD => WING_CH6 ); pin47: IOPAD port map(I => gpio_o(47),O => gpio_bus_in(47),T => gpio_t(47),C => gpio_clk,PAD => WING_CH7 ); -- ospics: OPAD port map ( I => gpio_o(48), PAD => SPI_CS ); process(gpio_spp_read) -- sigmadelta_spp_data, -- timers_pwm, -- spi2_mosi,spi2_sck) begin -- gpio_spp_data <= (others => DontCareValue); gpio_bus_in(97 downto 49) <= (others => DontCareValue); end process; end BEHAVIORAL;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/WING_Analog/Libraries/ZPUino_1/LogicStart_MegaWing_Pinout.vhd
13
11130
-------------------------------------------------------------------------------- -- Copyright (c) 1995-2012 Xilinx, Inc. All rights reserved. -------------------------------------------------------------------------------- -- ____ ____ -- / /\/ / -- /___/ \ / Vendor: Xilinx -- \ \ \/ Version : 14.3 -- \ \ Application : -- / / Filename : xil_10080_19 -- /___/ /\ Timestamp : 02/08/2013 16:21:11 -- \ \ / \ -- \___\/\___\ -- --Command: --Design Name: -- library ieee; use ieee.std_logic_1164.ALL; use ieee.numeric_std.ALL; library UNISIM; use UNISIM.Vcomponents.ALL; library board; use board.zpupkg.all; use board.zpuinopkg.all; use board.zpuino_config.all; use board.zpu_config.all; library zpuino; use zpuino.pad.all; use zpuino.papilio_pkg.all; entity LogicStart_MegaWing_Pinout is port ( Audio : in std_logic; Seg7_dot : in std_logic; Seg7_enable : in std_logic_vector (3 downto 0); Seg7_segdata : in std_logic_vector (6 downto 0); -- VGA_Red : in std_logic_vector (2 downto 0); -- VGA_Green : in std_logic_vector (2 downto 0); -- VGA_Blue : in std_logic_vector (1 downto 0); VGA_Red2 : in std_logic; VGA_Red1 : in std_logic; VGA_Red0 : in std_logic; VGA_Green2 : in std_logic; VGA_Green1 : in std_logic; VGA_Green0 : in std_logic; VGA_Blue1 : in std_logic; VGA_Blue0 : in std_logic; VGA_Hsync : in std_logic; VGA_Vsync : in std_logic; SPI_CLK : in std_logic; SPI_MOSI : in std_logic; SPI_MISO : out std_logic; SPI_CS : in std_logic; gpio_bus_in : out std_logic_vector(97 downto 0); gpio_bus_out : in std_logic_vector(147 downto 0); WING_AH0 : inout std_logic; WING_AH1 : inout std_logic; WING_AH2 : inout std_logic; WING_AH3 : inout std_logic; WING_AH4 : inout std_logic; WING_AH5 : inout std_logic; WING_AH6 : inout std_logic; WING_AH7 : inout std_logic; WING_AL0 : inout std_logic; WING_AL1 : inout std_logic; WING_AL2 : inout std_logic; WING_AL3 : inout std_logic; WING_AL4 : inout std_logic; WING_AL5 : inout std_logic; WING_AL6 : inout std_logic; WING_AL7 : inout std_logic; WING_BH0 : inout std_logic; WING_BH1 : inout std_logic; WING_BH2 : inout std_logic; WING_BH3 : inout std_logic; WING_BH4 : inout std_logic; WING_BH5 : inout std_logic; WING_BH6 : inout std_logic; WING_BH7 : inout std_logic; WING_BL0 : inout std_logic; WING_BL1 : inout std_logic; WING_BL2 : inout std_logic; WING_BL3 : inout std_logic; WING_BL4 : inout std_logic; WING_BL5 : inout std_logic; WING_BL6 : inout std_logic; WING_BL7 : inout std_logic; WING_CH0 : inout std_logic; WING_CH1 : inout std_logic; WING_CH2 : inout std_logic; WING_CH3 : inout std_logic; WING_CH4 : inout std_logic; WING_CH5 : inout std_logic; WING_CH6 : inout std_logic; WING_CH7 : inout std_logic; WING_CL0 : inout std_logic; WING_CL1 : inout std_logic; WING_CL2 : inout std_logic; WING_CL3 : inout std_logic; WING_CL4 : inout std_logic; WING_CL5 : inout std_logic; WING_CL6 : inout std_logic; WING_CL7 : inout std_logic ); end LogicStart_MegaWing_Pinout; architecture BEHAVIORAL of LogicStart_MegaWing_Pinout is -- signal gpio_o: std_logic_vector(zpuino_gpio_count-1 downto 0); -- signal gpio_t: std_logic_vector(zpuino_gpio_count-1 downto 0); -- signal gpio_i: std_logic_vector(zpuino_gpio_count-1 downto 0); -- -- -- SPP signal is one more than GPIO count -- signal gpio_spp_data: std_logic_vector(zpuino_gpio_count-1 downto 0); -- signal gpio_spp_read: std_logic_vector(zpuino_gpio_count-1 downto 0); -- -- constant spp_cap_in: std_logic_vector(zpuino_gpio_count-1 downto 0) := -- "0" & -- "1111111111111111" & -- "1111111111111111" & -- "1111111111111111"; -- constant spp_cap_out: std_logic_vector(zpuino_gpio_count-1 downto 0) := -- "0" & -- "1111111111111111" & -- "1111111111111111" & -- "1111111111111111"; signal gpio_o: std_logic_vector(48 downto 0); signal gpio_t: std_logic_vector(48 downto 0); signal gpio_i: std_logic_vector(48 downto 0); signal gpio_spp_data: std_logic_vector(48 downto 0); signal gpio_spp_read: std_logic_vector(48 downto 0); signal gpio_clk: std_logic; begin --gpio_bus_in(97 downto 49) <= gpio_spp_data; --gpio_bus_in(48 downto 0) <= gpio_i; gpio_clk <= gpio_bus_out(147); gpio_o <= gpio_bus_out(146 downto 98); gpio_t <= gpio_bus_out(97 downto 49); gpio_spp_read <= gpio_bus_out(48 downto 0); WING_BH2 <= Audio; --7 Segment WING_AL0 <= Seg7_enable(3); WING_AL1 <= Seg7_dot; WING_AL2 <= Seg7_enable(2); WING_AL3 <= Seg7_segdata(4); WING_AL4 <= Seg7_segdata(5); WING_AL5 <= Seg7_segdata(2); WING_AL6 <= Seg7_segdata(3); WING_AL7 <= Seg7_segdata(0); WING_AH0 <= Seg7_enable(1); WING_AH1 <= Seg7_segdata(6); WING_AH2 <= Seg7_segdata(1); WING_AH3 <= Seg7_enable(0); --VGA WING_BL0 <= VGA_Vsync; WING_BL1 <= VGA_Hsync; WING_BL2 <= VGA_Blue0; WING_BL3 <= VGA_Blue1; WING_BL4 <= VGA_Green0; WING_BL5 <= VGA_Green1; WING_BL6 <= VGA_Green2; WING_BL7 <= VGA_Red0; WING_BH0 <= VGA_Red1; WING_BH1 <= VGA_Red2; --SPI ADC WING_AH7 <= SPI_CLK; WING_AH6 <= SPI_MOSI; SPI_MISO <= WING_AH5; --WING_AH4 <= SPI_CS; -- pin00: IOPAD port map(I => gpio_o(0), O => gpio_i(0), T => gpio_t(0), C => gpio_clk,PAD => WING_AL0 ); -- pin01: IOPAD port map(I => gpio_o(1), O => gpio_i(1), T => gpio_t(1), C => gpio_clk,PAD => WING_AL1 ); -- pin02: IOPAD port map(I => gpio_o(2), O => gpio_i(2), T => gpio_t(2), C => gpio_clk,PAD => WING_AL2 ); -- pin03: IOPAD port map(I => gpio_o(3), O => gpio_i(3), T => gpio_t(3), C => gpio_clk,PAD => WING_AL3 ); -- pin04: IOPAD port map(I => gpio_o(4), O => gpio_i(4), T => gpio_t(4), C => gpio_clk,PAD => WING_AL4 ); -- pin05: IOPAD port map(I => gpio_o(5), O => gpio_i(5), T => gpio_t(5), C => gpio_clk,PAD => WING_AL5 ); -- pin06: IOPAD port map(I => gpio_o(6), O => gpio_i(6), T => gpio_t(6), C => gpio_clk,PAD => WING_AL6 ); -- pin07: IOPAD port map(I => gpio_o(7), O => gpio_i(7), T => gpio_t(7), C => gpio_clk,PAD => WING_AL7 ); -- pin08: IOPAD port map(I => gpio_o(8), O => gpio_i(8), T => gpio_t(8), C => gpio_clk,PAD => WING_AH0 ); -- pin09: IOPAD port map(I => gpio_o(9), O => gpio_i(9), T => gpio_t(9), C => gpio_clk,PAD => WING_AH1 ); -- pin10: IOPAD port map(I => gpio_o(10),O => gpio_i(10),T => gpio_t(10),C => gpio_clk,PAD => WING_AH2 ); -- pin11: IOPAD port map(I => gpio_o(11),O => gpio_i(11),T => gpio_t(11),C => gpio_clk,PAD => WING_AH3 ); pin12: IOPAD port map(I => gpio_o(12),O => gpio_i(12),T => gpio_t(12),C => gpio_clk,PAD => WING_AH4 ); -- pin13: IOPAD port map(I => gpio_o(13),O => gpio_i(13),T => gpio_t(13),C => gpio_clk,PAD => WING_AH5 ); -- pin14: IOPAD port map(I => gpio_o(14),O => gpio_i(14),T => gpio_t(14),C => gpio_clk,PAD => WING_AH6 ); -- pin15: IOPAD port map(I => gpio_o(15),O => gpio_i(15),T => gpio_t(15),C => gpio_clk,PAD => WING_AH7 ); -- pin16: IOPAD port map(I => gpio_o(16),O => gpio_i(16),T => gpio_t(16),C => gpio_clk,PAD => WING_BL0 ); -- pin17: IOPAD port map(I => gpio_o(17),O => gpio_i(17),T => gpio_t(17),C => gpio_clk,PAD => WING_BL1 ); -- pin18: IOPAD port map(I => gpio_o(18),O => gpio_i(18),T => gpio_t(18),C => gpio_clk,PAD => WING_BL2 ); -- pin19: IOPAD port map(I => gpio_o(19),O => gpio_i(19),T => gpio_t(19),C => gpio_clk,PAD => WING_BL3 ); -- pin20: IOPAD port map(I => gpio_o(20),O => gpio_i(20),T => gpio_t(20),C => gpio_clk,PAD => WING_BL4 ); -- pin21: IOPAD port map(I => gpio_o(21),O => gpio_i(21),T => gpio_t(21),C => gpio_clk,PAD => WING_BL5 ); -- pin22: IOPAD port map(I => gpio_o(22),O => gpio_i(22),T => gpio_t(22),C => gpio_clk,PAD => WING_BL6 ); -- pin23: IOPAD port map(I => gpio_o(23),O => gpio_i(23),T => gpio_t(23),C => gpio_clk,PAD => WING_BL7 ); -- pin24: IOPAD port map(I => gpio_o(24),O => gpio_i(24),T => gpio_t(24),C => gpio_clk,PAD => WING_BH0 ); -- pin25: IOPAD port map(I => gpio_o(25),O => gpio_i(25),T => gpio_t(25),C => gpio_clk,PAD => WING_BH1 ); -- pin26: IOPAD port map(I => gpio_o(26),O => gpio_i(26),T => gpio_t(26),C => gpio_clk,PAD => WING_BH2 ); pin27: IOPAD port map(I => gpio_o(27),O => gpio_bus_in(27),T => gpio_t(27),C => gpio_clk,PAD => WING_BH3 ); pin28: IOPAD port map(I => gpio_o(28),O => gpio_bus_in(28),T => gpio_t(28),C => gpio_clk,PAD => WING_BH4 ); pin29: IOPAD port map(I => gpio_o(29),O => gpio_bus_in(29),T => gpio_t(29),C => gpio_clk,PAD => WING_BH5 ); pin30: IOPAD port map(I => gpio_o(30),O => gpio_bus_in(30),T => gpio_t(30),C => gpio_clk,PAD => WING_BH6 ); pin31: IOPAD port map(I => gpio_o(31),O => gpio_bus_in(31),T => gpio_t(31),C => gpio_clk,PAD => WING_BH7 ); pin32: IOPAD port map(I => gpio_o(32),O => gpio_bus_in(32),T => gpio_t(32),C => gpio_clk,PAD => WING_CL0 ); pin33: IOPAD port map(I => gpio_o(33),O => gpio_bus_in(33),T => gpio_t(33),C => gpio_clk,PAD => WING_CL1 ); pin34: IOPAD port map(I => gpio_o(34),O => gpio_bus_in(34),T => gpio_t(34),C => gpio_clk,PAD => WING_CL2 ); pin35: IOPAD port map(I => gpio_o(35),O => gpio_bus_in(35),T => gpio_t(35),C => gpio_clk,PAD => WING_CL3 ); pin36: IOPAD port map(I => gpio_o(36),O => gpio_bus_in(36),T => gpio_t(36),C => gpio_clk,PAD => WING_CL4 ); pin37: IOPAD port map(I => gpio_o(37),O => gpio_bus_in(37),T => gpio_t(37),C => gpio_clk,PAD => WING_CL5 ); pin38: IOPAD port map(I => gpio_o(38),O => gpio_bus_in(38),T => gpio_t(38),C => gpio_clk,PAD => WING_CL6 ); pin39: IOPAD port map(I => gpio_o(39),O => gpio_bus_in(39),T => gpio_t(39),C => gpio_clk,PAD => WING_CL7 ); pin40: IOPAD port map(I => gpio_o(40),O => gpio_bus_in(40),T => gpio_t(40),C => gpio_clk,PAD => WING_CH0 ); pin41: IOPAD port map(I => gpio_o(41),O => gpio_bus_in(41),T => gpio_t(41),C => gpio_clk,PAD => WING_CH1 ); pin42: IOPAD port map(I => gpio_o(42),O => gpio_bus_in(42),T => gpio_t(42),C => gpio_clk,PAD => WING_CH2 ); pin43: IOPAD port map(I => gpio_o(43),O => gpio_bus_in(43),T => gpio_t(43),C => gpio_clk,PAD => WING_CH3 ); pin44: IOPAD port map(I => gpio_o(44),O => gpio_bus_in(44),T => gpio_t(44),C => gpio_clk,PAD => WING_CH4 ); pin45: IOPAD port map(I => gpio_o(45),O => gpio_bus_in(45),T => gpio_t(45),C => gpio_clk,PAD => WING_CH5 ); pin46: IOPAD port map(I => gpio_o(46),O => gpio_bus_in(46),T => gpio_t(46),C => gpio_clk,PAD => WING_CH6 ); pin47: IOPAD port map(I => gpio_o(47),O => gpio_bus_in(47),T => gpio_t(47),C => gpio_clk,PAD => WING_CH7 ); -- ospics: OPAD port map ( I => gpio_o(48), PAD => SPI_CS ); process(gpio_spp_read) -- sigmadelta_spp_data, -- timers_pwm, -- spi2_mosi,spi2_sck) begin -- gpio_spp_data <= (others => DontCareValue); gpio_bus_in(97 downto 49) <= (others => DontCareValue); end process; end BEHAVIORAL;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer/Libraries/ZPUino_1/Papilio_Wing_Pinout.vhd
13
12982
-------------------------------------------------------------------------------- -- Copyright (c) 1995-2012 Xilinx, Inc. All rights reserved. -------------------------------------------------------------------------------- -- ____ ____ -- / /\/ / -- /___/ \ / Vendor: Xilinx -- \ \ \/ Version : 14.3 -- \ \ Application : -- / / Filename : xil_10080_19 -- /___/ /\ Timestamp : 02/08/2013 16:21:11 -- \ \ / \ -- \___\/\___\ -- --Command: --Design Name: -- The Papilio Default Pinout device defines the pins for a Papilio board that does not have a MegaWing attached to it. library ieee; use ieee.std_logic_1164.ALL; use ieee.numeric_std.ALL; library UNISIM; use UNISIM.Vcomponents.ALL; library board; use board.zpupkg.all; use board.zpuinopkg.all; use board.zpuino_config.all; use board.zpu_config.all; library zpuino; use zpuino.pad.all; use zpuino.papilio_pkg.all; -- Unfortunately the Xilinx Schematic Editor does not support records, so we have to put all wishbone signals into one array. -- This is a little cumbersome but is better then dealing with all the signals in the schematic editor. -- This is what the original record base approach looked like: -- -- type gpio_bus_in_type is record -- gpio_i: std_logic_vector(48 downto 0); -- gpio_spp_data: std_logic_vector(48 downto 0); -- end record; -- -- type gpio_bus_out_type is record -- gpio_clk: std_logic; -- gpio_o: std_logic_vector(48 downto 0); -- gpio_t: std_logic_vector(48 downto 0); -- gpio_spp_read: std_logic_vector(48 downto 0); -- end record; -- -- Turning them into an array looks like this: -- -- gpio_bus_in : in std_logic_vector(97 downto 0); -- -- gpio_bus_in(97 downto 49) <= gpio_i; -- gpio_bus_in(48 downto 0) <= gpio_bus_in_record.gpio_spp_data; -- -- gpio_bus_out : out std_logic_vector(146 downto 0); -- -- gpio_o <= gpio_bus_out(146 downto 98); -- gpio_t <= gpio_bus_out(97 downto 49); -- gpio_bus_out_record.gpio_spp_read <= gpio_bus_out(48 downto 0); entity Papilio_Wing_Pinout is port ( gpio_bus_in : out std_logic_vector(97 downto 0); gpio_bus_out : in std_logic_vector(147 downto 0); WingType_miso_AH: inout std_logic_vector(7 downto 0); WingType_mosi_AH: inout std_logic_vector(7 downto 0); WING_AH0 : inout std_logic; WING_AH1 : inout std_logic; WING_AH2 : inout std_logic; WING_AH3 : inout std_logic; WING_AH4 : inout std_logic; WING_AH5 : inout std_logic; WING_AH6 : inout std_logic; WING_AH7 : inout std_logic; WingType_miso_AL: inout std_logic_vector(7 downto 0); WingType_mosi_AL: inout std_logic_vector(7 downto 0); WING_AL0 : inout std_logic; WING_AL1 : inout std_logic; WING_AL2 : inout std_logic; WING_AL3 : inout std_logic; WING_AL4 : inout std_logic; WING_AL5 : inout std_logic; WING_AL6 : inout std_logic; WING_AL7 : inout std_logic; WingType_miso_BH: inout std_logic_vector(7 downto 0); WingType_mosi_BH: inout std_logic_vector(7 downto 0); WING_BH0 : inout std_logic; WING_BH1 : inout std_logic; WING_BH2 : inout std_logic; WING_BH3 : inout std_logic; WING_BH4 : inout std_logic; WING_BH5 : inout std_logic; WING_BH6 : inout std_logic; WING_BH7 : inout std_logic; WingType_miso_BL: inout std_logic_vector(7 downto 0); WingType_mosi_BL: inout std_logic_vector(7 downto 0); WING_BL0 : inout std_logic; WING_BL1 : inout std_logic; WING_BL2 : inout std_logic; WING_BL3 : inout std_logic; WING_BL4 : inout std_logic; WING_BL5 : inout std_logic; WING_BL6 : inout std_logic; WING_BL7 : inout std_logic; WingType_miso_CH: inout std_logic_vector(7 downto 0); WingType_mosi_CH: inout std_logic_vector(7 downto 0); WING_CH0 : inout std_logic; WING_CH1 : inout std_logic; WING_CH2 : inout std_logic; WING_CH3 : inout std_logic; WING_CH4 : inout std_logic; WING_CH5 : inout std_logic; WING_CH6 : inout std_logic; WING_CH7 : inout std_logic; WingType_miso_CL: inout std_logic_vector(7 downto 0); WingType_mosi_CL: inout std_logic_vector(7 downto 0); WING_CL0 : inout std_logic; WING_CL1 : inout std_logic; WING_CL2 : inout std_logic; WING_CL3 : inout std_logic; WING_CL4 : inout std_logic; WING_CL5 : inout std_logic; WING_CL6 : inout std_logic; WING_CL7 : inout std_logic ); end Papilio_Wing_Pinout; architecture BEHAVIORAL of Papilio_Wing_Pinout is signal gpio_o: std_logic_vector(48 downto 0); signal gpio_t: std_logic_vector(48 downto 0); signal gpio_i: std_logic_vector(48 downto 0); signal gpio_spp_data: std_logic_vector(48 downto 0); signal gpio_spp_read: std_logic_vector(48 downto 0); signal gpio_clk: std_logic; begin --Unpack the signal array into a record so the modules code is easier to understand. --gpio_bus_in(97 downto 49) <= gpio_spp_data; --gpio_bus_in(48 downto 0) <= gpio_i; gpio_clk <= gpio_bus_out(147); gpio_o <= gpio_bus_out(146 downto 98); gpio_t <= gpio_bus_out(97 downto 49); gpio_spp_read <= gpio_bus_out(48 downto 0); pin00: IOPAD port map(I => gpio_o(0), O => gpio_bus_in(0), T => gpio_t(0), C => gpio_clk,PAD => WingType_mosi_AL(0) ); pin01: IOPAD port map(I => gpio_o(1), O => gpio_bus_in(1), T => gpio_t(1), C => gpio_clk,PAD => WingType_mosi_AL(1) ); pin02: IOPAD port map(I => gpio_o(2), O => gpio_bus_in(2), T => gpio_t(2), C => gpio_clk,PAD => WingType_mosi_AL(2) ); pin03: IOPAD port map(I => gpio_o(3), O => gpio_bus_in(3), T => gpio_t(3), C => gpio_clk,PAD => WingType_mosi_AL(3) ); pin04: IOPAD port map(I => gpio_o(4), O => gpio_bus_in(4), T => gpio_t(4), C => gpio_clk,PAD => WingType_mosi_AL(4) ); pin05: IOPAD port map(I => gpio_o(5), O => gpio_bus_in(5), T => gpio_t(5), C => gpio_clk,PAD => WingType_mosi_AL(5) ); pin06: IOPAD port map(I => gpio_o(6), O => gpio_bus_in(6), T => gpio_t(6), C => gpio_clk,PAD => WingType_mosi_AL(6) ); pin07: IOPAD port map(I => gpio_o(7), O => gpio_bus_in(7), T => gpio_t(7), C => gpio_clk,PAD => WingType_mosi_AL(7) ); pin08: IOPAD port map(I => gpio_o(8), O => gpio_bus_in(8), T => gpio_t(8), C => gpio_clk,PAD => WingType_mosi_AH(0) ); pin09: IOPAD port map(I => gpio_o(9), O => gpio_bus_in(9), T => gpio_t(9), C => gpio_clk,PAD => WingType_mosi_AH(1) ); pin10: IOPAD port map(I => gpio_o(10),O => gpio_bus_in(10),T => gpio_t(10),C => gpio_clk,PAD => WingType_mosi_AH(2) ); pin11: IOPAD port map(I => gpio_o(11),O => gpio_bus_in(11),T => gpio_t(11),C => gpio_clk,PAD => WingType_mosi_AH(3) ); pin12: IOPAD port map(I => gpio_o(12),O => gpio_bus_in(12),T => gpio_t(12),C => gpio_clk,PAD => WingType_mosi_AH(4) ); pin13: IOPAD port map(I => gpio_o(13),O => gpio_bus_in(13),T => gpio_t(13),C => gpio_clk,PAD => WingType_mosi_AH(5) ); pin14: IOPAD port map(I => gpio_o(14),O => gpio_bus_in(14),T => gpio_t(14),C => gpio_clk,PAD => WingType_mosi_AH(6) ); pin15: IOPAD port map(I => gpio_o(15),O => gpio_bus_in(15),T => gpio_t(15),C => gpio_clk,PAD => WingType_mosi_AH(7) ); pin16: IOPAD port map(I => gpio_o(16),O => gpio_bus_in(16),T => gpio_t(16),C => gpio_clk,PAD => WingType_mosi_BL(0) ); pin17: IOPAD port map(I => gpio_o(17),O => gpio_bus_in(17),T => gpio_t(17),C => gpio_clk,PAD => WingType_mosi_BL(1) ); pin18: IOPAD port map(I => gpio_o(18),O => gpio_bus_in(18),T => gpio_t(18),C => gpio_clk,PAD => WingType_mosi_BL(2) ); pin19: IOPAD port map(I => gpio_o(19),O => gpio_bus_in(19),T => gpio_t(19),C => gpio_clk,PAD => WingType_mosi_BL(3) ); pin20: IOPAD port map(I => gpio_o(20),O => gpio_bus_in(20),T => gpio_t(20),C => gpio_clk,PAD => WingType_mosi_BL(4) ); pin21: IOPAD port map(I => gpio_o(21),O => gpio_bus_in(21),T => gpio_t(21),C => gpio_clk,PAD => WingType_mosi_BL(5) ); pin22: IOPAD port map(I => gpio_o(22),O => gpio_bus_in(22),T => gpio_t(22),C => gpio_clk,PAD => WingType_mosi_BL(6) ); pin23: IOPAD port map(I => gpio_o(23),O => gpio_bus_in(23),T => gpio_t(23),C => gpio_clk,PAD => WingType_mosi_BL(7) ); pin24: IOPAD port map(I => gpio_o(24),O => gpio_bus_in(24),T => gpio_t(24),C => gpio_clk,PAD => WingType_mosi_BH(0) ); pin25: IOPAD port map(I => gpio_o(25),O => gpio_bus_in(25),T => gpio_t(25),C => gpio_clk,PAD => WingType_mosi_BH(1) ); pin26: IOPAD port map(I => gpio_o(26),O => gpio_bus_in(26),T => gpio_t(26),C => gpio_clk,PAD => WingType_mosi_BH(2) ); pin27: IOPAD port map(I => gpio_o(27),O => gpio_bus_in(27),T => gpio_t(27),C => gpio_clk,PAD => WingType_mosi_BH(3) ); pin28: IOPAD port map(I => gpio_o(28),O => gpio_bus_in(28),T => gpio_t(28),C => gpio_clk,PAD => WingType_mosi_BH(4) ); pin29: IOPAD port map(I => gpio_o(29),O => gpio_bus_in(29),T => gpio_t(29),C => gpio_clk,PAD => WingType_mosi_BH(5) ); pin30: IOPAD port map(I => gpio_o(30),O => gpio_bus_in(30),T => gpio_t(30),C => gpio_clk,PAD => WingType_mosi_BH(6) ); pin31: IOPAD port map(I => gpio_o(31),O => gpio_bus_in(31),T => gpio_t(31),C => gpio_clk,PAD => WingType_mosi_BH(7) ); pin32: IOPAD port map(I => gpio_o(32),O => gpio_bus_in(32),T => gpio_t(32),C => gpio_clk,PAD => WingType_mosi_CL(0) ); pin33: IOPAD port map(I => gpio_o(33),O => gpio_bus_in(33),T => gpio_t(33),C => gpio_clk,PAD => WingType_mosi_CL(1) ); pin34: IOPAD port map(I => gpio_o(34),O => gpio_bus_in(34),T => gpio_t(34),C => gpio_clk,PAD => WingType_mosi_CL(2) ); pin35: IOPAD port map(I => gpio_o(35),O => gpio_bus_in(35),T => gpio_t(35),C => gpio_clk,PAD => WingType_mosi_CL(3) ); pin36: IOPAD port map(I => gpio_o(36),O => gpio_bus_in(36),T => gpio_t(36),C => gpio_clk,PAD => WingType_mosi_CL(4) ); pin37: IOPAD port map(I => gpio_o(37),O => gpio_bus_in(37),T => gpio_t(37),C => gpio_clk,PAD => WingType_mosi_CL(5) ); pin38: IOPAD port map(I => gpio_o(38),O => gpio_bus_in(38),T => gpio_t(38),C => gpio_clk,PAD => WingType_mosi_CL(6) ); pin39: IOPAD port map(I => gpio_o(39),O => gpio_bus_in(39),T => gpio_t(39),C => gpio_clk,PAD => WingType_mosi_CL(7) ); pin40: IOPAD port map(I => gpio_o(40),O => gpio_bus_in(40),T => gpio_t(40),C => gpio_clk,PAD => WingType_mosi_CH(0) ); pin41: IOPAD port map(I => gpio_o(41),O => gpio_bus_in(41),T => gpio_t(41),C => gpio_clk,PAD => WingType_mosi_CH(1) ); pin42: IOPAD port map(I => gpio_o(42),O => gpio_bus_in(42),T => gpio_t(42),C => gpio_clk,PAD => WingType_mosi_CH(2) ); pin43: IOPAD port map(I => gpio_o(43),O => gpio_bus_in(43),T => gpio_t(43),C => gpio_clk,PAD => WingType_mosi_CH(3) ); pin44: IOPAD port map(I => gpio_o(44),O => gpio_bus_in(44),T => gpio_t(44),C => gpio_clk,PAD => WingType_mosi_CH(4) ); pin45: IOPAD port map(I => gpio_o(45),O => gpio_bus_in(45),T => gpio_t(45),C => gpio_clk,PAD => WingType_mosi_CH(5) ); pin46: IOPAD port map(I => gpio_o(46),O => gpio_bus_in(46),T => gpio_t(46),C => gpio_clk,PAD => WingType_mosi_CH(6) ); pin47: IOPAD port map(I => gpio_o(47),O => gpio_bus_in(47),T => gpio_t(47),C => gpio_clk,PAD => WingType_mosi_CH(7) ); -- ospics: OPAD port map ( I => gpio_bus_out.gpio_o(48), PAD => SPI_CS ); WING_AL0 <= WingType_miso_AL(0); WING_AL1 <= WingType_miso_AL(1); WING_AL2 <= WingType_miso_AL(2); WING_AL3 <= WingType_miso_AL(3); WING_AL4 <= WingType_miso_AL(4); WING_AL5 <= WingType_miso_AL(5); WING_AL6 <= WingType_miso_AL(6); WING_AL7 <= WingType_miso_AL(7); WING_AH0 <= WingType_miso_AH(0); WING_AH1 <= WingType_miso_AH(1); WING_AH2 <= WingType_miso_AH(2); WING_AH3 <= WingType_miso_AH(3); WING_AH4 <= WingType_miso_AH(4); WING_AH5 <= WingType_miso_AH(5); WING_AH6 <= WingType_miso_AH(6); WING_AH7 <= WingType_miso_AH(7); WING_BL0 <= WingType_miso_BL(0); WING_BL1 <= WingType_miso_BL(1); WING_BL2 <= WingType_miso_BL(2); WING_BL3 <= WingType_miso_BL(3); WING_BL4 <= WingType_miso_BL(4); WING_BL5 <= WingType_miso_BL(5); WING_BL6 <= WingType_miso_BL(6); WING_BL7 <= WingType_miso_BL(7); WING_BH0 <= WingType_miso_BH(0); WING_BH1 <= WingType_miso_BH(1); WING_BH2 <= WingType_miso_BH(2); WING_BH3 <= WingType_miso_BH(3); WING_BH4 <= WingType_miso_BH(4); WING_BH5 <= WingType_miso_BH(5); WING_BH6 <= WingType_miso_BH(6); WING_BH7 <= WingType_miso_BH(7); WING_CL0 <= WingType_miso_CL(0); WING_CL1 <= WingType_miso_CL(1); WING_CL2 <= WingType_miso_CL(2); WING_CL3 <= WingType_miso_CL(3); WING_CL4 <= WingType_miso_CL(4); WING_CL5 <= WingType_miso_CL(5); WING_CL6 <= WingType_miso_CL(6); WING_CL7 <= WingType_miso_CL(7); WING_CH0 <= WingType_miso_CH(0); WING_CH1 <= WingType_miso_CH(1); WING_CH2 <= WingType_miso_CH(2); WING_CH3 <= WingType_miso_CH(3); WING_CH4 <= WingType_miso_CH(4); WING_CH5 <= WingType_miso_CH(5); WING_CH6 <= WingType_miso_CH(6); WING_CH7 <= WingType_miso_CH(7); process(gpio_spp_read) -- sigmadelta_spp_data, -- timers_pwm, -- spi2_mosi,spi2_sck) begin gpio_bus_in(97 downto 49) <= (others => DontCareValue); end process; end BEHAVIORAL;
mit
chcbaram/FPGA
ZPUino_miniSpartan6_plus/ipcore_dir/frame_buffer/simulation/bmg_tb_pkg.vhd
101
6006
-------------------------------------------------------------------------------- -- -- BLK MEM GEN v7_3 Core - Testbench Package -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2006_3010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: bmg_tb_pkg.vhd -- -- Description: -- BMG Testbench Package files -- -------------------------------------------------------------------------------- -- Author: IP Solutions Division -- -- History: Sep 12, 2011 - First Release -------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; PACKAGE BMG_TB_PKG IS FUNCTION DIVROUNDUP ( DATA_VALUE : INTEGER; DIVISOR : INTEGER) RETURN INTEGER; ------------------------ FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : STD_LOGIC_VECTOR; FALSE_CASE : STD_LOGIC_VECTOR) RETURN STD_LOGIC_VECTOR; ------------------------ FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : STRING; FALSE_CASE :STRING) RETURN STRING; ------------------------ FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : STD_LOGIC; FALSE_CASE :STD_LOGIC) RETURN STD_LOGIC; ------------------------ FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : INTEGER; FALSE_CASE : INTEGER) RETURN INTEGER; ------------------------ FUNCTION LOG2ROUNDUP ( DATA_VALUE : INTEGER) RETURN INTEGER; END BMG_TB_PKG; PACKAGE BODY BMG_TB_PKG IS FUNCTION DIVROUNDUP ( DATA_VALUE : INTEGER; DIVISOR : INTEGER) RETURN INTEGER IS VARIABLE DIV : INTEGER; BEGIN DIV := DATA_VALUE/DIVISOR; IF ( (DATA_VALUE MOD DIVISOR) /= 0) THEN DIV := DIV+1; END IF; RETURN DIV; END DIVROUNDUP; --------------------------------- FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : STD_LOGIC_VECTOR; FALSE_CASE : STD_LOGIC_VECTOR) RETURN STD_LOGIC_VECTOR IS BEGIN IF NOT CONDITION THEN RETURN FALSE_CASE; ELSE RETURN TRUE_CASE; END IF; END IF_THEN_ELSE; --------------------------------- FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : STD_LOGIC; FALSE_CASE : STD_LOGIC) RETURN STD_LOGIC IS BEGIN IF NOT CONDITION THEN RETURN FALSE_CASE; ELSE RETURN TRUE_CASE; END IF; END IF_THEN_ELSE; --------------------------------- FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : INTEGER; FALSE_CASE : INTEGER) RETURN INTEGER IS VARIABLE RETVAL : INTEGER := 0; BEGIN IF CONDITION=FALSE THEN RETVAL:=FALSE_CASE; ELSE RETVAL:=TRUE_CASE; END IF; RETURN RETVAL; END IF_THEN_ELSE; --------------------------------- FUNCTION IF_THEN_ELSE ( CONDITION : BOOLEAN; TRUE_CASE : STRING; FALSE_CASE : STRING) RETURN STRING IS BEGIN IF NOT CONDITION THEN RETURN FALSE_CASE; ELSE RETURN TRUE_CASE; END IF; END IF_THEN_ELSE; ------------------------------- FUNCTION LOG2ROUNDUP ( DATA_VALUE : INTEGER) RETURN INTEGER IS VARIABLE WIDTH : INTEGER := 0; VARIABLE CNT : INTEGER := 1; BEGIN IF (DATA_VALUE <= 1) THEN WIDTH := 1; ELSE WHILE (CNT < DATA_VALUE) LOOP WIDTH := WIDTH + 1; CNT := CNT *2; END LOOP; END IF; RETURN WIDTH; END LOG2ROUNDUP; END BMG_TB_PKG;
mit
sinkswim/DLX-Pro
DLX_simulation_cfg/a.b-DataPath.core/a.b.d-memory.core/a.b.d.a-DRAM_block.core/a.b.d.a.c-MMU_out_DRAM.vhd
1
5416
---------------------------------------------------------------------------------------------------- -- MMU out -- It arranges the output of the DRAM according to the control signals for the current mem operation -- and on the control signal generated from MMU in -- Note it arrenges byte according to the Big Endian format ---------------------------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use work.globals.all; ----------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------- entity mmu_out_dram is port ( -- INPUTS data_ram : in std_logic_vector(31 downto 0); -- data coming from the dram mem_op : in std_logic_vector(5 downto 0); -- control signals grouped in the following order (sb, sw, lbu, lw, lhu, lb) nibble : in std_logic_vector(1 downto 0); -- which byte should be selected unaligned : in std_logic; -- in case of unaligned access set the output to zero -- OUTPUTS data_read : out std_logic_vector(31 downto 0) -- data in the correct format ); end mmu_out_dram; ----------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------- architecture behavioral of mmu_out_dram is begin ------------------------- -- Name: Comb Logic -- Type: Combinational -- Purpose: Implemnt the -- comb logic of the -- MMU out ------------------------ comb_logic:process(data_ram, mem_op, nibble, unaligned) begin if (unaligned = '1') then data_read <= (others => '0'); else case mem_op is when "000100" => -- lw data_read <= data_ram; when "000010" => -- lhu if (nibble = "00") then data_read(31 downto 16) <= (others => '0'); data_read(15 downto 0) <= data_ram(31 downto 16); else -- nibble = "10" data_read(31 downto 16) <= (others => '0'); data_read(15 downto 0) <= data_ram(15 downto 0); end if; when "000001" => -- lb case nibble is when "00" => if (data_ram(31) = '1') then -- last bit at one, extend with one data_read(7 downto 0) <= data_ram(31 downto 24); data_read(31 downto 8) <= (others => '1'); else -- last bit at zero, extend with zero data_read(7 downto 0) <= data_ram(31 downto 24); data_read(31 downto 8) <= (others => '0'); end if; when "01" => if (data_ram(23) = '1') then -- last bit at one, extend with one data_read(7 downto 0) <= data_ram(23 downto 16); data_read(31 downto 8) <= (others => '1'); else -- last bit at zero, extend with zero data_read(7 downto 0) <= data_ram(23 downto 16); data_read(31 downto 8) <= (others => '0'); end if; when "10" => if (data_ram(15) = '1') then -- last bit at one, extend with one data_read(7 downto 0) <= data_ram(15 downto 8); data_read(31 downto 8) <= (others => '1'); else -- last bit at zero, extend with zero data_read(7 downto 0) <= data_ram(15 downto 8); data_read(31 downto 8) <= (others => '0'); end if; when "11" => if (data_ram(7) = '1') then -- last bit at one, extend with one data_read(7 downto 0) <= data_ram(7 downto 0); data_read(31 downto 8) <= (others => '1'); else -- last bit at zero, extend with zero data_read(7 downto 0) <= data_ram(7 downto 0); data_read(31 downto 8) <= (others => '0'); end if; when others => data_read <= (others => '0'); end case; when "001000" => -- lbu case nibble is when "00" => data_read(7 downto 0) <= data_ram(31 downto 24); data_read(31 downto 8) <= (others => '0'); when "01" => data_read(7 downto 0) <= data_ram(23 downto 16); data_read(31 downto 8) <= (others => '0'); when "10" => data_read(7 downto 0) <= data_ram(15 downto 8); data_read(31 downto 8) <= (others => '0'); when "11" => data_read(7 downto 0) <= data_ram(7 downto 0); data_read(31 downto 8) <= (others => '0'); when others => data_read <= (others => '0'); end case; when others => data_read <= (others => '0'); end case; end if; end process; end behavioral;
mit
chcbaram/FPGA
ZPUino_miniSpartan6_plus/ipcore_dir/zpuino_crc16.vhd
1
2750
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library work; use work.zpu_config.all; use work.zpupkg.all; use work.zpuinopkg.all; entity zpuino_crc16 is port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(maxIOBit downto minIOBit); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o:out std_logic ); end entity zpuino_crc16; architecture behave of zpuino_crc16 is signal crc_q: std_logic_vector(15 downto 0); signal crcA_q: std_logic_vector(15 downto 0); signal crcB_q: std_logic_vector(15 downto 0); signal poly_q: std_logic_vector(15 downto 0); signal data_q: std_logic_vector(7 downto 0); signal count_q: integer range 0 to 7; signal ready_q: std_logic; begin wb_ack_o<='1' when ready_q='1' and ( wb_cyc_i='1' and wb_stb_i='1') else '0'; wb_inta_o <= '0'; process(wb_adr_i,crc_q,poly_q, crcA_q, crcB_q) begin case wb_adr_i(4 downto 2) is when "000" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crc_q; when "001" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= poly_q; when "100" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcA_q; when "101" => wb_dat_o(31 downto 16) <= (others => Undefined); wb_dat_o(15 downto 0) <= crcB_q; when others => wb_dat_o <= (others => DontCareValue); end case; end process; process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then poly_q <= x"A001"; crc_q <= x"FFFF"; ready_q <= '1'; else if wb_cyc_i='1' and wb_stb_i='1' and wb_we_i='1' and ready_q='1' then case wb_adr_i(4 downto 2) is when "000" => crc_q <= wb_dat_i(15 downto 0); when "001" => poly_q <= wb_dat_i(15 downto 0); when "010" => ready_q <= '0'; count_q <= 0; data_q <= wb_dat_i(7 downto 0); crcA_q <= crc_q; crcB_q <= crcA_q; when others => end case; end if; if ready_q='0' then if (crc_q(0) xor data_q(0))='1' then crc_q <= ( '0' & crc_q(15 downto 1)) xor poly_q; else crc_q <= '0' & crc_q(15 downto 1); end if; data_q <= '0' & data_q(7 downto 1); if count_q=7 then count_q <= 0; ready_q <= '1'; else count_q <= count_q + 1; end if; end if; end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer/Libraries/Benchy/prescaler.vhd
13
2089
---------------------------------------------------------------------------------- -- prescaler.vhd -- -- Copyright (C) 2006 Michael Poppitz -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- -- This program is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA -- ---------------------------------------------------------------------------------- -- -- Details: http://www.sump.org/projects/analyzer/ -- -- Shared prescaler for transmitter and receiver timings. -- Used to control the transfer speed. -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity sump_prescaler is generic ( SCALE : integer := 54 ); Port ( clock : in STD_LOGIC; reset : in std_logic; div : in std_logic_vector(1 downto 0); scaled : out std_logic ); end sump_prescaler; architecture Behavioral of sump_prescaler is signal counter : integer range 0 to (6 * SCALE) - 1; begin process(clock, reset) begin if reset = '1' then counter <= 0; elsif rising_edge(clock) then if (counter = SCALE - 1 and div = "00") -- 115200 or (counter = 2 * SCALE - 1 and div = "01") -- 57600 or (counter = 3 * SCALE - 1 and div = "10") -- 38400 or (counter = 6 * SCALE - 1 and div = "11") -- 19200 then counter <= 0; scaled <= '1'; else counter <= counter + 1; scaled <= '0'; end if; end if; end process; end Behavioral;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_ModFile_simple/Libraries/ZPUino_1/zpuino_timers.vhd
13
6137
-- -- Timers for ZPUINO -- -- Copyright 2010 Alvaro Lopes <[email protected]> -- -- Version: 1.0 -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; library board; use board.zpuino_config.all; use board.zpu_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity zpuino_timers is generic ( A_TSCENABLED: boolean := false; A_PWMCOUNT: integer range 1 to 8 := 2; A_WIDTH: integer range 1 to 32 := 16; A_PRESCALER_ENABLED: boolean := true; A_BUFFERS: boolean :=true; B_TSCENABLED: boolean := false; B_PWMCOUNT: integer range 1 to 8 := 2; B_WIDTH: integer range 1 to 32 := 16; B_PRESCALER_ENABLED: boolean := false; B_BUFFERS: boolean := false ); port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(maxIObit downto minIObit); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o:out std_logic; wb_intb_o:out std_logic; pwm_A_out: out std_logic_vector(A_PWMCOUNT-1 downto 0); pwm_B_out: out std_logic_vector(B_PWMCOUNT-1 downto 0) ); end entity zpuino_timers; architecture behave of zpuino_timers is component timer is generic ( TSCENABLED: boolean := false; PWMCOUNT: integer range 1 to 8 := 2; WIDTH: integer range 1 to 32 := 16; PRESCALER_ENABLED: boolean := true; BUFFERS: boolean := true ); port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(5 downto 0); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o: out std_logic; pwm_out: out std_logic_vector(PWMCOUNT-1 downto 0) ); end component timer; signal timer0_read: std_logic_vector(wordSize-1 downto 0); signal timer0_stb: std_logic; signal timer0_cyc: std_logic; signal timer0_we: std_logic; signal timer0_interrupt: std_logic; signal timer0_ack: std_logic; signal timer1_read: std_logic_vector(wordSize-1 downto 0); signal timer1_stb: std_logic; signal timer1_cyc: std_logic; signal timer1_we: std_logic; signal timer1_interrupt: std_logic; signal timer1_ack: std_logic; begin wb_inta_o <= timer0_interrupt; wb_intb_o <= timer1_interrupt; --comp <= timer0_comp; timer0_inst: timer generic map ( TSCENABLED => A_TSCENABLED, PWMCOUNT => A_PWMCOUNT, WIDTH => A_WIDTH, PRESCALER_ENABLED => A_PRESCALER_ENABLED, BUFFERS => A_BUFFERS ) port map ( wb_clk_i => wb_clk_i, wb_rst_i => wb_rst_i, wb_dat_o => timer0_read, wb_dat_i => wb_dat_i, wb_adr_i => wb_adr_i(7 downto 2), wb_cyc_i => timer0_cyc, wb_stb_i => timer0_stb, wb_we_i => timer0_we, wb_ack_o => timer0_ack, wb_inta_o => timer0_interrupt, pwm_out => pwm_A_out ); timer1_inst: timer generic map ( TSCENABLED => B_TSCENABLED, PWMCOUNT => B_PWMCOUNT, WIDTH => B_WIDTH, PRESCALER_ENABLED => B_PRESCALER_ENABLED, BUFFERS => B_BUFFERS ) port map ( wb_clk_i => wb_clk_i, wb_rst_i => wb_rst_i, wb_dat_o => timer1_read, wb_dat_i => wb_dat_i, wb_adr_i => wb_adr_i(7 downto 2), wb_cyc_i => timer1_cyc, wb_stb_i => timer1_stb, wb_we_i => timer1_we, wb_ack_o => timer1_ack, wb_inta_o => timer1_interrupt, pwm_out => pwm_B_out ); process(wb_adr_i,timer0_read,timer1_read) begin wb_dat_o <= (others => '0'); case wb_adr_i(8) is when '0' => wb_dat_o <= timer0_read; when '1' => wb_dat_o <= timer1_read; when others => wb_dat_o <= (others => DontCareValue); end case; end process; timer0_cyc <= wb_cyc_i when wb_adr_i(8)='0' else '0'; timer1_cyc <= wb_cyc_i when wb_adr_i(8)='1' else '0'; timer0_stb <= wb_stb_i when wb_adr_i(8)='0' else '0'; timer1_stb <= wb_stb_i when wb_adr_i(8)='1' else '0'; timer0_we <= wb_we_i when wb_adr_i(8)='0' else '0'; timer1_we <= wb_we_i when wb_adr_i(8)='1' else '0'; wb_ack_o <= timer0_ack or timer1_ack; --spp_data(0) <= timer0_spp_data; --spp_data(1) <= timer1_spp_data; --spp_en(0) <= timer0_spp_en; --spp_en(1) <= timer1_spp_en; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Benchy_Sump_LogicAnalyzer/Libraries/ZPUino_1/board_Papilio_One_500k/prom-generic-dp-32.vhd
13
200723
library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; use ieee.numeric_std.all; entity prom_generic_dualport is port ( CLK: in std_logic; WEA: in std_logic; ENA: in std_logic; MASKA: in std_logic_vector(3 downto 0); ADDRA: in std_logic_vector(14 downto 2); DIA: in std_logic_vector(31 downto 0); DOA: out std_logic_vector(31 downto 0); WEB: in std_logic; ENB: in std_logic; ADDRB: in std_logic_vector(14 downto 2); DIB: in std_logic_vector(31 downto 0); MASKB: in std_logic_vector(3 downto 0); DOB: out std_logic_vector(31 downto 0) ); end entity prom_generic_dualport; architecture behave of prom_generic_dualport is subtype RAM_WORD is STD_LOGIC_VECTOR (7 downto 0); type RAM_TABLE is array (0 to 8191) of RAM_WORD; shared variable RAM0: RAM_TABLE := RAM_TABLE'( x"97",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"97",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"08",x"09",x"05",x"83",x"52",x"00",x"00",x"00",x"08",x"73",x"81",x"83",x"06",x"ff",x"0b",x"00",x"05",x"73",x"06",x"06",x"06",x"00",x"00",x"00",x"73",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"06",x"10",x"10",x"0a",x"51",x"00",x"00",x"73",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"88",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"2b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"06",x"0b",x"a6",x"00",x"00",x"00",x"00",x"00",x"ff",x"2a",x"0a",x"05",x"51",x"00",x"00",x"00",x"51",x"06",x"09",x"05",x"2b",x"06",x"04",x"00",x"05",x"70",x"06",x"53",x"00",x"00",x"00",x"00",x"05",x"70",x"06",x"06",x"00",x"00",x"00",x"00",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"81",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"06",x"06",x"04",x"00",x"00",x"00",x"00",x"00",x"08",x"09",x"05",x"2a",x"52",x"00",x"00",x"00",x"08",x"9d",x"06",x"08",x"0b",x"00",x"00",x"00",x"88",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"88",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"81",x"0a",x"05",x"06",x"74",x"06",x"51",x"00",x"81",x"0a",x"ff",x"71",x"72",x"05",x"51",x"00",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"0c",x"00",x"00",x"00",x"00",x"00",x"00",x"52",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"52",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"ff",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"95",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"51",x"ff",x"06",x"83",x"10",x"fc",x"51",x"72",x"81",x"09",x"71",x"0a",x"72",x"51",x"88",x"90",x"98",x"50",x"90",x"88",x"88",x"90",x"98",x"50",x"90",x"88",x"88",x"90",x"2d",x"0c",x"ff",x"0b",x"33",x"38",x"70",x"70",x"38",x"b0",x"9e",x"08",x"f0",x"0b",x"b4",x"0d",x"3d",x"0b",x"80",x"0b",x"80",x"09",x"38",x"04",x"9e",x"0b",x"3f",x"04",x"0d",x"80",x"08",x"70",x"51",x"38",x"04",x"80",x"84",x"70",x"81",x"51",x"73",x"0c",x"04",x"74",x"80",x"70",x"ff",x"51",x"26",x"fd",x"2d",x"51",x"84",x"72",x"2d",x"04",x"83",x"83",x"80",x"a0",x"0d",x"0d",x"08",x"52",x"2d",x"06",x"2d",x"8a",x"3d",x"3d",x"80",x"72",x"06",x"9f",x"08",x"38",x"51",x"27",x"80",x"71",x"0c",x"82",x"88",x"0d",x"ff",x"80",x"80",x"80",x"9f",x"0a",x"3d",x"08",x"c8",x"70",x"80",x"0c",x"3d",x"3d",x"80",x"08",x"ff",x"52",x"0d",x"0b",x"9e",x"84",x"2d",x"73",x"0c",x"95",x"0c",x"70",x"ff",x"83",x"f8",x"80",x"80",x"83",x"8c",x"51",x"88",x"95",x"9e",x"70",x"0c",x"ff",x"88",x"80",x"38",x"77",x"ff",x"ff",x"80",x"77",x"08",x"ff",x"f3",x"17",x"0c",x"57",x"2e",x"dd",x"8b",x"08",x"2e",x"98",x"08",x"a0",x"2e",x"c2",x"2d",x"39",x"8a",x"39",x"08",x"06",x"53",x"8c",x"39",x"9e",x"11",x"51",x"70",x"ff",x"52",x"0d",x"0d",x"72",x"51",x"8b",x"3d",x"3d",x"80",x"8c",x"73",x"0c",x"81",x"53",x"fe",x"0c",x"04",x"76",x"82",x"81",x"71",x"29",x"33",x"29",x"33",x"a0",x"16",x"ff",x"52",x"57",x"ff",x"73",x"55",x"75",x"57",x"53",x"09",x"38",x"ad",x"0d",x"0d",x"c0",x"56",x"81",x"18",x"80",x"53",x"94",x"72",x"70",x"33",x"14",x"38",x"84",x"82",x"56",x"73",x"38",x"76",x"76",x"71",x"14",x"26",x"51",x"8a",x"84",x"2d",x"51",x"74",x"2d",x"75",x"73",x"52",x"2d",x"74",x"38",x"89",x"f9",x"56",x"80",x"9a",x"0c",x"fe",x"2d",x"76",x"33",x"71",x"05",x"78",x"33",x"19",x"59",x"54",x"ac",x"73",x"73",x"33",x"11",x"52",x"fe",x"2d",x"06",x"38",x"76",x"38",x"84",x"51",x"8a",x"87",x"2d",x"89",x"8c",x"75",x"86",x"0c",x"76",x"51",x"ff",x"3d",x"11",x"33",x"71",x"83",x"72",x"84",x"07",x"57",x"88",x"2d",x"8a",x"c4",x"53",x"81",x"06",x"71",x"84",x"80",x"84",x"0d",x"0d",x"88",x"81",x"71",x"f4",x"51",x"72",x"2d",x"84",x"fe",x"0b",x"8a",x"81",x"2d",x"8f",x"81",x"51",x"ff",x"ff",x"06",x"89",x"0d",x"0d",x"bc",x"2d",x"8a",x"c0",x"52",x"81",x"80",x"9c",x"72",x"fe",x"c4",x"2a",x"2d",x"88",x"c0",x"08",x"2d",x"88",x"c0",x"2d",x"04",x"81",x"0c",x"90",x"51",x"82",x"80",x"0b",x"8b",x"51",x"82",x"ff",x"c0",x"52",x"ad",x"2d",x"c0",x"10",x"84",x"0c",x"fe",x"2d",x"83",x"ff",x"80",x"0c",x"bc",x"8e",x"80",x"80",x"c4",x"0c",x"80",x"ff",x"70",x"0c",x"c8",x"70",x"06",x"53",x"96",x"05",x"f3",x"9b",x"12",x"0b",x"53",x"d0",x"0c",x"d0",x"e5",x"88",x"80",x"81",x"0a",x"80",x"52",x"2d",x"71",x"2d",x"84",x"51",x"76",x"5e",x"d0",x"aa",x"53",x"bc",x"80",x"d2",x"80",x"be",x"9f",x"79",x"38",x"08",x"5a",x"77",x"05",x"34",x"8b",x"08",x"38",x"fe",x"06",x"78",x"ff",x"77",x"a2",x"ff",x"80",x"38",x"58",x"77",x"38",x"7b",x"18",x"72",x"80",x"88",x"72",x"79",x"13",x"26",x"16",x"75",x"70",x"70",x"07",x"51",x"71",x"81",x"38",x"72",x"ba",x"10",x"75",x"51",x"fe",x"5a",x"80",x"08",x"08",x"51",x"0c",x"0c",x"d0",x"3d",x"3d",x"80",x"2d",x"04",x"0d",x"81",x"a0",x"3d",x"55",x"75",x"38",x"9d",x"73",x"80",x"08",x"2e",x"08",x"88",x"0d",x"76",x"54",x"30",x"73",x"38",x"3d",x"57",x"76",x"38",x"54",x"74",x"52",x"3f",x"76",x"38",x"54",x"88",x"74",x"57",x"3d",x"53",x"80",x"52",x"2e",x"80",x"80",x"38",x"10",x"53",x"ea",x"78",x"51",x"86",x"72",x"81",x"72",x"38",x"ef",x"31",x"74",x"81",x"56",x"fc",x"70",x"55",x"72",x"72",x"06",x"2e",x"12",x"2e",x"70",x"33",x"05",x"12",x"2e",x"ea",x"0c",x"04",x"70",x"08",x"05",x"70",x"08",x"05",x"70",x"08",x"05",x"70",x"08",x"05",x"12",x"26",x"72",x"72",x"54",x"84",x"fc",x"83",x"70",x"39",x"76",x"8c",x"33",x"55",x"8a",x"06",x"2e",x"12",x"2e",x"73",x"55",x"52",x"09",x"38",x"86",x"74",x"75",x"90",x"54",x"27",x"71",x"53",x"70",x"0c",x"84",x"72",x"05",x"12",x"26",x"72",x"72",x"05",x"12",x"26",x"53",x"fb",x"79",x"83",x"52",x"71",x"54",x"73",x"c4",x"54",x"70",x"52",x"2e",x"33",x"2e",x"95",x"81",x"70",x"54",x"70",x"33",x"ff",x"ff",x"31",x"52",x"04",x"f7",x"14",x"84",x"06",x"70",x"14",x"08",x"71",x"dc",x"54",x"39",x"0c",x"04",x"9e",x"05",x"52",x"91",x"fc",x"52",x"2e",x"f1",x"0d",x"c7",x"00",x"ff",x"ff",x"ff",x"00",x"77",x"a9",x"51",x"c5",x"00",x"17",x"5b",x"fe",x"68",x"2b",x"40",x"80",x"00",x"00",x"00",x"00",x"00",x"54",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); shared variable RAM1: RAM_TABLE := RAM_TABLE'( x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"06",x"06",x"82",x"2a",x"06",x"00",x"00",x"00",x"06",x"ff",x"09",x"05",x"09",x"ff",x"0b",x"04",x"81",x"73",x"09",x"73",x"81",x"04",x"00",x"00",x"24",x"07",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"81",x"0a",x"0a",x"05",x"51",x"04",x"00",x"26",x"07",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"9f",x"05",x"88",x"00",x"00",x"00",x"00",x"00",x"2a",x"06",x"09",x"ff",x"53",x"00",x"00",x"00",x"53",x"04",x"06",x"82",x"0b",x"fc",x"51",x"00",x"81",x"09",x"09",x"06",x"00",x"00",x"00",x"00",x"81",x"09",x"09",x"81",x"04",x"00",x"00",x"00",x"81",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"09",x"51",x"00",x"00",x"00",x"00",x"00",x"06",x"06",x"83",x"10",x"06",x"00",x"00",x"00",x"06",x"0b",x"83",x"05",x"0b",x"04",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"70",x"06",x"ff",x"71",x"72",x"05",x"51",x"00",x"70",x"06",x"06",x"54",x"09",x"ff",x"51",x"00",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"a4",x"00",x"00",x"00",x"00",x"00",x"00",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"05",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"05",x"53",x"04",x"00",x"00",x"00",x"00",x"00",x"3f",x"04",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"53",x"81",x"83",x"05",x"10",x"72",x"51",x"04",x"72",x"05",x"05",x"72",x"53",x"51",x"04",x"08",x"75",x"50",x"56",x"0c",x"04",x"08",x"75",x"50",x"56",x"0c",x"04",x"08",x"90",x"8c",x"04",x"0b",x"b4",x"a6",x"08",x"52",x"92",x"9e",x"2d",x"70",x"70",x"0b",x"9e",x"3d",x"80",x"0b",x"08",x"38",x"0b",x"2e",x"85",x"0d",x"0b",x"0b",x"81",x"0d",x"3d",x"80",x"71",x"2a",x"51",x"f3",x"0d",x"0d",x"80",x"08",x"70",x"51",x"38",x"0a",x"0d",x"0d",x"dc",x"0c",x"06",x"54",x"81",x"80",x"a0",x"32",x"2d",x"04",x"a0",x"0d",x"0d",x"0b",x"0c",x"8a",x"3d",x"3d",x"0a",x"2a",x"c0",x"ff",x"c0",x"51",x"83",x"fe",x"c4",x"53",x"81",x"70",x"c0",x"f0",x"08",x"71",x"71",x"0c",x"0a",x"2d",x"08",x"3d",x"f6",x"cc",x"0c",x"cc",x"0c",x"90",x"ff",x"70",x"80",x"84",x"84",x"72",x"83",x"ff",x"c8",x"70",x"ff",x"0c",x"3d",x"90",x"0c",x"a0",x"93",x"0d",x"71",x"52",x"72",x"0c",x"ff",x"0c",x"04",x"a0",x"c0",x"54",x"57",x"73",x"2d",x"10",x"05",x"80",x"74",x"83",x"59",x"df",x"db",x"ff",x"08",x"74",x"38",x"53",x"73",x"0c",x"72",x"84",x"72",x"57",x"ff",x"06",x"51",x"76",x"79",x"06",x"84",x"fa",x"80",x"80",x"a0",x"ff",x"51",x"ff",x"70",x"bf",x"53",x"2d",x"ff",x"0d",x"81",x"0c",x"0a",x"fe",x"0c",x"3d",x"3d",x"2d",x"07",x"2d",x"82",x"fe",x"c0",x"53",x"85",x"73",x"70",x"74",x"8b",x"88",x"0d",x"0d",x"33",x"71",x"29",x"80",x"14",x"80",x"16",x"05",x"86",x"33",x"57",x"55",x"72",x"38",x"05",x"71",x"05",x"13",x"2e",x"e8",x"8e",x"3d",x"3d",x"80",x"84",x"2d",x"82",x"82",x"53",x"2e",x"17",x"72",x"54",x"ff",x"f3",x"33",x"71",x"05",x"54",x"97",x"77",x"17",x"53",x"81",x"74",x"75",x"2d",x"81",x"c0",x"2a",x"2d",x"c0",x"73",x"38",x"33",x"c0",x"54",x"f0",x"2d",x"04",x"79",x"80",x"8c",x"75",x"8b",x"9a",x"70",x"17",x"33",x"29",x"33",x"19",x"85",x"0c",x"80",x"27",x"58",x"38",x"11",x"87",x"0c",x"8b",x"c2",x"81",x"f6",x"54",x"d8",x"2d",x"74",x"2d",x"81",x"c0",x"2d",x"04",x"77",x"16",x"76",x"33",x"74",x"2d",x"fc",x"81",x"12",x"2b",x"07",x"70",x"2b",x"71",x"53",x"52",x"ad",x"51",x"80",x"84",x"70",x"81",x"52",x"73",x"07",x"80",x"3d",x"3d",x"2d",x"08",x"53",x"8a",x"83",x"2d",x"c0",x"2d",x"04",x"80",x"0c",x"81",x"c0",x"53",x"70",x"33",x"2d",x"71",x"81",x"8b",x"3d",x"3d",x"9e",x"f4",x"51",x"80",x"84",x"2d",x"0b",x"80",x"08",x"8b",x"9e",x"90",x"c0",x"08",x"8a",x"c4",x"c0",x"2d",x"8a",x"89",x"0d",x"0d",x"c0",x"83",x"85",x"2d",x"04",x"80",x"0c",x"86",x"2d",x"04",x"80",x"84",x"8e",x"9a",x"8c",x"08",x"80",x"b8",x"8b",x"85",x"2d",x"04",x"0d",x"c0",x"9e",x"0b",x"a0",x"84",x"80",x"84",x"80",x"fb",x"08",x"75",x"80",x"94",x"76",x"53",x"99",x"84",x"99",x"53",x"88",x"9b",x"0c",x"80",x"84",x"80",x"8b",x"88",x"dc",x"0c",x"90",x"c0",x"70",x"fe",x"2d",x"fe",x"2d",x"71",x"2d",x"3d",x"83",x"8b",x"08",x"2e",x"08",x"80",x"08",x"81",x"82",x"38",x"89",x"88",x"54",x"3d",x"e0",x"72",x"57",x"88",x"c6",x"80",x"81",x"38",x"ff",x"81",x"ff",x"59",x"76",x"97",x"78",x"82",x"8b",x"ff",x"fe",x"78",x"38",x"80",x"58",x"33",x"81",x"73",x"ff",x"54",x"05",x"33",x"2b",x"53",x"52",x"09",x"c3",x"53",x"fe",x"10",x"05",x"08",x"2d",x"81",x"39",x"88",x"90",x"08",x"90",x"8a",x"80",x"82",x"ff",x"52",x"db",x"0d",x"f8",x"04",x"0d",x"fb",x"79",x"56",x"ab",x"24",x"53",x"51",x"88",x"80",x"88",x"73",x"3d",x"30",x"57",x"74",x"56",x"d2",x"fa",x"7a",x"57",x"a4",x"2c",x"75",x"31",x"9b",x"54",x"85",x"30",x"0c",x"04",x"81",x"fc",x"78",x"53",x"26",x"80",x"70",x"38",x"a4",x"73",x"26",x"72",x"51",x"74",x"0c",x"04",x"72",x"53",x"e6",x"26",x"72",x"07",x"74",x"55",x"39",x"76",x"55",x"8f",x"38",x"83",x"80",x"ff",x"ff",x"72",x"54",x"81",x"ff",x"ff",x"06",x"88",x"0d",x"72",x"54",x"84",x"72",x"54",x"84",x"72",x"54",x"84",x"72",x"54",x"84",x"f0",x"8f",x"83",x"38",x"05",x"70",x"0c",x"71",x"38",x"83",x"0d",x"02",x"05",x"53",x"27",x"83",x"80",x"ff",x"ff",x"73",x"05",x"12",x"2e",x"ef",x"0c",x"04",x"2b",x"71",x"51",x"72",x"72",x"05",x"71",x"53",x"70",x"0c",x"84",x"f0",x"8f",x"83",x"38",x"84",x"fc",x"83",x"70",x"39",x"77",x"07",x"54",x"38",x"08",x"71",x"80",x"75",x"33",x"06",x"80",x"72",x"75",x"06",x"12",x"33",x"06",x"52",x"72",x"81",x"81",x"71",x"52",x"0d",x"70",x"ff",x"f8",x"80",x"51",x"84",x"71",x"54",x"2e",x"75",x"96",x"88",x"0d",x"0d",x"fc",x"52",x"2e",x"2d",x"08",x"ff",x"06",x"3d",x"eb",x"00",x"ff",x"ff",x"00",x"ff",x"09",x"09",x"09",x"07",x"0a",x"0a",x"08",x"08",x"07",x"0a",x"05",x"6f",x"d8",x"0f",x"00",x"00",x"00",x"0f",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); shared variable RAM2: RAM_TABLE := RAM_TABLE'( x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"fd",x"83",x"05",x"2b",x"ff",x"00",x"00",x"00",x"fd",x"ff",x"06",x"82",x"2b",x"83",x"0b",x"a7",x"09",x"05",x"06",x"09",x"0a",x"51",x"00",x"00",x"72",x"2e",x"04",x"00",x"00",x"00",x"00",x"00",x"73",x"06",x"72",x"72",x"31",x"06",x"51",x"00",x"72",x"2e",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"0a",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"81",x"0b",x"04",x"00",x"00",x"00",x"00",x"72",x"9f",x"74",x"06",x"07",x"00",x"00",x"00",x"71",x"0d",x"83",x"05",x"2b",x"72",x"51",x"00",x"09",x"05",x"05",x"81",x"04",x"00",x"00",x"00",x"09",x"05",x"05",x"09",x"51",x"00",x"00",x"00",x"09",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"73",x"53",x"00",x"00",x"00",x"00",x"00",x"fc",x"83",x"05",x"10",x"ff",x"00",x"00",x"00",x"fc",x"0b",x"73",x"10",x"0b",x"a9",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"09",x"06",x"54",x"09",x"ff",x"51",x"00",x"09",x"09",x"81",x"70",x"73",x"05",x"07",x"04",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"9e",x"04",x"00",x"00",x"00",x"00",x"00",x"81",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"84",x"10",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"71",x"0d",x"00",x"00",x"00",x"00",x"00",x"d4",x"3f",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"73",x"73",x"81",x"10",x"07",x"0c",x"3c",x"80",x"ff",x"06",x"52",x"0a",x"38",x"51",x"8c",x"75",x"2d",x"08",x"8c",x"51",x"8c",x"75",x"2d",x"08",x"8c",x"51",x"8c",x"8e",x"0c",x"0c",x"0d",x"9e",x"70",x"b0",x"52",x"2e",x"12",x"70",x"08",x"52",x"81",x"0b",x"83",x"04",x"0b",x"d8",x"8e",x"0b",x"80",x"06",x"3d",x"0b",x"51",x"f6",x"3d",x"ff",x"c4",x"52",x"82",x"06",x"70",x"3d",x"3d",x"80",x"71",x"2a",x"51",x"f3",x"90",x"3d",x"3d",x"80",x"88",x"ff",x"11",x"71",x"38",x"8a",x"a0",x"a0",x"0d",x"8a",x"3d",x"3d",x"ff",x"0a",x"51",x"82",x"ff",x"d0",x"88",x"8a",x"81",x"8a",x"fe",x"2d",x"04",x"80",x"84",x"70",x"51",x"9e",x"71",x"bc",x"e8",x"38",x"0a",x"90",x"8c",x"0a",x"84",x"82",x"80",x"88",x"80",x"84",x"83",x"04",x"73",x"51",x"80",x"70",x"07",x"52",x"04",x"80",x"84",x"fb",x"72",x"83",x"a0",x"80",x"0b",x"98",x"3d",x"8b",x"11",x"80",x"72",x"83",x"88",x"0d",x"0d",x"80",x"84",x"0a",x"2d",x"c0",x"10",x"84",x"0c",x"0c",x"08",x"06",x"81",x"80",x"ff",x"88",x"55",x"a7",x"84",x"0c",x"18",x"53",x"75",x"08",x"17",x"74",x"81",x"73",x"2d",x"71",x"81",x"a0",x"71",x"9e",x"38",x"8a",x"39",x"c3",x"2d",x"0a",x"ff",x"0c",x"85",x"2d",x"3d",x"08",x"bc",x"90",x"70",x"72",x"83",x"80",x"f4",x"80",x"c0",x"2d",x"04",x"80",x"84",x"2d",x"80",x"08",x"06",x"52",x"71",x"3d",x"3d",x"11",x"33",x"0a",x"80",x"83",x"82",x"84",x"71",x"05",x"17",x"51",x"53",x"53",x"9a",x"81",x"52",x"81",x"ff",x"ff",x"06",x"51",x"86",x"f9",x"57",x"80",x"9a",x"33",x"71",x"05",x"80",x"85",x"53",x"05",x"0c",x"73",x"17",x"33",x"29",x"80",x"27",x"58",x"73",x"53",x"34",x"74",x"38",x"fe",x"2d",x"8a",x"88",x"c0",x"8a",x"54",x"92",x"70",x"8a",x"14",x"26",x"89",x"0d",x"0d",x"c0",x"55",x"86",x"51",x"8c",x"ad",x"81",x"18",x"80",x"19",x"84",x"0c",x"78",x"53",x"77",x"72",x"c1",x"86",x"0c",x"76",x"51",x"8e",x"08",x"71",x"14",x"26",x"9a",x"0c",x"fe",x"2d",x"8a",x"89",x"0d",x"2d",x"73",x"33",x"11",x"52",x"fe",x"39",x"76",x"82",x"90",x"2b",x"33",x"88",x"33",x"52",x"54",x"8e",x"ff",x"2d",x"80",x"08",x"70",x"51",x"38",x"80",x"80",x"86",x"fe",x"c2",x"88",x"53",x"38",x"81",x"c0",x"8a",x"89",x"0d",x"0d",x"bc",x"2d",x"8a",x"94",x"72",x"54",x"c0",x"52",x"09",x"38",x"84",x"fe",x"0b",x"8a",x"82",x"2d",x"80",x"9a",x"0a",x"80",x"71",x"53",x"72",x"72",x"8a",x"c4",x"51",x"9e",x"8a",x"c2",x"51",x"8b",x"3d",x"3d",x"9e",x"0b",x"0c",x"ad",x"0d",x"0d",x"c0",x"2d",x"ad",x"0d",x"0d",x"80",x"51",x"8c",x"51",x"88",x"95",x"9e",x"51",x"8a",x"b1",x"0d",x"3d",x"9e",x"0b",x"80",x"0b",x"57",x"0b",x"80",x"c8",x"53",x"73",x"06",x"54",x"80",x"70",x"0c",x"70",x"70",x"0c",x"0c",x"0b",x"9c",x"12",x"0b",x"80",x"0b",x"0c",x"82",x"80",x"84",x"0b",x"80",x"84",x"8b",x"9a",x"8b",x"9a",x"0c",x"fe",x"8f",x"5a",x"5b",x"88",x"80",x"88",x"2e",x"88",x"2e",x"76",x"bf",x"2e",x"0b",x"32",x"d5",x"fd",x"72",x"17",x"2d",x"78",x"08",x"09",x"b0",x"83",x"0c",x"59",x"80",x"39",x"ff",x"7c",x"59",x"ff",x"ff",x"78",x"53",x"98",x"80",x"55",x"70",x"52",x"73",x"38",x"11",x"ff",x"74",x"88",x"08",x"51",x"2e",x"fe",x"33",x"26",x"72",x"e8",x"70",x"71",x"39",x"a4",x"0d",x"08",x"80",x"2d",x"0c",x"0b",x"0c",x"04",x"80",x"94",x"3d",x"ff",x"df",x"f8",x"04",x"77",x"80",x"24",x"74",x"80",x"74",x"3f",x"75",x"38",x"54",x"87",x"73",x"32",x"39",x"81",x"25",x"39",x"78",x"80",x"24",x"9f",x"53",x"74",x"51",x"08",x"2e",x"08",x"88",x"0d",x"55",x"39",x"76",x"81",x"73",x"72",x"38",x"a9",x"24",x"10",x"72",x"52",x"73",x"38",x"88",x"0d",x"2a",x"53",x"2e",x"74",x"73",x"74",x"2a",x"55",x"e5",x"0d",x"7b",x"55",x"8c",x"07",x"70",x"38",x"71",x"38",x"05",x"70",x"34",x"71",x"81",x"74",x"3d",x"51",x"05",x"70",x"0c",x"05",x"70",x"0c",x"05",x"70",x"0c",x"05",x"70",x"0c",x"71",x"38",x"95",x"84",x"71",x"53",x"52",x"ed",x"ff",x"3d",x"71",x"9f",x"55",x"72",x"74",x"70",x"38",x"71",x"38",x"81",x"ff",x"ff",x"06",x"88",x"0d",x"88",x"70",x"07",x"8f",x"38",x"84",x"72",x"05",x"71",x"53",x"70",x"0c",x"71",x"38",x"90",x"70",x"0c",x"71",x"38",x"90",x"0d",x"72",x"53",x"93",x"73",x"54",x"2e",x"73",x"71",x"ff",x"70",x"38",x"70",x"81",x"81",x"71",x"ff",x"54",x"38",x"73",x"75",x"71",x"0c",x"3d",x"09",x"fd",x"70",x"81",x"51",x"38",x"16",x"56",x"08",x"73",x"ff",x"0b",x"3d",x"3d",x"0b",x"08",x"ff",x"70",x"70",x"70",x"81",x"83",x"04",x"04",x"ff",x"00",x"ff",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"08",x"00",x"b8",x"01",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); shared variable RAM3: RAM_TABLE := RAM_TABLE'( x"0b",x"fe",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"df",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"72",x"81",x"83",x"ff",x"04",x"00",x"00",x"71",x"83",x"83",x"05",x"2b",x"73",x"0b",x"83",x"72",x"72",x"09",x"73",x"07",x"53",x"00",x"00",x"72",x"73",x"51",x"00",x"00",x"00",x"00",x"00",x"71",x"71",x"30",x"0a",x"0a",x"81",x"53",x"00",x"72",x"73",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"c3",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"0a",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"09",x"0b",x"05",x"00",x"00",x"00",x"00",x"72",x"73",x"09",x"81",x"06",x"04",x"00",x"00",x"71",x"02",x"73",x"81",x"83",x"07",x"0c",x"00",x"72",x"72",x"81",x"0a",x"51",x"00",x"00",x"00",x"72",x"72",x"81",x"0a",x"53",x"00",x"00",x"00",x"71",x"52",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"05",x"04",x"00",x"00",x"00",x"00",x"00",x"72",x"73",x"07",x"00",x"00",x"00",x"00",x"00",x"71",x"72",x"81",x"10",x"81",x"04",x"00",x"00",x"71",x"0b",x"dc",x"10",x"06",x"88",x"00",x"00",x"0b",x"f7",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"df",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"05",x"81",x"70",x"73",x"05",x"07",x"04",x"72",x"05",x"09",x"05",x"06",x"74",x"06",x"51",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"81",x"0b",x"51",x"00",x"00",x"00",x"00",x"00",x"71",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"02",x"10",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"05",x"02",x"00",x"00",x"00",x"00",x"00",x"81",x"ab",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"04",x"06",x"09",x"05",x"2b",x"06",x"04",x"72",x"06",x"72",x"10",x"10",x"ed",x"53",x"08",x"08",x"de",x"88",x"0c",x"0c",x"08",x"08",x"9a",x"88",x"0c",x"0c",x"08",x"08",x"90",x"88",x"3d",x"0b",x"51",x"9e",x"08",x"80",x"84",x"0c",x"b0",x"52",x"38",x"0b",x"34",x"04",x"0d",x"9e",x"2e",x"0b",x"0b",x"81",x"82",x"0b",x"d8",x"0b",x"82",x"04",x"80",x"84",x"70",x"81",x"51",x"83",x"ff",x"c4",x"52",x"81",x"06",x"70",x"82",x"83",x"fe",x"70",x"80",x"81",x"83",x"53",x"92",x"51",x"72",x"8a",x"3d",x"51",x"84",x"80",x"ff",x"d0",x"fe",x"2d",x"04",x"83",x"70",x"52",x"71",x"51",x"80",x"a0",x"0d",x"0d",x"80",x"08",x"51",x"38",x"52",x"9e",x"87",x"e6",x"d0",x"83",x"98",x"90",x"0c",x"04",x"0b",x"80",x"0b",x"80",x"0b",x"0c",x"0d",x"51",x"80",x"08",x"80",x"52",x"0d",x"0d",x"80",x"70",x"06",x"52",x"04",x"a0",x"b8",x"0c",x"ff",x"51",x"90",x"80",x"80",x"08",x"06",x"3d",x"3d",x"56",x"80",x"d0",x"9a",x"8c",x"08",x"80",x"b8",x"75",x"73",x"ff",x"08",x"26",x"83",x"0c",x"05",x"2e",x"58",x"74",x"88",x"13",x"38",x"75",x"ff",x"53",x"09",x"38",x"fe",x"52",x"09",x"38",x"52",x"84",x"93",x"51",x"ff",x"80",x"a0",x"90",x"70",x"72",x"8a",x"b1",x"ff",x"bc",x"9e",x"83",x"08",x"06",x"52",x"04",x"8a",x"81",x"8a",x"89",x"0d",x"0d",x"80",x"9a",x"0c",x"72",x"ff",x"51",x"2d",x"84",x"fc",x"81",x"12",x"80",x"84",x"05",x"70",x"12",x"52",x"80",x"85",x"11",x"53",x"55",x"2e",x"70",x"33",x"70",x"34",x"72",x"81",x"89",x"2d",x"04",x"79",x"80",x"8c",x"17",x"33",x"29",x"71",x"38",x"55",x"81",x"76",x"54",x"83",x"18",x"80",x"52",x"75",x"73",x"0c",x"08",x"73",x"54",x"ed",x"8b",x"f4",x"51",x"74",x"8a",x"51",x"80",x"27",x"17",x"52",x"81",x"74",x"8b",x"3d",x"3d",x"80",x"84",x"2d",x"74",x"2d",x"81",x"0c",x"82",x"82",x"83",x"0c",x"78",x"33",x"53",x"73",x"38",x"80",x"16",x"76",x"33",x"74",x"2d",x"88",x"52",x"82",x"74",x"8c",x"75",x"8b",x"f4",x"51",x"8b",x"3d",x"9a",x"0c",x"11",x"87",x"0c",x"8b",x"b8",x"0d",x"33",x"71",x"88",x"14",x"07",x"16",x"51",x"57",x"51",x"81",x"a0",x"80",x"72",x"2a",x"51",x"f3",x"80",x"c4",x"0c",x"04",x"8e",x"08",x"06",x"f3",x"2d",x"8a",x"51",x"8b",x"3d",x"3d",x"9e",x"f4",x"51",x"9e",x"52",x"05",x"8a",x"12",x"2e",x"ec",x"2d",x"04",x"80",x"0c",x"81",x"c0",x"80",x"8c",x"f9",x"c0",x"0c",x"52",x"2d",x"0c",x"51",x"9e",x"2a",x"2d",x"51",x"8e",x"08",x"2d",x"84",x"80",x"0b",x"80",x"0a",x"8e",x"3d",x"3d",x"9e",x"e5",x"8e",x"3d",x"3d",x"80",x"8a",x"2d",x"71",x"2d",x"10",x"05",x"71",x"2d",x"8c",x"3d",x"ad",x"0b",x"80",x"0c",x"90",x"0c",x"b3",x"80",x"80",x"a4",x"ff",x"72",x"53",x"80",x"08",x"72",x"a8",x"71",x"53",x"71",x"8c",x"0c",x"8c",x"88",x"80",x"81",x"0a",x"2d",x"0b",x"80",x"f2",x"0c",x"80",x"52",x"8c",x"51",x"8c",x"72",x"8b",x"77",x"5a",x"0a",x"2d",x"78",x"38",x"fe",x"38",x"fd",x"38",x"26",x"80",x"80",x"a0",x"80",x"05",x"52",x"81",x"aa",x"53",x"88",x"2e",x"ff",x"57",x"7b",x"5b",x"39",x"9d",x"2e",x"80",x"56",x"27",x"83",x"0c",x"53",x"27",x"dc",x"72",x"15",x"0c",x"53",x"f2",x"75",x"05",x"33",x"72",x"7e",x"55",x"73",x"06",x"74",x"8a",x"38",x"9d",x"52",x"52",x"a9",x"fe",x"3d",x"8c",x"a0",x"70",x"8c",x"81",x"0a",x"0d",x"0d",x"51",x"83",x"81",x"8c",x"ff",x"88",x"0d",x"55",x"75",x"80",x"38",x"52",x"e1",x"54",x"85",x"30",x"0c",x"04",x"81",x"dc",x"55",x"80",x"ec",x"0d",x"55",x"75",x"75",x"81",x"32",x"74",x"88",x"80",x"88",x"73",x"3d",x"30",x"d7",x"0d",x"54",x"74",x"55",x"98",x"2e",x"72",x"71",x"75",x"54",x"38",x"83",x"70",x"3d",x"81",x"2a",x"80",x"71",x"38",x"75",x"81",x"2a",x"54",x"3d",x"79",x"55",x"27",x"75",x"51",x"a7",x"52",x"98",x"81",x"74",x"56",x"52",x"09",x"38",x"86",x"74",x"84",x"71",x"53",x"84",x"71",x"53",x"84",x"71",x"53",x"84",x"71",x"53",x"52",x"c9",x"27",x"70",x"08",x"05",x"12",x"26",x"54",x"fc",x"79",x"05",x"57",x"83",x"38",x"51",x"a2",x"52",x"93",x"70",x"34",x"71",x"81",x"74",x"3d",x"74",x"07",x"2b",x"51",x"a5",x"70",x"0c",x"84",x"72",x"05",x"71",x"53",x"52",x"dd",x"27",x"71",x"53",x"52",x"f2",x"ff",x"3d",x"70",x"06",x"70",x"73",x"56",x"08",x"38",x"52",x"81",x"54",x"9d",x"55",x"09",x"38",x"14",x"81",x"56",x"e5",x"55",x"06",x"06",x"88",x"87",x"71",x"fb",x"06",x"82",x"51",x"97",x"84",x"54",x"75",x"38",x"52",x"80",x"87",x"ff",x"cc",x"70",x"70",x"38",x"12",x"52",x"09",x"38",x"04",x"3f",x"00",x"ff",x"ff",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"01",x"00",x"05",x"a4",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); signal rwea: std_logic_vector(3 downto 0); signal rweb: std_logic_vector(3 downto 0); signal memaread0: std_logic_vector(7 downto 0); signal membread0: std_logic_vector(7 downto 0); signal memaread1: std_logic_vector(7 downto 0); signal membread1: std_logic_vector(7 downto 0); signal memaread2: std_logic_vector(7 downto 0); signal membread2: std_logic_vector(7 downto 0); signal memaread3: std_logic_vector(7 downto 0); signal membread3: std_logic_vector(7 downto 0); begin rwea(0) <= WEA and MASKA(0); rweb(0) <= WEB and MASKB(0); rwea(1) <= WEA and MASKA(1); rweb(1) <= WEB and MASKB(1); rwea(2) <= WEA and MASKA(2); rweb(2) <= WEB and MASKB(2); rwea(3) <= WEA and MASKA(3); rweb(3) <= WEB and MASKB(3); DOA(7 downto 0) <= memaread0; DOB(7 downto 0) <= membread0; DOA(15 downto 8) <= memaread1; DOB(15 downto 8) <= membread1; DOA(23 downto 16) <= memaread2; DOB(23 downto 16) <= membread2; DOA(31 downto 24) <= memaread3; DOB(31 downto 24) <= membread3; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(0)='1' then RAM0( conv_integer(ADDRA) ) := DIA(7 downto 0); end if; memaread0 <= RAM0(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(0)='1' then RAM0( conv_integer(ADDRB) ) := DIB(7 downto 0); end if; membread0 <= RAM0(conv_integer(ADDRB)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(1)='1' then RAM1( conv_integer(ADDRA) ) := DIA(15 downto 8); end if; memaread1 <= RAM1(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(1)='1' then RAM1( conv_integer(ADDRB) ) := DIB(15 downto 8); end if; membread1 <= RAM1(conv_integer(ADDRB)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(2)='1' then RAM2( conv_integer(ADDRA) ) := DIA(23 downto 16); end if; memaread2 <= RAM2(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(2)='1' then RAM2( conv_integer(ADDRB) ) := DIB(23 downto 16); end if; membread2 <= RAM2(conv_integer(ADDRB)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(3)='1' then RAM3( conv_integer(ADDRA) ) := DIA(31 downto 24); end if; memaread3 <= RAM3(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(3)='1' then RAM3( conv_integer(ADDRB) ) := DIB(31 downto 24); end if; membread3 <= RAM3(conv_integer(ADDRB)) ; end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/WING_Analog/Libraries/ZPUino_1/board_Papilio_One_500k/prom-generic-dp-32.vhd
13
200723
library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; use ieee.numeric_std.all; entity prom_generic_dualport is port ( CLK: in std_logic; WEA: in std_logic; ENA: in std_logic; MASKA: in std_logic_vector(3 downto 0); ADDRA: in std_logic_vector(14 downto 2); DIA: in std_logic_vector(31 downto 0); DOA: out std_logic_vector(31 downto 0); WEB: in std_logic; ENB: in std_logic; ADDRB: in std_logic_vector(14 downto 2); DIB: in std_logic_vector(31 downto 0); MASKB: in std_logic_vector(3 downto 0); DOB: out std_logic_vector(31 downto 0) ); end entity prom_generic_dualport; architecture behave of prom_generic_dualport is subtype RAM_WORD is STD_LOGIC_VECTOR (7 downto 0); type RAM_TABLE is array (0 to 8191) of RAM_WORD; shared variable RAM0: RAM_TABLE := RAM_TABLE'( x"97",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"97",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"08",x"09",x"05",x"83",x"52",x"00",x"00",x"00",x"08",x"73",x"81",x"83",x"06",x"ff",x"0b",x"00",x"05",x"73",x"06",x"06",x"06",x"00",x"00",x"00",x"73",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"06",x"10",x"10",x"0a",x"51",x"00",x"00",x"73",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"88",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"2b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"06",x"0b",x"a6",x"00",x"00",x"00",x"00",x"00",x"ff",x"2a",x"0a",x"05",x"51",x"00",x"00",x"00",x"51",x"06",x"09",x"05",x"2b",x"06",x"04",x"00",x"05",x"70",x"06",x"53",x"00",x"00",x"00",x"00",x"05",x"70",x"06",x"06",x"00",x"00",x"00",x"00",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"81",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"06",x"06",x"04",x"00",x"00",x"00",x"00",x"00",x"08",x"09",x"05",x"2a",x"52",x"00",x"00",x"00",x"08",x"9d",x"06",x"08",x"0b",x"00",x"00",x"00",x"88",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"88",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"81",x"0a",x"05",x"06",x"74",x"06",x"51",x"00",x"81",x"0a",x"ff",x"71",x"72",x"05",x"51",x"00",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"0c",x"00",x"00",x"00",x"00",x"00",x"00",x"52",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"52",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"ff",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"95",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"51",x"ff",x"06",x"83",x"10",x"fc",x"51",x"72",x"81",x"09",x"71",x"0a",x"72",x"51",x"88",x"90",x"98",x"50",x"90",x"88",x"88",x"90",x"98",x"50",x"90",x"88",x"88",x"90",x"2d",x"0c",x"ff",x"0b",x"33",x"38",x"70",x"70",x"38",x"b0",x"9e",x"08",x"f0",x"0b",x"b4",x"0d",x"3d",x"0b",x"80",x"0b",x"80",x"09",x"38",x"04",x"9e",x"0b",x"3f",x"04",x"0d",x"80",x"08",x"70",x"51",x"38",x"04",x"80",x"84",x"70",x"81",x"51",x"73",x"0c",x"04",x"74",x"80",x"70",x"ff",x"51",x"26",x"fd",x"2d",x"51",x"84",x"72",x"2d",x"04",x"83",x"83",x"80",x"a0",x"0d",x"0d",x"08",x"52",x"2d",x"06",x"2d",x"8a",x"3d",x"3d",x"80",x"72",x"06",x"9f",x"08",x"38",x"51",x"27",x"80",x"71",x"0c",x"82",x"88",x"0d",x"ff",x"80",x"80",x"80",x"9f",x"0a",x"3d",x"08",x"c8",x"70",x"80",x"0c",x"3d",x"3d",x"80",x"08",x"ff",x"52",x"0d",x"0b",x"9e",x"84",x"2d",x"73",x"0c",x"95",x"0c",x"70",x"ff",x"83",x"f8",x"80",x"80",x"83",x"8c",x"51",x"88",x"95",x"9e",x"70",x"0c",x"ff",x"88",x"80",x"38",x"77",x"ff",x"ff",x"80",x"77",x"08",x"ff",x"f3",x"17",x"0c",x"57",x"2e",x"dd",x"8b",x"08",x"2e",x"98",x"08",x"a0",x"2e",x"c2",x"2d",x"39",x"8a",x"39",x"08",x"06",x"53",x"8c",x"39",x"9e",x"11",x"51",x"70",x"ff",x"52",x"0d",x"0d",x"72",x"51",x"8b",x"3d",x"3d",x"80",x"8c",x"73",x"0c",x"81",x"53",x"fe",x"0c",x"04",x"76",x"82",x"81",x"71",x"29",x"33",x"29",x"33",x"a0",x"16",x"ff",x"52",x"57",x"ff",x"73",x"55",x"75",x"57",x"53",x"09",x"38",x"ad",x"0d",x"0d",x"c0",x"56",x"81",x"18",x"80",x"53",x"94",x"72",x"70",x"33",x"14",x"38",x"84",x"82",x"56",x"73",x"38",x"76",x"76",x"71",x"14",x"26",x"51",x"8a",x"84",x"2d",x"51",x"74",x"2d",x"75",x"73",x"52",x"2d",x"74",x"38",x"89",x"f9",x"56",x"80",x"9a",x"0c",x"fe",x"2d",x"76",x"33",x"71",x"05",x"78",x"33",x"19",x"59",x"54",x"ac",x"73",x"73",x"33",x"11",x"52",x"fe",x"2d",x"06",x"38",x"76",x"38",x"84",x"51",x"8a",x"87",x"2d",x"89",x"8c",x"75",x"86",x"0c",x"76",x"51",x"ff",x"3d",x"11",x"33",x"71",x"83",x"72",x"84",x"07",x"57",x"88",x"2d",x"8a",x"c4",x"53",x"81",x"06",x"71",x"84",x"80",x"84",x"0d",x"0d",x"88",x"81",x"71",x"f4",x"51",x"72",x"2d",x"84",x"fe",x"0b",x"8a",x"81",x"2d",x"8f",x"81",x"51",x"ff",x"ff",x"06",x"89",x"0d",x"0d",x"bc",x"2d",x"8a",x"c0",x"52",x"81",x"80",x"9c",x"72",x"fe",x"c4",x"2a",x"2d",x"88",x"c0",x"08",x"2d",x"88",x"c0",x"2d",x"04",x"81",x"0c",x"90",x"51",x"82",x"80",x"0b",x"8b",x"51",x"82",x"ff",x"c0",x"52",x"ad",x"2d",x"c0",x"10",x"84",x"0c",x"fe",x"2d",x"83",x"ff",x"80",x"0c",x"bc",x"8e",x"80",x"80",x"c4",x"0c",x"80",x"ff",x"70",x"0c",x"c8",x"70",x"06",x"53",x"96",x"05",x"f3",x"9b",x"12",x"0b",x"53",x"d0",x"0c",x"d0",x"e5",x"88",x"80",x"81",x"0a",x"80",x"52",x"2d",x"71",x"2d",x"84",x"51",x"76",x"5e",x"d0",x"aa",x"53",x"bc",x"80",x"d2",x"80",x"be",x"9f",x"79",x"38",x"08",x"5a",x"77",x"05",x"34",x"8b",x"08",x"38",x"fe",x"06",x"78",x"ff",x"77",x"a2",x"ff",x"80",x"38",x"58",x"77",x"38",x"7b",x"18",x"72",x"80",x"88",x"72",x"79",x"13",x"26",x"16",x"75",x"70",x"70",x"07",x"51",x"71",x"81",x"38",x"72",x"ba",x"10",x"75",x"51",x"fe",x"5a",x"80",x"08",x"08",x"51",x"0c",x"0c",x"d0",x"3d",x"3d",x"80",x"2d",x"04",x"0d",x"81",x"a0",x"3d",x"55",x"75",x"38",x"9d",x"73",x"80",x"08",x"2e",x"08",x"88",x"0d",x"76",x"54",x"30",x"73",x"38",x"3d",x"57",x"76",x"38",x"54",x"74",x"52",x"3f",x"76",x"38",x"54",x"88",x"74",x"57",x"3d",x"53",x"80",x"52",x"2e",x"80",x"80",x"38",x"10",x"53",x"ea",x"78",x"51",x"86",x"72",x"81",x"72",x"38",x"ef",x"31",x"74",x"81",x"56",x"fc",x"70",x"55",x"72",x"72",x"06",x"2e",x"12",x"2e",x"70",x"33",x"05",x"12",x"2e",x"ea",x"0c",x"04",x"70",x"08",x"05",x"70",x"08",x"05",x"70",x"08",x"05",x"70",x"08",x"05",x"12",x"26",x"72",x"72",x"54",x"84",x"fc",x"83",x"70",x"39",x"76",x"8c",x"33",x"55",x"8a",x"06",x"2e",x"12",x"2e",x"73",x"55",x"52",x"09",x"38",x"86",x"74",x"75",x"90",x"54",x"27",x"71",x"53",x"70",x"0c",x"84",x"72",x"05",x"12",x"26",x"72",x"72",x"05",x"12",x"26",x"53",x"fb",x"79",x"83",x"52",x"71",x"54",x"73",x"c4",x"54",x"70",x"52",x"2e",x"33",x"2e",x"95",x"81",x"70",x"54",x"70",x"33",x"ff",x"ff",x"31",x"52",x"04",x"f7",x"14",x"84",x"06",x"70",x"14",x"08",x"71",x"dc",x"54",x"39",x"0c",x"04",x"9e",x"05",x"52",x"91",x"fc",x"52",x"2e",x"f1",x"0d",x"c7",x"00",x"ff",x"ff",x"ff",x"00",x"77",x"a9",x"51",x"c5",x"00",x"17",x"5b",x"fe",x"68",x"2b",x"40",x"80",x"00",x"00",x"00",x"00",x"00",x"54",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); shared variable RAM1: RAM_TABLE := RAM_TABLE'( x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"06",x"06",x"82",x"2a",x"06",x"00",x"00",x"00",x"06",x"ff",x"09",x"05",x"09",x"ff",x"0b",x"04",x"81",x"73",x"09",x"73",x"81",x"04",x"00",x"00",x"24",x"07",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"81",x"0a",x"0a",x"05",x"51",x"04",x"00",x"26",x"07",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"9f",x"05",x"88",x"00",x"00",x"00",x"00",x"00",x"2a",x"06",x"09",x"ff",x"53",x"00",x"00",x"00",x"53",x"04",x"06",x"82",x"0b",x"fc",x"51",x"00",x"81",x"09",x"09",x"06",x"00",x"00",x"00",x"00",x"81",x"09",x"09",x"81",x"04",x"00",x"00",x"00",x"81",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"09",x"51",x"00",x"00",x"00",x"00",x"00",x"06",x"06",x"83",x"10",x"06",x"00",x"00",x"00",x"06",x"0b",x"83",x"05",x"0b",x"04",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"70",x"06",x"ff",x"71",x"72",x"05",x"51",x"00",x"70",x"06",x"06",x"54",x"09",x"ff",x"51",x"00",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"a4",x"00",x"00",x"00",x"00",x"00",x"00",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"05",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"05",x"53",x"04",x"00",x"00",x"00",x"00",x"00",x"3f",x"04",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"53",x"81",x"83",x"05",x"10",x"72",x"51",x"04",x"72",x"05",x"05",x"72",x"53",x"51",x"04",x"08",x"75",x"50",x"56",x"0c",x"04",x"08",x"75",x"50",x"56",x"0c",x"04",x"08",x"90",x"8c",x"04",x"0b",x"b4",x"a6",x"08",x"52",x"92",x"9e",x"2d",x"70",x"70",x"0b",x"9e",x"3d",x"80",x"0b",x"08",x"38",x"0b",x"2e",x"85",x"0d",x"0b",x"0b",x"81",x"0d",x"3d",x"80",x"71",x"2a",x"51",x"f3",x"0d",x"0d",x"80",x"08",x"70",x"51",x"38",x"0a",x"0d",x"0d",x"dc",x"0c",x"06",x"54",x"81",x"80",x"a0",x"32",x"2d",x"04",x"a0",x"0d",x"0d",x"0b",x"0c",x"8a",x"3d",x"3d",x"0a",x"2a",x"c0",x"ff",x"c0",x"51",x"83",x"fe",x"c4",x"53",x"81",x"70",x"c0",x"f0",x"08",x"71",x"71",x"0c",x"0a",x"2d",x"08",x"3d",x"f6",x"cc",x"0c",x"cc",x"0c",x"90",x"ff",x"70",x"80",x"84",x"84",x"72",x"83",x"ff",x"c8",x"70",x"ff",x"0c",x"3d",x"90",x"0c",x"a0",x"93",x"0d",x"71",x"52",x"72",x"0c",x"ff",x"0c",x"04",x"a0",x"c0",x"54",x"57",x"73",x"2d",x"10",x"05",x"80",x"74",x"83",x"59",x"df",x"db",x"ff",x"08",x"74",x"38",x"53",x"73",x"0c",x"72",x"84",x"72",x"57",x"ff",x"06",x"51",x"76",x"79",x"06",x"84",x"fa",x"80",x"80",x"a0",x"ff",x"51",x"ff",x"70",x"bf",x"53",x"2d",x"ff",x"0d",x"81",x"0c",x"0a",x"fe",x"0c",x"3d",x"3d",x"2d",x"07",x"2d",x"82",x"fe",x"c0",x"53",x"85",x"73",x"70",x"74",x"8b",x"88",x"0d",x"0d",x"33",x"71",x"29",x"80",x"14",x"80",x"16",x"05",x"86",x"33",x"57",x"55",x"72",x"38",x"05",x"71",x"05",x"13",x"2e",x"e8",x"8e",x"3d",x"3d",x"80",x"84",x"2d",x"82",x"82",x"53",x"2e",x"17",x"72",x"54",x"ff",x"f3",x"33",x"71",x"05",x"54",x"97",x"77",x"17",x"53",x"81",x"74",x"75",x"2d",x"81",x"c0",x"2a",x"2d",x"c0",x"73",x"38",x"33",x"c0",x"54",x"f0",x"2d",x"04",x"79",x"80",x"8c",x"75",x"8b",x"9a",x"70",x"17",x"33",x"29",x"33",x"19",x"85",x"0c",x"80",x"27",x"58",x"38",x"11",x"87",x"0c",x"8b",x"c2",x"81",x"f6",x"54",x"d8",x"2d",x"74",x"2d",x"81",x"c0",x"2d",x"04",x"77",x"16",x"76",x"33",x"74",x"2d",x"fc",x"81",x"12",x"2b",x"07",x"70",x"2b",x"71",x"53",x"52",x"ad",x"51",x"80",x"84",x"70",x"81",x"52",x"73",x"07",x"80",x"3d",x"3d",x"2d",x"08",x"53",x"8a",x"83",x"2d",x"c0",x"2d",x"04",x"80",x"0c",x"81",x"c0",x"53",x"70",x"33",x"2d",x"71",x"81",x"8b",x"3d",x"3d",x"9e",x"f4",x"51",x"80",x"84",x"2d",x"0b",x"80",x"08",x"8b",x"9e",x"90",x"c0",x"08",x"8a",x"c4",x"c0",x"2d",x"8a",x"89",x"0d",x"0d",x"c0",x"83",x"85",x"2d",x"04",x"80",x"0c",x"86",x"2d",x"04",x"80",x"84",x"8e",x"9a",x"8c",x"08",x"80",x"b8",x"8b",x"85",x"2d",x"04",x"0d",x"c0",x"9e",x"0b",x"a0",x"84",x"80",x"84",x"80",x"fb",x"08",x"75",x"80",x"94",x"76",x"53",x"99",x"84",x"99",x"53",x"88",x"9b",x"0c",x"80",x"84",x"80",x"8b",x"88",x"dc",x"0c",x"90",x"c0",x"70",x"fe",x"2d",x"fe",x"2d",x"71",x"2d",x"3d",x"83",x"8b",x"08",x"2e",x"08",x"80",x"08",x"81",x"82",x"38",x"89",x"88",x"54",x"3d",x"e0",x"72",x"57",x"88",x"c6",x"80",x"81",x"38",x"ff",x"81",x"ff",x"59",x"76",x"97",x"78",x"82",x"8b",x"ff",x"fe",x"78",x"38",x"80",x"58",x"33",x"81",x"73",x"ff",x"54",x"05",x"33",x"2b",x"53",x"52",x"09",x"c3",x"53",x"fe",x"10",x"05",x"08",x"2d",x"81",x"39",x"88",x"90",x"08",x"90",x"8a",x"80",x"82",x"ff",x"52",x"db",x"0d",x"f8",x"04",x"0d",x"fb",x"79",x"56",x"ab",x"24",x"53",x"51",x"88",x"80",x"88",x"73",x"3d",x"30",x"57",x"74",x"56",x"d2",x"fa",x"7a",x"57",x"a4",x"2c",x"75",x"31",x"9b",x"54",x"85",x"30",x"0c",x"04",x"81",x"fc",x"78",x"53",x"26",x"80",x"70",x"38",x"a4",x"73",x"26",x"72",x"51",x"74",x"0c",x"04",x"72",x"53",x"e6",x"26",x"72",x"07",x"74",x"55",x"39",x"76",x"55",x"8f",x"38",x"83",x"80",x"ff",x"ff",x"72",x"54",x"81",x"ff",x"ff",x"06",x"88",x"0d",x"72",x"54",x"84",x"72",x"54",x"84",x"72",x"54",x"84",x"72",x"54",x"84",x"f0",x"8f",x"83",x"38",x"05",x"70",x"0c",x"71",x"38",x"83",x"0d",x"02",x"05",x"53",x"27",x"83",x"80",x"ff",x"ff",x"73",x"05",x"12",x"2e",x"ef",x"0c",x"04",x"2b",x"71",x"51",x"72",x"72",x"05",x"71",x"53",x"70",x"0c",x"84",x"f0",x"8f",x"83",x"38",x"84",x"fc",x"83",x"70",x"39",x"77",x"07",x"54",x"38",x"08",x"71",x"80",x"75",x"33",x"06",x"80",x"72",x"75",x"06",x"12",x"33",x"06",x"52",x"72",x"81",x"81",x"71",x"52",x"0d",x"70",x"ff",x"f8",x"80",x"51",x"84",x"71",x"54",x"2e",x"75",x"96",x"88",x"0d",x"0d",x"fc",x"52",x"2e",x"2d",x"08",x"ff",x"06",x"3d",x"eb",x"00",x"ff",x"ff",x"00",x"ff",x"09",x"09",x"09",x"07",x"0a",x"0a",x"08",x"08",x"07",x"0a",x"05",x"6f",x"d8",x"0f",x"00",x"00",x"00",x"0f",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); shared variable RAM2: RAM_TABLE := RAM_TABLE'( x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"fd",x"83",x"05",x"2b",x"ff",x"00",x"00",x"00",x"fd",x"ff",x"06",x"82",x"2b",x"83",x"0b",x"a7",x"09",x"05",x"06",x"09",x"0a",x"51",x"00",x"00",x"72",x"2e",x"04",x"00",x"00",x"00",x"00",x"00",x"73",x"06",x"72",x"72",x"31",x"06",x"51",x"00",x"72",x"2e",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"0a",x"53",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"81",x"0b",x"04",x"00",x"00",x"00",x"00",x"72",x"9f",x"74",x"06",x"07",x"00",x"00",x"00",x"71",x"0d",x"83",x"05",x"2b",x"72",x"51",x"00",x"09",x"05",x"05",x"81",x"04",x"00",x"00",x"00",x"09",x"05",x"05",x"09",x"51",x"00",x"00",x"00",x"09",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"73",x"53",x"00",x"00",x"00",x"00",x"00",x"fc",x"83",x"05",x"10",x"ff",x"00",x"00",x"00",x"fc",x"0b",x"73",x"10",x"0b",x"a9",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"09",x"09",x"06",x"54",x"09",x"ff",x"51",x"00",x"09",x"09",x"81",x"70",x"73",x"05",x"07",x"04",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"9e",x"04",x"00",x"00",x"00",x"00",x"00",x"81",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"84",x"10",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"71",x"0d",x"00",x"00",x"00",x"00",x"00",x"d4",x"3f",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"73",x"73",x"81",x"10",x"07",x"0c",x"3c",x"80",x"ff",x"06",x"52",x"0a",x"38",x"51",x"8c",x"75",x"2d",x"08",x"8c",x"51",x"8c",x"75",x"2d",x"08",x"8c",x"51",x"8c",x"8e",x"0c",x"0c",x"0d",x"9e",x"70",x"b0",x"52",x"2e",x"12",x"70",x"08",x"52",x"81",x"0b",x"83",x"04",x"0b",x"d8",x"8e",x"0b",x"80",x"06",x"3d",x"0b",x"51",x"f6",x"3d",x"ff",x"c4",x"52",x"82",x"06",x"70",x"3d",x"3d",x"80",x"71",x"2a",x"51",x"f3",x"90",x"3d",x"3d",x"80",x"88",x"ff",x"11",x"71",x"38",x"8a",x"a0",x"a0",x"0d",x"8a",x"3d",x"3d",x"ff",x"0a",x"51",x"82",x"ff",x"d0",x"88",x"8a",x"81",x"8a",x"fe",x"2d",x"04",x"80",x"84",x"70",x"51",x"9e",x"71",x"bc",x"e8",x"38",x"0a",x"90",x"8c",x"0a",x"84",x"82",x"80",x"88",x"80",x"84",x"83",x"04",x"73",x"51",x"80",x"70",x"07",x"52",x"04",x"80",x"84",x"fb",x"72",x"83",x"a0",x"80",x"0b",x"98",x"3d",x"8b",x"11",x"80",x"72",x"83",x"88",x"0d",x"0d",x"80",x"84",x"0a",x"2d",x"c0",x"10",x"84",x"0c",x"0c",x"08",x"06",x"81",x"80",x"ff",x"88",x"55",x"a7",x"84",x"0c",x"18",x"53",x"75",x"08",x"17",x"74",x"81",x"73",x"2d",x"71",x"81",x"a0",x"71",x"9e",x"38",x"8a",x"39",x"c3",x"2d",x"0a",x"ff",x"0c",x"85",x"2d",x"3d",x"08",x"bc",x"90",x"70",x"72",x"83",x"80",x"f4",x"80",x"c0",x"2d",x"04",x"80",x"84",x"2d",x"80",x"08",x"06",x"52",x"71",x"3d",x"3d",x"11",x"33",x"0a",x"80",x"83",x"82",x"84",x"71",x"05",x"17",x"51",x"53",x"53",x"9a",x"81",x"52",x"81",x"ff",x"ff",x"06",x"51",x"86",x"f9",x"57",x"80",x"9a",x"33",x"71",x"05",x"80",x"85",x"53",x"05",x"0c",x"73",x"17",x"33",x"29",x"80",x"27",x"58",x"73",x"53",x"34",x"74",x"38",x"fe",x"2d",x"8a",x"88",x"c0",x"8a",x"54",x"92",x"70",x"8a",x"14",x"26",x"89",x"0d",x"0d",x"c0",x"55",x"86",x"51",x"8c",x"ad",x"81",x"18",x"80",x"19",x"84",x"0c",x"78",x"53",x"77",x"72",x"c1",x"86",x"0c",x"76",x"51",x"8e",x"08",x"71",x"14",x"26",x"9a",x"0c",x"fe",x"2d",x"8a",x"89",x"0d",x"2d",x"73",x"33",x"11",x"52",x"fe",x"39",x"76",x"82",x"90",x"2b",x"33",x"88",x"33",x"52",x"54",x"8e",x"ff",x"2d",x"80",x"08",x"70",x"51",x"38",x"80",x"80",x"86",x"fe",x"c2",x"88",x"53",x"38",x"81",x"c0",x"8a",x"89",x"0d",x"0d",x"bc",x"2d",x"8a",x"94",x"72",x"54",x"c0",x"52",x"09",x"38",x"84",x"fe",x"0b",x"8a",x"82",x"2d",x"80",x"9a",x"0a",x"80",x"71",x"53",x"72",x"72",x"8a",x"c4",x"51",x"9e",x"8a",x"c2",x"51",x"8b",x"3d",x"3d",x"9e",x"0b",x"0c",x"ad",x"0d",x"0d",x"c0",x"2d",x"ad",x"0d",x"0d",x"80",x"51",x"8c",x"51",x"88",x"95",x"9e",x"51",x"8a",x"b1",x"0d",x"3d",x"9e",x"0b",x"80",x"0b",x"57",x"0b",x"80",x"c8",x"53",x"73",x"06",x"54",x"80",x"70",x"0c",x"70",x"70",x"0c",x"0c",x"0b",x"9c",x"12",x"0b",x"80",x"0b",x"0c",x"82",x"80",x"84",x"0b",x"80",x"84",x"8b",x"9a",x"8b",x"9a",x"0c",x"fe",x"8f",x"5a",x"5b",x"88",x"80",x"88",x"2e",x"88",x"2e",x"76",x"bf",x"2e",x"0b",x"32",x"d5",x"fd",x"72",x"17",x"2d",x"78",x"08",x"09",x"b0",x"83",x"0c",x"59",x"80",x"39",x"ff",x"7c",x"59",x"ff",x"ff",x"78",x"53",x"98",x"80",x"55",x"70",x"52",x"73",x"38",x"11",x"ff",x"74",x"88",x"08",x"51",x"2e",x"fe",x"33",x"26",x"72",x"e8",x"70",x"71",x"39",x"a4",x"0d",x"08",x"80",x"2d",x"0c",x"0b",x"0c",x"04",x"80",x"94",x"3d",x"ff",x"df",x"f8",x"04",x"77",x"80",x"24",x"74",x"80",x"74",x"3f",x"75",x"38",x"54",x"87",x"73",x"32",x"39",x"81",x"25",x"39",x"78",x"80",x"24",x"9f",x"53",x"74",x"51",x"08",x"2e",x"08",x"88",x"0d",x"55",x"39",x"76",x"81",x"73",x"72",x"38",x"a9",x"24",x"10",x"72",x"52",x"73",x"38",x"88",x"0d",x"2a",x"53",x"2e",x"74",x"73",x"74",x"2a",x"55",x"e5",x"0d",x"7b",x"55",x"8c",x"07",x"70",x"38",x"71",x"38",x"05",x"70",x"34",x"71",x"81",x"74",x"3d",x"51",x"05",x"70",x"0c",x"05",x"70",x"0c",x"05",x"70",x"0c",x"05",x"70",x"0c",x"71",x"38",x"95",x"84",x"71",x"53",x"52",x"ed",x"ff",x"3d",x"71",x"9f",x"55",x"72",x"74",x"70",x"38",x"71",x"38",x"81",x"ff",x"ff",x"06",x"88",x"0d",x"88",x"70",x"07",x"8f",x"38",x"84",x"72",x"05",x"71",x"53",x"70",x"0c",x"71",x"38",x"90",x"70",x"0c",x"71",x"38",x"90",x"0d",x"72",x"53",x"93",x"73",x"54",x"2e",x"73",x"71",x"ff",x"70",x"38",x"70",x"81",x"81",x"71",x"ff",x"54",x"38",x"73",x"75",x"71",x"0c",x"3d",x"09",x"fd",x"70",x"81",x"51",x"38",x"16",x"56",x"08",x"73",x"ff",x"0b",x"3d",x"3d",x"0b",x"08",x"ff",x"70",x"70",x"70",x"81",x"83",x"04",x"04",x"ff",x"00",x"ff",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"08",x"00",x"b8",x"01",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); shared variable RAM3: RAM_TABLE := RAM_TABLE'( x"0b",x"fe",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"df",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"72",x"81",x"83",x"ff",x"04",x"00",x"00",x"71",x"83",x"83",x"05",x"2b",x"73",x"0b",x"83",x"72",x"72",x"09",x"73",x"07",x"53",x"00",x"00",x"72",x"73",x"51",x"00",x"00",x"00",x"00",x"00",x"71",x"71",x"30",x"0a",x"0a",x"81",x"53",x"00",x"72",x"73",x"51",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"c3",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"0a",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"09",x"0b",x"05",x"00",x"00",x"00",x"00",x"72",x"73",x"09",x"81",x"06",x"04",x"00",x"00",x"71",x"02",x"73",x"81",x"83",x"07",x"0c",x"00",x"72",x"72",x"81",x"0a",x"51",x"00",x"00",x"00",x"72",x"72",x"81",x"0a",x"53",x"00",x"00",x"00",x"71",x"52",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"05",x"04",x"00",x"00",x"00",x"00",x"00",x"72",x"73",x"07",x"00",x"00",x"00",x"00",x"00",x"71",x"72",x"81",x"10",x"81",x"04",x"00",x"00",x"71",x"0b",x"dc",x"10",x"06",x"88",x"00",x"00",x"0b",x"f7",x"00",x"00",x"00",x"00",x"00",x"00",x"0b",x"df",x"00",x"00",x"00",x"00",x"00",x"00",x"72",x"05",x"81",x"70",x"73",x"05",x"07",x"04",x"72",x"05",x"09",x"05",x"06",x"74",x"06",x"51",x"05",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"81",x"0b",x"51",x"00",x"00",x"00",x"00",x"00",x"71",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"02",x"10",x"04",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"71",x"05",x"02",x"00",x"00",x"00",x"00",x"00",x"81",x"ab",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"10",x"04",x"06",x"09",x"05",x"2b",x"06",x"04",x"72",x"06",x"72",x"10",x"10",x"ed",x"53",x"08",x"08",x"de",x"88",x"0c",x"0c",x"08",x"08",x"9a",x"88",x"0c",x"0c",x"08",x"08",x"90",x"88",x"3d",x"0b",x"51",x"9e",x"08",x"80",x"84",x"0c",x"b0",x"52",x"38",x"0b",x"34",x"04",x"0d",x"9e",x"2e",x"0b",x"0b",x"81",x"82",x"0b",x"d8",x"0b",x"82",x"04",x"80",x"84",x"70",x"81",x"51",x"83",x"ff",x"c4",x"52",x"81",x"06",x"70",x"82",x"83",x"fe",x"70",x"80",x"81",x"83",x"53",x"92",x"51",x"72",x"8a",x"3d",x"51",x"84",x"80",x"ff",x"d0",x"fe",x"2d",x"04",x"83",x"70",x"52",x"71",x"51",x"80",x"a0",x"0d",x"0d",x"80",x"08",x"51",x"38",x"52",x"9e",x"87",x"e6",x"d0",x"83",x"98",x"90",x"0c",x"04",x"0b",x"80",x"0b",x"80",x"0b",x"0c",x"0d",x"51",x"80",x"08",x"80",x"52",x"0d",x"0d",x"80",x"70",x"06",x"52",x"04",x"a0",x"b8",x"0c",x"ff",x"51",x"90",x"80",x"80",x"08",x"06",x"3d",x"3d",x"56",x"80",x"d0",x"9a",x"8c",x"08",x"80",x"b8",x"75",x"73",x"ff",x"08",x"26",x"83",x"0c",x"05",x"2e",x"58",x"74",x"88",x"13",x"38",x"75",x"ff",x"53",x"09",x"38",x"fe",x"52",x"09",x"38",x"52",x"84",x"93",x"51",x"ff",x"80",x"a0",x"90",x"70",x"72",x"8a",x"b1",x"ff",x"bc",x"9e",x"83",x"08",x"06",x"52",x"04",x"8a",x"81",x"8a",x"89",x"0d",x"0d",x"80",x"9a",x"0c",x"72",x"ff",x"51",x"2d",x"84",x"fc",x"81",x"12",x"80",x"84",x"05",x"70",x"12",x"52",x"80",x"85",x"11",x"53",x"55",x"2e",x"70",x"33",x"70",x"34",x"72",x"81",x"89",x"2d",x"04",x"79",x"80",x"8c",x"17",x"33",x"29",x"71",x"38",x"55",x"81",x"76",x"54",x"83",x"18",x"80",x"52",x"75",x"73",x"0c",x"08",x"73",x"54",x"ed",x"8b",x"f4",x"51",x"74",x"8a",x"51",x"80",x"27",x"17",x"52",x"81",x"74",x"8b",x"3d",x"3d",x"80",x"84",x"2d",x"74",x"2d",x"81",x"0c",x"82",x"82",x"83",x"0c",x"78",x"33",x"53",x"73",x"38",x"80",x"16",x"76",x"33",x"74",x"2d",x"88",x"52",x"82",x"74",x"8c",x"75",x"8b",x"f4",x"51",x"8b",x"3d",x"9a",x"0c",x"11",x"87",x"0c",x"8b",x"b8",x"0d",x"33",x"71",x"88",x"14",x"07",x"16",x"51",x"57",x"51",x"81",x"a0",x"80",x"72",x"2a",x"51",x"f3",x"80",x"c4",x"0c",x"04",x"8e",x"08",x"06",x"f3",x"2d",x"8a",x"51",x"8b",x"3d",x"3d",x"9e",x"f4",x"51",x"9e",x"52",x"05",x"8a",x"12",x"2e",x"ec",x"2d",x"04",x"80",x"0c",x"81",x"c0",x"80",x"8c",x"f9",x"c0",x"0c",x"52",x"2d",x"0c",x"51",x"9e",x"2a",x"2d",x"51",x"8e",x"08",x"2d",x"84",x"80",x"0b",x"80",x"0a",x"8e",x"3d",x"3d",x"9e",x"e5",x"8e",x"3d",x"3d",x"80",x"8a",x"2d",x"71",x"2d",x"10",x"05",x"71",x"2d",x"8c",x"3d",x"ad",x"0b",x"80",x"0c",x"90",x"0c",x"b3",x"80",x"80",x"a4",x"ff",x"72",x"53",x"80",x"08",x"72",x"a8",x"71",x"53",x"71",x"8c",x"0c",x"8c",x"88",x"80",x"81",x"0a",x"2d",x"0b",x"80",x"f2",x"0c",x"80",x"52",x"8c",x"51",x"8c",x"72",x"8b",x"77",x"5a",x"0a",x"2d",x"78",x"38",x"fe",x"38",x"fd",x"38",x"26",x"80",x"80",x"a0",x"80",x"05",x"52",x"81",x"aa",x"53",x"88",x"2e",x"ff",x"57",x"7b",x"5b",x"39",x"9d",x"2e",x"80",x"56",x"27",x"83",x"0c",x"53",x"27",x"dc",x"72",x"15",x"0c",x"53",x"f2",x"75",x"05",x"33",x"72",x"7e",x"55",x"73",x"06",x"74",x"8a",x"38",x"9d",x"52",x"52",x"a9",x"fe",x"3d",x"8c",x"a0",x"70",x"8c",x"81",x"0a",x"0d",x"0d",x"51",x"83",x"81",x"8c",x"ff",x"88",x"0d",x"55",x"75",x"80",x"38",x"52",x"e1",x"54",x"85",x"30",x"0c",x"04",x"81",x"dc",x"55",x"80",x"ec",x"0d",x"55",x"75",x"75",x"81",x"32",x"74",x"88",x"80",x"88",x"73",x"3d",x"30",x"d7",x"0d",x"54",x"74",x"55",x"98",x"2e",x"72",x"71",x"75",x"54",x"38",x"83",x"70",x"3d",x"81",x"2a",x"80",x"71",x"38",x"75",x"81",x"2a",x"54",x"3d",x"79",x"55",x"27",x"75",x"51",x"a7",x"52",x"98",x"81",x"74",x"56",x"52",x"09",x"38",x"86",x"74",x"84",x"71",x"53",x"84",x"71",x"53",x"84",x"71",x"53",x"84",x"71",x"53",x"52",x"c9",x"27",x"70",x"08",x"05",x"12",x"26",x"54",x"fc",x"79",x"05",x"57",x"83",x"38",x"51",x"a2",x"52",x"93",x"70",x"34",x"71",x"81",x"74",x"3d",x"74",x"07",x"2b",x"51",x"a5",x"70",x"0c",x"84",x"72",x"05",x"71",x"53",x"52",x"dd",x"27",x"71",x"53",x"52",x"f2",x"ff",x"3d",x"70",x"06",x"70",x"73",x"56",x"08",x"38",x"52",x"81",x"54",x"9d",x"55",x"09",x"38",x"14",x"81",x"56",x"e5",x"55",x"06",x"06",x"88",x"87",x"71",x"fb",x"06",x"82",x"51",x"97",x"84",x"54",x"75",x"38",x"52",x"80",x"87",x"ff",x"cc",x"70",x"70",x"38",x"12",x"52",x"09",x"38",x"04",x"3f",x"00",x"ff",x"ff",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"01",x"00",x"05",x"a4",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"ff",x"00",x"ff",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00"); signal rwea: std_logic_vector(3 downto 0); signal rweb: std_logic_vector(3 downto 0); signal memaread0: std_logic_vector(7 downto 0); signal membread0: std_logic_vector(7 downto 0); signal memaread1: std_logic_vector(7 downto 0); signal membread1: std_logic_vector(7 downto 0); signal memaread2: std_logic_vector(7 downto 0); signal membread2: std_logic_vector(7 downto 0); signal memaread3: std_logic_vector(7 downto 0); signal membread3: std_logic_vector(7 downto 0); begin rwea(0) <= WEA and MASKA(0); rweb(0) <= WEB and MASKB(0); rwea(1) <= WEA and MASKA(1); rweb(1) <= WEB and MASKB(1); rwea(2) <= WEA and MASKA(2); rweb(2) <= WEB and MASKB(2); rwea(3) <= WEA and MASKA(3); rweb(3) <= WEB and MASKB(3); DOA(7 downto 0) <= memaread0; DOB(7 downto 0) <= membread0; DOA(15 downto 8) <= memaread1; DOB(15 downto 8) <= membread1; DOA(23 downto 16) <= memaread2; DOB(23 downto 16) <= membread2; DOA(31 downto 24) <= memaread3; DOB(31 downto 24) <= membread3; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(0)='1' then RAM0( conv_integer(ADDRA) ) := DIA(7 downto 0); end if; memaread0 <= RAM0(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(0)='1' then RAM0( conv_integer(ADDRB) ) := DIB(7 downto 0); end if; membread0 <= RAM0(conv_integer(ADDRB)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(1)='1' then RAM1( conv_integer(ADDRA) ) := DIA(15 downto 8); end if; memaread1 <= RAM1(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(1)='1' then RAM1( conv_integer(ADDRB) ) := DIB(15 downto 8); end if; membread1 <= RAM1(conv_integer(ADDRB)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(2)='1' then RAM2( conv_integer(ADDRA) ) := DIA(23 downto 16); end if; memaread2 <= RAM2(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(2)='1' then RAM2( conv_integer(ADDRB) ) := DIB(23 downto 16); end if; membread2 <= RAM2(conv_integer(ADDRB)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENA='1' then if rwea(3)='1' then RAM3( conv_integer(ADDRA) ) := DIA(31 downto 24); end if; memaread3 <= RAM3(conv_integer(ADDRA)) ; end if; end if; end process; process (clk) begin if rising_edge(clk) then if ENB='1' then if rweb(3)='1' then RAM3( conv_integer(ADDRB) ) := DIB(31 downto 24); end if; membread3 <= RAM3(conv_integer(ADDRB)) ; end if; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Template_Wishbone_Example/Libraries/ZPUino_1/timer.vhd
13
9957
-- -- 16-bit Timer for ZPUINO -- -- Copyright 2010 Alvaro Lopes <[email protected]> -- -- Version: 1.0 -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity timer is generic ( TSCENABLED: boolean := false; PWMCOUNT: integer range 1 to 8 := 2; WIDTH: integer range 1 to 32 := 16; PRESCALER_ENABLED: boolean := true; BUFFERS: boolean := true ); port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(5 downto 0); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o: out std_logic; pwm_out: out std_logic_vector(PWMCOUNT-1 downto 0) ); end entity timer; architecture behave of timer is component prescaler is port ( clk: in std_logic; rst: in std_logic; prescale: in std_logic_vector(2 downto 0); event: out std_logic ); end component prescaler; type singlepwmregs is record cmplow: unsigned(WIDTH-1 downto 0); cmphigh: unsigned(WIDTH-1 downto 0); en: std_logic; end record; type pwmregs is array(PWMCOUNT-1 downto 0) of singlepwmregs; type timerregs is record cnt: unsigned(WIDTH-1 downto 0); -- current timer counter value cmp: unsigned(WIDTH-1 downto 0); -- top timer compare value ccm: std_logic; -- clear on compare match en: std_logic; -- enable dir: std_logic; -- direction ien: std_logic; -- interrupt enable intr: std_logic; -- interrupt pres: std_logic_vector(2 downto 0); -- Prescaler updp: std_logic_vector(1 downto 0); presrst: std_logic; pwmr: pwmregs; pwmrb:pwmregs; end record; constant UPDATE_NOW: std_logic_vector(1 downto 0) := "00"; constant UPDATE_ZERO_SYNC: std_logic_vector(1 downto 0) := "01"; constant UPDATE_LATER: std_logic_vector(1 downto 0) := "10"; signal tmr0_prescale_rst: std_logic; --signal tmr0_prescale: std_logic_vector(2 downto 0); signal tmr0_prescale_event: std_logic; signal TSC_q: unsigned(wordSize-1 downto 0); signal tmrr: timerregs; function eq(a:std_logic_vector; b:std_logic_vector) return std_logic is begin if a=b then return '1'; else return '0'; end if; end function; signal do_interrupt: std_logic; begin wb_inta_o <= tmrr.intr; -- comp <= tmrr.cout; wb_ack_o <= wb_cyc_i and wb_stb_i; pr: if PRESCALER_ENABLED generate tmr0prescale_inst: prescaler port map ( clk => wb_clk_i, rst => tmrr.presrst, prescale=> tmrr.pres, event => tmr0_prescale_event ); end generate; npr: if not PRESCALER_ENABLED generate tmr0_prescale_event<='1'; end generate; tsc_process: if TSCENABLED generate TSCgen: process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then TSC_q <= (others => '0'); else TSC_q <= TSC_q + 1; end if; end if; end process; end generate; -- Read process(wb_adr_i, tmrr,TSC_q) begin case wb_adr_i(1 downto 0) is when "00" => wb_dat_o <= (others => Undefined); wb_dat_o(0) <= tmrr.en; wb_dat_o(1) <= tmrr.ccm; wb_dat_o(2) <= tmrr.dir; wb_dat_o(3) <= tmrr.ien; wb_dat_o(6 downto 4) <= tmrr.pres; wb_dat_o(7) <= tmrr.intr; wb_dat_o(10 downto 9) <= tmrr.updp; when "01" => wb_dat_o <= (others => '0'); wb_dat_o(WIDTH-1 downto 0) <= std_logic_vector(tmrr.cnt); when "10" => wb_dat_o <= (others => '0'); wb_dat_o(WIDTH-1 downto 0) <= std_logic_vector(tmrr.cmp); when others => if TSCENABLED then wb_dat_o <= (others => '0'); wb_dat_o <= std_logic_vector(TSC_q); else wb_dat_o <= (others => DontCareValue ); end if; end case; end process; process(wb_clk_i, tmrr, wb_rst_i,wb_cyc_i,wb_stb_i,wb_we_i,wb_adr_i,wb_dat_i,tmrr,do_interrupt,tmr0_prescale_event) variable w: timerregs; variable write_ctrl: std_logic; variable write_cmp: std_logic; variable write_cnt: std_logic; variable write_pwm: std_logic; variable ovf: std_logic; variable pwmindex: integer; begin w := tmrr; -- These are just helpers write_ctrl := wb_cyc_i and wb_stb_i and wb_we_i and eq(wb_adr_i,"000000"); write_cnt := wb_cyc_i and wb_stb_i and wb_we_i and eq(wb_adr_i,"000001"); write_cmp := wb_cyc_i and wb_stb_i and wb_we_i and eq(wb_adr_i,"000010"); write_pwm := wb_cyc_i and wb_stb_i and wb_we_i and wb_adr_i(5); ovf:='0'; if tmrr.cnt = tmrr.cmp then ovf:='1'; end if; do_interrupt <= '0'; if wb_rst_i='1' then w.en := '0'; w.ccm := '0'; w.dir := '0'; w.ien := '0'; w.pres := (others => '0'); w.presrst := '1'; w.updp := UPDATE_ZERO_SYNC; for i in 0 to PWMCOUNT-1 loop w.pwmrb(i).en :='0'; w.pwmr(i).en :='0'; end loop; else if do_interrupt='1' then w.intr := '1'; end if; w.presrst := '0'; -- Wishbone access if write_ctrl='1' then w.en := wb_dat_i(0); w.ccm := wb_dat_i(1); w.dir := wb_dat_i(2); w.ien := wb_dat_i(3); w.pres:= wb_dat_i(6 downto 4); w.updp := wb_dat_i(10 downto 9); if wb_dat_i(7)='0' then w.intr:='0'; end if; end if; if write_cmp='1' then w.cmp := unsigned(wb_dat_i(WIDTH-1 downto 0)); end if; if write_cnt='1' then w.cnt := unsigned(wb_dat_i(WIDTH-1 downto 0)); else if tmrr.en='1' and tmr0_prescale_event='1' then -- If output matches, set interrupt if ovf='1' then if tmrr.ien='1' then do_interrupt<='1'; end if; end if; -- CCM if tmrr.ccm='1' and ovf='1' then w.cnt := (others => '0'); else if tmrr.dir='1' then w.cnt := tmrr.cnt + 1; else w.cnt := tmrr.cnt - 1; end if; end if; end if; end if; end if; if write_pwm='1' then for i in 0 to PWMCOUNT-1 loop if wb_adr_i(4 downto 2) = std_logic_vector(to_unsigned(i,3)) then if BUFFERS then -- Write values to this PWM case wb_adr_i(1 downto 0) is when "00" => w.pwmrb(i).cmplow := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "01" => w.pwmrb(i).cmphigh := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "10" => w.pwmrb(i).en := wb_dat_i(0); when "11" => -- This is sync pulse for UPDATE_LATER when others => end case; else -- Write values to this PWM case wb_adr_i(1 downto 0) is when "00" => w.pwmr(i).cmplow := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "01" => w.pwmr(i).cmphigh := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "10" => w.pwmr(i).en := wb_dat_i(0); when "11" => -- This is sync pulse for UPDATE_LATER when others => end case; end if; end if; end loop; end if; if BUFFERS then for i in 0 to PWMCOUNT-1 loop case tmrr.updp is when UPDATE_NOW => w.pwmr(i) := tmrr.pwmrb(i); when UPDATE_ZERO_SYNC => if ovf='1' then w.pwmr(i) := tmrr.pwmrb(i); end if; when UPDATE_LATER => --if wb_adr_i(3 downto 2) = std_logic_vector(to_unsigned(i,2)) then -- if wb_adr_i(1 downto 0)="11" then -- w.pwmr(i) := tmrr.pwmrb(i); -- end if; -- end if; when others => --w.pwmr(i) := tmrr.pwmrb(i); end case; end loop; end if; if rising_edge(wb_clk_i) then tmrr <= w; for i in 0 to PWMCOUNT-1 loop if tmrr.pwmr(i).en='1' then if tmrr.cnt >= tmrr.pwmr(i).cmplow and tmrr.cnt<tmrr.pwmr(i).cmphigh then pwm_out(i) <= '1'; else pwm_out(i) <= '0'; end if; else pwm_out(i)<='0'; end if; end loop; end if; end process; end behave;
mit
chcbaram/FPGA
zap-2.3.0-windows/papilio-zap-ide/examples/00.Papilio_Schematic_Library/examples/Audio_SID_simple/Libraries/ZPUino_1/timer.vhd
13
9957
-- -- 16-bit Timer for ZPUINO -- -- Copyright 2010 Alvaro Lopes <[email protected]> -- -- Version: 1.0 -- -- The FreeBSD license -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above -- copyright notice, this list of conditions and the following -- disclaimer in the documentation and/or other materials -- provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- ZPU PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; library board; use board.zpu_config.all; use board.zpupkg.all; use board.zpuinopkg.all; entity timer is generic ( TSCENABLED: boolean := false; PWMCOUNT: integer range 1 to 8 := 2; WIDTH: integer range 1 to 32 := 16; PRESCALER_ENABLED: boolean := true; BUFFERS: boolean := true ); port ( wb_clk_i: in std_logic; wb_rst_i: in std_logic; wb_dat_o: out std_logic_vector(wordSize-1 downto 0); wb_dat_i: in std_logic_vector(wordSize-1 downto 0); wb_adr_i: in std_logic_vector(5 downto 0); wb_we_i: in std_logic; wb_cyc_i: in std_logic; wb_stb_i: in std_logic; wb_ack_o: out std_logic; wb_inta_o: out std_logic; pwm_out: out std_logic_vector(PWMCOUNT-1 downto 0) ); end entity timer; architecture behave of timer is component prescaler is port ( clk: in std_logic; rst: in std_logic; prescale: in std_logic_vector(2 downto 0); event: out std_logic ); end component prescaler; type singlepwmregs is record cmplow: unsigned(WIDTH-1 downto 0); cmphigh: unsigned(WIDTH-1 downto 0); en: std_logic; end record; type pwmregs is array(PWMCOUNT-1 downto 0) of singlepwmregs; type timerregs is record cnt: unsigned(WIDTH-1 downto 0); -- current timer counter value cmp: unsigned(WIDTH-1 downto 0); -- top timer compare value ccm: std_logic; -- clear on compare match en: std_logic; -- enable dir: std_logic; -- direction ien: std_logic; -- interrupt enable intr: std_logic; -- interrupt pres: std_logic_vector(2 downto 0); -- Prescaler updp: std_logic_vector(1 downto 0); presrst: std_logic; pwmr: pwmregs; pwmrb:pwmregs; end record; constant UPDATE_NOW: std_logic_vector(1 downto 0) := "00"; constant UPDATE_ZERO_SYNC: std_logic_vector(1 downto 0) := "01"; constant UPDATE_LATER: std_logic_vector(1 downto 0) := "10"; signal tmr0_prescale_rst: std_logic; --signal tmr0_prescale: std_logic_vector(2 downto 0); signal tmr0_prescale_event: std_logic; signal TSC_q: unsigned(wordSize-1 downto 0); signal tmrr: timerregs; function eq(a:std_logic_vector; b:std_logic_vector) return std_logic is begin if a=b then return '1'; else return '0'; end if; end function; signal do_interrupt: std_logic; begin wb_inta_o <= tmrr.intr; -- comp <= tmrr.cout; wb_ack_o <= wb_cyc_i and wb_stb_i; pr: if PRESCALER_ENABLED generate tmr0prescale_inst: prescaler port map ( clk => wb_clk_i, rst => tmrr.presrst, prescale=> tmrr.pres, event => tmr0_prescale_event ); end generate; npr: if not PRESCALER_ENABLED generate tmr0_prescale_event<='1'; end generate; tsc_process: if TSCENABLED generate TSCgen: process(wb_clk_i) begin if rising_edge(wb_clk_i) then if wb_rst_i='1' then TSC_q <= (others => '0'); else TSC_q <= TSC_q + 1; end if; end if; end process; end generate; -- Read process(wb_adr_i, tmrr,TSC_q) begin case wb_adr_i(1 downto 0) is when "00" => wb_dat_o <= (others => Undefined); wb_dat_o(0) <= tmrr.en; wb_dat_o(1) <= tmrr.ccm; wb_dat_o(2) <= tmrr.dir; wb_dat_o(3) <= tmrr.ien; wb_dat_o(6 downto 4) <= tmrr.pres; wb_dat_o(7) <= tmrr.intr; wb_dat_o(10 downto 9) <= tmrr.updp; when "01" => wb_dat_o <= (others => '0'); wb_dat_o(WIDTH-1 downto 0) <= std_logic_vector(tmrr.cnt); when "10" => wb_dat_o <= (others => '0'); wb_dat_o(WIDTH-1 downto 0) <= std_logic_vector(tmrr.cmp); when others => if TSCENABLED then wb_dat_o <= (others => '0'); wb_dat_o <= std_logic_vector(TSC_q); else wb_dat_o <= (others => DontCareValue ); end if; end case; end process; process(wb_clk_i, tmrr, wb_rst_i,wb_cyc_i,wb_stb_i,wb_we_i,wb_adr_i,wb_dat_i,tmrr,do_interrupt,tmr0_prescale_event) variable w: timerregs; variable write_ctrl: std_logic; variable write_cmp: std_logic; variable write_cnt: std_logic; variable write_pwm: std_logic; variable ovf: std_logic; variable pwmindex: integer; begin w := tmrr; -- These are just helpers write_ctrl := wb_cyc_i and wb_stb_i and wb_we_i and eq(wb_adr_i,"000000"); write_cnt := wb_cyc_i and wb_stb_i and wb_we_i and eq(wb_adr_i,"000001"); write_cmp := wb_cyc_i and wb_stb_i and wb_we_i and eq(wb_adr_i,"000010"); write_pwm := wb_cyc_i and wb_stb_i and wb_we_i and wb_adr_i(5); ovf:='0'; if tmrr.cnt = tmrr.cmp then ovf:='1'; end if; do_interrupt <= '0'; if wb_rst_i='1' then w.en := '0'; w.ccm := '0'; w.dir := '0'; w.ien := '0'; w.pres := (others => '0'); w.presrst := '1'; w.updp := UPDATE_ZERO_SYNC; for i in 0 to PWMCOUNT-1 loop w.pwmrb(i).en :='0'; w.pwmr(i).en :='0'; end loop; else if do_interrupt='1' then w.intr := '1'; end if; w.presrst := '0'; -- Wishbone access if write_ctrl='1' then w.en := wb_dat_i(0); w.ccm := wb_dat_i(1); w.dir := wb_dat_i(2); w.ien := wb_dat_i(3); w.pres:= wb_dat_i(6 downto 4); w.updp := wb_dat_i(10 downto 9); if wb_dat_i(7)='0' then w.intr:='0'; end if; end if; if write_cmp='1' then w.cmp := unsigned(wb_dat_i(WIDTH-1 downto 0)); end if; if write_cnt='1' then w.cnt := unsigned(wb_dat_i(WIDTH-1 downto 0)); else if tmrr.en='1' and tmr0_prescale_event='1' then -- If output matches, set interrupt if ovf='1' then if tmrr.ien='1' then do_interrupt<='1'; end if; end if; -- CCM if tmrr.ccm='1' and ovf='1' then w.cnt := (others => '0'); else if tmrr.dir='1' then w.cnt := tmrr.cnt + 1; else w.cnt := tmrr.cnt - 1; end if; end if; end if; end if; end if; if write_pwm='1' then for i in 0 to PWMCOUNT-1 loop if wb_adr_i(4 downto 2) = std_logic_vector(to_unsigned(i,3)) then if BUFFERS then -- Write values to this PWM case wb_adr_i(1 downto 0) is when "00" => w.pwmrb(i).cmplow := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "01" => w.pwmrb(i).cmphigh := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "10" => w.pwmrb(i).en := wb_dat_i(0); when "11" => -- This is sync pulse for UPDATE_LATER when others => end case; else -- Write values to this PWM case wb_adr_i(1 downto 0) is when "00" => w.pwmr(i).cmplow := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "01" => w.pwmr(i).cmphigh := unsigned(wb_dat_i(WIDTH-1 downto 0)); when "10" => w.pwmr(i).en := wb_dat_i(0); when "11" => -- This is sync pulse for UPDATE_LATER when others => end case; end if; end if; end loop; end if; if BUFFERS then for i in 0 to PWMCOUNT-1 loop case tmrr.updp is when UPDATE_NOW => w.pwmr(i) := tmrr.pwmrb(i); when UPDATE_ZERO_SYNC => if ovf='1' then w.pwmr(i) := tmrr.pwmrb(i); end if; when UPDATE_LATER => --if wb_adr_i(3 downto 2) = std_logic_vector(to_unsigned(i,2)) then -- if wb_adr_i(1 downto 0)="11" then -- w.pwmr(i) := tmrr.pwmrb(i); -- end if; -- end if; when others => --w.pwmr(i) := tmrr.pwmrb(i); end case; end loop; end if; if rising_edge(wb_clk_i) then tmrr <= w; for i in 0 to PWMCOUNT-1 loop if tmrr.pwmr(i).en='1' then if tmrr.cnt >= tmrr.pwmr(i).cmplow and tmrr.cnt<tmrr.pwmr(i).cmphigh then pwm_out(i) <= '1'; else pwm_out(i) <= '0'; end if; else pwm_out(i)<='0'; end if; end loop; end if; end process; end behave;
mit
HighlandersFRC/fpga
led_string_no_gpio/led_string.srcs/sources_1/bd/zynq_1/ip/zynq_1_proc_sys_reset_1_0/blk_mem_gen_v8_1/blk_mem_gen_v8_1.vhd
27
19382
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2013" `protect key_keyowner = "Cadence Design Systems.", key_keyname= "cds_rsa_key", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64) `protect key_block gQ4CxdvWgnieRLRQ2AMwpJaA+X4QUP23A7mcpTzLH1nina2JWDwyro/SbR0koY81VxQ8tVNBYSg8 3s+EjSEjvg== `protect key_keyowner = "Mentor Graphics Corporation", key_keyname= "MGC-VERIF-SIM-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block gPnHmBrjBHDleV2Jfu7AAgNyinLiMa4GswbueiHBD8y67DvELbF4ryETXsYzyyRC60JDgiQTY9xS mNBL0n+tguqX8nripcl2WvUcK2rEIU4vEmrY5Xa0k52V9uCE29ruqODz0JXngqZvaosAn7R3hB73 7cI2IgLWPL6sayUHq1M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2013_09", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bim7wErRMWV5FSeSCuJLdGVUUYEH+U9HzwEGlgElmMU1LE1rxBL3MWBw6E1Qg5kGmxPZcrNQKg7b PLZUD5Dv3VyvXW/HR3jI7P5DnwdmPcuCjrrkZwCh4jjzor7rIj0AM8ubprUHwkpicj6rKGNYRGRi +lmT6hjwlretXlYwE1YClKFDSDei0UBfS9a5tRfCcNpmoCaImXf0uTOJ8unbujREQZSIp1snYBqM Q6qvNMpDqcLoVSU7OrgHQdnonXWYqY/ILDCjdL1o02B+xcnkuGf+oGCDs8KSCPuzYvirbLqI8N91 feufkvRKEcc9+CQ7U9kVuEQ2Z+MB8XwJtiWwVA== `protect key_keyowner = "Synopsys", key_keyname= "SNPS-VCS-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block HhRynIQ+TRImN/1ISEgCruTQGOfZ7yQ0AeSPRr1UgeSXeBV4/j+sqUVwy6KpjxjyOB8/Up1pUaXk C62p4kvtT61bX2llnNuuYjikfaIxGUWJ2S1a+GpileS7Ui7iwtZy8qreshTy7qb9L+4SycH2S0Vs ofqZzZCA27OgdUdAA0M= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block RhnO7aE6HcfX9+ngWNOvpaRDGHOLotkXich9kwwYcDEBAwcff538vS/s9YC3iM7OnnDBzfIjK9PG hZTnV6Wbh+heW3iD6MhhmPxC3a+3h3Xr7G6V/gV+8tP3qbjwLdyiI3Y3Tl9GXzeddtSNdvaD6764 1AS1CtRtG1cyGvfnXyGxmyDzJ91rqIOqSJbBOVjL0a+NolFyEU0BYVthKlZ39r7JI1kVtcM5XAND LnFrRp5p6iEzVZDFdricPTs3V2FwNDnZSvZ0QADHlENUl1ofRaFRtXOEIahTDRwJJzBMRTba/K/s 3AtKBuzpWzTyvSqo+1PWwgrrClt60fAvHko0Yg== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 12608) `protect data_block 5fO2PrNmk6DUgNWBFaEZEwdADkRrb13p36yXhbMQkS8YOLN30xaqL+Du5W7ZZTqKopQ6y3mkdnFA MMtYyw4viV7uGqgytEQQizhAhaf+PykQ7hkf/9hnoO1ykkN6XcwFqVXRzfWkuX+18zHcuDYsdHt4 6MR8uDqPQ7Xb1g+wRy7V8HfBE3E8F4PqqpwSFNTBQtzJe9oOwjTBtWl/LvfdymEJgvtqHhzEXvuu brW+IgNzAukQtn2QwJCgBG5n7M2r8Wbw9CoLZlUvKXZujMRLN5LGh601f6ZJzYis0WHK7Bnq9cqK dmkJnZjnPtFzqelobqNMoZABA0yxA+jb4we95c4WfSxcygv+8Lg70/Copt754+3/v3bHE9WMaJx4 o+I2TDl5laqhvojrdOaLURhUid1z7IXOITs6IQG1ghaaQUcXc3ZyoI/pyUpwX5NOSF74EBdPZksV FKRxDsU5mbDWqV4AIB/cWSntq63rsDwXkk+323z9YBF8SGxf5AIfR2J3ekoSV1xU0ELhmsnO16MD xRH2RmmZfurqPn171ddeT+iaX21PO1ZcMVs2ZiIUCTLKQJzqQMSTf2MQ2w3TP4YRRqUYKTKeAw6R vomy4GQ/JZ7A1IWt76Cvoit+ZWO59WYZ4iPWxfPYCXL81+YLLZCZVp2/7Ew5u/1YnYaEHnnhauOz E8GsqTEPYzfrg6oA6SGylqppd5uIwvgpO51J1RhJYDv0ZBq3NwNIR2E6cEKTtsTyqdzape4hAONT NHZTAR9jIuVvERiyB1ZoErbB2DRKeM+TNBLOzWmWDVcj1LprKG6CE1bclU2hY3UctlZSnrvfLkxs fxDIpShLVAcnm+jhf5sGxlf/nz9kGDHbh57NGWV1j0fMyxRv2nbz5lZefYu5/nO0PiHe7/h2RD3q T99goCC/QUrrWyBYh87cIdpRBBH+UV+TcXXNAeY3PkhDie4mH3Uucqjsyyzi2fSsz1quFwdhswUN Pj4+bart22H3n5uPKLORSXMkNEZ1EdSAzu2kovt5YJsr9hmgkgBR/myfN8FQlTcxp+z1fkk5dznG SqegJFWzrefR4AeKoBtGSfHIB8IrbsiUqdOfOu3iNuQI/DlsXe2y0ltWqZZnd5lDjK0s+jSv9uac 4tpKIg8NCR3sG82QWxgSKtzdA6wrrGpQhtTWSVjBOFjYxwDli7Tm9EaEpUv7GgGRqm7wyxNy0vVo m/rrk5ln2gG2T7su+6Cyge4lQzyYH7GrJAxjTwto/TSwTeQtIoqIu+TRTZ3MWEdQufcT6N4sYpUo rxq59JlSfenmEYYfEyv7C+H5E/0pkDYfsTOIRakQf5/uG1Sy1jBc1KFW0YHkxg4uIhiz55goPVra vLoJEThSE9NNs6t3FAKMbLV5L6Wm9DBJ+LdUDZ11RGLXscb+uZa/STyS+waBLHnauRtbNlKL7sp0 1rPCjqmBXjIH+MCC46OI46TWrFQKYJ95Pe7lJnLJU0yiifKY/rBvRf0JGCQ4bugwDQL0Vi3O4wbt hHKzSL7kZet0YsrIvXVlmr6CrpSqwSPb9Eul6SYjE8eyQ9h6S/RLj9IJjcrKRHHBPW9XjtKT3Jvm DTg1BbktNHNiOUGVQZAjSZeaER12HaMKTF6XUeBX15fX9MExZiOplL+9kuKoaM9ymgITG5+ELugA LlQAGWaJBuQWNcugGTdKorJcSdrcqmb8/PuHFY6zzMXlZzj2K2Hwtg3dPN1o+Ao7DF6I2HCllOV2 80WtLZvSCgVi5WW0H+C7QLgk0SIx7BGFmvv+s1z1Y4WA3sG8hi9Sa7Q+kXcHKrbUrHjAFL/NxeeC IXI4YP5CveYd+Xz0JopwTvH2NvOwKc+6QB++SV0PzAjLEVRPg2lcUbKZTsGbk+EWehJ8C+ANiZdh /+RkSJnXnUoZuhHyL369kIzOBBaOcGcN8H1jrq4gg1oyLTsmHbiGODyWTeUfVXo3jvRKDKeO7u9c Q9eqm2YTo9kuVdVrqSOXujb+SUaT06h6FlXGd+KCxPJWUz9LYYheyEf6xVbF8rMZgnt2x/nCml6V nh+1BWBKXBFLqiyY8jFlarY4SD61RgrND+j4KZBVrEISZ2FxZAJ1yXMzYek62fst6amq+e7+2a45 at+UuRiBkMJcysEvmNmmbShI9ALmECXrlYi+jQmrxpFDlsE3hz5Qem/LF7MNbExfGJOSWPFnjqA3 42G79NcGS91jojpH7exT7AKO1fmRlFiVHSW861EUqlYSjnpPWM9BfDfHFCiSrkgo8gpoAcEVoheZ VGaOUBSg+vlsX/V5LzSRyOUlWpgJ8qJT0AZKQjGAnbkFBcLwQlEMjoLdWBTToj409DMaNopCJFND iIYdsJDpDih2Pxo8n2k9SXS6CxAQnNF0IwaRwgT85FCpkeWDKVZmahqLFXcb0VViScto5OLy3FYS wITlxAxkLiVw0fGJNndevGiZGw5EOh6/bDhlesI/OAP1i8yPRtKn8l8LwWmj+aWZmKVGqsFvoERI oP4woF9xMZSRwnVhV/LEmujI3VXwFjLHBsB7xcxFDOs9NlB2YPmsRzEabMOldlXSgE348ZIAS4iw 6QFcT3BS9V0Dq3zbYcx8gpm2K0gfRtowfhwlYDmugyPBWXKIAwiQUgTGxYCBk3AWhJwmR/wCvHd6 q1n35nLYHNUfcgFpPGezD1K24vLkHu4M09HojVvfnt284STcakZqV/aKBZ2lbX6jo1JhGBpDvoxP dFHtjjaoczCOnbRgcqxVFT12I86L+dadNSOOIcYe8S2NskYJEH3969YsAz1HT1xkErISmuGxhGz/ 6DBcKMn9vgF/dXJfn+YuNlvqSiONM40LEf8I67ZrlQbek0pFyOaTjzv2fgmUsOHdTdJ1MS6dUbqb FSWJIin1fBFhpRKxs0pdNmnyjwSsXjx7H8CLUP0+m/4gQAiH4MeRtTH0ArcEniIAES2b9RnALau2 ri1Dm40Vl8ks+GWIWz7y+HzVXs6f6pfD+9b15GFI/SjCVgCan3JMW1UCo3EVMMKMAH0sp/Sf7LcG JOcllQrL4qSWqa+VirFPTLUZchHTUihpEGp0RdFmR6fXGwRBW5b+Sn5FWjWBsxCmR0aLuITMwCGi uKNE/dunvpkdV0ZshLOJnxxbT5M/rB7BQ8ncWOCfluOqjgeEh7OzPv7/xMyCatsErntfDhibrJmY g2yvdDimFylMfpUlAxjx95d/PweAy0a7Xm7sI3TATeC/pJhEFowGGDd3fTyPl9u8Hos3sJykvYsu 9wstZtiC0wXBqWIIEWPEb3i81WRktS0xCdwUXW2BXzlhJb25BocZiBb6yjh7bSPu1cau4j8ZZVs2 Saa7m9HMTtNRy6sOSdGPiLL7kNR79ny0sylkb4kCG225RYUSdj42W4eiHY5i8E2Zky2TwSqt3SSi Gfp6QCbOFNgRhXpG5CzvznAf1Ai7nxsfe/TyNXoXUzRzK8jJ2PLGu5+s/brMgFXVI0qO95SEAM2W srYsUeO/1NSple0XfxOmNn91hk7IXEos/N7LWaqHWF6IsAByf5S9dCH6b22e8/1LTgVZfZnbkqwn 3mRlxQszif5j7b3kgBra7hkTxIL4DymX/37s+98wS3eAOgSYN3qYSYaykXU/EHqu+D6gdGsFC4cc 61O9gQIEoV0PMGt/oO5iIXyTfL8N+/zqNuVnqp/PaVq+zUtUks5drmIUe0t2xZWJCeKw5wKeqWvv iEun2p0rrP5lQG7+9pJJsr4kJonimxnfa6SpvM/8Lib5nl2xHhQLKdezs3UtZEwzhK2SxSacVSuX 4F+awIHYUMV7W6Q8aaMTWIPcqdkMdNcGznqb773CO4c9oj+EsnrcFCDfGYttb77pOzGuTnE1DcBj +C05OZmX+5BNLlWl3XlChqO48TNZYaRSqYhO6VbI23gb4orCUIaD9UcjhWOtyXX3Pq/IgcmxzG+b SiDNcB4I4dT9itkLTDDQufC326lrIHTrmsC0LOSDrfB+KDgalphTIPtStuhkhDyNF+lJtRI/F+3z e6e3VR/1dJozDnvKepRSqNFj83bSSlXwBzjjfF25H6bI61FZDkoHGiZj0K3LY9rKYCYcapIEPsb7 fR9p6CsxkDGcSmxbSNAH47pHQG7I1hqeKpolLzovuAHA4N+RZeHPLaL0s+lOejEDzf/AE/xDHFaq tSfQ8CWKg65LLQYfJqhNmRQOUF2RF+h1+lW0g73Lbdk/ylqzq6HRD8AE035Ql2DKFOZHZ5Cur61x m+L39c/O+tSOEjQDtOock1jRoOJteJPvn4JjN051NvWcIKf16Gvp5D57JMKZNM/01lXRo5CrDF6P 3esBFOi0P8eWRp3pHnmrkJl+AHfIcdAOoLMSReARtZE94CEEy+r36e44OY/mnqAmKXLYATUOpRn5 fSxa6OHr1iqP3TETIBwHjRdv8/YGK45hUIKGEGvRd8l0/iSwkwJzSSP04jfsGBoCCre8WFMT60oI 8rkxkxudoLP9LKUGRJGVwM8sgareov3gnijKTtvStbts4CC4sUoFEOKy44Fyv7MLj59cUvuAlo8X vyHdtFyfAUYfHynAPc/v6HVW1dmeyMlGakwYmxC9i/gqAyyaMH7yebAtDgnLzLyVXu+OR7huQ9JK Zyyn58QXIeV2fxOnluHP7A4m9w1F42xOvRq1Vk9CARcPoQhiv9AHjilBKrDVl6KflgE9kY/l+hIc DIHojNDfRlJz8OGHN9TjV6v02uVeTiRrrR7f4eeyUY5gfvCPQ5GwVIGnV3eP8gI22SL50JGfw8EH M5C8/0DTzWPV3wL22GGSeO0lqonXM7LBI27OutiYktcm2LzR6tBnowC8eWKQHgHGF/t/s3jof+8m FJrhsefpj8LukFeE0X/CpWUWXcKpgxhq9DSR12DPLPDNwhdfKTgCnOLXyr6JI/p+rNX9H5uHuRYj pgKnYOHF8SCnBbpyTuVjb/HVGbQb3zrU4o17Yn57pwVlfnZ4hpoZt/e91FkIh/aexvXPjT4MsJnl AsBzCZhByXepim8JwfhVT7UH93538ECvaZGBR7UsYkJmt+ETqyY8+/8xQOfMsJEpIPBdQJKpiS7e 28lhVyZQUYjnuGKTZZjSX2b0Pg9fMA/nFr1DqLNlYJ9gXm8X+ikNfcNdBJSfBJHYVGlBdViSRyLu oJ5eQGAANpC84jU/V9rITmwEQGRZ1rSsqhv3PlUePPuexUEEPyr3iVZn/L3O+pbCW4srvbYl/YHG Mpjn5zRFZcbA9DtbP4WvlkPpUVBSAIYcKsHwW+TuF0JlOVN65nlvwn6bfNUUUJzlk/TnNBDFRrPo Rz6yKR9PiWLCTXCXffkBX1XLEAh1FanbRRVAvwgOZTA7PFpzNPuxFchVyWLhl/yBkfUjjJb8YzJz K73U+Qch4zM+W1nqs0q0689CU0JfD2Y2He5Gr7cJoigDHbVipugsY+vEqUopY+dptW4YncNZvu+1 NfAC2jDeB5FoOrwUB4ic5mNosoR2Sxn03csQkOZdJH+c2jkdyvmDMM9nqjXgr5/GUEtgrbOqFTfn hfjK19uAl9gmucHeyZlrHSgoIQGxsMsKnY+/cWvP5yton5/bj0ezim/uSdG3HHN/jiicwflCJ80m Tp0joxcYkkBs7tv4FEbhHo2ji9FWn+hia86yzJ35aeUHM2Vf822C5uAfEOy9vdOse+vMgj80JxQz tqHMVQuypGEMjSIntajlFoAhfpMYTLmZMKl+3NBmrNK8VoCpLVnqJrsJyVCVjRCnrW4vcO4BP5LH y1GPLGbTUB0qtKOWAp374Y53G3uDwrhIqvU3FAo4xJUtBiqX1TqnjRgwZ58vot/kLsRMMOStIatF MQuzASAikq7GKKZHAJTq+pBso0Or3/0CvXCSFBfNH7A84qC3CGZE+g+j7IDVkHZeBMmAJVXGBp8e uOiKWIJ6OUJKSaNoUyA/gK3WYGkk0dgcffM7egSE62F+ZYZ4l0tA/qHO1clfd4HWsyGkqWBmiZc8 uSwKcZstw/YSTJ7Gis6FQ68SIOjn6QdhlKYJWYaIWWxP2Z2R/diPC2tzdIgn8/hZ5vIUOnl+Gn19 /pbCAVqllczRomLfZmyrNjjgY0wsO5Crj25uqSyy8C77oVtCtn5tAYKfu+6NbjFzYq9OHkttPtKu ySCWsc4UxnoYmk4WWxVrvW1qypB2H+Xp8Fk/ZEA2pCviskImSheZ6ItBd0gkI0KL9aCrnGqF6nF0 7vlbMlDc6wlhHRykm+x6Sl+7qjLEKC6RZ/9s9n1cWcbjkE3so7r1jy5jjl6cK4QO2oHUU8aBZ/+W ZTkPKInn/g2VzXT8mHtodBga2VPW/o+SpoCAUdalfhibjH0+jklCMnur8/39TQdFI1Du8pKmBWwz 39FG6GQe5qZixaKx2eaozz7bSxXUqGC2TUQktVfw0fRoS5fsxwik+13W5v6aRCseZjHZgFtVuUjx rWAhTjUu/lLuKD+wBedO56CGv3z5lNFI/2b8IrH+Dm3VesfQ4EoH3P1ZwEVOL91XEXn2sFErQgau 9YS3VZXabapgyxp1ZSEsttyU2rF1gOQq17t4dsXPky6tigx2QhlI7TdDa4oTAvng/Ft9Rcq9Ybzr Bg3/rRA4YBE1Ezf6Y8NyN3Z0HWhh75R7CRWOVqB/wuvpvtObkJOJfbk5OuQdpgDTWL/KHvxg6J8e c/f1hIjzaNfhg6i7wsPknnbIrRUmdxUK6DJi6d44AO6sc70Gybf41iruCXeYGcksy3LglRBZqk1r aUohp7Dfm7VUJO1lrQ7rcdjQ98rE8KSNotz50jSqsSUhzdLzmjfd0CJhEq6zveQLdENbh89l7EuA L60fQC1Ges+u1IX8Suv0wMONy/5Dfzigt9E0URmJ1kJu7D4s/X52NBKyAR/5cskUJzFvY6T+/rYk Dlci24Yi8gYiP9TVlB7g8qxOq7HhEygShmCf73jQGS5kE63DhF/SGKfVZcyiGuzly24bGSbjfW7J AetCxZmIR61AI4tOlSkoi19aLKOV0KsQw8Zd8StIYv5M4opVzeLghPsGkvxvBUI0PKTrU10QpOJM nwZzhOc99kDTiv3sj5yAx5BYr14AMfOXTTweB8mPfYSo+yZ8KgOk4EBXCBGjU5tfUXwpf+afxo+X 8KmAuntrH1Lcmn5/+h8fCl//OLI40i1bXqlvqMKT/T6t0s9TNunPrNQEac859QhJ7HK3GYwxpaww iG7pndyS667+Gu9japTCfmIllpuFf9Vlb6AGeu7fS70TBSxoUdjpa6uGwyCb0EMUQclSomwwJrLm csfYXDbEtRtHeWub+dqDCUR7iiQpYCp6Ifh2lAj4cfP3uavVE7dUNvL2Pzdwz/cUg1pxVfkSFLTJ CJj1ajGldV+Pv2hdAEfmqidx340qCmrMduUdZylTQJJ17jqDzacfkOBZ97YtY9EgftK1hBzpZRMP pDUcRz5b+XBT+OKG7IXCrmOurjSesTT33WywPLD9jhZsIvI/Im2Ha9szFtpJyF1f43XyIpEhLZ2z eqix4zx3gSeMTr8PBztgIhj4pxfhA0TyNo6IRVS1f+6rdp6LXnNYrenyQQLyxrkXQ9xrGBFBCB/4 Asn/OgDUbrzqz6dg3Ui0RShztu/kqt4w6xpVa5j4sNpvgucmrNza6T/HyuHEPU0B9yJzplDvEoV2 yfDzi/rmRGwbBsxqGIS2O7wp4vbpgHT9EDSln5ejgEoI44iuLnwTLfMwhJJV989sPD0ZxKF6Ythy j3l4QzrgqShjGKaJYRdXbmeSfwuKoxw6FVBSB6873gchR0fxRTfu9ZR1rJSnmDKSXSugo0PThCv6 j8fucPTUvrO3mPe4Dh0WxZ2DkEriBNcKMYsCROa0/yFPWsKB6hPFvRqJAVhlKsyKg02sCcSZmoeP m85dekaTPy0dTmZZrHUDi8pxMnvCMweZsIm+1m+chQy7xpn+Xid8HQxJma4fmsPHhVhkzDfAbaIx zg9Umjpp3zHvaOaktM+NMYQu2fde6dYXdUxWoRVvqRccE99+6l+wA9eSvJ9lUBTHefbiwMi5GOkr DHhKAHOm+sCMxUoLwhcW5rUrBYgTxxZ0jK39Jhww12tGGSlUHu+nt7pLZb38nq+3B+43L01DzP5s JUnS6M/+C9/qQTITHtViSabjWgQmD02+XU04UFROWBJ+PB22QylYWbq4XCCl9cECXOcQtF9sOzjZ vpSoeXTIt1dwryXVJ6o5DW1CqPAvbETjoSY1a1kcxJj9ipFgzsCsSZDkCkus+JYC+VgZX6QJYLmO UP/kymmJ6VtZE8R1KrM4fMDsHnGm5mSyteI11smOI/htyo4Dp7Fyfqb0iAMIQnM73MVTb53O4Bx+ XpNQU/uYVwDWQszjm7avuLnQ+hphU1+ODVxzOkxrCNzuPBLALvc9eFUFheB6cphFQhKcbEqDC99c Yj3xgBzQ53xNAcsHa11iQNgaZFc9flxgd66A8kZtksJD29r4XeP3Q+EZhyNAx/NNFITGb9bjRhdO MJuNQfSxvSoFj+NrJrX3POpU6B5iaCVIXXl0otTLzUqBFB/xuAvVkTtC8EehBUUwS+Zr9t6Bh4yG nw0Em6CGCaFv4eUnGK1y0FlgZTOd1tqIw1lNnFv3K0fjAApShaYC0o65h+1ocdN9dbprb9Ex+2DS /cRziUVLlIpx3chP6vVc4Tnq+mWQJZXXG5wcAh2wBqD8/cC+eyiw1PYvB2C7d/XM0T64UTsA+HCK jggeYmgiKsPQujrWSWLxIKCoSYZdhUAo0d1S5Ftv/kWjuuJgaaGFcMMLAhvfOmhKLYqr2/ApP/P1 EAw3ljBk1kmbPo1a2yU7C0lEgfqA104lkK4Vh+Blo/eZS33+zdy+fyleazIAOkVM9HJvfMcBHWzj C+F/dvjV918QmJhByXuKml3d3eBEdpodMPYp5TmaU70wg7Hn7URb4SAYhoPUyUoEiZfXYs2IXxla h7Vshlr8x4zwD746BWAYc1gC0OskUYMqDajNJA1CoRSTWJDwnj/dY7Q0+33D6UjfeQ06qLR1Ld7k fH7DjIURGp6F3JNwtxTXH3fkspGbxo9Jma9u/Zh8SxRetwQVykOWUHeSWuDloyKQ860AWKu+ntrF TN7wj89nYoZF3p6H9RpH1CKYftt67vRAlhQPPuaS3X2u3+NYKHPVY5qKD62aRjyMcaICIEkZC4eC za5b/lJQrcK6r1530XrR5dr6YwtMeUuX2TArggVKKcNmUSybY5H9aLoORevcr0zhBmczV4xs6n2i dMbyEoazLV1cHV/4MqPY+mUZwpOpDq78GZ/woflf7CLizr1kExtAhsrnUpG9fdL7RoNqhPO4lWRo db6/WsOu0BA2GoY+spIA6DKGt4Kcge/8vXQh8K5X81KLa2pdEZMl0TEVYiviRv3fn9R+YDMdV+3y 3AwBKt0X3F3XNgelOacxDFX++19VPG6+HK6tYshKeuaEvTELsyguwiXAGnV+Qr87oQhui50e8szT RkMgoJdOscjTxFHeTObV6eiDigjW/rTpymfl5wEPvccSrgpFxwxquk4TJ36KBws3dfOu5xRymudL S4kK2Ac++xzg9aCQDeKc9ScLocR0QSVtntU8INTgVUvTq8FubVwphu9oVj9b7Le7KnB2w7iep1tP WknNzFtyIeKFP2CLmk2Oc0zkg1N943sh/dGZjujxE6amzXz6wps9Jvxe7i4Ld+cW28gCuTz0ix0w kAaxBDruWaBE/YH2nhwZMoudRqIHaLM4SR5fgkbDsfO3uaY80ppMuFO0JpQlp4aLDqKnw+25hwGI pM7dtyHlM96TZyIloJB+9XAEsavBRsIIDXkyyd5SkHDLse6iPv+hJ3Ji4HoB8rxG0ZPyLB3dm4Aa AgAT6PHdsjtNlZ2cHzr4insZBVUoDDQ8pRRqhmkSSKjZGQ/sFZHsVBTS3gxuSR9T9f5S8gC5sfNi btSM9SHXzi5Eg4gIyYwoy+n2TBzmt905GlAwRRWrdPC/VU3Wph3tezTQvcurhSzf2Teba77go+ko 8ZvB2qsT5YqChYzJSz4S3xQWYxCu6ZP9U0q/AzpAV9Kda4tEItURPWkw06dfexqaCkA37aF/jWIE 8cToCfQb7eJxIM+t/kzUT13gcoEltjRl5FZ4K3IBMggaRALtx1lSTzjKJdGk8bDW11H0Q2K9koc5 Po1ZkZZCEZHLrbvE4V0Z8z0TBWQGqhQU2F2no/RoGsocZ7BWOgxM47snMPZpEelnX8ZDh2fgVNOD reN27i1iWqhyd1/f8Ye1sIjuXsPh5AMgnzyfvv8uKae6G0qHM2dE+T+Rss0GfvsUD1oUPnKbaa8S nvPBOPaYTytU2XrucD496pTUUGm7qa0N4agMVVlFShlsSgvKPEt70KdoAUW9Kl0qCulg8YevYUkw WHaDCDa5/It1R8U5nOEocnwI3x1Cos5I43uYjH1oLvPWrLb6rtZtNkztT2sConWI92sgwHojzrz3 +/rL4vFjlGrWpB7HlcZl0foPV6Z6vYAtEVKtq57i0n5jJgc4S6GJ791Tzgl28ZTXU5g/AIX3TwW2 UObtu+n43Um4VpiHzxicI/X7TTKQvvVi4mTBENwSDW1Zl4uTRucD/Jhm/tL/U1T3orOpsmifmGr4 MqoLe6oWeXvbaqJbmktoH0693ZssagDrf1r+8rYovQ4IpAen65xKVNgbovSv5XEhcRy7rtMRphEp JiEe70o2DwM8ewS7N9uYOxhPXAfViJvWiU2UhH23IEKAZE9p6PuL8bUBieUJLvp0gSwIxVcV4me4 6ZxFvR/2CrGSZXJoBjrbErwdKPvuDoiylx1lkBLvrsD4ZTSdtZu8zkqxprrDsd2QwYBHYUcvR3EP bDkXZWd/UH5LAYP3f+SpPfiUWOeVq4I62TfLGTm50JatA3s29/ADGdGEJM6LMn+5ODH8HbgUn3ci YB6Wi7++i4FiRFbj8SFbTQqKwsscQp5BNFLAUuesehM25F/x2PqraE2ZHBs9I+l5QMYphMcWzWjY hl4R9cCKXcbzik7D4jbC7PCtLEFBGHUij2Chdq7FAmIcTcJWJVMLMQJLn6DbmFBf5mTUm3C0BwaN QyeiZvyL71/xdWrE3DfCE7iymi/se0gn2TFSwFLuW2oIuZZHprhfZesE16BYmFPuSKC5G78356Km Z5/nCVkTwW0OpMLUS+jwINkeqVy1rVKGWBqwwpPVSxo3F1zFWgiXzxhiVaTWEHRuuXAscbd6HYH5 9z83zoq1FQBByKoSbk15DFXoJUfmMp2y0rC6ZmE0U+1QdGwhCHbC6pgJn507gQhb/EGisIx7mYce VDrv2MGcuDWWoSFrEVNHSlE+jLF5xnBYFJ64Hf+x/Is74j0NP31dk5ZpZcVDZcxgJc2f8Qz9h6PD o28PVnjB6A+IMfdgzerMpBlS6Ic/AdnLmTTOnCTv+4JyeGGW/G8AVtPDVrmCG4NdC2790+Cf40vj xppbt3+s0l9O8LPUv6zaW6RU7yAEHuzle3BPyAUk/+dYniDoDTfx+MvIrmoc5eQy4VRLRkRKiH7V MCYoPF+EePrJCf3m+JhU05F1Uje4i69tjbUD/mb9EeTGaEnkeU7SNHdVEHpir8FVt/l9aRaX6uVb wKQkIBQ1mLyuEkIVae5rdUoo50HI1vAY5Dqiwv4eJrBUWW1eqDc9hlo6X6u4rBSELaVGD4VZYsUE yFz2BqRHehVM3LeupIKA0waKR1I7nRaokEKhn9GtovIMfmTnBwrv/oq6dfsDmRjeyplSZwuD9zHz l0pjgT70pk2MfA5xuheJT9OjyPA+SMXb4XBLW3FB5C2kz3ddIe0UIwIDMPifsLCKhKSdCTi48hgy hssvaVO/tJvbVbPKGzy5czxLgCA1vDWXSuGzVuPw+0/khqHLcLE0fEN9C0h2pfAMwcoTU9lcsb5+ ejKF5kPsfArwy06hIG6hNGVKib3DIifMn9bVjAZ6yI6AIkcEYk2VmCh+aF8OiQICAHv+yoV3EF2q mlGKEFnjNxW+lcP/dluRP3LWg2Fdxayo9K3Kd7C7DSR5OEj2gLARcVWdO9Kah0CUq5Zvdo87Hllk uJm4MdcugUlJqtRZC8MIgZ7nh7ZQeA88A1PQgUO8z6akWTpTD4tKYMdIve12/rbNzvDqRvNdQjj2 vW4P0XRt6B6O10ccchgACd9hY80B5UheMFhV8bBJVUp7HhGHHklMvPhSJ414R1XS6CK4VOyoXosJ c74wSUXmAg31KXn8GRhJtZVVnPq5q8aQZqJuH8MqD1AgReu/BRlNzaXOXe0WKOk0DcGjZV3BI/a+ 5vt0qfqKe4aZvxL04/ZXrORdORAk7MFibjp/xIKORNLSrnvLtWQ1rPdUkF/28K5Anc4K4N2Ezs+/ 9WCb2R/FtEkSaZ0Gl27z5nmx+sSiwfnHxHUXe3Z3tML1zb8dBgVBN+7i61pvN9N3hBW/ek0CeMZK Kd7LtGS42816O77M3tvzme69AwAAOnhlQcf1gMutPxVCvIvjbJeJt4u1lFKIkWW5cZHgCOna46+C ZMtTERn5YGOfoZouNwpln1nWFzGsQluQ5Gs9yVLfSL9OnqSraRVS5Bh3j6merrsUGy+Th+J+aXPc 6QFFydfTI32EQWfPHBMaqY8qlD2zeVVJ/Vf7vBtesUpw9PLTRXRPYcnEMmN9wgS3VnFXanf5VsF1 P2MwI5wjv1oQJiZU5P+H5g7WaP2VeTuSlyJD1Mpp4t7KVYKuMXwv72627Hgoupwota5PTxyO6i29 dgSTfB2AyAJHfQx4iTjEQ7JJWWbaZHLeWzcCOBIY/OYheGjU0ERfMIACh4LaYbuPcyVhA4msr5NW gJI9NZkDyppCPSn4iADsrcIxsk35OJdJyJjn/Ggfx5cPFrJ7n7oKk9FPMyXagVl0Q0ZWbslEjKpA NkSjuFTEh3rtcuYyH25Suej4+/zg7mLxtkqVaOCuCQiiKLp/dEf5B3aEjOvPqP3F0o5nE+DP47K2 Jozt9dgcH/ArWey0utxbDAlSzG0TyIqt7ASWlAz3Im3heknmgGaPhda6b9FgjMq1zxVZHilpLQzT pv37pyaLwE1ocPgHIYKxczPOb4HNNo0onOEGFNmNkx6RmE8u6qpihLPLmduSShzwLPetepyhHMTn Vd2KKifkRqpT4lY/ZVEhbNK+hcKzwBhQpTMvd1acSVFTX88XDrtnWxM9IXlb89B41jI3ZpSvYeab rMvD8WdaZYqkzTU7sfJ3IdPMVnXDeXhr+vlPcojFjOe7sTMz2UrLFvrefPJResonx+ZmdSEvYkRs Onjs/aJQIsy9bw47TfJWn3I1sa8yg1L/KkZJE2dIEsjmek0Up0ym4o6K+KcDHV8LNuQxY2X0XBX8 1WoNb3tLVyfRgY++QmSFX+IomM5sx7vJ3GK7p2Tm0NBpCXOJRzqQykScJJthb/TzkXyG3ymQXGny 2N6FXnsJSj06eIsEN0HVf/0+wv8mcZ5GMPBE3DYg9qEVD8hrg4IkRhWY7/7+46lFDLsZIDEMDSYs 0dSffHQiS2mBNw4eNu+ievzLQ882FZGGWImNKgr2BQN3al9aoUoz9FY8u8Dc9B9s/p2zp1AZKD6G Q9taTSEWv9MwpEFzzTCA6/E/o8EXzBheHDJ6KnZ+RY9mluP0+phE1T9k56q66exmUWN/xpic0R/z m/R4T8S4wdIE4AaCXElZbL3JYMWyQDca5KjZuu62D6EK14Gtt6FXg2EzeAvPvYYEjDLpqAp/njS9 OtpcyZNQfkBbfWeFmchTNAANh5lVag7oL1fqJ0/9WYREIYyBqMrUTQDc1N5mYpOtoEeEHK8JzKLu Sv4aqtekYGtLoke/hLHZn5srVUwqQMuje7GGTUjDvLWTZM1kLTlEcAfO74hUCmOZ1ch1YIfqAQZv 9FQaZosHQpJGv1x8AoOKt3kcz9hyjDDm4DEAud8Hi1OV7TVnRHZsAJGvI4RKgJtzj8q4xIjcphN6 z214eAo2egvvRtiMTcsDHwkA55u9d7lm2ImUOdaeX3mgxKxMsOp0jlYgcKx8FijParDzDZt79f12 EzoxIK2WRYiQEwrU6k7mUwn0u4gL+aiN6Nvd1NNjEiAaqsF0W+gkTvFgw1Ly871Y2RgxbMxJJPL+ e8BOT2OiPh9CmFB7HuVXk8J/OPkTaFvZDMac5CmX67AvDmjaQzigXy4CDnzklfDUgxiARTDkf5B6 Ep967BNVxv78TX2UkbZlKVnmQWM685pM6+M6enQhubiZhzVret6wTiMgjAhC3gcSBZOof8ZmuUnh quhlD3DzilcLi5yIHbZOKNpIDgroBKCEl1P5WJXwKbaBk1uv7Om/LNy5N1JTg0b0JA5vtQULU/zK DMcfD0SZMEImwX+vvZZeWxtiTRLkIbooFV32MC3n9IAU6/8rDCXBQR2oJTBYWZ5Jh2bvayQMxuEr KGMIoc3ys8ldBvTaTR6lcIgaTugICn6f6k55eAAewWN9qWThPrjc4DNRleK38ILcBvi+JOPcMkF0 Kldi4WSj4AG/B3br8DJXzS/T1AGoqHGHu72vvwUnFgh4b/EJHxz/c0KCSS8uTswu2rgOfPE6p1Fg 7CfIbCnXVY1aKe1p+pzwAjyJg173YOcK13TPtkDKJAPNMXsbgF185F5Kd0i2qxA9KNYRJTCQQioW C73IIZ7GrMbFPrE+FbBvkAF/WW8SRTJV/WSdj2jarGrCyUImygVeVCw35GvnNMte+CXBttSPAN+y E2WPq4Oni+MbVdDcoDIDLvxysIdD+p6MpRznaJMeh/33S6+yWRm44mk0m4bcba+I0S8jx127N1lN cdvWl3iaFdlBXaWa8ajl2sLiOAegJ13l4TqZPT9Ru04tCNLuNen62GSf/KGo8Ud7rhdaBbnWQyaP Gp7KJc30aYA2ALgg1WepnBVgru+C1/6oXZ7GBLUqdcQp8gVg1YF87mCQCZ1jGwLWsFUvzVuqc8Xw epGCXe6k0HyflmGkCsm3QUMxVIAAEpkzVhrViBXWKRVLdONrm7o3Vvl3ZslIqbOZv1OB0l7WyvEU 7qTuGKZiV///NVDymfiE76vq7JDpyJoE+KRA8JVJWm7TkN8QL3d8M1MSgJRW6EuYeYadSRVkLfzo qRhzI3UOVhLaPmAKwCsqhnw7rRJwdmpeCVGE5J2GUpIvgh4dYP67b7NAf6p6ZuS/JZ5erJ+4fsgf 17bnHdBXpf7vCP/MZ4cHBWA1Tpso11/dHiJGTijO/6txhFAdm4YpmgJ52SOiBl1HnpUuWnCHx+EC RuqSfn4ikoBsXmPghLRLKH6aUHnydcWzkYc8CU0vxkFEpeAbymRdZyS5YLE1dGa9zKLdB8CkJta+ YX+S2UdfIGSQsHo6KTALfDCngHajCTKwfNbRWiIXCxRmiaVlm971Fzs+q8dHM4AubzGI0wHSHDu1 Qe2dF9FCVkxxzr1i8rTWo+/uN0RkWl2T3DWW0QIE+O+wqcrBRYjXI/Dixgt6rgy73m5lkVRsJCAP Diy6IpB6I+RUX7oUUcty77SCKYQ24wsxcSkGv9ans5cIZYjcFz1VToADzs1zwqSjq/LcS7ltJm2y zTKRuwJZ5/g0mExv973GGahXzka3P54o6JVi3wPee8dE3XTf+S7h9Bhyh8Gpm3kGZv3XFcIJw7Bz Xsz9Q6s3EfDTdGNxVYdIuiGM7CDVXNN0BJb+u+bOfjnHZN+YsXaJT94WOreGVgNgWNAsY94hJMkM 5wPT0mTY+ziQhRg4uvTDGtj00wT8ktEZe6Vswmli3aD2yGesAi/mQDexoZZ2y1pHtE/3m0fGAFkq +M3DSVWcJBtCzd5C38/q32p3evG1ISOqgyyAeUpvhwetl6Srg5sLrQWfENYoAuPmMPjSCHnFjnKV EFMv1MfduEOxOQrGERCQKQ9N7Nx19zUOZ+uxAh65+8xa6Bl/CnHFbg54vbs6TvkX6ZK0caJONj2n 2XA4PbWDggtdOIAfjxwGG/yezu40Ypr4+JRxc9fqY28/AK0xGPv1iMTM1z3NBacCddjoVN86ku3C 11870p2RFJn55QSXshGOc9f+ohC83nYRgaAL/hM9YZ/mxSqL8+7OH92d9S9hxddS2aZNxJNAld6e fImovMseid+4TsJxSnCe2fsWbXa3ODzBDYAtMmWsc2VMJG529QjhcRNrWoPQrczjNkeCAadpatac aJmqtwPQjroEQvAxb1MnheIGFQ5iGAy6U/49JhP7P1Vbz6R9uAijty0j9/IrX1Ioj31Xy4eyO4Nt aLiyLtkpq9cgeHKiXyeFWVYis7uiY3cre74dvwrWrjl7ZtAAa69T1w0AVvPMNL4eGIjK0ZT+v6Hc 9/AcKyeoO5g8EUEGm9tdeImTARPSNxp7T5gUkJ3IciqOMFBCd1WBKvyfBaxl5AukgTHCC4xlwd3H z/M+tdf4fky0pFbrvdDkAmSSTU5P5PQ4Jl62ArXaViT5wD85ks/99+0V9e9Hp92+XmCcn0tbKndu GDE6ZUhCDiiZ7vZHAfHt5IFL1TnTKVFMmwCwvG4f0eE0zJsGIuuGmYFNW5HpnCIrvlkzKn5nsa9q +qXu24yzr05elNBy5poAmPAhE0vIrzb2ma5/ZNXqh/fd+qoiQ8NYcEjYjZP9cVw8/AoK4alXEfDp 6maLryhr4iutgUlLSTS3TN0YdBnaBeI1NZjdc6Fh6PDkUBDcIqV0JufbvKHkPh8LWvkhj7toPOPn bXUNzD/vKUfMaADP0wh7PDx1gVx56oLZIllCnywfdO+FjLtzN/4oCACGg3JrG/ZAiELgMuSfwlhH zLfX6d1S0C6p2JA= `protect end_protected
mit
Fairyland0902/BlockyRoads
src/BlockyRoads/ipcore_dir/explosion/simulation/explosion_tb.vhd
1
4361
-------------------------------------------------------------------------------- -- -- BLK MEM GEN v7_3 Core - Top File for the Example Testbench -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2006_3010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- Filename: explosion_tb.vhd -- Description: -- Testbench Top -------------------------------------------------------------------------------- -- Author: IP Solutions Division -- -- History: Sep 12, 2011 - First Release -------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; LIBRARY work; USE work.ALL; ENTITY explosion_tb IS END ENTITY; ARCHITECTURE explosion_tb_ARCH OF explosion_tb IS SIGNAL STATUS : STD_LOGIC_VECTOR(8 DOWNTO 0); SIGNAL CLK : STD_LOGIC := '1'; SIGNAL RESET : STD_LOGIC; BEGIN CLK_GEN: PROCESS BEGIN CLK <= NOT CLK; WAIT FOR 100 NS; CLK <= NOT CLK; WAIT FOR 100 NS; END PROCESS; RST_GEN: PROCESS BEGIN RESET <= '1'; WAIT FOR 1000 NS; RESET <= '0'; WAIT; END PROCESS; --STOP_SIM: PROCESS BEGIN -- WAIT FOR 200 US; -- STOP SIMULATION AFTER 1 MS -- ASSERT FALSE -- REPORT "END SIMULATION TIME REACHED" -- SEVERITY FAILURE; --END PROCESS; -- PROCESS BEGIN WAIT UNTIL STATUS(8)='1'; IF( STATUS(7 downto 0)/="0") THEN ASSERT false REPORT "Test Completed Successfully" SEVERITY NOTE; REPORT "Simulation Failed" SEVERITY FAILURE; ELSE ASSERT false REPORT "TEST PASS" SEVERITY NOTE; REPORT "Test Completed Successfully" SEVERITY FAILURE; END IF; END PROCESS; explosion_synth_inst:ENTITY work.explosion_synth GENERIC MAP (C_ROM_SYNTH => 0) PORT MAP( CLK_IN => CLK, RESET_IN => RESET, STATUS => STATUS ); END ARCHITECTURE;
mit
pdt/ttask
test/modelsim/sim/my_fpga_test.vhdl
2
1247
-- -- my_fpga_test.vhdl -- library ieee; use ieee.std_logic_1164.all; use work.tbmsgs.all; entity my_fpga_test is end entity; architecture sim of my_fpga_test is signal in1 : std_logic := '0'; signal in2 : std_logic := '0'; signal out1 : std_logic; signal out2 : std_logic; begin uut : entity work.my_fpga port map ( in1 => in1, in2 => in2, out1 => out1, out2 => out2 ); test : process begin testcase("my_fpga", 4); wait for 1 us; check(out1 = '0', "out1 should be '0'"); check(out2 = '0', "out2 should be '0'"); tested("inputs set to 00"); in1 <= '1'; wait for 1 us; check(out1 = '1', "out1 should be '1'"); check(out2 = '0', "out2 should be '0'"); tested("inputs set to 01"); in2 <= '1'; wait for 1 us; check(out1 = '1', "out1 should be '1'"); check(out2 = '1', "out2 should be '1'"); tested("inputs set to 11"); in1 <= '0'; wait for 1 us; check(out1 = '1', "out1 should be '1'"); check(out2 = '0', "out2 should be '0'"); tested("inputs set to 10"); testcase_complete; wait; end process; end;
mit
IamVNIE/Hardware-Security
Interfaces/UART_Version_1/SourceFiles/RS232RefComp.vhd
3
11032
------------------------------------------------------------------------ -- RS232RefCom.vhd ------------------------------------------------------------------------ -- Author: Dan Pederson -- Copyright 2004 Digilent, Inc. ------------------------------------------------------------------------ -- Description: This file defines a UART which tranfers data from -- serial form to parallel form and vice versa. ------------------------------------------------------------------------ -- Revision History: -- 07/15/04 (Created) DanP -- 02/25/08 (Created) ClaudiaG: made use of the baudDivide constant -- in the Clock Dividing Processes ------------------------------------------------------------------------ library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Uncomment the following lines to use the declarations that are -- provided for instantiating Xilinx primitive components. --library UNISIM; --use UNISIM.VComponents.all; entity Rs232RefComp is Port ( TXD : out std_logic := '1'; RXD : in std_logic; CLK : in std_logic; --Master Clock = 50MHz DBIN : in std_logic_vector (7 downto 0); --Data Bus in DBOUT : out std_logic_vector (7 downto 0); --Data Bus out RDA : inout std_logic; --Read Data Available TBE : inout std_logic := '1'; --Transfer Bus Empty RD : in std_logic; --Read Strobe WR : in std_logic; --Write Strobe PE : out std_logic; --Parity Error Flag FE : out std_logic; --Frame Error Flag OE : out std_logic; --Overwrite Error Flag RST : in std_logic := '0'); --Master Reset end Rs232RefComp; architecture Behavioral of Rs232RefComp is ------------------------------------------------------------------------ -- Component Declarations ------------------------------------------------------------------------ ------------------------------------------------------------------------ -- Local Type Declarations ------------------------------------------------------------------------ --Receive state machine type rstate is ( strIdle, --Idle state strEightDelay, --Delays for 8 clock cycles strGetData, --Shifts in the 8 data bits, and checks parity strCheckStop --Sets framing error flag if Stop bit is wrong ); type tstate is ( sttIdle, --Idle state sttTransfer, --Move data into shift register sttShift --Shift out data ); type TBEstate is ( stbeIdle, stbeSetTBE, stbeWaitLoad, stbeWaitWrite ); ------------------------------------------------------------------------ -- Signal Declarations ------------------------------------------------------------------------ constant baudDivide : std_logic_vector(7 downto 0) := "10100011"; --Baud Rate dividor, set now for a rate of 9600. --Found by dividing 50MHz by 9600 and 16. signal rdReg : std_logic_vector(7 downto 0) := "00000000"; --Receive holding register signal rdSReg : std_logic_vector(9 downto 0) := "1111111111"; --Receive shift register signal tfReg : std_logic_vector(7 downto 0); --Transfer holding register signal tfSReg : std_logic_vector(10 downto 0) := "11111111111"; --Transfer shift register signal clkDiv : std_logic_vector(8 downto 0) := "000000000"; --used for rClk signal rClkDiv : std_logic_vector(3 downto 0) := "0000"; --used for tClk signal ctr : std_logic_vector(3 downto 0) := "0000"; --used for delay times signal tfCtr : std_logic_vector(3 downto 0) := "0000"; --used to delay in transfer signal rClk : std_logic := '0'; --Receiving Clock signal tClk : std_logic; --Transfering Clock signal dataCtr : std_logic_vector(3 downto 0) := "0000"; --Counts the number of read data bits signal parError: std_logic; --Parity error bit signal frameError: std_logic; --Frame error bit signal CE : std_logic; --Clock enable for the latch signal ctRst : std_logic := '0'; signal load : std_logic := '0'; signal shift : std_logic := '0'; signal par : std_logic; signal tClkRST : std_logic := '0'; signal rShift : std_logic := '0'; signal dataRST : std_logic := '0'; signal dataIncr: std_logic := '0'; signal strCur : rstate := strIdle; --Current state in the Receive state machine signal strNext : rstate; --Next state in the Receive state machine signal sttCur : tstate := sttIdle; --Current state in the Transfer state machine signal sttNext : tstate; --Next state in the Transfer staet machine signal stbeCur : TBEstate := stbeIdle; signal stbeNext: TBEstate; ------------------------------------------------------------------------ -- Module Implementation ------------------------------------------------------------------------ begin frameError <= not rdSReg(9); parError <= not ( rdSReg(8) xor (((rdSReg(0) xor rdSReg(1)) xor (rdSReg(2) xor rdSReg(3))) xor ((rdSReg(4) xor rdSReg(5)) xor (rdSReg(6) xor rdSReg(7)))) ); DBOUT <= rdReg; tfReg <= DBIN; par <= not ( ((tfReg(0) xor tfReg(1)) xor (tfReg(2) xor tfReg(3))) xor ((tfReg(4) xor tfReg(5)) xor (tfReg(6) xor tfReg(7))) ); --Clock Dividing Functions-- process (CLK, clkDiv) --set up clock divide for rClk begin if (Clk = '1' and Clk'event) then if (clkDiv = baudDivide) then clkDiv <= "000000000"; else clkDiv <= clkDiv +1; end if; end if; end process; process (clkDiv, rClk, CLK) --Define rClk begin if CLK = '1' and CLK'Event then if clkDiv = baudDivide then rClk <= not rClk; else rClk <= rClk; end if; end if; end process; process (rClk) --set up clock divide for tClk begin if (rClk = '1' and rClk'event) then rClkDiv <= rClkDiv +1; end if; end process; tClk <= rClkDiv(3); --define tClk process (rClk, ctRst) --set up a counter based on rClk begin if rClk = '1' and rClk'Event then if ctRst = '1' then ctr <= "0000"; else ctr <= ctr +1; end if; end if; end process; process (tClk, tClkRST) --set up a counter based on tClk begin if (tClk = '1' and tClk'event) then if tClkRST = '1' then tfCtr <= "0000"; else tfCtr <= tfCtr +1; end if; end if; end process; --This process controls the error flags-- process (rClk, RST, RD, CE) begin if RD = '1' or RST = '1' then FE <= '0'; OE <= '0'; RDA <= '0'; PE <= '0'; elsif rClk = '1' and rClk'event then if CE = '1' then FE <= frameError; OE <= RDA; RDA <= '1'; PE <= parError; rdReg(7 downto 0) <= rdSReg (7 downto 0); end if; end if; end process; --This process controls the receiving shift register-- process (rClk, rShift) begin if rClk = '1' and rClk'Event then if rShift = '1' then rdSReg <= (RXD & rdSReg(9 downto 1)); end if; end if; end process; --This process controls the dataCtr to keep track of shifted values-- process (rClk, dataRST) begin if (rClk = '1' and rClk'event) then if dataRST = '1' then dataCtr <= "0000"; elsif dataIncr = '1' then dataCtr <= dataCtr +1; end if; end if; end process; --Receiving State Machine-- process (rClk, RST) begin if rClk = '1' and rClk'Event then if RST = '1' then strCur <= strIdle; else strCur <= strNext; end if; end if; end process; --This process generates the sequence of steps needed receive the data process (strCur, ctr, RXD, dataCtr, rdSReg, rdReg, RDA) begin case strCur is when strIdle => dataIncr <= '0'; rShift <= '0'; dataRst <= '0'; CE <= '0'; if RXD = '0' then ctRst <= '1'; strNext <= strEightDelay; else ctRst <= '0'; strNext <= strIdle; end if; when strEightDelay => dataIncr <= '0'; rShift <= '0'; CE <= '0'; if ctr(2 downto 0) = "111" then ctRst <= '1'; dataRST <= '1'; strNext <= strGetData; else ctRst <= '0'; dataRST <= '0'; strNext <= strEightDelay; end if; when strGetData => CE <= '0'; dataRst <= '0'; if ctr(3 downto 0) = "1111" then ctRst <= '1'; dataIncr <= '1'; rShift <= '1'; else ctRst <= '0'; dataIncr <= '0'; rShift <= '0'; end if; if dataCtr = "1010" then strNext <= strCheckStop; else strNext <= strGetData; end if; when strCheckStop => dataIncr <= '0'; rShift <= '0'; dataRst <= '0'; ctRst <= '0'; CE <= '1'; strNext <= strIdle; end case; end process; --TBE State Machine-- process (CLK, RST) begin if CLK = '1' and CLK'Event then if RST = '1' then stbeCur <= stbeIdle; else stbeCur <= stbeNext; end if; end if; end process; --This process gererates the sequence of events needed to control the TBE flag-- process (stbeCur, CLK, WR, DBIN, load) begin case stbeCur is when stbeIdle => TBE <= '1'; if WR = '1' then stbeNext <= stbeSetTBE; else stbeNext <= stbeIdle; end if; when stbeSetTBE => TBE <= '0'; if load = '1' then stbeNext <= stbeWaitLoad; else stbeNext <= stbeSetTBE; end if; when stbeWaitLoad => if load = '0' then stbeNext <= stbeWaitWrite; else stbeNext <= stbeWaitLoad; end if; when stbeWaitWrite => if WR = '0' then stbeNext <= stbeIdle; else stbeNext <= stbeWaitWrite; end if; end case; end process; --This process loads and shifts out the transfer shift register-- process (load, shift, tClk, tfSReg) begin TXD <= tfsReg(0); if tClk = '1' and tClk'Event then if load = '1' then tfSReg (10 downto 0) <= ('1' & par & tfReg(7 downto 0) &'0'); end if; if shift = '1' then tfSReg (10 downto 0) <= ('1' & tfSReg(10 downto 1)); end if; end if; end process; -- Transfer State Machine-- process (tClk, RST) begin if (tClk = '1' and tClk'Event) then if RST = '1' then sttCur <= sttIdle; else sttCur <= sttNext; end if; end if; end process; -- This process generates the sequence of steps needed transfer the data-- process (sttCur, tfCtr, tfReg, TBE, tclk) begin case sttCur is when sttIdle => tClkRST <= '0'; shift <= '0'; load <= '0'; if TBE = '1' then sttNext <= sttIdle; else sttNext <= sttTransfer; end if; when sttTransfer => shift <= '0'; load <= '1'; tClkRST <= '1'; sttNext <= sttShift; when sttShift => shift <= '1'; load <= '0'; tClkRST <= '0'; if tfCtr = "1100" then sttNext <= sttIdle; else sttNext <= sttShift; end if; end case; end process; end Behavioral;
mit
Luisda199824/ProcesadorMonociclo
RF_Mux.vhd
1
385
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity RD_Mux is Port ( RfDest : in STD_LOGIC; RD : in STD_LOGIC_VECTOR (5 downto 0); nRD : out STD_LOGIC_VECTOR (5 downto 0)); end RD_Mux; architecture Behavioral of RD_Mux is begin process(RfDest, RD) begin if (RfDest = '1') then nRD <= "001111"; else nRD <= RD; end if; end process; end Behavioral;
mit
IamVNIE/Hardware-Security
Interfaces/UART_Version_3/Uart_working/Circuit17.vhd
2
2966
library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VComponents.all; entity Circuit17 is Port ( TE,ROSEL: in STD_LOGIC; G1 : in STD_LOGIC; G2 : in STD_LOGIC; G3 : in STD_LOGIC; G6 : in STD_LOGIC; G7 : in STD_LOGIC; G22 : out STD_LOGIC; G23 : out STD_LOGIC; GEX: out STD_LOGIC); end Circuit17; architecture Behavioral of Circuit17 is signal delay1,delay2 : std_logic; signal G10,G11,G16,G19,G6t: STD_LOGIC; signal sel1,G23t: std_logic; attribute KEEP : string; attribute KEEP of G10 : signal is "true"; attribute KEEP of G11 : signal is "true"; attribute KEEP of G16 : signal is "true"; attribute KEEP of G19 : signal is "true"; attribute KEEP of G6t : signal is "true"; --attribute KEEP of delay1 : signal is "true"; --attribute KEEP of delay2 : signal is "true"; attribute KEEP of G23t : signal is "true"; attribute INIT : string; attribute INIT of G10_lut : label is "7"; attribute INIT of G11_lut : label is "7"; attribute INIT of G16_lut : label is "7"; attribute INIT of G19_lut : label is "7"; attribute INIT of G22_lut : label is "7"; attribute INIT of G23_lut : label is "7"; --attribute INIT of tr1_lut : label is "3"; --attribute INIT of tr2_lut : label is "3"; attribute LOC : string; attribute LOC of G10_lut : label is "SLICE_X18Y14"; attribute LOC of G11_lut : label is "SLICE_X19Y14"; attribute LOC of G16_lut : label is "SLICE_X20Y14"; attribute LOC of G19_lut : label is "SLICE_X21Y14"; attribute LOC of G22_lut : label is "SLICE_X22Y14"; attribute LOC of G23_lut : label is "SLICE_X23Y14"; --attribute LOC of tr2_lut : label is "SLICE_X23Y14"; --attribute LOC of tr1_lut : label is "SLICE_X22Y14"; begin sel1<= TE; ------- MUX BEFORE G10 (INPUT TO G10gat)--- process(sel1) Begin Case sel1 is when '0' => G6t<= G6; when '1' => G6t<= G23t; When others=> G6t <= G6; end case; end process; -------------------------- G10_lut: LUT2 generic map (INIT => X"7") port map( I0 => G1,I1 => G3,O => G10 ); G11_lut: LUT2 generic map (INIT => X"7") port map( I0 => G3,I1 => G6t,O => G11 ); G16_lut: LUT2 generic map (INIT => X"7") port map( I0 => G2,I1 => G11,O => G16 ); G19_lut: LUT2 generic map (INIT => X"7") port map( I0 => G11,I1 => G7,O => G19 ); G22_lut: LUT2 generic map (INIT => X"7") port map( I0 => G16,I1 => G10,O => G22 ); G23_lut: LUT2 generic map (INIT => X"7") port map( I0 => G19,I1 => G16,O => G23t ); ---- TROJAN (INVERTER GATE) ---- --Tr1_lut: LUT2 -- generic map (INIT => X"3") -- port map( I0 => TE,I1 => G23t,O => delay1); --Tr2_lut: LUT2 -- generic map (INIT => X"3") -- port map( I0 => TE,I1 => delay1,O => delay2 ); ----------------------------------- G23<= G23t; GEX<= G23t; end Behavioral;
mit
Luisda199824/ProcesadorMonociclo
TB_InstructionMemory.vhd
1
1086
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use std.textio.all; ENTITY TB_InstructionMemory IS END TB_InstructionMemory; ARCHITECTURE behavior OF TB_InstructionMemory IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT instructionMemory PORT( address : IN std_logic_vector(31 downto 0); rst : IN std_logic; outInstruction : OUT std_logic_vector(31 downto 0) ); END COMPONENT; --Inputs signal address : std_logic_vector(31 downto 0) := (others => '0'); signal rst : std_logic := '0'; --Outputs signal outInstruction : std_logic_vector(31 downto 0); BEGIN -- Instantiate the Unit Under Test (UUT) uut: instructionMemory PORT MAP ( address => address, rst => rst, outInstruction => outInstruction ); -- Stimulus process stim_proc: process begin address <= x"00000000"; rst <= '0'; wait for 50 ns; rst <= '1'; wait for 50 ns; rst <= '0'; address <= x"0000000F"; wait; end process; END;
mit
Fairyland0902/BlockyRoads
src/BlockyRoads/ipcore_dir/background/simulation/random.vhd
101
4108
-------------------------------------------------------------------------------- -- -- BLK MEM GEN v7_3 Core - Random Number Generator -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2006_3010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: random.vhd -- -- Description: -- Random Generator -- -------------------------------------------------------------------------------- -- Author: IP Solutions Division -- -- History: Sep 12, 2011 - First Release -------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY RANDOM IS GENERIC ( WIDTH : INTEGER := 32; SEED : INTEGER :=2 ); PORT ( CLK : IN STD_LOGIC; RST : IN STD_LOGIC; EN : IN STD_LOGIC; RANDOM_NUM : OUT STD_LOGIC_VECTOR (WIDTH-1 DOWNTO 0) --OUTPUT VECTOR ); END RANDOM; ARCHITECTURE BEHAVIORAL OF RANDOM IS BEGIN PROCESS(CLK) VARIABLE RAND_TEMP : STD_LOGIC_VECTOR(WIDTH-1 DOWNTO 0):=CONV_STD_LOGIC_VECTOR(SEED,WIDTH); VARIABLE TEMP : STD_LOGIC := '0'; BEGIN IF(RISING_EDGE(CLK)) THEN IF(RST='1') THEN RAND_TEMP := CONV_STD_LOGIC_VECTOR(SEED,WIDTH); ELSE IF(EN = '1') THEN TEMP := RAND_TEMP(WIDTH-1) XOR RAND_TEMP(WIDTH-2); RAND_TEMP(WIDTH-1 DOWNTO 1) := RAND_TEMP(WIDTH-2 DOWNTO 0); RAND_TEMP(0) := TEMP; END IF; END IF; END IF; RANDOM_NUM <= RAND_TEMP; END PROCESS; END ARCHITECTURE;
mit
artic92/sistemi-embedded-task2
src/ip_core2/complex_abs/wrapper_complex_abs.vhd
1
6022
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 05.07.2017 11:22:27 -- Design Name: -- Module Name: wrapper_complex_abs - Structural -- Project Name: -- Target Devices: -- Tool Versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- --! @file wrapper_complex_abs.vhd --! @author Antonio Riccio, Andrea Scognamiglio, Stefano Sorrentino --! @brief Wrapper di @ref complex_abs che fornisce funzioni di comunicazione --! @anchor wrapper_complex_abs library IEEE; use IEEE.STD_LOGIC_1164.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 leaf cells in this code. --library UNISIM; --use UNISIM.VComponents.all; --! @brief Wrapper per l'entità @ref complex_abs --! @details Questo componente arricchisce il modulo @ref complex_abs con funzionalità --! di comunicazione. Queste funzionalità sono necessarie per collegare in cascata questo --! blocco con quello di calcolo del massimo. entity wrapper_complex_abs is Generic ( complex_width : natural := 32 ); --! Parallelismo in bit del numero complesso (inteso come somma di parte reale e immaginaria) Port ( clock : in STD_LOGIC; --! Segnale di temporizzazione reset_n : in STD_LOGIC; --! Segnale di reset 0-attivo valid_in : in STD_LOGIC; --! Indica che il dato sulla linea di ingresso è valido ready_in : in STD_LOGIC; --! Indica che il componente a valle è pronto ad accettare valori in ingresso complex_value : in STD_LOGIC_VECTOR (complex_width-1 downto 0); --! Numero complesso di cui calcolare il modulo complex_value_out : out STD_LOGIC_VECTOR(complex_width-1 downto 0); --! Valore registrato del numero complesso di cui calcolare il modulo abs_value : out STD_LOGIC_VECTOR (complex_width-1 downto 0); --! Modulo del numero complesso valid_out : out STD_LOGIC; --! Indica che il dato sulla linea di uscita è valido ready_out : out STD_LOGIC); --! Indica che questo componente è pronto ad accettare valori in ingresso end wrapper_complex_abs; --! @brief Architettura del componente descritta nel dominio strutturale --! @details L'archittettura utilizza due registri necessari a memorizzare il valore --! complesso ed il suo modulo. Questo consente di svincolare il funzionamento del --! calcolo del modulo dalla comunicazione del risultato ai componenti a valle. architecture Structural of wrapper_complex_abs is --! @brief Registro a parallelismo generico che opera sul fronte di salita del clock component register_n_bit is generic ( n : natural := 8 ); port ( I : in STD_LOGIC_VECTOR (n-1 downto 0); clock : in STD_LOGIC; load : in STD_LOGIC; reset_n : in STD_LOGIC; O : out STD_LOGIC_VECTOR (n-1 downto 0) ); end component register_n_bit; --! @brief Calcola il modulo di un numero complesso --! @see complex_abs component complex_abs is generic ( complex_width : natural := 32 ); port ( clock : in STD_LOGIC; reset_n : in STD_LOGIC; enable : in STD_LOGIC; complex_value : in STD_LOGIC_VECTOR (complex_width-1 downto 0); abs_value : out STD_LOGIC_VECTOR (complex_width-1 downto 0); done : out STD_LOGIC ); end component complex_abs; --! @brief Parte di controllo di questo blocco component fsm_complex_abs is port ( clk : in STD_LOGIC; reset_n : in STD_LOGIC; valid_in : in STD_LOGIC; ready_in : in STD_LOGIC; abs_done : in STD_LOGIC; valid_out : out STD_LOGIC; ready_out : out STD_LOGIC); end component; --! @brief Flip-flop D con reset 0-attivo asincrono component d_edge_triggered port ( data_in : in STD_LOGIC; reset_n : in STD_LOGIC; clock : in STD_LOGIC; data_out : out STD_LOGIC ); end component d_edge_triggered; signal done_sig : std_logic := '0'; signal reset_abs_n : std_logic := '0'; signal ready_out_sig : std_logic := '0'; signal ready_out_delayed : std_logic := '0'; signal abs_value_sig : std_logic_vector(complex_width-1 downto 0) := (others => '0'); begin --! @brief Componente che calcola il modulo del valore complesso in ingresso complex_abs_inst : complex_abs generic map ( complex_width => complex_width ) port map ( clock => clock, reset_n => reset_n, enable => valid_in, complex_value => complex_value, abs_value => abs_value_sig, done => done_sig ); --! @brief Automa a stati finiti per la gestione dei segnali di comunicazione fsm_complex_abs_inst : fsm_complex_abs port map ( clk => clock, reset_n => reset_n, valid_in => valid_in, ready_in => ready_in, abs_done => done_sig, valid_out => valid_out, ready_out => ready_out_sig ); --! @brief Memorizza il modulo del numero complesso --! @details Questo registro è necessario per memorizzare il risultato di complex_abs --! dato che il componente si resetta dopo che ha terminato l'elaborazione. reg_abs_value: register_n_bit generic map ( n => complex_width ) port map ( I => abs_value_sig, clock => clock, load => done_sig, reset_n => reset_n, O => abs_value ); ff_load_complex_value : d_edge_triggered port map ( data_in => ready_out_sig, reset_n => reset_n, clock => clock, data_out => ready_out_delayed ); --! @brief Memorizza il numero complesso in ingresso --! @details Questo registro è necessario per conservare l'associazione tra valore --! complesso in ingresso e modulo calcolato dal blocco complex_abs. reg_complex_value_out : register_n_bit generic map ( n => complex_width ) port map ( I => complex_value, clock => clock, load => ready_out_delayed, reset_n => reset_n, O => complex_value_out ); ready_out <= ready_out_sig; end Structural;
gpl-2.0
artic92/sistemi-embedded-task2
src/ip_core2/complex_abs/fsm_complex_abs.vhd
1
3103
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 05.07.2017 11:30:11 -- Design Name: -- Module Name: fsm_complex_abs - 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; -- 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 leaf cells in this code. --library UNISIM; --use UNISIM.VComponents.all; entity fsm_complex_abs is Port ( clk : in STD_LOGIC; reset_n : in STD_LOGIC; valid_in : in STD_LOGIC; ready_in : in STD_LOGIC; abs_done : in STD_LOGIC; valid_out : out STD_LOGIC; ready_out : out STD_LOGIC); end fsm_complex_abs; architecture Behavioral of fsm_complex_abs is type state is (reset , waiting_for_valid_in , elaborazione , waiting_for_ready_in); signal current_state, next_state : state := reset; begin registro_stato : process(clk, reset_n, next_state) begin if(reset_n = '0') then current_state <= reset; elsif(rising_edge(clk)) then current_state <= next_state; end if; end process; fsm_next_state : process(current_state, reset_n, valid_in, abs_done, ready_in) begin case current_state is when reset => if(reset_n = '0') then next_state <= reset; else next_state <= waiting_for_valid_in; end if; when waiting_for_valid_in => if(valid_in = '0') then next_state <= waiting_for_valid_in; else next_state <= elaborazione; end if; when elaborazione => if(abs_done <= '0') then next_state <= elaborazione; else next_state <= waiting_for_ready_in; end if; when waiting_for_ready_in => if(ready_in = '0') then next_state <= waiting_for_ready_in; else next_state <= waiting_for_valid_in; end if; end case; end process; fsm_uscita : process(current_state) begin valid_out <= '0'; ready_out <= '0'; case current_state is when reset => when waiting_for_valid_in => ready_out<='1'; when elaborazione => when waiting_for_ready_in => valid_out <= '1'; end case; end process; end Behavioral;
gpl-2.0
hsm5xw/ece4435-final-project
ECE 4435_finalProject_codeEdit/ECE4435_finalProject_code/HDS/lab10_RegFile/lab10_RegFile_lib/hdl/RegisterFile_Structure_config.vhd
1
637
-- Generation properties: -- Format : hierarchical -- Generic mappings : exclude -- Leaf-level entities : direct binding -- Regular libraries : use library name -- View name : include -- LIBRARY lab10_RegFile_lib; CONFIGURATION RegisterFile_Structure_config OF RegisterFile IS FOR Structure FOR ALL : Decoder USE ENTITY lab10_RegFile_lib.Decoder(Behavior); END FOR; FOR RegArray FOR ALL : RegReadWrite USE CONFIGURATION lab10_RegFile_lib.RegReadWrite_Mixed_config; END FOR; END FOR; END FOR; END RegisterFile_Structure_config;
gpl-2.0
hsm5xw/ece4435-final-project
ECE 4435_finalProject_codeEdit/ECE4435_finalProject_code/HDS/lab11_RegisterTracker/lab11_RegisterTracker_lib/hdl/Reg_Behavior.vhd
1
856
-- -- VHDL Architecture lab11_RegisterTracker_lib.Reg.Behavior -- -- Created: -- by - Hong.UNKNOWN (HSM) -- at - 12:27:15 04/18/2014 -- -- using Mentor Graphics HDL Designer(TM) 2013.1 (Build 6) -- LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; ENTITY Reg IS GENERIC(size: positive := 16); PORT( d: IN std_logic_vector (size-1 downto 0); q: OUT std_logic_vector (size-1 downto 0) := (others=>'0'); c,e, reset: IN std_logic); END ENTITY Reg; ARCHITECTURE Behavior OF Reg IS BEGIN PROCESS(c) BEGIN IF(rising_edge(c)) THEN IF(reset = '1') THEN q <= (others=>'0'); ELSIF(e = '1') THEN q <= d; END IF; END IF; END PROCESS; END ARCHITECTURE Behavior;
gpl-2.0
hmdgharb/5-Staged-MIPS-Pipeline
work/@w@b_@s@t@a@g@e/_primary.vhd
1
323
library verilog; use verilog.vl_types.all; entity WB_STAGE is port( pipeline_reg_in : in vl_logic_vector(36 downto 0); Reg_write_en : out vl_logic; Reg_write_dest : out vl_logic_vector(2 downto 0); Reg_write_data : out vl_logic_vector(15 downto 0) ); end WB_STAGE;
gpl-2.0
hsm5xw/ece4435-final-project
ECE 4435_finalProject_codeEdit/ECE4435_finalProject_code/HDS/lab11_RegisterTracker/lab11_RegisterTracker_lib/hdl/Processor_Behavior.vhd
1
7337
-- -- VHDL Architecture lab11_RegisterTracker_lib.Processor.Behavior -- -- Created: -- by - Hong.UNKNOWN (HSM) -- at - 15:43:22 04/19/2014 -- -- using Mentor Graphics HDL Designer(TM) 2013.1 (Build 6) -- LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; USE ieee.numeric_std.all; ENTITY Processor IS GENERIC( addr_size: positive := 4); PORT( operand1_Addr: IN std_logic_vector(addr_size-1 downto 0) := (others=>'0'); operand2_Addr: IN std_logic_vector(addr_size-1 downto 0) := (others=>'0'); reserve_Addr: IN std_logic_vector(addr_size-1 downto 0) := (others=>'0'); clear_Addr: IN std_logic_vector(addr_size-1 downto 0) := (others=>'0'); dependsOn_op1: In std_logic := '0'; -- whether the current instruction depends on Register value corresponding to operand 1 dependsOn_op2: In std_logic := '0'; -- whether the current instruction depends on Register value corresponding to operand 2 RegWrite_current: IN std_logic := '0'; -- Register writeback enable signal from the previous instruction (from WriteBack stage) RegWrite_previous: IN std_logic := '0'; -- Register writeback enable signal from the current instruction (from Decode stage) Register_Out: IN std_logic_vector(15 downto 0) := (others=>'0') ; -- values coming out of the Register reset: IN std_logic := '0'; decode_pcval_out: IN std_logic_vector(15 DOWNTO 0); -- *************** OUTPUTS ************************************************************** decode_pcval_out_TrackerOut: OUT std_logic_vector(15 DOWNTO 0); can_move_on: OUT std_logic; Register_In: OUT std_logic_vector(15 downto 0) -- input to be fed to the Register ); END ENTITY Processor; -- ARCHITECTURE Behavior OF Processor IS BEGIN p1: PROCESS(all) CONSTANT ALL_ZERO: std_logic_vector(15 downto 0) := (others=>'0'); CONSTANT ALL_ONE: std_logic_vector(15 downto 0) := (others=>'1'); VARIABLE result_op1: std_logic_vector(15 downto 0); -- one-hot representation of operand 1's Register VARIABLE result_op2: std_logic_vector(15 downto 0); -- one-hot representation of operand 2's Register VARIABLE result_clear: std_logic_vector(15 downto 0); -- one-hot representation of the Register to clean (coming out from the Write Back stage) VARIABLE result_reserve: std_logic_vector(15 downto 0); -- one-hot representation of the Register to reserve (for the Destination Register) VARIABLE selection_op1: natural; -- integer representations, likewise VARIABLE selection_op2: natural; VARIABLE selection_clear: natural; VARIABLE selection_reserve: natural; VARIABLE upcoming_op1: std_logic; -- upcoming reservation status bit for operand 1's Register VARIABLE upcoming_op2: std_logic; -- upcoming reservation status bit for operand 2's Register VARIABLE can_move_on_var: std_logic := '1'; VARIABLE Register_Out_var: std_logic_vector(15 downto 0); VARIABLE Register_In_var: std_logic_vector(15 downto 0); VARIABLE decode_pcval_out_TrackerOut_var : std_logic_vector(15 downto 0); -- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& BEGIN Register_Out_var := Register_Out; -- *** currently saved Register values Register_In_var := Register_Out; -- *** currently saved Register values decode_pcval_out_TrackerOut_var := decode_pcval_out; selection_op1 := to_integer( ieee.numeric_std.unsigned(operand1_Addr) ); selection_op2 := to_integer( ieee.numeric_std.unsigned(operand2_Addr) ); -- If the Register for operand 1 is the same as Register to be cleared from Write-Back signal IF( (selection_op1 = selection_clear) and (RegWrite_previous = '1') ) THEN upcoming_op1 := '1'; ELSE upcoming_op1 := Register_Out(selection_op1); -- upcoming status value for operand 1's Register END IF; -- If the Register for operand 2 is the same as Register to be cleared from Write-Back signal IF( (selection_op2 = selection_clear) and (RegWrite_previous = '1') ) THEN upcoming_op2 := '1'; ELSE upcoming_op2 := Register_Out(selection_op2); -- upcoming status value for operand 2's Register END IF; -- Preprare bit masking for the clear Address result_clear := ALL_ONE; -- pre-set all bits to 1 selection_clear := to_integer( ieee.numeric_std.unsigned(clear_Addr) ); IF( RegWrite_previous = '1') THEN result_clear(selection_clear) := '0'; -- clear the reserved bit for previous instruction's destination END IF; -- Prepare bit masking for the reserve Address result_reserve := ALL_ZERO; -- pre-set all bits to 0 selection_reserve := to_integer( ieee.numeric_std.unsigned(reserve_Addr) ); IF( RegWrite_current = '1') THEN result_reserve(selection_reserve) := '1'; -- set a reserved bit for current instuction's destination END IF; -- Override the upcoming reservation status to 0 if the Register values are not needed in the instruction IF( dependsOn_op1 /= '1') THEN upcoming_op1 := '0'; END IF; IF( dependsOn_op2 /= '1') THEN upcoming_op2 := '0'; END IF; -- If the Registers for both of the operands have not been reserved IF( (upcoming_op1 = '0') and (upcoming_op2 = '0') ) THEN can_move_on_var := '1'; -- can proceed with the next instruction Register_In_var := Register_Out_var AND result_clear; -- *** clear the status bit corresponding to the clear Address (FIRST) Register_In_var := Register_In_var OR result_reserve; -- *** reserve the status bit for the Destination Address (SECOND) ELSE can_move_on_var := '0'; -- stall Register_In_var := Register_Out_var AND result_clear; -- *** clear the status bit corresponding to the clear Address END IF; -- If reset is enabled IF( reset = '1') THEN can_move_on_var := '1'; Register_In_var := (others=>'0'); END IF; -- Finalize outputs decode_pcval_out_TrackerOut <= decode_pcval_out_TrackerOut_var; can_move_on <= can_move_on_var; Register_In <= Register_In_var; END PROCESS p1; END ARCHITECTURE Behavior;
gpl-2.0
hsm5xw/ece4435-final-project
ECE 4435_finalProject_codeEdit/ECE4435_finalProject_code/HDS/lab7/lab7_lib/hdl/fetch_stage_struct.vhd
1
7433
-- VHDL Entity lab7_lib.fetch_stage.symbol -- -- Created: -- by - Hong.Hong (HSM) -- at - 21:19:13 04/22/14 -- -- Generated by Mentor Graphics' HDL Designer(TM) 2013.1 (Build 6) -- LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; ENTITY fetch_stage IS PORT( can_move_on : IN std_logic; clk : IN std_logic; -- input interrupt : IN std_logic := '0'; -- input jaddr : IN std_logic_vector (15 DOWNTO 0); -- input jump : IN std_logic := '0'; -- input mdata : IN std_logic_vector (15 DOWNTO 0); -- input mdelay : IN std_logic := '0'; -- input reset : IN std_logic := '0'; -- input stall : IN std_logic; inst : OUT std_logic_vector (15 DOWNTO 0); maddr : OUT std_logic_vector (15 DOWNTO 0); pcval : OUT std_logic_vector (15 DOWNTO 0) ); -- Declarations END fetch_stage ; -- -- VHDL Architecture lab7_lib.fetch_stage.struct -- -- Created: -- by - Hong.Hong (HSM) -- at - 07:43:59 04/27/14 -- -- Generated by Mentor Graphics' HDL Designer(TM) 2013.1 (Build 6) -- LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; LIBRARY lab7_lib; ARCHITECTURE struct OF fetch_stage IS -- Architecture declarations -- Internal signal declarations SIGNAL PC_Load_Control : std_logic; SIGNAL PC_MUX_Control : std_logic_vector(1 DOWNTO 0); SIGNAL control_bus : std_logic_vector( 6 DOWNTO 0 ); SIGNAL dout : std_logic_vector(15 DOWNTO 0); SIGNAL dout1 : std_logic; SIGNAL dout2 : std_logic; SIGNAL inst_MUX_Control : std_logic_vector(1 DOWNTO 0); SIGNAL maddr_MUX_Control : std_logic_vector(1 DOWNTO 0); SIGNAL pcval_In : std_logic_vector(15 DOWNTO 0); SIGNAL signal_NOP : std_logic_vector(15 DOWNTO 0); SIGNAL signal_ONE : std_logic_vector(15 DOWNTO 0); -- on interrupt SIGNAL signal_PC_incrementAmt : std_logic_vector(15 DOWNTO 0); SIGNAL signal_SPECIAL_INST : std_logic_vector(15 DOWNTO 0); SIGNAL signal_ZERO : std_logic_vector(15 DOWNTO 0); -- on startup -- Implicit buffer signal declarations SIGNAL pcval_internal : std_logic_vector (15 DOWNTO 0); -- ModuleWare signal declarations(v1.12) for instance 'PC' of 'adff' SIGNAL mw_PCreg_cval : std_logic_vector(15 DOWNTO 0) := "0000000000000000"; -- ModuleWare signal declarations(v1.12) for instance 'control_splitter' of 'split' SIGNAL mw_control_splittertemp_din : std_logic_vector(6 DOWNTO 0); -- Component Declarations COMPONENT Fetch_FSM PORT ( clock : IN std_logic; int : IN std_logic; jump : IN std_logic; mdelay : IN std_logic; reset : IN std_logic; stall : IN std_logic; control_bus : OUT std_logic_vector ( 6 DOWNTO 0 ) ); END COMPONENT; -- Optional embedded configurations -- pragma synthesis_off FOR ALL : Fetch_FSM USE ENTITY lab7_lib.Fetch_FSM; -- pragma synthesis_on BEGIN -- ModuleWare code(v1.12) for instance 'PC_incrementer' of 'add' pc_incrementercombo_proc: PROCESS (pcval_internal, signal_PC_incrementAmt) VARIABLE temp_din0 : std_logic_vector(16 DOWNTO 0); VARIABLE temp_din1 : std_logic_vector(16 DOWNTO 0); VARIABLE temp_sum : unsigned(16 DOWNTO 0); VARIABLE temp_carry : std_logic; BEGIN temp_din0 := '0' & pcval_internal; temp_din1 := '0' & signal_PC_incrementAmt; temp_carry := '0'; temp_sum := unsigned(temp_din0) + unsigned(temp_din1) + temp_carry; dout <= conv_std_logic_vector(temp_sum(15 DOWNTO 0),16); END PROCESS pc_incrementercombo_proc; -- ModuleWare code(v1.12) for instance 'PC' of 'adff' pcval_internal <= mw_PCreg_cval; pcseq_proc: PROCESS (clk)BEGIN IF (clk'EVENT AND clk='1') THEN IF (dout2 = '1') THEN mw_PCreg_cval <= pcval_In; END IF; END IF; END PROCESS pcseq_proc; -- ModuleWare code(v1.12) for instance 'INTERRUPT_INST' of 'constval' signal_SPECIAL_INST <= "0000000000000001"; -- ModuleWare code(v1.12) for instance 'NOP' of 'constval' signal_NOP <= "0000000000000000"; -- ModuleWare code(v1.12) for instance 'ONE' of 'constval' signal_ONE <= "0000000000000001"; -- ModuleWare code(v1.12) for instance 'PC_increment_ONE' of 'constval' signal_PC_incrementAmt <= "0000000000000001"; -- ModuleWare code(v1.12) for instance 'PC_load_ZERO' of 'constval' dout1 <= '0'; -- ModuleWare code(v1.12) for instance 'ZERO' of 'constval' signal_ZERO <= "0000000000000000"; -- ModuleWare code(v1.12) for instance 'PC_Load_MUX' of 'mux' pc_load_muxcombo_proc: PROCESS(dout1, PC_Load_Control, can_move_on) BEGIN CASE can_move_on IS WHEN '0' => dout2 <= dout1; WHEN '1' => dout2 <= PC_Load_Control; WHEN OTHERS => dout2 <= 'X'; END CASE; END PROCESS pc_load_muxcombo_proc; -- ModuleWare code(v1.12) for instance 'PC_MUX' of 'mux' pc_muxcombo_proc: PROCESS(mdata, jaddr, dout, PC_MUX_Control) BEGIN CASE PC_MUX_Control IS WHEN "00" => pcval_In <= mdata; WHEN "01" => pcval_In <= jaddr; WHEN "10" => pcval_In <= dout; WHEN OTHERS => pcval_In <= (OTHERS => 'X'); END CASE; END PROCESS pc_muxcombo_proc; -- ModuleWare code(v1.12) for instance 'inst_MUX' of 'mux' inst_muxcombo_proc: PROCESS(mdata, signal_NOP, signal_SPECIAL_INST, inst_MUX_Control) BEGIN CASE inst_MUX_Control IS WHEN "00" => inst <= mdata; WHEN "01" => inst <= signal_NOP; WHEN "10" => inst <= signal_SPECIAL_INST; WHEN OTHERS => inst <= (OTHERS => 'X'); END CASE; END PROCESS inst_muxcombo_proc; -- ModuleWare code(v1.12) for instance 'maddr_MUX' of 'mux' maddr_muxcombo_proc: PROCESS(signal_ZERO, signal_ONE, pcval_internal, maddr_MUX_Control) BEGIN CASE maddr_MUX_Control IS WHEN "00" => maddr <= signal_ZERO; WHEN "01" => maddr <= signal_ONE; WHEN "10" => maddr <= pcval_internal; WHEN OTHERS => maddr <= (OTHERS => 'X'); END CASE; END PROCESS maddr_muxcombo_proc; -- ModuleWare code(v1.12) for instance 'control_splitter' of 'split' mw_control_splittertemp_din <= control_bus; control_splittercombo_proc: PROCESS (mw_control_splittertemp_din) VARIABLE temp_din: std_logic_vector(6 DOWNTO 0); BEGIN temp_din := mw_control_splittertemp_din(6 DOWNTO 0); inst_MUX_Control <= temp_din(1 DOWNTO 0); maddr_MUX_Control <= temp_din(3 DOWNTO 2); PC_Load_Control <= temp_din(4); PC_MUX_Control <= temp_din(6 DOWNTO 5); END PROCESS control_splittercombo_proc; -- Instance port mappings. U_0 : Fetch_FSM PORT MAP ( clock => clk, reset => reset, mdelay => mdelay, stall => stall, jump => jump, int => interrupt, control_bus => control_bus ); -- Implicit buffered output assignments pcval <= pcval_internal; END struct;
gpl-2.0
hsm5xw/ece4435-final-project
ECE 4435_finalProject_codeEdit/ECE4435_finalProject_code/HDS/lab8_new/lab8_new_lib/hdl/Decoder_Structure_config.vhd
1
924
-- Generation properties: -- Format : hierarchical -- Generic mappings : exclude -- Leaf-level entities : direct binding -- Regular libraries : use library name -- View name : include -- LIBRARY lab8_new_lib; CONFIGURATION Decoder_Structure_config OF Decoder IS FOR Structure FOR ALL : ALU_ROM USE ENTITY lab8_new_lib.ALU_ROM(Behavior); END FOR; FOR ALL : Decode_ROM USE ENTITY lab8_new_lib.Decode_ROM(Behavior); END FOR; FOR ALL : Reg USE ENTITY lab8_new_lib.Reg(Behavior); END FOR; FOR ALL : SimpleMux2 USE ENTITY lab8_new_lib.SimpleMux2(Behavior); END FOR; FOR ALL : SimpleMux3 USE ENTITY lab8_new_lib.SimpleMux3(Behavior); END FOR; FOR ALL : SimpleMux4 USE ENTITY lab8_new_lib.SimpleMux4(Behavior); END FOR; END FOR; END Decoder_Structure_config;
gpl-2.0
hmdgharb/5-Staged-MIPS-Pipeline
work/@m@e@m_stage/_primary.vhd
1
378
library verilog; use verilog.vl_types.all; entity MEM_stage is port( rst : in vl_logic; DataMemoryAddress: in vl_logic_vector(15 downto 0); DataMemoryWriteData: in vl_logic_vector(15 downto 0); DataMemoryWriteEnable: in vl_logic; DataMemoryOut : out vl_logic_vector(15 downto 0) ); end MEM_stage;
gpl-2.0
hmdgharb/5-Staged-MIPS-Pipeline
work/@h@a@z@a@r@d/_primary.vhd
1
589
library verilog; use verilog.vl_types.all; entity HAZARD is port( clk : in vl_logic; rst : in vl_logic; decoding_op_src1: in vl_logic_vector(2 downto 0); decoding_op_src2: in vl_logic_vector(2 downto 0); decoding_op_dest: in vl_logic_vector(2 downto 0); ex_op_dest : in vl_logic_vector(2 downto 0); mem_op_dest : in vl_logic_vector(2 downto 0); wb_op_dest : in vl_logic_vector(2 downto 0); pipeline_stall_n: out vl_logic ); end HAZARD;
gpl-2.0
MAV-RT-testbed/MAV-testbed
Syma_Flight_Final/Syma_Flight_Final.srcs/sources_1/ipshared/xilinx.com/proc_sys_reset_v5_0/7820e39a/hdl/src/vhdl/sequence.vhd
30
22215
------------------------------------------------------------------------------- -- sequence - entity/architecture pair ------------------------------------------------------------------------------- -- -- ************************************************************************ -- ** DISCLAIMER OF LIABILITY ** -- ** ** -- ** This file contains proprietary and confidential information of ** -- ** Xilinx, Inc. ("Xilinx"), that is distributed under a license ** -- ** from Xilinx, and may be used, copied and/or disclosed only ** -- ** pursuant to the terms of a valid license agreement with Xilinx. ** -- ** ** -- ** XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION ** -- ** ("MATERIALS") "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER ** -- ** EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING WITHOUT ** -- ** LIMITATION, ANY WARRANTY WITH RESPECT TO NONINFRINGEMENT, ** -- ** MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. Xilinx ** -- ** does not warrant that functions included in the Materials will ** -- ** meet the requirements of Licensee, or that the operation of the ** -- ** Materials will be uninterrupted or error-free, or that defects ** -- ** in the Materials will be corrected. Furthermore, Xilinx does ** -- ** not warrant or make any representations regarding use, or the ** -- ** results of the use, of the Materials in terms of correctness, ** -- ** accuracy, reliability or otherwise. ** -- ** ** -- ** Xilinx products are not designed or intended to be fail-safe, ** -- ** or for use in any application requiring fail-safe performance, ** -- ** such as life-support or safety devices or systems, Class III ** -- ** medical devices, nuclear facilities, applications related to ** -- ** the deployment of airbags, or any other applications that could ** -- ** lead to death, personal injury or severe property or ** -- ** environmental damage (individually and collectively, "critical ** -- ** applications"). Customer assumes the sole risk and liability ** -- ** of any use of Xilinx products in critical applications, ** -- ** subject only to applicable laws and regulations governing ** -- ** limitations on product liability. ** -- ** ** -- ** Copyright 2012 Xilinx, Inc. ** -- ** All rights reserved. ** -- ** ** -- ** This disclaimer and copyright notice must be retained as part ** -- ** of this file at all times. ** -- ************************************************************************ -- ------------------------------------------------------------------------------- -- Filename: proc_sys_reset.vhd -- Version: v4.00a -- Description: Parameterizeable top level processor reset module. -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- -- Structure: This section should show the hierarchical structure of the -- designs.Separate lines with blank lines if necessary to improve -- readability. -- -- proc_sys_reset.vhd -- -- upcnt_n.vhd -- -- lpf.vhd -- -- sequence.vhd ------------------------------------------------------------------------------- -- Filename: sequence.vhd -- -- Description: -- This file control the sequencing coming out of a reset. -- The sequencing is as follows: -- Bus_Struct_Reset comes out of reset first. Either when the -- external or auxiliary reset goes inactive or 16 clocks -- after a PPC Chip_Reset_Request, or 30 clocks after a PPC -- System_Reset_Request. -- Peripheral_Reset comes out of reset 16 clocks after -- Bus_Struct_Reset. -- The PPC resetcore, comes out of reset -- 16 clocks after Peripheral_Reset. -- The PPC resetchip and resetsystem come out of reset -- at the same time as Bus_Struct_Reset. ------------------------------------------------------------------------------- -- Author: Kurt Conover -- History: -- Kurt Conover 11/12/01 -- First Release -- LC Whittle 10/11/2004 -- Update for NCSim -- rolandp 04/16/2007 -- v2.00a -- -- ~~~~~~~ -- SK 03/11/10 -- ^^^^^^^ -- 1. Updated the core so support the active low "Interconnect_aresetn" and -- "Peripheral_aresetn" signals. -- ^^^^^^^ ------------------------------------------------------------------------------- -- Naming Conventions: -- active low signals: "*_n" -- clock signals: "clk", "clk_div#", "clk_#x" -- reset signals: "rst", "rst_n" -- generics: "C_*" -- user defined types: "*_TYPE" -- state machine next state: "*_ns" -- state machine current state: "*_cs" -- combinatorial signals: "*_com" -- pipelined or register delay signals: "*_d#" -- counter signals: "*cnt*" -- clock enable signals: "*_ce" -- internal version of output port "*_i" -- device pins: "*_pin" -- ports: - Names begin with Uppercase -- processes: "*_PROCESS" -- component instantiations: "<ENTITY_>I_<#|FUNC> ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; library unisim; use unisim.vcomponents.all; library proc_sys_reset_v5_0; ------------------------------------------------------------------------------- -- Port Declaration ------------------------------------------------------------------------------- -- Definition of Generics: -- -- Definition of Ports: -- Lpf_reset -- Low Pass Filtered in -- System_Reset_Req -- System Reset Request -- Chip_Reset_Req -- Chip Reset Request -- Slowest_Sync_Clk -- Clock -- Bsr_out -- Bus Structure Reset out -- Pr_out -- Peripheral Reset out -- Core_out -- Core reset out -- Chip_out -- Chip reset out -- Sys_out -- System reset out -- MB_out -- MB reset out -- ------------------------------------------------------------------------------- entity sequence is port( Lpf_reset : in std_logic; -- System_Reset_Req : in std_logic; -- Chip_Reset_Req : in std_logic; Slowest_Sync_Clk : in std_logic; Bsr_out : out std_logic; Pr_out : out std_logic; -- Core_out : out std_logic; -- Chip_out : out std_logic; -- Sys_out : out std_logic; MB_out : out std_logic ); end sequence; architecture imp of sequence is constant CLEAR : std_logic := '0'; constant BSR_END_LPF_CHIP : std_logic_vector(5 downto 0) := "001100"; -- 12 constant BSR_END_SYS : std_logic_vector(5 downto 0) := "011001"; -- 25 constant PR_END_LPF_CHIP : std_logic_vector(5 downto 0) := "011100"; -- 28 constant PR_END_SYS : std_logic_vector(5 downto 0) := "101001"; -- 41 constant CORE_END_LPF_CHIP : std_logic_vector(5 downto 0) := "101100"; -- 44 constant CORE_END_SYS : std_logic_vector(5 downto 0) := "111001"; -- 57 constant CHIP_END_LPF_CHIP : std_logic_vector(5 downto 0) := BSR_END_LPF_CHIP; constant CHIP_END_SYS : std_logic_vector(5 downto 0) := BSR_END_SYS; constant SYS_END_LPF : std_logic_vector(5 downto 0) := BSR_END_LPF_CHIP; constant SYS_END_SYS : std_logic_vector(5 downto 0) := BSR_END_SYS; signal bsr : std_logic := '0'; signal bsr_dec : std_logic_vector(2 downto 0) := (others => '0'); signal pr : std_logic := '0'; signal pr_dec : std_logic_vector(2 downto 0) := (others => '0'); signal Core : std_logic := '0'; signal core_dec : std_logic_vector(2 downto 0) := (others => '0'); signal Chip : std_logic := '0'; signal chip_dec : std_logic_vector(2 downto 0) := (others => '0'); signal Sys : std_logic := '0'; signal sys_dec : std_logic_vector(2 downto 0) := (others => '0'); signal chip_Reset_Req_d1 : std_logic := '0'; -- delayed Chip_Reset_Req signal chip_Reset_Req_d2 : std_logic := '0'; -- delayed Chip_Reset_Req signal chip_Reset_Req_d3 : std_logic := '0'; -- delayed Chip_Reset_Req signal system_Reset_Req_d1 : std_logic := '0'; -- delayed System_Reset_Req signal system_Reset_Req_d2 : std_logic := '0'; -- delayed System_Reset_Req signal system_Reset_Req_d3 : std_logic := '0'; -- delayed System_Reset_Req signal seq_cnt : std_logic_vector(5 downto 0); signal seq_cnt_en : std_logic := '0'; signal seq_clr : std_logic := '0'; signal ris_edge : std_logic := '0'; signal sys_edge : std_logic := '0'; signal from_sys : std_logic; ------------------------------------------------------------------------------- -- Component Declarations ------------------------------------------------------------------------------- begin Pr_out <= pr; Bsr_out <= bsr; MB_out <= core; -- Core_out <= core; -- Chip_out <= chip or sys; -- Sys_out <= sys; ------------------------------------------------------------------------------- -- This process remembers that the reset was caused be -- System_Reset_Req ------------------------------------------------------------------------------- SYS_FROM_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then --if Lpf_reset='1' or system_reset_req_d3='1' then if (Lpf_reset = '1') then from_sys <= '1'; --elsif Chip_Reset_Req_d3='1' then -- from_sys <= '0'; elsif (Core = '0') then from_sys <='0'; end if; end if; end process; ------------------------------------------------------------------------------- -- This instantiates a counter to control the sequencing ------------------------------------------------------------------------------- SEQ_COUNTER : entity proc_sys_reset_v5_0.UPCNT_N generic map (C_SIZE => 6) port map( Data => "000000", Cnt_en => seq_cnt_en, Load => '0', Clr => seq_clr, Clk => Slowest_sync_clk, Qout => seq_cnt ); ------------------------------------------------------------------------------- -- SEQ_CNT_EN_PROCESS ------------------------------------------------------------------------------- -- This generates the reset pulse and the count enable to core reset counter -- count until all outputs are inactive ------------------------------------------------------------------------------- SEQ_CNT_EN_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then if (Lpf_reset='1' --or --System_Reset_Req_d3='1' or --Chip_Reset_Req_d3='1' or --ris_edge = '1' ) then seq_cnt_en <= '1'; elsif (Core='0') then -- Core always present and always last seq_cnt_en <= '0'; end if; end if; end process; ------------------------------------------------------------------------------- -- SEQ_CLR_PROCESS ------------------------------------------------------------------------------- -- This generates the reset to the sequence counter -- Clear the counter on a rising edge of chip or system request or low pass -- filter output ------------------------------------------------------------------------------- SEQ_CLR_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if ris_edge = '1' or Lpf_reset = '1' then if (Lpf_reset = '1') then seq_clr <= '0'; else seq_clr <= '1'; end if; end if; end process; ------------------------------------------------------------------------------- -- This process defines the Peripheral_Reset output signal ------------------------------------------------------------------------------- PR_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then --if ris_edge = '1' or Lpf_reset = '1' then if (Lpf_reset = '1') then pr <= '1'; elsif (pr_dec(2) = '1') then pr <= '0'; end if; end if; end process; ------------------------------------------------------------------------------- -- This process decodes the sequence counter for PR to use ------------------------------------------------------------------------------- PR_DECODE_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then if ( (seq_cnt(5 downto 3) = PR_END_LPF_CHIP(5 downto 3) and from_sys = '0') or (seq_cnt(5 downto 3) = PR_END_SYS(5 downto 3) and from_sys = '1') ) then pr_dec(0) <= '1'; else pr_dec(0) <= '0'; end if; if ( (seq_cnt(2 downto 0) = PR_END_LPF_CHIP(2 downto 0) and from_sys = '0') or (seq_cnt(2 downto 0) = PR_END_SYS(2 downto 0) and from_sys = '1') )then pr_dec(1) <= '1'; else pr_dec(1) <= '0'; end if; pr_dec(2) <= pr_dec(1) and pr_dec(0); end if; end process; ------------------------------------------------------------------------------- -- This process defines the Bus_Struct_Reset output signal ------------------------------------------------------------------------------- BSR_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then --if ris_edge = '1' or Lpf_reset = '1' then if (Lpf_reset = '1') then bsr <= '1'; elsif (bsr_dec(2) = '1') then bsr <= '0'; end if; end if; end process; ------------------------------------------------------------------------------- -- This process decodes the sequence counter for BSR to use ------------------------------------------------------------------------------- BSR_DECODE_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then if ( (seq_cnt(5 downto 3) = BSR_END_LPF_CHIP(5 downto 3) and from_sys = '0') or (seq_cnt(5 downto 3) = BSR_END_SYS(5 downto 3) and from_sys = '1') )then bsr_dec(0) <= '1'; else bsr_dec(0) <= '0'; end if; if ( (seq_cnt(2 downto 0) = BSR_END_LPF_CHIP(2 downto 0) and from_sys = '0') or (seq_cnt(2 downto 0) = BSR_END_SYS(2 downto 0) and from_sys = '1') )then bsr_dec(1) <= '1'; else bsr_dec(1) <= '0'; end if; bsr_dec(2) <= bsr_dec(1) and bsr_dec(0); end if; end process; ------------------------------------------------------------------------------- -- This process defines the Peripheral_Reset output signal ------------------------------------------------------------------------------- CORE_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if ris_edge = '1' or Lpf_reset = '1' then if (Lpf_reset = '1') then core <= '1'; elsif (core_dec(2) = '1') then core <= '0'; end if; end if; end process; ------------------------------------------------------------------------------- -- This process decodes the sequence counter for PR to use ------------------------------------------------------------------------------- CORE_DECODE_PROCESS: process (Slowest_sync_clk) begin if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then if ( (seq_cnt(5 downto 3) = CORE_END_LPF_CHIP(5 downto 3) and from_sys = '0') or (seq_cnt(5 downto 3) = CORE_END_SYS(5 downto 3) and from_sys = '1') )then core_dec(0) <= '1'; else core_dec(0) <= '0'; end if; if ( (seq_cnt(2 downto 0) = CORE_END_LPF_CHIP(2 downto 0) and from_sys = '0') or (seq_cnt(2 downto 0) = CORE_END_SYS(2 downto 0) and from_sys = '1') )then core_dec(1) <= '1'; else core_dec(1) <= '0'; end if; core_dec(2) <= core_dec(1) and core_dec(0); end if; end process; --------------------------------------------------------------------------------- ---- This process defines the Chip output signal --------------------------------------------------------------------------------- -- CHIP_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- -- if ris_edge = '1' or Lpf_reset = '1' then -- if Lpf_reset = '1' then -- chip <= '1'; -- elsif chip_dec(2) = '1' then -- chip <= '0'; -- end if; -- end if; -- end process; -- --------------------------------------------------------------------------------- ---- This process decodes the sequence counter for Chip to use ---- sys is overlapping the chip reset and thus no need to decode this here --------------------------------------------------------------------------------- -- CHIP_DECODE_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if (seq_cnt(5 downto 2) = CHIP_END_LPF_CHIP(5 downto 2)) then -- chip_dec(0) <= '1'; -- else -- chip_dec(0) <= '0'; -- end if; -- if (seq_cnt(1 downto 0) = CHIP_END_LPF_CHIP(1 downto 0)) then -- chip_dec(1) <= '1'; -- else -- chip_dec(1) <= '0'; -- end if; -- chip_dec(2) <= chip_dec(1) and chip_dec(0); -- end if; -- end process; --------------------------------------------------------------------------------- ---- This process defines the Sys output signal --------------------------------------------------------------------------------- -- SYS_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if sys_edge = '1' or Lpf_reset = '1' then -- sys <= '1'; -- elsif sys_dec(2) = '1' then -- sys <= '0'; -- end if; -- end if; -- end process; -- --------------------------------------------------------------------------------- ---- This process decodes the sequence counter for Sys to use --------------------------------------------------------------------------------- -- SYS_DECODE_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if (seq_cnt(5 downto 3) = SYS_END_LPF(5 downto 3) and from_sys = '0') or -- (seq_cnt(5 downto 3) = SYS_END_SYS(5 downto 3) and from_sys = '1') then -- sys_dec(0) <= '1'; -- else -- sys_dec(0) <= '0'; -- end if; -- if (seq_cnt(2 downto 0) = SYS_END_LPF(2 downto 0) and from_sys = '0') or -- (seq_cnt(2 downto 0) = SYS_END_SYS(2 downto 0) and from_sys = '1') then -- sys_dec(1) <= '1'; -- else -- sys_dec(1) <= '0'; -- end if; -- sys_dec(2) <= sys_dec(1) and sys_dec(0); -- end if; -- end process; -- --------------------------------------------------------------------------------- ---- This process delays signals so the the edge can be detected and used --------------------------------------------------------------------------------- -- DELAY_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- chip_reset_req_d1 <= Chip_Reset_Req ; -- chip_reset_req_d2 <= chip_Reset_Req_d1 ; -- chip_reset_req_d3 <= chip_Reset_Req_d2 ; -- system_reset_req_d1 <= System_Reset_Req; -- system_reset_req_d2 <= system_Reset_Req_d1; -- system_reset_req_d3 <= system_Reset_Req_d2; -- end if; -- end process; ------------------------------------------------------------------------------- -- This process creates a signal that goes high on the rising edge of either -- Chip_Reset_Req or System_Reset_Req ------------------------------------------------------------------------------- -- RIS_EDGE_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if (chip_reset_req_d3='0' and chip_Reset_Req_d2= '1') -- rising edge -- or (system_reset_req_d3='0' and system_Reset_Req_d2='1') then -- ris_edge <= '1'; -- else -- ris_edge <='0'; -- end if; -- end if; -- end process; ------------------------------------------------------------------------------- -- This process creates a signal that goes high on the rising edge of -- System_Reset_Req ------------------------------------------------------------------------------- -- SYS_EDGE_PROCESS: process (Slowest_sync_clk) -- begin -- if (Slowest_sync_clk'event and Slowest_sync_clk = '1') then -- if (system_reset_req_d3='0' and system_reset_req_d2='1') then -- sys_edge <= '1'; -- else -- sys_edge <='0'; -- end if; -- end if; -- end process; end architecture imp;
gpl-2.0
MAV-RT-testbed/MAV-testbed
Syma_Ctrl_core_1.1/hdl/Syma_Ctrl_core_v1_1_S01_AXI.vhd
2
19746
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity Syma_Ctrl_Core_v1_1_S01_AXI is generic ( -- Users to add parameters here -- User parameters ends -- Do not modify the parameters beyond this line -- Width of S_AXI data bus C_S_AXI_DATA_WIDTH : integer := 32; -- Width of S_AXI address bus C_S_AXI_ADDR_WIDTH : integer := 5 ); port ( -- Users to add ports here PPM_INPUT : in std_logic; SAMPLE_CLOCK : in std_logic; INTR_SINGLE : out std_logic; INTR_COMPLETE: out std_logic; -- Debugging: -- ppm_sample_dbg : inout std_logic_vector (1 downto 0) := "00"; -- counter_dbg : inout unsigned (31 downto 0) := x"00_00_00_00"; -- reg_nr_dbg : inout unsigned (3 downto 0) := "0000"; -- User ports ends -- Do not modify the ports beyond this line -- Global Clock Signal S_AXI_ACLK : in std_logic; -- Global Reset Signal. This Signal is Active LOW S_AXI_ARESETN : in std_logic; -- Write address (issued by master, acceped by Slave) S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); -- Write channel Protection type. This signal indicates the -- privilege and security level of the transaction, and whether -- the transaction is a data access or an instruction access. S_AXI_AWPROT : in std_logic_vector(2 downto 0); -- Write address valid. This signal indicates that the master signaling -- valid write address and control information. S_AXI_AWVALID : in std_logic; -- Write address ready. This signal indicates that the slave is ready -- to accept an address and associated control signals. S_AXI_AWREADY : out std_logic; -- Write data (issued by master, acceped by Slave) S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); -- Write strobes. This signal indicates which byte lanes hold -- valid data. There is one write strobe bit for each eight -- bits of the write data bus. S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); -- Write valid. This signal indicates that valid write -- data and strobes are available. S_AXI_WVALID : in std_logic; -- Write ready. This signal indicates that the slave -- can accept the write data. S_AXI_WREADY : out std_logic; -- Write response. This signal indicates the status -- of the write transaction. S_AXI_BRESP : out std_logic_vector(1 downto 0); -- Write response valid. This signal indicates that the channel -- is signaling a valid write response. S_AXI_BVALID : out std_logic; -- Response ready. This signal indicates that the master -- can accept a write response. S_AXI_BREADY : in std_logic; -- Read address (issued by master, acceped by Slave) S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); -- Protection type. This signal indicates the privilege -- and security level of the transaction, and whether the -- transaction is a data access or an instruction access. S_AXI_ARPROT : in std_logic_vector(2 downto 0); -- Read address valid. This signal indicates that the channel -- is signaling valid read address and control information. S_AXI_ARVALID : in std_logic; -- Read address ready. This signal indicates that the slave is -- ready to accept an address and associated control signals. S_AXI_ARREADY : out std_logic; -- Read data (issued by slave) S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); -- Read response. This signal indicates the status of the -- read transfer. S_AXI_RRESP : out std_logic_vector(1 downto 0); -- Read valid. This signal indicates that the channel is -- signaling the required read data. S_AXI_RVALID : out std_logic; -- Read ready. This signal indicates that the master can -- accept the read data and response information. S_AXI_RREADY : in std_logic ); end Syma_Ctrl_Core_v1_1_S01_AXI; architecture arch_imp of Syma_Ctrl_Core_v1_1_S01_AXI is -- AXI4LITE signals signal axi_awaddr : std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); signal axi_awready : std_logic; signal axi_wready : std_logic; signal axi_bresp : std_logic_vector(1 downto 0); signal axi_bvalid : std_logic; signal axi_araddr : std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); signal axi_arready : std_logic; signal axi_rdata : std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal axi_rresp : std_logic_vector(1 downto 0); signal axi_rvalid : std_logic; -- Example-specific design signals -- local parameter for addressing 32 bit / 64 bit C_S_AXI_DATA_WIDTH -- ADDR_LSB is used for addressing 32/64 bit registers/memories -- ADDR_LSB = 2 for 32 bits (n downto 2) -- ADDR_LSB = 3 for 64 bits (n downto 3) constant ADDR_LSB : integer := (C_S_AXI_DATA_WIDTH/32)+ 1; constant OPT_MEM_ADDR_BITS : integer := 2; ------------------------------------------------ ---- Signals for user logic register space example -------------------------------------------------- ---- Number of Slave Registers 8 signal slv_reg0 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg1 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg2 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg3 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg4 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg5 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg6 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg7 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg_rden : std_logic; signal slv_reg_wren : std_logic; signal reg_data_out :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal byte_index : integer; signal ppm_out_cnt_1 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_2 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_3 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_4 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_5 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_6 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_7 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_8 : STD_LOGIC_VECTOR (31 downto 0); component ppm_decoder is Port ( clk : in std_logic; ppm_in : in STD_LOGIC; ppm_out_1 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_2 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_3 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_4 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_5 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_6 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_7 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_8 : out STD_LOGIC_VECTOR (31 downto 0); intr_1 : out std_logic := '0'; intr_comp : out std_logic := '0'); -- ppm_sample : inout std_logic_vector (1 downto 0) := "00"; -- counter : inout unsigned (31 downto 0) := x"00_00_00_00"; -- reg_nr : inout unsigned (3 downto 0) := "0000"); end component; begin -- I/O Connections assignments S_AXI_AWREADY <= axi_awready; S_AXI_WREADY <= axi_wready; S_AXI_BRESP <= axi_bresp; S_AXI_BVALID <= axi_bvalid; S_AXI_ARREADY <= axi_arready; S_AXI_RDATA <= axi_rdata; S_AXI_RRESP <= axi_rresp; S_AXI_RVALID <= axi_rvalid; -- Implement axi_awready generation -- axi_awready is asserted for one S_AXI_ACLK clock cycle when both -- S_AXI_AWVALID and S_AXI_WVALID are asserted. axi_awready is -- de-asserted when reset is low. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_awready <= '0'; else if (axi_awready = '0' and S_AXI_AWVALID = '1' and S_AXI_WVALID = '1') then -- slave is ready to accept write address when -- there is a valid write address and write data -- on the write address and data bus. This design -- expects no outstanding transactions. axi_awready <= '1'; else axi_awready <= '0'; end if; end if; end if; end process; -- Implement axi_awaddr latching -- This process is used to latch the address when both -- S_AXI_AWVALID and S_AXI_WVALID are valid. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_awaddr <= (others => '0'); else if (axi_awready = '0' and S_AXI_AWVALID = '1' and S_AXI_WVALID = '1') then -- Write Address latching axi_awaddr <= S_AXI_AWADDR; end if; end if; end if; end process; -- Implement axi_wready generation -- axi_wready is asserted for one S_AXI_ACLK clock cycle when both -- S_AXI_AWVALID and S_AXI_WVALID are asserted. axi_wready is -- de-asserted when reset is low. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_wready <= '0'; else if (axi_wready = '0' and S_AXI_WVALID = '1' and S_AXI_AWVALID = '1') then -- slave is ready to accept write data when -- there is a valid write address and write data -- on the write address and data bus. This design -- expects no outstanding transactions. axi_wready <= '1'; else axi_wready <= '0'; end if; end if; end if; end process; -- Implement memory mapped register select and write logic generation -- The write data is accepted and written to memory mapped registers when -- axi_awready, S_AXI_WVALID, axi_wready and S_AXI_WVALID are asserted. Write strobes are used to -- select byte enables of slave registers while writing. -- These registers are cleared when reset (active low) is applied. -- Slave register write enable is asserted when valid address and data are available -- and the slave is ready to accept the write address and write data. slv_reg_wren <= axi_wready and S_AXI_WVALID and axi_awready and S_AXI_AWVALID ; process (S_AXI_ACLK) variable loc_addr :std_logic_vector(OPT_MEM_ADDR_BITS downto 0); begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); slv_reg2 <= (others => '0'); slv_reg3 <= (others => '0'); slv_reg4 <= (others => '0'); slv_reg5 <= (others => '0'); slv_reg6 <= (others => '0'); slv_reg7 <= (others => '0'); else loc_addr := axi_awaddr(ADDR_LSB + OPT_MEM_ADDR_BITS downto ADDR_LSB); if (slv_reg_wren = '1') then case loc_addr is when b"000" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 0 slv_reg0(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"001" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 1 slv_reg1(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"010" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 2 slv_reg2(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"011" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 3 slv_reg3(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"100" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 4 slv_reg4(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"101" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 5 slv_reg5(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"110" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 6 slv_reg6(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"111" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 7 slv_reg7(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when others => slv_reg0 <= slv_reg0; slv_reg1 <= slv_reg1; slv_reg2 <= slv_reg2; slv_reg3 <= slv_reg3; slv_reg4 <= slv_reg4; slv_reg5 <= slv_reg5; slv_reg6 <= slv_reg6; slv_reg7 <= slv_reg7; end case; end if; end if; end if; end process; -- Implement write response logic generation -- The write response and response valid signals are asserted by the slave -- when axi_wready, S_AXI_WVALID, axi_wready and S_AXI_WVALID are asserted. -- This marks the acceptance of address and indicates the status of -- write transaction. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_bvalid <= '0'; axi_bresp <= "00"; --need to work more on the responses else if (axi_awready = '1' and S_AXI_AWVALID = '1' and axi_wready = '1' and S_AXI_WVALID = '1' and axi_bvalid = '0' ) then axi_bvalid <= '1'; axi_bresp <= "00"; elsif (S_AXI_BREADY = '1' and axi_bvalid = '1') then --check if bready is asserted while bvalid is high) axi_bvalid <= '0'; -- (there is a possibility that bready is always asserted high) end if; end if; end if; end process; -- Implement axi_arready generation -- axi_arready is asserted for one S_AXI_ACLK clock cycle when -- S_AXI_ARVALID is asserted. axi_awready is -- de-asserted when reset (active low) is asserted. -- The read address is also latched when S_AXI_ARVALID is -- asserted. axi_araddr is reset to zero on reset assertion. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_arready <= '0'; axi_araddr <= (others => '1'); else if (axi_arready = '0' and S_AXI_ARVALID = '1') then -- indicates that the slave has acceped the valid read address axi_arready <= '1'; -- Read Address latching axi_araddr <= S_AXI_ARADDR; else axi_arready <= '0'; end if; end if; end if; end process; -- Implement axi_arvalid generation -- axi_rvalid is asserted for one S_AXI_ACLK clock cycle when both -- S_AXI_ARVALID and axi_arready are asserted. The slave registers -- data are available on the axi_rdata bus at this instance. The -- assertion of axi_rvalid marks the validity of read data on the -- bus and axi_rresp indicates the status of read transaction.axi_rvalid -- is deasserted on reset (active low). axi_rresp and axi_rdata are -- cleared to zero on reset (active low). process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_rvalid <= '0'; axi_rresp <= "00"; else if (axi_arready = '1' and S_AXI_ARVALID = '1' and axi_rvalid = '0') then -- Valid read data is available at the read data bus axi_rvalid <= '1'; axi_rresp <= "00"; -- 'OKAY' response elsif (axi_rvalid = '1' and S_AXI_RREADY = '1') then -- Read data is accepted by the master axi_rvalid <= '0'; end if; end if; end if; end process; -- Implement memory mapped register select and read logic generation -- Slave register read enable is asserted when valid address is available -- and the slave is ready to accept the read address. slv_reg_rden <= axi_arready and S_AXI_ARVALID and (not axi_rvalid) ; process (ppm_out_cnt_1, ppm_out_cnt_2, ppm_out_cnt_3, ppm_out_cnt_4, ppm_out_cnt_5, ppm_out_cnt_6, ppm_out_cnt_7, ppm_out_cnt_8, axi_araddr, S_AXI_ARESETN, slv_reg_rden) variable loc_addr :std_logic_vector(OPT_MEM_ADDR_BITS downto 0); begin -- Address decoding for reading registers loc_addr := axi_araddr(ADDR_LSB + OPT_MEM_ADDR_BITS downto ADDR_LSB); case loc_addr is when b"000" => reg_data_out <= ppm_out_cnt_1; when b"001" => reg_data_out <= ppm_out_cnt_2; when b"010" => reg_data_out <= ppm_out_cnt_3; when b"011" => reg_data_out <= ppm_out_cnt_4; when b"100" => reg_data_out <= ppm_out_cnt_5; when b"101" => reg_data_out <= ppm_out_cnt_6; when b"110" => reg_data_out <= ppm_out_cnt_7; when b"111" => reg_data_out <= ppm_out_cnt_8; when others => reg_data_out <= (others => '0'); end case; end process; -- Output register or memory read data process( S_AXI_ACLK ) is begin if (rising_edge (S_AXI_ACLK)) then if ( S_AXI_ARESETN = '0' ) then axi_rdata <= (others => '0'); else if (slv_reg_rden = '1') then -- When there is a valid read address (S_AXI_ARVALID) with -- acceptance of read address by the slave (axi_arready), -- output the read dada -- Read address mux axi_rdata <= reg_data_out; -- register read data end if; end if; end if; end process; -- Add user logic here ppm_decoder_0 : ppm_decoder port map ( clk => SAMPLE_CLOCK, ppm_in => PPM_INPUT, ppm_out_1 => ppm_out_cnt_1, ppm_out_2 => ppm_out_cnt_2, ppm_out_3 => ppm_out_cnt_3, ppm_out_4 => ppm_out_cnt_4, ppm_out_5 => ppm_out_cnt_5, ppm_out_6 => ppm_out_cnt_6, ppm_out_7 => ppm_out_cnt_7, ppm_out_8 => ppm_out_cnt_8, intr_1 => INTR_SINGLE, intr_comp => INTR_COMPLETE); --ppm_sample => ppm_sample_dbg, --counter => counter_dbg, --reg_nr => reg_nr_dbg); -- User logic ends end arch_imp;
gpl-2.0
MAV-RT-testbed/MAV-testbed
Syma_Flight_Final/Syma_Flight_Final.srcs/sources_1/ipshared/rcs.ei.tum.de/Syma_Ctrl_core_v1_2/5d78a94c/hdl/Syma_Ctrl_core_v1_1_S01_AXI.vhd
2
19746
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity Syma_Ctrl_Core_v1_1_S01_AXI is generic ( -- Users to add parameters here -- User parameters ends -- Do not modify the parameters beyond this line -- Width of S_AXI data bus C_S_AXI_DATA_WIDTH : integer := 32; -- Width of S_AXI address bus C_S_AXI_ADDR_WIDTH : integer := 5 ); port ( -- Users to add ports here PPM_INPUT : in std_logic; SAMPLE_CLOCK : in std_logic; INTR_SINGLE : out std_logic; INTR_COMPLETE: out std_logic; -- Debugging: -- ppm_sample_dbg : inout std_logic_vector (1 downto 0) := "00"; -- counter_dbg : inout unsigned (31 downto 0) := x"00_00_00_00"; -- reg_nr_dbg : inout unsigned (3 downto 0) := "0000"; -- User ports ends -- Do not modify the ports beyond this line -- Global Clock Signal S_AXI_ACLK : in std_logic; -- Global Reset Signal. This Signal is Active LOW S_AXI_ARESETN : in std_logic; -- Write address (issued by master, acceped by Slave) S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); -- Write channel Protection type. This signal indicates the -- privilege and security level of the transaction, and whether -- the transaction is a data access or an instruction access. S_AXI_AWPROT : in std_logic_vector(2 downto 0); -- Write address valid. This signal indicates that the master signaling -- valid write address and control information. S_AXI_AWVALID : in std_logic; -- Write address ready. This signal indicates that the slave is ready -- to accept an address and associated control signals. S_AXI_AWREADY : out std_logic; -- Write data (issued by master, acceped by Slave) S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); -- Write strobes. This signal indicates which byte lanes hold -- valid data. There is one write strobe bit for each eight -- bits of the write data bus. S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); -- Write valid. This signal indicates that valid write -- data and strobes are available. S_AXI_WVALID : in std_logic; -- Write ready. This signal indicates that the slave -- can accept the write data. S_AXI_WREADY : out std_logic; -- Write response. This signal indicates the status -- of the write transaction. S_AXI_BRESP : out std_logic_vector(1 downto 0); -- Write response valid. This signal indicates that the channel -- is signaling a valid write response. S_AXI_BVALID : out std_logic; -- Response ready. This signal indicates that the master -- can accept a write response. S_AXI_BREADY : in std_logic; -- Read address (issued by master, acceped by Slave) S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); -- Protection type. This signal indicates the privilege -- and security level of the transaction, and whether the -- transaction is a data access or an instruction access. S_AXI_ARPROT : in std_logic_vector(2 downto 0); -- Read address valid. This signal indicates that the channel -- is signaling valid read address and control information. S_AXI_ARVALID : in std_logic; -- Read address ready. This signal indicates that the slave is -- ready to accept an address and associated control signals. S_AXI_ARREADY : out std_logic; -- Read data (issued by slave) S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); -- Read response. This signal indicates the status of the -- read transfer. S_AXI_RRESP : out std_logic_vector(1 downto 0); -- Read valid. This signal indicates that the channel is -- signaling the required read data. S_AXI_RVALID : out std_logic; -- Read ready. This signal indicates that the master can -- accept the read data and response information. S_AXI_RREADY : in std_logic ); end Syma_Ctrl_Core_v1_1_S01_AXI; architecture arch_imp of Syma_Ctrl_Core_v1_1_S01_AXI is -- AXI4LITE signals signal axi_awaddr : std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); signal axi_awready : std_logic; signal axi_wready : std_logic; signal axi_bresp : std_logic_vector(1 downto 0); signal axi_bvalid : std_logic; signal axi_araddr : std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); signal axi_arready : std_logic; signal axi_rdata : std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal axi_rresp : std_logic_vector(1 downto 0); signal axi_rvalid : std_logic; -- Example-specific design signals -- local parameter for addressing 32 bit / 64 bit C_S_AXI_DATA_WIDTH -- ADDR_LSB is used for addressing 32/64 bit registers/memories -- ADDR_LSB = 2 for 32 bits (n downto 2) -- ADDR_LSB = 3 for 64 bits (n downto 3) constant ADDR_LSB : integer := (C_S_AXI_DATA_WIDTH/32)+ 1; constant OPT_MEM_ADDR_BITS : integer := 2; ------------------------------------------------ ---- Signals for user logic register space example -------------------------------------------------- ---- Number of Slave Registers 8 signal slv_reg0 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg1 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg2 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg3 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg4 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg5 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg6 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg7 :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal slv_reg_rden : std_logic; signal slv_reg_wren : std_logic; signal reg_data_out :std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); signal byte_index : integer; signal ppm_out_cnt_1 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_2 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_3 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_4 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_5 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_6 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_7 : STD_LOGIC_VECTOR (31 downto 0); signal ppm_out_cnt_8 : STD_LOGIC_VECTOR (31 downto 0); component ppm_decoder is Port ( clk : in std_logic; ppm_in : in STD_LOGIC; ppm_out_1 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_2 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_3 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_4 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_5 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_6 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_7 : out STD_LOGIC_VECTOR (31 downto 0); ppm_out_8 : out STD_LOGIC_VECTOR (31 downto 0); intr_1 : out std_logic := '0'; intr_comp : out std_logic := '0'); -- ppm_sample : inout std_logic_vector (1 downto 0) := "00"; -- counter : inout unsigned (31 downto 0) := x"00_00_00_00"; -- reg_nr : inout unsigned (3 downto 0) := "0000"); end component; begin -- I/O Connections assignments S_AXI_AWREADY <= axi_awready; S_AXI_WREADY <= axi_wready; S_AXI_BRESP <= axi_bresp; S_AXI_BVALID <= axi_bvalid; S_AXI_ARREADY <= axi_arready; S_AXI_RDATA <= axi_rdata; S_AXI_RRESP <= axi_rresp; S_AXI_RVALID <= axi_rvalid; -- Implement axi_awready generation -- axi_awready is asserted for one S_AXI_ACLK clock cycle when both -- S_AXI_AWVALID and S_AXI_WVALID are asserted. axi_awready is -- de-asserted when reset is low. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_awready <= '0'; else if (axi_awready = '0' and S_AXI_AWVALID = '1' and S_AXI_WVALID = '1') then -- slave is ready to accept write address when -- there is a valid write address and write data -- on the write address and data bus. This design -- expects no outstanding transactions. axi_awready <= '1'; else axi_awready <= '0'; end if; end if; end if; end process; -- Implement axi_awaddr latching -- This process is used to latch the address when both -- S_AXI_AWVALID and S_AXI_WVALID are valid. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_awaddr <= (others => '0'); else if (axi_awready = '0' and S_AXI_AWVALID = '1' and S_AXI_WVALID = '1') then -- Write Address latching axi_awaddr <= S_AXI_AWADDR; end if; end if; end if; end process; -- Implement axi_wready generation -- axi_wready is asserted for one S_AXI_ACLK clock cycle when both -- S_AXI_AWVALID and S_AXI_WVALID are asserted. axi_wready is -- de-asserted when reset is low. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_wready <= '0'; else if (axi_wready = '0' and S_AXI_WVALID = '1' and S_AXI_AWVALID = '1') then -- slave is ready to accept write data when -- there is a valid write address and write data -- on the write address and data bus. This design -- expects no outstanding transactions. axi_wready <= '1'; else axi_wready <= '0'; end if; end if; end if; end process; -- Implement memory mapped register select and write logic generation -- The write data is accepted and written to memory mapped registers when -- axi_awready, S_AXI_WVALID, axi_wready and S_AXI_WVALID are asserted. Write strobes are used to -- select byte enables of slave registers while writing. -- These registers are cleared when reset (active low) is applied. -- Slave register write enable is asserted when valid address and data are available -- and the slave is ready to accept the write address and write data. slv_reg_wren <= axi_wready and S_AXI_WVALID and axi_awready and S_AXI_AWVALID ; process (S_AXI_ACLK) variable loc_addr :std_logic_vector(OPT_MEM_ADDR_BITS downto 0); begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); slv_reg2 <= (others => '0'); slv_reg3 <= (others => '0'); slv_reg4 <= (others => '0'); slv_reg5 <= (others => '0'); slv_reg6 <= (others => '0'); slv_reg7 <= (others => '0'); else loc_addr := axi_awaddr(ADDR_LSB + OPT_MEM_ADDR_BITS downto ADDR_LSB); if (slv_reg_wren = '1') then case loc_addr is when b"000" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 0 slv_reg0(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"001" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 1 slv_reg1(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"010" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 2 slv_reg2(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"011" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 3 slv_reg3(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"100" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 4 slv_reg4(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"101" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 5 slv_reg5(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"110" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 6 slv_reg6(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when b"111" => for byte_index in 0 to (C_S_AXI_DATA_WIDTH/8-1) loop if ( S_AXI_WSTRB(byte_index) = '1' ) then -- Respective byte enables are asserted as per write strobes -- slave registor 7 slv_reg7(byte_index*8+7 downto byte_index*8) <= S_AXI_WDATA(byte_index*8+7 downto byte_index*8); end if; end loop; when others => slv_reg0 <= slv_reg0; slv_reg1 <= slv_reg1; slv_reg2 <= slv_reg2; slv_reg3 <= slv_reg3; slv_reg4 <= slv_reg4; slv_reg5 <= slv_reg5; slv_reg6 <= slv_reg6; slv_reg7 <= slv_reg7; end case; end if; end if; end if; end process; -- Implement write response logic generation -- The write response and response valid signals are asserted by the slave -- when axi_wready, S_AXI_WVALID, axi_wready and S_AXI_WVALID are asserted. -- This marks the acceptance of address and indicates the status of -- write transaction. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_bvalid <= '0'; axi_bresp <= "00"; --need to work more on the responses else if (axi_awready = '1' and S_AXI_AWVALID = '1' and axi_wready = '1' and S_AXI_WVALID = '1' and axi_bvalid = '0' ) then axi_bvalid <= '1'; axi_bresp <= "00"; elsif (S_AXI_BREADY = '1' and axi_bvalid = '1') then --check if bready is asserted while bvalid is high) axi_bvalid <= '0'; -- (there is a possibility that bready is always asserted high) end if; end if; end if; end process; -- Implement axi_arready generation -- axi_arready is asserted for one S_AXI_ACLK clock cycle when -- S_AXI_ARVALID is asserted. axi_awready is -- de-asserted when reset (active low) is asserted. -- The read address is also latched when S_AXI_ARVALID is -- asserted. axi_araddr is reset to zero on reset assertion. process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_arready <= '0'; axi_araddr <= (others => '1'); else if (axi_arready = '0' and S_AXI_ARVALID = '1') then -- indicates that the slave has acceped the valid read address axi_arready <= '1'; -- Read Address latching axi_araddr <= S_AXI_ARADDR; else axi_arready <= '0'; end if; end if; end if; end process; -- Implement axi_arvalid generation -- axi_rvalid is asserted for one S_AXI_ACLK clock cycle when both -- S_AXI_ARVALID and axi_arready are asserted. The slave registers -- data are available on the axi_rdata bus at this instance. The -- assertion of axi_rvalid marks the validity of read data on the -- bus and axi_rresp indicates the status of read transaction.axi_rvalid -- is deasserted on reset (active low). axi_rresp and axi_rdata are -- cleared to zero on reset (active low). process (S_AXI_ACLK) begin if rising_edge(S_AXI_ACLK) then if S_AXI_ARESETN = '0' then axi_rvalid <= '0'; axi_rresp <= "00"; else if (axi_arready = '1' and S_AXI_ARVALID = '1' and axi_rvalid = '0') then -- Valid read data is available at the read data bus axi_rvalid <= '1'; axi_rresp <= "00"; -- 'OKAY' response elsif (axi_rvalid = '1' and S_AXI_RREADY = '1') then -- Read data is accepted by the master axi_rvalid <= '0'; end if; end if; end if; end process; -- Implement memory mapped register select and read logic generation -- Slave register read enable is asserted when valid address is available -- and the slave is ready to accept the read address. slv_reg_rden <= axi_arready and S_AXI_ARVALID and (not axi_rvalid) ; process (ppm_out_cnt_1, ppm_out_cnt_2, ppm_out_cnt_3, ppm_out_cnt_4, ppm_out_cnt_5, ppm_out_cnt_6, ppm_out_cnt_7, ppm_out_cnt_8, axi_araddr, S_AXI_ARESETN, slv_reg_rden) variable loc_addr :std_logic_vector(OPT_MEM_ADDR_BITS downto 0); begin -- Address decoding for reading registers loc_addr := axi_araddr(ADDR_LSB + OPT_MEM_ADDR_BITS downto ADDR_LSB); case loc_addr is when b"000" => reg_data_out <= ppm_out_cnt_1; when b"001" => reg_data_out <= ppm_out_cnt_2; when b"010" => reg_data_out <= ppm_out_cnt_3; when b"011" => reg_data_out <= ppm_out_cnt_4; when b"100" => reg_data_out <= ppm_out_cnt_5; when b"101" => reg_data_out <= ppm_out_cnt_6; when b"110" => reg_data_out <= ppm_out_cnt_7; when b"111" => reg_data_out <= ppm_out_cnt_8; when others => reg_data_out <= (others => '0'); end case; end process; -- Output register or memory read data process( S_AXI_ACLK ) is begin if (rising_edge (S_AXI_ACLK)) then if ( S_AXI_ARESETN = '0' ) then axi_rdata <= (others => '0'); else if (slv_reg_rden = '1') then -- When there is a valid read address (S_AXI_ARVALID) with -- acceptance of read address by the slave (axi_arready), -- output the read dada -- Read address mux axi_rdata <= reg_data_out; -- register read data end if; end if; end if; end process; -- Add user logic here ppm_decoder_0 : ppm_decoder port map ( clk => SAMPLE_CLOCK, ppm_in => PPM_INPUT, ppm_out_1 => ppm_out_cnt_1, ppm_out_2 => ppm_out_cnt_2, ppm_out_3 => ppm_out_cnt_3, ppm_out_4 => ppm_out_cnt_4, ppm_out_5 => ppm_out_cnt_5, ppm_out_6 => ppm_out_cnt_6, ppm_out_7 => ppm_out_cnt_7, ppm_out_8 => ppm_out_cnt_8, intr_1 => INTR_SINGLE, intr_comp => INTR_COMPLETE); --ppm_sample => ppm_sample_dbg, --counter => counter_dbg, --reg_nr => reg_nr_dbg); -- User logic ends end arch_imp;
gpl-2.0
MAV-RT-testbed/MAV-testbed
Syma_Flight_Final/Syma_Flight_Final.srcs/sources_1/ipshared/xilinx.com/axi_quad_spi_v3_2/c64e9f22/hdl/src/vhdl/cross_clk_sync_fifo_0.vhd
1
84438
------------------------------------------------------------------------------- -- cross_clk_sync_fifo_0.vhd - Entity and architecture ------------------------------------------------------------------------------- -- -- ******************************************************************* -- ** (c) Copyright [2010] - [2012] Xilinx, Inc. All rights reserved.* -- ** * -- ** This file contains confidential and proprietary information * -- ** of Xilinx, Inc. and is protected under U.S. and * -- ** international copyright and other intellectual property * -- ** laws. * -- ** * -- ** DISCLAIMER * -- ** This disclaimer is not a license and does not grant any * -- ** rights to the materials distributed herewith. Except as * -- ** otherwise provided in a valid license issued to you by * -- ** Xilinx, and to the maximum extent permitted by applicable * -- ** law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND * -- ** WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES * -- ** AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING * -- ** BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- * -- ** INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and * -- ** (2) Xilinx shall not be liable (whether in contract or tort, * -- ** including negligence, or under any other theory of * -- ** liability) for any loss or damage of any kind or nature * -- ** related to, arising under or in connection with these * -- ** materials, including for any direct, or any indirect, * -- ** special, incidental, or consequential loss or damage * -- ** (including loss of data, profits, goodwill, or any type of * -- ** loss or damage suffered as a result of any action brought * -- ** by a third party) even if such damage or loss was * -- ** reasonably foreseeable or Xilinx had been advised of the * -- ** possibility of the same. * -- ** * -- ** CRITICAL APPLICATIONS * -- ** Xilinx products are not designed or intended to be fail- * -- ** safe, or for use in any application requiring fail-safe * -- ** performance, such as life-support or safety devices or * -- ** systems, Class III medical devices, nuclear facilities, * -- ** applications related to the deployment of airbags, or any * -- ** other applications that could lead to death, personal * -- ** injury, or severe property or environmental damage * -- ** (individually and collectively, "Critical * -- ** Applications"). Customer assumes the sole risk and * -- ** liability of any use of Xilinx products in Critical * -- ** Applications, subject only to applicable laws and * -- ** regulations governing limitations on product liability. * -- ** * -- ** THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS * -- ** PART OF THIS FILE AT ALL TIMES. * -- ******************************************************************* -- ------------------------------------------------------------------------------- -- Filename: cross_clk_sync_fifo_0.vhd -- Version: v3.1 -- Description: This is the CDC logic when FIFO = 0. -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Naming Conventions: -- active low signals: "*_n" -- clock signals: "clk", "clk_div#", "clk_#x" -- reset signals: "rst", "rst_n" -- generics: "C_*" -- user defined types: "*_TYPE" -- state machine next state: "*_ns" -- state machine current state: "*_cs" -- combinatorial signals: "*_cmb" -- pipelined or register delay signals: "*_d#" -- counter signals: "*cnt*" -- clock enable signals: "*_ce" -- internal version of output port "*_i" -- device pins: "*_pin" -- ports: - Names begin with Uppercase -- processes: "*_PROCESS" -- component instantiations: "<ENTITY_>I_<#|FUNC> ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.conv_std_logic_vector; use ieee.std_logic_arith.all; use ieee.std_logic_signed.all; use ieee.std_logic_misc.all; -- library unsigned is used for overloading of "=" which allows integer to -- be compared to std_logic_vector use ieee.std_logic_unsigned.all; library axi_lite_ipif_v3_0; use axi_lite_ipif_v3_0.axi_lite_ipif; use axi_lite_ipif_v3_0.ipif_pkg.all; library lib_cdc_v1_0; use lib_cdc_v1_0.cdc_sync; library axi_quad_spi_v3_2; use axi_quad_spi_v3_2.all; library unisim; use unisim.vcomponents.FDRE; use unisim.vcomponents.FDR; ------------------------------------------------------------------------------- entity cross_clk_sync_fifo_0 is generic ( C_NUM_TRANSFER_BITS : integer; Async_Clk : integer; C_NUM_SS_BITS : integer--; --C_AXI_SPI_CLK_EQ_DIFF : integer ); port ( EXT_SPI_CLK : in std_logic; Bus2IP_Clk : in std_logic; Soft_Reset_op : in std_logic; Rst_from_axi_cdc_to_spi : in std_logic; ---------------------------- Tx_FIFO_Empty_cdc_from_axi : in std_logic; Tx_FIFO_Empty_cdc_to_spi : out std_logic; ---------------------------------------------------------- Tx_FIFO_Empty_SPISR_cdc_from_spi : in std_logic; Tx_FIFO_Empty_SPISR_cdc_to_axi : out std_logic; ---------------------------------------------------------- spisel_d1_reg_cdc_from_spi : in std_logic; -- = spisel_pulse_cdc_from_spi_clk , -- in spisel_d1_reg_cdc_to_axi : out std_logic; -- = spisel_pulse_cdc_to_axi_clk , -- out --------------------------:------------------------------- spisel_pulse_cdc_from_spi : in std_logic; -- = spisel_pulse_cdc_from_spi_clk , -- in spisel_pulse_cdc_to_axi : out std_logic; -- = spisel_pulse_cdc_to_axi_clk , -- out --------------------------:------------------------------- spiXfer_done_cdc_from_spi : in std_logic; -- = spiXfer_done_cdc_from_spi_clk, -- in spiXfer_done_cdc_to_axi : out std_logic; -- = spiXfer_done_cdc_to_axi_clk , -- out --------------------------:------------------------------- modf_strobe_cdc_from_spi : in std_logic; -- = modf_strobe_cdc_from_spi_clk, -- in modf_strobe_cdc_to_axi : out std_logic; -- = modf_strobe_cdc_to_axi_clk , -- out --------------------------:------------------------------- Slave_MODF_strobe_cdc_from_spi : in std_logic; -- = slave_MODF_strobe_cdc_from_spi_clk,-- in Slave_MODF_strobe_cdc_to_axi : out std_logic; -- = slave_MODF_strobe_cdc_to_axi_clk ,-- out --------------------------:------------------------------- receive_Data_cdc_from_spi : in std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- = receive_Data_cdc_from_spi_clk, -- in receive_Data_cdc_to_axi : out std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- = receive_data_cdc_to_axi_clk, -- out --------------------------:------------------------------- drr_Overrun_int_cdc_from_spi : in std_logic; drr_Overrun_int_cdc_to_axi : out std_logic; --------------------------:------------------------------- dtr_underrun_cdc_from_spi : in std_logic; -- = dtr_underrun_cdc_from_spi_clk, -- in dtr_underrun_cdc_to_axi : out std_logic; -- = dtr_underrun_cdc_to_axi_clk, -- out --------------------------:------------------------------- transmit_Data_cdc_from_axi : in std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- = transmit_Data_cdc_from_axi_clk, -- in transmit_Data_cdc_to_spi : out std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- = transmit_Data_cdc_to_spi_clk -- out ---------------------------- SPICR_0_LOOP_cdc_from_axi : in std_logic; SPICR_0_LOOP_cdc_to_spi : out std_logic; ---------------------------- SPICR_1_SPE_cdc_from_axi : in std_logic; SPICR_1_SPE_cdc_to_spi : out std_logic; ---------------------------- SPICR_2_MST_N_SLV_cdc_from_axi : in std_logic; SPICR_2_MST_N_SLV_cdc_to_spi : out std_logic; ---------------------------- SPICR_3_CPOL_cdc_from_axi : in std_logic; SPICR_3_CPOL_cdc_to_spi : out std_logic; ---------------------------- SPICR_4_CPHA_cdc_from_axi : in std_logic; SPICR_4_CPHA_cdc_to_spi : out std_logic; ---------------------------- SPICR_5_TXFIFO_cdc_from_axi : in std_logic; SPICR_5_TXFIFO_cdc_to_spi : out std_logic; ---------------------------- SPICR_6_RXFIFO_RST_cdc_from_axi: in std_logic; SPICR_6_RXFIFO_RST_cdc_to_spi : out std_logic; ---------------------------- SPICR_7_SS_cdc_from_axi : in std_logic; SPICR_7_SS_cdc_to_spi : out std_logic; ---------------------------- SPICR_8_TR_INHIBIT_cdc_from_axi: in std_logic; SPICR_8_TR_INHIBIT_cdc_to_spi : out std_logic; ---------------------------- SPICR_9_LSB_cdc_from_axi : in std_logic; SPICR_9_LSB_cdc_to_spi : out std_logic; ---------------------------- SPICR_bits_7_8_cdc_from_axi : in std_logic_vector(1 downto 0); -- in std_logic_vector SPICR_bits_7_8_cdc_to_spi : out std_logic_vector(1 downto 0); ---------------------------- SR_3_modf_cdc_from_axi : in std_logic; SR_3_modf_cdc_to_spi : out std_logic; ---------------------------- SPISSR_cdc_from_axi : in std_logic_vector(0 to (C_NUM_SS_BITS-1)); SPISSR_cdc_to_spi : out std_logic_vector(0 to (C_NUM_SS_BITS-1)) ---------------------------- ); end entity cross_clk_sync_fifo_0; architecture imp of cross_clk_sync_fifo_0 is -------------------------------------------- ---------------------------------------------------------------------------------- -- below attributes are added to reduce the synth warnings in Vivado tool attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of imp : architecture is "yes"; ---------------------------------------------------------------------------------- -- signal declaration signal spisel_d1_reg_cdc_from_spi_d1 : std_logic; signal spisel_d1_reg_cdc_from_spi_d2 : std_logic; signal spiXfer_done_cdc_from_spi_d1 : std_logic; signal spiXfer_done_cdc_from_spi_d2 : std_logic; signal modf_strobe_cdc_from_spi_d1 : std_logic; signal modf_strobe_cdc_from_spi_d2 : std_logic; signal modf_strobe_cdc_from_spi_d3 : std_logic; signal Slave_MODF_strobe_cdc_from_spi_d1 : std_logic; signal Slave_MODF_strobe_cdc_from_spi_d2 : std_logic; signal Slave_MODF_strobe_cdc_from_spi_d3 : std_logic; signal receive_Data_cdc_from_spi_d1 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); signal receive_Data_cdc_from_spi_d2 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); signal dtr_underrun_cdc_from_spi_d1 : std_logic; signal dtr_underrun_cdc_from_spi_d2 : std_logic; signal transmit_Data_cdc_from_axi_d1 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); signal transmit_Data_cdc_from_axi_d2 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); signal spisel_pulse_cdc_from_spi_d1 : std_logic; signal spisel_pulse_cdc_from_spi_d2 : std_logic; signal spisel_pulse_cdc_from_spi_d3 : std_logic; signal SPICR_0_LOOP_cdc_from_axi_d1 : std_logic; signal SPICR_0_LOOP_cdc_from_axi_d2 : std_logic; signal SPICR_1_SPE_cdc_from_axi_d1 : std_logic; signal SPICR_1_SPE_cdc_from_axi_d2 : std_logic; signal SPICR_2_MST_N_SLV_cdc_from_axi_d1 : std_logic; signal SPICR_2_MST_N_SLV_cdc_from_axi_d2 : std_logic; signal SPICR_3_CPOL_cdc_from_axi_d1 : std_logic; signal SPICR_3_CPOL_cdc_from_axi_d2 : std_logic; signal SPICR_4_CPHA_cdc_from_axi_d1 : std_logic; signal SPICR_4_CPHA_cdc_from_axi_d2 : std_logic; signal SPICR_5_TXFIFO_cdc_from_axi_d1 : std_logic; signal SPICR_5_TXFIFO_cdc_from_axi_d2 : std_logic; signal SPICR_7_SS_cdc_from_axi_d1 : std_logic; signal SPICR_7_SS_cdc_from_axi_d2 : std_logic; signal SPICR_8_TR_INHIBIT_cdc_from_axi_d1 : std_logic; signal SPICR_8_TR_INHIBIT_cdc_from_axi_d2 : std_logic; signal SPICR_9_LSB_cdc_from_axi_d1 : std_logic; signal SPICR_9_LSB_cdc_from_axi_d2 : std_logic; signal SPICR_bits_7_8_cdc_from_axi_d1 : std_logic_vector(1 downto 0); signal SPICR_bits_7_8_cdc_from_axi_d2 : std_logic_vector(1 downto 0); signal SPICR_6_RXFIFO_RST_cdc_from_axi_d1 : std_logic; signal SPICR_6_RXFIFO_RST_cdc_from_axi_d2 : std_logic; signal Tx_FIFO_Empty_cdc_from_axi_d1 : std_logic; signal Tx_FIFO_Empty_cdc_from_axi_d2 : std_logic; signal Tx_FIFO_Empty_SPISR_cdc_from_spi_d1 : std_logic; signal Tx_FIFO_Empty_SPISR_cdc_from_spi_d2 : std_logic; signal drr_Overrun_int_cdc_from_spi_d1 : std_logic; signal drr_Overrun_int_cdc_from_spi_d2 : std_logic; signal drr_Overrun_int_cdc_from_spi_d3 : std_logic; signal drr_Overrun_int_cdc_from_spi_d4 : std_logic; signal SR_3_modf_cdc_from_axi_d1 : std_logic; signal SR_3_modf_cdc_from_axi_d2 : std_logic; signal SPISSR_cdc_from_axi_d1 : std_logic_vector(0 to (C_NUM_SS_BITS-1)); signal SPISSR_cdc_from_axi_d2 : std_logic_vector(0 to (C_NUM_SS_BITS-1)); signal spiXfer_done_cdc_from_spi_int_2 : std_logic; signal spiXfer_done_d1 : std_logic; signal spiXfer_done_d2, spiXfer_done_d3 : std_logic; signal spisel_pulse_cdc_from_spi_int_2 : std_logic; signal Tx_FIFO_Empty_cdc_from_axi_int_2 : std_logic; signal Tx_FIFO_Empty_cdc_from_axi_d3 : std_logic; signal drr_Overrun_int_cdc_from_spi_int_2 : std_logic; signal Slave_MODF_strobe_cdc_from_spi_int_2 : std_logic; signal modf_strobe_cdc_from_spi_int_2 : std_logic; -- signal declaration -- signal spisel_d1_reg_cdc_from_spi_d1 : std_logic; -- signal spisel_d1_reg_cdc_from_spi_d2 : std_logic; -- signal spiXfer_done_cdc_from_spi_d1 : std_logic; -- signal spiXfer_done_cdc_from_spi_d2 : std_logic; -- signal modf_strobe_cdc_from_spi_d1 : std_logic; -- signal modf_strobe_cdc_from_spi_d2 : std_logic; -- signal modf_strobe_cdc_from_spi_d3 : std_logic; -- signal Slave_MODF_strobe_cdc_from_spi_d1 : std_logic; -- signal Slave_MODF_strobe_cdc_from_spi_d2 : std_logic; -- signal Slave_MODF_strobe_cdc_from_spi_d3 : std_logic; -- signal receive_Data_cdc_from_spi_d1 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- signal receive_Data_cdc_from_spi_d2 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- signal dtr_underrun_cdc_from_spi_d1 : std_logic; -- signal dtr_underrun_cdc_from_spi_d2 : std_logic; -- signal transmit_Data_cdc_from_axi_d1 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- signal transmit_Data_cdc_from_axi_d2 : std_logic_vector(0 to (C_NUM_TRANSFER_BITS-1)); -- signal spisel_pulse_cdc_from_spi_d1 : std_logic; -- signal spisel_pulse_cdc_from_spi_d2 : std_logic; -- signal spisel_pulse_cdc_from_spi_d3 : std_logic; -- signal SPICR_0_LOOP_cdc_from_axi_d1 : std_logic; -- signal SPICR_0_LOOP_cdc_from_axi_d2 : std_logic; -- signal SPICR_1_SPE_cdc_from_axi_d1 : std_logic; -- signal SPICR_1_SPE_cdc_from_axi_d2 : std_logic; -- signal SPICR_2_MST_N_SLV_cdc_from_axi_d1 : std_logic; -- signal SPICR_2_MST_N_SLV_cdc_from_axi_d2 : std_logic; -- signal SPICR_3_CPOL_cdc_from_axi_d1 : std_logic; -- signal SPICR_3_CPOL_cdc_from_axi_d2 : std_logic; -- signal SPICR_4_CPHA_cdc_from_axi_d1 : std_logic; -- signal SPICR_4_CPHA_cdc_from_axi_d2 : std_logic; -- signal SPICR_5_TXFIFO_cdc_from_axi_d1 : std_logic; -- signal SPICR_5_TXFIFO_cdc_from_axi_d2 : std_logic; -- signal SPICR_7_SS_cdc_from_axi_d1 : std_logic; -- signal SPICR_7_SS_cdc_from_axi_d2 : std_logic; -- signal SPICR_8_TR_INHIBIT_cdc_from_axi_d1 : std_logic; -- signal SPICR_8_TR_INHIBIT_cdc_from_axi_d2 : std_logic; -- signal SPICR_9_LSB_cdc_from_axi_d1 : std_logic; -- signal SPICR_9_LSB_cdc_from_axi_d2 : std_logic; -- signal SPICR_bits_7_8_cdc_from_axi_d1 : std_logic_vector(1 downto 0); -- signal SPICR_bits_7_8_cdc_from_axi_d2 : std_logic_vector(1 downto 0); -- signal SPICR_6_RXFIFO_RST_cdc_from_axi_d1 : std_logic; -- signal SPICR_6_RXFIFO_RST_cdc_from_axi_d2 : std_logic; -- signal Tx_FIFO_Empty_cdc_from_axi_d1 : std_logic; -- signal Tx_FIFO_Empty_cdc_from_axi_d2 : std_logic; -- signal Tx_FIFO_Empty_SPISR_cdc_from_spi_d1 : std_logic; -- signal Tx_FIFO_Empty_SPISR_cdc_from_spi_d2 : std_logic; -- signal Tx_FIFO_Empty_SPISR_cdc_from_spi_d3 : std_logic; -- signal Tx_FIFO_Empty_SPISR_cdc_from_spi_d4 : std_logic; -- signal drr_Overrun_int_cdc_from_spi_d1 : std_logic; -- signal drr_Overrun_int_cdc_from_spi_d2 : std_logic; -- signal drr_Overrun_int_cdc_from_spi_d3 : std_logic; -- signal SR_3_modf_cdc_from_axi_d1 : std_logic; -- signal SR_3_modf_cdc_from_axi_d2 : std_logic; -- signal SPISSR_cdc_from_axi_d1 : std_logic_vector(0 to (C_NUM_SS_BITS-1)); -- signal SPISSR_cdc_from_axi_d2 : std_logic_vector(0 to (C_NUM_SS_BITS-1)); -- signal spiXfer_done_cdc_from_spi_int_2 : std_logic; -- signal spiXfer_done_d1 : std_logic; -- signal spiXfer_done_d2, spiXfer_done_d3 : std_logic; -- signal spisel_pulse_cdc_from_spi_int_2 : std_logic; -- signal Tx_FIFO_Empty_cdc_from_axi_int_2 : std_logic; -- signal Tx_FIFO_Empty_cdc_from_axi_d3 : std_logic; -- signal drr_Overrun_int_cdc_from_spi_int_2 : std_logic; -- signal Slave_MODF_strobe_cdc_from_spi_int_2 : std_logic; -- signal modf_strobe_cdc_from_spi_int_2 : std_logic; -- attribute ASYNC_REG : string; -- attribute ASYNC_REG of SPISEL_D1_REG_SYNC_SPI_2_AXI_1 : label is "TRUE"; -- attribute ASYNC_REG of SYNC_SPIXFER_DONE_SYNC_SPI_2_AXI_1 : label is "TRUE"; -- attribute ASYNC_REG of TX_FIFO_EMPTY_SYNC_AXI_2_SPI_1 : label is "TRUE"; -- attribute ASYNC_REG of SLAVE_MODF_STROBE_SYNC_SPI_cdc_to_AXI_1: label is "TRUE"; -- attribute ASYNC_REG of MODF_STROBE_SYNC_SPI_cdc_to_AXI_1 : label is "TRUE"; -- attribute ASYNC_REG of DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_9_LSB_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_8_TR_INHIBIT_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_7_SS_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_6_RXFIFO_RST_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_5_TXFIFO_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_4_CPHA_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_3_CPOL_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_2_MST_N_SLV_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_1_SPE_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SPICR_0_LOOP_AX2S_1 : label is "TRUE"; -- attribute ASYNC_REG of SR_3_MODF_AX2S_1 : label is "TRUE"; constant LOGIC_CHANGE : integer range 0 to 1 := 1; constant MTBF_STAGES_AXI2S : integer range 0 to 6 := 3 ; constant MTBF_STAGES_S2AXI : integer range 0 to 6 := 4 ; ----- begin ----- -- SPI_AXI_EQUAL_GEN: AXI and SPI domain clocks are same --------------------- --SPI_AXI_EQUAL_GEN: if C_AXI_SPI_CLK_EQ_DIFF = 0 generate ----- --begin ----- LOGIC_GENERATION_FDR : if (Async_Clk =0) generate TX_FIFO_EMPTY_FOR_SPISR_SYNC_SPI_2_AXI: process(Bus2IP_Clk) is begin ----- if(Bus2IP_Clk'event and Bus2IP_Clk = '1') then if(Soft_Reset_op = '1')then Tx_FIFO_Empty_SPISR_cdc_from_spi_d1 <= '1'; Tx_FIFO_Empty_SPISR_cdc_from_spi_d2 <= '1'; else Tx_FIFO_Empty_SPISR_cdc_from_spi_d1 <= Tx_FIFO_Empty_SPISR_cdc_from_spi; Tx_FIFO_Empty_SPISR_cdc_from_spi_d2 <= Tx_FIFO_Empty_SPISR_cdc_from_spi_d1; end if; end if; end process TX_FIFO_EMPTY_FOR_SPISR_SYNC_SPI_2_AXI; ----------------------------------------- Tx_FIFO_Empty_SPISR_cdc_to_axi <= Tx_FIFO_Empty_SPISR_cdc_from_spi_d2; ------------------------------------------------- TX_FIFO_EMPTY_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then Tx_FIFO_Empty_cdc_from_axi_int_2 <= '1'; else Tx_FIFO_Empty_cdc_from_axi_int_2 <= Tx_FIFO_Empty_cdc_from_axi xor Tx_FIFO_Empty_cdc_from_axi_int_2; end if; end if; end process TX_FIFO_EMPTY_STRETCH_1; TX_FIFO_EMPTY_SYNC_AXI_2_SPI_1: component FDR generic map(INIT => '1' )port map ( Q => Tx_FIFO_Empty_cdc_from_axi_d1, C => EXT_SPI_CLK, D => Tx_FIFO_Empty_cdc_from_axi_int_2, R => Rst_from_axi_cdc_to_spi ); TX_FIFO_EMPTY_SYNC_AXI_2_SPI_2: component FDR generic map(INIT => '1' )port map ( Q => Tx_FIFO_Empty_cdc_from_axi_d2, C => EXT_SPI_CLK, D => Tx_FIFO_Empty_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); -- Tx_FIFO_Empty_cdc_to_spi <= Tx_FIFO_Empty_cdc_from_axi_d2 xor Tx_FIFO_Empty_cdc_from_axi_d1; TX_FIFO_EMPTY_SYNC_AXI_2_SPI_3: component FDR generic map(INIT => '1' )port map ( Q => Tx_FIFO_Empty_cdc_from_axi_d3, C => EXT_SPI_CLK, D => Tx_FIFO_Empty_cdc_from_axi_d2, R => Rst_from_axi_cdc_to_spi ); Tx_FIFO_Empty_cdc_to_spi <= Tx_FIFO_Empty_cdc_from_axi_d2 xor Tx_FIFO_Empty_cdc_from_axi_d3; ------------------------------------------------- SPISEL_D1_REG_SYNC_SPI_2_AXI_1: component FDR port map ( Q => spisel_d1_reg_cdc_from_spi_d1, C => Bus2IP_Clk, D => spisel_d1_reg_cdc_from_spi, R => Soft_Reset_op ); SPISEL_D1_REG_SYNC_SPI_2_AXI_2: component FDR port map ( Q => spisel_d1_reg_cdc_from_spi_d2, C => Bus2IP_Clk, D => spisel_d1_reg_cdc_from_spi_d1, R => Soft_Reset_op ); spisel_d1_reg_cdc_to_axi <= spisel_d1_reg_cdc_from_spi_d2; SPISEL_PULSE_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then spisel_pulse_cdc_from_spi_int_2 <= '0'; else spisel_pulse_cdc_from_spi_int_2 <= spisel_pulse_cdc_from_spi xor spisel_pulse_cdc_from_spi_int_2; end if; end if; end process SPISEL_PULSE_STRETCH_1; SPISEL_PULSE_SPI_2_AXI_1: component FDR port map ( Q => spisel_pulse_cdc_from_spi_d1, C => Bus2IP_Clk, D => spisel_pulse_cdc_from_spi_int_2, R => Soft_Reset_op ); SPISEL_PULSE_SPI_2_AXI_2: component FDR port map ( Q => spisel_pulse_cdc_from_spi_d2, C => Bus2IP_Clk, D => spisel_pulse_cdc_from_spi_d1, R => Soft_Reset_op ); SPISEL_PULSE_SPI_2_AXI_3: component FDR port map ( Q => spisel_pulse_cdc_from_spi_d3, C => Bus2IP_Clk, D => spisel_pulse_cdc_from_spi_d2, R => Soft_Reset_op ); spisel_pulse_cdc_to_axi <= spisel_pulse_cdc_from_spi_d2 xor spisel_pulse_cdc_from_spi_d3; --------------------------------------------- SPI_XFER_DONE_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then spiXfer_done_cdc_from_spi_int_2 <= '0'; else spiXfer_done_cdc_from_spi_int_2 <= spiXfer_done_cdc_from_spi xor spiXfer_done_cdc_from_spi_int_2; end if; end if; end process SPI_XFER_DONE_STRETCH_1; SYNC_SPIXFER_DONE_SYNC_SPI_2_AXI_1: component FDR generic map(INIT => '0' )port map ( Q => spiXfer_done_d1, C => Bus2IP_Clk, D => spiXfer_done_cdc_from_spi_int_2, R => Soft_Reset_op ); SYNC_SPIXFER_DONE_SYNC_SPI_2_AXI_2: component FDR generic map(INIT => '0' )port map ( Q => spiXfer_done_d2, C => Bus2IP_Clk, D => spiXfer_done_d1, R => Soft_Reset_op ); SYNC_SPIXFER_DONE_SYNC_SPI_2_AXI_3: component FDR generic map(INIT => '0' )port map ( Q => spiXfer_done_d3, C => Bus2IP_Clk, D => spiXfer_done_d2, R => Soft_Reset_op ); spiXfer_done_cdc_to_axi <= spiXfer_done_d2 xor spiXfer_done_d3; --spiXfer_done_cdc_from_spi_d2; ----------------------------------------------- MODF_STROBE_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then modf_strobe_cdc_from_spi_int_2 <= '0'; else modf_strobe_cdc_from_spi_int_2 <= modf_strobe_cdc_from_spi xor modf_strobe_cdc_from_spi_int_2; end if; end if; end process MODF_STROBE_STRETCH_1; MODF_STROBE_SYNC_SPI_cdc_to_AXI_1: component FDR generic map(INIT => '0' )port map ( Q => modf_strobe_cdc_from_spi_d1, C => Bus2IP_Clk, D => modf_strobe_cdc_from_spi_int_2, R => Soft_Reset_op ); MODF_STROBE_SYNC_SPI_cdc_to_AXI_2: component FDR generic map(INIT => '0' )port map ( Q => modf_strobe_cdc_from_spi_d2, C => Bus2IP_Clk, D => modf_strobe_cdc_from_spi_d1, R => Soft_Reset_op ); MODF_STROBE_SYNC_SPI_cdc_to_AXI_3: component FDR generic map(INIT => '0' )port map ( Q => modf_strobe_cdc_from_spi_d3, C => Bus2IP_Clk, D => modf_strobe_cdc_from_spi_d2, R => Soft_Reset_op ); modf_strobe_cdc_to_axi <= modf_strobe_cdc_from_spi_d2 xor modf_strobe_cdc_from_spi_d3; --spiXfer_done_cdc_from_spi_d2; --------------------------------------------------------- SLAVE_MODF_STROBE_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then Slave_MODF_strobe_cdc_from_spi_int_2 <= '0'; else Slave_MODF_strobe_cdc_from_spi_int_2 <= Slave_MODF_strobe_cdc_from_spi xor Slave_MODF_strobe_cdc_from_spi_int_2; end if; end if; end process SLAVE_MODF_STROBE_STRETCH_1; SLAVE_MODF_STROBE_SYNC_SPI_cdc_to_AXI_1: component FDR generic map(INIT => '0' )port map ( Q => Slave_MODF_strobe_cdc_from_spi_d1, C => Bus2IP_Clk, D => Slave_MODF_strobe_cdc_from_spi_int_2, R => Soft_Reset_op ); SLAVE_MODF_STROBE_SYNC_SPI_cdc_to_AXI_2: component FDR generic map(INIT => '0' )port map ( Q => Slave_MODF_strobe_cdc_from_spi_d2, C => Bus2IP_Clk, D => Slave_MODF_strobe_cdc_from_spi_d1, R => Soft_Reset_op ); SLAVE_MODF_STROBE_SYNC_SPI_cdc_to_AXI_3: component FDR generic map(INIT => '0' )port map ( Q => Slave_MODF_strobe_cdc_from_spi_d3, C => Bus2IP_Clk, D => Slave_MODF_strobe_cdc_from_spi_d2, R => Soft_Reset_op ); Slave_MODF_strobe_cdc_to_axi <= Slave_MODF_strobe_cdc_from_spi_d2 xor Slave_MODF_strobe_cdc_from_spi_d3; --spiXfer_done_cdc_from_spi_d2; ----------------------------------------------- --------------------------------------------------------- RECEIVE_DATA_SYNC_SPI_cdc_to_AXI_P: process(Bus2IP_Clk) is ------------------------- begin ----- if(Bus2IP_Clk'event and Bus2IP_Clk = '1')then receive_Data_cdc_from_spi_d1 <= receive_Data_cdc_from_spi; receive_Data_cdc_from_spi_d2 <= receive_Data_cdc_from_spi_d1; end if; end process RECEIVE_DATA_SYNC_SPI_cdc_to_AXI_P; ------------------------------------------- receive_Data_cdc_to_axi <= receive_Data_cdc_from_spi_d2; ----------------------------------------------- DRR_OVERRUN_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then drr_Overrun_int_cdc_from_spi_int_2 <= '0'; else drr_Overrun_int_cdc_from_spi_int_2 <= drr_Overrun_int_cdc_from_spi xor drr_Overrun_int_cdc_from_spi_int_2; end if; end if; end process DRR_OVERRUN_STRETCH_1; DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_1: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d1, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_int_2, R => Soft_Reset_op ); DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_2: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d2, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_d1, R => Soft_Reset_op ); DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_3: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d3, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_d2, R => Soft_Reset_op ); drr_Overrun_int_cdc_to_axi <= drr_Overrun_int_cdc_from_spi_d2 xor drr_Overrun_int_cdc_from_spi_d3; --spiXfer_done_cdc_from_spi_d2; ----------------------------------------------- DTR_UNDERRUN_SYNC_SPI_2_AXI_1: component FDR generic map(INIT => '0' )port map ( Q => dtr_underrun_cdc_from_spi_d1, C => Bus2IP_Clk, D => dtr_underrun_cdc_from_spi, R => Soft_Reset_op ); DTR_UNDERRUN_SYNC_SPI_2_AXI_2: component FDR generic map(INIT => '0' )port map ( Q => dtr_underrun_cdc_from_spi_d2, C => Bus2IP_Clk, D => dtr_underrun_cdc_from_spi_d1, R => Soft_Reset_op ); dtr_underrun_cdc_to_axi <= dtr_underrun_cdc_from_spi_d2; ----------------------------------------------- TR_DATA_SYNC_AX2SP_GEN: for i in 0 to (C_NUM_TRANSFER_BITS-1) generate attribute ASYNC_REG : string; attribute ASYNC_REG of TR_DATA_SYNC_AX2SP_1: label is "TRUE"; ----- begin ----- TR_DATA_SYNC_AX2SP_1: component FDR generic map(INIT => '0' )port map ( Q => transmit_Data_cdc_from_axi_d1(i), C => EXT_SPI_CLK, D => transmit_Data_cdc_from_axi(i), R => Rst_from_axi_cdc_to_spi ); TR_DATA_SYNC_AX2SP_2: component FDR generic map(INIT => '0' )port map ( Q => transmit_Data_cdc_from_axi_d2(i), C => EXT_SPI_CLK, D => transmit_Data_cdc_from_axi_d1(i), R => Rst_from_axi_cdc_to_spi ); end generate TR_DATA_SYNC_AX2SP_GEN; transmit_Data_cdc_to_spi <= transmit_Data_cdc_from_axi_d2; ----------------------------------------------- SPICR_0_LOOP_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_0_LOOP_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_0_LOOP_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_0_LOOP_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_0_LOOP_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_0_LOOP_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_0_LOOP_cdc_to_spi <= SPICR_0_LOOP_cdc_from_axi_d2; ----------------------------------------------- SPICR_1_SPE_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_1_SPE_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_1_SPE_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_1_SPE_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_1_SPE_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_1_SPE_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_1_SPE_cdc_to_spi <= SPICR_1_SPE_cdc_from_axi_d2; --------------------------------------------- SPICR_2_MST_N_SLV_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_2_MST_N_SLV_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_2_MST_N_SLV_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_2_MST_N_SLV_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_2_MST_N_SLV_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_2_MST_N_SLV_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_2_MST_N_SLV_cdc_to_spi <= SPICR_2_MST_N_SLV_cdc_from_axi_d2; --------------------------------------------------------- SPICR_3_CPOL_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_3_CPOL_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_3_CPOL_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_3_CPOL_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_3_CPOL_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_3_CPOL_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_3_CPOL_cdc_to_spi <= SPICR_3_CPOL_cdc_from_axi_d2; ----------------------------------------------- SPICR_4_CPHA_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_4_CPHA_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_4_CPHA_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_4_CPHA_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_4_CPHA_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_4_CPHA_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_4_CPHA_cdc_to_spi <= SPICR_4_CPHA_cdc_from_axi_d2; ----------------------------------------------- SPICR_5_TXFIFO_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_5_TXFIFO_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_5_TXFIFO_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_5_TXFIFO_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_5_TXFIFO_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_5_TXFIFO_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_5_TXFIFO_cdc_to_spi <= SPICR_5_TXFIFO_cdc_from_axi_d2; --------------------------------------------------- SPICR_6_RXFIFO_RST_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_6_RXFIFO_RST_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_6_RXFIFO_RST_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_6_RXFIFO_RST_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_6_RXFIFO_RST_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_6_RXFIFO_RST_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_6_RXFIFO_RST_cdc_to_spi <= SPICR_6_RXFIFO_RST_cdc_from_axi_d2; ----------------------------------------------------------- SPICR_7_SS_AX2S_1: component FDR generic map(INIT => '1' )port map ( Q => SPICR_7_SS_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_7_SS_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_7_SS_AX2S_2: component FDR generic map(INIT => '1' )port map ( Q => SPICR_7_SS_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_7_SS_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_7_SS_cdc_to_spi <= SPICR_7_SS_cdc_from_axi_d2; ------------------------------------------- SPICR_8_TR_INHIBIT_AX2S_1: component FDR generic map(INIT => '1' )port map ( Q => SPICR_8_TR_INHIBIT_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_8_TR_INHIBIT_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_8_TR_INHIBIT_AX2S_2: component FDR generic map(INIT => '1' )port map ( Q => SPICR_8_TR_INHIBIT_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_8_TR_INHIBIT_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_8_TR_INHIBIT_cdc_to_spi <= SPICR_8_TR_INHIBIT_cdc_from_axi_d2; ----------------------------------------------------------- SPICR_9_LSB_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_9_LSB_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SPICR_9_LSB_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SPICR_9_LSB_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_9_LSB_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SPICR_9_LSB_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SPICR_9_LSB_cdc_to_spi <= SPICR_9_LSB_cdc_from_axi_d2; --------------------------------------------- SPICR_BITS_7_8_SYNC_GEN: for i in 1 downto 0 generate attribute ASYNC_REG : string; attribute ASYNC_REG of SPICR_BITS_7_8_AX2S_1 : label is "TRUE"; begin ----- SPICR_BITS_7_8_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SPICR_bits_7_8_cdc_from_axi_d1(i), C => EXT_SPI_CLK, D => SPICR_bits_7_8_cdc_from_axi(i), R => Rst_from_axi_cdc_to_spi ); SPICR_BITS_7_8_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SPICR_bits_7_8_cdc_from_axi_d2(i), C => EXT_SPI_CLK, D => SPICR_bits_7_8_cdc_from_axi_d1(i), R => Rst_from_axi_cdc_to_spi ); end generate SPICR_BITS_7_8_SYNC_GEN; ------------------------------------- SPICR_bits_7_8_cdc_to_spi <= SPICR_bits_7_8_cdc_from_axi_d2; --------------------------------------------------- SR_3_MODF_AX2S_1: component FDR generic map(INIT => '0' )port map ( Q => SR_3_modf_cdc_from_axi_d1, C => EXT_SPI_CLK, D => SR_3_modf_cdc_from_axi, R => Rst_from_axi_cdc_to_spi ); SR_3_MODF_AX2S_2: component FDR generic map(INIT => '0' )port map ( Q => SR_3_modf_cdc_from_axi_d2, C => EXT_SPI_CLK, D => SR_3_modf_cdc_from_axi_d1, R => Rst_from_axi_cdc_to_spi ); SR_3_modf_cdc_to_spi <= SR_3_modf_cdc_from_axi_d2; ----------------------------------------- SPISSR_SYNC_GEN: for i in 0 to C_NUM_SS_BITS-1 generate attribute ASYNC_REG : string; attribute ASYNC_REG of SPISSR_AX2S_1 : label is "TRUE"; ----- begin ----- SPISSR_AX2S_1: component FDR generic map(INIT => '1' )port map ( Q => SPISSR_cdc_from_axi_d1(i), C => EXT_SPI_CLK, D => SPISSR_cdc_from_axi(i), R => Rst_from_axi_cdc_to_spi ); SPISSR_SYNC_AXI_2_SPI_2: component FDR generic map(INIT => '1' )port map ( Q => SPISSR_cdc_from_axi_d2(i), C => EXT_SPI_CLK, D => SPISSR_cdc_from_axi_d1(i), R => Rst_from_axi_cdc_to_spi ); end generate SPISSR_SYNC_GEN; SPISSR_cdc_to_spi <= SPISSR_cdc_from_axi_d2; ----------------------------------- end generate LOGIC_GENERATION_FDR ; --============================================================================================================ LOGIC_GENERATION_CDC : if (Async_Clk =1) generate --============================================================================================================ -- Tx_FIFO_Empty_cdc_from_axi <= Tx_FIFO_Empty_cdc_from_axi; -- Tx_FIFO_Empty_cdc_to_spi <= Tx_FIFO_Empty_cdc_cdc_to_spi; -- Tx_FIFO_Empty_SPISR_cdc_from_spi <= Tx_FIFO_Empty_SPISR_cdc_from_spi; -- Tx_FIFO_Empty_SPISR_cdc_to_axi <= Tx_FIFO_Empty_SPISR_cdc_cdc_to_axi; -- spisel_d1_reg_cdc_from_spi <= spisel_d1_reg_cdc_from_spi; -- spisel_d1_reg_cdc_to_axi <= spisel_d1_reg_cdc_cdc_to_axi; -- spisel_pulse_cdc_from_spi <= spisel_pulse_cdc_from_spi; -- spisel_pulse_cdc_to_axi <= spisel_pulse_cdc_cdc_to_axi; -- spiXfer_done_cdc_from_spi <= spiXfer_done_cdc_from_spi; -- spiXfer_done_cdc_to_axi <= spiXfer_done_cdc_cdc_to_axi; -- modf_strobe_cdc_from_spi <= modf_strobe_cdc_from_spi; -- modf_strobe_cdc_to_axi <= modf_strobe_cdc_cdc_to_axi; -- Slave_MODF_strobe_cdc_from_spi <= Slave_MODF_strobe_cdc_from_spi; -- Slave_MODF_strobe_cdc_to_axi <= Slave_MODF_strobe_cdc_cdc_to_axi; -- receive_Data_cdc_from_spi <= receive_Data_cdc_from_spi; -- receive_Data_cdc_to_axi <= receive_Data_cdc_cdc_to_axi; -- drr_Overrun_int_cdc_from_spi <= drr_Overrun_int_cdc_from_spi; -- drr_Overrun_int_cdc_to_axi <= drr_Overrun_int_cdc_cdc_to_axi; -- dtr_underrun_cdc_from_spi <= dtr_underrun_cdc_from_spi; -- dtr_underrun_cdc_to_axi <= dtr_underrun_cdc_cdc_to_axi; -- transmit_Data_cdc_from_axi <= transmit_Data_cdc_from_axi; -- transmit_Data_cdc_to_spi <= transmit_Data_cdc_cdc_to_spi; -- SPICR_0_LOOP_cdc_from_axi <= SPICR_0_LOOP_cdc_from_axi; -- SPICR_0_LOOP_cdc_to_spi <= SPICR_0_LOOP_cdc_cdc_to_spi; -- SPICR_1_SPE_cdc_from_axi <= SPICR_1_SPE_cdc_from_axi; -- SPICR_1_SPE_cdc_to_spi <= SPICR_1_SPE_cdc_cdc_to_spi; -- SPICR_2_MST_N_SLV_cdc_from_axi <= SPICR_2_MST_N_SLV_cdc_from_axi; -- SPICR_2_MST_N_SLV_cdc_to_spi <= SPICR_2_MST_N_SLV_cdc_cdc_to_spi; -- SPICR_3_CPOL_cdc_from_axi <= SPICR_3_CPOL_cdc_from_axi; -- SPICR_3_CPOL_cdc_to_spi <= SPICR_3_CPOL_cdc_cdc_to_spi; -- SPICR_4_CPHA_cdc_from_axi <= SPICR_4_CPHA_cdc_from_axi; -- SPICR_4_CPHA_cdc_to_spi <= SPICR_4_CPHA_cdc_cdc_to_spi; -- SPICR_5_TXFIFO_cdc_from_axi <= SPICR_5_TXFIFO_cdc_from_axi; -- SPICR_5_TXFIFO_cdc_to_spi <= SPICR_5_TXFIFO_cdc_cdc_to_spi; -- SPICR_6_RXFIFO_RST_cdc_from_axi <= SPICR_6_RXFIFO_RST_cdc_from_axi; -- SPICR_6_RXFIFO_RST_cdc_to_spi <= SPICR_6_RXFIFO_RST_cdc_cdc_to_spi; -- SPICR_7_SS_cdc_from_axi <= SPICR_7_SS_cdc_from_axi; -- SPICR_7_SS_cdc_to_spi <= SPICR_7_SS_cdc_cdc_to_spi; -- SPICR_8_TR_INHIBIT_cdc_from_axi <= SPICR_8_TR_INHIBIT_cdc_from_axi; -- SPICR_8_TR_INHIBIT_cdc_to_spi <= SPICR_8_TR_INHIBIT_cdc_cdc_to_spi; -- SPICR_9_LSB_cdc_from_axi <= SPICR_9_LSB_cdc_from_axi; -- SPICR_9_LSB_cdc_to_spi <= SPICR_9_LSB_cdc_cdc_to_spi; -- SPICR_bits_7_8_cdc_from_axi <= SPICR_bits_7_8_cdc_from_axi; -- SPICR_bits_7_8_cdc_to_spi <= SPICR_bits_7_8_cdc_cdc_to_spi; -- SR_3_modf_cdc_from_axi <= SR_3_modf_cdc_from_axi; -- SR_3_modf_cdc_to_spi <= SR_3_modf_cdc_cdc_to_spi; -- SPISSR_cdc_from_axi <= SPISSR_cdc_from_axi; -- SPISSR_cdc_to_spi <= SPISSR_cdc_cdc_to_spi; --============================================================================================================ -- all the signals pass through FF with reset before CDC_SYNC module to initialise the value of the signal -- at its reset state. As many signals coming from bram have initial value of XX. TX_FIFO_EMPTY_FOR_SPISR_SYNC_SPI_2_AXI_CDC : entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => Tx_FIFO_Empty_SPISR_cdc_from_spi , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0') , scndry_resetn => Soft_Reset_op , scndry_out => Tx_FIFO_Empty_SPISR_cdc_to_axi ); ---------------------------------------------------------------------------------------------------------- TX_FIFO_EMPTY_STRETCH_1: process(Bus2IP_Clk)is begin if(Bus2IP_Clk'event and Bus2IP_Clk= '1') then if(Soft_Reset_op = '1') then Tx_FIFO_Empty_cdc_from_axi_int_2 <= '1'; else Tx_FIFO_Empty_cdc_from_axi_int_2 <= Tx_FIFO_Empty_cdc_from_axi xor Tx_FIFO_Empty_cdc_from_axi_int_2; end if; end if; end process TX_FIFO_EMPTY_STRETCH_1; TX_FIFO_EMPTY_SYNC_AXI_2_SPI_CDC : entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1, -- 2 is ack based level sync C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => Tx_FIFO_Empty_cdc_from_axi_int_2,--Tx_FIFO_Empty_cdc_from_axi_d1 , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => Tx_FIFO_Empty_cdc_from_axi_d2--Tx_FIFO_Empty_cdc_to_spi ); TX_FIFO_EMPTY_STRETCH_1_CDC: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then Tx_FIFO_Empty_cdc_from_axi_d3 <= Tx_FIFO_Empty_cdc_from_axi_d2; end if; end process TX_FIFO_EMPTY_STRETCH_1_CDC; Tx_FIFO_Empty_cdc_to_spi <= Tx_FIFO_Empty_cdc_from_axi_d2 xor Tx_FIFO_Empty_cdc_from_axi_d3; ---------------------------------------------------------------------------------------------------------- SPISEL_D1_REG_SYNC_SPI_2_AXI_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => spisel_d1_reg_cdc_from_spi , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0' ), scndry_resetn => Soft_Reset_op , scndry_out => spisel_d1_reg_cdc_to_axi ); ----------------------------------------------------------------------------------------------------------- SPISEL_PULSE_STRETCH_1_CDC: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then spisel_pulse_cdc_from_spi_int_2 <= '0'; --spisel_pulse_cdc_from_spi_d1 <= '0'; else spisel_pulse_cdc_from_spi_int_2 <= spisel_pulse_cdc_from_spi xor spisel_pulse_cdc_from_spi_int_2; --spisel_pulse_cdc_from_spi_d1 <= spisel_pulse_cdc_from_spi_int_2; end if; end if; end process SPISEL_PULSE_STRETCH_1_CDC; SPISEL_PULSE_SPI_2_AXI_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 2 is ack based level sync C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => spisel_pulse_cdc_from_spi_int_2 , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0' ), scndry_resetn => Soft_Reset_op , scndry_out => spisel_pulse_cdc_from_spi_d2 ); SPISEL_PULSE_STRETCH_1: process(Bus2IP_Clk)is begin if(Bus2IP_Clk'event and Bus2IP_Clk = '1') then spisel_pulse_cdc_from_spi_d3 <= spisel_pulse_cdc_from_spi_d2; end if; end process SPISEL_PULSE_STRETCH_1; spisel_pulse_cdc_to_axi <= spisel_pulse_cdc_from_spi_d2 xor spisel_pulse_cdc_from_spi_d3; -------------------------------------------------------------------------------------------------------------- SPI_XFER_DONE_STRETCH_1_CDC: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then spiXfer_done_cdc_from_spi_int_2 <= '0'; -- spiXfer_done_d2 <= '0'; else spiXfer_done_cdc_from_spi_int_2 <= spiXfer_done_cdc_from_spi xor spiXfer_done_cdc_from_spi_int_2; -- spiXfer_done_d2 <= spiXfer_done_cdc_from_spi_int_2; end if; end if; end process SPI_XFER_DONE_STRETCH_1_CDC; SYNC_SPIXFER_DONE_SYNC_SPI_2_AXI_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 2 is ack based level sync C_RESET_STATE => 0 ,-- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => spiXfer_done_cdc_from_spi_int_2,--spiXfer_done_d2 , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0' ), scndry_resetn => Soft_Reset_op , scndry_out => spiXfer_done_d2--spiXfer_done_cdc_to_axi ); SPI_XFER_DONE_STRETCH_1: process(Bus2IP_Clk)is begin if(Bus2IP_Clk'event and Bus2IP_Clk= '1') then spiXfer_done_d3 <= spiXfer_done_d2 ; end if; end process SPI_XFER_DONE_STRETCH_1; spiXfer_done_cdc_to_axi <= spiXfer_done_d2 xor spiXfer_done_d3; -------------------------------------------------------------------------------------------------------------- MODF_STROBE_STRETCH_1_CDC: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then modf_strobe_cdc_from_spi_int_2 <= '0'; --modf_strobe_cdc_from_spi_d1 <= '0'; else modf_strobe_cdc_from_spi_int_2 <= modf_strobe_cdc_from_spi xor modf_strobe_cdc_from_spi_int_2; -- modf_strobe_cdc_from_spi_d1 <= modf_strobe_cdc_from_spi_int_2; end if; end if; end process MODF_STROBE_STRETCH_1_CDC; MODF_STROBE_SYNC_SPI_cdc_to_AXI_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 2 is ack based level sync C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => modf_strobe_cdc_from_spi_int_2,--modf_strobe_cdc_from_spi_d1 , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0' ), scndry_resetn => Soft_Reset_op , scndry_out => modf_strobe_cdc_from_spi_d2--modf_strobe_cdc_to_axi ); MODF_STROBE_STRETCH_1: process(Bus2IP_Clk)is begin if(Bus2IP_Clk'event and Bus2IP_Clk= '1') then modf_strobe_cdc_from_spi_d3 <= modf_strobe_cdc_from_spi_d2 ; end if; end process MODF_STROBE_STRETCH_1; modf_strobe_cdc_to_axi <= modf_strobe_cdc_from_spi_d2 xor modf_strobe_cdc_from_spi_d3; ---------------------------------------------------------------------------------------------------------------- SLAVE_MODF_STROBE_STRETCH_1_CDC: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then Slave_MODF_strobe_cdc_from_spi_int_2 <= '0'; -- Slave_MODF_strobe_cdc_from_spi_d1 <= '0'; else Slave_MODF_strobe_cdc_from_spi_int_2 <= Slave_MODF_strobe_cdc_from_spi xor Slave_MODF_strobe_cdc_from_spi_int_2; -- Slave_MODF_strobe_cdc_from_spi_d1 <= Slave_MODF_strobe_cdc_from_spi_int_2; end if; end if; end process SLAVE_MODF_STROBE_STRETCH_1_CDC; SLAVE_MODF_STROBE_SYNC_SPI_cdc_to_AXI_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 2 is ack based level sync C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => Slave_MODF_strobe_cdc_from_spi_int_2 , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0' ), scndry_resetn => Soft_Reset_op , scndry_out => Slave_MODF_strobe_cdc_from_spi_d2 ); SLAVE_MODF_STROBE_STRETCH_1: process(Bus2IP_Clk)is begin if(Bus2IP_Clk'event and Bus2IP_Clk= '1') then Slave_MODF_strobe_cdc_from_spi_d3 <= Slave_MODF_strobe_cdc_from_spi_d2 ; end if; end process SLAVE_MODF_STROBE_STRETCH_1; Slave_MODF_strobe_cdc_to_axi <= Slave_MODF_strobe_cdc_from_spi_d2 xor Slave_MODF_strobe_cdc_from_spi_d3; ----------------------------------------------------------------------------------------------------- RECEIVE_DATA_SYNC_SPI_cdc_to_AXI_P_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 0 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => C_NUM_TRANSFER_BITS , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK, prmry_resetn => Rst_from_axi_cdc_to_spi, prmry_vect_in => receive_Data_cdc_from_spi, scndry_aclk => Bus2IP_Clk, prmry_in => '0', scndry_resetn => Soft_Reset_op, scndry_vect_out => receive_Data_cdc_to_axi ); ------------------------------------------------------------------------------------------------------- DRR_OVERRUN_STRETCH_1: process(EXT_SPI_CLK)is begin if(EXT_SPI_CLK'event and EXT_SPI_CLK= '1') then if(Rst_from_axi_cdc_to_spi = '1') then drr_Overrun_int_cdc_from_spi_int_2 <= '0'; else drr_Overrun_int_cdc_from_spi_int_2 <= drr_Overrun_int_cdc_from_spi xor drr_Overrun_int_cdc_from_spi_int_2; end if; end if; end process DRR_OVERRUN_STRETCH_1; DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_1: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d1, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_int_2, R => Soft_Reset_op ); DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_2: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d2, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_d1, R => Soft_Reset_op ); DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_3: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d3, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_d2, R => Soft_Reset_op ); DRR_OVERRUN_SYNC_SPI_cdc_to_AXI_4: component FDR generic map(INIT => '0' )port map ( Q => drr_Overrun_int_cdc_from_spi_d4, C => Bus2IP_Clk, D => drr_Overrun_int_cdc_from_spi_d3, R => Soft_Reset_op ); drr_Overrun_int_cdc_to_axi <= drr_Overrun_int_cdc_from_spi_d4 xor drr_Overrun_int_cdc_from_spi_d3; ------------------------------------------------------------------------------------------------------- DTR_UNDERRUN_SYNC_SPI_2_AXI_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 ,-- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_S2AXI ) port map ( prmry_aclk => EXT_SPI_CLK , prmry_resetn => Rst_from_axi_cdc_to_spi , prmry_in => dtr_underrun_cdc_from_spi , scndry_aclk => Bus2IP_Clk , prmry_vect_in => (others => '0' ), scndry_resetn => Soft_Reset_op , scndry_out => dtr_underrun_cdc_to_axi ); ------------------------------------------------------------------------------------------------------- SPICR_0_LOOP_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_0_LOOP_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_0_LOOP_cdc_to_spi ); ------------------------------------------------------------------------------------------------------ SPICR_1_SPE_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_1_SPE_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_1_SPE_cdc_to_spi ); ---------------------------------------------------------------------------------------------------- SPICR_2_MST_N_SLV_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_2_MST_N_SLV_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_2_MST_N_SLV_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_3_CPOL_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_3_CPOL_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_3_CPOL_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_4_CPHA_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_4_CPHA_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_4_CPHA_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_5_TXFIFO_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_5_TXFIFO_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_5_TXFIFO_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_6_RXFIFO_RST_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_6_RXFIFO_RST_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_6_RXFIFO_RST_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_7_SS_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_7_SS_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_7_SS_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_8_TR_INHIBIT_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_8_TR_INHIBIT_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_8_TR_INHIBIT_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SPICR_9_LSB_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SPICR_9_LSB_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SPICR_9_LSB_cdc_to_spi ); ----------------------------------------------------------------------------------------------------- TR_DATA_SYNC_AX2SP_GEN_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 0 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => C_NUM_TRANSFER_BITS , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk, prmry_resetn => Soft_Reset_op, prmry_vect_in => transmit_Data_cdc_from_axi, scndry_aclk => EXT_SPI_CLK, prmry_in => '0' , scndry_resetn => Rst_from_axi_cdc_to_spi, scndry_vect_out => transmit_Data_cdc_to_spi ); -------------------------------------------------------------------------------------------------- SR_3_MODF_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk , prmry_resetn => Soft_Reset_op , prmry_in => SR_3_modf_cdc_from_axi , scndry_aclk => EXT_SPI_CLK , prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi , scndry_out => SR_3_modf_cdc_to_spi ); ----------------------------------------------------------------------------------------------------- SPISSR_SYNC_GEN_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 0 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => C_NUM_SS_BITS , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk, prmry_resetn => Soft_Reset_op, prmry_vect_in => SPISSR_cdc_from_axi, scndry_aclk => EXT_SPI_CLK, prmry_in => '0' , scndry_resetn => Rst_from_axi_cdc_to_spi, scndry_vect_out => SPISSR_cdc_to_spi ); --------------------------------------------- SPICR_BITS_7_8_SYNC_GEN_CDC: for i in 1 downto 0 generate attribute ASYNC_REG : string; attribute ASYNC_REG of SPICR_BITS_7_8_AX2S_1_CDC : label is "TRUE"; begin SPICR_BITS_7_8_AX2S_1_CDC: entity lib_cdc_v1_0.cdc_sync generic map ( C_CDC_TYPE => 1 , -- 1 is level synch C_RESET_STATE => 0 , -- no reset to be used in synchronisers C_SINGLE_BIT => 1 , C_FLOP_INPUT => 0 , C_VECTOR_WIDTH => 1 , C_MTBF_STAGES => MTBF_STAGES_AXI2S ) port map ( prmry_aclk => Bus2IP_Clk, prmry_resetn => Soft_Reset_op, prmry_in => SPICR_bits_7_8_cdc_from_axi(i), scndry_aclk => EXT_SPI_CLK, prmry_vect_in => (others => '0' ), scndry_resetn => Rst_from_axi_cdc_to_spi, scndry_out => SPICR_bits_7_8_cdc_from_axi_d2(i) ); ----------------------------------------- end generate SPICR_BITS_7_8_SYNC_GEN_CDC; SPICR_bits_7_8_cdc_to_spi <= SPICR_bits_7_8_cdc_from_axi_d2; end generate LOGIC_GENERATION_CDC; end architecture imp;
gpl-2.0
blackducksoftware/ohcount
test/src_dir/vhdl1.vhd
5
2021
------------------------------------------------------------ -- Combinational Logic Design -- (ESD book figure 2.4) -- by Weijun Zhang, 04/2001 -- -- A simple example of VHDL Structure Modeling -- we might define two components in two separate files, -- in main file, we use port map statement to instantiate -- the mapping relationship between each components -- and the entire circuit. ------------------------------------------------------------ library ieee; -- component #1 use ieee.std_logic_1164.all; entity OR_GATE is port( X: in std_logic; Y: in std_logic; F2: out std_logic ); end OR_GATE; architecture behv of OR_GATE is begin process(X,Y) begin F2 <= X or Y; -- behavior des. end process; end behv; ------------------------------------------------------------- library ieee; -- component #2 use ieee.std_logic_1164.all; entity AND_GATE is port( A: in std_logic; B: in std_logic; F1: out std_logic ); end AND_GATE; architecture behv of AND_GATE is begin process(A,B) begin F1 <= A and B; -- behavior des. end process; end behv; -------------------------------------------------------------- library ieee; -- top level circuit use ieee.std_logic_1164.all; use work.all; entity comb_ckt is port( input1: in std_logic; input2: in std_logic; input3: in std_logic; output: out std_logic ); end comb_ckt; architecture struct of comb_ckt is component AND_GATE is -- as entity of AND_GATE port( A: in std_logic; B: in std_logic; F1: out std_logic ); end component; component OR_GATE is -- as entity of OR_GATE port( X: in std_logic; Y: in std_logic; F2: out std_logic ); end component; signal wire: std_logic; -- signal just like wire begin -- use sign "=>" to clarify the pin mapping Gate1: AND_GATE port map (A=>input1, B=>input2, F1=>wire); Gate2: OR_GATE port map (X=>wire, Y=>input3, F2=>output); end struct; ----------------------------------------------------------------
gpl-2.0
blackb1rd/ctags
Units/review-needed.r/test.vhd.t/input.vhd
91
192381
package body badger is end package body; package body badger2 is end package body badger2; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity accumulator is port ( a: in std_logic_vector(3 downto 0); clk, reset: in std_logic; accum: out std_logic_vector(3 downto 0) ); end accumulator; architecture simple of accumulator is signal accumL: unsigned(3 downto 0); begin accumulate: process (clk, reset) begin if (reset = '1') then accumL <= "0000"; elsif (clk'event and clk= '1') then accumL <= accumL + to_unsigned(a); end if; end process; accum <= std_logic_vector(accumL); end simple; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity adder is port ( a,b : in std_logic_vector (15 downto 0); sum: out std_logic_vector (15 downto 0) ); end adder; architecture dataflow of adder is begin sum <= a + b; end dataflow; library IEEE; use IEEE.std_logic_1164.all; entity pAdderAttr is generic(n : integer := 8); port (a : in std_logic_vector(n - 1 downto 0); b : in std_logic_vector(n - 1 downto 0); cin : in std_logic; sum : out std_logic_vector(n - 1 downto 0); cout : out std_logic); end pAdderAttr; architecture loopDemo of pAdderAttr is begin process(a, b, cin) variable carry: std_logic_vector(sum'length downto 0); variable localSum: std_logic_vector(sum'high downto 0); begin carry(0) := cin; for i in sum'reverse_range loop localSum(i) := (a(i) xor b(i)) xor carry(i); carry(i + 1) := (a(i) and b(i)) or (carry(i) and (a(i) or b(i))); end loop; sum <= localSum; cout <= carry(carry'high - 1); end process; end loopDemo; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity adder is port ( a,b: in unsigned(3 downto 0); sum: out unsigned(3 downto 0) ); end adder; architecture simple of adder is begin sum <= a + b; end simple; library IEEE; use IEEE.std_logic_1164.all; library IEEE; use IEEE.std_logic_1164.all; entity AND2 is port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end AND2; architecture rtl of AND2 is begin y <= '1' when i1 = '1' and i2 = '1' else '0'; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity asyncLoad is port ( loadVal, d: in std_logic_vector(3 downto 0); clk, load: in std_logic; q: out std_logic_vector(3 downto 0) ); end asyncLoad; architecture rtl of asyncLoad is begin process (clk, load, loadVal) begin if (load = '1') then q <= loadVal; elsif (clk'event and clk = '1' ) then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity BidirBuf is port ( OE: in std_logic; input: in std_logic_vector; output: out std_logic_vector ); end BidirBuf; architecture behavioral of BidirBuf is begin bidirBuf: process (OE, input) begin if (OE = '1') then output <= input; else output <= (others => 'Z'); end if; end process; end behavioral; library IEEE; use IEEE.std_logic_1164.all; entity BidirCnt is port ( OE: in std_logic; CntEnable: in std_logic; LdCnt: in std_logic; Clk: in std_logic; Rst: in std_logic; Cnt: inout std_logic_vector(3 downto 0) ); end BidirCnt; architecture behavioral of BidirCnt is component LoadCnt port ( CntEn: in std_logic; LdCnt: in std_logic; LdData: in std_logic_vector(3 downto 0); Clk: in std_logic; Rst: in std_logic; CntVal: out std_logic_vector(3 downto 0) ); end component; component BidirBuf port ( OE: in std_logic; input: in std_logic_vector; output: inout std_logic_vector ); end component; signal CntVal: std_logic_vector(3 downto 0); signal LoadVal: std_logic_vector(3 downto 0); begin u1: loadcnt port map (CntEn => CntEnable, LdCnt => LdCnt, LdData => LoadVal, Clk => Clk, Rst => Rst, CntVal => CntVal ); u2: bidirbuf port map (OE => oe, input => CntVal, output => Cnt ); LoadVal <= Cnt; end behavioral; library IEEE; use IEEE.std_logic_1164.all; entity BIDIR is port ( ip: in std_logic; oe: in std_logic; op_fb: out std_logic; op: inout std_logic ); end BIDIR; architecture rtl of BIDIR is begin op <= ip when oe = '1' else 'Z'; op_fb <= op; end rtl; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity bidirbuffer is port ( input: in std_logic; enable: in std_logic; feedback: out std_logic; output: inout std_logic ); end bidirbuffer; architecture structural of bidirbuffer is begin u1: bidir port map (ip => input, oe => enable, op_fb => feedback, op => output ); end structural; library IEEE; use IEEE.std_logic_1164.all; entity clkGen is port ( clk: in std_logic; reset: in std_logic; ClkDiv2, ClkDiv4, ClkDiv6,ClkDiv8: out std_logic ); end clkGen; architecture behav of clkGen is subtype numClks is std_logic_vector(1 to 4); subtype numPatterns is integer range 0 to 11; type clkTableType is array (numpatterns'low to numPatterns'high) of numClks; constant clkTable: clkTableType := clkTableType'( -- ClkDiv8______ -- ClkDiv6_____ | -- ClkDiv4____ || -- ClkDiv2 __ ||| -- |||| "1111", "0111", "1011", "0001", "1100", "0100", "1010", "0010", "1111", "0001", "1001", "0101"); signal index: numPatterns; begin lookupTable: process (clk, reset) begin if reset = '1' then index <= 0; elsif (clk'event and clk = '1') then if index = numPatterns'high then index <= numPatterns'low; else index <= index + 1; end if; end if; end process; (ClkDiv2,ClkDiv4,ClkDiv6,ClkDiv8) <= clkTable(index); end behav; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; enable: in std_logic; reset: in std_logic; count: buffer unsigned(3 downto 0) ); end counter; architecture simple of counter is begin increment: process (clk, reset) begin if reset = '1' then count <= "0000"; elsif(clk'event and clk = '1') then if enable = '1' then count <= count + 1; else count <= count; end if; end if; end process; end simple; library IEEE; use IEEE.std_logic_1164.all; use work.scaleable.all; entity count8 is port ( clk: in std_logic; rst: in std_logic; count: out std_logic_vector(7 downto 0) ); end count8; architecture structural of count8 is begin u1: scaleUpCnt port map (clk => clk, reset => rst, cnt => count ); end structural; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(0 to 9) ); end counter; architecture simple of counter is signal countL: unsigned(0 to 9); begin increment: process (clk, reset) begin if reset = '1' then countL <= to_unsigned(3,10); elsif(clk'event and clk = '1') then countL <= countL + 1; end if; end process; count <= std_logic_vector(countL); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(9 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(9 downto 0); begin increment: process (clk, reset) begin if reset = '1' then countL <= to_unsigned(0,10); elsif(clk'event and clk = '1') then countL <= countL + 1; end if; end process; count <= std_logic_vector(countL); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; load: in std_logic; enable: in std_logic; data: in std_logic_vector(3 downto 0); count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk, reset) begin if (reset = '1') then countL <= "0000"; elsif(clk'event and clk = '1') then if (load = '1') then countL <= to_unsigned(data); elsif (enable = '1') then countL <= countL + 1; end if; end if; end process; count <= std_logic_vector(countL); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; load: in std_logic; data: in std_logic_vector(3 downto 0); count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk, reset) begin if (reset = '1') then countL <= "0000"; elsif(clk'event and clk = '1') then if (load = '1') then countL <= to_unsigned(data); else countL <= countL + 1; end if; end if; end process; count <= std_logic_vector(countL); end simple; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity Cnt4Term is port ( clk: in std_logic; Cnt: out std_logic_vector(3 downto 0); TermCnt: out std_logic ); end Cnt4Term; architecture behavioral of Cnt4Term is signal CntL: unsigned(3 downto 0); begin increment: process begin wait until clk = '1'; CntL <= CntL + 1; end process; Cnt <= to_stdlogicvector(CntL); TermCnt <= '1' when CntL = "1111" else '0'; end behavioral; library IEEE; use IEEE.std_logic_1164.all; entity Counter is port ( clock: in std_logic; Count: out std_logic_vector(3 downto 0) ); end Counter; architecture structural of Counter is component Cnt4Term port ( clk: in std_logic; Cnt: out std_logic_vector(3 downto 0); TermCnt: out std_logic); end component; begin u1: Cnt4Term port map (clk => clock, Cnt => Count, TermCnt => open ); end structural; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk) begin if(clk'event and clk = '1') then if (reset = '1') then countL <= "0000"; else countL <= countL + 1; end if; end if; end process; count <= std_logic_vector(countL); end simple; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity convertArith is port ( truncate: out unsigned(3 downto 0); extend: out unsigned(15 downto 0); direction: out unsigned(0 to 7) ); end convertArith; architecture simple of convertArith is constant Const: unsigned(7 downto 0) := "00111010"; begin truncate <= resize(Const, truncate'length); extend <= resize(Const, extend'length); direction <= resize(Const, direction'length); end simple; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; architecture concurrent of FEWGATES is constant THREE: std_logic_vector(1 downto 0) := "11"; begin y <= '1' when (a & b = THREE) or (c & d /= THREE) else '0'; end concurrent; -- incorporates Errata 12.1 library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity typeConvert is port ( a: out unsigned(7 downto 0) ); end typeConvert; architecture simple of typeConvert is constant Const: natural := 43; begin a <= To_unsigned(Const,8); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk) begin if (clk'event and clk = '1') then countL <= countL + 1; end if; end process; count <= std_logic_vector(countL); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(0 to 3) ); end counter; architecture simple of counter is signal countL: unsigned(0 to 3); begin increment: process (clk, reset) begin if reset = '1' then countL <= "1001"; elsif(clk'event and clk = '1') then countL <= countL + 1; end if; end process; count <= std_logic_vector(countL); end simple; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk, reset) begin if (reset = '1') then countL <= "0000"; elsif(clk'event and clk = '1') then countL <= countL + "001"; end if; end process; count <= std_logic_vector(countL); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk, reset) begin if reset = '1' then countL <= "1001"; elsif(clk'event and clk = '1') then countL <= countL + 1; end if; end process; count <= std_logic_vector(countL); end simple; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity counter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(3 downto 0) ); end counter; architecture simple of counter is signal countL: unsigned(3 downto 0); begin increment: process (clk, reset) begin if (reset = '1') then countL <= "1001"; elsif(clk'event and clk = '1') then countL <= countL + "0001"; end if; end process; count <= std_logic_vector(countL); end simple; library IEEE; use IEEE.std_logic_1164.all; use work.decProcs.all; entity decoder is port ( decIn: in std_logic_vector(1 downto 0); decOut: out std_logic_vector(3 downto 0) ); end decoder; architecture simple of decoder is begin DEC2x4(decIn,decOut); end simple; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); decOut_n: out std_logic_vector(5 downto 0) ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; alias sio_dec_n: std_logic is decOut_n(5); alias rst_ctrl_rd_n: std_logic is decOut_n(4); alias atc_stat_rd_n: std_logic is decOut_n(3); alias mgmt_stat_rd_n: std_logic is decOut_n(2); alias io_int_stat_rd_n: std_logic is decOut_n(1); alias int_ctrl_rd_n: std_logic is decOut_n(0); alias upper: std_logic_vector(2 downto 0) is dev_adr(19 downto 17); alias CtrlBits: std_logic_vector(16 downto 0) is dev_adr(16 downto 0); begin decoder: process (upper, CtrlBits) begin -- Set defaults for outputs - for synthesis reasons. sio_dec_n <= '1'; int_ctrl_rd_n <= '1'; io_int_stat_rd_n <= '1'; rst_ctrl_rd_n <= '1'; atc_stat_rd_n <= '1'; mgmt_stat_rd_n <= '1'; case upper is when SuperIoRange => sio_dec_n <= '0'; when CtrlRegRange => case CtrlBits is when IntCtrlReg => int_ctrl_rd_n <= '0'; when IoIntStatReg => io_int_stat_rd_n <= '0'; when RstCtrlReg => rst_ctrl_rd_n <= '0'; when AtcStatusReg => atc_stat_rd_n <= '0'; when MgmtStatusReg => mgmt_stat_rd_n <= '0'; when others => null; end case; when others => null; end case; end process decoder; end synthesis; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); sio_dec_n: out std_logic; rst_ctrl_rd_n: out std_logic; atc_stat_rd_n: out std_logic; mgmt_stat_rd_n: out std_logic; io_int_stat_rd_n: out std_logic; int_ctrl_rd_n: out std_logic ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; begin decoder: process (dev_adr) begin -- Set defaults for outputs sio_dec_n <= '1'; int_ctrl_rd_n <= '1'; io_int_stat_rd_n <= '1'; rst_ctrl_rd_n <= '1'; atc_stat_rd_n <= '1'; mgmt_stat_rd_n <= '1'; case dev_adr(19 downto 17) is when SuperIoRange => sio_dec_n <= '0'; when CtrlRegRange => case dev_adr(16 downto 0) is when IntCtrlReg => int_ctrl_rd_n <= '0'; when IoIntStatReg => io_int_stat_rd_n <= '0'; when RstCtrlReg => rst_ctrl_rd_n <= '0'; when AtcStatusReg => atc_stat_rd_n <= '0'; when MgmtStatusReg => mgmt_stat_rd_n <= '0'; when others => null; end case; when others => null; end case; end process decoder; end synthesis; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); sio_dec_n: out std_logic; rst_ctrl_rd_n: out std_logic; atc_stat_rd_n: out std_logic; mgmt_stat_rd_n: out std_logic; io_int_stat_rd_n:out std_logic; int_ctrl_rd_n: out std_logic ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; begin sio_dec_n <= '0' when dev_adr (19 downto 17) = SuperIORange else '1'; int_ctrl_rd_n <= '0' when (dev_adr (19 downto 17) = CtrlRegRange) and (dev_adr(16 downto 0) = IntCtrlReg) else '1'; io_int_stat_rd_n <= '0' when (dev_adr (19 downto 17) = CtrlRegRange) and (dev_adr(16 downto 0) = IoIntStatReg) else '1'; rst_ctrl_rd_n <= '0' when (dev_adr (19 downto 17) = CtrlRegRange) and (dev_adr(16 downto 0) = RstCtrlReg) else '1'; atc_stat_rd_n <= '0' when (dev_adr (19 downto 17) = CtrlRegRange) and (dev_adr(16 downto 0) = AtcStatusReg) else '1'; mgmt_stat_rd_n <= '0' when (dev_adr (19 downto 17) = CtrlRegRange) and (dev_adr(16 downto 0) = MgmtStatusReg) else '1'; end synthesis; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); cs0_n: in std_logic; sio_dec_n: out std_logic; rst_ctrl_rd_n: out std_logic; atc_stat_rd_n: out std_logic; mgmt_stat_rd_n: out std_logic; io_int_stat_rd_n: out std_logic; int_ctrl_rd_n: out std_logic ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; begin decoder: process (dev_adr, cs0_n) begin -- Set defaults for outputs - for synthesis reasons. sio_dec_n <= '1'; int_ctrl_rd_n <= '1'; io_int_stat_rd_n <= '1'; rst_ctrl_rd_n <= '1'; atc_stat_rd_n <= '1'; mgmt_stat_rd_n <= '1'; if (cs0_n = '0') then case dev_adr(19 downto 17) is when SuperIoRange => sio_dec_n <= '0'; when CtrlRegRange => case dev_adr(16 downto 0) is when IntCtrlReg => int_ctrl_rd_n <= '0'; when IoIntStatReg => io_int_stat_rd_n <= '0'; when RstCtrlReg => rst_ctrl_rd_n <= '0'; when AtcStatusReg => atc_stat_rd_n <= '0'; when MgmtStatusReg => mgmt_stat_rd_n <= '0'; when others => null; end case; when others => null; end case; else null; end if; end process decoder; end synthesis; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); cs0_n: in std_logic; sio_dec_n: out std_logic; rst_ctrl_rd_n: out std_logic; atc_stat_rd_n: out std_logic; mgmt_stat_rd_n: out std_logic; io_int_stat_rd_n: out std_logic; int_ctrl_rd_n: out std_logic ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; signal Lsio_dec_n: std_logic; signal Lrst_ctrl_rd_n: std_logic; signal Latc_stat_rd_n: std_logic; signal Lmgmt_stat_rd_n: std_logic; signal Lio_int_stat_rd_n: std_logic; signal Lint_ctrl_rd_n: std_logic; begin decoder: process (dev_adr) begin -- Set defaults for outputs - for synthesis reasons. Lsio_dec_n <= '1'; Lint_ctrl_rd_n <= '1'; Lio_int_stat_rd_n <= '1'; Lrst_ctrl_rd_n <= '1'; Latc_stat_rd_n <= '1'; Lmgmt_stat_rd_n <= '1'; case dev_adr(19 downto 17) is when SuperIoRange => Lsio_dec_n <= '0'; when CtrlRegRange => case dev_adr(16 downto 0) is when IntCtrlReg => Lint_ctrl_rd_n <= '0'; when IoIntStatReg => Lio_int_stat_rd_n <= '0'; when RstCtrlReg => Lrst_ctrl_rd_n <= '0'; when AtcStatusReg => Latc_stat_rd_n <= '0'; when MgmtStatusReg => Lmgmt_stat_rd_n <= '0'; when others => null; end case; when others => null; end case; end process decoder; qualify: process (cs0_n) begin sio_dec_n <= '1'; int_ctrl_rd_n <= '1'; io_int_stat_rd_n <= '1'; rst_ctrl_rd_n <= '1'; atc_stat_rd_n <= '1'; mgmt_stat_rd_n <= '1'; if (cs0_n = '0') then sio_dec_n <= Lsio_dec_n; int_ctrl_rd_n <= Lint_ctrl_rd_n; io_int_stat_rd_n <= Lio_int_stat_rd_n; rst_ctrl_rd_n <= Lrst_ctrl_rd_n; atc_stat_rd_n <= Latc_stat_rd_n; mgmt_stat_rd_n <= Lmgmt_stat_rd_n; else null; end if; end process qualify; end synthesis; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); sio_dec_n: out std_logic; rst_ctrl_rd_n: out std_logic; atc_stat_rd_n: out std_logic; mgmt_stat_rd_n: out std_logic; io_int_stat_rd_n: out std_logic; int_ctrl_rd_n: out std_logic ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; begin decoder: process ( dev_adr) begin -- Set defaults for outputs - for synthesis reasons. sio_dec_n <= '1'; int_ctrl_rd_n <= '1'; io_int_stat_rd_n <= '1'; rst_ctrl_rd_n <= '1'; atc_stat_rd_n <= '1'; mgmt_stat_rd_n <= '1'; if dev_adr(19 downto 17) = SuperIOrange then sio_dec_n <= '0'; elsif dev_adr(19 downto 17) = CtrlRegrange then if dev_adr(16 downto 0) = IntCtrlReg then int_ctrl_rd_n <= '0'; elsif dev_adr(16 downto 0)= IoIntStatReg then io_int_stat_rd_n <= '0'; elsif dev_adr(16 downto 0) = RstCtrlReg then rst_ctrl_rd_n <= '0'; elsif dev_adr(16 downto 0) = AtcStatusReg then atc_stat_rd_n <= '0'; elsif dev_adr(16 downto 0) = MgmtStatusReg then mgmt_stat_rd_n <= '0'; else null; end if; else null; end if; end process decoder; end synthesis; library IEEE; use IEEE.std_logic_1164.all; package decProcs is procedure DEC2x4 (inputs : in std_logic_vector(1 downto 0); decode: out std_logic_vector(3 downto 0) ); end decProcs; package body decProcs is procedure DEC2x4 (inputs : in std_logic_vector(1 downto 0); decode: out std_logic_vector(3 downto 0) ) is begin case inputs is when "11" => decode := "1000"; when "10" => decode := "0100"; when "01" => decode := "0010"; when "00" => decode := "0001"; when others => decode := "0001"; end case; end DEC2x4; end decProcs; library ieee; use ieee.std_logic_1164.all; entity isa_dec is port ( dev_adr: in std_logic_vector(19 downto 0); sio_dec_n: out std_logic; rst_ctrl_rd_n: out std_logic; atc_stat_rd_n: out std_logic; mgmt_stat_rd_n: out std_logic; io_int_stat_rd_n:out std_logic; int_ctrl_rd_n: out std_logic ); end isa_dec; architecture synthesis of isa_dec is constant CtrlRegRange: std_logic_vector(2 downto 0) := "100"; constant SuperIoRange: std_logic_vector(2 downto 0) := "010"; constant IntCtrlReg: std_logic_vector(16 downto 0) := "00000000000000000"; constant IoIntStatReg: std_logic_vector(16 downto 0) := "00000000000000001"; constant RstCtrlReg: std_logic_vector(16 downto 0) := "00000000000000010"; constant AtcStatusReg: std_logic_vector(16 downto 0) := "00000000000000011"; constant MgmtStatusReg:std_logic_vector(16 downto 0) := "00000000000000100"; begin with dev_adr(19 downto 17) select sio_dec_n <= '0' when SuperIORange, '1' when others; with dev_adr(19 downto 0) select int_ctrl_rd_n <= '0' when CtrlRegRange & IntCtrlReg, '1' when others; with dev_adr(19 downto 0) select io_int_stat_rd_n <= '0' when CtrlRegRange & IoIntStatReg, '1' when others; with dev_adr(19 downto 0) select rst_ctrl_rd_n <= '0' when CtrlRegRange & RstCtrlReg, '1' when others; with dev_adr(19 downto 0) select atc_stat_rd_n <= '0' when CtrlRegRange & AtcStatusReg, '1' when others; with dev_adr(19 downto 0) select mgmt_stat_rd_n <= '0' when CtrlRegRange & MgmtStatusReg, '1' when others; end synthesis; -- Incorporates Errata 5.1 and 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity progPulse is port ( clk, reset: in std_logic; loadLength,loadDelay: in std_logic; data: in std_logic_vector(7 downto 0); pulse: out std_logic ); end progPulse; architecture rtl of progPulse is signal delayCnt, pulseCnt: unsigned(7 downto 0); signal delayCntVal, pulseCntVal: unsigned(7 downto 0); signal startPulse, endPulse: std_logic; begin delayReg: process (clk, reset) begin if reset = '1' then delayCntVal <= "11111111"; elsif clk'event and clk = '1' then if loadDelay = '1' then delayCntVal <= unsigned(data); end if; end if; end process; lengthReg: process (clk, reset) begin if reset = '1' then pulseCntVal <= "11111111"; elsif clk'event and clk = '1' then if loadLength = '1' then -- changed loadLength to loadDelay (Errata 5.1) pulseCntVal <= unsigned(data); end if; end if; end process; pulseDelay: process (clk, reset) begin if (reset = '1') then delayCnt <= "11111111"; elsif(clk'event and clk = '1') then if (loadDelay = '1' or loadLength = '1' or endPulse = '1') then -- changed startPulse to endPulse (Errata 5.1) delayCnt <= delayCntVal; elsif endPulse = '1' then delayCnt <= delayCnt - 1; end if; end if; end process; startPulse <= '1' when delayCnt = "00000000" else '0'; pulseLength: process (clk, reset) begin if (reset = '1') then pulseCnt <= "11111111"; elsif (clk'event and clk = '1') then if (loadLength = '1') then pulseCnt <= pulseCntVal; elsif (startPulse = '1' and endPulse = '1') then pulseCnt <= pulseCntVal; elsif (endPulse = '1') then pulseCnt <= pulseCnt; else pulseCnt <= pulseCnt - 1; end if; end if; end process; endPulse <= '1' when pulseCnt = "00000000" else '0'; pulseOutput: process (clk, reset) begin if (reset = '1') then pulse <= '0'; elsif (clk'event and clk = '1') then if (startPulse = '1') then pulse <= '1'; elsif (endPulse = '1') then pulse <= '0'; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; arst : in std_logic; q: out std_logic; ); end DFF; architecture rtl of DFF is begin process (clk) begin if arst = '1' then q <= '0'; elsif clk'event and clk = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; a,b,c : in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk, a,b,c) begin if ((a = '1' and b = '1') or c = '1') then q <= '0'; elsif clk'event and clk = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; a,b,c : in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is signal localRst: std_logic; begin localRst <= '1' when (( a = '1' and b = '1') or c = '1') else '0'; process (clk, localRst) begin if localRst = '1' then q <= '0'; elsif clk'event and clk = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; arst: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk, arst) begin if arst = '1' then q <= '0'; elsif clk'event and clk = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; aset : in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk, aset) begin if aset = '1' then q <= '1'; elsif clk'event and clk = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d1, d2: in std_logic; clk: in std_logic; arst : in std_logic; q1, q2: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk, arst) begin if arst = '1' then q1 <= '0'; q2 <= '1'; elsif clk'event and clk = '1' then q1 <= d1; q2 <= d2; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; en: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process begin if clk'event and clk = '1' then if en = '1' then q <= d; end if; end if; wait on clk; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFFE is port ( d: in std_logic; en: in std_logic; clk: in std_logic; q: out std_logic ); end DFFE; architecture rtl of DFFE is begin process begin wait until clk = '1'; if en = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; envector: in std_logic_vector(7 downto 0); q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk) begin if clk'event and clk = '1' then if envector = "10010111" then q <= d; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; en: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk) begin if clk'event and clk = '1' then if en = '1' then q <= d; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFFE_SR is port ( d: in std_logic; en: in std_logic; clk: in std_logic; rst: in std_logic; prst: in std_logic; q: out std_logic ); end DFFE_SR; architecture rtl of DFFE_SR is begin process (clk, rst, prst) begin if (prst = '1') then q <= '1'; elsif (rst = '1') then q <= '0'; elsif (clk'event and clk = '1') then if (en = '1') then q <= d; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity flipFlop is port ( clock, input: in std_logic; ffOut: out std_logic ); end flipFlop; architecture simple of flipFlop is procedure dff (signal clk: in std_logic; signal d: in std_logic; signal q: out std_logic ) is begin if clk'event and clk = '1' then q <= d; end if; end procedure dff; begin dff(clock, input, ffOut); end simple; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; end: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process begin wait until rising_edge(clk); if en = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d1, d2: in std_logic; clk: in std_logic; srst : in std_logic; q1, q2: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk) begin if clk'event and clk = '1' then if srst = '1' then q1 <= '0'; q2 <= '1'; else q1 <= d1; q2 <= d2; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFFE_SR is port ( d: in std_logic; en: in std_logic; clk: in std_logic; rst: in std_logic; prst: in std_logic; q: out std_logic ); end DFFE_SR; architecture rtl of DFFE_SR is begin process (clk, rst, prst) begin if (rst = '1') then q <= '0'; elsif (prst = '1') then q <= '1'; elsif (clk'event and clk = '1') then if (en = '1') then q <= d; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; srst : in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process begin wait until clk = '1'; if srst = '1' then q <= '0'; else q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity struct_dffe_sr is port ( d: in std_logic; clk: in std_logic; en: in std_logic; rst,prst: in std_logic; q: out std_logic ); end struct_dffe_sr; use work.primitive.all; architecture instance of struct_dffe_sr is begin ff: dffe_sr port map ( d => d, clk => clk, en => en, rst => rst, prst => prst, q => q ); end instance; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; srst : in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk) begin if clk'event and clk = '1' then if srst = '1' then q <= '0'; else q <= d; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity struct_dffe is port ( d: in std_logic; clk: in std_logic; en: in std_logic; q: out std_logic ); end struct_dffe; use work.primitive.all; architecture instance of struct_dffe is begin ff: dffe port map ( d => d, clk => clk, en => en, q => q ); end instance; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity dffTri is generic (size: integer := 8); port ( data: in std_logic_vector(size - 1 downto 0); clock: in std_logic; ff_enable: in std_logic; op_enable: in std_logic; qout: out std_logic_vector(size - 1 downto 0) ); end dffTri; architecture parameterize of dffTri is type tribufType is record ip: std_logic; oe: std_logic; op: std_logic; end record; type tribufArrayType is array (integer range <>) of tribufType; signal tri: tribufArrayType(size - 1 downto 0); begin g0: for i in 0 to size - 1 generate u1: DFFE port map (data(i), tri(i).ip, ff_enable, clock); end generate; g1: for i in 0 to size - 1 generate u2: TRIBUF port map (tri(i).ip, tri(i).oe, tri(i).op); tri(i).oe <= op_enable; qout(i) <= tri(i).op; end generate; end parameterize; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; en: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process begin wait until clk = '1'; if en = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF is port ( ip: in std_logic; oe: in std_logic; op: out std_logic bus ); end TRIBUF; architecture sequential of TRIBUF is begin enable: process (ip,oe) begin if (oe = '1') then op <= ip; else op <= null; end if; end process; end sequential; library IEEE; use IEEE.std_logic_1164.all; entity DLATCHH is port ( d: in std_logic; en: in std_logic; q: out std_logic ); end DLATCHH; architecture rtl of DLATCHH is signal qLocal: std_logic; begin qLocal <= d when en = '1' else qLocal; q <= qLocal; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DLATCHH is port ( d: in std_logic; en: in std_logic; q: out std_logic ); end DLATCHH; architecture rtl of DLATCHH is begin process (en, d) begin if en = '1' then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity struct_dlatch is port ( d: in std_logic; en: in std_logic; q: out std_logic ); end struct_dlatch; use work.primitive.all; architecture instance of struct_dlatch is begin latch: dlatchh port map ( d => d, en => en, q => q ); end instance; -- Incorporates Errata 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity downCounter is port ( clk: in std_logic; reset: in std_logic; count: out std_logic_vector(3 downto 0) ); end downCounter; architecture simple of downCounter is signal countL: unsigned(3 downto 0); signal termCnt: std_logic; begin decrement: process (clk, reset) begin if (reset = '1') then countL <= "1011"; -- Reset to 11 termCnt <= '1'; elsif(clk'event and clk = '1') then if (termCnt = '1') then countL <= "1011"; -- Count rolls over to 11 else countL <= countL - 1; end if; if (countL = "0001") then -- Terminal count decoded 1 cycle earlier termCnt <= '1'; else termCnt <= '0'; end if; end if; end process; count <= std_logic_vector(countL); end simple; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity compareDC is port ( addressBus: in std_logic_vector(31 downto 0); addressHit: out std_logic ); end compareDC; architecture wontWork of compareDC is begin compare: process(addressBus) begin if (addressBus = "011110101011--------------------") then addressHit <= '1'; else addressHit <= '0'; end if; end process compare; end wontWork; library ieee; use ieee.std_logic_1164.all; entity encoder is port (invec: in std_logic_vector(7 downto 0); enc_out: out std_logic_vector(2 downto 0) ); end encoder; architecture rtl of encoder is begin encode: process (invec) begin case invec is when "00000001" => enc_out <= "000"; when "00000010" => enc_out <= "001"; when "00000100" => enc_out <= "010"; when "00001000" => enc_out <= "011"; when "00010000" => enc_out <= "100"; when "00100000" => enc_out <= "101"; when "01000000" => enc_out <= "110"; when "10000000" => enc_out <= "111"; when others => enc_out <= "000"; end case; end process; end rtl; library ieee; use ieee.std_logic_1164.all; entity encoder is port (invec:in std_logic_vector(7 downto 0); enc_out:out std_logic_vector(2 downto 0) ); end encoder; architecture rtl of encoder is begin process (invec) begin if invec(7) = '1' then enc_out <= "111"; elsif invec(6) = '1' then enc_out <= "110"; elsif invec(5) = '1' then enc_out <= "101"; elsif invec(4) = '1' then enc_out <= "100"; elsif invec(3) = '1' then enc_out <= "011"; elsif invec(2) = '1' then enc_out <= "010"; elsif invec(1) = '1' then enc_out <= "001"; elsif invec(0) = '1' then enc_out <= "000"; else enc_out <= "000"; end if; end process; end rtl; library ieee; use ieee.std_logic_1164.all; entity encoder is port (invec: in std_logic_vector(7 downto 0); enc_out: out std_logic_vector(2 downto 0) ); end encoder; architecture rtl of encoder is begin enc_out <= "111" when invec(7) = '1' else "110" when invec(6) = '1' else "101" when invec(5) = '1' else "100" when invec(4) = '1' else "011" when invec(3) = '1' else "010" when invec(2) = '1' else "001" when invec(1) = '1' else "000" when invec(0) = '1' else "000"; end rtl; -- includes Errata 5.2 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; -- errata 5.2 entity compare is port ( ina: in std_logic_vector (3 downto 0); inb: in std_logic_vector (2 downto 0); equal: out std_logic ); end compare; architecture simple of compare is begin equalProc: process (ina, inb) begin if (ina = inb ) then equal <= '1'; else equal <= '0'; end if; end process; end simple; library IEEE; use IEEE.std_logic_1164.all; entity LogicFcn is port ( A: in std_logic; B: in std_logic; C: in std_logic; Y: out std_logic ); end LogicFcn; architecture behavioral of LogicFcn is begin fcn: process (A,B,C) begin if (A = '0' and B = '0') then Y <= '1'; elsif C = '1' then Y <= '1'; else Y <= '0'; end if; end process; end behavioral; library IEEE; use IEEE.std_logic_1164.all; entity LogicFcn is port ( A: in std_logic; B: in std_logic; C: in std_logic; Y: out std_logic ); end LogicFcn; architecture dataflow of LogicFcn is begin Y <= '1' when (A = '0' AND B = '0') OR (C = '1') else '0'; end dataflow; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity LogicFcn is port ( A: in std_logic; B: in std_logic; C: in std_logic; Y: out std_logic ); end LogicFcn; architecture structural of LogicFcn is signal notA, notB, andSignal: std_logic; begin i1: inverter port map (i => A, o => notA); i2: inverter port map (i => B, o => notB); a1: and2 port map (i1 => notA, i2 => notB, y => andSignal); o1: or2 port map (i1 => andSignal, i2 => C, y => Y); end structural; library IEEE; use IEEE.std_logic_1164.all; entity SimDFF is port ( D, Clk: in std_logic; Q: out std_logic ); end SimDff; architecture SimModel of SimDFF is constant tCQ: time := 8 ns; constant tS: time := 4 ns; constant tH: time := 3 ns; begin reg: process (Clk, D) begin -- Assign output tCQ after rising clock edge if (Clk'event and Clk = '1') then Q <= D after tCQ; end if; -- Check setup time if (Clk'event and Clk = '1') then assert (D'last_event >= tS) report "Setup time violation" severity Warning; end if; -- Check hold time if (D'event and Clk'stable and Clk = '1') then assert (D'last_event - Clk'last_event > tH) report "Hold Time Violation" severity Warning; end if; end process; end simModel; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process (clk) begin wait until clk = '1'; q <= d; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d: in std_logic; clk: in std_logic; q: out std_logic ); end DFF; architecture rtl of DFF is begin process begin wait until clk = '1'; q <= d; wait on clk; end process; end rtl; configuration SimpleGatesCfg of FEWGATES is for structural for all: AND2 use entity work.and2(rtl); end for; for u3: inverter use entity work.inverter(rtl); end for; for u4: or2 use entity work.or2(rtl); end for; end for; end SimpleGatesCfg; configuration SimpleGatesCfg of FEWGATES is for structural for u1: and2 use entity work.and2(rtl); end for; for u2: and2 use entity work.and2(rtl); end for; for u3: inverter use entity work.inverter(rtl); end for; for u4: or2 use entity work.or2(rtl); end for; end for; end SimpleGatesCfg; library IEEE; use IEEE.std_logic_1164.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; use work.and2; use work.or2; use work.inverter; architecture structural of FEWGATES is component AND2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component OR2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component INVERTER port ( i: in std_logic; o: out std_logic ); end component; signal a_and_b, c_and_d, not_c_and_d: std_logic; begin u1: and2 port map (i1 => a , i2 => b, y => a_and_b ); u2: and2 port map (i1 => c, i2 => d, y => c_and_d ); u3: inverter port map (i => c_and_d, o => not_c_and_d); u4: or2 port map (i1 => a_and_b, i2 => not_c_and_d, y => y ); end structural; library IEEE; use IEEE.std_logic_1164.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; use work.and2; use work.or2; use work.inverter; architecture structural of FEWGATES is component AND2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component OR2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component INVERTER port ( i: in std_logic; o: out std_logic ); end component; signal a_and_b, c_and_d, not_c_and_d: std_logic; -- Configution specifications for all: and2 use entity work.and2(rtl); for u3: inverter use entity work.inverter(rtl); for u4: or2 use entity work.or2(rtl); begin u1: and2 port map (i1 => a, i2 => b, y => a_and_b ); u2: and2 port map (i1 => c, i2 => d, y => c_and_d ); u3: inverter port map (i => c_and_d, o => not_c_and_d); u4: or2 port map (i1 => a_and_b, i2 => not_c_and_d, y => y ); end structural; library IEEE; use IEEE.std_logic_1164.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; use work.GatesPkg.all; architecture structural of FEWGATES is signal a_and_b, c_and_d, not_c_and_d: std_logic; begin u1: and2 port map (i1 => a , i2 => b, y => a_and_b ); u2: and2 port map (i1 => c, i2 => d, y => c_and_d ); u3: inverter port map (i => c_and_d, o => not_c_and_d); u4: or2 port map (i1 => a_and_b, i2 => not_c_and_d, y => y ); end structural; library IEEE; use IEEE.std_logic_1164.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; architecture concurrent of FEWGATES is signal a_and_b, c_and_d, not_c_and_d: std_logic; begin a_and_b <= '1' when a = '1' and b = '1' else '0'; c_and_d <= '1' when c = '1' and d = '1' else '0'; not_c_and_d <= not c_and_d; y <= '1' when a_and_b = '1' or not_c_and_d = '1' else '0'; end concurrent; library IEEE; use IEEE.std_logic_1164.all; package GatesPkg is component AND2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component OR2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component INVERTER port ( i: in std_logic; o: out std_logic ); end component; end GatesPkg; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; architecture structural of FEWGATES is signal a_and_b, c_and_d, not_c_and_d: std_logic; begin u1: and2 port map (i1 => a , i2 => b, y => a_and_b ); u2: and2 port map (i1 =>c, i2 => d, y => c_and_d ); u3: inverter port map (a => c_and_d, y => not_c_and_d); u4: or2 port map (i1 => a_and_b, i2 => not_c_and_d, y => y ); end structural; library IEEE; use IEEE.std_logic_1164.all; entity AND2 is port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end AND2; architecture rtl of AND2 is begin y <= '1' when i1 = '1' and i2 = '1' else '0'; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity OR2 is port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end OR2; architecture rtl of OR2 is begin y <= '1' when i1 = '1' or i2 = '1' else '0'; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity INVERTER is port ( i: in std_logic; o: out std_logic ); end INVERTER; architecture rtl of INVERTER is begin o <= not i; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity FEWGATES is port ( a,b,c,d: in std_logic; y: out std_logic ); end FEWGATES; architecture structural of FEWGATES is component AND2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component OR2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component INVERTER port ( i: in std_logic; o: out std_logic ); end component; signal a_and_b, c_and_d, not_c_and_d: std_logic; begin u1: and2 port map (i1 => a , i2 => b, y => a_and_b ); u2: and2 port map (i1 => c, i2 => d, y => c_and_d ); u3: inverter port map (i => c_and_d, o => not_c_and_d); u4: or2 port map (i1 => a_and_b, i2 => not_c_and_d, y => y ); end structural; library IEEE; use IEEE.std_logic_1164.all; use work.simPrimitives.all; entity simHierarchy is port ( A, B, Clk: in std_logic; Y: out std_logic ); end simHierarchy; architecture hierarchical of simHierarchy is signal ADly, BDly, OrGateDly, ClkDly: std_logic; signal OrGate, FlopOut: std_logic; begin ADly <= transport A after 2 ns; BDly <= transport B after 2 ns; OrGateDly <= transport OrGate after 1.5 ns; ClkDly <= transport Clk after 1 ns; u1: OR2 generic map (tPD => 10 ns) port map ( I1 => ADly, I2 => BDly, Y => OrGate ); u2: simDFF generic map ( tS => 4 ns, tH => 3 ns, tCQ => 8 ns ) port map ( D => OrGateDly, Clk => ClkDly, Q => FlopOut ); Y <= transport FlopOut after 2 ns; end hierarchical; library IEEE; use IEEE.std_logic_1164.all; library IEEE; use IEEE.std_logic_1164.all; entity INVERTER is port ( i: in std_logic; o: out std_logic ); end INVERTER; architecture rtl of INVERTER is begin o <= not i; end rtl; -------------------------------------------------------------------------------- --| File name : $RCSfile: io1164.vhd $ --| Library : SUPPORT --| Revision : $Revision: 1.1 $ --| Author(s) : Vantage Analysis Systems, Inc; Des Young --| Integration : Des Young --| Creation : Nov 1995 --| Status : $State: Exp $ --| --| Purpose : IO routines for std_logic_1164. --| Assumptions : Numbers use radixed character set with no prefix. --| Limitations : Does not read VHDL pound-radixed numbers. --| Known Errors: none --| --| Description: --| This is a modified library. The source is basically that donated by --| Vantage to libutil. Des Young removed std_ulogic_vector support (to --| conform to synthesizable libraries), and added read_oct/hex to integer. --| --| ======================================================================= --| Copyright (c) 1992-1994 Vantage Analysis Systems, Inc., all rights --| reserved. This package is provided by Vantage Analysis Systems. --| The package may not be sold without the express written consent of --| Vantage Analysis Systems, Inc. --| --| The VHDL for this package may be copied and/or distributed as long as --| this copyright notice is retained in the source and any modifications --| are clearly marked in the History: list. --| --| Title : IO1164 package VHDL source --| Package Name: somelib.IO1164 --| File Name : io1164.vhdl --| Author(s) : dbb --| Purpose : * Overloads procedures READ and WRITE for STD_LOGIC types --| in manner consistent with TEXTIO package. --| * Provides procedures to read and write logic values as --| binary, octal, or hexadecimal values ('X' as appropriate). --| These should be particularly useful for models --| to read in stimulus as 0/1/x or octal or hex. --| Subprograms : --| Notes : --| History : 1. Donated to libutil by Dave Bernstein 15 Jun 94 --| 2. Removed all std_ulogic_vector support, Des Young, 14 Nov 95 --| (This is because that type is not supported for synthesis). --| 3. Added read_oct/hex to integer, Des Young, 20 Nov 95 --| --| ======================================================================= --| Extra routines by Des Young, [email protected]. 1995. GNU copyright. --| ======================================================================= --| -------------------------------------------------------------------------------- library ieee; package io1164 is --$ !VANTAGE_METACOMMENTS_ON --$ !VANTAGE_DNA_ON -- import std_logic package use ieee.std_logic_1164.all; -- import textio package use std.textio.all; -- -- the READ and WRITE procedures act similarly to the procedures in the -- STD.TEXTIO package. for each type, there are two read procedures and -- one write procedure for converting between character and internal -- representations of values. each value is represented as the string of -- characters that you would use in VHDL code. (remember that apostrophes -- and quotation marks are not used.) input is case-insensitive. output -- is in upper case. see the following LRM sections for more information: -- -- 2.3 - Subprogram Overloading -- 3.3 - Access Types (STD.TEXTIO.LINE is an access type) -- 7.3.6 - Allocators (allocators create access values) -- 14.3 - Package TEXTIO -- -- Note that the procedures for std_ulogic will match calls with the value -- parameter of type std_logic. -- -- declare READ procedures to overload like in TEXTIO -- procedure read(l: inout line; value: out std_ulogic ; good: out boolean); procedure read(l: inout line; value: out std_ulogic ); procedure read(l: inout line; value: out std_logic_vector ; good: out boolean); procedure read(l: inout line; value: out std_logic_vector ); -- -- declare WRITE procedures to overload like in TEXTIO -- procedure write(l : inout line ; value : in std_ulogic ; justified: in side := right; field : in width := 0 ); procedure write(l : inout line ; value : in std_logic_vector ; justified: in side := right; field : in width := 0 ); -- -- declare procedures to convert between logic values and octal -- or hexadecimal ('X' where appropriate). -- -- octal / std_logic_vector procedure read_oct (l : inout line ; value : out std_logic_vector ; good : out boolean ); procedure read_oct (l : inout line ; value : out std_logic_vector ); procedure write_oct(l : inout line ; value : in std_logic_vector ; justified : in side := right; field : in width := 0 ); -- hexadecimal / std_logic_vector procedure read_hex (l : inout line ; value : out std_logic_vector ; good : out boolean ); procedure read_hex (l : inout line ; value : out std_logic_vector ); procedure write_hex(l : inout line ; value : in std_logic_vector ; justified : in side := right; field : in width := 0 ); -- read a number into an integer procedure read_oct(l : inout line; value : out integer; good : out boolean); procedure read_oct(l : inout line; value : out integer); procedure read_hex(l : inout line; value : out integer; good : out boolean); procedure read_hex(l : inout line; value : out integer); end io1164; -------------------------------------------------------------------------------- --| Copyright (c) 1992-1994 Vantage Analysis Systems, Inc., all rights reserved --| This package is provided by Vantage Analysis Systems. --| The package may not be sold without the express written consent of --| Vantage Analysis Systems, Inc. --| --| The VHDL for this package may be copied and/or distributed as long as --| this copyright notice is retained in the source and any modifications --| are clearly marked in the History: list. --| --| Title : IO1164 package body VHDL source --| Package Name: VANTAGE_LOGIC.IO1164 --| File Name : io1164.vhdl --| Author(s) : dbb --| Purpose : source for IO1164 package body --| Subprograms : --| Notes : see package declaration --| History : see package declaration -------------------------------------------------------------------------------- package body io1164 is --$ !VANTAGE_METACOMMENTS_ON --$ !VANTAGE_DNA_ON -- define lowercase conversion of characters for canonical comparison type char2char_t is array (character'low to character'high) of character; constant lowcase: char2char_t := ( nul, soh, stx, etx, eot, enq, ack, bel, bs, ht, lf, vt, ff, cr, so, si, dle, dc1, dc2, dc3, dc4, nak, syn, etb, can, em, sub, esc, fsp, gsp, rsp, usp, ' ', '!', '"', '#', '$', '%', '&', ''', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', del); -- define conversions between various types -- logic -> character type f_logic_to_character_t is array (std_ulogic'low to std_ulogic'high) of character; constant f_logic_to_character : f_logic_to_character_t := ( 'U' => 'U', 'X' => 'X', '0' => '0', '1' => '1', 'Z' => 'Z', 'W' => 'W', 'L' => 'L', 'H' => 'H', '-' => '-' ); -- character, integer, logic constant x_charcode : integer := -1; constant maxoct_charcode: integer := 7; constant maxhex_charcode: integer := 15; constant bad_charcode : integer := integer'left; type digit2int_t is array ( character'low to character'high ) of integer; constant octdigit2int: digit2int_t := ( '0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, 'X' | 'x' => x_charcode, others => bad_charcode ); constant hexdigit2int: digit2int_t := ( '0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, 'A' | 'a' => 10, 'B' | 'b' => 11, 'C' | 'c' => 12, 'D' | 'd' => 13, 'E' | 'e' => 14, 'F' | 'f' => 15, 'X' | 'x' => x_charcode, others => bad_charcode ); constant oct_bits_per_digit: integer := 3; constant hex_bits_per_digit: integer := 4; type int2octdigit_t is array ( 0 to maxoct_charcode ) of character; constant int2octdigit: int2octdigit_t := ( 0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7' ); type int2hexdigit_t is array ( 0 to maxhex_charcode ) of character; constant int2hexdigit: int2hexdigit_t := ( 0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => 'A', 11 => 'B', 12 => 'C', 13 => 'D', 14 => 'E', 15 => 'F' ); type oct_logic_vector_t is array(1 to oct_bits_per_digit) of std_ulogic; type octint2logic_t is array (x_charcode to maxoct_charcode) of oct_logic_vector_t; constant octint2logic : octint2logic_t := ( ( 'X', 'X', 'X' ), ( '0', '0', '0' ), ( '0', '0', '1' ), ( '0', '1', '0' ), ( '0', '1', '1' ), ( '1', '0', '0' ), ( '1', '0', '1' ), ( '1', '1', '0' ), ( '1', '1', '1' ) ); type hex_logic_vector_t is array(1 to hex_bits_per_digit) of std_ulogic; type hexint2logic_t is array (x_charcode to maxhex_charcode) of hex_logic_vector_t; constant hexint2logic : hexint2logic_t := ( ( 'X', 'X', 'X', 'X' ), ( '0', '0', '0', '0' ), ( '0', '0', '0', '1' ), ( '0', '0', '1', '0' ), ( '0', '0', '1', '1' ), ( '0', '1', '0', '0' ), ( '0', '1', '0', '1' ), ( '0', '1', '1', '0' ), ( '0', '1', '1', '1' ), ( '1', '0', '0', '0' ), ( '1', '0', '0', '1' ), ( '1', '0', '1', '0' ), ( '1', '0', '1', '1' ), ( '1', '1', '0', '0' ), ( '1', '1', '0', '1' ), ( '1', '1', '1', '0' ), ( '1', '1', '1', '1' ) ); ---------------------------------------------------------------------------- -- READ procedure bodies -- -- The strategy for duplicating TEXTIO's overloading of procedures -- with and without GOOD parameters is to put all the logic in the -- version with the GOOD parameter and to have the version without -- GOOD approximate a runtime error by use of an assertion. -- ---------------------------------------------------------------------------- -- -- std_ulogic -- note: compatible with std_logic -- procedure read( l: inout line; value: out std_ulogic; good : out boolean ) is variable c : character; -- char read while looping variable m : line; -- safe copy of L variable success: boolean := false; -- readable version of GOOD variable done : boolean := false; -- flag to say done reading chars begin -- -- algorithm: -- -- if there are characters in the line -- save a copy of the line -- get the next character -- if got one -- set value -- if all ok -- free temp copy -- else -- free passed in line -- assign copy back to line -- set GOOD -- -- only operate on lines that contain characters if ( ( l /= null ) and ( l.all'length /= 0 ) ) then -- save a copy of string in case read fails m := new string'( l.all ); -- grab the next character read( l, c, success ); -- if read ok if success then -- -- an issue here is whether lower-case values should be accepted or not -- -- determine the value case c is when 'U' | 'u' => value := 'U'; when 'X' | 'x' => value := 'X'; when '0' => value := '0'; when '1' => value := '1'; when 'Z' | 'z' => value := 'Z'; when 'W' | 'w' => value := 'W'; when 'L' | 'l' => value := 'L'; when 'H' | 'h' => value := 'H'; when '-' => value := '-'; when others => success := false; end case; end if; -- free working storage if success then deallocate( m ); else deallocate( l ); l := m; end if; end if; -- non null access, non empty string -- set output parameter good := success; end read; procedure read( l: inout line; value: out std_ulogic ) is variable success: boolean; -- internal good flag begin read( l, value, success ); -- use safe version assert success report "IO1164.READ: Unable to read STD_ULOGIC value." severity error; end read; -- -- std_logic_vector -- note: NOT compatible with std_ulogic_vector -- procedure read(l : inout line ; value: out std_logic_vector; good : out boolean ) is variable m : line ; -- saved copy of L variable success : boolean := true; -- readable GOOD variable logic_value : std_logic ; -- value for one array element variable c : character ; -- read a character begin -- -- algorithm: -- -- this procedure strips off leading whitespace, and then calls the -- READ procedure for each single logic value element in the output -- array. -- -- only operate on lines that contain characters if ( ( l /= null ) and ( l.all'length /= 0 ) ) then -- save a copy of string in case read fails m := new string'( l.all ); -- loop for each element in output array for i in value'range loop -- prohibit internal blanks if i /= value'left then if l.all'length = 0 then success := false; exit; end if; c := l.all(l.all'left); if c = ' ' or c = ht then success := false; exit; end if; end if; -- read the next logic value read( l, logic_value, success ); -- stuff the value in if ok, else bail out if success then value( i ) := logic_value; else exit; end if; end loop; -- each element in output array -- free working storage if success then deallocate( m ); else deallocate( l ); l := m; end if; elsif ( value'length /= 0 ) then -- string is empty but the return array has 1+ elements success := false; end if; -- set output parameter good := success; end read; procedure read(l: inout line; value: out std_logic_vector ) is variable success: boolean; begin read( l, value, success ); assert success report "IO1164.READ: Unable to read T_WLOGIC_VECTOR value." severity error; end read; ---------------------------------------------------------------------------- -- WRITE procedure bodies ---------------------------------------------------------------------------- -- -- std_ulogic -- note: compatible with std_logic -- procedure write(l : inout line ; value : in std_ulogic ; justified: in side := right; field : in width := 0 ) is begin -- -- algorithm: -- -- just write out the string associated with the enumerated -- value. -- case value is when 'U' => write( l, character'('U'), justified, field ); when 'X' => write( l, character'('X'), justified, field ); when '0' => write( l, character'('0'), justified, field ); when '1' => write( l, character'('1'), justified, field ); when 'Z' => write( l, character'('Z'), justified, field ); when 'W' => write( l, character'('W'), justified, field ); when 'L' => write( l, character'('L'), justified, field ); when 'H' => write( l, character'('H'), justified, field ); when '-' => write( l, character'('-'), justified, field ); end case; end write; -- -- std_logic_vector -- note: NOT compatible with std_ulogic_vector -- procedure write(l : inout line ; value : in std_logic_vector ; justified: in side := right; field : in width := 0 ) is variable m: line; -- build up intermediate string begin -- -- algorithm: -- -- for each value in array -- add string representing value to intermediate string -- write intermediate string to line parameter -- free intermediate string -- -- for each value in array for i in value'range loop -- add string representing value to intermediate string write( m, value( i ) ); end loop; -- write intermediate string to line parameter write( l, m.all, justified, field ); -- free intermediate string deallocate( m ); end write; -------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -- procedure bodies for octal and hexadecimal read and write ---------------------------------------------------------------------------- -- -- std_logic_vector/octal -- note: NOT compatible with std_ulogic_vector -- procedure read_oct(l : inout line ; value : out std_logic_vector; good : out boolean ) is variable m : line ; -- safe L variable success : boolean := true; -- readable GOOD variable logic_value : std_logic ; -- elem value variable c : character ; -- char read variable charcode : integer ; -- char->int variable oct_logic_vector: oct_logic_vector_t ; -- for 1 digit variable bitpos : integer ; -- in state vec. begin -- -- algorithm: -- -- skip over leading blanks, then read a digit -- and do a conversion into a logic value -- for each element in array -- -- make sure logic array is right size to read this base success := ( ( value'length rem oct_bits_per_digit ) = 0 ); if success then -- only operate on non-empty strings if ( ( l /= null ) and ( l.all'length /= 0 ) ) then -- save old copy of string in case read fails m := new string'( l.all ); -- pick off leading white space and get first significant char c := ' '; while success and ( l.all'length > 0 ) and ( ( c = ' ' ) or ( c = ht ) ) loop read( l, c, success ); end loop; -- turn character into integer charcode := octdigit2int( c ); -- not doing any bits yet bitpos := 0; -- check for bad first character if charcode = bad_charcode then success := false; else -- loop through each value in array oct_logic_vector := octint2logic( charcode ); for i in value'range loop -- doing the next bit bitpos := bitpos + 1; -- stick the value in value( i ) := oct_logic_vector( bitpos ); -- read the next character if we're not at array end if ( bitpos = oct_bits_per_digit ) and ( i /= value'right ) then read( l, c, success ); if not success then exit; end if; -- turn character into integer charcode := octdigit2int( c ); -- check for bad char if charcode = bad_charcode then success := false; exit; end if; -- reset bit position bitpos := 0; -- turn character code into state array oct_logic_vector := octint2logic( charcode ); end if; end loop; -- each index in return array end if; -- if bad first character -- clean up working storage if success then deallocate( m ); else deallocate( l ); l := m; end if; -- no characters to read for return array that isn't null slice elsif ( value'length /= 0 ) then success := false; end if; -- non null access, non empty string end if; -- set out parameter of success good := success; end read_oct; procedure read_oct(l : inout line ; value : out std_logic_vector) is variable success: boolean; -- internal good flag begin read_oct( l, value, success ); -- use safe version assert success report "IO1164.READ_OCT: Unable to read T_LOGIC_VECTOR value." severity error; end read_oct; procedure write_oct(l : inout line ; value : in std_logic_vector ; justified: in side := right; field : in width := 0 ) is variable m : line ; -- safe copy of L variable goodlength : boolean ; -- array is ok len for this base variable isx : boolean ; -- an X in this digit variable integer_value: integer ; -- accumulate integer value variable c : character; -- character read variable charpos : integer ; -- index string being contructed variable bitpos : integer ; -- bit index inside digit begin -- -- algorithm: -- -- make sure this array can be written in this base -- create a string to place intermediate results -- initialize counters and flags to beginning of string -- for each item in array -- note unknown, else accumulate logic into integer -- if at this digit's last bit -- stuff digit just computed into intermediate result -- reset flags and counters except for charpos -- write intermediate result into line -- free work storage -- -- make sure this array can be written in this base goodlength := ( ( value'length rem oct_bits_per_digit ) = 0 ); assert goodlength report "IO1164.WRITE_OCT: VALUE'Length is not a multiple of 3." severity error; if goodlength then -- create a string to place intermediate results m := new string(1 to ( value'length / oct_bits_per_digit ) ); -- initialize counters and flags to beginning of string charpos := 0; bitpos := 0; isx := false; integer_value := 0; -- for each item in array for i in value'range loop -- note unknown, else accumulate logic into integer case value(i) is when '0' | 'L' => integer_value := integer_value * 2; when '1' | 'H' => integer_value := ( integer_value * 2 ) + 1; when others => isx := true; end case; -- see if we've done this digit's last bit bitpos := bitpos + 1; if bitpos = oct_bits_per_digit then -- stuff the digit just computed into the intermediate result charpos := charpos + 1; if isx then m.all(charpos) := 'X'; else m.all(charpos) := int2octdigit( integer_value ); end if; -- reset flags and counters except for location in string being constructed bitpos := 0; isx := false; integer_value := 0; end if; end loop; -- write intermediate result into line write( l, m.all, justified, field ); -- free work storage deallocate( m ); end if; end write_oct; -- -- std_logic_vector/hexadecimal -- note: NOT compatible with std_ulogic_vector -- procedure read_hex(l : inout line ; value : out std_logic_vector; good : out boolean ) is variable m : line ; -- safe L variable success : boolean := true; -- readable GOOD variable logic_value : std_logic ; -- elem value variable c : character ; -- char read variable charcode : integer ; -- char->int variable hex_logic_vector: hex_logic_vector_t ; -- for 1 digit variable bitpos : integer ; -- in state vec. begin -- -- algorithm: -- -- skip over leading blanks, then read a digit -- and do a conversion into a logic value -- for each element in array -- -- make sure logic array is right size to read this base success := ( ( value'length rem hex_bits_per_digit ) = 0 ); if success then -- only operate on non-empty strings if ( ( l /= null ) and ( l.all'length /= 0 ) ) then -- save old copy of string in case read fails m := new string'( l.all ); -- pick off leading white space and get first significant char c := ' '; while success and ( l.all'length > 0 ) and ( ( c = ' ' ) or ( c = ht ) ) loop read( l, c, success ); end loop; -- turn character into integer charcode := hexdigit2int( c ); -- not doing any bits yet bitpos := 0; -- check for bad first character if charcode = bad_charcode then success := false; else -- loop through each value in array hex_logic_vector := hexint2logic( charcode ); for i in value'range loop -- doing the next bit bitpos := bitpos + 1; -- stick the value in value( i ) := hex_logic_vector( bitpos ); -- read the next character if we're not at array end if ( bitpos = hex_bits_per_digit ) and ( i /= value'right ) then read( l, c, success ); if not success then exit; end if; -- turn character into integer charcode := hexdigit2int( c ); -- check for bad char if charcode = bad_charcode then success := false; exit; end if; -- reset bit position bitpos := 0; -- turn character code into state array hex_logic_vector := hexint2logic( charcode ); end if; end loop; -- each index in return array end if; -- if bad first character -- clean up working storage if success then deallocate( m ); else deallocate( l ); l := m; end if; -- no characters to read for return array that isn't null slice elsif ( value'length /= 0 ) then success := false; end if; -- non null access, non empty string end if; -- set out parameter of success good := success; end read_hex; procedure read_hex(l : inout line ; value : out std_logic_vector) is variable success: boolean; -- internal good flag begin read_hex( l, value, success ); -- use safe version assert success report "IO1164.READ_HEX: Unable to read T_LOGIC_VECTOR value." severity error; end read_hex; procedure write_hex(l : inout line ; value : in std_logic_vector ; justified: in side := right; field : in width := 0 ) is variable m : line ; -- safe copy of L variable goodlength : boolean ; -- array is ok len for this base variable isx : boolean ; -- an X in this digit variable integer_value: integer ; -- accumulate integer value variable c : character; -- character read variable charpos : integer ; -- index string being contructed variable bitpos : integer ; -- bit index inside digit begin -- -- algorithm: -- -- make sure this array can be written in this base -- create a string to place intermediate results -- initialize counters and flags to beginning of string -- for each item in array -- note unknown, else accumulate logic into integer -- if at this digit's last bit -- stuff digit just computed into intermediate result -- reset flags and counters except for charpos -- write intermediate result into line -- free work storage -- -- make sure this array can be written in this base goodlength := ( ( value'length rem hex_bits_per_digit ) = 0 ); assert goodlength report "IO1164.WRITE_HEX: VALUE'Length is not a multiple of 4." severity error; if goodlength then -- create a string to place intermediate results m := new string(1 to ( value'length / hex_bits_per_digit ) ); -- initialize counters and flags to beginning of string charpos := 0; bitpos := 0; isx := false; integer_value := 0; -- for each item in array for i in value'range loop -- note unknown, else accumulate logic into integer case value(i) is when '0' | 'L' => integer_value := integer_value * 2; when '1' | 'H' => integer_value := ( integer_value * 2 ) + 1; when others => isx := true; end case; -- see if we've done this digit's last bit bitpos := bitpos + 1; if bitpos = hex_bits_per_digit then -- stuff the digit just computed into the intermediate result charpos := charpos + 1; if isx then m.all(charpos) := 'X'; else m.all(charpos) := int2hexdigit( integer_value ); end if; -- reset flags and counters except for location in string being constructed bitpos := 0; isx := false; integer_value := 0; end if; end loop; -- write intermediate result into line write( l, m.all, justified, field ); -- free work storage deallocate( m ); end if; end write_hex; ------------------------------------------------------------------------------ ------------------------------------ -- Read octal/hex numbers to integer ------------------------------------ -- -- Read octal to integer -- procedure read_oct(l : inout line; value : out integer; good : out boolean) is variable pos : integer; variable digit : integer; variable result : integer := 0; variable success : boolean := true; variable c : character; variable old_l : line := l; begin -- algorithm: -- -- skip leading white space, read digit, convert -- into integer -- if (l /= NULL) then -- set pos to start of actual number by skipping white space pos := l'LEFT; c := l(pos); while ( l.all'length > 0 ) and ( ( c = ' ' ) or ( c = HT ) ) loop pos := pos + 1; c := l(pos); end loop; -- check for start of valid number digit := octdigit2int(l(pos)); if ((digit = bad_charcode) or (digit = x_charcode)) then good := FALSE; return; else -- calculate integer value for i in pos to l'RIGHT loop digit := octdigit2int(l(pos)); exit when (digit = bad_charcode) or (digit = x_charcode); result := (result * 8) + digit; pos := pos + 1; end loop; value := result; -- shrink line if (pos > 1) then l := new string'(old_l(pos to old_l'HIGH)); deallocate(old_l); end if; good := TRUE; return; end if; else good := FALSE; end if; end read_oct; -- simple version procedure read_oct(l : inout line; value : out integer) is variable success: boolean; -- internal good flag begin read_oct( l, value, success ); -- use safe version assert success report "IO1164.READ_OCT: Unable to read octal integer value." severity error; end read_oct; -- -- Read hex to integer -- procedure read_hex(l : inout line; value : out integer; good : out boolean) is variable pos : integer; variable digit : integer; variable result : integer := 0; variable success : boolean := true; variable c : character; variable old_l : line := l; begin -- algorithm: -- -- skip leading white space, read digit, convert -- into integer -- if (l /= NULL) then -- set pos to start of actual number by skipping white space pos := l'LEFT; c := l(pos); while ( l.all'length > 0 ) and ( ( c = ' ' ) or ( c = HT ) ) loop pos := pos + 1; c := l(pos); end loop; -- check for start of valid number digit := hexdigit2int(l(pos)); if ((digit = bad_charcode) or (digit = x_charcode)) then good := FALSE; return; else -- calculate integer value for i in pos to l'RIGHT loop digit := hexdigit2int(l(pos)); exit when (digit = bad_charcode) or (digit = x_charcode); result := (result * 16) + digit; pos := pos + 1; end loop; value := result; -- shrink line if (pos > 1) then l := new string'(old_l(pos to old_l'HIGH)); deallocate(old_l); end if; good := TRUE; return; end if; else good := FALSE; end if; end read_hex; -- simple version procedure read_hex(l : inout line; value : out integer) is variable success: boolean; -- internal good flag begin read_hex( l, value, success ); -- use safe version assert success report "IO1164.READ_HEX: Unable to read hex integer value." severity error; end read_hex; end io1164; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity asyncLdCnt is port ( loadVal: in std_logic_vector(3 downto 0); clk, load: in std_logic; q: out std_logic_vector(3 downto 0) ); end asyncLdCnt; architecture rtl of asyncLdCnt is signal qLocal: unsigned(3 downto 0); begin process (clk, load, loadVal) begin if (load = '1') then qLocal <= to_unsigned(loadVal); elsif (clk'event and clk = '1' ) then qLocal <= qLocal + 1; end if; end process; q <= to_stdlogicvector(qLocal); end rtl; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity LoadCnt is port ( CntEn: in std_logic; LdCnt: in std_logic; LdData: in std_logic_vector(3 downto 0); Clk: in std_logic; Rst: in std_logic; CntVal: out std_logic_vector(3 downto 0) ); end LoadCnt; architecture behavioral of LoadCnt is signal Cnt: std_logic_vector(3 downto 0); begin counter: process (Clk, Rst) begin if Rst = '1' then Cnt <= (others => '0'); elsif (Clk'event and Clk = '1') then if (LdCnt = '1') then Cnt <= LdData; elsif (CntEn = '1') then Cnt <= Cnt + 1; else Cnt <= Cnt; end if; end if; end process; CntVal <= Cnt; end behavioral; library IEEE; use IEEE.std_logic_1164.all; library UTILS; use UTILS.io1164.all; use std.textio.all; entity loadCntTB is end loadCntTB; architecture testbench of loadCntTB is component loadCnt port ( data: in std_logic_vector (7 downto 0); load: in std_logic; clk: in std_logic; rst: in std_logic; q: out std_logic_vector (7 downto 0) ); end component; file vectorFile: text is in "vectorfile"; type vectorType is record data: std_logic_vector(7 downto 0); load: std_logic; rst: std_logic; q: std_logic_vector(7 downto 0); end record; signal testVector: vectorType; signal TestClk: std_logic := '0'; signal Qout: std_logic_vector(7 downto 0); constant ClkPeriod: time := 100 ns; for all: loadCnt use entity work.loadcnt(rtl); begin -- File reading and stimulus application readVec: process variable VectorLine: line; variable VectorValid: boolean; variable vRst: std_logic; variable vLoad: std_logic; variable vData: std_logic_vector(7 downto 0); variable vQ: std_logic_vector(7 downto 0); begin while not endfile (vectorFile) loop readline(vectorFile, VectorLine); read(VectorLine, vRst, good => VectorValid); next when not VectorValid; read(VectorLine, vLoad); read(VectorLine, vData); read(VectorLine, vQ); wait for ClkPeriod/4; testVector.Rst <= vRst; testVector.Load <= vLoad; testVector.Data <= vData; testVector.Q <= vQ; wait for (ClkPeriod/4) * 3; end loop; assert false report "Simulation complete" severity note; wait; end process; -- Free running test clock TestClk <= not TestClk after ClkPeriod/2; -- Instance of design being tested u1: loadCnt port map (Data => testVector.Data, load => testVector.Load, clk => TestClk, rst => testVector.Rst, q => Qout ); -- Process to verify outputs verify: process (TestClk) variable ErrorMsg: line; begin if (TestClk'event and TestClk = '0') then if Qout /= testVector.Q then write(ErrorMsg, string'("Vector failed ")); write(ErrorMsg, now); writeline(output, ErrorMsg); end if; end if; end process; end testbench; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity loadCnt is port ( data: in std_logic_vector (7 downto 0); load: in std_logic; clk: in std_logic; rst: in std_logic; q: out std_logic_vector (7 downto 0) ); end loadCnt; architecture rtl of loadCnt is signal cnt: std_logic_vector (7 downto 0); begin counter: process (clk, rst) begin if (rst = '1') then cnt <= (others => '0'); elsif (clk'event and clk = '1') then if (load = '1') then cnt <= data; else cnt <= cnt + 1; end if; end if; end process; q <= cnt; end rtl; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity multiplier is port ( a,b : in std_logic_vector (15 downto 0); product: out std_logic_vector (31 downto 0) ); end multiplier; architecture dataflow of multiplier is begin product <= a * b; end dataflow; library IEEE; use IEEE.std_logic_1164.all; entity mux is port ( A, B, Sel: in std_logic; Y: out std_logic ); end mux; architecture simModel of mux is -- Delay Constants constant tPD_A: time := 10 ns; constant tPD_B: time := 15 ns; constant tPD_Sel: time := 5 ns; begin DelayMux: process (A, B, Sel) variable localY: std_logic; -- Zero delay place holder for Y begin -- Zero delay model case Sel is when '0' => localY := A; when others => localY := B; end case; -- Delay calculation if (B'event) then Y <= localY after tPD_B; elsif (A'event) then Y <= localY after tPD_A; else Y <= localY after tPD_Sel; end if; end process; end simModel; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity ForceShare is port ( a,b,c,d,e,f: in std_logic_vector (7 downto 0); result: out std_logic_vector(7 downto 0) ); end ForceShare; architecture behaviour of ForceShare is begin sum: process (a,c,b,d,e,f) begin if (a + b = "10011010") then result <= c; elsif (a + b = "01011001") then result <= d; elsif (a + b = "10111011") then result <= e; else result <= f; end if; end process; end behaviour; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF8 is port ( ip: in std_logic_vector(7 downto 0); oe: in std_logic; op: out std_logic_vector(7 downto 0) ); end TRIBUF8; architecture concurrent of TRIBUF8 is begin op <= ip when oe = '1' else (others => 'Z'); end concurrent; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF is port ( ip: in std_logic; oe: in std_logic; op: out std_logic ); end TRIBUF; architecture concurrent of TRIBUF is begin op <= ip when oe = '1' else 'Z'; end concurrent; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF8 is port ( ip: in std_logic_vector(7 downto 0); oe: in std_logic; op: out std_logic_vector(7 downto 0) ); end TRIBUF8; architecture sequential of TRIBUF8 is begin enable: process (ip,oe) begin if (oe = '1') then op <= ip; else op <= (others => 'Z'); end if; end process; end sequential; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF is port ( ip: in bit; oe: in bit; op: out bit ); end TRIBUF; architecture sequential of TRIBUF is begin enable: process (ip,oe) begin if (oe = '1') then op <= ip; else op <= null; end if; end process; end sequential; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF is port ( ip: in std_logic; oe: in std_logic; op: out std_logic ); end TRIBUF; architecture sequential of TRIBUF is begin enable: process (ip,oe) begin if (oe = '1') then op <= ip; else op <= 'Z'; end if; end process; end sequential; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity tribuffer is port ( input: in std_logic; enable: in std_logic; output: out std_logic ); end tribuffer; architecture structural of tribuffer is begin u1: tribuf port map (ip => input, oe => enable, op => output ); end structural; library ieee; use ieee.std_logic_1164.all; use work.primitive.all; entity oddParityGen is generic ( width : integer := 8 ); port (ad: in std_logic_vector (width - 1 downto 0); oddParity : out std_logic ) ; end oddParityGen; architecture scaleable of oddParityGen is signal genXor: std_logic_vector(ad'range); begin genXOR(0) <= '0'; parTree: for i in 1 to ad'high generate x1: xor2 port map (i1 => genXor(i - 1), i2 => ad(i - 1), y => genXor(i) ); end generate; oddParity <= genXor(ad'high) ; end scaleable ; library ieee; use ieee.std_logic_1164.all; entity oddParityLoop is generic ( width : integer := 8 ); port (ad: in std_logic_vector (width - 1 downto 0); oddParity : out std_logic ) ; end oddParityLoop ; architecture scaleable of oddParityLoop is begin process (ad) variable loopXor: std_logic; begin loopXor := '0'; for i in 0 to width -1 loop loopXor := loopXor xor ad( i ) ; end loop ; oddParity <= loopXor ; end process; end scaleable ; library IEEE; use IEEE.std_logic_1164.all; library IEEE; use IEEE.std_logic_1164.all; entity OR2 is port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end OR2; architecture rtl of OR2 is begin y <= '1' when i1 = '1' or i2 = '1' else '0'; end rtl; library IEEE; USE IEEE.std_logic_1164.all; entity OR2 is port ( I1, I2: in std_logic; Y: out std_logic ); end OR2; architecture simple of OR2 is begin Y <= I1 OR I2 after 10 ns; end simple; library IEEE; USE IEEE.std_logic_1164.all; package simPrimitives is component OR2 generic (tPD: time := 1 ns); port (I1, I2: in std_logic; Y: out std_logic ); end component; end simPrimitives; library IEEE; USE IEEE.std_logic_1164.all; entity OR2 is generic (tPD: time := 1 ns); port (I1, I2: in std_logic; Y: out std_logic ); end OR2; architecture simple of OR2 is begin Y <= I1 OR I2 after tPD; end simple; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity adder is port ( a,b: in std_logic_vector(3 downto 0); sum: out std_logic_vector(3 downto 0); overflow: out std_logic ); end adder; architecture concat of adder is signal localSum: std_logic_vector(4 downto 0); begin localSum <= std_logic_vector(unsigned('0' & a) + unsigned('0' & b)); sum <= localSum(3 downto 0); overflow <= localSum(4); end concat; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity paramDFF is generic (size: integer := 8); port ( data: in std_logic_vector(size - 1 downto 0); clock: in std_logic; reset: in std_logic; ff_enable: in std_logic; op_enable: in std_logic; qout: out std_logic_vector(size - 1 downto 0) ); end paramDFF; architecture parameterize of paramDFF is signal reg: std_logic_vector(size - 1 downto 0); begin u1: pDFFE generic map (n => size) port map (d => data, clk =>clock, rst => reset, en => ff_enable, q => reg ); u2: pTRIBUF generic map (n => size) port map (ip => reg, oe => op_enable, op => qout ); end paramterize; library ieee; use ieee.std_logic_1164.all; use work.primitive.all; entity oddParityGen is generic ( width : integer := 32 ); port (ad: in std_logic_vector (width - 1 downto 0); oddParity : out std_logic ) ; end oddParityGen; architecture scaleable of oddParityGen is signal genXor: std_logic_vector(ad'range); signal one: std_logic := '1'; begin parTree: for i in ad'range generate g0: if i = 0 generate x0: xor2 port map (i1 => one, i2 => one, y => genXor(0) ); end generate; g1: if i > 0 and i <= ad'high generate x1: xor2 port map (i1 => genXor(i - 1), i2 => ad(i - 1), y => genXor(i) ); end generate; end generate; oddParity <= genXor(ad'high) ; end scaleable ; library ieee; use ieee.std_logic_1164.all; use work.primitive.all; entity oddParityGen is generic ( width : integer := 32 ); -- (2 <= width <= 32) and a power of 2 port (ad: in std_logic_vector (width - 1 downto 0); oddParity : out std_logic ) ; end oddParityGen; architecture scaleable of oddParityGen is signal stage0: std_logic_vector(31 downto 0); signal stage1: std_logic_vector(15 downto 0); signal stage2: std_logic_vector(7 downto 0); signal stage3: std_logic_vector(3 downto 0); signal stage4: std_logic_vector(1 downto 0); begin g4: for i in stage4'range generate g41: if (ad'length > 2) generate x4: xor2 port map (stage3(i), stage3(i + stage4'length), stage4(i)); end generate; end generate; g3: for i in stage3'range generate g31: if (ad'length > 4) generate x3: xor2 port map (stage2(i), stage2(i + stage3'length), stage3(i)); end generate; end generate; g2: for i in stage2'range generate g21: if (ad'length > 8) generate x2: xor2 port map (stage1(i), stage1(i + stage2'length), stage2(i)); end generate; end generate; g1: for i in stage1'range generate g11: if (ad'length > 16) generate x1: xor2 port map (stage0(i), stage0(i + stage1'length), stage1(i)); end generate; end generate; s1: for i in ad'range generate s14: if (ad'length = 2) generate stage4(i) <= ad(i); end generate; s13: if (ad'length = 4) generate stage3(i) <= ad(i); end generate; s12: if (ad'length = 8) generate stage2(i) <= ad(i); end generate; s11: if (ad'length = 16) generate stage1(i) <= ad(i); end generate; s10: if (ad'length = 32) generate stage0(i) <= ad(i); end generate; end generate; genPar: xor2 port map (stage4(0), stage4(1), oddParity); end scaleable ; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity powerOfFour is port( clk : in std_logic; inputVal : in unsigned(3 downto 0); power : out unsigned(15 downto 0) ); end powerOfFour; architecture behavioral of powerOfFour is function Pow( N, Exp : integer ) return integer is Variable Result : integer := 1; begin for i in 1 to Exp loop Result := Result * N; end loop; return( Result ); end Pow; signal inputValInt: integer range 0 to 15; signal powerL: integer range 0 to 65535; begin inputValInt <= to_integer(inputVal); power <= to_unsigned(powerL,16); process begin wait until Clk = '1'; powerL <= Pow(inputValInt,4); end process; end behavioral; package PowerPkg is component Power port( Clk : in bit; inputVal : in bit_vector(0 to 3); power : out bit_vector(0 to 15) ); end component; end PowerPkg; use work.bv_math.all; use work.int_math.all; use work.PowerPkg.all; entity Power is port( Clk : in bit; inputVal : in bit_vector(0 to 3); power : out bit_vector(0 to 15) ); end Power; architecture funky of Power is function Pow( N, Exp : integer ) return integer is Variable Result : integer := 1; Variable i : integer := 0; begin while( i < Exp ) loop Result := Result * N; i := i + 1; end loop; return( Result ); end Pow; function RollVal( CntlVal : integer ) return integer is begin return( Pow( 2, CntlVal ) + 2 ); end RollVal; begin process begin wait until Clk = '1'; power <= i2bv(Rollval(bv2I(inputVal)),16); end process; end funky; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity priority_encoder is port (interrupts : in std_logic_vector(7 downto 0); priority : in std_logic_vector(2 downto 0); result : out std_logic_vector(2 downto 0) ); end priority_encoder; architecture behave of priority_encoder is begin process (interrupts) variable selectIn : integer; variable LoopCount : integer; begin LoopCount := 1; selectIn := to_integer(to_unsigned(priority)); while (LoopCount <= 7) and (interrupts(selectIn) /= '0') loop if (selectIn = 0) then selectIn := 7; else selectIn := selectIn - 1; end if; LoopCount := LoopCount + 1; end loop; result <= std_logic_vector(to_unsigned(selectIn,3)); end process; end behave; library IEEE; use IEEE.std_logic_1164.all; package primitive is component DFFE port ( d: in std_logic; q: out std_logic; en: in std_logic; clk: in std_logic ); end component; component DFFE_SR port ( d: in std_logic; en: in std_logic; clk: in std_logic; rst: in std_logic; prst: in std_logic; q: out std_logic ); end component; component DLATCHH port ( d: in std_logic; en: in std_logic; q: out std_logic ); end component; component AND2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component OR2 port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end component; component INVERTER port ( i: in std_logic; o: out std_logic ); end component; component TRIBUF port ( ip: in std_logic; oe: in std_logic; op: out std_logic ); end component; component BIDIR port ( ip: in std_logic; oe: in std_logic; op_fb: out std_logic; op: inout std_logic ); end component; end package; library IEEE; use IEEE.std_logic_1164.all; entity DFFE is port ( d: in std_logic; q: out std_logic; en: in std_logic; clk: in std_logic ); end DFFE; architecture rtl of DFFE is begin process begin wait until clk = '1'; if (en = '1') then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DFFE_SR is port ( d: in std_logic; en: in std_logic; clk: in std_logic; rst: in std_logic; prst: in std_logic; q: out std_logic ); end DFFE_SR; architecture rtl of DFFE_SR is begin process (clk, rst, prst) begin if (rst = '1') then q <= '0'; elsif (prst = '1') then q <= '1'; elsif (clk'event and clk = '1') then if (en = '1') then q <= d; end if; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity DLATCHH is port ( d: in std_logic; en: in std_logic; q: out std_logic ); end DLATCHH; architecture rtl of DLATCHH is begin process (en) begin if (en = '1') then q <= d; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity AND2 is port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end AND2; architecture rtl of AND2 is begin y <= '1' when i1 = '1' and i2 = '1' else '0'; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity OR2 is port ( i1: in std_logic; i2: in std_logic; y: out std_logic ); end OR2; architecture rtl of OR2 is begin y <= '1' when i1 = '1' or i2 = '1' else '0'; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity INVERTER is port ( i: in std_logic; o: out std_logic ); end INVERTER; architecture rtl of INVERTER is begin o <= not i; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity TRIBUF is port ( ip: in std_logic; oe: in std_logic; op: out std_logic ); end TRIBUF; architecture rtl of TRIBUF is begin op <= ip when oe = '1' else 'Z'; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity BIDIR is port ( ip: in std_logic; oe: in std_logic; op_fb: out std_logic; op: inout std_logic ); end BIDIR; architecture rtl of BIDIR is begin op <= ip when oe = '1' else 'Z'; op_fb <= op; end rtl; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity progPulse is port ( clk, reset: in std_logic; loadLength,loadDelay: in std_logic; data: in std_logic_vector(7 downto 0); pulse: out std_logic ); end progPulse; architecture rtl of progPulse is signal downCnt, downCntData: unsigned(7 downto 0); signal downCntLd, downCntEn: std_logic; signal delayCntVal, pulseCntVal: unsigned(7 downto 0); signal startPulse, endPulse: std_logic; subtype fsmType is std_logic_vector(1 downto 0); constant loadDelayCnt : fsmType := "00"; constant waitDelayEnd : fsmType := "10"; constant loadLengthCnt : fsmType := "11"; constant waitLengthEnd : fsmType := "01"; signal currState, nextState: fsmType; begin delayreg: process (clk, reset) begin if reset = '1' then delayCntVal <= "11111111"; elsif clk'event and clk = '1' then if loadDelay = '1' then delayCntVal <= to_unsigned(data); end if; end if; end process; lengthReg: process (clk, reset) begin if reset = '1' then pulseCntVal <= "11111111"; elsif clk'event and clk = '1' then if loadDelay = '1' then pulseCntVal <= to_unsigned(data); end if; end if; end process; nextStProc: process (currState, downCnt, loadDelay, loadLength) begin case currState is when loadDelayCnt => nextState <= waitDelayEnd; when waitDelayEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (downCnt = 0) then nextState <= loadLengthCnt; else nextState <= waitDelayEnd; end if; when loadLengthCnt => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; else nextState <= waitLengthEnd; end if; when waitLengthEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (downCnt = 0) then nextState <= loadDelayCnt; else nextState <= waitDelayEnd; end if; when others => null; end case; end process nextStProc; currStProc: process (clk, reset) begin if (reset = '1') then currState <= loadDelayCnt; elsif (clk'event and clk = '1') then currState <= nextState; end if; end process currStProc; outConProc: process (currState, delayCntVal, pulseCntVal) begin case currState is when loadDelayCnt => downCntEn <= '0'; downCntLd <= '1'; downCntData <= delayCntVal; when waitDelayEnd => downCntEn <= '1'; downCntLd <= '0'; downCntData <= delayCntVal; when loadLengthCnt => downCntEn <= '0'; downCntLd <= '1'; downCntData <= pulseCntVal; when waitLengthEnd => downCntEn <= '1'; downCntLd <= '0'; downCntData <= pulseCntVal; when others => downCntEn <= '0'; downCntLd <= '1'; downCntData <= pulseCntVal; end case; end process outConProc; downCntr: process (clk,reset) begin if (reset = '1') then downCnt <= "00000000"; elsif (clk'event and clk = '1') then if (downCntLd = '1') then downCnt <= downCntData; elsif (downCntEn = '1') then downCnt <= downCnt - 1; else downCnt <= downCnt; end if; end if; end process; -- Assign pulse output pulse <= currState(0); end rtl; library ieee; use ieee.std_logic_1164.all; entity pulseErr is port (a: in std_logic; b: out std_logic ); end pulseErr; architecture behavior of pulseErr is signal c: std_logic; begin pulse: process (a,c) begin b <= c XOR a; c <= a; end process; end behavior; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity progPulse is port ( clk, reset: in std_logic; loadLength,loadDelay: in std_logic; data: in std_logic_vector(7 downto 0); pulse: out std_logic ); end progPulse; architecture rtl of progPulse is signal downCnt, downCntData: unsigned(7 downto 0); signal downCntLd, downCntEn: std_logic; signal delayCntVal, pulseCntVal: unsigned(7 downto 0); signal startPulse, endPulse: std_logic; type progPulseFsmType is (loadDelayCnt, waitDelayEnd, loadLengthCnt, waitLengthEnd); signal currState, nextState: progPulseFsmType; begin delayreg: process (clk, reset) begin if reset = '1' then delayCntVal <= "11111111"; elsif clk'event and clk = '1' then if loadDelay = '1' then delayCntVal <= to_unsigned(data); end if; end if; end process; lengthReg: process (clk, reset) begin if reset = '1' then pulseCntVal <= "11111111"; elsif clk'event and clk = '1' then if loadDelay = '1' then pulseCntVal <= to_unsigned(data); end if; end if; end process; nextStProc: process (currState, downCnt, loadDelay, loadLength) begin case currState is when loadDelayCnt => nextState <= waitDelayEnd; when waitDelayEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (downCnt = 0) then nextState <= loadLengthCnt; else nextState <= waitDelayEnd; end if; when loadLengthCnt => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; else nextState <= waitLengthEnd; end if; when waitLengthEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (downCnt = 0) then nextState <= loadDelayCnt; else nextState <= waitDelayEnd; end if; when others => null; end case; end process nextStProc; currStProc: process (clk, reset) begin if (reset = '1') then currState <= loadDelayCnt; elsif (clk'event and clk = '1') then currState <= nextState; end if; end process currStProc; outConProc: process (currState, delayCntVal, pulseCntVal) begin case currState is when loadDelayCnt => downCntEn <= '0'; downCntLd <= '1'; downCntData <= delayCntVal; pulse <= '0'; when waitDelayEnd => downCntEn <= '1'; downCntLd <= '0'; downCntData <= delayCntVal; pulse <= '0'; when loadLengthCnt => downCntEn <= '0'; downCntLd <= '1'; downCntData <= pulseCntVal; pulse <= '1'; when waitLengthEnd => downCntEn <= '1'; downCntLd <= '0'; downCntData <= pulseCntVal; pulse <= '1'; when others => downCntEn <= '0'; downCntLd <= '1'; downCntData <= pulseCntVal; pulse <= '0'; end case; end process outConProc; downCntr: process (clk,reset) begin if (reset = '1') then downCnt <= "00000000"; elsif (clk'event and clk = '1') then if (downCntLd = '1') then downCnt <= downCntData; elsif (downCntEn = '1') then downCnt <= downCnt - 1; else downCnt <= downCnt; end if; end if; end process; end rtl; library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity progPulseFsm is port ( downCnt: in std_logic_vector(7 downto 0); delayCntVal: in std_logic_vector(7 downto 0); lengthCntVal: in std_logic_vector(7 downto 0); loadLength: in std_logic; loadDelay: in std_logic; clk: in std_logic; reset: in std_logic; downCntEn: out std_logic; downCntLd: out std_logic; downCntData: out std_logic_vector(7 downto 0); pulse: out std_logic ); end progPulseFsm; architecture fsm of progPulseFsm is type progPulseFsmType is (loadDelayCnt, waitDelayEnd, loadLengthCnt, waitLengthEnd); type stateVec is array (3 downto 0) of std_logic; type stateBits is array (progPulseFsmType) of stateVec; signal loadVal: std_logic; constant stateTable: stateBits := ( loadDelayCnt => "0010", waitDelayEnd => "0100", loadLengthCnt => "0011", waitLengthEnd => "1101" ); -- ^^^^ -- ||||__ loadVal -- |||___ downCntLd -- ||____ downCntEn -- |_____ pulse signal currState, nextState: progPulseFsmType; begin nextStProc: process (currState, downCnt, loadDelay, loadLength) begin case currState is when loadDelayCnt => nextState <= waitDelayEnd; when waitDelayEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (to_unsigned(downCnt) = 0) then nextState <= loadLengthCnt; else nextState <= waitDelayEnd; end if; when loadLengthCnt => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; else nextState <= waitLengthEnd; end if; when waitLengthEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (to_unsigned(downCnt) = 0) then nextState <= loadDelayCnt; else nextState <= waitDelayEnd; end if; when others => null; end case; end process nextStProc; currStProc: process (clk, reset) begin if (reset = '1') then currState <= loadDelayCnt; elsif (clk'event and clk = '1') then currState <= nextState; end if; end process currStProc; pulse <= stateTable(currState)(3); downCntEn <= stateTable(currState)(2); downCntLd <= stateTable(currState)(1); loadVal <= stateTable(currState)(0); downCntData <= delayCntVal when loadVal = '0' else lengthCntVal; end fsm; -- Incorporates Errata 6.1 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity progPulseFsm is port ( downCnt: in std_logic_vector(7 downto 0); delayCntVal: in std_logic_vector(7 downto 0); lengthCntVal: in std_logic_vector(7 downto 0); loadLength: in std_logic; loadDelay: in std_logic; clk: in std_logic; reset: in std_logic; downCntEn: out std_logic; downCntLd: out std_logic; downtCntData: out std_logic_vector(7 downto 0); pulse: out std_logic ); end progPulseFsm; architecture fsm of progPulseFsm is type progPulseFsmType is (loadDelayCnt, waitDelayEnd, loadLengthCnt, waitLengthEnd); signal currState, nextState: progPulseFsmType; signal downCntL: unsigned (7 downto 0); begin downCntL <= to_unsigned(downCnt); -- convert downCnt to unsigned nextStProc: process (currState, downCntL, loadDelay, loadLength) begin case currState is when loadDelayCnt => nextState <= waitDelayEnd; when waitDelayEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (downCntL = 0) then nextState <= loadLengthCnt; else nextState <= waitDelayEnd; end if; when loadLengthCnt => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; else nextState <= waitLengthEnd; end if; when waitLengthEnd => if (loadDelay = '1' or loadLength = '1') then nextState <= loadDelayCnt; elsif (downCntL = 0) then nextState <= loadDelayCnt; else nextState <= waitDelayEnd; end if; when others => null; end case; end process nextStProc; currStProc: process (clk, reset) begin if (reset = '1') then currState <= loadDelayCnt; elsif (clk'event and clk = '1') then currState <= nextState; end if; end process currStProc; outConProc: process (currState, delayCntVal, lengthCntVal) begin case currState is when loadDelayCnt => downCntEn <= '0'; downCntLd <= '1'; downtCntData <= delayCntVal; pulse <= '0'; when waitDelayEnd => downCntEn <= '1'; downCntLd <= '0'; downtCntData <= delayCntVal; pulse <= '0'; when loadLengthCnt => downCntEn <= '0'; downCntLd <= '1'; downtCntData <= lengthCntVal; pulse <= '1'; when waitLengthEnd => downCntEn <= '1'; downCntLd <= '0'; downtCntData <= lengthCntVal; pulse <= '1'; when others => downCntEn <= '0'; downCntLd <= '1'; downtCntData <= delayCntVal; pulse <= '0'; end case; end process outConProc; end fsm; -- Incorporates errata 5.4 library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use work.specialFunctions.all; entity powerOfFour is port( clk : in std_logic; inputVal : in std_logic_vector(3 downto 0); power : out std_logic_vector(15 downto 0) ); end powerOfFour; architecture behavioral of powerOfFour is begin process begin wait until Clk = '1'; power <= std_logic_vector(to_unsigned(Pow(to_integer(unsigned(inputVal)),4),16)); end process; end behavioral; -- Incorporate errata 5.4 library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity powerOfFour is port( clk : in std_logic; inputVal : in std_logic_vector(3 downto 0); power : out std_logic_vector(15 downto 0) ); end powerOfFour; architecture behavioral of powerOfFour is function Pow( N, Exp : integer ) return integer is Variable Result : integer := 1; begin for i in 1 to Exp loop Result := Result * N; end loop; return( Result ); end Pow; begin process begin wait until Clk = '1'; power <= std_logic_vector(to_unsigned(Pow(to_integer(to_unsigned(inputVal)),4),16)); end process; end behavioral; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity powerOfFour is port( clk : in std_logic; inputVal : in std_logic_vector(3 downto 0); power : out std_logic_vector(15 downto 0) ); end powerOfFour; architecture behavioral of powerOfFour is function Pow( N, Exp : integer ) return integer is Variable Result : integer := 1; begin for i in 1 to Exp loop Result := Result * N; end loop; return( Result ); end Pow; begin process begin wait until Clk = '1'; power <= conv_std_logic_vector(Pow(conv_integer(inputVal),4),16); end process; end behavioral; library IEEE; use IEEE.std_logic_1164.all; entity regFile is port ( clk, rst: in std_logic; data: in std_logic_vector(31 downto 0); regSel: in std_logic_vector(1 downto 0); wrEnable: in std_logic; regOut: out std_logic_vector(31 downto 0) ); end regFile; architecture behavioral of regFile is subtype reg is std_logic_vector(31 downto 0); type regArray is array (integer range <>) of reg; signal registerFile: regArray(0 to 3); begin regProc: process (clk, rst) variable i: integer; begin i := 0; if rst = '1' then while i <= registerFile'high loop registerFile(i) <= (others => '0'); i := i + 1; end loop; elsif clk'event and clk = '1' then if (wrEnable = '1') then case regSel is when "00" => registerFile(0) <= data; when "01" => registerFile(1) <= data; when "10" => registerFile(2) <= data; when "11" => registerFile(3) <= data; when others => null; end case; end if; end if; end process; outputs: process(regSel, registerFile) begin case regSel is when "00" => regOut <= registerFile(0); when "01" => regOut <= registerFile(1); when "10" => regOut <= registerFile(2); when "11" => regOut <= registerFile(3); when others => null; end case; end process; end behavioral; library IEEE; use IEEE.std_logic_1164.all; entity DFF is port ( d1,d2: in std_logic; q1,q2: out std_logic; clk: in std_logic; rst : in std_logic ); end DFF; architecture rtl of DFF is begin resetLatch: process (clk, rst) begin if rst = '1' then q1 <= '0'; elsif clk'event and clk = '1' then q1 <= d1; q2 <= d2; end if; end process; end rtl; library ieee; use ieee.std_logic_1164.all; entity resFcnDemo is port ( a, b: in std_logic; oeA,oeB: in std_logic; result: out std_logic ); end resFcnDemo; architecture multiDriver of resFcnDemo is begin result <= a when oeA = '1' else 'Z'; result <= b when oeB = '1' else 'Z'; end multiDriver; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity scaleDFF is port ( data: in std_logic_vector(7 downto 0); clock: in std_logic; enable: in std_logic; qout: out std_logic_vector(7 downto 0) ); end scaleDFF; architecture scalable of scaleDFF is begin u1: sDFFE port map (d => data, clk =>clock, en => enable, q => qout ); end scalable; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity sevenSegment is port ( bcdInputs: in std_logic_vector (3 downto 0); a_n, b_n, c_n, d_n, e_n, f_n, g_n: out std_logic ); end sevenSegment; architecture behavioral of sevenSegment is signal la_n, lb_n, lc_n, ld_n, le_n, lf_n, lg_n: std_logic; signal oe: std_logic; begin bcd2sevSeg: process (bcdInputs) begin -- Assign default to "off" la_n <= '1'; lb_n <= '1'; lc_n <= '1'; ld_n <= '1'; le_n <= '1'; lf_n <= '1'; lg_n <= '1'; case bcdInputs is when "0000" => la_n <= '0'; lb_n <= '0'; lc_n <= '0'; ld_n <= '0'; le_n <= '0'; lf_n <= '0'; when "0001" => lb_n <= '0'; lc_n <= '0'; when "0010" => la_n <= '0'; lb_n <= '0'; ld_n <= '0'; le_n <= '0'; lg_n <= '0'; when "0011" => la_n <= '0'; lb_n <= '0'; lc_n <= '0'; ld_n <= '0'; lg_n <= '0'; when "0100" => lb_n <= '0'; lc_n <= '0'; lf_n <= '0'; lg_n <= '0'; when "0101" => la_n <= '0'; lc_n <= '0'; ld_n <= '0'; lf_n <= '0'; lg_n <= '0'; when "0110" => la_n <= '0'; lc_n <= '0'; ld_n <= '0'; le_n <= '0'; lf_n <= '0'; lg_n <= '0'; when "0111" => la_n <= '0'; lb_n <= '0'; lc_n <= '0'; when "1000" => la_n <= '0'; lb_n <= '0'; lc_n <= '0'; ld_n <= '0'; le_n <= '0'; lf_n <= '0'; lg_n <= '0'; when "1001" => la_n <= '0'; lb_n <= '0'; lc_n <= '0'; ld_n <= '0'; lf_n <= '0'; lg_n <= '0'; -- All other inputs possibilities are "don't care" when others => la_n <= 'X'; lb_n <= 'X'; lc_n <= 'X'; ld_n <= 'X'; le_n <= 'X'; lf_n <= 'X'; lg_n <= 'X'; end case; end process bcd2sevSeg; -- Disable outputs for all invalid input values oe <= '1' when (bcdInputs < 10) else '0'; a_n <= la_n when oe = '1' else 'Z'; b_n <= lb_n when oe = '1' else 'Z'; c_n <= lc_n when oe = '1' else 'Z'; d_n <= ld_n when oe = '1' else 'Z'; e_n <= le_n when oe = '1' else 'Z'; f_n <= lf_n when oe = '1' else 'Z'; g_n <= lg_n when oe = '1' else 'Z'; end behavioral; library ieee; use ieee.std_logic_1164.all; use std.textio.all; entity sevenSegmentTB is end sevenSegmentTB; architecture testbench of sevenSegmentTB is component sevenSegment port ( bcdInputs: in std_logic_vector (3 downto 0); a_n, b_n, c_n, d_n, e_n, f_n, g_n: out std_logic ); end component; type vector is record bcdStimulus: std_logic_vector(3 downto 0); sevSegOut: std_logic_vector(6 downto 0); end record; constant NumVectors: integer:= 17; constant PropDelay: time := 40 ns; constant SimLoopDelay: time := 10 ns; type vectorArray is array (0 to NumVectors - 1) of vector; constant vectorTable: vectorArray := ( (bcdStimulus => "0000", sevSegOut => "0000001"), (bcdStimulus => "0001", sevSegOut => "1001111"), (bcdStimulus => "0010", sevSegOut => "0010010"), (bcdStimulus => "0011", sevSegOut => "0000110"), (bcdStimulus => "0100", sevSegOut => "1001100"), (bcdStimulus => "0101", sevSegOut => "0100100"), (bcdStimulus => "0110", sevSegOut => "0100000"), (bcdStimulus => "0111", sevSegOut => "0001111"), (bcdStimulus => "1000", sevSegOut => "0000000"), (bcdStimulus => "1001", sevSegOut => "0000100"), (bcdStimulus => "1010", sevSegOut => "ZZZZZZZ"), (bcdStimulus => "1011", sevSegOut => "ZZZZZZZ"), (bcdStimulus => "1100", sevSegOut => "ZZZZZZZ"), (bcdStimulus => "1101", sevSegOut => "ZZZZZZZ"), (bcdStimulus => "1110", sevSegOut => "ZZZZZZZ"), (bcdStimulus => "1111", sevSegOut => "ZZZZZZZ"), (bcdStimulus => "0000", sevSegOut => "0110110") -- this vector fails ); for all : sevenSegment use entity work.sevenSegment(behavioral); signal StimInputs: std_logic_vector(3 downto 0); signal CaptureOutputs: std_logic_vector(6 downto 0); begin u1: sevenSegment port map (bcdInputs => StimInputs, a_n => CaptureOutputs(6), b_n => CaptureOutputs(5), c_n => CaptureOutputs(4), d_n => CaptureOutputs(3), e_n => CaptureOutputs(2), f_n => CaptureOutputs(1), g_n => CaptureOutputs(0)); LoopStim: process variable FoundError: boolean := false; variable TempVector: vector; variable ErrorMsgLine: line; begin for i in vectorTable'range loop TempVector := vectorTable(i); StimInputs <= TempVector.bcdStimulus; wait for PropDelay; if CaptureOutputs /= TempVector.sevSegOut then write (ErrorMsgLine, string'("Vector failed at ")); write (ErrorMsgLine, now); writeline (output, ErrorMsgLine); FoundError := true; end if; wait for SimLoopDelay; end loop; assert FoundError report "No errors. All vectors passed." severity note; wait; end process; end testbench; library ieee; use ieee.std_logic_1164.all; entity sevenSegment is port ( bcdInputs: in std_logic_vector (3 downto 0); a_n, b_n, c_n, d_n, e_n, f_n, g_n: out std_logic ); end sevenSegment; architecture behavioral of sevenSegment is begin bcd2sevSeg: process (bcdInputs) begin -- Assign default to "off" a_n <= '1'; b_n <= '1'; c_n <= '1'; d_n <= '1'; e_n <= '1'; f_n <= '1'; g_n <= '1'; case bcdInputs is when "0000" => a_n <= '0'; b_n <= '0'; c_n <= '0'; d_n <= '0'; e_n <= '0'; f_n <= '0'; when "0001" => b_n <= '0'; c_n <= '0'; when "0010" => a_n <= '0'; b_n <= '0'; d_n <= '0'; e_n <= '0'; g_n <= '0'; when "0011" => a_n <= '0'; b_n <= '0'; c_n <= '0'; d_n <= '0'; g_n <= '0'; when "0100" => b_n <= '0'; c_n <= '0'; f_n <= '0'; g_n <= '0'; when "0101" => a_n <= '0'; c_n <= '0'; d_n <= '0'; f_n <= '0'; g_n <= '0'; when "0110" => a_n <= '0'; c_n <= '0'; d_n <= '0'; e_n <= '0'; f_n <= '0'; g_n <= '0'; when "0111" => a_n <= '0'; b_n <= '0'; c_n <= '0'; when "1000" => a_n <= '0'; b_n <= '0'; c_n <= '0'; d_n <= '0'; e_n <= '0'; f_n <= '0'; g_n <= '0'; when "1001" => a_n <= '0'; b_n <= '0'; c_n <= '0'; d_n <= '0'; f_n <= '0'; g_n <= '0'; when others => null; end case; end process bcd2sevSeg; end behavioral; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity ForceShare is port ( a,b,c,d,e,f: in std_logic_vector (7 downto 0); result: out std_logic_vector(7 downto 0) ); end ForceShare; architecture behaviour of ForceShare is begin sum: process (a,c,b,d,e,f) variable tempSum: std_logic_vector(7 downto 0); begin tempSum := a + b; -- temporary node for sum if (tempSum = "10011010") then result <= c; elsif (tempSum = "01011001") then result <= d; elsif (tempSum = "10111011") then result <= e; else result <= f; end if; end process; end behaviour; library IEEE; use IEEE.std_logic_1164.all; entity shifter is port ( clk, rst: in std_logic; shiftEn,shiftIn: std_logic; q: out std_logic_vector (15 downto 0) ); end shifter; architecture behav of shifter is signal qLocal: std_logic_vector(15 downto 0); begin shift: process (clk, rst) begin if (rst = '1') then qLocal <= (others => '0'); elsif (clk'event and clk = '1') then if (shiftEn = '1') then qLocal <= qLocal(14 downto 0) & shiftIn; else qLocal <= qLocal; end if; end if; q <= qLocal; end process; end behav; library ieee; use ieee.std_logic_1164.all; entity lastAssignment is port (a, b: in std_logic; selA, selb: in std_logic; result: out std_logic ); end lastAssignment; architecture behavioral of lastAssignment is begin demo: process (a,b,selA,selB) begin if (selA = '1') then result <= a; else result <= '0'; end if; if (selB = '1') then result <= b; else result <= '0'; end if; end process demo; end behavioral; library ieee; use ieee.std_logic_1164.all; entity signalDemo is port ( a: in std_logic; b: out std_logic ); end signalDemo; architecture basic of signalDemo is signal c: std_logic; begin demo: process (a) begin c <= a; if c = '0' then b <= a; else b <= '0'; end if; end process; end basic; library ieee; use ieee.std_logic_1164.all; entity signalDemo is port ( a: in std_logic; b: out std_logic ); end signalDemo; architecture basic of signalDemo is signal c: std_logic; begin demo: process (a) begin c <= a; if c = '1' then b <= a; else b <= '0'; end if; end process; end basic; library IEEE; USE IEEE.std_logic_1164.all; package simPrimitives is component OR2 generic (tPD: time := 1 ns); port (I1, I2: in std_logic; Y: out std_logic ); end component; component SimDFF generic(tCQ: time := 1 ns; tS : time := 1 ns; tH : time := 1 ns ); port (D, Clk: in std_logic; Q: out std_logic ); end component; end simPrimitives; library IEEE; USE IEEE.std_logic_1164.all; entity OR2 is generic (tPD: time := 1 ns); port (I1, I2: in std_logic; Y: out std_logic ); end OR2; architecture simple of OR2 is begin Y <= I1 OR I2 after tPD; end simple; library IEEE; use IEEE.std_logic_1164.all; entity SimDFF is generic(tCQ: time := 1 ns; tS : time := 1 ns; tH : time := 1 ns ); port (D, Clk: in std_logic; Q: out std_logic ); end SimDff; architecture SimModel of SimDFF is begin reg: process (Clk, D) begin -- Assign output tCQ after rising clock edge if (Clk'event and Clk = '1') then Q <= D after tCQ; end if; -- Check setup time if (Clk'event and Clk = '1') then assert (D'last_event >= tS) report "Setup time violation" severity Warning; end if; -- Check hold time if (D'event and Clk'stable and Clk = '1') then assert (D'last_event - Clk'last_event > tH) report "Hold Time Violation" severity Warning; end if; end process; end simModel; library IEEE; use IEEE.std_logic_1164.all; entity SRFF is port ( s,r: in std_logic; clk: in std_logic; q: out std_logic ); end SRFF; architecture rtl of SRFF is begin process begin wait until rising_edge(clk); if s = '0' and r = '1' then q <= '0'; elsif s = '1' and r = '0' then q <= '1'; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; entity SRFF is port ( s,r: in std_logic; clk: in std_logic; q: out std_logic ); end SRFF; architecture rtl of SRFF is begin process begin wait until clk = '1'; if s = '0' and r = '1' then q <= '0'; elsif s = '1' and r = '0' then q <= '1'; end if; end process; end rtl; library IEEE; use IEEE.std_logic_1164.all; package scaleable is component scaleUpCnt port ( clk: in std_logic; reset: in std_logic; cnt: in std_logic_vector ); end component; end scaleable; library IEEE; use IEEE.std_logic_1164.all; use work.primitive.all; entity scaleUpCnt is port ( clk: in std_logic; reset: in std_logic; cnt: out std_logic_vector ); end scaleUpCnt; architecture scaleable of scaleUpCnt is signal one: std_logic := '1'; signal cntL: std_logic_vector(cnt'range); signal andTerm: std_logic_vector(cnt'range); begin -- Special case is the least significant bit lsb: tff port map (t => one, reset => reset, clk => clk, q => cntL(cntL'low) ); andTerm(0) <= cntL(cntL'low); -- General case for all other bits genAnd: for i in 1 to cntL'high generate andTerm(i) <= andTerm(i - 1) and cntL(i); end generate; genTFF: for i in 1 to cntL'high generate t1: tff port map (t => andTerm(i), clk => clk, reset => reset, q => cntl(i) ); end generate; cnt <= CntL; end scaleable; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(2 downto 0); constant Idle: targetFsmType := "000"; constant B_Busy: targetFsmType := "101"; constant Backoff: targetFsmType := "010"; constant S_Data: targetFsmType := "011"; constant Turn_Ar: targetFsmType := "110"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when IDLE => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when B_BUSY => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= IDLE; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= BACKOFF; else nextState <= B_BUSY; end if; when S_DATA => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= BACKOFF; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= TURN_AR; else nextState <= S_DATA; end if; when BACKOFF => if PCI_Frame_n = '1' then nextState <= TURN_AR; else nextState <= BACKOFF; end if; when TURN_AR => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when others => null; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(2 downto 0); constant Idle: targetFsmType := "000"; constant B_Busy: targetFsmType := "001"; constant Backoff: targetFsmType := "011"; constant S_Data: targetFsmType := "010"; constant Turn_Ar: targetFsmType := "110"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when IDLE => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when B_BUSY => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= IDLE; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= BACKOFF; else nextState <= B_BUSY; end if; when S_DATA => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= BACKOFF; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= TURN_AR; else nextState <= S_DATA; end if; when BACKOFF => if PCI_Frame_n = '1' then nextState <= TURN_AR; else nextState <= BACKOFF; end if; when TURN_AR => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when others => null; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(2 downto 0); constant Idle: targetFsmType := "000"; constant B_Busy: targetFsmType := "001"; constant Backoff: targetFsmType := "010"; constant S_Data: targetFsmType := "011"; constant Turn_Ar: targetFsmType := "100"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when IDLE => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when B_BUSY => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= IDLE; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= BACKOFF; else nextState <= B_BUSY; end if; when S_DATA => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= BACKOFF; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= TURN_AR; else nextState <= S_DATA; end if; when BACKOFF => if PCI_Frame_n = '1' then nextState <= TURN_AR; else nextState <= BACKOFF; end if; when TURN_AR => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when others => null; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(3 downto 0); constant Idle: targetFsmType := "0000"; constant B_Busy: targetFsmType := "0001"; constant Backoff: targetFsmType := "0011"; constant S_Data: targetFsmType := "1100"; constant Turn_Ar: targetFsmType := "1101"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when IDLE => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when B_BUSY => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= IDLE; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= BACKOFF; else nextState <= B_BUSY; end if; when S_DATA => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= BACKOFF; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= TURN_AR; else nextState <= S_DATA; end if; when BACKOFF => if PCI_Frame_n = '1' then nextState <= TURN_AR; else nextState <= BACKOFF; end if; when TURN_AR => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when others => null; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(2 downto 0); constant Idle: targetFsmType := "000"; constant B_Busy: targetFsmType := "101"; constant Backoff: targetFsmType := "010"; constant S_Data: targetFsmType := "011"; constant Turn_Ar: targetFsmType := "110"; constant Dont_Care: targetFsmType := "XXX"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when IDLE => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when B_BUSY => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= IDLE; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= BACKOFF; else nextState <= B_BUSY; end if; when S_DATA => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= BACKOFF; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= TURN_AR; else nextState <= S_DATA; end if; when BACKOFF => if PCI_Frame_n = '1' then nextState <= TURN_AR; else nextState <= BACKOFF; end if; when TURN_AR => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when others => nextState <= Dont_Care; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin -- Set default output assignments OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Stop_n: out std_logic; -- PCI Stop# PCI_Trdy_n: out std_logic; -- PCI Trdy# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; type targetFsmType is (Idle, B_Busy, Backoff, S_Data, Turn_Ar); signal currState, nextState: targetFsmType; begin -- Process to generate next state logic nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when Idle => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_Busy; else nextState <= Idle; end if; when B_Busy => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= Idle; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= Backoff; else nextState <= B_Busy; end if; when S_Data => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= Backoff; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= Turn_Ar; else nextState <= S_Data; end if; when Backoff => if PCI_Frame_n = '1' then nextState <= Turn_Ar; else nextState <= Backoff; end if; when Turn_Ar => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_Busy; else nextState <= Idle; end if; when others => null; end case; end process nxtStProc; -- Process to register the current state curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; -- Process to generate outputs outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; -- Assign output ports PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; -- Incorporates Errata 10.1 and 10.2 library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(4 downto 0); constant Idle: integer := 0; constant B_Busy: integer := 1; constant Backoff: integer := 2; constant S_Data: integer := 3; constant Turn_Ar: integer := 4; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin nextState <= (others => '0'); if currState(Idle) = '1' then if (PCI_Frame_n = '0' and Hit = '0') then nextState(B_Busy) <= '1'; else nextState(Idle) <= '1'; end if; end if; if currState(B_Busy) = '1' then if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState(Idle) <= '1'; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState(S_Data) <= '1'; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState(Backoff) <= '1'; else nextState(B_Busy) <= '1'; end if; end if; if currState(S_Data) = '1' then if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState(Backoff) <= '1'; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState(Turn_Ar) <= '1'; else nextState(S_Data) <= '1'; end if; end if; if currState(Backoff) = '1' then if PCI_Frame_n = '1' then nextState(Turn_Ar) <= '1'; else nextState(Backoff) <= '1'; end if; end if; if currState(Turn_Ar) = '1' then if (PCI_Frame_n = '0' and Hit = '0') then nextState(B_Busy) <= '1'; else nextState(Idle) <= '1'; end if; end if; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= (others => '0'); -- per Errata 10.2 currState(Idle) <= '1'; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; -- defaults per errata 10.1 OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; if (currState(S_Data) = '1') then if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; end if; if (currState(Backoff) = '1') then if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; end if; if (currState(Turn_Ar) = '1') then OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; end if; if (currState(Idle) = '1' or currState(B_Busy) = '1') then OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end if; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(2 downto 0); constant Idle: targetFsmType := "000"; constant B_Busy: targetFsmType := "001"; constant Backoff: targetFsmType := "011"; constant S_Data: targetFsmType := "110"; constant Turn_Ar: targetFsmType := "100"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when IDLE => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when B_BUSY => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= IDLE; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= BACKOFF; else nextState <= B_BUSY; end if; when S_DATA => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= BACKOFF; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= TURN_AR; else nextState <= S_DATA; end if; when BACKOFF => if PCI_Frame_n = '1' then nextState <= TURN_AR; else nextState <= BACKOFF; end if; when TURN_AR => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_BUSY; else nextState <= IDLE; end if; when others => nextState <= IDLE; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin -- Set default output assignments OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library IEEE; use IEEE.std_logic_1164.all; entity pci_target is port ( PCI_Frame_n: in std_logic; -- PCI Frame# PCI_Irdy_n: in std_logic; -- PCI Irdy# Hit: in std_logic; -- Hit on address decode D_Done: in std_logic; -- Device decode complete Term: in std_logic; -- Terminate transaction Ready: in std_logic; -- Ready to transfer data Cmd_Write: in std_logic; -- Command is Write Cmd_Read: in std_logic; -- Command is Read T_Abort: in std_logic; -- Target error - abort transaction PCI_Clk: in std_logic; -- PCI Clock PCI_Reset_n: in std_logic; -- PCI Reset# PCI_Devsel_n: out std_logic; -- PCI Devsel# PCI_Trdy_n: out std_logic; -- PCI Trdy# PCI_Stop_n: out std_logic; -- PCI Stop# OE_AD: out std_logic; -- PCI AD bus enable OE_Trdy_n: out std_logic; -- PCI Trdy# enable OE_Stop_n: out std_logic; -- PCI Stop# enable OE_Devsel_n: out std_logic -- PCI Devsel# enable ); end pci_target; architecture fsm of pci_target is signal LPCI_Devsel_n, LPCI_Trdy_n, LPCI_Stop_n: std_logic; subtype targetFsmType is std_logic_vector(2 downto 0); constant Idle: targetFsmType := "000"; constant B_Busy: targetFsmType := "001"; constant Backoff: targetFsmType := "011"; constant S_Data: targetFsmType := "110"; constant Turn_Ar: targetFsmType := "100"; signal currState, nextState: targetFsmType; begin nxtStProc: process (currState, PCI_Frame_n, Hit, D_Done, PCI_Irdy_n, LPCI_Trdy_n, LPCI_Devsel_n, LPCI_Stop_n, Term, Ready) begin case currState is when Idle => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_Busy; else nextState <= Idle; end if; when B_Busy => if (PCI_Frame_n ='1' and D_Done = '1') or (PCI_Frame_n = '1' and D_Done = '0' and LPCI_Devsel_n = '0') then nextState <= Idle; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '0' or (Term = '1' and Ready = '1') ) then nextState <= S_Data; elsif (PCI_Frame_n = '0' or PCI_Irdy_n = '0') and Hit = '1' and (Term = '1' and Ready = '0') then nextState <= Backoff; else nextState <= B_Busy; end if; when S_Data => if PCI_Frame_n = '0' and LPCI_Stop_n = '0' and (LPCI_Trdy_n = '1' or PCI_Irdy_n = '0') then nextState <= Backoff; elsif PCI_Frame_n = '1' and (LPCI_Trdy_n = '0' or LPCI_Stop_n = '0') then nextState <= Turn_Ar; else nextState <= S_Data; end if; when Backoff => if PCI_Frame_n = '1' then nextState <= Turn_Ar; else nextState <= Backoff; end if; when Turn_Ar => if (PCI_Frame_n = '0' and Hit = '0') then nextState <= B_Busy; else nextState <= Idle; end if; when others => null; end case; end process nxtStProc; curStProc: process (PCI_Clk, PCI_Reset_n) begin if (PCI_Reset_n = '0') then currState <= Idle; elsif (PCI_Clk'event and PCI_Clk = '1') then currState <= nextState; end if; end process curStProc; outConProc: process (currState, Ready, T_Abort, Cmd_Write, Cmd_Read, T_Abort, Term) begin case currState is when S_Data => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; if (Ready = '1' and T_Abort = '0' and (Cmd_Write = '1' or Cmd_Read = '1')) then LPCI_Trdy_n <= '0'; else LPCI_Trdy_n <= '1'; end if; if (T_Abort = '1' or Term = '1') and (Cmd_Write = '1' or Cmd_Read = '1') then LPCI_Stop_n <= '0'; else LPCI_Stop_n <= '1'; end if; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when Backoff => if (Cmd_Read = '1') then OE_AD <= '1'; else OE_AD <= '0'; end if; LPCI_Stop_n <= '0'; OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; if (T_Abort = '0') then LPCI_Devsel_n <= '0'; else LPCI_Devsel_n <= '1'; end if; when Turn_Ar => OE_Trdy_n <= '1'; OE_Stop_n <= '1'; OE_Devsel_n <= '1'; when others => OE_Trdy_n <= '0'; OE_Stop_n <= '0'; OE_Devsel_n <= '0'; OE_AD <= '0'; LPCI_Trdy_n <= '1'; LPCI_Stop_n <= '1'; LPCI_Devsel_n <= '1'; end case; end process outConProc; PCI_Devsel_n <= LPCI_Devsel_n; PCI_Trdy_n <= LPCI_Trdy_n; PCI_Stop_n <= LPCI_Stop_n; end fsm; library ieee; use ieee.std_logic_1164.all; entity test is port ( a: in std_logic; z: out std_logic; en: in std_logic ); end test; architecture simple of test is begin z <= a when en = '1' else 'z'; end simple;
gpl-2.0
gustavowl/ProjetoOAC
ULA64bit/ula.vhd
1
13816
----------------------------------------------------------------------- -----------------------------DESLOCADOR-------------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity deslocador is port ( a: in std_logic_vector(63 downto 0); desl: in std_logic; --desloca lado: in std_logic; --0 divide 1 multiplica c: out std_logic_vector(63 downto 0); cout: out std_logic ); end deslocador; architecture deslocador of deslocador is begin c <= a(63 downto 0) when desl = '0' else '0' & a(63 downto 1) when lado = '0' else a(62 downto 0) & '0'; cout <= a(62) when lado = '1' and desl = '1' else '0'; end deslocador; ----------------------------------------------------------------------- --------------------------------MUX A---------------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity Mux8x1A is port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x: in std_logic; y: in std_logic; z: in std_logic; c: out std_logic_vector(63 downto 0); cout: out std_logic ); end Mux8x1A; architecture Mux8x1A of Mux8x1A is component deslocador port ( a: in std_logic_vector(63 downto 0); desl: in std_logic; --desloca lado: in std_logic; --0 divide 1 multiplica c: out std_logic_vector(63 downto 0); cout: out std_logic ); end component; signal temp: std_logic_vector (63 downto 0); signal tdesl, tz: std_logic; begin --seleciona o valor de saída baseado na escolha de entrada XYZ --as primeiras condições são para operações em lógica booleana --receberá o valor de A caso seja feita alguma operação algébrica --ou deslocamento de bits temp <= a and b when x = '0' and y = '1' and z = '0' else a nor b when x = '0' and y = '1' and z = '1' else a or b when x = '1' and y = '0' and z = '0' else a; --só irá efetuar deslocamento de bits caso xyz = 101 ou 110 tdesl <= '1' when x = '1' and ( ( y = '0' and z = '1') or ( y = '1' and z = '0' ) ) else '0'; --tz armazena o lado para qual será efetuado o deslocamento tz <= z; desloc: deslocador port map (temp, tdesl, tz, c, cout); end Mux8x1A; ----------------------------------------------------------------------- --------------------------------MUX B---------------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity Mux8x1B is port ( a: in std_logic_vector(63 downto 0); x: in std_logic; y: in std_logic; z: in std_logic; c: out std_logic_vector(63 downto 0) ); end Mux8x1B; architecture Mux8x1B of Mux8x1B is begin c <= "0000000000000000000000000000000000000000000000000000000000000000" when (x = '1' or y = '1') else a when z = '0' else not a; end Mux8x1B; ----------------------------------------------------------------------- --------------------------------MUX C---------------------------------- ---------------------------comparador---------------------------------- --Identifica se está fazendo subtração para CIN p/ conversão em complemento de 2 library ieee; use ieee.std_logic_1164.all; entity Mux8x1C is port ( x: in std_logic; y: in std_logic; z: in std_logic; c: out std_logic ); end Mux8x1C; architecture Mux8x1C of Mux8x1C is begin c <= '1' when (x = '0' and y = '0' and z = '1') else '0';-- or -- (x = '1' and y = '1' and z = '0') else '0'; end Mux8x1C; ----------------------------------------------------------------------- ---------------------------COMPONENTE LÓGICO--------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity CompLog is port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x, y, z: in std_logic; ia: out std_logic_vector(63 downto 0); ib: out std_logic_vector(63 downto 0); Cin: out std_logic; --p/ conversão em complemento de 2 Cout: out std_logic --p/ identificar overflow na multiplicação ); end CompLog; architecture CompLog of CompLog is component Mux8x1A port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x: in std_logic; y: in std_logic; z: in std_logic; c: out std_logic_vector(63 downto 0); cout: out std_logic ); end component; component Mux8x1B port ( a: in std_logic_vector(63 downto 0); x: in std_logic; y: in std_logic; z: in std_logic; c: out std_logic_vector(63 downto 0) ); end component; component Mux8x1C port ( x: in std_logic; y: in std_logic; z: in std_logic; c: out std_logic ); end component; begin mux8x1a0: Mux8x1A port map (a, b, x, y, z, ia, Cout); -- ia <= "01001001"; mux8x1b0: Mux8x1B port map (b, x, y, z, ib); mux8x1c0: Mux8x1C port map (x, y, z, Cin); end CompLog; ----------------------------------------------------------------------- --------------------------SOMADOR 1 BIT-------------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity somador1bit is port ( a: in std_logic; b: in std_logic; cin: in std_logic; s: out std_logic; cout: out std_logic ); end somador1bit; architecture somador1bit of somador1bit is begin cout <= (cin and a) or (cin and b) or (a and b); s <= (not cin and not a and b) or (not cin and a and not b) or (cin and not a and not b) or (cin and a and b); end somador1bit; ----------------------------------------------------------------------- --------------------------SOMADOR 16 BITS------------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity somador16bits is port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); cin: in std_logic; s: out std_logic_vector(63 downto 0); cout: out std_logic ); end somador16bits; architecture somador16bits of somador16bits is component somador1bit port ( a, b, cin: in std_logic; s, cout: out std_logic ); end component; signal ta, tb, ts: std_logic_vector(63 downto 0); signal c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58, c59, c60, c61, c62, c63: std_logic; begin ta <= a; tb <= b; s8b0: somador1bit port map (a(0), b(0), cin, ts(0), c0); s8v1: somador1bit port map (a(1), b(1), c0, ts(1), c1); s8v2: somador1bit port map (a(2), b(2), c1, ts(2), c2); s8v3: somador1bit port map (a(3), b(3), c2, ts(3), c3); s8v4: somador1bit port map (a(4), b(4), c3, ts(4), c4); s8v5: somador1bit port map (a(5), b(5), c4, ts(5), c5); s8v6: somador1bit port map (a(6), b(6), c5, ts(6), c6); s8v7: somador1bit port map (a(7), b(7), c6, ts(7), c7); s8b8: somador1bit port map (a(8), b(8), c7, ts(8), c8); s8v9: somador1bit port map (a(9), b(9), c8, ts(9), c9); s8v10: somador1bit port map (a(10), b(10), c9, ts(10), c10); s8v11: somador1bit port map (a(11), b(11), c10, ts(11), c11); s8v12: somador1bit port map (a(12), b(12), c11, ts(12), c12); s8v13: somador1bit port map (a(13), b(13), c12, ts(13), c13); s8v14: somador1bit port map (a(14), b(14), c13, ts(14), c14); s8v15: somador1bit port map (a(15), b(15), c14, ts(15), c15); s8v16: somador1bit port map (a(16), b(16), c15, ts(16), c16); s8v17: somador1bit port map (a(17), b(17), c16, ts(17), c17); s8v18: somador1bit port map (a(18), b(18), c17, ts(18), c18); s8v19: somador1bit port map (a(19), b(19), c18, ts(19), c19); s8v20: somador1bit port map (a(20), b(20), c19, ts(20), c20); s8v21: somador1bit port map (a(21), b(21), c20, ts(21), c21); s8v22: somador1bit port map (a(22), b(22), c21, ts(22), c22); s8v23: somador1bit port map (a(23), b(23), c22, ts(23), c23); s8v24: somador1bit port map (a(24), b(24), c23, ts(24), c24); s8v25: somador1bit port map (a(25), b(25), c24, ts(25), c25); s8v26: somador1bit port map (a(26), b(26), c25, ts(26), c26); s8v27: somador1bit port map (a(27), b(27), c26, ts(27), c27); s8v28: somador1bit port map (a(28), b(28), c27, ts(28), c28); s8v29: somador1bit port map (a(29), b(29), c28, ts(29), c29); s8v30: somador1bit port map (a(30), b(30), c29, ts(30), c30); s8v31: somador1bit port map (a(31), b(31), c30, ts(31), c31); s8v32: somador1bit port map (a(32), b(32), c31, ts(32), c32); s8v33: somador1bit port map (a(33), b(33), c32, ts(33), c33); s8v34: somador1bit port map (a(34), b(34), c33, ts(34), c34); s8v35: somador1bit port map (a(35), b(35), c34, ts(35), c35); s8v36: somador1bit port map (a(36), b(36), c35, ts(36), c36); s8v37: somador1bit port map (a(37), b(37), c36, ts(37), c37); s8v38: somador1bit port map (a(38), b(38), c37, ts(38), c38); s8v39: somador1bit port map (a(39), b(39), c38, ts(39), c39); s8v40: somador1bit port map (a(40), b(40), c39, ts(40), c40); s8v41: somador1bit port map (a(41), b(41), c40, ts(41), c41); s8v42: somador1bit port map (a(42), b(42), c41, ts(42), c42); s8v43: somador1bit port map (a(43), b(43), c42, ts(43), c43); s8v44: somador1bit port map (a(44), b(44), c43, ts(44), c44); s8v45: somador1bit port map (a(45), b(45), c44, ts(45), c45); s8v46: somador1bit port map (a(46), b(46), c45, ts(46), c46); s8v47: somador1bit port map (a(47), b(47), c46, ts(47), c47); s8v48: somador1bit port map (a(48), b(48), c47, ts(48), c48); s8v49: somador1bit port map (a(49), b(49), c48, ts(49), c49); s8v50: somador1bit port map (a(50), b(50), c49, ts(50), c50); s8v51: somador1bit port map (a(51), b(51), c50, ts(51), c51); s8v52: somador1bit port map (a(52), b(52), c51, ts(52), c52); s8v53: somador1bit port map (a(53), b(53), c52, ts(53), c53); s8v54: somador1bit port map (a(54), b(54), c53, ts(54), c54); s8v55: somador1bit port map (a(55), b(55), c54, ts(55), c55); s8v56: somador1bit port map (a(56), b(56), c55, ts(56), c56); s8v57: somador1bit port map (a(57), b(57), c56, ts(57), c57); s8v58: somador1bit port map (a(58), b(58), c57, ts(58), c58); s8v59: somador1bit port map (a(59), b(59), c58, ts(59), c59); s8v60: somador1bit port map (a(60), b(60), c59, ts(60), c60); s8v61: somador1bit port map (a(61), b(61), c60, ts(61), c61); s8v62: somador1bit port map (a(62), b(62), c61, ts(62), c62); s8v63: somador1bit port map (a(63), b(63), c62, ts(63), c63); --verifica overflow e underflow cout <= (not a(63) and not b(63) and ts(63)) or (a(63) and b(63) and not ts(63)); s <= ts; end somador16bits; ----------------------------------------------------------------------- -----------------------------ULA-PO------------------------------------ ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity ula_po is port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x, y, z: in std_logic; s: out std_logic_vector(63 downto 0); couterro: out std_logic ); end ula_po; architecture ula_po of ula_po is component CompLog port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x, y, z: in std_logic; ia: out std_logic_vector (63 downto 0); ib: out std_logic_vector(63 downto 0); Cin: out std_logic; Cout: out std_logic ); end component; component somador16bits port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); cin: in std_logic; s: out std_logic_vector(63 downto 0); cout: out std_logic ); end component; signal ia, ib: std_logic_vector(63 downto 0); signal cin, cout, cout2: std_logic; begin complog0: CompLog port map (a, b, x, y, z, ia, ib, cin, cout); somador8b0: somador16bits port map (ia, ib, cin, s, cout2); couterro <= cout or cout2; end ula_po; ----------------------------------------------------------------------- -----------------------------ULA-PC------------------------------------ ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity ula_pc IS port ( clk, do_op : in std_logic; done, state: out std_logic ); end ula_pc; architecture ula_pc of ula_pc is constant STDOINGOP: std_logic := '0'; constant STOPDONE: std_logic := '1'; signal st: std_logic; begin --espera um ciclo de clock para ter certeza que as operações --se estabilizaram PROCESS (clk) BEGIN if (clk'event and clk = '1') then case st is when STOPDONE => if (do_op = '1') then st <= STDOINGOP; end if; when others => st <= STOPDONE; end case; end if; end process; done <= '1' when st = STOPDONE else '0'; state <= st; end ula_pc; ----------------------------------------------------------------------- -------------------------------ULA------------------------------------- ----------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity ula is port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x, y, z, clk, do_op: in std_logic; s: out std_logic_vector(63 downto 0); couterro, done, state: out std_logic ); end ula; architecture ula of ula is component ula_po port ( a: in std_logic_vector(63 downto 0); b: in std_logic_vector(63 downto 0); x, y, z: in std_logic; s: out std_logic_vector(63 downto 0); couterro: out std_logic ); end component; component ula_pc port ( clk, do_op : in std_logic; done, state: out std_logic ); end component; begin ulapo: ula_po port map (a, b, x, y, z, s, couterro); ulapc: ula_pc port map (clk, do_op, done, state); end ula;
gpl-2.0
abyssxsy/hackrf
firmware/cpld/sgpio_if/top.vhd
12
5535
-- -- Copyright 2012 Jared Boone -- Copyright 2013 Benjamin Vernoux -- -- This file is part of HackRF. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2, or (at your option) -- any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; see the file COPYING. If not, write to -- the Free Software Foundation, Inc., 51 Franklin Street, -- Boston, MA 02110-1301, USA. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.std_logic_unsigned.all; library UNISIM; use UNISIM.vcomponents.all; entity top is Port( HOST_DATA : inout std_logic_vector(7 downto 0); HOST_CAPTURE : out std_logic; HOST_DISABLE : in std_logic; HOST_DIRECTION : in std_logic; HOST_DECIM_SEL : in std_logic_vector(2 downto 0); HOST_Q_INVERT : in std_logic; DA : in std_logic_vector(7 downto 0); DD : out std_logic_vector(9 downto 0); CODEC_CLK : in std_logic; CODEC_X2_CLK : in std_logic ); end top; architecture Behavioral of top is signal codec_clk_i : std_logic; signal adc_data_i : std_logic_vector(7 downto 0); signal dac_data_o : std_logic_vector(9 downto 0); signal host_clk_i : std_logic; type transfer_direction is (from_adc, to_dac); signal transfer_direction_i : transfer_direction; signal host_data_enable_i : std_logic; signal host_data_capture_o : std_logic; signal data_from_host_i : std_logic_vector(7 downto 0); signal data_to_host_o : std_logic_vector(7 downto 0); signal decimate_count : std_logic_vector(2 downto 0) := "111"; signal decimate_sel_i : std_logic_vector(2 downto 0); signal decimate_en : std_logic; signal q_invert : std_logic; signal rx_q_invert_mask : std_logic_vector(7 downto 0); signal tx_q_invert_mask : std_logic_vector(7 downto 0); begin ------------------------------------------------ -- Codec interface adc_data_i <= DA(7 downto 0); DD(9 downto 0) <= dac_data_o; ------------------------------------------------ -- Clocks codec_clk_i <= CODEC_CLK; BUFG_host : BUFG port map ( O => host_clk_i, I => CODEC_X2_CLK ); ------------------------------------------------ -- SGPIO interface HOST_DATA <= data_to_host_o when transfer_direction_i = from_adc else (others => 'Z'); data_from_host_i <= HOST_DATA; HOST_CAPTURE <= host_data_capture_o; host_data_enable_i <= not HOST_DISABLE; transfer_direction_i <= to_dac when HOST_DIRECTION = '1' else from_adc; decimate_sel_i <= HOST_DECIM_SEL; ------------------------------------------------ decimate_en <= '1' when decimate_count = "111" else '0'; process(host_clk_i) begin if rising_edge(host_clk_i) then if codec_clk_i = '1' then if decimate_count = "111" or host_data_enable_i = '0' then decimate_count <= decimate_sel_i; else decimate_count <= decimate_count + 1; end if; end if; end if; end process; q_invert <= HOST_Q_INVERT; rx_q_invert_mask <= X"80" when q_invert = '1' else X"7f"; tx_q_invert_mask <= X"7F" when q_invert = '1' else X"80"; process(host_clk_i) begin if rising_edge(host_clk_i) then if codec_clk_i = '1' then -- I: non-inverted between MAX2837 and MAX5864 data_to_host_o <= adc_data_i xor X"80"; else -- Q: inverted between MAX2837 and MAX5864 data_to_host_o <= adc_data_i xor rx_q_invert_mask; end if; end if; end process; process(host_clk_i) begin if rising_edge(host_clk_i) then if transfer_direction_i = to_dac then if codec_clk_i = '1' then dac_data_o <= (data_from_host_i xor tx_q_invert_mask) & tx_q_invert_mask(0) & tx_q_invert_mask(0); else dac_data_o <= (data_from_host_i xor X"80") & "00"; end if; else dac_data_o <= (dac_data_o'high => '0', others => '1'); end if; end if; end process; process(host_clk_i) begin if rising_edge(host_clk_i) then if transfer_direction_i = to_dac then if codec_clk_i = '1' then host_data_capture_o <= host_data_enable_i; end if; else if codec_clk_i = '0' then host_data_capture_o <= host_data_enable_i and decimate_en; end if; end if; end if; end process; end Behavioral;
gpl-2.0
blackb1rd/ctags
Units/afl-fuzz.r/github-issue-542-vhdl.d/input.vhdl
10
11
constant"
gpl-2.0
universal-ctags/ctags
Units/parser-vhdl.r/vhdl-port.d/input.vhd
7
165
-- https://www.ics.uci.edu/~jmoorkan/vhdlref/Synario%20VHDL%20Manual.pdf entity logical_ops_1 is port (a, b, c, d: in bit; m: out bit); end logical_ops_1;
gpl-2.0
vishl/ctags
Test/bug2374109.vhd
98
196
function Pow2( N, Exp : integer ) return mylib.myinteger is Variable Result : integer := 1; begin for i in 1 to Exp loop Result := Result * N; end loop; return( Result ); end Pow;
gpl-2.0
adamgreig/bladeRF
hdl/fpga/platforms/bladerf/vhdl/spi_reader.vhd
1
4108
library ieee; use ieee.std_logic_1164.all ; use ieee.numeric_std.all ; entity spi_reader is port ( clock : in std_logic ; sclk : out std_logic ; miso : in std_logic ; mosi : out std_logic ; enx : out std_logic ; reset_out : out std_logic ) ; end entity ; architecture arch of spi_reader is constant RESET_CYCLES : natural := 1000 ; constant ENX_WAIT_CYCLES : natural := 10 ; constant WRITE_BIT_COUNT : natural := 7 ; constant READ_BIT_COUNT : natural := 8 ; constant TOTAL_BIT_COUNT : natural := WRITE_BIT_COUNT + READ_BIT_COUNT ; type command_t is (COMMAND_READ, COMMAND_WRITE) ; type fsm_t is (RESET, WAITING, FALLING_SCLK, RISING_SCLK) ; signal fsm : fsm_t ; constant command : command_t := COMMAND_READ ; signal spi_address : unsigned(6 downto 0) := (others =>'0') ; begin reader : process(all) variable count : natural range 0 to 1000 := 0 ; variable address : unsigned(6 downto 0) := (others =>'0') ; variable wdata : unsigned(7 downto 0) ; variable rdata : unsigned(7 downto 0) ; begin if( rising_edge(clock) ) then enx <= '0' ; reset_out <= '1' ; case fsm is when RESET => reset_out <= '0' ; spi_address <= (others =>'0') ; if( count = 0 ) then fsm <= WAITING ; count := ENX_WAIT_CYCLES ; else count := count - 1 ; end if ; when WAITING => sclk <= '1' ; enx <= '1' ; if( spi_address = 127 ) then spi_address <= (others =>'0') ; fsm <= RESET ; count := RESET_CYCLES ; end if ; if( count = 0 ) then count := TOTAL_BIT_COUNT ; fsm <= FALLING_SCLK ; address := spi_address ; spi_address <= spi_address + 1; else count := count - 1 ; end if ; when FALLING_SCLK => sclk <= '0' ; fsm <= RISING_SCLK ; if( command = COMMAND_READ ) then if( count = TOTAL_BIT_COUNT ) then mosi <= '0' ; elsif( count < TOTAL_BIT_COUNT - WRITE_BIT_COUNT ) then mosi <= '0' ; else mosi <= address(address'high) ; address := shift_left(address,1) ; end if ; else if( count = TOTAL_BIT_COUNT ) then mosi <= '1' ; elsif( count < TOTAL_BIT_COUNT - WRITE_BIT_COUNT ) then mosi <= wdata(wdata'high) ; wdata := shift_left(wdata,1) ; else mosi <= address(address'high) ; address := shift_left(address,1) ; end if ; end if ; when RISING_SCLK => sclk <= '1' ; if( command = COMMAND_READ ) then if( count < TOTAL_BIT_COUNT - WRITE_BIT_COUNT ) then rdata := rdata(rdata'high-1 downto 0) & miso ; end if ; end if ; if( count = 0 ) then fsm <= WAITING ; count := ENX_WAIT_CYCLES ; else count := count - 1 ; fsm <= FALLING_SCLK ; end if ; end case ; end if ; end process ; end architecture ;
gpl-2.0
dondamage/libhdl
lib/cells/lut.vhd
1
562
library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; package lut_pkg is end package lut_pkg; library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; entity lut is generic ( N : integer; I_WIDTH : integer; LUT : std_logic_vector := (N-1 downto 0 => (I_WIDTH-1 downto 0 = > '0')) ); port ( I : in std_logic_vector(N-1 downto 0); O : out std_logic ); end entity lut; architecture rtl of lut is begin O <= LUTIO_LOGIC(I); end architecture rtl;
gpl-2.0
andipla/autosub
src/tests/testTasksVHDL/testsubmissions/crc/fsr_beh.vhdl
2
879
library IEEE; use IEEE.std_logic_1164.all; architecture behavior of fsr is constant gen_degree : integer := 8; begin process(EN,RST,CLK) constant top_bit: integer := gen_degree-1; variable content: std_logic_vector(gen_degree-1 downto 0); variable do_inv: std_logic; begin if(EN='1') then if(RST='1') then content:= (others=>'0'); elsif(rising_edge(CLK)) then do_inv:= content(top_bit) xor DATA_IN; content(7) := content(6); content(6) := content(5) xor do_inv; content(5) := content(4); content(4) := content(3); content(3) := content(2); content(2) := content(1); content(1) := content(0) xor do_inv; content(0) := do_inv; end if; DATA <= content; end if; end process; end behavior;
gpl-2.0
janxin/test
web/components/ace/demo/kitchen-sink/docs/vhdl.vhd
472
830
library IEEE user IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity COUNT16 is port ( cOut :out std_logic_vector(15 downto 0); -- counter output clkEn :in std_logic; -- count enable clk :in std_logic; -- clock input rst :in std_logic -- reset input ); end entity; architecture count_rtl of COUNT16 is signal count :std_logic_vector (15 downto 0); begin process (clk, rst) begin if(rst = '1') then count <= (others=>'0'); elsif(rising_edge(clk)) then if(clkEn = '1') then count <= count + 1; end if; end if; end process; cOut <= count; end architecture;
gpl-2.0
dondamage/libhdl
comp/generic_ocram/test/bench/generic_ocram_tb.vhd
1
4285
--============================================================================ --! --! \file generic_ocram_tb --! --! \project generic_ocram --! --! \langv VHDL-2008 --! --! \brief Testbench for component generic_ocram. --! --! \details - --! --! \bug - --! --! \see - --! --! \copyright GPLv2 --! --! Revision history: --! --! \version 0.1 --! \date 2016-03-23 --! \author Andreas Mueller --! \brief Create file. --! --============================================================================ library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; library work; use work.generic_ocram_pkg; entity generic_ocram_tb is end entity generic_ocram_tb; architecture tb of generic_ocram_tb is -- DUT generics. constant WIDTH : integer := 8; constant DEPTH : integer := 1024; constant READ_FIRST : boolean := TRUE; -- DUT port signals. signal clk : std_logic := '0'; signal rst : std_logic := '1'; signal addr : std_logic_vector(generic_ocram_pkg.log2c(DEPTH)-1 downto 0); signal wren : std_logic; signal datai : std_logic_vector(WIDTH-1 downto 0); signal datao : std_logic_vector(WIDTH-1 downto 0); -- Testbench. constant CLK_PERIOD : time := 10 ns; procedure sim_generic_ocram_write( constant C_ADDR : in std_logic_vector(addr'range); constant C_DATA : in std_logic_vector(WIDTH-1 downto 0); signal clk_i : in std_logic; signal addr_o : out std_logic_vector(addr'range); signal wren_o : out std_logic; signal data_o : out std_logic_vector(WIDTH-1 downto 0) ) is begin wait until rising_edge(clk_i); addr_o <= C_ADDR; wren_o <= '1'; data_o <= C_DATA; wait until rising_edge(clk_i); wren_o <= '0'; report "Wrote "&integer'image(to_integer(unsigned(C_DATA)))& " to address "&integer'image(to_integer(unsigned(C_ADDR))); end procedure sim_generic_ocram_write; procedure sim_generic_ocram_read( constant C_ADDR : in std_logic_vector(addr'range); signal clk_i : in std_logic; signal addr_o : out std_logic_vector(addr'range); signal data_i : in std_logic_vector(WIDTH-1 downto 0) ) is begin wait until rising_edge(clk_i); addr_o <= C_ADDR; wait until rising_edge(clk_i); wait until rising_edge(clk_i); report "Read "&integer'image(to_integer(unsigned(data_i)))& " from address "&integer'image(to_integer(unsigned(C_ADDR))); end procedure sim_generic_ocram_read; begin p_testbench: process is begin report "### Simulation started."; rst <= '1'; addr <= (others => '0'); wren <= '0'; datai <= (others => '1'); wait for 100 ns; sim_generic_ocram_write( C_ADDR => "0000000001", C_DATA => X"39", clk_i => clk, addr_o => addr, wren_o => wren, data_o => datai ); sim_generic_ocram_write( C_ADDR => "1111111111", C_DATA => X"72", clk_i => clk, addr_o => addr, wren_o => wren, data_o => datai ); sim_generic_ocram_read( C_ADDR => "0000000001", clk_i => clk, addr_o => addr, data_i => datao ); sim_generic_ocram_read( C_ADDR => "1111111111", clk_i => clk, addr_o => addr, data_i => datao ); assert FALSE report "### Simulation finished." severity note; wait; end process p_testbench; clk <= not clk after CLK_PERIOD/2; i_generic_ocram_dut: generic_ocram_pkg.generic_ocram generic map ( WIDTH => WIDTH, DEPTH => DEPTH, READ_FIRST => READ_FIRST ) port map ( clk_i => clk, rst_i => rst, addr_i => addr, wren_i => wren, data_i => datai, data_o => datao ); end architecture tb;
gpl-2.0
andipla/autosub
src/tests/testTasksVHDL/testsubmissions/truth_table/desc/truth_table.vhdl
2
177
library IEEE; use IEEE.std_logic_1164.all; entity truth_table is port( A,B,C,D : in std_logic; O : out std_logic); end truth_table;
gpl-2.0
peter-scholtens/geany
tests/ctags/vhdl-port.vhd
7
165
-- https://www.ics.uci.edu/~jmoorkan/vhdlref/Synario%20VHDL%20Manual.pdf entity logical_ops_1 is port (a, b, c, d: in bit; m: out bit); end logical_ops_1;
gpl-2.0
dondamage/libhdl
lib/cells/mux/mux.vhd
1
2269
library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; library work; use work.libhdl_types_pkg.all; package mux_pkg is component mux is generic ( N_INPUTS : integer := 2; DATA_WIDTH : integer := 8; LATENCY : integer := 0 ); port ( clk_i : in std_logic; ena_i : in std_logic; data_i : in std_logic_vector(N_INPUTS*DATA_WIDTH-1 downto 0); sel_i : in std_logic_vector(clog2(N_INPUTS)-1 downto 0); data_o : out std_logic_vector(DATA_WIDTH-1 downto 0) ); end component mux; end package mux_pkg; library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; library work; use work.libhdl_types_pkg.all; entity mux is generic ( N_INPUTS : integer := 2; DATA_WIDTH : integer := 8; LATENCY : natural := 0 ); port ( clk_i : in std_logic; ena_i : in std_logic; data_i : in std_logic_vector(N_INPUTS*DATA_WIDTH-1 downto 0); sel_i : in std_logic_vector(clog2(N_INPUTS)-1 downto 0); data_o : out std_logic_vector(DATA_WIDTH-1 downto 0) ); end entity mux; architecture rtl of mux is signal data_intermediate : std_logic_vector; signal data_o_int : std_logic_vector(DATA_WIDTH-1 downto 0); begin data_o <= data_o_int; g_mux_comb: if (LATENCY = 0) generate p_mux_comb: process (data_i, sel_i) is variable sel_int : integer; begin sel_int := to_integer(unsigned(sel_i)); data_o_int <= data_i((sel_int+1)*DATA_WIDTH-1 downto sel_int*DATA_WIDTH); end process p_mux_comb; end generate g_mux_comb; g_mux_clkd: if (LATENCY > 0) generate p_mux_clkd: process (clk_i) is variable sel_int : integer; begin if rising_edge(clk_i) then for i in LATENCY downto 1 loop sel_int := to_integer(unsigned(sel_i))/i; data_intermediate <= data; end loop; data_o_int <= data_intermediate(sel_int); end if; end process p_mux_clkd; end generate g_mux_clkd; end architecture rtl;
gpl-2.0
faceleg/ctags
Test/bug2374109.vhd
98
196
function Pow2( N, Exp : integer ) return mylib.myinteger is Variable Result : integer := 1; begin for i in 1 to Exp loop Result := Result * N; end loop; return( Result ); end Pow;
gpl-2.0
dondamage/libhdl
comp/_template/vhdl/vhdl-1993/template_testbench.vhd
1
805
--============================================================================ --! --! \file <FILE_NAME> --! --! \project <PROJECT_NAME> --! --! \langv VHDL-1993 --! --! \brief <BRIEF_DESCRIPTION>. --! --! \details <DETAILED_DESCRIPTION>. --! --! \bug <BUGS_OR_KNOWN_ISSUES>. --! --! \see <REFERENCES> --! --! \copyright <COPYRIGHT_OR_LICENSE> --! --! Revision history: --! --! \version <VERSION> --! \date <YYYY-MM-DD> --! \author <AUTHOR_NAME> --! \brief Create file. --! --============================================================================ library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; entity template_testbench is end entity template_testbench; architecture tb of template_testbench is begin end architecture tb;
gpl-2.0
dondamage/libhdl
lib/lib/libhdl_types_pkg.vhd
1
277
library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; package libhdl_types_pkg is type slv_vector_t is array (integer range <>) of std_logic_vector; end package libhdl_types_pkg; package body libhdl_types_pkg is end package body libhdl_types_pkg;
gpl-2.0
adamgreig/bladeRF
hdl/fpga/ip/nuand/synthesis/nco.vhd
1
2075
library ieee ; use ieee.std_logic_1164.all ; use ieee.numeric_std.all ; package nco_p is type nco_input_t is record dphase : signed(15 downto 0) ; valid : std_logic ; end record ; type nco_output_t is record re : signed(15 downto 0) ; im : signed(15 downto 0) ; valid : std_logic ; end record ; end package ; -- nco_p library ieee ; use ieee.std_logic_1164.all ; use ieee.numeric_std.all ; library work ; use work.cordic_p.all ; use work.nco_p.all ; entity nco is port ( clock : in std_logic ; reset : in std_logic ; inputs : in nco_input_t ; outputs : out nco_output_t ) ; end entity ; -- nco architecture arch of nco is signal phase : signed(15 downto 0) ; signal cordic_inputs : cordic_xyz_t ; signal cordic_outputs : cordic_xyz_t ; begin accumulate_phase : process(clock, reset) variable temp : signed(15 downto 0) ; begin if( reset = '1' ) then phase <= (others =>'0') ; elsif( rising_edge( clock ) ) then if( inputs.valid = '1' ) then temp := phase + inputs.dphase ; if( temp > 4096 ) then temp := temp - 8192 ; elsif( temp < -4096 ) then temp := temp + 8192 ; end if ; phase <= temp ; end if ; end if ; end process ; cordic_inputs <= ( x => to_signed(1234,16), y => (others =>'0'), z => phase, valid => inputs.valid ) ; U_cordic : entity work.cordic port map ( clock => clock, reset => reset, mode => CORDIC_ROTATION, inputs => cordic_inputs, outputs => cordic_outputs ) ; outputs.re <= cordic_outputs.x ; outputs.im <= cordic_outputs.y ; outputs.valid <= cordic_outputs.valid ; end architecture ; -- arch
gpl-2.0
dondamage/libhdl
lib/cells/sync_rst/sync_rst.vhd
1
1338
library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; package sync_rst_pkg is component sync_rst is generic ( N_SYNC_FFS : integer := 2; RST_POLARITY : std_logic := '1' ); port ( arst_i : in std_logic; sclk_i : in std_logic; srst_o : out std_logic; ); end component sync_rst; end package sync_rst_pkg; library ieee; use ieee.numeric_std.all; use ieee.std_logic_1164.all; entity sync_rst is generic ( N_SYNC_FFS : integer := 2; RST_POLARITY : std_logic := '1' ); port ( arst_i : in std_logic; sclk_i : in std_logic; srst_o : out std_logic; ); begin assert N_SYNC_FFS >= 2 report "Entity sync_rst: Invalid generic value." severity ERROR; end entity sync_rst; architecture rtl of sync_rst is signal srst_ffs : std_logic_vector(N_SYNC_FFS-1 downto 0); begin p_sync_rst: process (sclk_i, arst_i) is begin if (arst_i = RST_POLARITY) then srst_ffs <= (others => RST_POLARITY); elsif (rising_edge(sclk_i)) then srst_ffs <= srst_ffs(N_SYNC_FFS-2 downto 0) & not RST_POLARITY; end if; end process p_sync_rst; srst_o <= srst_ffs(N_SYNC_FFS-1); end architecture rtl;
gpl-2.0
rbarzic/arty-cm0-designstart
ips/clock_manager/ip_user_files/ip/arty_mmcm/arty_mmcm_stub.vhdl
2
1167
-- Copyright 1986-2015 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2015.3 (lin64) Build 1368829 Mon Sep 28 20:06:39 MDT 2015 -- Date : Mon Nov 16 15:47:09 2015 -- Host : roba-OptiPlex-7010 running 64-bit Ubuntu 15.04 -- Command : write_vhdl -force -mode synth_stub -- /home/roba/perso/github/arty-designstart-cm0/ips/clock_manager/arty_mmcm/arty_mmcm_stub.vhdl -- Design : arty_mmcm -- Purpose : Stub declaration of top-level module interface -- Device : xc7k70tfbv676-1 -- -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity arty_mmcm is Port ( clk_in : in STD_LOGIC; clk_50m : out STD_LOGIC; resetn : in STD_LOGIC; locked : out STD_LOGIC ); end arty_mmcm; architecture stub of arty_mmcm is attribute syn_black_box : boolean; attribute black_box_pad_pin : string; attribute syn_black_box of stub : architecture is true; attribute black_box_pad_pin of stub : architecture is "clk_in,clk_50m,resetn,locked"; begin end;
gpl-2.0
rbarzic/arty-cm0-designstart
ips/clock_manager/arty_mmcm/arty_mmcm_stub.vhdl
2
1167
-- Copyright 1986-2015 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2015.3 (lin64) Build 1368829 Mon Sep 28 20:06:39 MDT 2015 -- Date : Mon Nov 16 15:47:09 2015 -- Host : roba-OptiPlex-7010 running 64-bit Ubuntu 15.04 -- Command : write_vhdl -force -mode synth_stub -- /home/roba/perso/github/arty-designstart-cm0/ips/clock_manager/arty_mmcm/arty_mmcm_stub.vhdl -- Design : arty_mmcm -- Purpose : Stub declaration of top-level module interface -- Device : xc7k70tfbv676-1 -- -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity arty_mmcm is Port ( clk_in : in STD_LOGIC; clk_50m : out STD_LOGIC; resetn : in STD_LOGIC; locked : out STD_LOGIC ); end arty_mmcm; architecture stub of arty_mmcm is attribute syn_black_box : boolean; attribute black_box_pad_pin : string; attribute syn_black_box of stub : architecture is true; attribute black_box_pad_pin of stub : architecture is "clk_in,clk_50m,resetn,locked"; begin end;
gpl-2.0
Charlesworth/Albot
Albot VHDL/lpm_dff0.vhd
1
4183
-- megafunction wizard: %LPM_FF% -- GENERATION: STANDARD -- VERSION: WM1.0 -- MODULE: lpm_ff -- ============================================================ -- File Name: lpm_dff0.vhd -- Megafunction Name(s): -- lpm_ff -- ============================================================ -- ************************************************************ -- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! -- -- 6.0 Build 202 06/20/2006 SP 1 SJ Full Version -- ************************************************************ --Copyright (C) 1991-2006 Altera Corporation --Your use of Altera Corporation's design tools, logic functions --and other software and tools, and its AMPP partner logic --functions, and any output files any of the foregoing --(including device programming or simulation files), and any --associated documentation or information are expressly subject --to the terms and conditions of the Altera Program License --Subscription Agreement, Altera MegaCore Function License --Agreement, or other applicable license agreement, including, --without limitation, that your use is for the sole purpose of --programming logic devices manufactured by Altera and sold by --Altera or its authorized distributors. Please refer to the --applicable agreement for further details. LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY lpm; USE lpm.all; ENTITY lpm_dff0 IS PORT ( aclr : IN STD_LOGIC ; clock : IN STD_LOGIC ; data : IN STD_LOGIC_VECTOR (31 DOWNTO 0); enable : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (31 DOWNTO 0) ); END lpm_dff0; ARCHITECTURE SYN OF lpm_dff0 IS SIGNAL sub_wire0 : STD_LOGIC_VECTOR (31 DOWNTO 0); COMPONENT lpm_ff GENERIC ( lpm_fftype : STRING; lpm_type : STRING; lpm_width : NATURAL ); PORT ( enable : IN STD_LOGIC ; aclr : IN STD_LOGIC ; clock : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (31 DOWNTO 0); data : IN STD_LOGIC_VECTOR (31 DOWNTO 0) ); END COMPONENT; BEGIN q <= sub_wire0(31 DOWNTO 0); lpm_ff_component : lpm_ff GENERIC MAP ( lpm_fftype => "DFF", lpm_type => "LPM_FF", lpm_width => 32 ) PORT MAP ( enable => enable, aclr => aclr, clock => clock, data => data, q => sub_wire0 ); END SYN; -- ============================================================ -- CNX file retrieval info -- ============================================================ -- Retrieval info: PRIVATE: ACLR NUMERIC "1" -- Retrieval info: PRIVATE: ALOAD NUMERIC "0" -- Retrieval info: PRIVATE: ASET NUMERIC "0" -- Retrieval info: PRIVATE: ASETV NUMERIC "0" -- Retrieval info: PRIVATE: ASET_ALL1 NUMERIC "1" -- Retrieval info: PRIVATE: CLK_EN NUMERIC "1" -- Retrieval info: PRIVATE: DFF NUMERIC "1" -- Retrieval info: PRIVATE: SCLR NUMERIC "0" -- Retrieval info: PRIVATE: SLOAD NUMERIC "0" -- Retrieval info: PRIVATE: SSET NUMERIC "0" -- Retrieval info: PRIVATE: SSETV NUMERIC "0" -- Retrieval info: PRIVATE: SSET_ALL1 NUMERIC "1" -- Retrieval info: PRIVATE: UseTFFdataPort NUMERIC "0" -- Retrieval info: PRIVATE: nBit NUMERIC "32" -- Retrieval info: CONSTANT: LPM_FFTYPE STRING "DFF" -- Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_FF" -- Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "32" -- Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL aclr -- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock -- Retrieval info: USED_PORT: data 0 0 32 0 INPUT NODEFVAL data[31..0] -- Retrieval info: USED_PORT: enable 0 0 0 0 INPUT NODEFVAL enable -- Retrieval info: USED_PORT: q 0 0 32 0 OUTPUT NODEFVAL q[31..0] -- Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0 -- Retrieval info: CONNECT: q 0 0 32 0 @q 0 0 32 0 -- Retrieval info: CONNECT: @enable 0 0 0 0 enable 0 0 0 0 -- Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0 -- Retrieval info: CONNECT: @data 0 0 32 0 data 0 0 32 0 -- Retrieval info: LIBRARY: lpm lpm.lpm_components.all -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff0.vhd TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff0.inc FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff0.cmp TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff0.bsf TRUE FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff0_inst.vhd TRUE
gpl-2.0
bert/geda-gaf
gnetlist/examples/vams/vhdl/basic-vhdl/spice_cs.vhdl
15
406
LIBRARY ieee,disciplines; USE ieee.math_real.all; USE ieee.math_real.all; USE work.electrical_system.all; USE work.all; -- Entity declaration -- ENTITY SPICE_cs IS GENERIC ( N : REAL := 10.0; VT : REAL := 25.85e-6; ISS : REAL := 10.0e-14 ); PORT ( terminal llt : electrical; terminal ult : electrical; terminal lrt : electrical; terminal urt : electrical ); END ENTITY SPICE_cs;
gpl-2.0
gauravks/i210dummy
Examples/altera_nios2/SYSTEC_ECUcore-EP3C/design_nios2_directIO/niosII_openMac_clock_3.vhd
8
29330
--Legal Notice: (C)2012 Altera Corporation. All rights reserved. Your --use of Altera Corporation's design tools, logic functions and other --software and tools, and its AMPP partner logic functions, and any --output files any of the foregoing (including device programming or --simulation files), and any associated documentation or information are --expressly subject to the terms and conditions of the Altera Program --License Subscription Agreement or other applicable license agreement, --including, without limitation, that your use is for the sole purpose --of programming logic devices manufactured by Altera and sold by Altera --or its authorized distributors. Please refer to the applicable --agreement for further details. -- turn off superfluous VHDL processor warnings -- altera message_level Level1 -- altera message_off 10034 10035 10036 10037 10230 10240 10030 library altera; use altera.altera_europa_support_lib.all; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity niosII_openMac_clock_3_edge_to_pulse is port ( -- inputs: signal clock : IN STD_LOGIC; signal data_in : IN STD_LOGIC; signal reset_n : IN STD_LOGIC; -- outputs: signal data_out : OUT STD_LOGIC ); end entity niosII_openMac_clock_3_edge_to_pulse; architecture europa of niosII_openMac_clock_3_edge_to_pulse is signal data_in_d1 : STD_LOGIC; begin process (clock, reset_n) begin if reset_n = '0' then data_in_d1 <= std_logic'('0'); elsif clock'event and clock = '1' then data_in_d1 <= data_in; end if; end process; data_out <= data_in XOR data_in_d1; end europa; -- turn off superfluous VHDL processor warnings -- altera message_level Level1 -- altera message_off 10034 10035 10036 10037 10230 10240 10030 library altera; use altera.altera_europa_support_lib.all; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity niosII_openMac_clock_3_slave_FSM is port ( -- inputs: signal master_read_done_token : IN STD_LOGIC; signal master_write_done_token : IN STD_LOGIC; signal slave_clk : IN STD_LOGIC; signal slave_read : IN STD_LOGIC; signal slave_reset_n : IN STD_LOGIC; signal slave_write : IN STD_LOGIC; -- outputs: signal slave_read_request : OUT STD_LOGIC; signal slave_waitrequest : OUT STD_LOGIC; signal slave_write_request : OUT STD_LOGIC ); end entity niosII_openMac_clock_3_slave_FSM; architecture europa of niosII_openMac_clock_3_slave_FSM is signal internal_slave_read_request : STD_LOGIC; signal internal_slave_write_request : STD_LOGIC; signal next_slave_read_request : STD_LOGIC; signal next_slave_state : STD_LOGIC_VECTOR (2 DOWNTO 0); signal next_slave_write_request : STD_LOGIC; signal slave_state : STD_LOGIC_VECTOR (2 DOWNTO 0); begin process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then internal_slave_read_request <= std_logic'('0'); elsif slave_clk'event and slave_clk = '1' then if true then internal_slave_read_request <= next_slave_read_request; end if; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then internal_slave_write_request <= std_logic'('0'); elsif slave_clk'event and slave_clk = '1' then if true then internal_slave_write_request <= next_slave_write_request; end if; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then slave_state <= std_logic_vector'("001"); elsif slave_clk'event and slave_clk = '1' then if true then slave_state <= next_slave_state; end if; end if; end process; process (internal_slave_read_request, internal_slave_write_request, master_read_done_token, master_write_done_token, slave_read, slave_state, slave_write) begin case slave_state is -- synthesis parallel_case when std_logic_vector'("001") => --read request: go from IDLE state to READ_WAIT state if std_logic'(slave_read) = '1' then next_slave_state <= std_logic_vector'("010"); slave_waitrequest <= std_logic'('1'); next_slave_read_request <= NOT(internal_slave_read_request); next_slave_write_request <= internal_slave_write_request; elsif std_logic'(slave_write) = '1' then next_slave_state <= std_logic_vector'("100"); slave_waitrequest <= std_logic'('1'); next_slave_read_request <= internal_slave_read_request; next_slave_write_request <= NOT(internal_slave_write_request); else next_slave_state <= slave_state; slave_waitrequest <= std_logic'('0'); next_slave_read_request <= internal_slave_read_request; next_slave_write_request <= internal_slave_write_request; end if; -- when std_logic_vector'("001") when std_logic_vector'("010") => --stay in READ_WAIT state until master passes read done token if std_logic'(master_read_done_token) = '1' then next_slave_state <= std_logic_vector'("001"); slave_waitrequest <= std_logic'('0'); else next_slave_state <= std_logic_vector'("010"); slave_waitrequest <= std_logic'('1'); end if; next_slave_read_request <= internal_slave_read_request; next_slave_write_request <= internal_slave_write_request; -- when std_logic_vector'("010") when std_logic_vector'("100") => --stay in WRITE_WAIT state until master passes write done token if std_logic'(master_write_done_token) = '1' then next_slave_state <= std_logic_vector'("001"); slave_waitrequest <= std_logic'('0'); else next_slave_state <= std_logic_vector'("100"); slave_waitrequest <= std_logic'('1'); end if; next_slave_read_request <= internal_slave_read_request; next_slave_write_request <= internal_slave_write_request; -- when std_logic_vector'("100") when others => next_slave_state <= std_logic_vector'("001"); slave_waitrequest <= std_logic'('0'); next_slave_read_request <= internal_slave_read_request; next_slave_write_request <= internal_slave_write_request; -- when others end case; -- slave_state end process; --vhdl renameroo for output signals slave_read_request <= internal_slave_read_request; --vhdl renameroo for output signals slave_write_request <= internal_slave_write_request; end europa; -- turn off superfluous VHDL processor warnings -- altera message_level Level1 -- altera message_off 10034 10035 10036 10037 10230 10240 10030 library altera; use altera.altera_europa_support_lib.all; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity niosII_openMac_clock_3_master_FSM is port ( -- inputs: signal master_clk : IN STD_LOGIC; signal master_reset_n : IN STD_LOGIC; signal master_waitrequest : IN STD_LOGIC; signal slave_read_request_token : IN STD_LOGIC; signal slave_write_request_token : IN STD_LOGIC; -- outputs: signal master_read : OUT STD_LOGIC; signal master_read_done : OUT STD_LOGIC; signal master_write : OUT STD_LOGIC; signal master_write_done : OUT STD_LOGIC ); end entity niosII_openMac_clock_3_master_FSM; architecture europa of niosII_openMac_clock_3_master_FSM is signal internal_master_read1 : STD_LOGIC; signal internal_master_read_done : STD_LOGIC; signal internal_master_write1 : STD_LOGIC; signal internal_master_write_done : STD_LOGIC; signal master_state : STD_LOGIC_VECTOR (2 DOWNTO 0); signal next_master_read : STD_LOGIC; signal next_master_read_done : STD_LOGIC; signal next_master_state : STD_LOGIC_VECTOR (2 DOWNTO 0); signal next_master_write : STD_LOGIC; signal next_master_write_done : STD_LOGIC; begin process (master_clk, master_reset_n) begin if master_reset_n = '0' then internal_master_read_done <= std_logic'('0'); elsif master_clk'event and master_clk = '1' then if true then internal_master_read_done <= next_master_read_done; end if; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then internal_master_write_done <= std_logic'('0'); elsif master_clk'event and master_clk = '1' then if true then internal_master_write_done <= next_master_write_done; end if; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then internal_master_read1 <= std_logic'('0'); elsif master_clk'event and master_clk = '1' then if true then internal_master_read1 <= next_master_read; end if; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then internal_master_write1 <= std_logic'('0'); elsif master_clk'event and master_clk = '1' then if true then internal_master_write1 <= next_master_write; end if; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then master_state <= std_logic_vector'("001"); elsif master_clk'event and master_clk = '1' then if true then master_state <= next_master_state; end if; end if; end process; process (internal_master_read1, internal_master_read_done, internal_master_write1, internal_master_write_done, master_state, master_waitrequest, slave_read_request_token, slave_write_request_token) begin case master_state is -- synthesis parallel_case when std_logic_vector'("001") => --if read request token from slave then goto READ_WAIT state if std_logic'(slave_read_request_token) = '1' then next_master_state <= std_logic_vector'("010"); next_master_read <= std_logic'('1'); next_master_write <= std_logic'('0'); elsif std_logic'(slave_write_request_token) = '1' then next_master_state <= std_logic_vector'("100"); next_master_read <= std_logic'('0'); next_master_write <= std_logic'('1'); else next_master_state <= master_state; next_master_read <= std_logic'('0'); next_master_write <= std_logic'('0'); end if; next_master_read_done <= internal_master_read_done; next_master_write_done <= internal_master_write_done; -- when std_logic_vector'("001") when std_logic_vector'("010") => --stay in READ_WAIT state until master wait is deasserted if std_logic'(NOT(master_waitrequest)) = '1' then next_master_state <= std_logic_vector'("001"); next_master_read_done <= NOT(internal_master_read_done); next_master_read <= std_logic'('0'); else next_master_state <= std_logic_vector'("010"); next_master_read_done <= internal_master_read_done; next_master_read <= internal_master_read1; end if; next_master_write_done <= internal_master_write_done; next_master_write <= std_logic'('0'); -- when std_logic_vector'("010") when std_logic_vector'("100") => --stay in WRITE_WAIT state until slave wait is deasserted if std_logic'(NOT(master_waitrequest)) = '1' then next_master_state <= std_logic_vector'("001"); next_master_write <= std_logic'('0'); next_master_write_done <= NOT(internal_master_write_done); else next_master_state <= std_logic_vector'("100"); next_master_write <= internal_master_write1; next_master_write_done <= internal_master_write_done; end if; next_master_read_done <= internal_master_read_done; next_master_read <= std_logic'('0'); -- when std_logic_vector'("100") when others => next_master_state <= std_logic_vector'("001"); next_master_write <= std_logic'('0'); next_master_write_done <= internal_master_write_done; next_master_read <= std_logic'('0'); next_master_read_done <= internal_master_read_done; -- when others end case; -- master_state end process; --vhdl renameroo for output signals master_read <= internal_master_read1; --vhdl renameroo for output signals master_read_done <= internal_master_read_done; --vhdl renameroo for output signals master_write <= internal_master_write1; --vhdl renameroo for output signals master_write_done <= internal_master_write_done; end europa; -- turn off superfluous VHDL processor warnings -- altera message_level Level1 -- altera message_off 10034 10035 10036 10037 10230 10240 10030 library altera; use altera.altera_europa_support_lib.all; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity niosII_openMac_clock_3_bit_pipe is port ( -- inputs: signal clk1 : IN STD_LOGIC; signal clk2 : IN STD_LOGIC; signal data_in : IN STD_LOGIC; signal reset_clk1_n : IN STD_LOGIC; signal reset_clk2_n : IN STD_LOGIC; -- outputs: signal data_out : OUT STD_LOGIC ); end entity niosII_openMac_clock_3_bit_pipe; architecture europa of niosII_openMac_clock_3_bit_pipe is signal data_in_d1 : STD_LOGIC; attribute ALTERA_ATTRIBUTE : string; attribute ALTERA_ATTRIBUTE of data_in_d1 : signal is "{-to ""*""} CUT=ON ; PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of data_out : signal is "PRESERVE_REGISTER=ON"; begin process (clk1, reset_clk1_n) begin if reset_clk1_n = '0' then data_in_d1 <= std_logic'('0'); elsif clk1'event and clk1 = '1' then data_in_d1 <= data_in; end if; end process; process (clk2, reset_clk2_n) begin if reset_clk2_n = '0' then data_out <= std_logic'('0'); elsif clk2'event and clk2 = '1' then data_out <= data_in_d1; end if; end process; end europa; -- turn off superfluous VHDL processor warnings -- altera message_level Level1 -- altera message_off 10034 10035 10036 10037 10230 10240 10030 library altera; use altera.altera_europa_support_lib.all; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; --Clock Domain Crossing AdapterniosII_openMac_clock_3 entity niosII_openMac_clock_3 is port ( -- inputs: signal master_clk : IN STD_LOGIC; signal master_endofpacket : IN STD_LOGIC; signal master_readdata : IN STD_LOGIC_VECTOR (31 DOWNTO 0); signal master_reset_n : IN STD_LOGIC; signal master_waitrequest : IN STD_LOGIC; signal slave_address : IN STD_LOGIC_VECTOR (3 DOWNTO 0); signal slave_byteenable : IN STD_LOGIC_VECTOR (3 DOWNTO 0); signal slave_clk : IN STD_LOGIC; signal slave_nativeaddress : IN STD_LOGIC_VECTOR (1 DOWNTO 0); signal slave_read : IN STD_LOGIC; signal slave_reset_n : IN STD_LOGIC; signal slave_write : IN STD_LOGIC; signal slave_writedata : IN STD_LOGIC_VECTOR (31 DOWNTO 0); -- outputs: signal master_address : OUT STD_LOGIC_VECTOR (3 DOWNTO 0); signal master_byteenable : OUT STD_LOGIC_VECTOR (3 DOWNTO 0); signal master_nativeaddress : OUT STD_LOGIC_VECTOR (1 DOWNTO 0); signal master_read : OUT STD_LOGIC; signal master_write : OUT STD_LOGIC; signal master_writedata : OUT STD_LOGIC_VECTOR (31 DOWNTO 0); signal slave_endofpacket : OUT STD_LOGIC; signal slave_readdata : OUT STD_LOGIC_VECTOR (31 DOWNTO 0); signal slave_waitrequest : OUT STD_LOGIC ); end entity niosII_openMac_clock_3; architecture europa of niosII_openMac_clock_3 is component altera_std_synchronizer is GENERIC ( depth : NATURAL ); PORT ( signal dout : OUT STD_LOGIC; signal clk : IN STD_LOGIC; signal reset_n : IN STD_LOGIC; signal din : IN STD_LOGIC ); end component altera_std_synchronizer; component niosII_openMac_clock_3_edge_to_pulse is port ( -- inputs: signal clock : IN STD_LOGIC; signal data_in : IN STD_LOGIC; signal reset_n : IN STD_LOGIC; -- outputs: signal data_out : OUT STD_LOGIC ); end component niosII_openMac_clock_3_edge_to_pulse; component niosII_openMac_clock_3_slave_FSM is port ( -- inputs: signal master_read_done_token : IN STD_LOGIC; signal master_write_done_token : IN STD_LOGIC; signal slave_clk : IN STD_LOGIC; signal slave_read : IN STD_LOGIC; signal slave_reset_n : IN STD_LOGIC; signal slave_write : IN STD_LOGIC; -- outputs: signal slave_read_request : OUT STD_LOGIC; signal slave_waitrequest : OUT STD_LOGIC; signal slave_write_request : OUT STD_LOGIC ); end component niosII_openMac_clock_3_slave_FSM; component niosII_openMac_clock_3_master_FSM is port ( -- inputs: signal master_clk : IN STD_LOGIC; signal master_reset_n : IN STD_LOGIC; signal master_waitrequest : IN STD_LOGIC; signal slave_read_request_token : IN STD_LOGIC; signal slave_write_request_token : IN STD_LOGIC; -- outputs: signal master_read : OUT STD_LOGIC; signal master_read_done : OUT STD_LOGIC; signal master_write : OUT STD_LOGIC; signal master_write_done : OUT STD_LOGIC ); end component niosII_openMac_clock_3_master_FSM; component niosII_openMac_clock_3_bit_pipe is port ( -- inputs: signal clk1 : IN STD_LOGIC; signal clk2 : IN STD_LOGIC; signal data_in : IN STD_LOGIC; signal reset_clk1_n : IN STD_LOGIC; signal reset_clk2_n : IN STD_LOGIC; -- outputs: signal data_out : OUT STD_LOGIC ); end component niosII_openMac_clock_3_bit_pipe; signal internal_master_read : STD_LOGIC; signal internal_master_write : STD_LOGIC; signal internal_slave_endofpacket : STD_LOGIC; signal internal_slave_waitrequest : STD_LOGIC; signal master_read_done : STD_LOGIC; signal master_read_done_sync : STD_LOGIC; signal master_read_done_token : STD_LOGIC; signal master_write_done : STD_LOGIC; signal master_write_done_sync : STD_LOGIC; signal master_write_done_token : STD_LOGIC; signal slave_address_d1 : STD_LOGIC_VECTOR (3 DOWNTO 0); signal slave_byteenable_d1 : STD_LOGIC_VECTOR (3 DOWNTO 0); signal slave_nativeaddress_d1 : STD_LOGIC_VECTOR (1 DOWNTO 0); signal slave_read_request : STD_LOGIC; signal slave_read_request_sync : STD_LOGIC; signal slave_read_request_token : STD_LOGIC; signal slave_readdata_p1 : STD_LOGIC_VECTOR (31 DOWNTO 0); signal slave_write_request : STD_LOGIC; signal slave_write_request_sync : STD_LOGIC; signal slave_write_request_token : STD_LOGIC; signal slave_writedata_d1 : STD_LOGIC_VECTOR (31 DOWNTO 0); attribute ALTERA_ATTRIBUTE : string; attribute ALTERA_ATTRIBUTE of master_address : signal is "PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of master_byteenable : signal is "PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of master_nativeaddress : signal is "PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of master_writedata : signal is "PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of slave_address_d1 : signal is "{-to ""*""} CUT=ON ; PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of slave_byteenable_d1 : signal is "{-to ""*""} CUT=ON ; PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of slave_nativeaddress_d1 : signal is "{-to ""*""} CUT=ON ; PRESERVE_REGISTER=ON"; attribute ALTERA_ATTRIBUTE of slave_readdata : signal is "{-from ""*""} CUT=ON"; attribute ALTERA_ATTRIBUTE of slave_writedata_d1 : signal is "{-to ""*""} CUT=ON ; PRESERVE_REGISTER=ON"; begin --in, which is an e_avalon_slave --out, which is an e_avalon_master the_altera_std_synchronizer : altera_std_synchronizer generic map( depth => 2 ) port map( clk => slave_clk, din => master_read_done, dout => master_read_done_sync, reset_n => slave_reset_n ); the_altera_std_synchronizer1 : altera_std_synchronizer generic map( depth => 2 ) port map( clk => slave_clk, din => master_write_done, dout => master_write_done_sync, reset_n => slave_reset_n ); --read_done_edge_to_pulse, which is an e_instance read_done_edge_to_pulse : niosII_openMac_clock_3_edge_to_pulse port map( data_out => master_read_done_token, clock => slave_clk, data_in => master_read_done_sync, reset_n => slave_reset_n ); --write_done_edge_to_pulse, which is an e_instance write_done_edge_to_pulse : niosII_openMac_clock_3_edge_to_pulse port map( data_out => master_write_done_token, clock => slave_clk, data_in => master_write_done_sync, reset_n => slave_reset_n ); --slave_FSM, which is an e_instance slave_FSM : niosII_openMac_clock_3_slave_FSM port map( slave_read_request => slave_read_request, slave_waitrequest => internal_slave_waitrequest, slave_write_request => slave_write_request, master_read_done_token => master_read_done_token, master_write_done_token => master_write_done_token, slave_clk => slave_clk, slave_read => slave_read, slave_reset_n => slave_reset_n, slave_write => slave_write ); the_altera_std_synchronizer2 : altera_std_synchronizer generic map( depth => 2 ) port map( clk => master_clk, din => slave_read_request, dout => slave_read_request_sync, reset_n => master_reset_n ); the_altera_std_synchronizer3 : altera_std_synchronizer generic map( depth => 2 ) port map( clk => master_clk, din => slave_write_request, dout => slave_write_request_sync, reset_n => master_reset_n ); --read_request_edge_to_pulse, which is an e_instance read_request_edge_to_pulse : niosII_openMac_clock_3_edge_to_pulse port map( data_out => slave_read_request_token, clock => master_clk, data_in => slave_read_request_sync, reset_n => master_reset_n ); --write_request_edge_to_pulse, which is an e_instance write_request_edge_to_pulse : niosII_openMac_clock_3_edge_to_pulse port map( data_out => slave_write_request_token, clock => master_clk, data_in => slave_write_request_sync, reset_n => master_reset_n ); --master_FSM, which is an e_instance master_FSM : niosII_openMac_clock_3_master_FSM port map( master_read => internal_master_read, master_read_done => master_read_done, master_write => internal_master_write, master_write_done => master_write_done, master_clk => master_clk, master_reset_n => master_reset_n, master_waitrequest => master_waitrequest, slave_read_request_token => slave_read_request_token, slave_write_request_token => slave_write_request_token ); --endofpacket_bit_pipe, which is an e_instance endofpacket_bit_pipe : niosII_openMac_clock_3_bit_pipe port map( data_out => internal_slave_endofpacket, clk1 => slave_clk, clk2 => master_clk, data_in => master_endofpacket, reset_clk1_n => slave_reset_n, reset_clk2_n => master_reset_n ); process (master_clk, master_reset_n) begin if master_reset_n = '0' then slave_readdata_p1 <= std_logic_vector'("00000000000000000000000000000000"); elsif master_clk'event and master_clk = '1' then if std_logic'((internal_master_read AND NOT master_waitrequest)) = '1' then slave_readdata_p1 <= master_readdata; end if; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then slave_readdata <= std_logic_vector'("00000000000000000000000000000000"); elsif slave_clk'event and slave_clk = '1' then slave_readdata <= slave_readdata_p1; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then slave_writedata_d1 <= std_logic_vector'("00000000000000000000000000000000"); elsif slave_clk'event and slave_clk = '1' then slave_writedata_d1 <= slave_writedata; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then master_writedata <= std_logic_vector'("00000000000000000000000000000000"); elsif master_clk'event and master_clk = '1' then master_writedata <= slave_writedata_d1; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then slave_address_d1 <= std_logic_vector'("0000"); elsif slave_clk'event and slave_clk = '1' then slave_address_d1 <= slave_address; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then master_address <= std_logic_vector'("0000"); elsif master_clk'event and master_clk = '1' then master_address <= slave_address_d1; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then slave_nativeaddress_d1 <= std_logic_vector'("00"); elsif slave_clk'event and slave_clk = '1' then slave_nativeaddress_d1 <= slave_nativeaddress; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then master_nativeaddress <= std_logic_vector'("00"); elsif master_clk'event and master_clk = '1' then master_nativeaddress <= slave_nativeaddress_d1; end if; end process; process (slave_clk, slave_reset_n) begin if slave_reset_n = '0' then slave_byteenable_d1 <= std_logic_vector'("0000"); elsif slave_clk'event and slave_clk = '1' then slave_byteenable_d1 <= slave_byteenable; end if; end process; process (master_clk, master_reset_n) begin if master_reset_n = '0' then master_byteenable <= std_logic_vector'("0000"); elsif master_clk'event and master_clk = '1' then master_byteenable <= slave_byteenable_d1; end if; end process; --vhdl renameroo for output signals master_read <= internal_master_read; --vhdl renameroo for output signals master_write <= internal_master_write; --vhdl renameroo for output signals slave_endofpacket <= internal_slave_endofpacket; --vhdl renameroo for output signals slave_waitrequest <= internal_slave_waitrequest; end europa;
gpl-2.0
gauravks/i210dummy
Examples/altera_nios2/ipcore/powerlink/src/portio.vhd
3
8031
------------------------------------------------------------------------------------------------------------------------ -- Simple Port I/O -- -- Copyright (C) 2010 B&R -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- 3. Neither the name of B&R nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without prior written permission. For written -- permission, please contact [email protected] -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- ------------------------------------------------------------------------------------------------------------------------ -- Version History ------------------------------------------------------------------------------------------------------------------------ -- 2010-08-16 V0.01 zelenkaj First version -- 2010-10-04 V0.02 zelenkaj Bugfix: PORTDIR was mapped incorrectly (according to doc) to Avalon bus -- 2010-11-23 V0.03 zelenkaj Added Operational Flag to portio -- Added counter for valid assertion duration -- 2011-04-20 V0.10 zelenkaj Added synchronizer at inputs -- 2011-12-02 V0.11 zelenkaj Added I, O and T instead of IO ports -- 2012-03-16 V0.12 zelenkaj Traveled back to the past to change the version history -- Removed readdata register (saves resources) ------------------------------------------------------------------------------------------------------------------------ LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; USE ieee.std_logic_unsigned.all; entity portio is generic ( pioValLen_g : integer := 50; --clock ticks of pcp_clk pioGenIoBuf_g : boolean := true ); port ( s0_address : in std_logic; s0_read : in std_logic; s0_readdata : out std_logic_vector(31 downto 0); s0_write : in std_logic; s0_writedata : in std_logic_vector(31 downto 0); s0_byteenable : in std_logic_vector(3 downto 0); s0_waitrequest : out std_logic; clk : in std_logic; reset : in std_logic; x_pconfig : in std_logic_vector(3 downto 0); x_portInLatch : in std_logic_vector(3 downto 0); x_portOutValid : out std_logic_vector(3 downto 0); x_portio : inout std_logic_vector(31 downto 0); x_portio_I : in std_logic_vector(31 downto 0) := (others => '0'); x_portio_O : out std_logic_vector(31 downto 0); x_portio_T : out std_logic_vector(31 downto 0); x_operational : out std_logic ); end entity portio; architecture rtl of portio is signal sPortConfig : std_logic_vector(x_pconfig'range); signal sPortOut : std_logic_vector(x_portio'range); signal sPortIn, sPortIn_s, sPortInL : std_logic_vector(x_portio'range); signal x_portInLatch_s : std_logic_vector(x_portInLatch'range); signal x_operational_s : std_logic; signal x_portOutValid_s : std_logic_vector(x_portOutValid'range); begin sPortConfig <= x_pconfig; x_operational <= x_operational_s; portGen : for i in 3 downto 0 generate genIoBuf : if pioGenIoBuf_g generate begin --if port configuration bit is set to '0', the appropriate port-byte is an output x_portio((i+1)*8-1 downto (i+1)*8-8) <= sPortOut((i+1)*8-1 downto (i+1)*8-8) when sPortConfig(i) = '0' else (others => 'Z'); --if port configuration bit is set to '1', the appropriate port-byte is forwarded to the portio registers for the PCP sPortIn((i+1)*8-1 downto (i+1)*8-8) <= x_portio((i+1)*8-1 downto (i+1)*8-8) when sPortConfig(i) = '1' else (others => '0'); end generate; dontGenIoBuf : if not pioGenIoBuf_g generate begin x_portio_O((i+1)*8-1 downto (i+1)*8-8) <= sPortOut((i+1)*8-1 downto (i+1)*8-8); sPortIn((i+1)*8-1 downto (i+1)*8-8) <= x_portio_I((i+1)*8-1 downto (i+1)*8-8); --if port configuration bit is set to '0', the appropriate port-byte is an output ('0') --if port configuration bit is set to '1', the appropriate port-byte is an input ('1') x_portio_T((i+1)*8-1 downto (i+1)*8-8) <= (others => '0') when sPortConfig(i) = '0' else (others => '1'); end generate; end generate; --Avalon interface avalonPro : process(clk, reset) begin if reset = '1' then x_portOutValid_s <= (others => '0'); sPortOut <= (others => '0'); x_operational_s <= '0'; elsif clk = '1' and clk'event then x_portOutValid_s <= (others => '0'); if s0_write = '1' then case s0_address is when '0' => --write port for i in 3 downto 0 loop if s0_byteenable(i) = '1' then sPortOut((i+1)*8-1 downto (i+1)*8-8) <= s0_writedata((i+1)*8-1 downto (i+1)*8-8); x_portOutValid_s(i) <= '1'; end if; end loop; when '1' => --write to config register operational flag if s0_byteenable(3) = '1' then x_operational_s <= s0_writedata(s0_writedata'left); end if; when others => end case; end if; end if; end process; s0_readdata <= sPortInL when s0_read = '1' and s0_address = '0' else x_operational_s & "000" & x"00000" & x"0" & sPortConfig; thePortioCnters : for i in 0 to 3 generate thePortioCnt : entity work.portio_cnt generic map ( maxVal => pioValLen_g ) port map ( clk => clk, rst => reset, pulse => x_portOutValid_s(i), valid => x_portOutValid(i) ); end generate; --latch input signals latchInPro : process(clk, reset) begin if reset = '1' then sPortInL <= (others => '0'); elsif clk = '1' and clk'event then for i in 3 downto 0 loop if x_portInLatch_s(i) = '1' then sPortInL((i+1)*8-1 downto (i+1)*8-8) <= sPortIn_s((i+1)*8-1 downto (i+1)*8-8); end if; end loop; end if; end process; -- waitrequest signals theWaitrequestGenerators : block signal s0_rd_ack, s0_wr_ack : std_logic; begin -- PCP thePcpWrWaitReqAckGen : entity work.req_ack generic map ( zero_delay_g => true ) port map ( clk => clk, rst => reset, enable => s0_write, ack => s0_wr_ack ); thePcpRdWaitReqAckGen : entity work.req_ack generic map ( zero_delay_g => true ) port map ( clk => clk, rst => reset, enable => s0_read, ack => s0_rd_ack ); s0_waitrequest <= not(s0_rd_ack or s0_wr_ack); end block; --synchronize input signals genSyncInputs : for i in sPortIn'range generate syncInputs : entity work.sync port map ( din => sPortIn(i), dout => sPortIn_s(i), clk => clk, rst => reset ); end generate; --synchronize latch signals genSyncLatch : for i in x_portInLatch'range generate syncInputs : entity work.sync port map ( din => x_portInLatch(i), dout => x_portInLatch_s(i), clk => clk, rst => reset ); end generate; end architecture rtl;
gpl-2.0
scalable-networks/ext
uhd/fpga/usrp2/opencores/spi_boot/bench/vhdl/tb_elem-mmc-c.vhd
2
508
------------------------------------------------------------------------------- -- -- SD/MMC Bootloader -- -- $Id: tb_elem-mmc-c.vhd,v 1.1 2005/02/08 21:09:20 arniml Exp $ -- ------------------------------------------------------------------------------- configuration tb_elem_behav_mmc of tb_elem is for behav for dut_b : chip use configuration work.chip_mmc_c0; end for; for card_b : card use configuration work.card_behav_c0; end for; end for; end tb_elem_behav_mmc;
gpl-2.0
gauravks/i210dummy
Examples/xilinx_microblaze/ipcore/powerlink/pcores/axi_powerlink_v1_00_a/hdl/vhdl/openMAC_DMAFifo_Xilinx/fifo_read.vhd
2
5197
------------------------------------------------------------------------------------------------------------------------ -- read controller of the fifo -- -- Copyright (C) 2009 B&R -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- 3. Neither the name of B&R nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without prior written permission. For written -- permission, please contact [email protected] -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- -- Note: A general implementation of a asynchronous fifo which is -- using a dual port ram. This file is the read controler. -- ------------------------------------------------------------------------------------------------------------------------ -- Version History ------------------------------------------------------------------------------------------------------------------------ -- 2011-09-22 V0.01 mairt first version -- 2011-10-14 V0.02 zelenkaj element calculation buggy ------------------------------------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity fifo_read_ctrl is generic(N: natural:=4); port( clkr, resetr: in std_logic; w_ptr_in: in std_logic_vector(N downto 0); rd: in std_logic; r_empty: out std_logic; r_full: out std_logic; r_ptr_out: out std_logic_vector(N downto 0); r_addr: out std_logic_vector(N-1 downto 0); r_elements: out std_logic_vector(N-1 downto 0) ); end fifo_read_ctrl; architecture gray_arch of fifo_read_ctrl is signal r_ptr_reg, r_ptr_next: std_logic_vector(N downto 0); signal w_ptr_reg, w_ptr_next : std_logic_vector(N downto 0) := (others => '0'); signal gray1, bin, bin1: std_logic_vector(N downto 0); signal raddr_all: std_logic_vector(N-1 downto 0); signal raddr_msb,waddr_msb: std_logic; signal empty_flag, full_flag: std_logic; signal r_elements_wr, r_elements_rd, r_elements_diff : std_logic_vector(N downto 0); signal r_elements_reg, r_elements_next : std_logic_vector(N-1 downto 0); begin -- register process(clkr,resetr) begin if (resetr='1') then r_ptr_reg <= (others=>'0'); --w_ptr_reg <= (others => '0'); r_elements_reg <= (others => '0'); elsif (clkr'event and clkr='1') then r_ptr_reg <= r_ptr_next; --w_ptr_reg <= w_ptr_next; r_elements_reg <= r_elements_next; end if; end process; -- (N+1)-bit Gray counter bin <= r_ptr_reg xor ('0' & bin(N downto 1)); bin1 <= std_logic_vector(unsigned(bin) + 1); gray1 <= bin1 xor ('0' & bin1(N downto 1)); -- update read pointer r_ptr_next <= gray1 when rd='1' and empty_flag='0' else r_ptr_reg; -- save write pointer w_ptr_next <= w_ptr_in; -- N-bit Gray counter raddr_msb <= r_ptr_reg(N) xor r_ptr_reg(N-1); raddr_all <= raddr_msb & r_ptr_reg(N-2 downto 0); waddr_msb <= w_ptr_in(N) xor w_ptr_in(N-1); -- check for FIFO read empty empty_flag <= '1' when w_ptr_in(N)=r_ptr_reg(N) and w_ptr_in(N-2 downto 0)=r_ptr_reg(N-2 downto 0) and raddr_msb = waddr_msb else '0'; -- check for FIFO read full full_flag <= '1' when w_ptr_in(N)/=r_ptr_reg(N) and w_ptr_in(N-2 downto 0)=r_ptr_reg(N-2 downto 0) and raddr_msb = waddr_msb else '0'; -- convert gray value to bin and obtain difference r_elements_wr <= bin; r_elements_rd <= w_ptr_in xor ('0' & r_elements_rd(N downto 1)); r_elements_diff <= std_logic_vector(unsigned(r_elements_rd) - unsigned(r_elements_wr)); r_elements_next <= r_elements_diff(r_elements_next'range); -- output r_addr <= raddr_all; r_ptr_out <= r_ptr_reg; r_elements <= r_elements_reg; r_empty <= empty_flag; r_full <= full_flag; end gray_arch;
gpl-2.0
gauravks/i210dummy
Examples/altera_nios2/ipcore/powerlink/src/powerlink.vhd
3
34378
------------------------------------------------------------------------------------------------------------------------ -- POWERLINK IP-Core -- -- Copyright (C) 2010 B&R -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- 3. Neither the name of B&R nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without prior written permission. For written -- permission, please contact [email protected] -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- ------------------------------------------------------------------------------------------------------------------------ -- Version History ------------------------------------------------------------------------------------------------------------------------ -- 2010-08-23 V0.01 zelenkaj First version -- 2010-09-13 V0.02 zelenkaj added selection Rmii / Mii -- 2010-10-18 V0.03 zelenkaj added selection Big/Little Endian (pdi_par) -- use bidirectional bus (pdi_par) -- 2010-11-23 V0.04 zelenkaj Added 2 GPIO signals to parallel interface -- Added Operational Flag to simple I/O interface -- Omitted T/RPDO descriptor sections in DPR -- Added generic to set duration of valid assertion (portio) -- 2010-11-29 V0.05 zelenkaj Added Big/Little Endian (pdi_spi) -- 2010-12-06 V0.06 zelenkaj Bugfix: ap_irq was not driven in SPI configuration -- 2011-01-10 V0.07 zelenkaj Added 2-stage sync to SPI input pins -- 2011-02-24 V0.08 zelenkaj minor changes (naming conventions Mii->SMI) -- 2011-03-14 V0.09 zelenkaj minor change, added generic for rx packet buffer location -- 2011-03-21 V0.10 zelenkaj clean up -- 2011-03-28 V0.20 zelenkaj Changed: Structure of Control/Status Register -- Added: LED -- Added: Events -- Added/Changed: Asynchronous buffer 2x Ping-Pong -- 2011-04-04 V0.21 zelenkaj parallel interface, sync moved to pdi_par -- minor: led_status is the official name -- 2011-04-26 V0.22 zelenkaj generic for clock domain selection -- 2011-04-28 V0.23 zelenkaj second cmp timer of openMAC is optinal by generic -- generic for second phy port of openMAC -- 2011-05-06 V0.24 zelenkaj some naming convention changes -- bug fix: use the RX_ER signal, it has important meaning! -- 2011-05-09 V0.25 zelenkaj Hardware Acceleration (HW ACC) added. -- 2011-07-23 V0.26 zelenkaj openFILTER enhanced by RxErr signal -- 2011-07-25 V0.27 zelenkaj LED gadget and asynchronous buffer optional -- 2011-08-08 V0.28 zelenkaj LED gadget enhancement -> added 8 general purpose outputs -- 2011-08-02 V1.00 zelenkaj exchanged Avalon interface with entity openMAC_Ethernet -- 2011-09-05 V1.01 zelenkaj SPI PDI missed to connect async irq to toplevel -- 2011-10-20 V1.02 zelenkaj SMI export of in, out and tristate, endian generic -- 2011-11-07 V1.03 zelenkaj dma generic for PLB/AXI support necessary -- 2011-11-21 V1.04 zelenkaj added time synchronization feature -- 2011-11-28 V1.05 zelenkaj added waitrequest signals to pdi pcp/ap -- 2011-11-29 V1.06 zelenkaj event is optional -- 2011-11-30 V1.07 zelenkaj Added generic for DMA observer -- 2011-12-02 V1.08 zelenkaj Added I, O and T instead of IO ports -- 2012-01-09 V1.09 zelenkaj Added ap_syncIrq for external AP -- 2012-01-26 V1.10 zelenkaj Added generic for SMI generation and one SMI ports -- Omit hwacc options, since we are fast enough! ------------------------------------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity powerlink is generic( -- GENERAL GENERICS -- endian_g : string := "little"; genOnePdiClkDomain_g : boolean := false; genPdi_g : boolean := true; genInternalAp_g : boolean := true; genSimpleIO_g : boolean := false; genSpiAp_g : boolean := false; -- OPENMAC GENERICS Simulate : boolean := false; iBufSize_g : integer := 1024; iBufSizeLOG2_g : integer := 10; useRmii_g : boolean := true; --use Rmii useIntPacketBuf_g : boolean := true; --internal packet buffer useRxIntPacketBuf_g : boolean := true; --rx buffer located in internal packet buffer use2ndCmpTimer_g : boolean := true; --use second cmp timer (used in PDI) use2ndPhy_g : boolean := true; --use second phy (introduces openHUB) m_burstcount_width_g : integer := 4; m_burstcount_const_g : boolean := true; --hold burst value during transfer m_tx_burst_size_g : integer := 16; --0 < x =< 2**m_burstcount_width_g m_rx_burst_size_g : integer := 16; --0 < x =< 2**m_burstcount_width_g m_tx_fifo_size_g : integer := 16; m_rx_fifo_size_g : integer := 16; m_data_width_g : integer := 16; gen_dma_observer_g : boolean := true; genSmiIO : boolean := true; --drive SMI IO if true gNumSmi : integer range 1 to 2 := 2; --number of SMI used -- PDI GENERICS iRpdos_g : integer := 3; iTpdos_g : integer := 1; genABuf1_g : boolean := true; --if false iABuf1_g must be set to 0! genABuf2_g : boolean := true; --if false iABuf2_g must be set to 0! genLedGadget_g : boolean := false; genTimeSync_g : boolean := false; genEvent_g : boolean := false; --PDO buffer size *3 iTpdoBufSize_g : integer := 100; iRpdo0BufSize_g : integer := 100; iRpdo1BufSize_g : integer := 100; iRpdo2BufSize_g : integer := 100; --asynchronous buffer size iAsyBuf1Size_g : integer := 100; iAsyBuf2Size_g : integer := 100; iPdiRev_g : integer := 16#55AA#; -- 8/16bit PARALLEL PDI GENERICS papDataWidth_g : integer := 8; papLowAct_g : boolean := false; papBigEnd_g : boolean := false; -- SPI GENERICS spiCPOL_g : boolean := false; spiCPHA_g : boolean := false; spiBigEnd_g : boolean := false; -- PORTIO pioValLen_g : integer := 50; --clock ticks of pcp_clk -- GENERAL TARGET DEPENDINGS genIoBuf_g : boolean := true --generates IO buffers ); port( -- CLOCK / RESET PORTS clk50 : in std_logic; --RMII clk rst : in std_logic; --general reset clkEth : in std_logic; --Tx Reg clk m_clk : in std_logic; --openMAC DMA master clock pkt_clk : in std_logic; --openMAC packet buffer clock (don't use pcp..) clkPcp : in std_logic; --pcp clk clkAp : in std_logic; --ap clk rstPcp : in std_logic; --rst from pcp side rstAp : in std_logic; --rst ap -- OPENMAC --- OPENMAC PORTS mac_chipselect : in std_logic; mac_read : in std_logic; mac_write : in std_logic; mac_byteenable : in std_logic_vector(1 downto 0); mac_address : in std_logic_vector(11 downto 0); mac_writedata : in std_logic_vector(15 downto 0); mac_readdata : out std_logic_vector(15 downto 0) := (others => '0'); mac_waitrequest : out std_logic; mac_irq : out std_logic := '0'; --- TIMER COMPARE PORTS tcp_chipselect : in std_logic; tcp_read : in std_logic; tcp_write : in std_logic; tcp_byteenable : in std_logic_vector(3 downto 0); tcp_address : in std_logic_vector(1 downto 0); tcp_writedata : in std_logic_vector(31 downto 0); tcp_readdata : out std_logic_vector(31 downto 0) := (others => '0'); tcp_waitrequest : out std_logic; tcp_irq : out std_logic := '0'; --- MAC BUFFER PORTS mbf_chipselect : in std_logic; mbf_read : in std_logic; mbf_write : in std_logic; mbf_byteenable : in std_logic_vector(3 downto 0); mbf_address : in std_logic_vector(ibufsizelog2_g-3 downto 0); mbf_writedata : in std_logic_vector(31 downto 0); mbf_readdata : out std_logic_vector(31 downto 0) := (others => '0'); mbf_waitrequest : out std_logic; --- OPENMAC DMA PORTS m_read : OUT STD_LOGIC := '0'; m_write : OUT STD_LOGIC := '0'; m_byteenable : OUT STD_LOGIC_VECTOR(m_data_width_g/8-1 DOWNTO 0) := (others => '0'); m_address : OUT STD_LOGIC_VECTOR(29 DOWNTO 0) := (others => '0'); m_writedata : OUT STD_LOGIC_VECTOR(m_data_width_g-1 DOWNTO 0) := (others => '0'); m_readdata : IN STD_LOGIC_VECTOR(m_data_width_g-1 DOWNTO 0) := (others => '0'); m_waitrequest : IN STD_LOGIC; m_readdatavalid : in STD_LOGIC := '0'; m_burstcount : out std_logic_vector(m_burstcount_width_g-1 downto 0); m_burstcounter : out std_logic_vector(m_burstcount_width_g-1 downto 0); -- PDI --- PCP PORTS pcp_chipselect : in std_logic; pcp_read : in std_logic; pcp_write : in std_logic; pcp_byteenable : in std_logic_vector(3 downto 0); pcp_address : in std_logic_vector(12 downto 0); pcp_writedata : in std_logic_vector(31 downto 0); pcp_readdata : out std_logic_vector(31 downto 0) := (others => '0'); pcp_waitrequest : out std_logic; --- AP PORTS ap_irq : out std_logic := '0'; ap_irq_n : out std_logic := '1'; ap_syncIrq : out std_logic := '0'; ap_syncIrq_n : out std_logic := '1'; ap_asyncIrq : out std_logic := '0'; ap_asyncIrq_n : out std_logic := '1'; ---- AVALON ap_chipselect : in std_logic; ap_read : in std_logic; ap_write : in std_logic; ap_byteenable : in std_logic_vector(3 downto 0); ap_address : in std_logic_vector(12 downto 0); ap_writedata : in std_logic_vector(31 downto 0); ap_readdata : out std_logic_vector(31 downto 0) := (others => '0'); ap_waitrequest : out std_logic; ---- 8/16bit parallel pap_cs : in std_logic; pap_rd : in std_logic; pap_wr : in std_logic; pap_be : in std_logic_vector(papDataWidth_g/8-1 downto 0); pap_cs_n : in std_logic; pap_rd_n : in std_logic; pap_wr_n : in std_logic; pap_be_n : in std_logic_vector(papDataWidth_g/8-1 downto 0); pap_addr : in std_logic_vector(15 downto 0); pap_data : inout std_logic_vector(papDataWidth_g-1 downto 0) := (others => '0'); pap_data_I : in std_logic_vector(papDataWidth_g-1 downto 0) := (others => '0'); pap_data_O : out std_logic_vector(papDataWidth_g-1 downto 0); pap_data_T : out std_logic; pap_ack : out std_logic := '0'; pap_ack_n : out std_logic := '1'; pap_gpio : inout std_logic_vector(1 downto 0) := (others => '0'); pap_gpio_I : in std_logic_vector(1 downto 0) := (others => '0'); pap_gpio_O : out std_logic_vector(1 downto 0); pap_gpio_T : out std_logic_vector(1 downto 0); ---- SPI spi_clk : in std_logic; spi_sel_n : in std_logic; spi_mosi : in std_logic; spi_miso : out std_logic := '0'; ---- simple I/O smp_address : in std_logic; smp_read : in std_logic; smp_readdata : out std_logic_vector(31 downto 0) := (others => '0'); smp_write : in std_logic; smp_writedata : in std_logic_vector(31 downto 0); smp_byteenable : in std_logic_vector(3 downto 0); smp_waitrequest : out std_logic; pio_pconfig : in std_logic_vector(3 downto 0); pio_portInLatch : in std_logic_vector(3 downto 0); pio_portOutValid : out std_logic_vector(3 downto 0) := (others => '0'); pio_portio : inout std_logic_vector(31 downto 0) := (others => '0'); pio_portio_I : in std_logic_vector(31 downto 0) := (others => '0'); pio_portio_O : out std_logic_vector(31 downto 0); pio_portio_T : out std_logic_vector(31 downto 0); pio_operational : out std_logic := '0'; -- EXTERNAL --- PHY MANAGEMENT ---- shared (valid if gNumSmi = 1) phy_SMIClk : out std_logic := '0'; phy_SMIDat : inout std_logic := '1'; phy_SMIDat_I : in std_logic := '1'; phy_SMIDat_O : out std_logic; phy_SMIDat_T : out std_logic; phy_Rst_n : out std_logic := '1'; ---- PHY0 (valid if gNumSmi = 2) phy0_SMIClk : out std_logic := '0'; phy0_SMIDat : inout std_logic := '1'; phy0_SMIDat_I : in std_logic := '1'; phy0_SMIDat_O : out std_logic; phy0_SMIDat_T : out std_logic; phy0_Rst_n : out std_logic := '1'; phy0_link : in std_logic := '0'; ---- PHY1 (valid if gNumSmi = 2) phy1_SMIClk : out std_logic := '0'; phy1_SMIDat : inout std_logic := '1'; phy1_SMIDat_I : in std_logic := '1'; phy1_SMIDat_O : out std_logic; phy1_SMIDat_T : out std_logic; phy1_Rst_n : out std_logic := '1'; phy1_link : in std_logic := '0'; --- RMII PORTS phy0_RxDat : in std_logic_vector(1 downto 0); phy0_RxDv : in std_logic; phy0_RxErr : in std_logic; phy0_TxDat : out std_logic_vector(1 downto 0) := (others => '0'); phy0_TxEn : out std_logic := '0'; phy1_RxDat : in std_logic_vector(1 downto 0) := (others => '0'); phy1_RxDv : in std_logic; phy1_RxErr : in std_logic; phy1_TxDat : out std_logic_vector(1 downto 0) := (others => '0'); phy1_TxEn : out std_logic := '0'; --- MII PORTS phyMii0_RxClk : in std_logic; phyMii0_RxDat : in std_logic_vector(3 downto 0) := (others => '0'); phyMii0_RxDv : in std_logic; phyMii0_RxEr : in std_logic; phyMii0_TxClk : in std_logic; phyMii0_TxDat : out std_logic_vector(3 downto 0) := (others => '0'); phyMii0_TxEn : out std_logic := '0'; phyMii0_TxEr : out std_logic := '0'; phyMii1_RxClk : in std_logic; phyMii1_RxDat : in std_logic_vector(3 downto 0) := (others => '0'); phyMii1_RxDv : in std_logic; phyMii1_RxEr : in std_logic; phyMii1_TxClk : in std_logic; phyMii1_TxDat : out std_logic_vector(3 downto 0) := (others => '0'); phyMii1_TxEn : out std_logic := '0'; phyMii1_TxEr : out std_logic := '0'; --- LEDs led_error : out std_logic := '0'; led_status : out std_logic := '0'; led_phyLink : out std_logic_vector(1 downto 0) := (others => '0'); led_phyAct : out std_logic_vector(1 downto 0) := (others => '0'); led_opt : out std_logic_vector(1 downto 0) := (others => '0'); led_gpo : out std_logic_vector(7 downto 0) := (others => '0') ); end powerlink; architecture rtl of powerlink is signal smi_Clk : std_logic := '0'; signal smi_Di : std_logic := '0'; signal smi_Do : std_logic := '0'; signal smi_Doe : std_logic := '0'; signal phy_nResetOut : std_logic := '0'; signal irqToggle : std_logic := '0'; signal ap_chipselect_s : std_logic := '0'; signal ap_read_s : std_logic := '0'; signal ap_write_s : std_logic := '0'; signal ap_byteenable_s : std_logic_vector(ap_byteenable'range) := (others => '0'); signal ap_address_s : std_logic_vector(ap_address'range) := (others => '0'); signal ap_writedata_s : std_logic_vector(ap_writedata'range):= (others => '0'); signal ap_readdata_s : std_logic_vector(ap_readdata'range) := (others => '0'); signal pap_cs_s : std_logic; signal pap_rd_s : std_logic; signal pap_wr_s : std_logic; signal pap_be_s : std_logic_vector(pap_be'range); signal pap_ack_s : std_logic; signal ap_irq_s : std_logic; signal ap_asyncIrq_s : std_logic; signal spi_sel_s : std_logic; signal spi_sel_s1 : std_logic; signal spi_sel_s2 : std_logic; signal spi_clk_s : std_logic; signal spi_clk_s1 : std_logic; signal spi_clk_s2 : std_logic; signal spi_mosi_s : std_logic; signal spi_mosi_s1 : std_logic; signal spi_mosi_s2 : std_logic; signal phyLink, phyAct : std_logic_vector(1 downto 0); signal led_s : std_logic_vector(15 downto 0); signal clkAp_s, rstAp_s : std_logic; --PDI change buffer triggers for hw acc to pdi signal rpdo_change_tog : std_logic_vector(2 downto 0); signal tpdo_change_tog : std_logic; begin --general signals clkAp_s <= clkAp when genOnePdiClkDomain_g = FALSE else clkPcp; rstAp_s <= rstAp when genOnePdiClkDomain_g = FALSE else rstPcp; phyLink <= phy1_link & phy0_link; --LEDs: GPO7, ..., GPO0, O1, O0, PA1, PL1, PA0, PL0, E, S led_error <= led_s(1); led_status <= led_s(0); led_phyLink <= led_s(4) & led_s(2); led_phyAct <= led_s(5) & led_s(3); led_opt <= led_s(7) & led_s(6); led_gpo <= led_s(15 downto 8); ------------------------------------------------------------------------------------------------------------------------ --PCP + AP genPdi : if genPdi_g and genInternalAp_g and not genSpiAp_g generate --sync and async interrupt are driven by only one line -- this gives some effort for Nios II AP ;) ap_irq <= ap_irq_s or ap_asyncIrq_s; -- added by mairt (2.3.2012) -- microblaze can handle 2 interrupts ap_syncIrq <= ap_irq_s; ap_syncIrq_n <= not ap_irq_s; ap_asyncIrq <= ap_asyncIrq_s; ap_asyncIrq_n <= not ap_asyncIrq_s; theAvalonPdi : entity work.pdi generic map ( genOnePdiClkDomain_g => genOnePdiClkDomain_g, iPdiRev_g => iPdiRev_g, iRpdos_g => iRpdos_g, iTpdos_g => iTpdos_g, genABuf1_g => genABuf1_g, genABuf2_g => genABuf2_g, genLedGadget_g => genLedGadget_g, genTimeSync_g => genTimeSync_g, genEvent_g => genEvent_g, --PDO buffer size *3 iTpdoBufSize_g => iTpdoBufSize_g, iRpdo0BufSize_g => iRpdo0BufSize_g, iRpdo1BufSize_g => iRpdo1BufSize_g, iRpdo2BufSize_g => iRpdo2BufSize_g, --asynchronous buffer size iABuf1_g => iAsyBuf1Size_g, iABuf2_g => iAsyBuf2Size_g ) port map ( pcp_reset => rstPcp, pcp_clk => clkPcp, ap_reset => rstAp_s, ap_clk => clkAp_s, -- Avalon Slave Interface for PCP pcp_chipselect => pcp_chipselect, pcp_read => pcp_read, pcp_write => pcp_write, pcp_byteenable => pcp_byteenable, pcp_address => pcp_address, pcp_writedata => pcp_writedata, pcp_readdata => pcp_readdata, pcp_waitrequest => pcp_waitrequest, pcp_irq => irqToggle, -- Avalon Slave Interface for AP ap_chipselect => ap_chipselect, ap_read => ap_read, ap_write => ap_write, ap_byteenable => ap_byteenable, ap_address => ap_address, ap_writedata => ap_writedata, ap_readdata => ap_readdata, ap_waitrequest => ap_waitrequest, ap_irq => ap_irq_s, -- async interrupt ap_asyncIrq => ap_asyncIrq_s, -- LED ledsOut => led_s, phyLink => phyLink, phyAct => phyAct, --PDI change buffer triggers rpdo_change_tog => rpdo_change_tog, tpdo_change_tog => tpdo_change_tog ); end generate genPdi; --AP is external connected via parallel interface genPdiPar : if genPdi_g and not genInternalAp_g and not genSpiAp_g generate --only 8 or 16bit data width is allowed ASSERT ( papDataWidth_g = 8 or papDataWidth_g = 16 ) REPORT "External parallel port only allows 8 or 16bit data width!" severity failure; ------------------------------------------------------------------------------------- --convert active low signals to active high - respectively assign active high signals theActiveLowGen : if papLowAct_g generate pap_wr_s <= not pap_wr_n; pap_rd_s <= not pap_rd_n; pap_cs_s <= not pap_cs_n; pap_be_s <= not pap_be_n; end generate; theActiveHighGen : if not papLowAct_g generate pap_wr_s <= pap_wr; pap_rd_s <= pap_rd; pap_cs_s <= pap_cs; pap_be_s <= pap_be; end generate; ap_syncIrq <= ap_irq_s; ap_syncIrq_n <= not ap_irq_s; ap_asyncIrq <= ap_asyncIrq_s; ap_asyncIrq_n <= not ap_asyncIrq_s; pap_ack <= pap_ack_s; pap_ack_n <= not pap_ack_s; -- ------------------------------------------------------------------------------------- theParPort : entity work.pdi_par generic map ( papDataWidth_g => papDataWidth_g, papBigEnd_g => papBigEnd_g, papGenIoBuf_g => genIoBuf_g ) port map ( -- 8/16bit parallel pap_cs => pap_cs_s, pap_rd => pap_rd_s, pap_wr => pap_wr_s, pap_be => pap_be_s, pap_addr => pap_addr, pap_data => pap_data, pap_data_I => pap_data_I, pap_data_O => pap_data_O, pap_data_T => pap_data_T, pap_ack => pap_ack_s, pap_gpio => pap_gpio, pap_gpio_I => pap_gpio_I, pap_gpio_O => pap_gpio_O, pap_gpio_T => pap_gpio_T, -- clock for AP side ap_reset => rstPcp, ap_clk => clk50, -- Avalon Slave Interface for AP ap_chipselect => ap_chipselect_s, ap_read => ap_read_s, ap_write => ap_write_s, ap_byteenable => ap_byteenable_s, ap_address => ap_address_s, ap_writedata => ap_writedata_s, ap_readdata => ap_readdata_s ); thePdi : entity work.pdi generic map ( genOnePdiClkDomain_g => genOnePdiClkDomain_g, iPdiRev_g => iPdiRev_g, iRpdos_g => iRpdos_g, iTpdos_g => iTpdos_g, genABuf1_g => genABuf1_g, genABuf2_g => genABuf2_g, genLedGadget_g => genLedGadget_g, genTimeSync_g => genTimeSync_g, genEvent_g => genEvent_g, --PDO buffer size *3 iTpdoBufSize_g => iTpdoBufSize_g, iRpdo0BufSize_g => iRpdo0BufSize_g, iRpdo1BufSize_g => iRpdo1BufSize_g, iRpdo2BufSize_g => iRpdo2BufSize_g, --asynchronous buffer size iABuf1_g => iAsyBuf1Size_g, iABuf2_g => iAsyBuf2Size_g ) port map ( pcp_reset => rstPcp, pcp_clk => clkPcp, ap_reset => rst, ap_clk => clk50, -- Avalon Slave Interface for PCP pcp_chipselect => pcp_chipselect, pcp_read => pcp_read, pcp_write => pcp_write, pcp_byteenable => pcp_byteenable, pcp_address => pcp_address, pcp_writedata => pcp_writedata, pcp_readdata => pcp_readdata, pcp_waitrequest => pcp_waitrequest, pcp_irq => irqToggle, -- Avalon Slave Interface for AP ap_chipselect => ap_chipselect_s, ap_read => ap_read_s, ap_write => ap_write_s, ap_byteenable => ap_byteenable_s, ap_address => ap_address_s, ap_writedata => ap_writedata_s, ap_readdata => ap_readdata_s, ap_waitrequest => open, ap_irq => ap_irq_s, -- async interrupt ap_asyncIrq => ap_asyncIrq_s, -- LED ledsOut => led_s, phyLink => phyLink, phyAct => phyAct, --PDI change buffer triggers rpdo_change_tog => rpdo_change_tog, tpdo_change_tog => tpdo_change_tog ); end generate genPdiPar; --AP is extern connected via SPI genPdiSpi : if genPdi_g and genSpiAp_g generate ap_syncIrq <= ap_irq_s; ap_syncIrq_n <= not ap_irq_s; ap_asyncIrq <= ap_asyncIrq_s; ap_asyncIrq_n <= not ap_asyncIrq_s; spi_clk_s <= spi_clk; spi_sel_s <= not spi_sel_n; spi_mosi_s <= spi_mosi; theSyncProc : process(clk50, rst) begin if rst = '1' then spi_sel_s1 <= '0'; spi_sel_s2 <= '0'; spi_clk_s1 <= '0'; spi_clk_s2 <= '0'; spi_mosi_s1 <= '0'; spi_mosi_s2 <= '0'; elsif clk50 = '1' and clk50'event then spi_sel_s1 <= spi_sel_s; spi_sel_s2 <= spi_sel_s1; spi_clk_s1 <= spi_clk_s; spi_clk_s2 <= spi_clk_s1; spi_mosi_s1 <= spi_mosi_s; spi_mosi_s2 <= spi_mosi_s1; end if; end process; ------------------------------------------------------------------------------------------------------------------------ thePdiSpi : entity work.pdi_spi generic map ( spiSize_g => 8, --fixed value! cpol_g => spiCPOL_g, cpha_g => spiCPHA_g, spiBigEnd_g => spiBigEnd_g ) port map ( -- SPI spi_clk => spi_clk_s2, spi_sel => spi_sel_s2, spi_miso => spi_miso, spi_mosi => spi_mosi_s2, -- clock for AP side ap_reset => rstPcp, ap_clk => clk50, -- Avalon Slave Interface for AP ap_chipselect => ap_chipselect_s, ap_read => ap_read_s, ap_write => ap_write_s, ap_byteenable => ap_byteenable_s, ap_address => ap_address_s, ap_writedata => ap_writedata_s, ap_readdata => ap_readdata_s ); thePdi : entity work.pdi generic map ( genOnePdiClkDomain_g => genOnePdiClkDomain_g, iPdiRev_g => iPdiRev_g, iRpdos_g => iRpdos_g, iTpdos_g => iTpdos_g, genABuf1_g => genABuf1_g, genABuf2_g => genABuf2_g, genLedGadget_g => genLedGadget_g, genTimeSync_g => genTimeSync_g, genEvent_g => genEvent_g, --PDO buffer size *3 iTpdoBufSize_g => iTpdoBufSize_g, iRpdo0BufSize_g => iRpdo0BufSize_g, iRpdo1BufSize_g => iRpdo1BufSize_g, iRpdo2BufSize_g => iRpdo2BufSize_g, --asynchronous buffer size iABuf1_g => iAsyBuf1Size_g, iABuf2_g => iAsyBuf2Size_g ) port map ( pcp_reset => rstPcp, pcp_clk => clkPcp, ap_reset => rst, ap_clk => clk50, -- Avalon Slave Interface for PCP pcp_chipselect => pcp_chipselect, pcp_read => pcp_read, pcp_write => pcp_write, pcp_byteenable => pcp_byteenable, pcp_address => pcp_address, pcp_writedata => pcp_writedata, pcp_readdata => pcp_readdata, pcp_waitrequest => pcp_waitrequest, pcp_irq => irqToggle, -- Avalon Slave Interface for AP ap_chipselect => ap_chipselect_s, ap_read => ap_read_s, ap_write => ap_write_s, ap_byteenable => ap_byteenable_s, ap_address => ap_address_s, ap_writedata => ap_writedata_s, ap_readdata => ap_readdata_s, ap_waitrequest => open, ap_irq => ap_irq_s, -- async interrupt ap_asyncIrq => ap_asyncIrq_s, -- LED ledsOut => led_s, phyLink => phyLink, phyAct => phyAct, --PDI change buffer triggers rpdo_change_tog => rpdo_change_tog, tpdo_change_tog => tpdo_change_tog ); end generate genPdiSpi; -- ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ --SIMPLE I/O CN genSimpleIO : if genSimpleIO_g generate thePortIO : entity work.portio generic map ( pioValLen_g => pioValLen_g, pioGenIoBuf_g => genIoBuf_g ) port map ( s0_address => smp_address, s0_read => smp_read, s0_readdata => smp_readdata, s0_write => smp_write, s0_writedata => smp_writedata, s0_byteenable => smp_byteenable, s0_waitrequest => smp_waitrequest, clk => clkPcp, reset => rstPcp, x_pconfig => pio_pconfig, x_portInLatch => pio_portInLatch, x_portOutValid => pio_portOutValid, x_portio => pio_portio, x_portio_I => pio_portio_I, x_portio_O => pio_portio_O, x_portio_T => pio_portio_T, x_operational => pio_operational ); end generate genSimpleIO; -- ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ --OPENMAC (OPENHUB, OPENFILTER, PHY MANAGEMENT) theOpenMac : entity work.openMAC_Ethernet generic map ( endian_g => endian_g, dma_highadr_g => m_address'high, gen2ndCmpTimer_g => use2ndCmpTimer_g, genHub_g => use2ndPhy_g, iPktBufSizeLog2_g => iBufSizeLOG2_g, iPktBufSize_g => iBufSize_g, simulate => false, useIntPktBuf_g => useIntPacketBuf_g, useRmii_g => useRmii_g, useRxIntPktBuf_g => useRxIntPacketBuf_g, m_burstcount_width_g => m_burstcount_width_g, m_burstcount_const_g => m_burstcount_const_g, m_data_width_g => m_data_width_g, m_tx_fifo_size_g => m_tx_fifo_size_g, m_rx_fifo_size_g => m_rx_fifo_size_g, m_tx_burst_size_g => m_tx_burst_size_g, m_rx_burst_size_g => m_rx_burst_size_g, genSmiIO => genSmiIO, gNumSmi => gNumSmi, genPhyActLed_g => genLedGadget_g, gen_dma_observer_g => gen_dma_observer_g ) port map( clk => clk50, clkx2 => clkEth, pkt_clk => pkt_clk, m_clk => m_clk, rst => rst, m_address => m_address, m_burstcount => m_burstcount, m_burstcounter => m_burstcounter, m_byteenable => m_byteenable, m_read => m_read, m_readdata => m_readdata, m_readdatavalid => m_readdatavalid, m_write => m_write, m_writedata => m_writedata, m_waitrequest => m_waitrequest, mac_rx_irq => open, mac_tx_irq => open, act_led => phyAct(0), phy0_rst_n => phy0_Rst_n, phy0_rx_dat => phy0_RxDat, phy0_rx_dv => phy0_RxDv, phy0_rx_err => phy0_RxErr, phy0_smi_clk => phy0_SMICLK, phy0_smi_dio => phy0_SMIDat, phy0_smi_dio_I => phy0_SMIDat_I, phy0_smi_dio_O => phy0_SMIDat_O, phy0_smi_dio_T => phy0_SMIDat_T, phy0_tx_dat => phy0_TxDat, phy0_tx_en => phy0_TxEn, phy1_rst_n => phy1_Rst_n, phy1_rx_dat => phy1_RxDat, phy1_rx_dv => phy1_RxDv, phy1_rx_err => phy1_RxErr, phy1_smi_clk => phy1_SMICLK, phy1_smi_dio => phy1_SMIDat, phy1_smi_dio_I => phy1_SMIDat_I, phy1_smi_dio_O => phy1_SMIDat_O, phy1_smi_dio_T => phy1_SMIDat_T, phy1_tx_dat => phy1_TxDat, phy1_tx_en => phy1_TxEn, phyMii0_rx_clk => phyMii0_RxClk, phyMii0_rx_dat => phyMii0_RxDat, phyMii0_rx_dv => phyMii0_RxDv, phyMii0_rx_err => phyMii0_RxEr, phyMii0_tx_clk => phyMii0_TxClk, phyMii0_tx_dat => phyMii0_TxDat, phyMii0_tx_en => phyMii0_TxEn, phyMii1_rx_clk => phyMii1_RxClk, phyMii1_rx_dat => phyMii1_RxDat, phyMii1_rx_dv => phyMii1_RxDv, phyMii1_rx_err => phyMii1_RxEr, phyMii1_tx_clk => phyMii1_TxClk, phyMii1_tx_dat => phyMii1_TxDat, phyMii1_tx_en => phyMii1_TxEn, phy_rst_n => phy_Rst_n, phy_smi_clk => phy_SMIClk, phy_smi_dio_I => phy_SMIDat_I, phy_smi_dio_O => phy_SMIDat_O, phy_smi_dio_T => phy_SMIDat_T, phy_smi_dio => phy_SMIDat, pkt_address => mbf_address, pkt_byteenable => mbf_byteenable, pkt_chipselect => mbf_chipselect, pkt_read => mbf_read, pkt_readdata => mbf_readdata, pkt_waitrequest => mbf_waitrequest, pkt_write => mbf_write, pkt_writedata => mbf_writedata, s_address => mac_address, s_byteenable => mac_byteenable, s_chipselect => mac_chipselect, s_irq => mac_irq, s_read => mac_read, s_readdata => mac_readdata, s_waitrequest => mac_waitrequest, s_write => mac_write, s_writedata => mac_writedata, t_address => tcp_address, t_byteenable => tcp_byteenable, t_chipselect => tcp_chipselect, t_irq => tcp_irq, t_read => tcp_read, t_readdata => tcp_readdata, t_tog => irqToggle, t_waitrequest => tcp_waitrequest, t_write => tcp_write, t_writedata => tcp_writedata ); phyAct(1) <= phyAct(0); -- ------------------------------------------------------------------------------------------------------------------------ end rtl;
gpl-2.0
scalable-networks/ext
uhd/fpga/usrp2/opencores/spi_boot/rtl/vhdl/chip-minimal-a.vhd
2
6046
------------------------------------------------------------------------------- -- -- SD/MMC Bootloader -- Chip toplevel design with minimal feature set -- -- $Id: chip-minimal-a.vhd,v 1.6 2005/04/07 20:44:23 arniml Exp $ -- -- Copyright (c) 2005, Arnim Laeuger ([email protected]) -- -- All rights reserved, see COPYING. -- -- Redistribution and use in source and synthezised forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- -- Redistributions in synthesized form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- Neither the name of the author nor the names of other contributors may -- be used to endorse or promote products derived from this software without -- specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- -- Please report bugs to the author, but before you do so, please -- make sure that this is not a derivative work and that -- you have the latest version of this file. -- -- The latest version of this file can be found at: -- http://www.opencores.org/projects.cgi/web/spi_boot/overview -- ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; architecture minimal of chip is component spi_boot generic ( width_set_sel_g : integer := 4; width_bit_cnt_g : integer := 6; width_img_cnt_g : integer := 2; num_bits_per_img_g : integer := 18; sd_init_g : integer := 0; mmc_compat_clk_div_g : integer := 0; width_mmc_clk_div_g : integer := 0; reset_level_g : integer := 0 ); port ( clk_i : in std_logic; reset_i : in std_logic; set_sel_i : in std_logic_vector(width_set_sel_g-1 downto 0); spi_clk_o : out std_logic; spi_cs_n_o : out std_logic; spi_data_in_i : in std_logic; spi_data_out_o : out std_logic; spi_en_outs_o : out std_logic; start_i : in std_logic; mode_i : in std_logic; config_n_o : out std_logic; detached_o : out std_logic; cfg_init_n_i : in std_logic; cfg_done_i : in std_logic; dat_done_i : in std_logic; cfg_clk_o : out std_logic; cfg_dat_o : out std_logic ); end component; signal spi_clk_s : std_logic; signal spi_cs_n_s : std_logic; signal spi_data_out_s : std_logic; signal spi_en_outs_s : std_logic; signal set_sel_s : std_logic_vector(3 downto 0); begin set_sel_s <= not set_sel_n_i; spi_boot_b : spi_boot generic map ( width_set_sel_g => 4, -- 16 sets width_bit_cnt_g => 6, -- 8 bytes per block width_img_cnt_g => 2, -- 4 images num_bits_per_img_g => 18, -- 256 kByte per image sd_init_g => 0, -- no SD specific initialization mmc_compat_clk_div_g => 0, -- no MMC compatibility width_mmc_clk_div_g => 0 -- no MMC compatibility ) port map ( clk_i => clk_i, reset_i => reset_i, set_sel_i => set_sel_s, spi_clk_o => spi_clk_s, spi_cs_n_o => spi_cs_n_s, spi_data_in_i => spi_data_in_i, spi_data_out_o => spi_data_out_s, spi_en_outs_o => spi_en_outs_s, start_i => start_i, mode_i => mode_i, config_n_o => config_n_o, detached_o => detached_o, cfg_init_n_i => cfg_init_n_i, cfg_done_i => cfg_done_i, dat_done_i => dat_done_i, cfg_clk_o => cfg_clk_o, cfg_dat_o => cfg_dat_o ); ----------------------------------------------------------------------------- -- Three state drivers for SPI outputs. ----------------------------------------------------------------------------- spi_clk_o <= spi_clk_s when spi_en_outs_s = '1' else 'Z'; spi_cs_n_o <= spi_cs_n_s when spi_en_outs_s = '1' else 'Z'; spi_data_out_o <= spi_data_out_s when spi_en_outs_s = '1' else 'Z'; end minimal; ------------------------------------------------------------------------------- -- File History: -- -- $Log: chip-minimal-a.vhd,v $ -- Revision 1.6 2005/04/07 20:44:23 arniml -- add new port detached_o -- -- Revision 1.5 2005/03/09 19:48:34 arniml -- invert level of set_sel input -- -- Revision 1.4 2005/03/08 22:07:12 arniml -- added set selection -- -- Revision 1.3 2005/02/18 06:42:12 arniml -- clarify wording for images -- -- Revision 1.2 2005/02/16 18:54:39 arniml -- added tri-state drivers for spi outputs -- -- Revision 1.1 2005/02/08 20:41:31 arniml -- initial check-in -- -------------------------------------------------------------------------------
gpl-2.0
Charlesworth/Albot
Albot VHDL/DIVV.vhd
1
1086
LIBRARY ieee; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use ieee.numeric_std.all; entity bit_DIVV is port (in_Bus : in std_logic_vector(7 downto 0); out_bus : out std_logic_vector(15 downto 0); WindowEnable : in std_logic; clk : in std_logic; U_enable : std_logic; TrainFlag: in std_logic; aclr : in std_logic; AccumulateSIGNAL: in std_logic; CalculateSIGNAL: in std_logic; last_row : in std_logic ); end bit_DIVV; architecture str_AddDiv1 of bit_DIVV is signal data_total : std_logic_vector (15 downto 0); signal add : integer range -16384 to 16383; begin TRAINcalculate: process(TrainFlag,CalculateSIGNAL) -- at end of training period do this, but only at start of a frame (and end of Vsync period) variable Calc_total : std_logic_vector(15 downto 0); begin if (CalculateSIGNAL'event) and (CalculateSIGNAL='1') then data_total <= data_total sll 2; out_bus <= data_total; if (TrainFlag = '1')then -- HERE end if; end if; end process TRAINcalculate; end str_AddDiv1;
gpl-2.0
gauravks/i210dummy
Examples/altera_nios2/ipcore/powerlink/src/tbOpenMAC.vhd
1
22541
------------------------------------------------------------------------------- -- Entity : openMAC Testbench ------------------------------------------------------------------------------- -- -- (c) B&R, 2012 -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- 3. Neither the name of B&R nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without prior written permission. For written -- permission, please contact [email protected] -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- ------------------------------------------------------------------------------- -- Design unit header -- library IEEE; use IEEE.std_logic_1164.all; use ieee.numeric_std.all; library work; use global.all; entity tbOpenMAC is end tbOpenMAC; architecture bhv of tbOpenMAC is ---- Component declarations ----- component busMaster generic( gAddrWidth : integer := 32; gDataWidth : integer := 32; gStimuliFile : string := "name_TB_stim.txt" ); port ( iAck : in std_logic; iClk : in std_logic; iEnable : in std_logic; iReaddata : in std_logic_vector(gDataWidth-1 downto 0); iRst : in std_logic; oAddress : out std_logic_vector(gAddrWidth-1 downto 0); oByteenable : out std_logic_vector(gDataWidth/8-1 downto 0); oDone : out std_logic; oRead : out std_logic; oSelect : out std_logic; oWrite : out std_logic; oWritedata : out std_logic_vector(gDataWidth-1 downto 0) ); end component; component clkgen generic( gPeriod : time := 20 ns ); port ( iDone : in std_logic; oClk : out std_logic ); end component; component edgeDet port ( clk : in std_logic; din : in std_logic; rst : in std_logic; any : out std_logic; falling : out std_logic; rising : out std_logic ); end component; component enableGen generic( gEnableDelay : time := 100 ns ); port ( iReset : in std_logic; oEnable : out std_logic; onEnable : out std_logic ); end component; component OpenMAC_DMAFifo generic( fifo_data_width_g : natural := 16; fifo_word_size_g : natural := 32; fifo_word_size_log2_g : natural := 5 ); port ( aclr : in std_logic; rd_clk : in std_logic; rd_req : in std_logic; wr_clk : in std_logic; wr_data : in std_logic_vector(fifo_data_width_g-1 downto 0); wr_req : in std_logic; rd_data : out std_logic_vector(fifo_data_width_g-1 downto 0); rd_empty : out std_logic; rd_full : out std_logic; rd_usedw : out std_logic_vector(fifo_word_size_log2_g-1 downto 0); wr_empty : out std_logic; wr_full : out std_logic; wr_usedw : out std_logic_vector(fifo_word_size_log2_g-1 downto 0) ); end component; component openmac_ethernet generic( dma_highadr_g : integer := 31; endian_g : string := "little"; gNumSmi : integer := 2; gen2ndCmpTimer_g : boolean := false; genHub_g : boolean := false; genPhyActLed_g : boolean := false; genSmiIO : boolean := true; gen_dma_observer_g : boolean := true; iPktBufSizeLog2_g : integer := 10; iPktBufSize_g : integer := 1024; m_burstcount_const_g : boolean := true; m_burstcount_width_g : integer := 4; m_data_width_g : integer := 16; m_rx_burst_size_g : integer := 16; m_rx_fifo_size_g : integer := 16; m_tx_burst_size_g : integer := 16; m_tx_fifo_size_g : integer := 16; simulate : boolean := false; useIntPktBuf_g : boolean := false; useRmii_g : boolean := true; useRxIntPktBuf_g : boolean := false ); port ( clk : in std_logic; clkx2 : in std_logic; m_clk : in std_logic; m_readdata : in std_logic_vector(m_data_width_g-1 downto 0) := (others => '0'); m_readdatavalid : in std_logic; m_waitrequest : in std_logic; phy0_rx_dat : in std_logic_vector(1 downto 0); phy0_rx_dv : in std_logic; phy0_rx_err : in std_logic; phy0_smi_dio_I : in std_logic; phy1_rx_dat : in std_logic_vector(1 downto 0); phy1_rx_dv : in std_logic; phy1_rx_err : in std_logic; phy1_smi_dio_I : in std_logic; phyMii0_rx_clk : in std_logic; phyMii0_rx_dat : in std_logic_vector(3 downto 0); phyMii0_rx_dv : in std_logic; phyMii0_rx_err : in std_logic; phyMii0_tx_clk : in std_logic; phyMii1_rx_clk : in std_logic; phyMii1_rx_dat : in std_logic_vector(3 downto 0); phyMii1_rx_dv : in std_logic; phyMii1_rx_err : in std_logic; phyMii1_tx_clk : in std_logic; phy_smi_dio_I : in std_logic; pkt_address : in std_logic_vector(iPktBufSizeLog2_g-3 downto 0) := (others => '0'); pkt_byteenable : in std_logic_vector(3 downto 0); pkt_chipselect : in std_logic; pkt_clk : in std_logic; pkt_read : in std_logic; pkt_write : in std_logic; pkt_writedata : in std_logic_vector(31 downto 0); rst : in std_logic; s_address : in std_logic_vector(11 downto 0); s_byteenable : in std_logic_vector(1 downto 0); s_chipselect : in std_logic; s_read : in std_logic; s_write : in std_logic; s_writedata : in std_logic_vector(15 downto 0); t_address : in std_logic_vector(1 downto 0); t_byteenable : in std_logic_vector(3 downto 0); t_chipselect : in std_logic; t_read : in std_logic; t_write : in std_logic; t_writedata : in std_logic_vector(31 downto 0); act_led : out std_logic; m_address : out std_logic_vector(29 downto 0); m_burstcount : out std_logic_vector(m_burstcount_width_g-1 downto 0); m_burstcounter : out std_logic_vector(m_burstcount_width_g-1 downto 0); m_byteenable : out std_logic_vector(m_data_width_g/8-1 downto 0); m_read : out std_logic; m_write : out std_logic; m_writedata : out std_logic_vector(m_data_width_g-1 downto 0); mac_rx_irq : out std_logic; mac_tx_irq : out std_logic; phy0_rst_n : out std_logic; phy0_smi_clk : out std_logic; phy0_smi_dio_O : out std_logic; phy0_smi_dio_T : out std_logic; phy0_tx_dat : out std_logic_vector(1 downto 0); phy0_tx_en : out std_logic; phy1_rst_n : out std_logic; phy1_smi_clk : out std_logic; phy1_smi_dio_O : out std_logic; phy1_smi_dio_T : out std_logic; phy1_tx_dat : out std_logic_vector(1 downto 0); phy1_tx_en : out std_logic; phyMii0_tx_dat : out std_logic_vector(3 downto 0); phyMii0_tx_en : out std_logic; phyMii1_tx_dat : out std_logic_vector(3 downto 0); phyMii1_tx_en : out std_logic; phy_rst_n : out std_logic; phy_smi_clk : out std_logic; phy_smi_dio_O : out std_logic; phy_smi_dio_T : out std_logic; pkt_readdata : out std_logic_vector(31 downto 0); pkt_waitrequest : out std_logic; s_irq : out std_logic; s_readdata : out std_logic_vector(15 downto 0); s_waitrequest : out std_logic; t_irq : out std_logic; t_readdata : out std_logic_vector(31 downto 0); t_tog : out std_logic; t_waitrequest : out std_logic; phy0_smi_dio : inout std_logic := '1'; phy1_smi_dio : inout std_logic := '1'; phy_smi_dio : inout std_logic := '1' ); end component; component req_ack generic( ack_delay_g : integer := 1; zero_delay_g : boolean := false ); port ( clk : in std_logic; enable : in std_logic; rst : in std_logic; ack : out std_logic ); end component; ---- Architecture declarations ----- -- Click here to add additional declarations -- constant cAddrwidth : integer := 32; constant cDatawidth : integer := 16; constant cEnableLoop : boolean := true; constant cRmiiDelayExp : integer := 20; -- 2**10 constant cGenManCol : boolean := false; --collision with manual tx frame constant cGenAutoCol : boolean := false; --collision with auto tx frame constant cDmaDataWidth : integer := 32; constant cDmaBurstWidth : integer := 6; ---- Constants ----- constant DANGLING_INPUT_CONSTANT : std_logic := 'Z'; constant GND_CONSTANT : std_logic := '0'; ---- Signal declarations used on the diagram ---- signal ack : std_logic; signal busMasterDone : std_logic; signal clk100 : std_logic; signal clk50 : std_logic; signal done : std_logic := '1'; signal enable : std_logic; signal fifo_rd_empty : std_logic; signal fifo_rd_req : std_logic; signal fifo_wr_req : std_logic; signal fifo_wr_req_falling : std_logic; signal GND : std_logic; signal macDone : std_logic; signal m_read : std_logic; signal m_readdatavalid : std_logic; signal m_waitrequest : std_logic; signal m_write : std_logic; signal NET799 : std_logic; signal NET808 : std_logic; signal phy0_rx_dv : std_logic; signal phy0_rx_err : std_logic; signal phy0_tx_en : std_logic; signal phy1_rx_dv : std_logic; signal phy1_rx_err : std_logic; signal phy1_tx_en : std_logic; signal read : std_logic; signal reset : std_logic; signal rst : std_logic; signal sel : std_logic; signal s_chipselect : std_logic; signal s_read : std_logic; signal s_waitrequest : std_logic; signal s_write : std_logic; signal write : std_logic; signal address : std_logic_vector (cAddrwidth-1 downto 0); signal byteenable : std_logic_vector (cDatawidth/8-1 downto 0); signal fifo_rd_data : std_logic_vector (1 downto 0); signal fifo_rd_usedw : std_logic_vector (cRmiiDelayExp-1 downto 0); signal fifo_wr_data : std_logic_vector (1 downto 0); signal fifo_wr_done : std_logic_vector (31 downto 0); signal m_burstcount : std_logic_vector (cDmaBurstWidth-1 downto 0); signal m_burstcounter : std_logic_vector (cDmaBurstWidth-1 downto 0); signal phy0_rx_dat : std_logic_vector (1 downto 0); signal phy0_tx_dat : std_logic_vector (1 downto 0); signal phy1_rx_dat : std_logic_vector (1 downto 0); signal phy1_tx_dat : std_logic_vector (1 downto 0); signal readdata : std_logic_vector (cDatawidth-1 downto 0); signal s_address : std_logic_vector (11 downto 0); signal s_byteenable : std_logic_vector (1 downto 0); signal s_readdata : std_logic_vector (15 downto 0); signal s_writedata : std_logic_vector (15 downto 0); signal writedata : std_logic_vector (cDatawidth-1 downto 0); ---- Declaration for Dangling input ---- signal Dangling_Input_Signal : STD_LOGIC; begin ---- User Signal Assignments ---- --generate done signal done <= busMasterDone and macDone; --mac macDone <= '1'; -- write s_chipselect <= sel; s_read <= read; s_write <= write; s_address <= address(s_address'high+1 downto 1); s_byteenable <= byteenable; s_writedata <= writedata; -- read readdata <= s_readdata; ack <= not s_waitrequest; --master m_waitrequest <= not(m_read or m_write); m_readdatavalid <= '0' when unsigned(m_burstcounter) = 0 or m_write = '1' else not m_read; --phy if genNoRx : if not cEnableLoop generate begin phy0_rx_dv <= '0'; phy0_rx_err <= '0'; phy0_rx_dat <= "00"; end generate; phy1_rx_dv <= phy0_tx_en after 2500 ns when cGenManCol else phy0_tx_en after 2500 ns when cGenAutoCol and unsigned(fifo_wr_done) = 1 else '0'; phy1_rx_err <= '0'; phy1_rx_dat <= phy0_tx_dat after 2500 ns when cGenManCol else phy0_tx_dat after 2500 ns when cGenAutoCol and unsigned(fifo_wr_done) = 1 else "00"; fifo_wr_req <= phy0_tx_en; genLoop : if cEnableLoop generate begin fifo_wr_data <= phy0_tx_dat; phy0_rx_dv <= fifo_rd_req; phy0_rx_dat <= fifo_rd_data(1 downto 0); phy0_rx_err <= '0'; end generate; procFifoRdReq : process(clk50, reset) begin if reset = '1' then fifo_rd_req <= '0'; fifo_wr_done <= (others => '0'); elsif rising_edge(clk50) then if fifo_rd_empty = '1' then fifo_rd_req <= '0'; elsif fifo_wr_req_falling = '1' then fifo_rd_req <= '1' after 1 us; fifo_wr_done <= std_logic_vector(unsigned(fifo_wr_done) + 1); -- elsif unsigned(fifo_rd_usedw) > 106 and unsigned(fifo_wr_done) = 0 then -- fifo_rd_req <= '1'; -- after 1 us; -- fifo_wr_done <= std_logic_vector(unsigned(fifo_wr_done) + 1); end if; end if; end process; ---- Component instantiations ---- DUT : openmac_ethernet generic map ( dma_highadr_g => 29, endian_g => "little", gNumSmi => 2, gen2ndCmpTimer_g => false, genHub_g => true, genPhyActLed_g => false, genSmiIO => true, gen_dma_observer_g => true, iPktBufSizeLog2_g => 10, iPktBufSize_g => 1024, m_burstcount_const_g => true, m_burstcount_width_g => cDmaBurstWidth, m_data_width_g => cDmaDataWidth, m_rx_burst_size_g => 2**(cDmaBurstWidth-1), m_rx_fifo_size_g => 3*2**cDmaBurstWidth, m_tx_burst_size_g => 2**(cDmaBurstWidth-1), m_tx_fifo_size_g => 3*2**cDmaBurstWidth, simulate => false, useIntPktBuf_g => false, useRmii_g => true, useRxIntPktBuf_g => false ) port map( phyMii0_rx_dat(0) => Dangling_Input_Signal, phyMii0_rx_dat(1) => Dangling_Input_Signal, phyMii0_rx_dat(2) => Dangling_Input_Signal, phyMii0_rx_dat(3) => Dangling_Input_Signal, phyMii1_rx_dat(0) => Dangling_Input_Signal, phyMii1_rx_dat(1) => Dangling_Input_Signal, phyMii1_rx_dat(2) => Dangling_Input_Signal, phyMii1_rx_dat(3) => Dangling_Input_Signal, pkt_byteenable(0) => Dangling_Input_Signal, pkt_byteenable(1) => Dangling_Input_Signal, pkt_byteenable(2) => Dangling_Input_Signal, pkt_byteenable(3) => Dangling_Input_Signal, pkt_writedata(0) => Dangling_Input_Signal, pkt_writedata(1) => Dangling_Input_Signal, pkt_writedata(2) => Dangling_Input_Signal, pkt_writedata(3) => Dangling_Input_Signal, pkt_writedata(4) => Dangling_Input_Signal, pkt_writedata(5) => Dangling_Input_Signal, pkt_writedata(6) => Dangling_Input_Signal, pkt_writedata(7) => Dangling_Input_Signal, pkt_writedata(8) => Dangling_Input_Signal, pkt_writedata(9) => Dangling_Input_Signal, pkt_writedata(10) => Dangling_Input_Signal, pkt_writedata(11) => Dangling_Input_Signal, pkt_writedata(12) => Dangling_Input_Signal, pkt_writedata(13) => Dangling_Input_Signal, pkt_writedata(14) => Dangling_Input_Signal, pkt_writedata(15) => Dangling_Input_Signal, pkt_writedata(16) => Dangling_Input_Signal, pkt_writedata(17) => Dangling_Input_Signal, pkt_writedata(18) => Dangling_Input_Signal, pkt_writedata(19) => Dangling_Input_Signal, pkt_writedata(20) => Dangling_Input_Signal, pkt_writedata(21) => Dangling_Input_Signal, pkt_writedata(22) => Dangling_Input_Signal, pkt_writedata(23) => Dangling_Input_Signal, pkt_writedata(24) => Dangling_Input_Signal, pkt_writedata(25) => Dangling_Input_Signal, pkt_writedata(26) => Dangling_Input_Signal, pkt_writedata(27) => Dangling_Input_Signal, pkt_writedata(28) => Dangling_Input_Signal, pkt_writedata(29) => Dangling_Input_Signal, pkt_writedata(30) => Dangling_Input_Signal, pkt_writedata(31) => Dangling_Input_Signal, t_address(0) => Dangling_Input_Signal, t_address(1) => Dangling_Input_Signal, t_byteenable(0) => Dangling_Input_Signal, t_byteenable(1) => Dangling_Input_Signal, t_byteenable(2) => Dangling_Input_Signal, t_byteenable(3) => Dangling_Input_Signal, t_writedata(0) => Dangling_Input_Signal, t_writedata(1) => Dangling_Input_Signal, t_writedata(2) => Dangling_Input_Signal, t_writedata(3) => Dangling_Input_Signal, t_writedata(4) => Dangling_Input_Signal, t_writedata(5) => Dangling_Input_Signal, t_writedata(6) => Dangling_Input_Signal, t_writedata(7) => Dangling_Input_Signal, t_writedata(8) => Dangling_Input_Signal, t_writedata(9) => Dangling_Input_Signal, t_writedata(10) => Dangling_Input_Signal, t_writedata(11) => Dangling_Input_Signal, t_writedata(12) => Dangling_Input_Signal, t_writedata(13) => Dangling_Input_Signal, t_writedata(14) => Dangling_Input_Signal, t_writedata(15) => Dangling_Input_Signal, t_writedata(16) => Dangling_Input_Signal, t_writedata(17) => Dangling_Input_Signal, t_writedata(18) => Dangling_Input_Signal, t_writedata(19) => Dangling_Input_Signal, t_writedata(20) => Dangling_Input_Signal, t_writedata(21) => Dangling_Input_Signal, t_writedata(22) => Dangling_Input_Signal, t_writedata(23) => Dangling_Input_Signal, t_writedata(24) => Dangling_Input_Signal, t_writedata(25) => Dangling_Input_Signal, t_writedata(26) => Dangling_Input_Signal, t_writedata(27) => Dangling_Input_Signal, t_writedata(28) => Dangling_Input_Signal, t_writedata(29) => Dangling_Input_Signal, t_writedata(30) => Dangling_Input_Signal, t_writedata(31) => Dangling_Input_Signal, clk => clk50, clkx2 => clk100, m_burstcount => m_burstcount( cDmaBurstWidth-1 downto 0 ), m_burstcounter => m_burstcounter( cDmaBurstWidth-1 downto 0 ), m_clk => clk100, m_read => m_read, m_readdatavalid => m_readdatavalid, m_waitrequest => m_waitrequest, m_write => m_write, phy0_rx_dat => phy0_rx_dat, phy0_rx_dv => phy0_rx_dv, phy0_rx_err => phy0_rx_err, phy0_smi_dio_I => Dangling_Input_Signal, phy0_tx_dat => phy0_tx_dat, phy0_tx_en => phy0_tx_en, phy1_rx_dat => phy1_rx_dat, phy1_rx_dv => phy1_rx_dv, phy1_rx_err => phy1_rx_err, phy1_smi_dio_I => Dangling_Input_Signal, phy1_tx_dat => phy1_tx_dat, phy1_tx_en => phy1_tx_en, phyMii0_rx_clk => Dangling_Input_Signal, phyMii0_rx_dv => Dangling_Input_Signal, phyMii0_rx_err => Dangling_Input_Signal, phyMii0_tx_clk => Dangling_Input_Signal, phyMii1_rx_clk => Dangling_Input_Signal, phyMii1_rx_dv => Dangling_Input_Signal, phyMii1_rx_err => Dangling_Input_Signal, phyMii1_tx_clk => Dangling_Input_Signal, phy_smi_dio_I => Dangling_Input_Signal, pkt_chipselect => Dangling_Input_Signal, pkt_clk => Dangling_Input_Signal, pkt_read => Dangling_Input_Signal, pkt_write => Dangling_Input_Signal, rst => reset, s_address => s_address, s_byteenable => s_byteenable, s_chipselect => s_chipselect, s_read => s_read, s_readdata => s_readdata, s_waitrequest => s_waitrequest, s_write => s_write, s_writedata => s_writedata, t_chipselect => Dangling_Input_Signal, t_read => Dangling_Input_Signal, t_write => Dangling_Input_Signal ); RMII_DELAY : OpenMAC_DMAFifo generic map ( fifo_data_width_g => 2, fifo_word_size_g => 2**cRmiiDelayExp, fifo_word_size_log2_g => cRmiiDelayExp ) port map( aclr => reset, rd_clk => clk50, rd_data => fifo_rd_data( 1 downto 0 ), rd_empty => fifo_rd_empty, rd_req => fifo_rd_req, rd_usedw => fifo_rd_usedw( cRmiiDelayExp-1 downto 0 ), wr_clk => clk50, wr_data => fifo_wr_data( 1 downto 0 ), wr_req => fifo_wr_req ); TRIG_READ : edgeDet port map( clk => clk50, din => fifo_wr_req, falling => fifo_wr_req_falling, rst => rst ); U1 : clkgen generic map ( gPeriod => 20 ns ) port map( iDone => done, oClk => clk50 ); U2 : enableGen generic map ( gEnableDelay => 50 ns ) port map( iReset => GND, onEnable => reset ); U3 : enableGen generic map ( gEnableDelay => 100 ns ) port map( iReset => reset, oEnable => enable ); U4 : busMaster generic map ( gAddrWidth => cAddrwidth, gDataWidth => cDatawidth, gStimuliFile => "openMAC/tb/tbOpenMAC_stim.txt" ) port map( iAck => ack, iClk => clk50, iEnable => enable, iReaddata => readdata( cDatawidth-1 downto 0 ), iRst => reset, oAddress => address( cAddrwidth-1 downto 0 ), oByteenable => byteenable( cDatawidth/8-1 downto 0 ), oDone => busMasterDone, oRead => read, oSelect => sel, oWrite => write, oWritedata => writedata( cDatawidth-1 downto 0 ) ); U5 : req_ack generic map ( ack_delay_g => 1, zero_delay_g => true ) port map( ack => NET799, clk => clk50, enable => write, rst => reset ); U6 : req_ack generic map ( ack_delay_g => 1, zero_delay_g => false ) port map( ack => NET808, clk => clk50, enable => read, rst => reset ); ack <= NET808 or NET799; U8 : clkgen generic map ( gPeriod => 10 ns ) port map( iDone => done, oClk => clk100 ); ---- Power , ground assignment ---- GND <= GND_CONSTANT; ---- Dangling input signal assignment ---- Dangling_Input_Signal <= DANGLING_INPUT_CONSTANT; end bhv;
gpl-2.0
gauravks/i210dummy
Examples/xilinx_microblaze/ipcore/powerlink/pcores/axi_powerlink_v1_00_a/hdl/vhdl/lib/global.vhd
3
2965
------------------------------------------------------------------------------------------------------------------------ -- Global package -- -- Copyright (C) 2012 B&R -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- 3. Neither the name of B&R nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without prior written permission. For written -- permission, please contact [email protected] -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- -- ------------------------------------------------------------------------------------------------------------------------ -- Version History ------------------------------------------------------------------------------------------------------------------------ -- 2012-02-07 zelenkaj Derived from global package ------------------------------------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; package Global is constant cActivated : std_logic := '1'; constant cInactivated : std_logic := '0'; constant cnActivated : std_logic := '0'; constant cnInactivated : std_logic := '1'; function LogDualis(cNumber : natural) return natural; end Global; package body Global is function LogDualis(cNumber : natural) return natural is variable vClimbUp : natural := 1; variable vResult : natural; begin while vClimbUp < cNumber loop vClimbUp := vClimbUp * 2; vResult := vResult+1; end loop; return vResult; end LogDualis; end Global;
gpl-2.0
mharndt/profibusmonitor
VHDL_Bausteine_old/TEST_CTRL_RS232_TX/NIB4_7SEG_SRC.vhd
38
4182
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Uncomment the following lines to use the declarations that are -- provided for instantiating Xilinx primitive components. --library UNISIM; --use UNISIM.VComponents.all; entity NIB4_7SEG_SRC is Port ( NIB0 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 0 NIB1 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 1 NIB2 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 2 NIB3 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 3 CLK_DISPL : in std_logic; -- Umschaltfrequenz empfohlen: 1 kHz ZI0 : out std_logic; -- 1: Ziffer 0 soll leuchten ZI1 : out std_logic; -- 1: Ziffer 1 soll leuchten ZI2 : out std_logic; -- 1: Ziffer 2 soll leuchten ZI3 : out std_logic; -- 1: Ziffer 3 soll leuchten BA : out std_logic; -- 0: Segment A soll leuchten BB : out std_logic; -- 0: Segment B soll leuchten BC : out std_logic; -- 0: Segment C soll leuchten BD : out std_logic; -- 0: Segment D soll leuchten BE : out std_logic; -- 0: Segment E soll leuchten BF : out std_logic; -- 0: Segment F soll leuchten BG : out std_logic); -- 0: Segment G soll leuchten end NIB4_7SEG_SRC; architecture Behavioral of NIB4_7SEG_SRC is signal COUNTER : std_logic_vector(1 downto 0); signal NIB_ANZ : std_logic_vector(3 downto 0); begin process(CLK_DISPL, NIB3, NIB2, NIB1, NIB0, NIB_ANZ, COUNTER) begin If (CLK_DISPL'event and CLK_DISPL = '1') then COUNTER <= COUNTER +1; end if; case COUNTER is when "00" => ZI0 <= '1'; ZI1 <= '0'; ZI2 <= '0'; ZI3 <= '0'; NIB_ANZ <= NIB0; when "01" => ZI0 <= '0'; ZI1 <= '1'; ZI2 <= '0'; ZI3 <= '0'; NIB_ANZ <= NIB1; when "10" => ZI0 <= '0'; ZI1 <= '0'; ZI2 <= '1'; ZI3 <= '0'; NIB_ANZ <= NIB2; when "11" => ZI0 <= '0'; ZI1 <= '0'; ZI2 <= '0'; ZI3 <= '1'; NIB_ANZ <= NIB3; when others => ZI0 <= '1'; ZI1 <= '0'; ZI2 <= '0'; ZI3 <= '0'; NIB_ANZ <= NIB0; end case; case NIB_ANZ is when "0000" => BG <= '1'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --0 when "0001" => BG <= '1'; BF <= '1'; BE <= '1'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '1'; --1 when "0010" => BG <= '0'; BF <= '1'; BE <= '0'; BD <= '0'; BC <= '1'; BB <= '0'; BA <= '0'; --2 when "0011" => BG <= '0'; BF <= '1'; BE <= '1'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --3 when "0100" => BG <= '0'; BF <= '0'; BE <= '1'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '1'; --4 when "0101" => BG <= '0'; BF <= '0'; BE <= '1'; BD <= '0'; BC <= '0'; BB <= '1'; BA <= '0'; --5 when "0110" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '1'; BA <= '0'; --6 when "0111" => BG <= '1'; BF <= '1'; BE <= '1'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '0'; --7 when "1000" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --8 when "1001" => BG <= '0'; BF <= '0'; BE <= '1'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --9 when "1010" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '0'; --A when "1011" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '1'; BA <= '1'; --B when "1100" => BG <= '0'; BF <= '1'; BE <= '0'; BD <= '0'; BC <= '1'; BB <= '1'; BA <= '1'; --C when "1101" => BG <= '0'; BF <= '1'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '1'; --D when "1110" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '1'; BB <= '1'; BA <= '0'; --E when "1111" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '1'; BC <= '1'; BB <= '1'; BA <= '0'; --F when others => BG <= '1'; BF <= '1'; BE <= '1'; BD <= '1'; BC <= '1'; BB <= '1'; BA <= '1'; end case; end process; end Behavioral;
gpl-2.0
mharndt/profibusmonitor
VHDL_Bausteine_old/abandoned_code/Rueckfallposition_19_12_2012/TEST2_SRAM_25MHZ_255_BYTE/NIB4_7SEG_SRC.vhd
38
4182
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Uncomment the following lines to use the declarations that are -- provided for instantiating Xilinx primitive components. --library UNISIM; --use UNISIM.VComponents.all; entity NIB4_7SEG_SRC is Port ( NIB0 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 0 NIB1 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 1 NIB2 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 2 NIB3 : in std_logic_vector(3 downto 0); -- Nibble Ziffer 3 CLK_DISPL : in std_logic; -- Umschaltfrequenz empfohlen: 1 kHz ZI0 : out std_logic; -- 1: Ziffer 0 soll leuchten ZI1 : out std_logic; -- 1: Ziffer 1 soll leuchten ZI2 : out std_logic; -- 1: Ziffer 2 soll leuchten ZI3 : out std_logic; -- 1: Ziffer 3 soll leuchten BA : out std_logic; -- 0: Segment A soll leuchten BB : out std_logic; -- 0: Segment B soll leuchten BC : out std_logic; -- 0: Segment C soll leuchten BD : out std_logic; -- 0: Segment D soll leuchten BE : out std_logic; -- 0: Segment E soll leuchten BF : out std_logic; -- 0: Segment F soll leuchten BG : out std_logic); -- 0: Segment G soll leuchten end NIB4_7SEG_SRC; architecture Behavioral of NIB4_7SEG_SRC is signal COUNTER : std_logic_vector(1 downto 0); signal NIB_ANZ : std_logic_vector(3 downto 0); begin process(CLK_DISPL, NIB3, NIB2, NIB1, NIB0, NIB_ANZ, COUNTER) begin If (CLK_DISPL'event and CLK_DISPL = '1') then COUNTER <= COUNTER +1; end if; case COUNTER is when "00" => ZI0 <= '1'; ZI1 <= '0'; ZI2 <= '0'; ZI3 <= '0'; NIB_ANZ <= NIB0; when "01" => ZI0 <= '0'; ZI1 <= '1'; ZI2 <= '0'; ZI3 <= '0'; NIB_ANZ <= NIB1; when "10" => ZI0 <= '0'; ZI1 <= '0'; ZI2 <= '1'; ZI3 <= '0'; NIB_ANZ <= NIB2; when "11" => ZI0 <= '0'; ZI1 <= '0'; ZI2 <= '0'; ZI3 <= '1'; NIB_ANZ <= NIB3; when others => ZI0 <= '1'; ZI1 <= '0'; ZI2 <= '0'; ZI3 <= '0'; NIB_ANZ <= NIB0; end case; case NIB_ANZ is when "0000" => BG <= '1'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --0 when "0001" => BG <= '1'; BF <= '1'; BE <= '1'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '1'; --1 when "0010" => BG <= '0'; BF <= '1'; BE <= '0'; BD <= '0'; BC <= '1'; BB <= '0'; BA <= '0'; --2 when "0011" => BG <= '0'; BF <= '1'; BE <= '1'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --3 when "0100" => BG <= '0'; BF <= '0'; BE <= '1'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '1'; --4 when "0101" => BG <= '0'; BF <= '0'; BE <= '1'; BD <= '0'; BC <= '0'; BB <= '1'; BA <= '0'; --5 when "0110" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '1'; BA <= '0'; --6 when "0111" => BG <= '1'; BF <= '1'; BE <= '1'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '0'; --7 when "1000" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --8 when "1001" => BG <= '0'; BF <= '0'; BE <= '1'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '0'; --9 when "1010" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '1'; BC <= '0'; BB <= '0'; BA <= '0'; --A when "1011" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '1'; BA <= '1'; --B when "1100" => BG <= '0'; BF <= '1'; BE <= '0'; BD <= '0'; BC <= '1'; BB <= '1'; BA <= '1'; --C when "1101" => BG <= '0'; BF <= '1'; BE <= '0'; BD <= '0'; BC <= '0'; BB <= '0'; BA <= '1'; --D when "1110" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '0'; BC <= '1'; BB <= '1'; BA <= '0'; --E when "1111" => BG <= '0'; BF <= '0'; BE <= '0'; BD <= '1'; BC <= '1'; BB <= '1'; BA <= '0'; --F when others => BG <= '1'; BF <= '1'; BE <= '1'; BD <= '1'; BC <= '1'; BB <= '1'; BA <= '1'; end case; end process; end Behavioral;
gpl-2.0
ErikAndren/ov7660-object-tracker
LineSampler.vhd
1
3381
-- Samples the line and stores it in 3 rams -- This is then sent in a 3x3 array to a filter -- Copyright Erik Zachrisson [email protected] library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use work.Types.all; use work.OV76X0Pack.all; entity LineSampler is generic ( DataW : positive; Buffers : positive; OutRes : positive ); port ( Clk : in bit1; RstN : in bit1; -- Vsync : in bit1; RdAddr : out word(bits(FrameW)-1 downto 0); -- PixelIn : in word(DataW-1 downto 0); PixelInVal : in bit1; -- PixelOut : out PixVec2D(OutRes-1 downto 0); PixelOutVal : out bit1 ); end entity; architecture rtl of LineSampler is signal Addr_N, Addr_D : word(FrameWW-1 downto 0); type AddrArr is array (natural range <>) of word(Buffers-1 downto 0); signal PixArr_N, PixArr_D : PixVec2D(3-1 downto 0); -- signal LineCnt_N, LineCnt_D : word(bits(Buffers)-1 downto 0); signal WrEn : word(Buffers-1 downto 0); type BuffArr is array (natural range <>) of word(PixelW-1 downto 0); signal RamOut : BuffArr(Buffers-1 downto 0); signal PixelVal_D : bit1; function CalcLine(CurLine : word; Offs : natural) return natural is begin return ((conv_integer(CurLine) + Offs + 1) mod Buffers); end function; begin SyncRstProc : process (RstN, Clk) begin if RstN = '0' then PixelVal_D <= '0'; elsif rising_edge(Clk) then PixelVal_D <= PixelInVal; end if; end process; SyncNoRstProc : process (Clk) begin if rising_edge(Clk) then LineCnt_D <= LineCnt_N; Addr_D <= Addr_N; PixArr_D <= PixArr_N; if Vsync = '1' then LineCnt_D <= (others => '0'); Addr_D <= (others => '0'); PixArr_D <= (others => (others => (others => '0'))); end if; end if; end process; AsyncProc : process (LineCnt_D, Addr_D, PixArr_D, PixelInVal, RamOut) begin LineCnt_N <= LineCnt_D; Addr_N <= Addr_D; PixArr_N <= PixArr_D; if PixelInVal = '1' then Addr_N <= Addr_D + 1; if Addr_D + 1 = FrameW then Addr_N <= (others => '0'); LineCnt_N <= LineCnt_D + 1; if LineCnt_D + 1 = Buffers then LineCnt_N <= (others => '0'); end if; end if; -- Shift all entries one step to the left for i in 0 to OutRes-1 loop PixArr_N(i)(0) <= PixArr_D(i)(1); PixArr_N(i)(1) <= PixArr_D(i)(2); PixArr_N(i)(2) <= RamOut(CalcLine(LineCnt_D, i)); -- Clear buffer on the end of the line -- FIXME: is this necessary? end loop; end if; end process; OneHotProc : process (LineCnt_D, PixelInVal) begin WrEn <= (others => '0'); if PixelInVal = '1' then WrEn(conv_integer(LineCnt_D)) <= '1'; end if; end process; Ram : for i in 0 to Buffers-1 generate R : entity work.LineSampler1pRAM port map ( Clock => Clk, Data => PixelIn, WrEn => WrEn(i), address => Addr_D, -- q => RamOut(i) ); end generate; AddrFeed : RdAddr <= Addr_D; PixelOutValFeed : PixelOutVal <= PixelVal_D; PixelOutFeed : PixelOut <= PixArr_D; end architecture rtl;
gpl-2.0
ReconOS/reconos
lib/pcores/reconos_osif_intc_v1_00_a/hdl/vhdl/reconos_osif_intc_user_logic.vhd
1
4480
-- ____ _____ -- ________ _________ ____ / __ \/ ___/ -- / ___/ _ \/ ___/ __ \/ __ \/ / / /\__ \ -- / / / __/ /__/ /_/ / / / / /_/ /___/ / -- /_/ \___/\___/\____/_/ /_/\____//____/ -- -- ====================================================================== -- -- title: IP-Core - INTC - INTC implementation -- -- project: ReconOS -- author: Christoph Rüthing, University of Paderborn -- description: A simple interrupt controller with variable number of -- inputs to connect the RECONOS_AXI_FIFO-interrupts to -- the processor. -- -- ====================================================================== <<reconos_preproc>> library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_misc.all; entity reconos_osif_intc_user_logic is generic ( -- INTC parameters C_NUM_INTERRUPTS : integer := 1; -- Bus protocol parameters C_NUM_REG : integer := 1; C_SLV_DWIDTH : integer := 32 ); port ( OSIF_INTC_in : in std_logic_vector(C_NUM_INTERRUPTS - 1 downto 0); OSIF_INTC_out : out std_logic; -- Bus protocol ports Bus2IP_Clk : in std_logic; Bus2IP_Resetn : in std_logic; Bus2IP_Data : in std_logic_vector(C_SLV_DWIDTH-1 downto 0); Bus2IP_BE : in std_logic_vector(C_SLV_DWIDTH/8-1 downto 0); Bus2IP_RdCE : in std_logic_vector(C_NUM_REG-1 downto 0); Bus2IP_WrCE : in std_logic_vector(C_NUM_REG-1 downto 0); IP2Bus_Data : out std_logic_vector(C_SLV_DWIDTH-1 downto 0); IP2Bus_RdAck : out std_logic; IP2Bus_WrAck : out std_logic; IP2Bus_Error : out std_logic ); end entity reconos_osif_intc_user_logic; architecture imp of reconos_osif_intc_user_logic is -- padding to fill unused interrupts in interrupt_reg signal pad : std_logic_vector(C_SLV_DWIDTH * C_NUM_REG - C_NUM_INTERRUPTS - 1 downto 0); signal interrupt_masked : std_logic_vector(C_NUM_INTERRUPTS - 1 downto 0); signal interrupt_enable : std_logic_vector(C_NUM_INTERRUPTS - 1 downto 0); signal interrupt_reg : std_logic_vector(C_NUM_REG * 32 - 1 downto 0); signal interrupt_enable_reg : std_logic_vector(C_NUM_REG * 32 - 1 downto 0); -- Signals for user logic slave model s/w accessible register example signal slv_reg_write_sel : std_logic_vector(C_NUM_REG - 1 downto 0); signal slv_reg_read_sel : std_logic_vector(C_NUM_REG - 1 downto 0); signal slv_ip2bus_data : std_logic_vector(C_SLV_DWIDTH - 1 downto 0); signal slv_read_ack : std_logic; signal slv_write_ack : std_logic; signal clk : std_logic; signal rst : std_logic; begin clk <= Bus2IP_Clk; rst <= not Bus2IP_Resetn; pad <= (others => '0'); interrupt_enable <= interrupt_enable_reg(C_NUM_INTERRUPTS - 1 downto 0); interrupt_masked <= OSIF_INTC_in and interrupt_enable; -- interrupt register only contains enabled interrupts interrupt_reg <= pad & interrupt_masked; OSIF_INTC_Out <= or_reduce(interrupt_masked); -- Bus2IP_WrCE/Bus2IP_RdCE Memory Mapped Register -- "1000" C_BASEADDR + 0x0 -- "0100" C_BASEADDR + 0x4 -- "0010" C_BASEADDR + 0x8 -- "0001" C_BASEADDR + 0xC -- Example code to drive IP to Bus signals IP2Bus_Data <= slv_ip2bus_data when slv_read_ack = '1' else (others => '0'); slv_reg_write_sel <= Bus2IP_WrCE; slv_reg_read_sel <= Bus2IP_RdCE; slv_write_ack <= or_reduce(Bus2IP_WrCE); slv_read_ack <= or_reduce(Bus2IP_RdCE); IP2Bus_WrAck <= slv_write_ack; IP2Bus_RdAck <= slv_read_ack; IP2Bus_Error <= '0'; int_enable_reg_proc : process(clk,rst) is begin if rst = '1' then interrupt_enable_reg <= (others => '0'); elsif rising_edge(clk) then for i in 0 to C_NUM_REG - 1 loop if slv_reg_write_sel(C_NUM_REG - 1 - i) = '1' then interrupt_enable_reg(32 * i + 31 downto 32 * i) <= Bus2IP_Data; end if; end loop; end if; end process int_enable_reg_proc; bus_read_reg_proc : process(slv_reg_read_sel) is begin for i in 0 to C_NUM_REG - 1 loop if slv_reg_read_sel(C_NUM_REG - 1 - i) = '1' then slv_ip2bus_data <= interrupt_reg(32 * i + 31 downto 32 * i); end if; end loop; end process bus_read_reg_proc; end imp;
gpl-2.0
stden/doxygen
examples/mux.vhdl
22
857
------------------------------------------------------- --! @file --! @brief 2:1 Mux using with-select ------------------------------------------------------- --! Use standard library library ieee; --! Use logic elements use ieee.std_logic_1164.all; --! Mux entity brief description --! Detailed description of this --! mux design element. entity mux_using_with is port ( din_0 : in std_logic; --! Mux first input din_1 : in std_logic; --! Mux Second input sel : in std_logic; --! Select input mux_out : out std_logic --! Mux output ); end entity; --! @brief Architure definition of the MUX --! @details More details about this mux element. architecture behavior of mux_using_with is begin with (sel) select mux_out <= din_0 when '0', din_1 when others; end architecture;
gpl-2.0
vvk/sysrek
skin_color_segm/ipcore_dir/delayLineBRAM/example_design/delayLineBRAM_prod.vhd
2
10119
-------------------------------------------------------------------------------- -- -- BLK MEM GEN v7.1 Core - Top-level wrapper -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2006-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -------------------------------------------------------------------------------- -- -- Filename: delayLineBRAM_prod.vhd -- -- Description: -- This is the top-level BMG wrapper (over BMG core). -- -------------------------------------------------------------------------------- -- Author: IP Solutions Division -- -- History: August 31, 2005 - First Release -------------------------------------------------------------------------------- -- -- Configured Core Parameter Values: -- (Refer to the SIM Parameters table in the datasheet for more information on -- the these parameters.) -- C_FAMILY : spartan6 -- C_XDEVICEFAMILY : spartan6 -- C_INTERFACE_TYPE : 0 -- C_ENABLE_32BIT_ADDRESS : 0 -- C_AXI_TYPE : 1 -- C_AXI_SLAVE_TYPE : 0 -- C_AXI_ID_WIDTH : 4 -- C_MEM_TYPE : 0 -- C_BYTE_SIZE : 9 -- C_ALGORITHM : 1 -- C_PRIM_TYPE : 1 -- C_LOAD_INIT_FILE : 0 -- C_INIT_FILE_NAME : no_coe_file_loaded -- C_USE_DEFAULT_DATA : 0 -- C_DEFAULT_DATA : 0 -- C_RST_TYPE : SYNC -- C_HAS_RSTA : 0 -- C_RST_PRIORITY_A : CE -- C_RSTRAM_A : 0 -- C_INITA_VAL : 0 -- C_HAS_ENA : 0 -- C_HAS_REGCEA : 0 -- C_USE_BYTE_WEA : 0 -- C_WEA_WIDTH : 1 -- C_WRITE_MODE_A : READ_FIRST -- C_WRITE_WIDTH_A : 17 -- C_READ_WIDTH_A : 17 -- C_WRITE_DEPTH_A : 1024 -- C_READ_DEPTH_A : 1024 -- C_ADDRA_WIDTH : 10 -- C_HAS_RSTB : 0 -- C_RST_PRIORITY_B : CE -- C_RSTRAM_B : 0 -- C_INITB_VAL : 0 -- C_HAS_ENB : 0 -- C_HAS_REGCEB : 0 -- C_USE_BYTE_WEB : 0 -- C_WEB_WIDTH : 1 -- C_WRITE_MODE_B : WRITE_FIRST -- C_WRITE_WIDTH_B : 17 -- C_READ_WIDTH_B : 17 -- C_WRITE_DEPTH_B : 1024 -- C_READ_DEPTH_B : 1024 -- C_ADDRB_WIDTH : 10 -- C_HAS_MEM_OUTPUT_REGS_A : 0 -- C_HAS_MEM_OUTPUT_REGS_B : 0 -- C_HAS_MUX_OUTPUT_REGS_A : 0 -- C_HAS_MUX_OUTPUT_REGS_B : 0 -- C_HAS_SOFTECC_INPUT_REGS_A : 0 -- C_HAS_SOFTECC_OUTPUT_REGS_B : 0 -- C_MUX_PIPELINE_STAGES : 0 -- C_USE_ECC : 0 -- C_USE_SOFTECC : 0 -- C_HAS_INJECTERR : 0 -- C_SIM_COLLISION_CHECK : ALL -- C_COMMON_CLK : 0 -- C_DISABLE_WARN_BHV_COLL : 0 -- C_DISABLE_WARN_BHV_RANGE : 0 -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; LIBRARY UNISIM; USE UNISIM.VCOMPONENTS.ALL; -------------------------------------------------------------------------------- -- Entity Declaration -------------------------------------------------------------------------------- ENTITY delayLineBRAM_prod IS PORT ( --Port A CLKA : IN STD_LOGIC; RSTA : IN STD_LOGIC; --opt port ENA : IN STD_LOGIC; --optional port REGCEA : IN STD_LOGIC; --optional port WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0); ADDRA : IN STD_LOGIC_VECTOR(9 DOWNTO 0); DINA : IN STD_LOGIC_VECTOR(16 DOWNTO 0); DOUTA : OUT STD_LOGIC_VECTOR(16 DOWNTO 0); --Port B CLKB : IN STD_LOGIC; RSTB : IN STD_LOGIC; --opt port ENB : IN STD_LOGIC; --optional port REGCEB : IN STD_LOGIC; --optional port WEB : IN STD_LOGIC_VECTOR(0 DOWNTO 0); ADDRB : IN STD_LOGIC_VECTOR(9 DOWNTO 0); DINB : IN STD_LOGIC_VECTOR(16 DOWNTO 0); DOUTB : OUT STD_LOGIC_VECTOR(16 DOWNTO 0); --ECC INJECTSBITERR : IN STD_LOGIC; --optional port INJECTDBITERR : IN STD_LOGIC; --optional port SBITERR : OUT STD_LOGIC; --optional port DBITERR : OUT STD_LOGIC; --optional port RDADDRECC : OUT STD_LOGIC_VECTOR(9 DOWNTO 0); --optional port -- AXI BMG Input and Output Port Declarations -- AXI Global Signals S_ACLK : IN STD_LOGIC; S_AXI_AWID : IN STD_LOGIC_VECTOR(3 DOWNTO 0); S_AXI_AWADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0); S_AXI_AWLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0); S_AXI_AWSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0); S_AXI_AWBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0); S_AXI_AWVALID : IN STD_LOGIC; S_AXI_AWREADY : OUT STD_LOGIC; S_AXI_WDATA : IN STD_LOGIC_VECTOR(16 DOWNTO 0); S_AXI_WSTRB : IN STD_LOGIC_VECTOR(0 DOWNTO 0); S_AXI_WLAST : IN STD_LOGIC; S_AXI_WVALID : IN STD_LOGIC; S_AXI_WREADY : OUT STD_LOGIC; S_AXI_BID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0'); S_AXI_BRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0); S_AXI_BVALID : OUT STD_LOGIC; S_AXI_BREADY : IN STD_LOGIC; -- AXI Full/Lite Slave Read (Write side) S_AXI_ARID : IN STD_LOGIC_VECTOR(3 DOWNTO 0); S_AXI_ARADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0); S_AXI_ARLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0); S_AXI_ARSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0); S_AXI_ARBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0); S_AXI_ARVALID : IN STD_LOGIC; S_AXI_ARREADY : OUT STD_LOGIC; S_AXI_RID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0'); S_AXI_RDATA : OUT STD_LOGIC_VECTOR(16 DOWNTO 0); S_AXI_RRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0); S_AXI_RLAST : OUT STD_LOGIC; S_AXI_RVALID : OUT STD_LOGIC; S_AXI_RREADY : IN STD_LOGIC; -- AXI Full/Lite Sideband Signals S_AXI_INJECTSBITERR : IN STD_LOGIC; S_AXI_INJECTDBITERR : IN STD_LOGIC; S_AXI_SBITERR : OUT STD_LOGIC; S_AXI_DBITERR : OUT STD_LOGIC; S_AXI_RDADDRECC : OUT STD_LOGIC_VECTOR(9 DOWNTO 0); S_ARESETN : IN STD_LOGIC ); END delayLineBRAM_prod; ARCHITECTURE xilinx OF delayLineBRAM_prod IS COMPONENT delayLineBRAM_exdes IS PORT ( --Port A WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0); ADDRA : IN STD_LOGIC_VECTOR(9 DOWNTO 0); DINA : IN STD_LOGIC_VECTOR(16 DOWNTO 0); DOUTA : OUT STD_LOGIC_VECTOR(16 DOWNTO 0); CLKA : IN STD_LOGIC ); END COMPONENT; BEGIN bmg0 : delayLineBRAM_exdes PORT MAP ( --Port A WEA => WEA, ADDRA => ADDRA, DINA => DINA, DOUTA => DOUTA, CLKA => CLKA ); END xilinx;
gpl-2.0
vvk/sysrek
hdmi_example/ipcore_dir/BINARYZACJA/simulation/BINARYZACJA_tb_synth.vhd
4
7106
-------------------------------------------------------------------------------- -- -- DIST MEM GEN Core - Synthesizable Testbench -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2006_3010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: BINARYZACJA_tb_synth.vhd -- -- Description: -- Synthesizable Testbench -------------------------------------------------------------------------------- -- Author: IP Solutions Division -- -- History: Sep 12, 2011 - First Release -------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.NUMERIC_STD.ALL; USE IEEE.STD_LOGIC_MISC.ALL; LIBRARY STD; USE STD.TEXTIO.ALL; --LIBRARY unisim; --USE unisim.vcomponents.ALL; LIBRARY work; USE work.ALL; USE work.BINARYZACJA_TB_PKG.ALL; ENTITY BINARYZACJA_tb_synth IS GENERIC ( C_ROM_SYNTH : INTEGER := 0 ); PORT( CLK_IN : IN STD_LOGIC; RESET_IN : IN STD_LOGIC; STATUS : OUT STD_LOGIC_VECTOR(8 DOWNTO 0) := (OTHERS => '0') --ERROR STATUS OUT OF FPGA ); END BINARYZACJA_tb_synth; ARCHITECTURE BINARYZACJA_synth_ARCH OF BINARYZACJA_tb_synth IS COMPONENT BINARYZACJA_exdes PORT ( CLK : IN STD_LOGIC := '0'; QSPO : OUT STD_LOGIC_VECTOR(8-1 downto 0); A : IN STD_LOGIC_VECTOR(8-1-(4*0*boolean'pos(8>4)) downto 0) := (OTHERS => '0') ); END COMPONENT; CONSTANT STIM_CNT : INTEGER := if_then_else(C_ROM_SYNTH = 0, 8, 22); SIGNAL CLKA: STD_LOGIC := '0'; SIGNAL RSTA: STD_LOGIC := '0'; SIGNAL STIMULUS_FLOW : STD_LOGIC_VECTOR(22 DOWNTO 0) := (OTHERS =>'0'); SIGNAL clk_in_i : STD_LOGIC; SIGNAL RESET_SYNC_R1 : STD_LOGIC:='1'; SIGNAL RESET_SYNC_R2 : STD_LOGIC:='1'; SIGNAL RESET_SYNC_R3 : STD_LOGIC:='1'; SIGNAL ADDR: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL ADDR_R: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL QSPO: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL QSPO_R: STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL ITER_R0 : STD_LOGIC := '0'; SIGNAL ITER_R1 : STD_LOGIC := '0'; SIGNAL ITER_R2 : STD_LOGIC := '0'; SIGNAL ISSUE_FLAG : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL ISSUE_FLAG_STATUS : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); BEGIN clk_in_i <= CLK_IN; CLKA <= clk_in_i; RSTA <= RESET_SYNC_R3 AFTER 50 ns; PROCESS(clk_in_i) BEGIN IF(RISING_EDGE(clk_in_i)) THEN RESET_SYNC_R1 <= RESET_IN; RESET_SYNC_R2 <= RESET_SYNC_R1; RESET_SYNC_R3 <= RESET_SYNC_R2; END IF; END PROCESS; PROCESS(CLKA) BEGIN IF(RISING_EDGE(CLKA)) THEN IF(RESET_SYNC_R3='1') THEN ISSUE_FLAG_STATUS<= (OTHERS => '0'); ELSE ISSUE_FLAG_STATUS <= ISSUE_FLAG_STATUS OR ISSUE_FLAG; END IF; END IF; END PROCESS; STATUS(7 DOWNTO 0) <= ISSUE_FLAG_STATUS; BINARYZACJA_TB_STIM_GEN_INST:ENTITY work.BINARYZACJA_TB_STIM_GEN GENERIC MAP( C_ROM_SYNTH => C_ROM_SYNTH ) PORT MAP( CLK => clk_in_i, RST => RSTA, A => ADDR, DATA_IN => QSPO_R, STATUS => ISSUE_FLAG(0) ); PROCESS(CLKA) BEGIN IF(RISING_EDGE(CLKA)) THEN IF(RESET_SYNC_R3='1') THEN STATUS(8) <= '0'; iter_r2 <= '0'; iter_r1 <= '0'; iter_r0 <= '0'; ELSE STATUS(8) <= iter_r2; iter_r2 <= iter_r1; iter_r1 <= iter_r0; iter_r0 <= STIMULUS_FLOW(STIM_CNT); END IF; END IF; END PROCESS; PROCESS(CLKA) BEGIN IF(RISING_EDGE(CLKA)) THEN IF(RESET_SYNC_R3='1') THEN STIMULUS_FLOW <= (OTHERS => '0'); ELSIF(ADDR(0)='1') THEN STIMULUS_FLOW <= STIMULUS_FLOW + 1; END IF; END IF; END PROCESS; PROCESS(CLKA) BEGIN IF(RISING_EDGE(CLKA)) THEN IF(RESET_SYNC_R3='1') THEN QSPO_R <= (OTHERS=>'0') AFTER 50 ns; ELSE QSPO_R <= QSPO AFTER 50 ns; END IF; END IF; END PROCESS; PROCESS(CLKA) BEGIN IF(RISING_EDGE(CLKA)) THEN IF(RESET_SYNC_R3='1') THEN ADDR_R <= (OTHERS=> '0') AFTER 50 ns; ELSE ADDR_R <= ADDR AFTER 50 ns; END IF; END IF; END PROCESS; DMG_PORT: BINARYZACJA_exdes PORT MAP ( CLK => CLKA, QSPO => QSPO, A => ADDR_R ); END ARCHITECTURE;
gpl-2.0
vvk/sysrek
lut_test/ipcore_dir/LUT/simulation/LUT_tb_stim_gen.vhd
6
10507
-------------------------------------------------------------------------------- -- -- DIST MEM GEN Core - Stimulus Generator For ROM Configuration -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2006_3010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: LUT_tb_stim_gen.vhd -- -- Description: -- Stimulus Generation For ROM -- -------------------------------------------------------------------------------- -- Author: IP Solutions Division -- -- History: Sep 12, 2011 - First Release -------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; USE IEEE.STD_LOGIC_MISC.ALL; LIBRARY work; USE work.ALL; USE work.LUT_TB_PKG.ALL; ENTITY REGISTER_LOGIC_ROM IS PORT( Q : OUT STD_LOGIC; CLK : IN STD_LOGIC; RST : IN STD_LOGIC; D : IN STD_LOGIC ); END REGISTER_LOGIC_ROM; ARCHITECTURE REGISTER_ARCH OF REGISTER_LOGIC_ROM IS SIGNAL Q_O : STD_LOGIC :='0'; BEGIN Q <= Q_O; FF_BEH: PROCESS(CLK) BEGIN IF(RISING_EDGE(CLK)) THEN IF(RST /= '0' ) THEN Q_O <= '0'; ELSE Q_O <= D; END IF; END IF; END PROCESS; END REGISTER_ARCH; LIBRARY STD; USE STD.TEXTIO.ALL; LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; --USE IEEE.NUMERIC_STD.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; USE IEEE.STD_LOGIC_MISC.ALL; LIBRARY work; USE work.ALL; USE work.LUT_TB_PKG.ALL; ENTITY LUT_TB_STIM_GEN IS GENERIC ( C_ROM_SYNTH : INTEGER := 0 ); PORT ( CLK : IN STD_LOGIC; RST : IN STD_LOGIC; A : OUT STD_LOGIC_VECTOR(8-1 downto 0) := (OTHERS => '0'); DATA_IN : IN STD_LOGIC_VECTOR (7 DOWNTO 0); --OUTPUT VECTOR STATUS : OUT STD_LOGIC:= '0' ); END LUT_TB_STIM_GEN; ARCHITECTURE BEHAVIORAL OF LUT_TB_STIM_GEN IS FUNCTION std_logic_vector_len( hex_str : STD_LOGIC_VECTOR; return_width : INTEGER) RETURN STD_LOGIC_VECTOR IS VARIABLE tmp : STD_LOGIC_VECTOR(return_width DOWNTO 0) := (OTHERS => '0'); VARIABLE tmp_z : STD_LOGIC_VECTOR(return_width-(hex_str'LENGTH) DOWNTO 0) := (OTHERS => '0'); BEGIN tmp := tmp_z & hex_str; RETURN tmp(return_width-1 DOWNTO 0); END std_logic_vector_len; CONSTANT ZERO : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0'); SIGNAL READ_ADDR_INT : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL READ_ADDR : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0'); SIGNAL CHECK_READ_ADDR : STD_LOGIC_VECTOR(31 DOWNTO 0) := (OTHERS => '0'); SIGNAL EXPECTED_DATA : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL DO_READ : STD_LOGIC := '0'; SIGNAL CHECK_DATA : STD_LOGIC_VECTOR(3 DOWNTO 0) := (OTHERS => '0'); CONSTANT DEFAULT_DATA : STD_LOGIC_VECTOR(7 DOWNTO 0):= std_logic_vector_len("0",8); BEGIN SYNTH_COE: IF(C_ROM_SYNTH =0 ) GENERATE type mem_type is array (255 downto 0) of std_logic_vector(7 downto 0); FUNCTION bit_to_sl(input: BIT) RETURN STD_LOGIC IS VARIABLE temp_return : STD_LOGIC; BEGIN IF(input = '0') THEN temp_return := '0'; ELSE temp_return := '1'; END IF; RETURN temp_return; END bit_to_sl; function char_to_std_logic ( char : in character) return std_logic is variable data : std_logic; begin if char = '0' then data := '0'; elsif char = '1' then data := '1'; elsif char = 'X' then data := 'X'; else assert false report "character which is not '0', '1' or 'X'." severity warning; data := 'U'; end if; return data; end char_to_std_logic; impure FUNCTION init_memory( C_USE_DEFAULT_DATA : INTEGER; C_LOAD_INIT_FILE : INTEGER ; C_INIT_FILE_NAME : STRING ; DEFAULT_DATA : STD_LOGIC_VECTOR(7 DOWNTO 0); width : INTEGER; depth : INTEGER) RETURN mem_type IS VARIABLE init_return : mem_type := (OTHERS => (OTHERS => '0')); FILE init_file : TEXT; VARIABLE mem_vector : BIT_VECTOR(width-1 DOWNTO 0); VARIABLE bitline : LINE; variable bitsgood : boolean := true; variable bitchar : character; VARIABLE i : INTEGER; VARIABLE j : INTEGER; BEGIN --Display output message indicating that the behavioral model is being --initialized ASSERT (NOT (C_USE_DEFAULT_DATA=1 OR C_LOAD_INIT_FILE=1)) REPORT " Distributed Memory Generator CORE Generator module loading initial data..." SEVERITY NOTE; -- Setup the default data -- Default data is with respect to write_port_A and may be wider -- or narrower than init_return width. The following loops map -- default data into the memory IF (C_USE_DEFAULT_DATA=1) THEN FOR i IN 0 TO depth-1 LOOP init_return(i) := DEFAULT_DATA; END LOOP; END IF; -- Read in the .mif file -- The init data is formatted with respect to write port A dimensions. -- The init_return vector is formatted with respect to minimum width and -- maximum depth; the following loops map the .mif file into the memory IF (C_LOAD_INIT_FILE=1) THEN file_open(init_file, C_INIT_FILE_NAME, read_mode); i := 0; WHILE (i < depth AND NOT endfile(init_file)) LOOP mem_vector := (OTHERS => '0'); readline(init_file, bitline); -- read(file_buffer, mem_vector(file_buffer'LENGTH-1 DOWNTO 0)); FOR j IN 0 TO width-1 LOOP read(bitline,bitchar,bitsgood); init_return(i)(width-1-j) := char_to_std_logic(bitchar); END LOOP; i := i + 1; END LOOP; file_close(init_file); END IF; RETURN init_return; END FUNCTION; --*************************************************************** -- convert bit to STD_LOGIC --*************************************************************** constant c_init : mem_type := init_memory(1, 1, "LUT.mif", DEFAULT_DATA, 8, 256); constant rom : mem_type := c_init; BEGIN EXPECTED_DATA <= rom(conv_integer(unsigned(check_read_addr))); CHECKER_RD_AGEN_INST:ENTITY work.LUT_TB_AGEN GENERIC MAP( C_MAX_DEPTH =>256 ) PORT MAP( CLK => CLK, RST => RST, EN => CHECK_DATA(3), LOAD => '0', LOAD_VALUE => ZERO, ADDR_OUT => check_read_addr ); PROCESS(CLK) BEGIN IF(RISING_EDGE(CLK)) THEN IF(CHECK_DATA(3) ='1') THEN IF(EXPECTED_DATA = DATA_IN) THEN STATUS<='0'; ELSE STATUS <= '1'; END IF; END IF; END IF; END PROCESS; END GENERATE; -- Simulatable ROM --Synthesizable ROM SYNTH_CHECKER: IF(C_ROM_SYNTH = 1) GENERATE PROCESS(CLK) BEGIN IF(RISING_EDGE(CLK)) THEN IF(CHECK_DATA(3)='1') THEN IF(DATA_IN=DEFAULT_DATA) THEN STATUS <= '0'; ELSE STATUS <= '1'; END IF; END IF; END IF; END PROCESS; END GENERATE; READ_ADDR_INT(7 DOWNTO 0) <= READ_ADDR(7 DOWNTO 0); A <= READ_ADDR_INT ; CHECK_DATA(0) <= DO_READ; RD_AGEN_INST:ENTITY work.LUT_TB_AGEN GENERIC MAP( C_MAX_DEPTH => 256 ) PORT MAP( CLK => CLK, RST => RST, EN => DO_READ, LOAD => '0', LOAD_VALUE => ZERO, ADDR_OUT => READ_ADDR ); RD_PROCESS: PROCESS (CLK) BEGIN IF (RISING_EDGE(CLK)) THEN IF(RST='1') THEN DO_READ <= '0'; ELSE DO_READ <= '1'; END IF; END IF; END PROCESS; BEGIN_EN_REG: FOR I IN 0 TO 3 GENERATE BEGIN DFF_RIGHT: IF I=0 GENERATE BEGIN SHIFT_INST_0: ENTITY work.REGISTER_LOGIC_ROM PORT MAP( Q => CHECK_DATA(1), CLK => CLK, RST => RST, D => CHECK_DATA(0) ); END GENERATE DFF_RIGHT; DFF_CE_OTHERS: IF ((I>0) AND (I<3)) GENERATE BEGIN SHIFT_INST: ENTITY work.REGISTER_LOGIC_ROM PORT MAP( Q => CHECK_DATA(I+1), CLK => CLK, RST => RST, D => CHECK_DATA(I) ); END GENERATE DFF_CE_OTHERS; END GENERATE BEGIN_EN_REG; END ARCHITECTURE;
gpl-2.0
vvk/sysrek
hdmi_example/ipcore_dir/BINARYZACJA/example_design/BINARYZACJA_exdes.vhd
4
4094
-------------------------------------------------------------------------------- -- -- Distributed Memory Generator Core - Top-level core wrapper -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2009 - 2010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -------------------------------------------------------------------------------- -- -- -- Description: -- This is the actual DMG core wrapper. -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; library unisim; use unisim.vcomponents.all; -------------------------------------------------------------------------------- -- Entity Declaration -------------------------------------------------------------------------------- entity BINARYZACJA_exdes is PORT ( CLK : IN STD_LOGIC := '0'; QSPO : OUT STD_LOGIC_VECTOR(8-1 downto 0); A : IN STD_LOGIC_VECTOR(8-1-(4*0*boolean'pos(8>4)) downto 0) := (OTHERS => '0') ); end BINARYZACJA_exdes; architecture xilinx of BINARYZACJA_exdes is SIGNAL CLK_i : std_logic; component BINARYZACJA is PORT ( CLK : IN STD_LOGIC; QSPO : OUT STD_LOGIC_VECTOR(8-1 downto 0); A : IN STD_LOGIC_VECTOR(8-1-(4*0*boolean'pos(8>4)) downto 0) := (OTHERS => '0') ); end component; begin dmg0 : BINARYZACJA port map ( CLK => CLK_i, QSPO => QSPO, A => A ); clk_buf: bufg PORT MAP( i => CLK, o => CLK_i ); end xilinx;
gpl-2.0
v3best/R7Lite
R7Lite_PCIE/fpga_code/r7lite_DMA/ipcore_dir/fifo8to32/simulation/fifo8to32_synth.vhd
1
10975
-------------------------------------------------------------------------------- -- -- FIFO Generator Core Demo Testbench -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2009 - 2010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: fifo8to32_synth.vhd -- -- Description: -- This is the demo testbench for fifo_generator core. -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.STD_LOGIC_1164.ALL; USE ieee.STD_LOGIC_unsigned.ALL; USE IEEE.STD_LOGIC_arith.ALL; USE ieee.numeric_std.ALL; USE ieee.STD_LOGIC_misc.ALL; LIBRARY std; USE std.textio.ALL; LIBRARY work; USE work.fifo8to32_pkg.ALL; -------------------------------------------------------------------------------- -- Entity Declaration -------------------------------------------------------------------------------- ENTITY fifo8to32_synth IS GENERIC( FREEZEON_ERROR : INTEGER := 0; TB_STOP_CNT : INTEGER := 0; TB_SEED : INTEGER := 1 ); PORT( WR_CLK : IN STD_LOGIC; RD_CLK : IN STD_LOGIC; RESET : IN STD_LOGIC; SIM_DONE : OUT STD_LOGIC; STATUS : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) ); END ENTITY; ARCHITECTURE simulation_arch OF fifo8to32_synth IS -- FIFO interface signal declarations SIGNAL wr_clk_i : STD_LOGIC; SIGNAL rd_clk_i : STD_LOGIC; SIGNAL rst : STD_LOGIC; SIGNAL wr_en : STD_LOGIC; SIGNAL rd_en : STD_LOGIC; SIGNAL din : STD_LOGIC_VECTOR(16-1 DOWNTO 0); SIGNAL dout : STD_LOGIC_VECTOR(32-1 DOWNTO 0); SIGNAL full : STD_LOGIC; SIGNAL empty : STD_LOGIC; -- TB Signals SIGNAL wr_data : STD_LOGIC_VECTOR(16-1 DOWNTO 0); SIGNAL dout_i : STD_LOGIC_VECTOR(32-1 DOWNTO 0); SIGNAL wr_en_i : STD_LOGIC := '0'; SIGNAL rd_en_i : STD_LOGIC := '0'; SIGNAL full_i : STD_LOGIC := '0'; SIGNAL empty_i : STD_LOGIC := '0'; SIGNAL almost_full_i : STD_LOGIC := '0'; SIGNAL almost_empty_i : STD_LOGIC := '0'; SIGNAL prc_we_i : STD_LOGIC := '0'; SIGNAL prc_re_i : STD_LOGIC := '0'; SIGNAL dout_chk_i : STD_LOGIC := '0'; SIGNAL rst_int_rd : STD_LOGIC := '0'; SIGNAL rst_int_wr : STD_LOGIC := '0'; SIGNAL rst_s_wr1 : STD_LOGIC := '0'; SIGNAL rst_s_wr2 : STD_LOGIC := '0'; SIGNAL rst_gen_rd : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL rst_s_wr3 : STD_LOGIC := '0'; SIGNAL rst_s_rd : STD_LOGIC := '0'; SIGNAL reset_en : STD_LOGIC := '0'; SIGNAL rst_async_wr1 : STD_LOGIC := '0'; SIGNAL rst_async_wr2 : STD_LOGIC := '0'; SIGNAL rst_async_wr3 : STD_LOGIC := '0'; SIGNAL rst_async_rd1 : STD_LOGIC := '0'; SIGNAL rst_async_rd2 : STD_LOGIC := '0'; SIGNAL rst_async_rd3 : STD_LOGIC := '0'; BEGIN ---- Reset generation logic ----- rst_int_wr <= rst_async_wr3 OR rst_s_wr3; rst_int_rd <= rst_async_rd3 OR rst_s_rd; --Testbench reset synchronization PROCESS(rd_clk_i,RESET) BEGIN IF(RESET = '1') THEN rst_async_rd1 <= '1'; rst_async_rd2 <= '1'; rst_async_rd3 <= '1'; ELSIF(rd_clk_i'event AND rd_clk_i='1') THEN rst_async_rd1 <= RESET; rst_async_rd2 <= rst_async_rd1; rst_async_rd3 <= rst_async_rd2; END IF; END PROCESS; PROCESS(wr_clk_i,RESET) BEGIN IF(RESET = '1') THEN rst_async_wr1 <= '1'; rst_async_wr2 <= '1'; rst_async_wr3 <= '1'; ELSIF(wr_clk_i'event AND wr_clk_i='1') THEN rst_async_wr1 <= RESET; rst_async_wr2 <= rst_async_wr1; rst_async_wr3 <= rst_async_wr2; END IF; END PROCESS; --Soft reset for core and testbench PROCESS(rd_clk_i) BEGIN IF(rd_clk_i'event AND rd_clk_i='1') THEN rst_gen_rd <= rst_gen_rd + "1"; IF(reset_en = '1' AND AND_REDUCE(rst_gen_rd) = '1') THEN rst_s_rd <= '1'; assert false report "Reset applied..Memory Collision checks are not valid" severity note; ELSE IF(AND_REDUCE(rst_gen_rd) = '1' AND rst_s_rd = '1') THEN rst_s_rd <= '0'; END IF; END IF; END IF; END PROCESS; PROCESS(wr_clk_i) BEGIN IF(wr_clk_i'event AND wr_clk_i='1') THEN rst_s_wr1 <= rst_s_rd; rst_s_wr2 <= rst_s_wr1; rst_s_wr3 <= rst_s_wr2; IF(rst_s_wr3 = '1' AND rst_s_wr2 = '0') THEN assert false report "Reset removed..Memory Collision checks are valid" severity note; END IF; END IF; END PROCESS; ------------------ ---- Clock buffers for testbench ---- wr_clk_i <= WR_CLK; rd_clk_i <= RD_CLK; ------------------ rst <= RESET OR rst_s_rd AFTER 12 ns; din <= wr_data; dout_i <= dout; wr_en <= wr_en_i; rd_en <= rd_en_i; full_i <= full; empty_i <= empty; fg_dg_nv: fifo8to32_dgen GENERIC MAP ( C_DIN_WIDTH => 16, C_DOUT_WIDTH => 32, TB_SEED => TB_SEED, C_CH_TYPE => 0 ) PORT MAP ( -- Write Port RESET => rst_int_wr, WR_CLK => wr_clk_i, PRC_WR_EN => prc_we_i, FULL => full_i, WR_EN => wr_en_i, WR_DATA => wr_data ); fg_dv_nv: fifo8to32_dverif GENERIC MAP ( C_DOUT_WIDTH => 32, C_DIN_WIDTH => 16, C_USE_EMBEDDED_REG => 0, TB_SEED => TB_SEED, C_CH_TYPE => 0 ) PORT MAP( RESET => rst_int_rd, RD_CLK => rd_clk_i, PRC_RD_EN => prc_re_i, RD_EN => rd_en_i, EMPTY => empty_i, DATA_OUT => dout_i, DOUT_CHK => dout_chk_i ); fg_pc_nv: fifo8to32_pctrl GENERIC MAP ( AXI_CHANNEL => "Native", C_APPLICATION_TYPE => 0, C_DOUT_WIDTH => 32, C_DIN_WIDTH => 16, C_WR_PNTR_WIDTH => 10, C_RD_PNTR_WIDTH => 9, C_CH_TYPE => 0, FREEZEON_ERROR => FREEZEON_ERROR, TB_SEED => TB_SEED, TB_STOP_CNT => TB_STOP_CNT ) PORT MAP( RESET_WR => rst_int_wr, RESET_RD => rst_int_rd, RESET_EN => reset_en, WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, PRC_WR_EN => prc_we_i, PRC_RD_EN => prc_re_i, FULL => full_i, ALMOST_FULL => almost_full_i, ALMOST_EMPTY => almost_empty_i, DOUT_CHK => dout_chk_i, EMPTY => empty_i, DATA_IN => wr_data, DATA_OUT => dout, SIM_DONE => SIM_DONE, STATUS => STATUS ); fifo8to32_inst : fifo8to32_exdes PORT MAP ( WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, RST => rst, WR_EN => wr_en, RD_EN => rd_en, DIN => din, DOUT => dout, FULL => full, EMPTY => empty); END ARCHITECTURE;
gpl-2.0
v3best/R7Lite
R7Lite_PCIE/fpga_code/r7lite_DMA/OpenSource/tx_Transact.vhd
1
58569
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; library work; use work.abb64Package.all; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity tx_Transact is port ( -- Common ports trn_clk : IN std_logic; trn_reset_n : IN std_logic; trn_lnk_up_n : IN std_logic; -- Transaction trn_tsof_n : OUT std_logic; trn_teof_n : OUT std_logic; trn_td : OUT std_logic_vector(C_DBUS_WIDTH-1 downto 0); trn_trem_n : OUT std_logic_vector(C_DBUS_WIDTH/8-1 downto 0); trn_terrfwd_n : OUT std_logic; trn_tsrc_rdy_n : OUT std_logic; trn_tdst_rdy_n : IN std_logic; trn_tsrc_dsc_n : OUT std_logic; trn_tdst_dsc_n : IN std_logic; trn_tbuf_av : IN std_logic_vector(C_TBUF_AWIDTH-1 downto 0); -- Upstream DMA transferred bytes count up us_DMA_Bytes_Add : OUT std_logic; us_DMA_Bytes : OUT std_logic_vector(C_TLP_FLD_WIDTH_OF_LENG+2 downto 0); -- Event Buffer FIFO read port eb_FIFO_re : OUT std_logic; eb_FIFO_empty : IN std_logic; eb_FIFO_qout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); -- Read interface for Tx port Regs_RdAddr : OUT std_logic_vector(C_EP_AWIDTH-1 downto 0); Regs_RdQout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); -- Irpt Channel Irpt_Req : IN std_logic; Irpt_RE : OUT std_logic; Irpt_Qout : IN std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); -- PIO MRd Channel pioCplD_Req : IN std_logic; pioCplD_RE : OUT std_logic; pioCplD_Qout : IN std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); pio_FC_stop : OUT std_logic; -- downstream MRd Channel dsMRd_Req : IN std_logic; dsMRd_RE : OUT std_logic; dsMRd_Qout : IN std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); -- upstream MWr/MRd Channel usTlp_Req : IN std_logic; usTlp_RE : OUT std_logic; usTlp_Qout : IN std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); us_FC_stop : OUT std_logic; us_Last_sof : OUT std_logic; us_Last_eof : OUT std_logic; -- Message routing method Msg_Routing : IN std_logic_vector(C_GCR_MSG_ROUT_BIT_TOP-C_GCR_MSG_ROUT_BIT_BOT downto 0); -- DDR read port DDR_rdc_sof : OUT std_logic; DDR_rdc_eof : OUT std_logic; DDR_rdc_v : OUT std_logic; DDR_rdc_FA : OUT std_logic; DDR_rdc_Shift : OUT std_logic; DDR_rdc_din : OUT std_logic_vector(C_DBUS_WIDTH-1 downto 0); DDR_rdc_full : IN std_logic; -- DDR payload FIFO Read Port DDR_FIFO_RdEn : OUT std_logic; DDR_FIFO_Empty : IN std_logic; DDR_FIFO_RdQout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); -- DDR_rdD_sof : IN std_logic; -- DDR_rdD_eof : IN std_logic; -- DDR_rdDout_V : IN std_logic; -- DDR_rdDout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); -- Additional Tx_TimeOut : OUT std_logic; Tx_eb_TimeOut : OUT std_logic; Format_Shower : OUT std_logic; mbuf_UserFull : IN std_logic; Tx_Reset : IN std_logic; localID : IN std_logic_vector(C_ID_WIDTH-1 downto 0) ); end tx_Transact; architecture Behavioral of tx_Transact is type TxTrnStates is ( St_TxIdle -- Idle , St_d_CmdReq -- Issue the read command to MemReader , St_d_CmdAck -- Wait for the read command ACK from MemReader , St_d_Header0 -- 1st Header for TLP with payload , St_d_Header2 -- 2nd Header for TLP with payload -- , St_d_HeaderPlus -- Extra Header for TLP4 with payload , St_d_1st_Data -- Last Header for TLP3/4 with payload , St_d_Payload -- Data for TLP with payload , St_d_Payload_used -- Data flow from memory buffer discontinued , St_d_Tail -- Last data for TLP with payload , St_d_Tail_chk -- Last data extended for TLP with payload , St_nd_Prepare -- Prepare for 1st Header of TLP without payload -- , St_nd_Header1 -- 1st Header for TLP without payload , St_nd_Header2 -- 2nd Header for TLP without payload -- , St_nd_HeaderPlus -- Extra Header for TLP4 without payload , St_nd_HeaderLast -- Tail processing for the last dword of TLP w/o payload , St_nd_Arbitration -- One extra cycle for arbitration ); -- State variables signal TxTrn_State : TxTrnStates; -- Signals with the arbitrator signal take_an_Arbitration : std_logic; signal Req_Bundle : std_logic_vector (C_CHANNEL_NUMBER-1 downto 0); signal Read_a_Buffer : std_logic_vector (C_CHANNEL_NUMBER-1 downto 0); signal Ack_Indice : std_logic_vector (C_CHANNEL_NUMBER-1 downto 0); signal Tx_Indicator : std_logic_vector (C_CHANNEL_NUMBER-1 downto 0); signal b1_Tx_Indicator : std_logic_vector (C_CHANNEL_NUMBER-1 downto 0); signal vec_ChQout_Valid : std_logic_vector (C_CHANNEL_NUMBER-1 downto 0); signal Tx_Busy : std_logic; -- Channel buffer output token bits signal usTLP_is_MWr : std_logic; signal TLP_is_CplD : std_logic; -- Bit information, telling whether the outgoing TLP has payload signal ChBuf_has_Payload : std_logic; signal ChBuf_No_Payload : std_logic; -- Channel buffers output OR'ed and registered signal Trn_Qout_wire : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal Trn_Qout_reg : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); -- Addresses from different channel buffer signal mAddr_pioCplD : std_logic_vector(C_PRAM_AWIDTH-1+2 downto 0); signal mAddr_usTlp : std_logic_vector(C_PRAM_AWIDTH-1+2 downto 0); signal DDRAddr_usTlp : std_logic_vector(C_DDR_IAWIDTH-1 downto 0); signal Regs_Addr_pioCplD : std_logic_vector(C_EP_AWIDTH-1 downto 0); signal DDRAddr_pioCplD : std_logic_vector(C_DDR_IAWIDTH-1 downto 0); -- BAR number signal BAR_pioCplD : std_logic_vector(C_ENCODE_BAR_NUMBER-1 downto 0); signal BAR_usTlp : std_logic_vector(C_ENCODE_BAR_NUMBER-1 downto 0); -- Misc. info. signal AInc_usTlp : std_logic; signal pioCplD_is_0Leng : std_logic; -- Delay for requests from Channel Buffers signal Irpt_Req_r1 : std_logic; signal pioCplD_Req_r1 : std_logic; signal dsMRd_Req_r1 : std_logic; signal usTlp_Req_r1 : std_logic; -- Registered channel buffer outputs signal Irpt_Qout_to_TLP : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal pioCplD_Qout_to_TLP : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal dsMRd_Qout_to_TLP : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal usTlp_Qout_to_TLP : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal pioCplD_Req_Min_Leng : std_logic; signal pioCplD_Req_2DW_Leng : std_logic; signal usTlp_Req_Min_Leng : std_logic; signal usTlp_Req_2DW_Leng : std_logic; -- Channel buffer read enables signal Irpt_RE_i : std_logic; signal pioCplD_RE_i : std_logic; signal dsMRd_RE_i : std_logic; signal usTlp_RE_i : std_logic; -- Flow controls signal pio_FC_stop_i : std_logic; signal us_FC_stop_i : std_logic; -- Local reset for tx signal trn_tx_Reset_n : std_logic; -- Alias for transaction interface signals signal trn_td_i : std_logic_vector(C_DBUS_WIDTH-1 downto 0); signal trn_tsof_n_i : std_logic; signal trn_trem_n_i : std_logic_vector(C_DBUS_WIDTH/8-1 downto 0); signal trn_teof_n_i : std_logic; signal Format_Shower_i : std_logic; signal trn_tsrc_rdy_n_i : std_logic; signal trn_tsrc_dsc_n_i : std_logic; signal trn_terrfwd_n_i : std_logic; signal trn_tdst_rdy_n_i : std_logic; signal trn_tdst_dsc_n_i : std_logic; signal trn_tbuf_av_i : std_logic_vector(C_TBUF_AWIDTH-1 downto 0); -- Upstream DMA transferred bytes count up signal us_DMA_Bytes_Add_i : std_logic; signal us_DMA_Bytes_i : std_logic_vector(C_TLP_FLD_WIDTH_OF_LENG+2 downto 0); --------------------- Memory Reader ----------------------------- --- --- Memory reader is the interface to access all sorts of memories --- BRAM, FIFO, Registers, as well as possible DDR SDRAM --- ------------------------------------------------------------------- COMPONENT tx_Mem_Reader PORT( DDR_rdc_sof : OUT std_logic; DDR_rdc_eof : OUT std_logic; DDR_rdc_v : OUT std_logic; DDR_rdc_FA : OUT std_logic; DDR_rdc_Shift : OUT std_logic; DDR_rdc_din : OUT std_logic_vector(C_DBUS_WIDTH-1 downto 0); DDR_rdc_full : IN std_logic; -- DDR_rdD_sof : IN std_logic; -- DDR_rdD_eof : IN std_logic; -- DDR_rdDout_V : IN std_logic; -- DDR_rdDout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); DDR_FIFO_RdEn : OUT std_logic; DDR_FIFO_Empty : IN std_logic; DDR_FIFO_RdQout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); eb_FIFO_re : OUT std_logic; eb_FIFO_empty : IN std_logic; eb_FIFO_qout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); Regs_RdAddr : OUT std_logic_vector(C_EP_AWIDTH-1 downto 0); Regs_RdQout : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); RdNumber : IN std_logic_vector(C_TLP_FLD_WIDTH_OF_LENG-1 downto 0); RdNumber_eq_One : IN std_logic; RdNumber_eq_Two : IN std_logic; StartAddr : IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); Shift_1st_QWord : IN std_logic; FixedAddr : IN std_logic; is_CplD : IN std_logic; BAR_value : IN std_logic_vector(C_ENCODE_BAR_NUMBER-1 downto 0); RdCmd_Req : IN std_logic; RdCmd_Ack : OUT std_logic; mbuf_WE : OUT std_logic; mbuf_Din : OUT std_logic_vector(C_DBUS_WIDTH*9/8-1 downto 0); mbuf_Full : IN std_logic; mbuf_aFull : IN std_logic; mbuf_UserFull : IN std_logic; Tx_TimeOut : OUT std_logic; Tx_eb_TimeOut : OUT std_logic; mReader_Rst_n : IN std_logic; trn_clk : IN std_logic ); END COMPONENT; signal RdNumber : std_logic_vector(C_TLP_FLD_WIDTH_OF_LENG-1 downto 0); signal RdNumber_eq_One : std_logic; signal RdNumber_eq_Two : std_logic; signal StartAddr : std_logic_vector(C_DBUS_WIDTH-1 downto 0); signal Shift_1st_QWord : std_logic; signal FixedAddr : std_logic; signal is_CplD : std_logic; signal BAR_value : std_logic_vector(C_ENCODE_BAR_NUMBER-1 downto 0); signal RdCmd_Req : std_logic; signal RdCmd_Ack : std_logic; --------------------- Memory Buffer ----------------------------- --- --- A unified memory buffer holding the payload for the next tx TLP --- 34 bits wide, wherein 2 additional framing bits --- temporarily 64 data depth, possibly deepened. --- ------------------------------------------------------------------- component k7_mBuf_128x72 port ( clk : IN std_logic; rst : IN std_logic; wr_en : IN std_logic; din : IN std_logic_VECTOR(C_DBUS_WIDTH*9/8-1 downto 0); prog_full : OUT std_logic; full : OUT std_logic; rd_en : IN std_logic; dout : OUT std_logic_VECTOR(C_DBUS_WIDTH*9/8-1 downto 0); empty : OUT std_logic ); end component; signal mbuf_reset : std_logic; signal mbuf_WE : std_logic; signal mbuf_Din : std_logic_VECTOR(C_DBUS_WIDTH*9/8-1 downto 0); signal mbuf_Full : std_logic; signal mbuf_aFull : std_logic; signal mbuf_RE : std_logic; signal mbuf_Qout : std_logic_VECTOR(C_DBUS_WIDTH*9/8-1 downto 0); signal mbuf_Empty : std_logic; -- Calculated infomation signal mbuf_RE_ok : std_logic; signal mbuf_Qvalid : std_logic; --------------------- Output arbitration ------------------------ --- --- For sake of fairness, the priorities are cycled every time --- a service is done, after which the priority of the request --- just serviced is set to the lowest and other lower priorities --- increased and higher stay. --- ------------------------------------------------------------------- COMPONENT Tx_Output_Arbitor PORT( rst_n : IN std_logic; clk : IN std_logic; arbtake : IN std_logic; Req : IN std_logic_vector(C_ARBITRATE_WIDTH-1 downto 0); bufread : OUT std_logic_vector(C_ARBITRATE_WIDTH-1 downto 0); Ack : OUT std_logic_vector(C_ARBITRATE_WIDTH-1 downto 0) ); END COMPONENT; begin -- Connect outputs trn_td <= trn_td_i; trn_tsof_n <= trn_tsof_n_i; trn_trem_n <= trn_trem_n_i; trn_teof_n <= trn_teof_n_i; trn_tsrc_rdy_n <= trn_tsrc_rdy_n_i; trn_tsrc_dsc_n <= trn_tsrc_dsc_n_i; trn_terrfwd_n <= trn_terrfwd_n_i; Format_Shower <= Format_Shower_i; us_Last_sof <= usTLP_is_MWr and not trn_tsof_n_i; us_Last_eof <= usTLP_is_MWr and not trn_teof_n_i; -- Connect inputs trn_tdst_rdy_n_i <= trn_tdst_rdy_n; trn_tdst_dsc_n_i <= trn_tdst_dsc_n; trn_tbuf_av_i <= trn_tbuf_av; -- Always deasserted trn_tsrc_dsc_n_i <= '1'; trn_terrfwd_n_i <= '1'; -- trn_trem_n_i <= (OTHERS=>'0'); -- Upstream DMA transferred bytes counting up us_DMA_Bytes_Add <= us_DMA_Bytes_Add_i; us_DMA_Bytes <= us_DMA_Bytes_i ; -- Flow controls pio_FC_stop <= pio_FC_stop_i; us_FC_stop <= us_FC_stop_i; --------------------------------------------------------------------------------- -- Synchronous Calculation: us_FC_stop, pio_FC_stop -- Synch_Calc_FC_stop: process ( trn_clk, Tx_Reset) begin if Tx_Reset = '1' then us_FC_stop_i <= '1'; pio_FC_stop_i <= '1'; elsif trn_clk'event and trn_clk = '1' then if trn_tbuf_av_i(C_TBUF_AWIDTH-1 downto 1) /=C_ALL_ZEROS(C_TBUF_AWIDTH-1 downto 1) then us_FC_stop_i <= '0'; pio_FC_stop_i <= '0'; else us_FC_stop_i <= '1'; pio_FC_stop_i <= '1'; end if; end if; end process; -- Channel buffer read enable Irpt_RE <= Irpt_RE_i; pioCplD_RE <= pioCplD_RE_i; dsMRd_RE <= dsMRd_RE_i; usTlp_RE <= usTlp_RE_i; -- ----------------------------------- -- Synchronized Local reset -- Syn_Local_Reset: process ( trn_clk, trn_reset_n) begin if trn_reset_n = '0' then trn_tx_Reset_n <= '0'; elsif trn_clk'event and trn_clk = '1' then trn_tx_Reset_n <= trn_tdst_dsc_n_i and not Tx_Reset; end if; end process; -- ----------------------------------- -- Format detector -- Syn_Format_Shower: process ( trn_clk, trn_reset_n) begin if trn_reset_n = '0' then Format_Shower_i <= '0'; elsif trn_clk'event and trn_clk = '1' then if Format_Shower_i = '0' then if trn_tsof_n_i='0' and trn_tsrc_rdy_n_i='0' and trn_tdst_rdy_n_i='0' then Format_Shower_i <= '1'; else Format_Shower_i <= '0'; end if; else if trn_teof_n_i='0' and trn_tsrc_rdy_n_i='0' and trn_tdst_rdy_n_i='0' then Format_Shower_i <= '0'; else Format_Shower_i <= '1'; end if; end if; end if; end process; ------------------------------------------------------------ --- Memory reader ------------------------------------------------------------ ABB_Tx_MReader: tx_Mem_Reader PORT MAP( DDR_rdc_sof => DDR_rdc_sof , -- OUT std_logic; DDR_rdc_eof => DDR_rdc_eof , -- OUT std_logic; DDR_rdc_v => DDR_rdc_v , -- OUT std_logic; DDR_rdc_FA => DDR_rdc_FA , -- OUT std_logic; DDR_rdc_Shift => DDR_rdc_Shift , -- OUT std_logic; DDR_rdc_din => DDR_rdc_din , -- OUT std_logic_vector(C_DBUS_WIDTH-1 downto 0); DDR_rdc_full => DDR_rdc_full , -- IN std_logic; -- DDR_rdD_sof => DDR_rdD_sof , -- IN std_logic; -- DDR_rdD_eof => DDR_rdD_eof , -- IN std_logic; -- DDR_rdDout_V => DDR_rdDout_V , -- IN std_logic; -- DDR_rdDout => DDR_rdDout , -- IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); DDR_FIFO_RdEn => DDR_FIFO_RdEn , -- OUT std_logic; DDR_FIFO_Empty => DDR_FIFO_Empty , -- IN std_logic; DDR_FIFO_RdQout => DDR_FIFO_RdQout , -- IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); eb_FIFO_re => eb_FIFO_re , -- OUT std_logic; eb_FIFO_empty => eb_FIFO_empty , -- IN std_logic; eb_FIFO_qout => eb_FIFO_qout , -- IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); Regs_RdAddr => Regs_RdAddr , -- OUT std_logic_vector(C_EP_AWIDTH-1 downto 0); Regs_RdQout => Regs_RdQout , -- IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); RdNumber => RdNumber , -- IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); RdNumber_eq_One => RdNumber_eq_One , -- IN std_logic; RdNumber_eq_Two => RdNumber_eq_Two , -- IN std_logic; StartAddr => StartAddr , -- IN std_logic_vector(C_DBUS_WIDTH-1 downto 0); Shift_1st_QWord => Shift_1st_QWord , -- IN std_logic; FixedAddr => '0', -- FixedAddr , -- IN std_logic; is_CplD => is_CplD , -- IN std_logic; BAR_value => BAR_value , -- IN std_logic_vector(C_ENCODE_BAR_NUMBER-1 downto 0); RdCmd_Req => RdCmd_Req , -- IN std_logic; RdCmd_Ack => RdCmd_Ack , -- OUT std_logic; mbuf_WE => mbuf_WE , -- OUT std_logic; mbuf_Din => mbuf_Din , -- OUT std_logic_vector(C_DBUS_WIDTH-1 downto 0); mbuf_Full => mbuf_Full , -- IN std_logic; mbuf_aFull => mbuf_aFull , -- IN std_logic; mbuf_UserFull => mbuf_UserFull , -- IN std_logic; Tx_TimeOut => Tx_TimeOut , -- OUT std_logic; Tx_eb_TimeOut => Tx_eb_TimeOut , -- OUT std_logic; mReader_Rst_n => trn_tx_Reset_n , -- IN std_logic; trn_clk => trn_clk -- IN std_logic ); ------------------------------------------------------------ --- Memory buffer ------------------------------------------------------------ ABB_Tx_MBuffer: k7_mBuf_128x72 PORT MAP( wr_en => mbuf_WE , -- IN std_logic; din => mbuf_Din , -- IN std_logic_VECTOR(C_DBUS_WIDTH+1 downto 0); prog_full => mbuf_aFull , -- OUT std_logic; full => mbuf_Full , -- OUT std_logic; rd_en => mbuf_RE , -- IN std_logic; dout => mbuf_Qout , -- OUT std_logic_VECTOR(C_DBUS_WIDTH+1 downto 0); empty => mbuf_Empty , -- OUT std_logic rst => mbuf_reset, --Tx_Reset , -- IN std_logic; clk => trn_clk -- IN std_logic; ); mbuf_RE <= mbuf_RE_ok and (not trn_tdst_rdy_n_i or trn_tsrc_rdy_n_i); --------------------------------------------------------------------------------- -- Synchronous Delay: mbuf_Qout Valid -- Synchron_Delay_mbuf_Qvalid: process ( trn_clk, Tx_Reset) begin if Tx_Reset = '1' then mbuf_Qvalid <= '0'; elsif trn_clk'event and trn_clk = '1' then if mbuf_Qvalid='0' and mbuf_RE='1' and mbuf_Empty='0' then -- a valid data is going out mbuf_Qvalid <= '1'; elsif mbuf_Qvalid='1' and mbuf_RE='1' and mbuf_Empty='1' then -- an invalid data is going out mbuf_Qvalid <= '0'; else -- state stays mbuf_Qvalid <= mbuf_Qvalid; end if; end if; end process; ------------------------------------------------------------ --- Output arbitration ------------------------------------------------------------ O_Arbitration: Tx_Output_Arbitor PORT MAP( rst_n => trn_tx_Reset_n, clk => trn_clk, arbtake => take_an_Arbitration, Req => Req_Bundle, bufread => Read_a_Buffer, Ack => Ack_Indice ); ----------------------------------------------------- -- Synchronous Delay: Channel Requests -- Synchron_Delay_ChRequests: process ( trn_clk ) begin if trn_clk'event and trn_clk = '1' then Irpt_Req_r1 <= Irpt_Req; pioCplD_Req_r1 <= pioCplD_Req; dsMRd_Req_r1 <= dsMRd_Req; usTlp_Req_r1 <= usTlp_Req; end if; end process; ----------------------------------------------------- -- Synchronous Delay: Tx_Busy -- Synchron_Delay_Tx_Busy: process ( trn_clk ) begin if trn_clk'event and trn_clk = '1' then Tx_Indicator <= b1_Tx_Indicator; Tx_Busy <= (b1_Tx_Indicator(C_CHAN_INDEX_IRPT) and vec_ChQout_Valid(C_CHAN_INDEX_IRPT) ) or (b1_Tx_Indicator(C_CHAN_INDEX_MRD) and vec_ChQout_Valid(C_CHAN_INDEX_MRD) ) or (b1_Tx_Indicator(C_CHAN_INDEX_DMA_DS) and vec_ChQout_Valid(C_CHAN_INDEX_DMA_DS)) or (b1_Tx_Indicator(C_CHAN_INDEX_DMA_US) and vec_ChQout_Valid(C_CHAN_INDEX_DMA_US)) ; end if; end process; -- --------------------------------------------- -- Reg : Channel Buffer Qout has Payload -- Reg_ChBuf_with_Payload: process ( trn_clk ) begin if trn_clk'event and trn_clk = '1' then ChBuf_has_Payload <= (b1_Tx_Indicator(C_CHAN_INDEX_MRD) and TLP_is_CplD and vec_ChQout_Valid(C_CHAN_INDEX_MRD) ) or (b1_Tx_Indicator(C_CHAN_INDEX_DMA_US) and usTLP_is_MWr and vec_ChQout_Valid(C_CHAN_INDEX_DMA_US)) ; end if; end process; -- --------------------------------------------- -- Channel Buffer Qout has no Payload -- (! subordinate to ChBuf_has_Payload ! ) -- ChBuf_No_Payload <= Tx_Busy; -- Arbitrator inputs Req_Bundle(C_CHAN_INDEX_IRPT) <= Irpt_Req_r1; Req_Bundle(C_CHAN_INDEX_MRD) <= pioCplD_Req_r1; Req_Bundle(C_CHAN_INDEX_DMA_DS) <= dsMRd_Req_r1; Req_Bundle(C_CHAN_INDEX_DMA_US) <= usTlp_Req_r1; -- Arbitrator outputs b1_Tx_Indicator(C_CHAN_INDEX_IRPT) <= Ack_Indice(C_CHAN_INDEX_IRPT); b1_Tx_Indicator(C_CHAN_INDEX_MRD) <= Ack_Indice(C_CHAN_INDEX_MRD); b1_Tx_Indicator(C_CHAN_INDEX_DMA_DS) <= Ack_Indice(C_CHAN_INDEX_DMA_DS); b1_Tx_Indicator(C_CHAN_INDEX_DMA_US) <= Ack_Indice(C_CHAN_INDEX_DMA_US); -- Arbitrator reads channel buffers Irpt_RE_i <= Read_a_Buffer(C_CHAN_INDEX_IRPT); pioCplD_RE_i <= Read_a_Buffer(C_CHAN_INDEX_MRD); dsMRd_RE_i <= Read_a_Buffer(C_CHAN_INDEX_DMA_DS); usTlp_RE_i <= Read_a_Buffer(C_CHAN_INDEX_DMA_US); -- determine whether the upstream TLP is an MWr or an MRd. usTLP_is_MWr <= usTlp_Qout (C_CHBUF_FMT_BIT_TOP); TLP_is_CplD <= pioCplD_Qout(C_CHBUF_FMT_BIT_TOP); -- check if the Channel buffer output is valid vec_ChQout_Valid(C_CHAN_INDEX_IRPT) <= Irpt_Qout (C_CHBUF_QVALID_BIT); vec_ChQout_Valid(C_CHAN_INDEX_MRD) <= pioCplD_Qout(C_CHBUF_QVALID_BIT); vec_ChQout_Valid(C_CHAN_INDEX_DMA_DS) <= dsMRd_Qout (C_CHBUF_QVALID_BIT); vec_ChQout_Valid(C_CHAN_INDEX_DMA_US) <= usTlp_Qout (C_CHBUF_QVALID_BIT); -- ----------------------------------- -- Delay : Channel_Buffer_Qout -- Bit-mapping is done -- Delay_Channel_Buffer_Qout: process ( trn_clk, trn_tx_Reset_n) begin if trn_tx_Reset_n = '0' then Irpt_Qout_to_TLP <= (Others=>'0'); pioCplD_Qout_to_TLP <= (Others=>'0'); dsMRd_Qout_to_TLP <= (Others=>'0'); usTlp_Qout_to_TLP <= (Others=>'0'); pioCplD_Req_Min_Leng <= '0'; pioCplD_Req_2DW_Leng <= '0'; usTlp_Req_Min_Leng <= '0'; usTlp_Req_2DW_Leng <= '0'; Regs_Addr_pioCplD <= (Others=>'1'); mAddr_pioCplD <= (Others=>'1'); mAddr_usTlp <= (Others=>'1'); AInc_usTlp <= '1'; BAR_pioCplD <= (Others=>'1'); BAR_usTlp <= (Others=>'1'); pioCplD_is_0Leng <= '0'; elsif trn_clk'event and trn_clk = '1' then if b1_Tx_Indicator(C_CHAN_INDEX_IRPT)='1' then Irpt_Qout_to_TLP <= (Others=>'0'); -- must be 1st argument -- 1st header Hi Irpt_Qout_to_TLP(C_TLP_FMT_BIT_TOP downto C_TLP_FMT_BIT_BOT) <= Irpt_Qout(C_CHBUF_FMT_BIT_TOP downto C_CHBUF_FMT_BIT_BOT); -- Irpt_Qout_to_TLP(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) <= C_TYPE_OF_MSG; --Irpt_Qout(C_CHBUF_MSGTYPE_BIT_TOP downto C_CHBUF_MSGTYPE_BIT_BOT); Irpt_Qout_to_TLP(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) <= C_TYPE_OF_MSG(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT+1+C_GCR_MSG_ROUT_BIT_TOP-C_GCR_MSG_ROUT_BIT_BOT) & Msg_Routing; Irpt_Qout_to_TLP(C_TLP_TC_BIT_TOP downto C_TLP_TC_BIT_BOT) <= Irpt_Qout(C_CHBUF_TC_BIT_TOP downto C_CHBUF_TC_BIT_BOT); Irpt_Qout_to_TLP(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) <= Irpt_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT); -- 1st header Lo Irpt_Qout_to_TLP(C_TLP_REQID_BIT_TOP downto C_TLP_REQID_BIT_BOT) <= localID; Irpt_Qout_to_TLP(C_TLP_TAG_BIT_TOP downto C_TLP_TAG_BIT_BOT) <= Irpt_Qout(C_CHBUF_TAG_BIT_TOP downto C_CHBUF_TAG_BIT_BOT); Irpt_Qout_to_TLP(C_MSG_CODE_BIT_TOP downto C_MSG_CODE_BIT_BOT) <= Irpt_Qout(C_CHBUF_MSG_CODE_BIT_TOP downto C_CHBUF_MSG_CODE_BIT_BOT); -- 2nd headers all zero -- ... else Irpt_Qout_to_TLP <= (Others=>'0'); end if; if b1_Tx_Indicator(C_CHAN_INDEX_MRD)='1' then pioCplD_Qout_to_TLP <= (Others=>'0'); -- must be 1st argument -- 1st header Hi pioCplD_Qout_to_TLP(C_TLP_FMT_BIT_TOP downto C_TLP_FMT_BIT_BOT) <= pioCplD_Qout(C_CHBUF_FMT_BIT_TOP downto C_CHBUF_FMT_BIT_BOT); pioCplD_Qout_to_TLP(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) <= C_TYPE_COMPLETION; --pioCplD_Qout(C_CHBUF_TYPE_BIT_TOP downto C_CHBUF_TYPE_BIT_BOT); pioCplD_Qout_to_TLP(C_TLP_TC_BIT_TOP downto C_TLP_TC_BIT_BOT) <= pioCplD_Qout(C_CHBUF_TC_BIT_TOP downto C_CHBUF_TC_BIT_BOT); pioCplD_Qout_to_TLP(C_TLP_ATTR_BIT_TOP downto C_TLP_ATTR_BIT_BOT) <= pioCplD_Qout(C_CHBUF_ATTR_BIT_TOP downto C_CHBUF_ATTR_BIT_BOT); pioCplD_Qout_to_TLP(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) <= pioCplD_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT); -- 1st header Lo pioCplD_Qout_to_TLP(C_CPLD_CPLT_ID_BIT_TOP downto C_CPLD_CPLT_ID_BIT_BOT) <= localID; pioCplD_Qout_to_TLP(C_CPLD_CS_BIT_TOP downto C_CPLD_CS_BIT_BOT) <= pioCplD_Qout(C_CHBUF_CPLD_CS_BIT_TOP downto C_CHBUF_CPLD_CS_BIT_BOT); pioCplD_Qout_to_TLP(C_CPLD_BC_BIT_TOP downto C_CPLD_BC_BIT_BOT) <= pioCplD_Qout(C_CHBUF_CPLD_BC_BIT_TOP downto C_CHBUF_CPLD_BC_BIT_BOT); -- 2nd header Hi pioCplD_Qout_to_TLP(C_DBUS_WIDTH+C_CPLD_REQID_BIT_TOP downto C_DBUS_WIDTH+C_CPLD_REQID_BIT_BOT) <= pioCplD_Qout(C_CHBUF_CPLD_REQID_BIT_TOP downto C_CHBUF_CPLD_REQID_BIT_BOT); pioCplD_Qout_to_TLP(C_DBUS_WIDTH+C_CPLD_TAG_BIT_TOP downto C_DBUS_WIDTH+C_CPLD_TAG_BIT_BOT) <= pioCplD_Qout(C_CHBUF_CPLD_TAG_BIT_TOP downto C_CHBUF_CPLD_TAG_BIT_BOT); pioCplD_Qout_to_TLP(C_DBUS_WIDTH+C_CPLD_LA_BIT_TOP downto C_DBUS_WIDTH+C_CPLD_LA_BIT_BOT) <= pioCplD_Qout(C_CHBUF_CPLD_LA_BIT_TOP downto C_CHBUF_CPLD_LA_BIT_BOT); -- no 2nd header Lo if pioCplD_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT) = CONV_STD_LOGIC_VECTOR(1, C_TLP_FLD_WIDTH_OF_LENG) then pioCplD_Req_Min_Leng <= '1'; else pioCplD_Req_Min_Leng <= '0'; end if; if pioCplD_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT) = CONV_STD_LOGIC_VECTOR(2, C_TLP_FLD_WIDTH_OF_LENG) then pioCplD_Req_2DW_Leng <= '1'; else pioCplD_Req_2DW_Leng <= '0'; end if; -- Misc Regs_Addr_pioCplD <= pioCplD_Qout(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT); mAddr_pioCplD <= pioCplD_Qout(C_CHBUF_MA_BIT_TOP downto C_CHBUF_MA_BIT_BOT); -- !! C_CHBUF_MA_BIT_BOT); DDRAddr_pioCplD <= pioCplD_Qout(C_CHBUF_DDA_BIT_TOP downto C_CHBUF_DDA_BIT_BOT); BAR_pioCplD <= pioCplD_Qout(C_CHBUF_CPLD_BAR_BIT_TOP downto C_CHBUF_CPLD_BAR_BIT_BOT); pioCplD_is_0Leng <= pioCplD_Qout(C_CHBUF_0LENG_BIT); else pioCplD_Req_Min_Leng <= '0'; pioCplD_Req_2DW_Leng <= '0'; pioCplD_Qout_to_TLP <= (Others=>'0'); Regs_Addr_pioCplD <= (Others=>'1'); mAddr_pioCplD <= (Others=>'1'); DDRAddr_pioCplD <= (Others=>'1'); BAR_pioCplD <= (Others=>'1'); pioCplD_is_0Leng <= '0'; end if; if b1_Tx_Indicator(C_CHAN_INDEX_DMA_US)='1' then usTlp_Qout_to_TLP <= (Others=>'0'); -- must be 1st argument -- 1st header HI usTlp_Qout_to_TLP(C_TLP_FMT_BIT_TOP downto C_TLP_FMT_BIT_BOT) <= usTlp_Qout(C_CHBUF_FMT_BIT_TOP downto C_CHBUF_FMT_BIT_BOT); usTlp_Qout_to_TLP(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) <= C_ALL_ZEROS(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT); usTlp_Qout_to_TLP(C_TLP_TC_BIT_TOP downto C_TLP_TC_BIT_BOT) <= usTlp_Qout(C_CHBUF_TC_BIT_TOP downto C_CHBUF_TC_BIT_BOT); usTlp_Qout_to_TLP(C_TLP_ATTR_BIT_TOP downto C_TLP_ATTR_BIT_BOT) <= usTlp_Qout(C_CHBUF_ATTR_BIT_TOP downto C_CHBUF_ATTR_BIT_BOT); usTlp_Qout_to_TLP(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) <= usTlp_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT); -- 1st header LO usTlp_Qout_to_TLP(C_TLP_REQID_BIT_TOP downto C_TLP_REQID_BIT_BOT) <= localID; usTlp_Qout_to_TLP(C_TLP_TAG_BIT_TOP downto C_TLP_TAG_BIT_BOT) <= usTlp_Qout(C_CHBUF_TAG_BIT_TOP downto C_CHBUF_TAG_BIT_BOT); usTlp_Qout_to_TLP(C_TLP_LAST_BE_BIT_TOP downto C_TLP_LAST_BE_BIT_BOT) <= C_ALL_ONES(C_TLP_LAST_BE_BIT_TOP downto C_TLP_LAST_BE_BIT_BOT); usTlp_Qout_to_TLP(C_TLP_1ST_BE_BIT_TOP downto C_TLP_1ST_BE_BIT_BOT) <= C_ALL_ONES(C_TLP_1ST_BE_BIT_TOP downto C_TLP_1ST_BE_BIT_BOT); -- 2nd header HI (Address) -- usTlp_Qout_to_TLP(2*C_DBUS_WIDTH-1 downto C_DBUS_WIDTH) <= usTlp_Qout(C_CHBUF_HA_BIT_TOP downto C_CHBUF_HA_BIT_BOT); if usTlp_Qout(C_CHBUF_FMT_BIT_BOT)='1' then -- 4DW MWr usTlp_Qout_to_TLP(2*C_DBUS_WIDTH-1 downto C_DBUS_WIDTH+32) <= usTlp_Qout(C_CHBUF_HA_BIT_TOP downto C_CHBUF_HA_BIT_BOT+32); else usTlp_Qout_to_TLP(2*C_DBUS_WIDTH-1 downto C_DBUS_WIDTH+32) <= usTlp_Qout(C_CHBUF_HA_BIT_TOP-32 downto C_CHBUF_HA_BIT_BOT); end if; -- 2nd header LO (Address) usTlp_Qout_to_TLP(2*C_DBUS_WIDTH-1-32 downto C_DBUS_WIDTH) <= usTlp_Qout(C_CHBUF_HA_BIT_TOP-32 downto C_CHBUF_HA_BIT_BOT); -- if usTlp_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT) = CONV_STD_LOGIC_VECTOR(1, C_TLP_FLD_WIDTH_OF_LENG) then usTlp_Req_Min_Leng <= '1'; else usTlp_Req_Min_Leng <= '0'; end if; if usTlp_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT) = CONV_STD_LOGIC_VECTOR(2, C_TLP_FLD_WIDTH_OF_LENG) then usTlp_Req_2DW_Leng <= '1'; else usTlp_Req_2DW_Leng <= '0'; end if; -- Misc DDRAddr_usTlp <= usTlp_Qout(C_CHBUF_DDA_BIT_TOP downto C_CHBUF_DDA_BIT_BOT); mAddr_usTlp <= usTlp_Qout(C_CHBUF_MA_BIT_TOP downto C_CHBUF_MA_BIT_BOT); -- !! C_CHBUF_MA_BIT_BOT); AInc_usTlp <= usTlp_Qout(C_CHBUF_AINC_BIT); BAR_usTlp <= usTlp_Qout(C_CHBUF_DMA_BAR_BIT_TOP downto C_CHBUF_DMA_BAR_BIT_BOT); else usTlp_Req_Min_Leng <= '0'; usTlp_Req_2DW_Leng <= '0'; usTlp_Qout_to_TLP <= (Others=>'0'); DDRAddr_usTlp <= (Others=>'1'); mAddr_usTlp <= (Others=>'1'); AInc_usTlp <= '1'; BAR_usTlp <= (Others=>'1'); end if; if b1_Tx_Indicator(C_CHAN_INDEX_DMA_DS)='1' then dsMRd_Qout_to_TLP <= (Others=>'0'); -- must be 1st argument -- 1st header HI dsMRd_Qout_to_TLP(C_TLP_FMT_BIT_TOP downto C_TLP_FMT_BIT_BOT) <= dsMRd_Qout(C_CHBUF_FMT_BIT_TOP downto C_CHBUF_FMT_BIT_BOT); dsMRd_Qout_to_TLP(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) <= C_ALL_ZEROS(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT); dsMRd_Qout_to_TLP(C_TLP_TC_BIT_TOP downto C_TLP_TC_BIT_BOT) <= dsMRd_Qout(C_CHBUF_TC_BIT_TOP downto C_CHBUF_TC_BIT_BOT); dsMRd_Qout_to_TLP(C_TLP_ATTR_BIT_TOP downto C_TLP_ATTR_BIT_BOT) <= dsMRd_Qout(C_CHBUF_ATTR_BIT_TOP downto C_CHBUF_ATTR_BIT_BOT); dsMRd_Qout_to_TLP(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) <= dsMRd_Qout(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT); -- 1st header LO dsMRd_Qout_to_TLP(C_TLP_REQID_BIT_TOP downto C_TLP_REQID_BIT_BOT) <= localID; dsMRd_Qout_to_TLP(C_TLP_TAG_BIT_TOP downto C_TLP_TAG_BIT_BOT) <= dsMRd_Qout(C_CHBUF_TAG_BIT_TOP downto C_CHBUF_TAG_BIT_BOT); dsMRd_Qout_to_TLP(C_TLP_LAST_BE_BIT_TOP downto C_TLP_LAST_BE_BIT_BOT) <= C_ALL_ONES(C_TLP_LAST_BE_BIT_TOP downto C_TLP_LAST_BE_BIT_BOT); dsMRd_Qout_to_TLP(C_TLP_1ST_BE_BIT_TOP downto C_TLP_1ST_BE_BIT_BOT) <= C_ALL_ONES(C_TLP_1ST_BE_BIT_TOP downto C_TLP_1ST_BE_BIT_BOT); -- 2nd header (Address) dsMRd_Qout_to_TLP(2*C_DBUS_WIDTH-1 downto C_DBUS_WIDTH) <= dsMRd_Qout(C_CHBUF_HA_BIT_TOP downto C_CHBUF_HA_BIT_BOT); else dsMRd_Qout_to_TLP <= (Others=>'0'); end if; end if; end process; -- OR-wired channel buffer outputs Trn_Qout_wire <= Irpt_Qout_to_TLP or pioCplD_Qout_to_TLP or dsMRd_Qout_to_TLP or usTlp_Qout_to_TLP ; -- --------------------------------------------------- -- State Machine: Tx output control -- TxFSM_OutputControl: process ( trn_clk, trn_tx_Reset_n) begin if trn_tx_Reset_n = '0' then take_an_Arbitration <= '0'; RdNumber <= (Others=>'0'); RdNumber_eq_One <= '0'; RdNumber_eq_Two <= '0'; StartAddr <= (Others=>'0'); Shift_1st_QWord <= '0'; -- FixedAddr <= '0'; is_CplD <= '0'; BAR_value <= (Others=>'0'); RdCmd_Req <= '0'; mbuf_reset <= '1'; mbuf_RE_ok <= '0'; trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= (Others=>'0'); trn_trem_n_i <= (Others=>'0'); TxTrn_State <= St_TxIdle; Trn_Qout_reg <= (Others=>'0'); elsif trn_clk'event and trn_clk = '1' then case TxTrn_State is when St_TxIdle => trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= (Others=>'0'); trn_trem_n_i <= (Others=>'0'); mbuf_RE_ok <= '0'; take_an_Arbitration <= '0'; Trn_Qout_reg <= Trn_Qout_wire; RdNumber <= Trn_Qout_wire (C_TLP_FLD_WIDTH_OF_LENG-1+32 downto 32); RdNumber_eq_One <= pioCplD_Req_Min_Leng or usTlp_Req_Min_Leng; RdNumber_eq_Two <= pioCplD_Req_2DW_Leng or usTlp_Req_2DW_Leng; -- FixedAddr <= not AInc_usTlp; -- BAR_value <= BAR_pioCplD and BAR_usTlp; RdCmd_Req <= ChBuf_has_Payload; if pioCplD_is_0Leng='1' then BAR_value <= '0' & CONV_STD_LOGIC_VECTOR(CINT_REGS_SPACE_BAR, C_ENCODE_BAR_NUMBER-1); StartAddr <= C_ALL_ONES(C_DBUS_WIDTH-1 downto 0) ; Shift_1st_QWord <= '1'; is_CplD <= '0'; elsif BAR_pioCplD=CONV_STD_LOGIC_VECTOR(CINT_DDR_SPACE_BAR, C_ENCODE_BAR_NUMBER) then BAR_value <= '0' & BAR_pioCplD(C_ENCODE_BAR_NUMBER-2 downto 0); StartAddr <= (C_ALL_ONES(C_DBUS_WIDTH-1 downto C_DDR_IAWIDTH) & DDRAddr_pioCplD); Shift_1st_QWord <= '1'; is_CplD <= '1'; elsif BAR_pioCplD=CONV_STD_LOGIC_VECTOR(CINT_FIFO_SPACE_BAR, C_ENCODE_BAR_NUMBER) then BAR_value <= '0' & BAR_pioCplD(C_ENCODE_BAR_NUMBER-2 downto 0); StartAddr <= (C_ALL_ONES(C_DBUS_WIDTH-1 downto C_PRAM_AWIDTH+2) & mAddr_pioCplD); Shift_1st_QWord <= '1'; is_CplD <= '1'; -- elsif BAR_usTlp=CONV_STD_LOGIC_VECTOR(CINT_FIFO_SPACE_BAR, C_ENCODE_BAR_NUMBER) then -- BAR_value <= '0' & BAR_usTlp(C_ENCODE_BAR_NUMBER-2 downto 0); -- StartAddr <= C_ALL_ONES(C_DBUS_WIDTH-1 downto C_PRAM_AWIDTH+4) & mAddr_usTlp & "00"; elsif BAR_usTlp=CONV_STD_LOGIC_VECTOR(CINT_DDR_SPACE_BAR, C_ENCODE_BAR_NUMBER) then BAR_value <= '0' & BAR_usTlp(C_ENCODE_BAR_NUMBER-2 downto 0); StartAddr <= C_ALL_ONES(C_DBUS_WIDTH-1 downto C_DDR_IAWIDTH) & DDRAddr_usTlp; Shift_1st_QWord <= not usTlp_Qout_to_TLP(C_TLP_FMT_BIT_BOT); is_CplD <= '0'; elsif BAR_usTlp=CONV_STD_LOGIC_VECTOR(CINT_FIFO_SPACE_BAR, C_ENCODE_BAR_NUMBER) then BAR_value <= '0' & BAR_usTlp(C_ENCODE_BAR_NUMBER-2 downto 0); StartAddr <= C_ALL_ONES(C_DBUS_WIDTH-1 downto C_DDR_IAWIDTH) & DDRAddr_usTlp; Shift_1st_QWord <= not usTlp_Qout_to_TLP(C_TLP_FMT_BIT_BOT); is_CplD <= '0'; else BAR_value <= '0' & BAR_pioCplD(C_ENCODE_BAR_NUMBER-2 downto 0); StartAddr <= (C_ALL_ONES(C_DBUS_WIDTH-1 downto C_EP_AWIDTH) & Regs_Addr_pioCplD) -- and (C_ALL_ONES(C_DBUS_WIDTH-1 downto C_PRAM_AWIDTH+2) & mAddr_usTlp) ; Shift_1st_QWord <= '1'; is_CplD <= '0'; end if; if ChBuf_has_Payload = '1' then TxTrn_State <= St_d_CmdReq; mbuf_reset <= '0'; elsif ChBuf_No_Payload = '1' then TxTrn_State <= St_nd_Prepare; mbuf_reset <= '0'; else TxTrn_State <= St_TxIdle; mbuf_reset <= not mbuf_Empty; -- '1'; end if; --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- when St_nd_Prepare => trn_teof_n_i <= '1'; if trn_tdst_rdy_n_i = '0' then TxTrn_State <= St_nd_Header2; -- St_nd_Header1 trn_tsrc_rdy_n_i <= '0'; trn_tsof_n_i <= '0'; trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1 downto 0); else TxTrn_State <= St_nd_Prepare; trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_td_i <= (Others=>'0'); end if; when St_nd_Header2 => trn_tsrc_rdy_n_i <= '0'; if trn_tdst_rdy_n_i = '1' then TxTrn_State <= St_nd_Header2; take_an_Arbitration <= '0'; trn_tsof_n_i <= trn_tsof_n_i; trn_teof_n_i <= '1'; trn_td_i <= trn_td_i; -- Trn_Qout_reg (C_DBUS_WIDTH-1 downto 0); else -- 3DW header TxTrn_State <= St_nd_HeaderLast; take_an_Arbitration <= '1'; trn_tsof_n_i <= '1'; trn_teof_n_i <= '0'; if Trn_Qout_reg (C_TLP_FMT_BIT_BOT) = '1' then -- 4DW header trn_trem_n_i <= X"00"; trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH*2-1 downto C_DBUS_WIDTH); else trn_trem_n_i <= X"0F"; trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1+32 downto C_DBUS_WIDTH) & X"00000000"; end if; end if; when St_nd_HeaderLast => trn_tsof_n_i <= '1'; take_an_Arbitration <= '0'; if trn_tdst_rdy_n_i = '1' then TxTrn_State <= St_nd_HeaderLast; trn_tsrc_rdy_n_i <= '0'; trn_teof_n_i <= '0'; trn_td_i <= trn_td_i; trn_trem_n_i <= trn_trem_n_i; else TxTrn_State <= St_nd_Arbitration; -- St_TxIdle; trn_tsrc_rdy_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= trn_td_i; trn_trem_n_i <= trn_trem_n_i; end if; when St_nd_Arbitration => trn_tsof_n_i <= '1'; TxTrn_State <= St_TxIdle; trn_tsrc_rdy_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= trn_td_i; trn_trem_n_i <= (OTHERS=>'0'); --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- when St_d_CmdReq => if RdCmd_Ack = '1' then RdCmd_Req <= '0'; TxTrn_State <= St_d_CmdAck; else RdCmd_Req <= '1'; TxTrn_State <= St_d_CmdReq; end if; when St_d_CmdAck => trn_teof_n_i <= '1'; if mbuf_Empty = '0' and trn_tdst_rdy_n_i = '0' then trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_td_i <= (Others=>'0'); mbuf_RE_ok <= '1'; TxTrn_State <= St_d_Header0; -- St_d_Header1 else trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_td_i <= (Others=>'0'); mbuf_RE_ok <= '0'; TxTrn_State <= St_d_CmdAck; end if; when St_d_Header0 => if trn_tdst_rdy_n_i = '0' then take_an_Arbitration <= '1'; trn_tsrc_rdy_n_i <= '0'; trn_tsof_n_i <= '0'; trn_teof_n_i <= '1'; trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1 downto 0); mbuf_RE_ok <= not Trn_Qout_reg (C_TLP_FMT_BIT_BOT); -- '1'; -- 4DW TxTrn_State <= St_d_Header2; else take_an_Arbitration <= '0'; trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= trn_td_i; mbuf_RE_ok <= '0'; TxTrn_State <= St_d_Header0; end if; when St_d_Header2 => trn_tsrc_rdy_n_i <= '0'; trn_trem_n_i <= (OTHERS=>'0'); take_an_Arbitration <= '0'; if trn_tdst_rdy_n_i = '1' then TxTrn_State <= St_d_Header2; -- trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1+32 downto 32); trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1 downto 0); trn_tsof_n_i <= '0'; trn_teof_n_i <= '1'; mbuf_RE_ok <= not Trn_Qout_reg (C_TLP_FMT_BIT_BOT); elsif Trn_Qout_reg (C_TLP_FMT_BIT_BOT) = '1' then -- 4DW header TxTrn_State <= St_d_1st_Data; -- St_d_HeaderPlus; -- trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1+96 downto 96); trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH*2-1 downto C_DBUS_WIDTH); trn_tsof_n_i <= '1'; trn_teof_n_i <= '1'; mbuf_RE_ok <= '1'; else -- 3DW header -- trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH-1+64 downto 64); trn_td_i <= Trn_Qout_reg (C_DBUS_WIDTH*2-1 downto C_DBUS_WIDTH+32) & mbuf_Qout(C_DBUS_WIDTH-1-32 downto 0); trn_tsof_n_i <= '1'; trn_teof_n_i <= mbuf_Qout(C_DBUS_WIDTH); mbuf_RE_ok <= not trn_tsrc_rdy_n_i and mbuf_Qout(C_DBUS_WIDTH); if mbuf_Qout(C_DBUS_WIDTH) = '0' then TxTrn_State <= St_d_Tail_chk; else TxTrn_State <= St_d_1st_Data; end if; end if; when St_d_1st_Data => mbuf_RE_ok <= not trn_tsrc_rdy_n_i and mbuf_Qout(C_DBUS_WIDTH); -- trn_tsof_n_i <= '1'; take_an_Arbitration <= '0'; if trn_tdst_rdy_n_i = '1' then TxTrn_State <= St_d_1st_Data; trn_teof_n_i <= '1'; trn_td_i <= trn_td_i; trn_tsrc_rdy_n_i <= '0'; elsif mbuf_Qout(C_DBUS_WIDTH) = '0' then TxTrn_State <= St_d_Tail_chk; trn_teof_n_i <= '0'; trn_trem_n_i <= X"0" & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70); trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); trn_tsrc_rdy_n_i <= not mbuf_Qvalid; -- '0'; elsif mbuf_Qvalid = '0' then TxTrn_State <= St_d_Payload_used; trn_teof_n_i <= '1'; trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); trn_tsrc_rdy_n_i <= '1'; else TxTrn_State <= St_d_Payload; trn_teof_n_i <= '1'; trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); trn_tsrc_rdy_n_i <= '0'; end if; when St_d_Payload => mbuf_RE_ok <= '1'; -- trn_tsof_n_i <= '1'; take_an_Arbitration <= '0'; if trn_tdst_rdy_n_i='1' then trn_td_i <= trn_td_i; trn_teof_n_i <= trn_teof_n_i; trn_trem_n_i <= trn_trem_n_i; trn_tsrc_rdy_n_i <= '0'; if mbuf_Qout(C_DBUS_WIDTH) = '0' then TxTrn_State <= St_d_Tail; elsif mbuf_Qvalid='1' then TxTrn_State <= St_d_Payload; else TxTrn_State <= St_d_Payload_used; end if; else trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); trn_teof_n_i <= mbuf_Qout(C_DBUS_WIDTH); trn_tsrc_rdy_n_i <= mbuf_Qout(C_DBUS_WIDTH) and not mbuf_Qvalid; if mbuf_Qout(C_DBUS_WIDTH) = '0' then TxTrn_State <= St_d_Tail_chk; trn_trem_n_i <= X"0" & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70); elsif mbuf_Qvalid='1' then trn_trem_n_i <= (OTHERS=>'0'); TxTrn_State <= St_d_Payload; else trn_trem_n_i <= (OTHERS=>'0'); TxTrn_State <= St_d_Payload_used; end if; end if; when St_d_Payload_used => mbuf_RE_ok <= '1'; take_an_Arbitration <= '0'; -- trn_tsof_n_i <= '1'; if trn_tsrc_rdy_n_i='0' then trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); trn_tsrc_rdy_n_i <= not mbuf_Qvalid and not trn_tdst_rdy_n_i; if mbuf_Qout(C_DBUS_WIDTH) = '0' then trn_teof_n_i <= '0'; trn_trem_n_i <= X"0" & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70); else trn_teof_n_i <= '1'; trn_trem_n_i <= (OTHERS=>'0'); end if; if mbuf_Qvalid='1' then TxTrn_State <= St_d_Payload; else TxTrn_State <= St_d_Payload_used; end if; elsif mbuf_Qvalid='1' then trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); trn_tsrc_rdy_n_i <= '0'; if mbuf_Qout(C_DBUS_WIDTH) = '0' then trn_teof_n_i <= '0'; trn_trem_n_i <= X"0" & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70); else trn_teof_n_i <= '1'; trn_trem_n_i <= (OTHERS=>'0'); end if; if mbuf_Qout(C_DBUS_WIDTH) = '0' then TxTrn_State <= St_d_Tail_chk; else TxTrn_State <= St_d_Payload; end if; else TxTrn_State <= St_d_Payload_used; trn_td_i <= trn_td_i; trn_teof_n_i <= trn_teof_n_i; trn_trem_n_i <= trn_trem_n_i; trn_tsrc_rdy_n_i <= '1'; end if; when St_d_Tail => take_an_Arbitration <= '0'; mbuf_RE_ok <= '0'; -- trn_tsof_n_i <= '1'; trn_tsrc_rdy_n_i <= '0'; if trn_tdst_rdy_n_i = '1' then TxTrn_State <= St_d_Tail; trn_teof_n_i <= trn_teof_n_i; trn_trem_n_i <= trn_trem_n_i; trn_td_i <= trn_td_i; else TxTrn_State <= St_d_Tail_chk; trn_teof_n_i <= '0'; trn_trem_n_i <= X"0" & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70) & mbuf_Qout(70); trn_td_i <= mbuf_Qout(C_DBUS_WIDTH-1 downto 0); end if; when St_d_Tail_chk => take_an_Arbitration <= '0'; mbuf_RE_ok <= '0'; -- trn_tsof_n_i <= '1'; if trn_tdst_rdy_n_i = '1' then trn_tsrc_rdy_n_i <= '0'; trn_teof_n_i <= '0'; trn_trem_n_i <= trn_trem_n_i; trn_td_i <= trn_td_i; TxTrn_State <= St_d_Tail_chk; else trn_tsrc_rdy_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= (Others=>'0'); trn_trem_n_i <= (Others=>'0'); TxTrn_State <= St_TxIdle; end if; when Others => take_an_Arbitration <= '0'; RdNumber <= (Others=>'0'); RdNumber_eq_One <= '0'; RdNumber_eq_Two <= '0'; StartAddr <= (Others=>'0'); -- FixedAddr <= '0'; BAR_value <= (Others=>'0'); RdCmd_Req <= '0'; mbuf_reset <= '0'; mbuf_RE_ok <= '0'; trn_tsrc_rdy_n_i <= '1'; trn_tsof_n_i <= '1'; trn_teof_n_i <= '1'; trn_td_i <= (Others=>'0'); trn_trem_n_i <= (Others=>'0'); TxTrn_State <= St_TxIdle; end case; end if; end process; --------------------------------------------------------------------------------- -- Synchronous Accumulation: us_DMA_Bytes -- Synch_Acc_us_DMA_Bytes: process ( trn_clk ) begin if trn_clk'event and trn_clk = '1' then us_DMA_Bytes_i <= '0' & trn_td_i(32+C_TLP_FLD_WIDTH_OF_LENG-1 downto 32) & "00"; if trn_td_i(C_TLP_FMT_BIT_TOP) = '1' and trn_td_i(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) = C_ALL_ZEROS(C_TLP_TYPE_BIT_TOP downto C_TLP_TYPE_BIT_BOT) then us_DMA_Bytes_Add_i <= not trn_tsof_n_i and not trn_tsrc_rdy_n_i and not trn_tdst_rdy_n_i ; else us_DMA_Bytes_Add_i <= '0'; end if; end if; end process; end architecture Behavioral;
gpl-2.0
vira-lytvyn/labsAndOthersNiceThings
HardwareAndSoftwareOfNeuralNetworks/Lab_16/Lab_16_3/PZP_MIF.vhd
1
571
library ieee, altera; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use altera.altera_syn_attributes.all; entity PZP_MIF is port (clk: in std_logic; addr: in natural range 0 to 63; q: out std_logic_vector (7 downto 0)); end entity; architecture rtl of PZP_MIF is type PZP_MIF_t is array (63 downto 0) of std_logic_vector(7 downto 0); signal rom: PZP_MIF_t; attribute ram_init_file: string; attribute ram_init_file of rom: signal is "PZP_MIF.mif"; begin process(clk) begin if(rising_edge(clk)) then q <= rom(addr); end if; end process; end rtl;
gpl-2.0
vira-lytvyn/labsAndOthersNiceThings
HardwareAndSoftwareOfNeuralNetworks/Lab_13/lab13_1/lab13_1.vhd
1
760
library ieee; use ieee.std_logic_1164.all; entity RS_FF is PORT ( S: in std_logic; R: in std_logic; CLOCK: in std_logic; CLR: in std_logic; PRESET: in std_logic; Q: out std_logic; QN: out std_logic); end RS_FF; Architecture Arch_RS_FF of RS_FF is begin FF:process(CLOCK,CLR,PRESET) begin if (CLR='0') then x:='0'; elsif(PRESET='0') then x:='1'; elsif(CLOCK='1' and CLOCK'EVENT) then if (S='0' and R='0') then x:=x; elsif(S='1' and R='1') then x:='Z'; elsif(S='0' and R='1') then x:='0'; else x:='1'; end if; end if; Q<=x; QN<=not x; end process FF; end Arch_RS_FF;
gpl-2.0
vira-lytvyn/labsAndOthersNiceThings
HardwareAndSoftwareOfNeuralNetworks/Lab_10/lab10_1/lpm_rom0.vhd
1
6380
-- megafunction wizard: %LPM_ROM% -- GENERATION: STANDARD -- VERSION: WM1.0 -- MODULE: altsyncram -- ============================================================ -- File Name: lpm_rom0.vhd -- Megafunction Name(s): -- altsyncram -- -- Simulation Library Files(s): -- altera_mf -- ============================================================ -- ************************************************************ -- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! -- -- 9.1 Build 350 03/24/2010 SP 2 SJ Web Edition -- ************************************************************ --Copyright (C) 1991-2010 Altera Corporation --Your use of Altera Corporation's design tools, logic functions --and other software and tools, and its AMPP partner logic --functions, and any output files from any of the foregoing --(including device programming or simulation files), and any --associated documentation or information are expressly subject --to the terms and conditions of the Altera Program License --Subscription Agreement, Altera MegaCore Function License --Agreement, or other applicable license agreement, including, --without limitation, that your use is for the sole purpose of --programming logic devices manufactured by Altera and sold by --Altera or its authorized distributors. Please refer to the --applicable agreement for further details. LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY altera_mf; USE altera_mf.all; ENTITY lpm_rom0 IS PORT ( address : IN STD_LOGIC_VECTOR (5 DOWNTO 0); inclock : IN STD_LOGIC := '1'; outclock : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (9 DOWNTO 0) ); END lpm_rom0; ARCHITECTURE SYN OF lpm_rom0 IS SIGNAL sub_wire0 : STD_LOGIC_VECTOR (9 DOWNTO 0); COMPONENT altsyncram GENERIC ( address_aclr_a : STRING; clock_enable_input_a : STRING; clock_enable_output_a : STRING; init_file : STRING; intended_device_family : STRING; lpm_type : STRING; numwords_a : NATURAL; operation_mode : STRING; outdata_aclr_a : STRING; outdata_reg_a : STRING; widthad_a : NATURAL; width_a : NATURAL; width_byteena_a : NATURAL ); PORT ( clock0 : IN STD_LOGIC ; clock1 : IN STD_LOGIC ; address_a : IN STD_LOGIC_VECTOR (5 DOWNTO 0); q_a : OUT STD_LOGIC_VECTOR (9 DOWNTO 0) ); END COMPONENT; BEGIN q <= sub_wire0(9 DOWNTO 0); altsyncram_component : altsyncram GENERIC MAP ( address_aclr_a => "NONE", clock_enable_input_a => "BYPASS", clock_enable_output_a => "BYPASS", init_file => "lab10_1.mif", intended_device_family => "Cyclone III", lpm_type => "altsyncram", numwords_a => 64, operation_mode => "ROM", outdata_aclr_a => "NONE", outdata_reg_a => "CLOCK1", widthad_a => 6, width_a => 10, width_byteena_a => 1 ) PORT MAP ( clock0 => inclock, clock1 => outclock, address_a => address, q_a => sub_wire0 ); END SYN; -- ============================================================ -- CNX file retrieval info -- ============================================================ -- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0" -- Retrieval info: PRIVATE: AclrAddr NUMERIC "0" -- Retrieval info: PRIVATE: AclrByte NUMERIC "0" -- Retrieval info: PRIVATE: AclrOutput NUMERIC "0" -- Retrieval info: PRIVATE: BYTE_ENABLE NUMERIC "0" -- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8" -- Retrieval info: PRIVATE: BlankMemory NUMERIC "0" -- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0" -- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0" -- Retrieval info: PRIVATE: Clken NUMERIC "0" -- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0" -- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A" -- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0" -- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III" -- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0" -- Retrieval info: PRIVATE: JTAG_ID STRING "NONE" -- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0" -- Retrieval info: PRIVATE: MIFfilename STRING "lab10_1.mif" -- Retrieval info: PRIVATE: NUMWORDS_A NUMERIC "64" -- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0" -- Retrieval info: PRIVATE: RegAddr NUMERIC "1" -- Retrieval info: PRIVATE: RegOutput NUMERIC "1" -- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0" -- Retrieval info: PRIVATE: SingleClock NUMERIC "0" -- Retrieval info: PRIVATE: UseDQRAM NUMERIC "0" -- Retrieval info: PRIVATE: WidthAddr NUMERIC "6" -- Retrieval info: PRIVATE: WidthData NUMERIC "10" -- Retrieval info: PRIVATE: rden NUMERIC "0" -- Retrieval info: CONSTANT: ADDRESS_ACLR_A STRING "NONE" -- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS" -- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS" -- Retrieval info: CONSTANT: INIT_FILE STRING "lab10_1.mif" -- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III" -- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram" -- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "64" -- Retrieval info: CONSTANT: OPERATION_MODE STRING "ROM" -- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE" -- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "CLOCK1" -- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "6" -- Retrieval info: CONSTANT: WIDTH_A NUMERIC "10" -- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1" -- Retrieval info: USED_PORT: address 0 0 6 0 INPUT NODEFVAL address[5..0] -- Retrieval info: USED_PORT: inclock 0 0 0 0 INPUT VCC inclock -- Retrieval info: USED_PORT: outclock 0 0 0 0 INPUT NODEFVAL outclock -- Retrieval info: USED_PORT: q 0 0 10 0 OUTPUT NODEFVAL q[9..0] -- Retrieval info: CONNECT: @address_a 0 0 6 0 address 0 0 6 0 -- Retrieval info: CONNECT: q 0 0 10 0 @q_a 0 0 10 0 -- Retrieval info: CONNECT: @clock0 0 0 0 0 inclock 0 0 0 0 -- Retrieval info: CONNECT: @clock1 0 0 0 0 outclock 0 0 0 0 -- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.vhd TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.inc FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.cmp TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.bsf TRUE FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0_inst.vhd FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0_waveforms.html TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0_wave*.jpg FALSE -- Retrieval info: LIB_FILE: altera_mf
gpl-2.0
v3best/R7Lite
R7Lite_PCIE/fpga_code/r7lite_DMA/ipcore_dir/rd_fifo_256to64/simulation/rd_fifo_256to64_synth.vhd
1
11411
-------------------------------------------------------------------------------- -- -- FIFO Generator Core Demo Testbench -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2009 - 2010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: rd_fifo_256to64_synth.vhd -- -- Description: -- This is the demo testbench for fifo_generator core. -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.STD_LOGIC_1164.ALL; USE ieee.STD_LOGIC_unsigned.ALL; USE IEEE.STD_LOGIC_arith.ALL; USE ieee.numeric_std.ALL; USE ieee.STD_LOGIC_misc.ALL; LIBRARY std; USE std.textio.ALL; LIBRARY work; USE work.rd_fifo_256to64_pkg.ALL; -------------------------------------------------------------------------------- -- Entity Declaration -------------------------------------------------------------------------------- ENTITY rd_fifo_256to64_synth IS GENERIC( FREEZEON_ERROR : INTEGER := 0; TB_STOP_CNT : INTEGER := 0; TB_SEED : INTEGER := 1 ); PORT( WR_CLK : IN STD_LOGIC; RD_CLK : IN STD_LOGIC; RESET : IN STD_LOGIC; SIM_DONE : OUT STD_LOGIC; STATUS : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) ); END ENTITY; ARCHITECTURE simulation_arch OF rd_fifo_256to64_synth IS -- FIFO interface signal declarations SIGNAL wr_clk_i : STD_LOGIC; SIGNAL rd_clk_i : STD_LOGIC; SIGNAL wr_data_count : STD_LOGIC_VECTOR(10-1 DOWNTO 0); SIGNAL rd_data_count : STD_LOGIC_VECTOR(12-1 DOWNTO 0); SIGNAL rst : STD_LOGIC; SIGNAL prog_full : STD_LOGIC; SIGNAL wr_en : STD_LOGIC; SIGNAL rd_en : STD_LOGIC; SIGNAL din : STD_LOGIC_VECTOR(256-1 DOWNTO 0); SIGNAL dout : STD_LOGIC_VECTOR(64-1 DOWNTO 0); SIGNAL full : STD_LOGIC; SIGNAL empty : STD_LOGIC; -- TB Signals SIGNAL wr_data : STD_LOGIC_VECTOR(256-1 DOWNTO 0); SIGNAL dout_i : STD_LOGIC_VECTOR(64-1 DOWNTO 0); SIGNAL wr_en_i : STD_LOGIC := '0'; SIGNAL rd_en_i : STD_LOGIC := '0'; SIGNAL full_i : STD_LOGIC := '0'; SIGNAL empty_i : STD_LOGIC := '0'; SIGNAL almost_full_i : STD_LOGIC := '0'; SIGNAL almost_empty_i : STD_LOGIC := '0'; SIGNAL prc_we_i : STD_LOGIC := '0'; SIGNAL prc_re_i : STD_LOGIC := '0'; SIGNAL dout_chk_i : STD_LOGIC := '0'; SIGNAL rst_int_rd : STD_LOGIC := '0'; SIGNAL rst_int_wr : STD_LOGIC := '0'; SIGNAL rst_s_wr1 : STD_LOGIC := '0'; SIGNAL rst_s_wr2 : STD_LOGIC := '0'; SIGNAL rst_gen_rd : STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); SIGNAL rst_s_wr3 : STD_LOGIC := '0'; SIGNAL rst_s_rd : STD_LOGIC := '0'; SIGNAL reset_en : STD_LOGIC := '0'; SIGNAL rst_async_wr1 : STD_LOGIC := '0'; SIGNAL rst_async_wr2 : STD_LOGIC := '0'; SIGNAL rst_async_wr3 : STD_LOGIC := '0'; SIGNAL rst_async_rd1 : STD_LOGIC := '0'; SIGNAL rst_async_rd2 : STD_LOGIC := '0'; SIGNAL rst_async_rd3 : STD_LOGIC := '0'; BEGIN ---- Reset generation logic ----- rst_int_wr <= rst_async_wr3 OR rst_s_wr3; rst_int_rd <= rst_async_rd3 OR rst_s_rd; --Testbench reset synchronization PROCESS(rd_clk_i,RESET) BEGIN IF(RESET = '1') THEN rst_async_rd1 <= '1'; rst_async_rd2 <= '1'; rst_async_rd3 <= '1'; ELSIF(rd_clk_i'event AND rd_clk_i='1') THEN rst_async_rd1 <= RESET; rst_async_rd2 <= rst_async_rd1; rst_async_rd3 <= rst_async_rd2; END IF; END PROCESS; PROCESS(wr_clk_i,RESET) BEGIN IF(RESET = '1') THEN rst_async_wr1 <= '1'; rst_async_wr2 <= '1'; rst_async_wr3 <= '1'; ELSIF(wr_clk_i'event AND wr_clk_i='1') THEN rst_async_wr1 <= RESET; rst_async_wr2 <= rst_async_wr1; rst_async_wr3 <= rst_async_wr2; END IF; END PROCESS; --Soft reset for core and testbench PROCESS(rd_clk_i) BEGIN IF(rd_clk_i'event AND rd_clk_i='1') THEN rst_gen_rd <= rst_gen_rd + "1"; IF(reset_en = '1' AND AND_REDUCE(rst_gen_rd) = '1') THEN rst_s_rd <= '1'; assert false report "Reset applied..Memory Collision checks are not valid" severity note; ELSE IF(AND_REDUCE(rst_gen_rd) = '1' AND rst_s_rd = '1') THEN rst_s_rd <= '0'; END IF; END IF; END IF; END PROCESS; PROCESS(wr_clk_i) BEGIN IF(wr_clk_i'event AND wr_clk_i='1') THEN rst_s_wr1 <= rst_s_rd; rst_s_wr2 <= rst_s_wr1; rst_s_wr3 <= rst_s_wr2; IF(rst_s_wr3 = '1' AND rst_s_wr2 = '0') THEN assert false report "Reset removed..Memory Collision checks are valid" severity note; END IF; END IF; END PROCESS; ------------------ ---- Clock buffers for testbench ---- wr_clk_i <= WR_CLK; rd_clk_i <= RD_CLK; ------------------ rst <= RESET OR rst_s_rd AFTER 12 ns; din <= wr_data; dout_i <= dout; wr_en <= wr_en_i; rd_en <= rd_en_i; full_i <= full; empty_i <= empty; fg_dg_nv: rd_fifo_256to64_dgen GENERIC MAP ( C_DIN_WIDTH => 256, C_DOUT_WIDTH => 64, TB_SEED => TB_SEED, C_CH_TYPE => 0 ) PORT MAP ( -- Write Port RESET => rst_int_wr, WR_CLK => wr_clk_i, PRC_WR_EN => prc_we_i, FULL => full_i, WR_EN => wr_en_i, WR_DATA => wr_data ); fg_dv_nv: rd_fifo_256to64_dverif GENERIC MAP ( C_DOUT_WIDTH => 64, C_DIN_WIDTH => 256, C_USE_EMBEDDED_REG => 0, TB_SEED => TB_SEED, C_CH_TYPE => 0 ) PORT MAP( RESET => rst_int_rd, RD_CLK => rd_clk_i, PRC_RD_EN => prc_re_i, RD_EN => rd_en_i, EMPTY => empty_i, DATA_OUT => dout_i, DOUT_CHK => dout_chk_i ); fg_pc_nv: rd_fifo_256to64_pctrl GENERIC MAP ( AXI_CHANNEL => "Native", C_APPLICATION_TYPE => 0, C_DOUT_WIDTH => 64, C_DIN_WIDTH => 256, C_WR_PNTR_WIDTH => 10, C_RD_PNTR_WIDTH => 12, C_CH_TYPE => 0, FREEZEON_ERROR => FREEZEON_ERROR, TB_SEED => TB_SEED, TB_STOP_CNT => TB_STOP_CNT ) PORT MAP( RESET_WR => rst_int_wr, RESET_RD => rst_int_rd, RESET_EN => reset_en, WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, PRC_WR_EN => prc_we_i, PRC_RD_EN => prc_re_i, FULL => full_i, ALMOST_FULL => almost_full_i, ALMOST_EMPTY => almost_empty_i, DOUT_CHK => dout_chk_i, EMPTY => empty_i, DATA_IN => wr_data, DATA_OUT => dout, SIM_DONE => SIM_DONE, STATUS => STATUS ); rd_fifo_256to64_inst : rd_fifo_256to64_exdes PORT MAP ( WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, WR_DATA_COUNT => wr_data_count, RD_DATA_COUNT => rd_data_count, RST => rst, PROG_FULL => prog_full, WR_EN => wr_en, RD_EN => rd_en, DIN => din, DOUT => dout, FULL => full, EMPTY => empty); END ARCHITECTURE;
gpl-2.0
vira-lytvyn/labsAndOthersNiceThings
HardwareAndSoftwareOfNeuralNetworks/Lab_16/Lab_16_2/PZP_CASE.vhd
2
1048
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity PZP_CASE is port(clock : in std_logic; address : in std_logic_vector(7 downto 0); data_out: out std_logic_vector(3 downto 0)); end PZP_CASE; architecture behav of PZP_CASE is begin process(clock) begin if rising_edge (clock) then case address is when "00000000"=> data_out <= "0000"; when "00000001"=> data_out <= "0001"; when "00000010"=> data_out <= "0010"; when "00000011"=> data_out <= "0011"; when "00000100"=> data_out <= "0100"; when "00000101"=> data_out <= "0101"; when "00000110"=> data_out <= "0110"; when "00000111"=> data_out <= "0111"; when "00001000"=> data_out <= "1000"; when "00001001"=> data_out <= "1001"; when "00001010"=> data_out <= "1010"; when "00001011"=> data_out <= "1011"; when "00001100"=> data_out <= "1100"; when "00001101"=> data_out <= "1101"; when "00001110"=> data_out <= "1110"; when others=> data_out <= "1111"; end case; end if; end process; end behav;
gpl-2.0
v3best/R7Lite
R7Lite_PCIE/fpga_code/r7lite_DMA/ipcore_dir/k7_eb_fifo_counted_resized/simulation/k7_eb_fifo_counted_resized_pctrl.vhd
1
18385
-------------------------------------------------------------------------------- -- -- FIFO Generator Core Demo Testbench -- -------------------------------------------------------------------------------- -- -- (c) Copyright 2009 - 2010 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -------------------------------------------------------------------------------- -- -- Filename: k7_eb_fifo_counted_resized_pctrl.vhd -- -- Description: -- Used for protocol control on write and read interface stimulus and status generation -- -------------------------------------------------------------------------------- -- Library Declarations -------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.std_logic_unsigned.all; USE IEEE.std_logic_arith.all; USE IEEE.std_logic_misc.all; LIBRARY work; USE work.k7_eb_fifo_counted_resized_pkg.ALL; ENTITY k7_eb_fifo_counted_resized_pctrl IS GENERIC( AXI_CHANNEL : STRING :="NONE"; C_APPLICATION_TYPE : INTEGER := 0; C_DIN_WIDTH : INTEGER := 0; C_DOUT_WIDTH : INTEGER := 0; C_WR_PNTR_WIDTH : INTEGER := 0; C_RD_PNTR_WIDTH : INTEGER := 0; C_CH_TYPE : INTEGER := 0; FREEZEON_ERROR : INTEGER := 0; TB_STOP_CNT : INTEGER := 2; TB_SEED : INTEGER := 2 ); PORT( RESET_WR : IN STD_LOGIC; RESET_RD : IN STD_LOGIC; WR_CLK : IN STD_LOGIC; RD_CLK : IN STD_LOGIC; FULL : IN STD_LOGIC; EMPTY : IN STD_LOGIC; ALMOST_FULL : IN STD_LOGIC; ALMOST_EMPTY : IN STD_LOGIC; DATA_IN : IN STD_LOGIC_VECTOR(C_DIN_WIDTH-1 DOWNTO 0); DATA_OUT : IN STD_LOGIC_VECTOR(C_DOUT_WIDTH-1 DOWNTO 0); DOUT_CHK : IN STD_LOGIC; PRC_WR_EN : OUT STD_LOGIC; PRC_RD_EN : OUT STD_LOGIC; RESET_EN : OUT STD_LOGIC; SIM_DONE : OUT STD_LOGIC; STATUS : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) ); END ENTITY; ARCHITECTURE fg_pc_arch OF k7_eb_fifo_counted_resized_pctrl IS CONSTANT C_DATA_WIDTH : INTEGER := if_then_else(C_DIN_WIDTH > C_DOUT_WIDTH,C_DIN_WIDTH,C_DOUT_WIDTH); CONSTANT LOOP_COUNT : INTEGER := divroundup(C_DATA_WIDTH,8); CONSTANT D_WIDTH_DIFF : INTEGER := log2roundup(C_DOUT_WIDTH/C_DIN_WIDTH); SIGNAL data_chk_i : STD_LOGIC := if_then_else(C_CH_TYPE /= 2,'1','0'); SIGNAL full_chk_i : STD_LOGIC := if_then_else(C_CH_TYPE /= 2,'1','0'); SIGNAL empty_chk_i : STD_LOGIC := if_then_else(C_CH_TYPE /= 2,'1','0'); SIGNAL status_i : STD_LOGIC_VECTOR(4 DOWNTO 0):= (OTHERS => '0'); SIGNAL status_d1_i : STD_LOGIC_VECTOR(4 DOWNTO 0):= (OTHERS => '0'); SIGNAL wr_en_gen : STD_LOGIC_VECTOR(7 DOWNTO 0):= (OTHERS => '0'); SIGNAL rd_en_gen : STD_LOGIC_VECTOR(7 DOWNTO 0):= (OTHERS => '0'); SIGNAL wr_cntr : STD_LOGIC_VECTOR(C_WR_PNTR_WIDTH-2 DOWNTO 0) := (OTHERS => '0'); SIGNAL full_as_timeout : STD_LOGIC_VECTOR(C_WR_PNTR_WIDTH DOWNTO 0) := (OTHERS => '0'); SIGNAL full_ds_timeout : STD_LOGIC_VECTOR(C_WR_PNTR_WIDTH DOWNTO 0) := (OTHERS => '0'); SIGNAL rd_cntr : STD_LOGIC_VECTOR(C_RD_PNTR_WIDTH-2 DOWNTO 0) := (OTHERS => '0'); SIGNAL empty_as_timeout : STD_LOGIC_VECTOR(C_RD_PNTR_WIDTH DOWNTO 0) := (OTHERS => '0'); SIGNAL empty_ds_timeout : STD_LOGIC_VECTOR(C_RD_PNTR_WIDTH DOWNTO 0):= (OTHERS => '0'); SIGNAL wr_en_i : STD_LOGIC := '0'; SIGNAL rd_en_i : STD_LOGIC := '0'; SIGNAL state : STD_LOGIC := '0'; SIGNAL wr_control : STD_LOGIC := '0'; SIGNAL rd_control : STD_LOGIC := '0'; SIGNAL stop_on_err : STD_LOGIC := '0'; SIGNAL sim_stop_cntr : STD_LOGIC_VECTOR(7 DOWNTO 0):= conv_std_logic_vector(if_then_else(C_CH_TYPE=2,64,TB_STOP_CNT),8); SIGNAL sim_done_i : STD_LOGIC := '0'; SIGNAL rdw_gt_wrw : STD_LOGIC_VECTOR(D_WIDTH_DIFF-1 DOWNTO 0) := (OTHERS => '1'); SIGNAL wrw_gt_rdw : STD_LOGIC_VECTOR(D_WIDTH_DIFF-1 DOWNTO 0) := (OTHERS => '1'); SIGNAL rd_activ_cont : STD_LOGIC_VECTOR(25 downto 0):= (OTHERS => '0'); SIGNAL prc_we_i : STD_LOGIC := '0'; SIGNAL prc_re_i : STD_LOGIC := '0'; SIGNAL reset_en_i : STD_LOGIC := '0'; SIGNAL sim_done_d1 : STD_LOGIC := '0'; SIGNAL sim_done_wr1 : STD_LOGIC := '0'; SIGNAL sim_done_wr2 : STD_LOGIC := '0'; SIGNAL empty_d1 : STD_LOGIC := '0'; SIGNAL empty_wr_dom1 : STD_LOGIC := '0'; SIGNAL state_d1 : STD_LOGIC := '0'; SIGNAL state_rd_dom1 : STD_LOGIC := '0'; SIGNAL rd_en_d1 : STD_LOGIC := '0'; SIGNAL rd_en_wr1 : STD_LOGIC := '0'; SIGNAL wr_en_d1 : STD_LOGIC := '0'; SIGNAL wr_en_rd1 : STD_LOGIC := '0'; SIGNAL full_chk_d1 : STD_LOGIC := '0'; SIGNAL full_chk_rd1 : STD_LOGIC := '0'; SIGNAL empty_wr_dom2 : STD_LOGIC := '0'; SIGNAL state_rd_dom2 : STD_LOGIC := '0'; SIGNAL state_rd_dom3 : STD_LOGIC := '0'; SIGNAL rd_en_wr2 : STD_LOGIC := '0'; SIGNAL wr_en_rd2 : STD_LOGIC := '0'; SIGNAL full_chk_rd2 : STD_LOGIC := '0'; SIGNAL reset_en_d1 : STD_LOGIC := '0'; SIGNAL reset_en_rd1 : STD_LOGIC := '0'; SIGNAL reset_en_rd2 : STD_LOGIC := '0'; SIGNAL data_chk_wr_d1 : STD_LOGIC := '0'; SIGNAL data_chk_rd1 : STD_LOGIC := '0'; SIGNAL data_chk_rd2 : STD_LOGIC := '0'; SIGNAL post_rst_dly_wr : STD_LOGIC_VECTOR(4 DOWNTO 0) := (OTHERS => '1'); SIGNAL post_rst_dly_rd : STD_LOGIC_VECTOR(4 DOWNTO 0) := (OTHERS => '1'); BEGIN status_i <= data_chk_i & full_chk_rd2 & empty_chk_i & '0' & '0'; STATUS <= status_d1_i & '0' & '0' & rd_activ_cont(rd_activ_cont'high); prc_we_i <= wr_en_i WHEN sim_done_wr2 = '0' ELSE '0'; prc_re_i <= rd_en_i WHEN sim_done_i = '0' ELSE '0'; SIM_DONE <= sim_done_i; rdw_gt_wrw <= (OTHERS => '1'); wrw_gt_rdw <= (OTHERS => '1'); PROCESS(RD_CLK) BEGIN IF (RD_CLK'event AND RD_CLK='1') THEN IF(prc_re_i = '1') THEN rd_activ_cont <= rd_activ_cont + "1"; END IF; END IF; END PROCESS; PROCESS(sim_done_i) BEGIN assert sim_done_i = '0' report "Simulation Complete for:" & AXI_CHANNEL severity note; END PROCESS; ----------------------------------------------------- -- SIM_DONE SIGNAL GENERATION ----------------------------------------------------- PROCESS (RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN --sim_done_i <= '0'; ELSIF(RD_CLK'event AND RD_CLK='1') THEN IF((OR_REDUCE(sim_stop_cntr) = '0' AND TB_STOP_CNT /= 0) OR stop_on_err = '1') THEN sim_done_i <= '1'; END IF; END IF; END PROCESS; -- TB Timeout/Stop fifo_tb_stop_run:IF(TB_STOP_CNT /= 0) GENERATE PROCESS (RD_CLK) BEGIN IF (RD_CLK'event AND RD_CLK='1') THEN IF(state_rd_dom2 = '0' AND state_rd_dom3 = '1') THEN sim_stop_cntr <= sim_stop_cntr - "1"; END IF; END IF; END PROCESS; END GENERATE fifo_tb_stop_run; -- Stop when error found PROCESS (RD_CLK) BEGIN IF (RD_CLK'event AND RD_CLK='1') THEN IF(sim_done_i = '0') THEN status_d1_i <= status_i OR status_d1_i; END IF; IF(FREEZEON_ERROR = 1 AND status_i /= "0") THEN stop_on_err <= '1'; END IF; END IF; END PROCESS; ----------------------------------------------------- ----------------------------------------------------- -- CHECKS FOR FIFO ----------------------------------------------------- PROCESS(RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN post_rst_dly_rd <= (OTHERS => '1'); ELSIF (RD_CLK'event AND RD_CLK='1') THEN post_rst_dly_rd <= post_rst_dly_rd-post_rst_dly_rd(4); END IF; END PROCESS; PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN post_rst_dly_wr <= (OTHERS => '1'); ELSIF (WR_CLK'event AND WR_CLK='1') THEN post_rst_dly_wr <= post_rst_dly_wr-post_rst_dly_wr(4); END IF; END PROCESS; -- FULL de-assert Counter PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN full_ds_timeout <= (OTHERS => '0'); ELSIF(WR_CLK'event AND WR_CLK='1') THEN IF(state = '1') THEN IF(rd_en_wr2 = '1' AND wr_en_i = '0' AND FULL = '1' AND AND_REDUCE(wrw_gt_rdw) = '1') THEN full_ds_timeout <= full_ds_timeout + '1'; END IF; ELSE full_ds_timeout <= (OTHERS => '0'); END IF; END IF; END PROCESS; -- EMPTY deassert counter PROCESS(RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN empty_ds_timeout <= (OTHERS => '0'); ELSIF(RD_CLK'event AND RD_CLK='1') THEN IF(state = '0') THEN IF(wr_en_rd2 = '1' AND rd_en_i = '0' AND EMPTY = '1' AND AND_REDUCE(rdw_gt_wrw) = '1') THEN empty_ds_timeout <= empty_ds_timeout + '1'; END IF; ELSE empty_ds_timeout <= (OTHERS => '0'); END IF; END IF; END PROCESS; -- Full check signal generation PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN full_chk_i <= '0'; ELSIF(WR_CLK'event AND WR_CLK='1') THEN IF(C_APPLICATION_TYPE = 1 AND (AXI_CHANNEL = "WACH" OR AXI_CHANNEL = "RACH" OR AXI_CHANNEL = "AXI4_Stream")) THEN full_chk_i <= '0'; ELSE full_chk_i <= AND_REDUCE(full_as_timeout) OR AND_REDUCE(full_ds_timeout); END IF; END IF; END PROCESS; -- Empty checks PROCESS(RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN empty_chk_i <= '0'; ELSIF(RD_CLK'event AND RD_CLK='1') THEN IF(C_APPLICATION_TYPE = 1 AND (AXI_CHANNEL = "WACH" OR AXI_CHANNEL = "RACH" OR AXI_CHANNEL = "AXI4_Stream")) THEN empty_chk_i <= '0'; ELSE empty_chk_i <= AND_REDUCE(empty_as_timeout) OR AND_REDUCE(empty_ds_timeout); END IF; END IF; END PROCESS; fifo_d_chk:IF(C_CH_TYPE /= 2) GENERATE PRC_WR_EN <= prc_we_i AFTER 100 ns; PRC_RD_EN <= prc_re_i AFTER 50 ns; data_chk_i <= dout_chk; END GENERATE fifo_d_chk; ----------------------------------------------------- ----------------------------------------------------- -- SYNCHRONIZERS B/W WRITE AND READ DOMAINS ----------------------------------------------------- PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN empty_wr_dom1 <= '1'; empty_wr_dom2 <= '1'; state_d1 <= '0'; wr_en_d1 <= '0'; rd_en_wr1 <= '0'; rd_en_wr2 <= '0'; full_chk_d1 <= '0'; reset_en_d1 <= '0'; sim_done_wr1 <= '0'; sim_done_wr2 <= '0'; ELSIF (WR_CLK'event AND WR_CLK='1') THEN sim_done_wr1 <= sim_done_d1; sim_done_wr2 <= sim_done_wr1; reset_en_d1 <= reset_en_i; state_d1 <= state; empty_wr_dom1 <= empty_d1; empty_wr_dom2 <= empty_wr_dom1; wr_en_d1 <= wr_en_i; rd_en_wr1 <= rd_en_d1; rd_en_wr2 <= rd_en_wr1; full_chk_d1 <= full_chk_i; END IF; END PROCESS; PROCESS(RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN empty_d1 <= '1'; state_rd_dom1 <= '0'; state_rd_dom2 <= '0'; state_rd_dom3 <= '0'; wr_en_rd1 <= '0'; wr_en_rd2 <= '0'; rd_en_d1 <= '0'; full_chk_rd1 <= '0'; full_chk_rd2 <= '0'; reset_en_rd1 <= '0'; reset_en_rd2 <= '0'; sim_done_d1 <= '0'; ELSIF (RD_CLK'event AND RD_CLK='1') THEN sim_done_d1 <= sim_done_i; reset_en_rd1 <= reset_en_d1; reset_en_rd2 <= reset_en_rd1; empty_d1 <= EMPTY; rd_en_d1 <= rd_en_i; state_rd_dom1 <= state_d1; state_rd_dom2 <= state_rd_dom1; state_rd_dom3 <= state_rd_dom2; wr_en_rd1 <= wr_en_d1; wr_en_rd2 <= wr_en_rd1; full_chk_rd1 <= full_chk_d1; full_chk_rd2 <= full_chk_rd1; END IF; END PROCESS; RESET_EN <= reset_en_rd2; data_fifo_en:IF(C_CH_TYPE /= 2) GENERATE ----------------------------------------------------- -- WR_EN GENERATION ----------------------------------------------------- gen_rand_wr_en:k7_eb_fifo_counted_resized_rng GENERIC MAP( WIDTH => 8, SEED => TB_SEED+1 ) PORT MAP( CLK => WR_CLK, RESET => RESET_WR, RANDOM_NUM => wr_en_gen, ENABLE => '1' ); PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN wr_en_i <= '0'; ELSIF(WR_CLK'event AND WR_CLK='1') THEN IF(state = '1') THEN wr_en_i <= wr_en_gen(0) AND wr_en_gen(7) AND wr_en_gen(2) AND wr_control; ELSE wr_en_i <= (wr_en_gen(3) OR wr_en_gen(4) OR wr_en_gen(2)) AND (NOT post_rst_dly_wr(4)); END IF; END IF; END PROCESS; ----------------------------------------------------- -- WR_EN CONTROL ----------------------------------------------------- PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN wr_cntr <= (OTHERS => '0'); wr_control <= '1'; full_as_timeout <= (OTHERS => '0'); ELSIF(WR_CLK'event AND WR_CLK='1') THEN IF(state = '1') THEN IF(wr_en_i = '1') THEN wr_cntr <= wr_cntr + "1"; END IF; full_as_timeout <= (OTHERS => '0'); ELSE wr_cntr <= (OTHERS => '0'); IF(rd_en_wr2 = '0') THEN IF(wr_en_i = '1') THEN full_as_timeout <= full_as_timeout + "1"; END IF; ELSE full_as_timeout <= (OTHERS => '0'); END IF; END IF; wr_control <= NOT wr_cntr(wr_cntr'high); END IF; END PROCESS; ----------------------------------------------------- -- RD_EN GENERATION ----------------------------------------------------- gen_rand_rd_en:k7_eb_fifo_counted_resized_rng GENERIC MAP( WIDTH => 8, SEED => TB_SEED ) PORT MAP( CLK => RD_CLK, RESET => RESET_RD, RANDOM_NUM => rd_en_gen, ENABLE => '1' ); PROCESS(RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN rd_en_i <= '0'; ELSIF(RD_CLK'event AND RD_CLK='1') THEN IF(state_rd_dom2 = '0') THEN rd_en_i <= rd_en_gen(1) AND rd_en_gen(5) AND rd_en_gen(3) AND rd_control AND (NOT post_rst_dly_rd(4)); ELSE rd_en_i <= rd_en_gen(0) OR rd_en_gen(6); END IF; END IF; END PROCESS; ----------------------------------------------------- -- RD_EN CONTROL ----------------------------------------------------- PROCESS(RD_CLK,RESET_RD) BEGIN IF(RESET_RD = '1') THEN rd_cntr <= (OTHERS => '0'); rd_control <= '1'; empty_as_timeout <= (OTHERS => '0'); ELSIF(RD_CLK'event AND RD_CLK='1') THEN IF(state_rd_dom2 = '0') THEN IF(rd_en_i = '1') THEN rd_cntr <= rd_cntr + "1"; END IF; empty_as_timeout <= (OTHERS => '0'); ELSE rd_cntr <= (OTHERS => '0'); IF(wr_en_rd2 = '0') THEN IF(rd_en_i = '1') THEN empty_as_timeout <= empty_as_timeout + "1"; END IF; ELSE empty_as_timeout <= (OTHERS => '0'); END IF; END IF; rd_control <= NOT rd_cntr(rd_cntr'high); END IF; END PROCESS; ----------------------------------------------------- -- STIMULUS CONTROL ----------------------------------------------------- PROCESS(WR_CLK,RESET_WR) BEGIN IF(RESET_WR = '1') THEN state <= '0'; reset_en_i <= '0'; ELSIF(WR_CLK'event AND WR_CLK='1') THEN CASE state IS WHEN '0' => IF(FULL = '1' AND empty_wr_dom2 = '0') THEN state <= '1'; reset_en_i <= '0'; END IF; WHEN '1' => IF(empty_wr_dom2 = '1' AND FULL = '0') THEN state <= '0'; reset_en_i <= '1'; END IF; WHEN OTHERS => state <= state; END CASE; END IF; END PROCESS; END GENERATE data_fifo_en; END ARCHITECTURE;
gpl-2.0