content
stringlengths
1
1.04M
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2630.vhd,v 1.2 2001-10-26 16:30:20 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c13s03b01x00p02n01i02630ent IS END c13s03b01x00p02n01i02630ent; ARCHITECTURE c13s03b01x00p02n01i02630arch OF c13s03b01x00p02n01i02630ent IS BEGIN TESTING: PROCESS variable k:k : integer := 0; BEGIN assert FALSE report "***FAILED TEST: c13s03b01x00p02n01i02630 - Identifier can not contain ':'." severity ERROR; wait; END PROCESS TESTING; END c13s03b01x00p02n01i02630arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2630.vhd,v 1.2 2001-10-26 16:30:20 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c13s03b01x00p02n01i02630ent IS END c13s03b01x00p02n01i02630ent; ARCHITECTURE c13s03b01x00p02n01i02630arch OF c13s03b01x00p02n01i02630ent IS BEGIN TESTING: PROCESS variable k:k : integer := 0; BEGIN assert FALSE report "***FAILED TEST: c13s03b01x00p02n01i02630 - Identifier can not contain ':'." severity ERROR; wait; END PROCESS TESTING; END c13s03b01x00p02n01i02630arch;
-- ============================================================== -- RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC -- Version: 2013.4 -- Copyright (C) 2013 Xilinx Inc. All rights reserved. -- -- =========================================================== library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity nfa_accept_sample is port ( ap_clk : IN STD_LOGIC; ap_rst : IN STD_LOGIC; ap_start : IN STD_LOGIC; ap_done : OUT STD_LOGIC; ap_idle : OUT STD_LOGIC; ap_ready : OUT STD_LOGIC; nfa_initials_buckets_req_din : OUT STD_LOGIC; nfa_initials_buckets_req_full_n : IN STD_LOGIC; nfa_initials_buckets_req_write : OUT STD_LOGIC; nfa_initials_buckets_rsp_empty_n : IN STD_LOGIC; nfa_initials_buckets_rsp_read : OUT STD_LOGIC; nfa_initials_buckets_address : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_initials_buckets_datain : IN STD_LOGIC_VECTOR (31 downto 0); nfa_initials_buckets_dataout : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_initials_buckets_size : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_req_din : OUT STD_LOGIC; nfa_finals_buckets_req_full_n : IN STD_LOGIC; nfa_finals_buckets_req_write : OUT STD_LOGIC; nfa_finals_buckets_rsp_empty_n : IN STD_LOGIC; nfa_finals_buckets_rsp_read : OUT STD_LOGIC; nfa_finals_buckets_address : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_datain : IN STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_dataout : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_size : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_forward_buckets_req_din : OUT STD_LOGIC; nfa_forward_buckets_req_full_n : IN STD_LOGIC; nfa_forward_buckets_req_write : OUT STD_LOGIC; nfa_forward_buckets_rsp_empty_n : IN STD_LOGIC; nfa_forward_buckets_rsp_read : OUT STD_LOGIC; nfa_forward_buckets_address : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_forward_buckets_datain : IN STD_LOGIC_VECTOR (31 downto 0); nfa_forward_buckets_dataout : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_forward_buckets_size : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_symbols : IN STD_LOGIC_VECTOR (7 downto 0); sample_req_din : OUT STD_LOGIC; sample_req_full_n : IN STD_LOGIC; sample_req_write : OUT STD_LOGIC; sample_rsp_empty_n : IN STD_LOGIC; sample_rsp_read : OUT STD_LOGIC; sample_address : OUT STD_LOGIC_VECTOR (31 downto 0); sample_datain : IN STD_LOGIC_VECTOR (7 downto 0); sample_dataout : OUT STD_LOGIC_VECTOR (7 downto 0); sample_size : OUT STD_LOGIC_VECTOR (31 downto 0); empty : IN STD_LOGIC_VECTOR (31 downto 0); length_r : IN STD_LOGIC_VECTOR (15 downto 0); ap_return : OUT STD_LOGIC_VECTOR (0 downto 0) ); end; architecture behav of nfa_accept_sample is constant ap_const_logic_1 : STD_LOGIC := '1'; constant ap_const_logic_0 : STD_LOGIC := '0'; constant ap_ST_st1_fsm_0 : STD_LOGIC_VECTOR (5 downto 0) := "000000"; constant ap_ST_st2_fsm_1 : STD_LOGIC_VECTOR (5 downto 0) := "000001"; constant ap_ST_st3_fsm_2 : STD_LOGIC_VECTOR (5 downto 0) := "000010"; constant ap_ST_st4_fsm_3 : STD_LOGIC_VECTOR (5 downto 0) := "000011"; constant ap_ST_st5_fsm_4 : STD_LOGIC_VECTOR (5 downto 0) := "000100"; constant ap_ST_st6_fsm_5 : STD_LOGIC_VECTOR (5 downto 0) := "000101"; constant ap_ST_st7_fsm_6 : STD_LOGIC_VECTOR (5 downto 0) := "000110"; constant ap_ST_st8_fsm_7 : STD_LOGIC_VECTOR (5 downto 0) := "000111"; constant ap_ST_st9_fsm_8 : STD_LOGIC_VECTOR (5 downto 0) := "001000"; constant ap_ST_st10_fsm_9 : STD_LOGIC_VECTOR (5 downto 0) := "001001"; constant ap_ST_st11_fsm_10 : STD_LOGIC_VECTOR (5 downto 0) := "001010"; constant ap_ST_st12_fsm_11 : STD_LOGIC_VECTOR (5 downto 0) := "001011"; constant ap_ST_st13_fsm_12 : STD_LOGIC_VECTOR (5 downto 0) := "001100"; constant ap_ST_st14_fsm_13 : STD_LOGIC_VECTOR (5 downto 0) := "001101"; constant ap_ST_st15_fsm_14 : STD_LOGIC_VECTOR (5 downto 0) := "001110"; constant ap_ST_st16_fsm_15 : STD_LOGIC_VECTOR (5 downto 0) := "001111"; constant ap_ST_st17_fsm_16 : STD_LOGIC_VECTOR (5 downto 0) := "010000"; constant ap_ST_st18_fsm_17 : STD_LOGIC_VECTOR (5 downto 0) := "010001"; constant ap_ST_st19_fsm_18 : STD_LOGIC_VECTOR (5 downto 0) := "010010"; constant ap_ST_st20_fsm_19 : STD_LOGIC_VECTOR (5 downto 0) := "010011"; constant ap_ST_st21_fsm_20 : STD_LOGIC_VECTOR (5 downto 0) := "010100"; constant ap_ST_st22_fsm_21 : STD_LOGIC_VECTOR (5 downto 0) := "010101"; constant ap_ST_st23_fsm_22 : STD_LOGIC_VECTOR (5 downto 0) := "010110"; constant ap_ST_st24_fsm_23 : STD_LOGIC_VECTOR (5 downto 0) := "010111"; constant ap_ST_st25_fsm_24 : STD_LOGIC_VECTOR (5 downto 0) := "011000"; constant ap_ST_st26_fsm_25 : STD_LOGIC_VECTOR (5 downto 0) := "011001"; constant ap_ST_st27_fsm_26 : STD_LOGIC_VECTOR (5 downto 0) := "011010"; constant ap_ST_st28_fsm_27 : STD_LOGIC_VECTOR (5 downto 0) := "011011"; constant ap_ST_st29_fsm_28 : STD_LOGIC_VECTOR (5 downto 0) := "011100"; constant ap_ST_st30_fsm_29 : STD_LOGIC_VECTOR (5 downto 0) := "011101"; constant ap_ST_st31_fsm_30 : STD_LOGIC_VECTOR (5 downto 0) := "011110"; constant ap_ST_st32_fsm_31 : STD_LOGIC_VECTOR (5 downto 0) := "011111"; constant ap_ST_st33_fsm_32 : STD_LOGIC_VECTOR (5 downto 0) := "100000"; constant ap_ST_st34_fsm_33 : STD_LOGIC_VECTOR (5 downto 0) := "100001"; constant ap_ST_st35_fsm_34 : STD_LOGIC_VECTOR (5 downto 0) := "100010"; constant ap_ST_st36_fsm_35 : STD_LOGIC_VECTOR (5 downto 0) := "100011"; constant ap_ST_st37_fsm_36 : STD_LOGIC_VECTOR (5 downto 0) := "100100"; constant ap_ST_st38_fsm_37 : STD_LOGIC_VECTOR (5 downto 0) := "100101"; constant ap_ST_st39_fsm_38 : STD_LOGIC_VECTOR (5 downto 0) := "100110"; constant ap_ST_st40_fsm_39 : STD_LOGIC_VECTOR (5 downto 0) := "100111"; constant ap_ST_st41_fsm_40 : STD_LOGIC_VECTOR (5 downto 0) := "101000"; constant ap_ST_st42_fsm_41 : STD_LOGIC_VECTOR (5 downto 0) := "101001"; constant ap_ST_st43_fsm_42 : STD_LOGIC_VECTOR (5 downto 0) := "101010"; constant ap_ST_st44_fsm_43 : STD_LOGIC_VECTOR (5 downto 0) := "101011"; constant ap_ST_st45_fsm_44 : STD_LOGIC_VECTOR (5 downto 0) := "101100"; constant ap_const_lv1_0 : STD_LOGIC_VECTOR (0 downto 0) := "0"; constant ap_const_lv16_0 : STD_LOGIC_VECTOR (15 downto 0) := "0000000000000000"; constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000"; constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1"; constant ap_const_lv2_2 : STD_LOGIC_VECTOR (1 downto 0) := "10"; constant ap_const_lv32_1 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000001"; constant ap_const_lv16_1 : STD_LOGIC_VECTOR (15 downto 0) := "0000000000000001"; constant ap_const_lv5_0 : STD_LOGIC_VECTOR (4 downto 0) := "00000"; constant ap_const_lv8_0 : STD_LOGIC_VECTOR (7 downto 0) := "00000000"; signal ap_CS_fsm : STD_LOGIC_VECTOR (5 downto 0) := "000000"; signal reg_374 : STD_LOGIC_VECTOR (31 downto 0); signal current_buckets_0_reg_577 : STD_LOGIC_VECTOR (31 downto 0); signal current_buckets_1_reg_582 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_s_fu_397_p2 : STD_LOGIC_VECTOR (0 downto 0); signal tmp_s_reg_597 : STD_LOGIC_VECTOR (0 downto 0); signal grp_fu_402_p2 : STD_LOGIC_VECTOR (15 downto 0); signal i_1_reg_601 : STD_LOGIC_VECTOR (15 downto 0); signal sample_addr_1_reg_606 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_17_i_fu_420_p2 : STD_LOGIC_VECTOR (0 downto 0); signal tmp_17_i_reg_612 : STD_LOGIC_VECTOR (0 downto 0); signal grp_fu_414_p2 : STD_LOGIC_VECTOR (31 downto 0); signal p_rec_reg_616 : STD_LOGIC_VECTOR (31 downto 0); signal sym_reg_621 : STD_LOGIC_VECTOR (7 downto 0); signal tmp_17_1_i_fu_426_p2 : STD_LOGIC_VECTOR (0 downto 0); signal tmp_17_1_i_reg_626 : STD_LOGIC_VECTOR (0 downto 0); signal grp_p_bsf32_hw_fu_368_ap_return : STD_LOGIC_VECTOR (4 downto 0); signal r_bit_reg_630 : STD_LOGIC_VECTOR (4 downto 0); signal agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_432_p1 : STD_LOGIC_VECTOR (1 downto 0); signal j_bucket_index1_ph_cast_fu_436_p1 : STD_LOGIC_VECTOR (7 downto 0); signal j_bit1_ph_cast_fu_440_p1 : STD_LOGIC_VECTOR (7 downto 0); signal tmp_7_i_cast_fu_444_p1 : STD_LOGIC_VECTOR (13 downto 0); signal tmp_7_i_cast_reg_650 : STD_LOGIC_VECTOR (13 downto 0); signal j_end_phi_fu_312_p4 : STD_LOGIC_VECTOR (0 downto 0); signal grp_fu_463_p2 : STD_LOGIC_VECTOR (5 downto 0); signal state_reg_665 : STD_LOGIC_VECTOR (5 downto 0); signal grp_fu_476_p2 : STD_LOGIC_VECTOR (13 downto 0); signal tmp_6_i_reg_680 : STD_LOGIC_VECTOR (13 downto 0); signal grp_fu_482_p2 : STD_LOGIC_VECTOR (13 downto 0); signal offset_i_reg_685 : STD_LOGIC_VECTOR (13 downto 0); signal j_bit_reg_701 : STD_LOGIC_VECTOR (7 downto 0); signal j_bucket_index_reg_706 : STD_LOGIC_VECTOR (7 downto 0); signal j_bucket_reg_711 : STD_LOGIC_VECTOR (31 downto 0); signal p_s_reg_716 : STD_LOGIC_VECTOR (0 downto 0); signal next_buckets_0_1_fu_538_p2 : STD_LOGIC_VECTOR (31 downto 0); signal next_buckets_0_1_reg_721 : STD_LOGIC_VECTOR (31 downto 0); signal next_buckets_1_1_fu_544_p2 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_buckets_0_reg_731 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_buckets_1_reg_736 : STD_LOGIC_VECTOR (31 downto 0); signal current_buckets_0_1_fu_558_p2 : STD_LOGIC_VECTOR (31 downto 0); signal current_buckets_0_1_reg_741 : STD_LOGIC_VECTOR (31 downto 0); signal current_buckets_1_1_fu_563_p2 : STD_LOGIC_VECTOR (31 downto 0); signal current_buckets_1_1_reg_746 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_1_fu_568_p2 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_1_reg_751 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_2_fu_572_p2 : STD_LOGIC_VECTOR (0 downto 0); signal tmp_2_reg_756 : STD_LOGIC_VECTOR (0 downto 0); signal grp_bitset_next_fu_344_p_read : STD_LOGIC_VECTOR (31 downto 0); signal grp_bitset_next_fu_344_r_bit : STD_LOGIC_VECTOR (7 downto 0); signal grp_bitset_next_fu_344_r_bucket_index : STD_LOGIC_VECTOR (7 downto 0); signal grp_bitset_next_fu_344_r_bucket : STD_LOGIC_VECTOR (31 downto 0); signal grp_bitset_next_fu_344_ap_return_0 : STD_LOGIC_VECTOR (7 downto 0); signal grp_bitset_next_fu_344_ap_return_1 : STD_LOGIC_VECTOR (7 downto 0); signal grp_bitset_next_fu_344_ap_return_2 : STD_LOGIC_VECTOR (31 downto 0); signal grp_bitset_next_fu_344_ap_return_3 : STD_LOGIC_VECTOR (0 downto 0); signal grp_bitset_next_fu_344_ap_ce : STD_LOGIC; signal grp_nfa_get_initials_fu_356_ap_start : STD_LOGIC; signal grp_nfa_get_initials_fu_356_ap_done : STD_LOGIC; signal grp_nfa_get_initials_fu_356_ap_idle : STD_LOGIC; signal grp_nfa_get_initials_fu_356_ap_ready : STD_LOGIC; signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_din : STD_LOGIC; signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_full_n : STD_LOGIC; signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_write : STD_LOGIC; signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_rsp_empty_n : STD_LOGIC; signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_rsp_read : STD_LOGIC; signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_address : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_datain : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_dataout : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_initials_fu_356_nfa_initials_buckets_size : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_initials_fu_356_ap_ce : STD_LOGIC; signal grp_nfa_get_initials_fu_356_ap_return_0 : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_initials_fu_356_ap_return_1 : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_finals_fu_362_ap_start : STD_LOGIC; signal grp_nfa_get_finals_fu_362_ap_done : STD_LOGIC; signal grp_nfa_get_finals_fu_362_ap_idle : STD_LOGIC; signal grp_nfa_get_finals_fu_362_ap_ready : STD_LOGIC; signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_din : STD_LOGIC; signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_full_n : STD_LOGIC; signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_write : STD_LOGIC; signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_rsp_empty_n : STD_LOGIC; signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_rsp_read : STD_LOGIC; signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_address : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_datain : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_dataout : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_finals_fu_362_nfa_finals_buckets_size : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_finals_fu_362_ap_ce : STD_LOGIC; signal grp_nfa_get_finals_fu_362_ap_return_0 : STD_LOGIC_VECTOR (31 downto 0); signal grp_nfa_get_finals_fu_362_ap_return_1 : STD_LOGIC_VECTOR (31 downto 0); signal grp_p_bsf32_hw_fu_368_bus_r : STD_LOGIC_VECTOR (31 downto 0); signal grp_p_bsf32_hw_fu_368_ap_ce : STD_LOGIC; signal i_reg_134 : STD_LOGIC_VECTOR (15 downto 0); signal any_phi_fu_324_p4 : STD_LOGIC_VECTOR (0 downto 0); signal p_01_rec_reg_146 : STD_LOGIC_VECTOR (31 downto 0); signal next_buckets_1_reg_158 : STD_LOGIC_VECTOR (31 downto 0); signal next_buckets_0_reg_168 : STD_LOGIC_VECTOR (31 downto 0); signal bus_assign_reg_178 : STD_LOGIC_VECTOR (31 downto 0); signal agg_result_bucket_index_0_lcssa4_i_reg_190 : STD_LOGIC_VECTOR (0 downto 0); signal j_bucket1_ph_reg_203 : STD_LOGIC_VECTOR (31 downto 0); signal j_bucket_index1_ph_reg_216 : STD_LOGIC_VECTOR (1 downto 0); signal j_bit1_ph_reg_227 : STD_LOGIC_VECTOR (4 downto 0); signal j_end_ph_reg_238 : STD_LOGIC_VECTOR (0 downto 0); signal tmp_buckets_1_3_reg_252 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_buckets_0_3_reg_265 : STD_LOGIC_VECTOR (31 downto 0); signal j_bucket1_reg_278 : STD_LOGIC_VECTOR (31 downto 0); signal j_bucket_index1_reg_289 : STD_LOGIC_VECTOR (7 downto 0); signal j_bit1_reg_299 : STD_LOGIC_VECTOR (7 downto 0); signal j_end_reg_309 : STD_LOGIC_VECTOR (0 downto 0); signal any_reg_319 : STD_LOGIC_VECTOR (0 downto 0); signal p_0_reg_332 : STD_LOGIC_VECTOR (0 downto 0); signal ap_NS_fsm : STD_LOGIC_VECTOR (5 downto 0); signal grp_nfa_get_finals_fu_362_ap_start_ap_start_reg : STD_LOGIC := '0'; signal grp_fu_392_p2 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_4_i_cast_fu_493_p1 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_8_i_cast_fu_511_p1 : STD_LOGIC_VECTOR (31 downto 0); signal grp_fu_392_p0 : STD_LOGIC_VECTOR (31 downto 0); signal grp_fu_392_p1 : STD_LOGIC_VECTOR (31 downto 0); signal grp_fu_402_p0 : STD_LOGIC_VECTOR (15 downto 0); signal grp_fu_402_p1 : STD_LOGIC_VECTOR (15 downto 0); signal grp_fu_414_p0 : STD_LOGIC_VECTOR (31 downto 0); signal grp_fu_414_p1 : STD_LOGIC_VECTOR (31 downto 0); signal tmp_5_fu_447_p1 : STD_LOGIC_VECTOR (0 downto 0); signal grp_fu_463_p0 : STD_LOGIC_VECTOR (5 downto 0); signal grp_fu_463_p1 : STD_LOGIC_VECTOR (5 downto 0); signal grp_fu_476_p0 : STD_LOGIC_VECTOR (7 downto 0); signal grp_fu_476_p1 : STD_LOGIC_VECTOR (5 downto 0); signal grp_fu_482_p0 : STD_LOGIC_VECTOR (13 downto 0); signal grp_fu_482_p1 : STD_LOGIC_VECTOR (13 downto 0); signal tmp_4_i_fu_486_p3 : STD_LOGIC_VECTOR (14 downto 0); signal tmp_8_i_fu_504_p3 : STD_LOGIC_VECTOR (14 downto 0); signal grp_fu_392_ce : STD_LOGIC; signal grp_fu_402_ce : STD_LOGIC; signal grp_fu_414_ce : STD_LOGIC; signal grp_fu_463_ce : STD_LOGIC; signal grp_fu_476_ce : STD_LOGIC; signal grp_fu_482_ce : STD_LOGIC; signal ap_return_preg : STD_LOGIC_VECTOR (0 downto 0) := "0"; signal grp_fu_476_p00 : STD_LOGIC_VECTOR (13 downto 0); signal grp_fu_476_p10 : STD_LOGIC_VECTOR (13 downto 0); component bitset_next IS port ( ap_clk : IN STD_LOGIC; ap_rst : IN STD_LOGIC; p_read : IN STD_LOGIC_VECTOR (31 downto 0); r_bit : IN STD_LOGIC_VECTOR (7 downto 0); r_bucket_index : IN STD_LOGIC_VECTOR (7 downto 0); r_bucket : IN STD_LOGIC_VECTOR (31 downto 0); ap_return_0 : OUT STD_LOGIC_VECTOR (7 downto 0); ap_return_1 : OUT STD_LOGIC_VECTOR (7 downto 0); ap_return_2 : OUT STD_LOGIC_VECTOR (31 downto 0); ap_return_3 : OUT STD_LOGIC_VECTOR (0 downto 0); ap_ce : IN STD_LOGIC ); end component; component nfa_get_initials IS port ( ap_clk : IN STD_LOGIC; ap_rst : IN STD_LOGIC; ap_start : IN STD_LOGIC; ap_done : OUT STD_LOGIC; ap_idle : OUT STD_LOGIC; ap_ready : OUT STD_LOGIC; nfa_initials_buckets_req_din : OUT STD_LOGIC; nfa_initials_buckets_req_full_n : IN STD_LOGIC; nfa_initials_buckets_req_write : OUT STD_LOGIC; nfa_initials_buckets_rsp_empty_n : IN STD_LOGIC; nfa_initials_buckets_rsp_read : OUT STD_LOGIC; nfa_initials_buckets_address : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_initials_buckets_datain : IN STD_LOGIC_VECTOR (31 downto 0); nfa_initials_buckets_dataout : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_initials_buckets_size : OUT STD_LOGIC_VECTOR (31 downto 0); ap_ce : IN STD_LOGIC; ap_return_0 : OUT STD_LOGIC_VECTOR (31 downto 0); ap_return_1 : OUT STD_LOGIC_VECTOR (31 downto 0) ); end component; component nfa_get_finals IS port ( ap_clk : IN STD_LOGIC; ap_rst : IN STD_LOGIC; ap_start : IN STD_LOGIC; ap_done : OUT STD_LOGIC; ap_idle : OUT STD_LOGIC; ap_ready : OUT STD_LOGIC; nfa_finals_buckets_req_din : OUT STD_LOGIC; nfa_finals_buckets_req_full_n : IN STD_LOGIC; nfa_finals_buckets_req_write : OUT STD_LOGIC; nfa_finals_buckets_rsp_empty_n : IN STD_LOGIC; nfa_finals_buckets_rsp_read : OUT STD_LOGIC; nfa_finals_buckets_address : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_datain : IN STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_dataout : OUT STD_LOGIC_VECTOR (31 downto 0); nfa_finals_buckets_size : OUT STD_LOGIC_VECTOR (31 downto 0); ap_ce : IN STD_LOGIC; ap_return_0 : OUT STD_LOGIC_VECTOR (31 downto 0); ap_return_1 : OUT STD_LOGIC_VECTOR (31 downto 0) ); end component; component p_bsf32_hw IS port ( ap_clk : IN STD_LOGIC; ap_rst : IN STD_LOGIC; bus_r : IN STD_LOGIC_VECTOR (31 downto 0); ap_return : OUT STD_LOGIC_VECTOR (4 downto 0); ap_ce : IN STD_LOGIC ); end component; component nfa_accept_samples_generic_hw_add_32ns_32ns_32_8 IS generic ( ID : INTEGER; NUM_STAGE : INTEGER; din0_WIDTH : INTEGER; din1_WIDTH : INTEGER; dout_WIDTH : INTEGER ); port ( clk : IN STD_LOGIC; reset : IN STD_LOGIC; din0 : IN STD_LOGIC_VECTOR (31 downto 0); din1 : IN STD_LOGIC_VECTOR (31 downto 0); ce : IN STD_LOGIC; dout : OUT STD_LOGIC_VECTOR (31 downto 0) ); end component; component nfa_accept_samples_generic_hw_add_16ns_16ns_16_4 IS generic ( ID : INTEGER; NUM_STAGE : INTEGER; din0_WIDTH : INTEGER; din1_WIDTH : INTEGER; dout_WIDTH : INTEGER ); port ( clk : IN STD_LOGIC; reset : IN STD_LOGIC; din0 : IN STD_LOGIC_VECTOR (15 downto 0); din1 : IN STD_LOGIC_VECTOR (15 downto 0); ce : IN STD_LOGIC; dout : OUT STD_LOGIC_VECTOR (15 downto 0) ); end component; component nfa_accept_samples_generic_hw_add_6ns_6ns_6_2 IS generic ( ID : INTEGER; NUM_STAGE : INTEGER; din0_WIDTH : INTEGER; din1_WIDTH : INTEGER; dout_WIDTH : INTEGER ); port ( clk : IN STD_LOGIC; reset : IN STD_LOGIC; din0 : IN STD_LOGIC_VECTOR (5 downto 0); din1 : IN STD_LOGIC_VECTOR (5 downto 0); ce : IN STD_LOGIC; dout : OUT STD_LOGIC_VECTOR (5 downto 0) ); end component; component nfa_accept_samples_generic_hw_mul_8ns_6ns_14_4 IS generic ( ID : INTEGER; NUM_STAGE : INTEGER; din0_WIDTH : INTEGER; din1_WIDTH : INTEGER; dout_WIDTH : INTEGER ); port ( clk : IN STD_LOGIC; reset : IN STD_LOGIC; din0 : IN STD_LOGIC_VECTOR (7 downto 0); din1 : IN STD_LOGIC_VECTOR (5 downto 0); ce : IN STD_LOGIC; dout : OUT STD_LOGIC_VECTOR (13 downto 0) ); end component; component nfa_accept_samples_generic_hw_add_14ns_14ns_14_4 IS generic ( ID : INTEGER; NUM_STAGE : INTEGER; din0_WIDTH : INTEGER; din1_WIDTH : INTEGER; dout_WIDTH : INTEGER ); port ( clk : IN STD_LOGIC; reset : IN STD_LOGIC; din0 : IN STD_LOGIC_VECTOR (13 downto 0); din1 : IN STD_LOGIC_VECTOR (13 downto 0); ce : IN STD_LOGIC; dout : OUT STD_LOGIC_VECTOR (13 downto 0) ); end component; begin grp_bitset_next_fu_344 : component bitset_next port map ( ap_clk => ap_clk, ap_rst => ap_rst, p_read => grp_bitset_next_fu_344_p_read, r_bit => grp_bitset_next_fu_344_r_bit, r_bucket_index => grp_bitset_next_fu_344_r_bucket_index, r_bucket => grp_bitset_next_fu_344_r_bucket, ap_return_0 => grp_bitset_next_fu_344_ap_return_0, ap_return_1 => grp_bitset_next_fu_344_ap_return_1, ap_return_2 => grp_bitset_next_fu_344_ap_return_2, ap_return_3 => grp_bitset_next_fu_344_ap_return_3, ap_ce => grp_bitset_next_fu_344_ap_ce); grp_nfa_get_initials_fu_356 : component nfa_get_initials port map ( ap_clk => ap_clk, ap_rst => ap_rst, ap_start => grp_nfa_get_initials_fu_356_ap_start, ap_done => grp_nfa_get_initials_fu_356_ap_done, ap_idle => grp_nfa_get_initials_fu_356_ap_idle, ap_ready => grp_nfa_get_initials_fu_356_ap_ready, nfa_initials_buckets_req_din => grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_din, nfa_initials_buckets_req_full_n => grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_full_n, nfa_initials_buckets_req_write => grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_write, nfa_initials_buckets_rsp_empty_n => grp_nfa_get_initials_fu_356_nfa_initials_buckets_rsp_empty_n, nfa_initials_buckets_rsp_read => grp_nfa_get_initials_fu_356_nfa_initials_buckets_rsp_read, nfa_initials_buckets_address => grp_nfa_get_initials_fu_356_nfa_initials_buckets_address, nfa_initials_buckets_datain => grp_nfa_get_initials_fu_356_nfa_initials_buckets_datain, nfa_initials_buckets_dataout => grp_nfa_get_initials_fu_356_nfa_initials_buckets_dataout, nfa_initials_buckets_size => grp_nfa_get_initials_fu_356_nfa_initials_buckets_size, ap_ce => grp_nfa_get_initials_fu_356_ap_ce, ap_return_0 => grp_nfa_get_initials_fu_356_ap_return_0, ap_return_1 => grp_nfa_get_initials_fu_356_ap_return_1); grp_nfa_get_finals_fu_362 : component nfa_get_finals port map ( ap_clk => ap_clk, ap_rst => ap_rst, ap_start => grp_nfa_get_finals_fu_362_ap_start, ap_done => grp_nfa_get_finals_fu_362_ap_done, ap_idle => grp_nfa_get_finals_fu_362_ap_idle, ap_ready => grp_nfa_get_finals_fu_362_ap_ready, nfa_finals_buckets_req_din => grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_din, nfa_finals_buckets_req_full_n => grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_full_n, nfa_finals_buckets_req_write => grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_write, nfa_finals_buckets_rsp_empty_n => grp_nfa_get_finals_fu_362_nfa_finals_buckets_rsp_empty_n, nfa_finals_buckets_rsp_read => grp_nfa_get_finals_fu_362_nfa_finals_buckets_rsp_read, nfa_finals_buckets_address => grp_nfa_get_finals_fu_362_nfa_finals_buckets_address, nfa_finals_buckets_datain => grp_nfa_get_finals_fu_362_nfa_finals_buckets_datain, nfa_finals_buckets_dataout => grp_nfa_get_finals_fu_362_nfa_finals_buckets_dataout, nfa_finals_buckets_size => grp_nfa_get_finals_fu_362_nfa_finals_buckets_size, ap_ce => grp_nfa_get_finals_fu_362_ap_ce, ap_return_0 => grp_nfa_get_finals_fu_362_ap_return_0, ap_return_1 => grp_nfa_get_finals_fu_362_ap_return_1); grp_p_bsf32_hw_fu_368 : component p_bsf32_hw port map ( ap_clk => ap_clk, ap_rst => ap_rst, bus_r => grp_p_bsf32_hw_fu_368_bus_r, ap_return => grp_p_bsf32_hw_fu_368_ap_return, ap_ce => grp_p_bsf32_hw_fu_368_ap_ce); nfa_accept_samples_generic_hw_add_32ns_32ns_32_8_U17 : component nfa_accept_samples_generic_hw_add_32ns_32ns_32_8 generic map ( ID => 17, NUM_STAGE => 8, din0_WIDTH => 32, din1_WIDTH => 32, dout_WIDTH => 32) port map ( clk => ap_clk, reset => ap_rst, din0 => grp_fu_392_p0, din1 => grp_fu_392_p1, ce => grp_fu_392_ce, dout => grp_fu_392_p2); nfa_accept_samples_generic_hw_add_16ns_16ns_16_4_U18 : component nfa_accept_samples_generic_hw_add_16ns_16ns_16_4 generic map ( ID => 18, NUM_STAGE => 4, din0_WIDTH => 16, din1_WIDTH => 16, dout_WIDTH => 16) port map ( clk => ap_clk, reset => ap_rst, din0 => grp_fu_402_p0, din1 => grp_fu_402_p1, ce => grp_fu_402_ce, dout => grp_fu_402_p2); nfa_accept_samples_generic_hw_add_32ns_32ns_32_8_U19 : component nfa_accept_samples_generic_hw_add_32ns_32ns_32_8 generic map ( ID => 19, NUM_STAGE => 8, din0_WIDTH => 32, din1_WIDTH => 32, dout_WIDTH => 32) port map ( clk => ap_clk, reset => ap_rst, din0 => grp_fu_414_p0, din1 => grp_fu_414_p1, ce => grp_fu_414_ce, dout => grp_fu_414_p2); nfa_accept_samples_generic_hw_add_6ns_6ns_6_2_U20 : component nfa_accept_samples_generic_hw_add_6ns_6ns_6_2 generic map ( ID => 20, NUM_STAGE => 2, din0_WIDTH => 6, din1_WIDTH => 6, dout_WIDTH => 6) port map ( clk => ap_clk, reset => ap_rst, din0 => grp_fu_463_p0, din1 => grp_fu_463_p1, ce => grp_fu_463_ce, dout => grp_fu_463_p2); nfa_accept_samples_generic_hw_mul_8ns_6ns_14_4_U21 : component nfa_accept_samples_generic_hw_mul_8ns_6ns_14_4 generic map ( ID => 21, NUM_STAGE => 4, din0_WIDTH => 8, din1_WIDTH => 6, dout_WIDTH => 14) port map ( clk => ap_clk, reset => ap_rst, din0 => grp_fu_476_p0, din1 => grp_fu_476_p1, ce => grp_fu_476_ce, dout => grp_fu_476_p2); nfa_accept_samples_generic_hw_add_14ns_14ns_14_4_U22 : component nfa_accept_samples_generic_hw_add_14ns_14ns_14_4 generic map ( ID => 22, NUM_STAGE => 4, din0_WIDTH => 14, din1_WIDTH => 14, dout_WIDTH => 14) port map ( clk => ap_clk, reset => ap_rst, din0 => grp_fu_482_p0, din1 => grp_fu_482_p1, ce => grp_fu_482_ce, dout => grp_fu_482_p2); -- the current state (ap_CS_fsm) of the state machine. -- ap_CS_fsm_assign_proc : process(ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (ap_rst = '1') then ap_CS_fsm <= ap_ST_st1_fsm_0; else ap_CS_fsm <= ap_NS_fsm; end if; end if; end process; -- ap_return_preg assign process. -- ap_return_preg_assign_proc : process(ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (ap_rst = '1') then ap_return_preg <= ap_const_lv1_0; else if ((ap_ST_st45_fsm_44 = ap_CS_fsm)) then ap_return_preg <= p_0_reg_332; end if; end if; end if; end process; -- grp_nfa_get_finals_fu_362_ap_start_ap_start_reg assign process. -- grp_nfa_get_finals_fu_362_ap_start_ap_start_reg_assign_proc : process(ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (ap_rst = '1') then grp_nfa_get_finals_fu_362_ap_start_ap_start_reg <= ap_const_logic_0; else if (((ap_ST_st12_fsm_11 = ap_NS_fsm) and (ap_ST_st11_fsm_10 = ap_CS_fsm) and (tmp_s_reg_597 = ap_const_lv1_0))) then grp_nfa_get_finals_fu_362_ap_start_ap_start_reg <= ap_const_logic_1; elsif ((ap_const_logic_1 = grp_nfa_get_finals_fu_362_ap_ready)) then grp_nfa_get_finals_fu_362_ap_start_ap_start_reg <= ap_const_logic_0; end if; end if; end if; end process; -- agg_result_bucket_index_0_lcssa4_i_reg_190 assign process. -- agg_result_bucket_index_0_lcssa4_i_reg_190_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st20_fsm_19 = ap_CS_fsm) and (tmp_17_1_i_reg_626 = ap_const_lv1_0))) then agg_result_bucket_index_0_lcssa4_i_reg_190 <= ap_const_lv1_1; elsif (((ap_ST_st19_fsm_18 = ap_CS_fsm) and not((sample_rsp_empty_n = ap_const_logic_0)) and (tmp_17_i_reg_612 = ap_const_lv1_0))) then agg_result_bucket_index_0_lcssa4_i_reg_190 <= ap_const_lv1_0; end if; end if; end process; -- any_reg_319 assign process. -- any_reg_319_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then any_reg_319 <= ap_const_lv1_0; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then any_reg_319 <= ap_const_lv1_1; end if; end if; end process; -- bus_assign_reg_178 assign process. -- bus_assign_reg_178_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st20_fsm_19 = ap_CS_fsm) and (tmp_17_1_i_reg_626 = ap_const_lv1_0))) then bus_assign_reg_178 <= next_buckets_1_reg_158; elsif (((ap_ST_st19_fsm_18 = ap_CS_fsm) and not((sample_rsp_empty_n = ap_const_logic_0)) and (tmp_17_i_reg_612 = ap_const_lv1_0))) then bus_assign_reg_178 <= next_buckets_0_reg_168; end if; end if; end process; -- i_reg_134 assign process. -- i_reg_134_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st25_fsm_24 = ap_CS_fsm) and not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and not((ap_const_lv1_0 = any_phi_fu_324_p4)))) then i_reg_134 <= i_1_reg_601; elsif ((ap_ST_st4_fsm_3 = ap_CS_fsm)) then i_reg_134 <= ap_const_lv16_0; end if; end if; end process; -- j_bit1_reg_299 assign process. -- j_bit1_reg_299_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then j_bit1_reg_299 <= j_bit1_ph_cast_fu_440_p1; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then j_bit1_reg_299 <= j_bit_reg_701; end if; end if; end process; -- j_bucket1_ph_reg_203 assign process. -- j_bucket1_ph_reg_203_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st23_fsm_22 = ap_CS_fsm)) then j_bucket1_ph_reg_203 <= bus_assign_reg_178; elsif (((ap_ST_st20_fsm_19 = ap_CS_fsm) and not((tmp_17_1_i_reg_626 = ap_const_lv1_0)))) then j_bucket1_ph_reg_203 <= ap_const_lv32_0; end if; end if; end process; -- j_bucket1_reg_278 assign process. -- j_bucket1_reg_278_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then j_bucket1_reg_278 <= j_bucket1_ph_reg_203; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then j_bucket1_reg_278 <= j_bucket_reg_711; end if; end if; end process; -- j_bucket_index1_ph_reg_216 assign process. -- j_bucket_index1_ph_reg_216_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st23_fsm_22 = ap_CS_fsm)) then j_bucket_index1_ph_reg_216 <= agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_432_p1; elsif (((ap_ST_st20_fsm_19 = ap_CS_fsm) and not((tmp_17_1_i_reg_626 = ap_const_lv1_0)))) then j_bucket_index1_ph_reg_216 <= ap_const_lv2_2; end if; end if; end process; -- j_bucket_index1_reg_289 assign process. -- j_bucket_index1_reg_289_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then j_bucket_index1_reg_289 <= j_bucket_index1_ph_cast_fu_436_p1; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then j_bucket_index1_reg_289 <= j_bucket_index_reg_706; end if; end if; end process; -- j_end_ph_reg_238 assign process. -- j_end_ph_reg_238_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st23_fsm_22 = ap_CS_fsm)) then j_end_ph_reg_238 <= ap_const_lv1_0; elsif (((ap_ST_st20_fsm_19 = ap_CS_fsm) and not((tmp_17_1_i_reg_626 = ap_const_lv1_0)))) then j_end_ph_reg_238 <= ap_const_lv1_1; end if; end if; end process; -- j_end_reg_309 assign process. -- j_end_reg_309_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then j_end_reg_309 <= j_end_ph_reg_238; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then j_end_reg_309 <= p_s_reg_716; end if; end if; end process; -- next_buckets_0_reg_168 assign process. -- next_buckets_0_reg_168_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st25_fsm_24 = ap_CS_fsm) and not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and not((ap_const_lv1_0 = any_phi_fu_324_p4)))) then next_buckets_0_reg_168 <= tmp_buckets_0_3_reg_265; elsif ((ap_ST_st4_fsm_3 = ap_CS_fsm)) then next_buckets_0_reg_168 <= current_buckets_0_reg_577; end if; end if; end process; -- next_buckets_1_reg_158 assign process. -- next_buckets_1_reg_158_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st25_fsm_24 = ap_CS_fsm) and not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and not((ap_const_lv1_0 = any_phi_fu_324_p4)))) then next_buckets_1_reg_158 <= tmp_buckets_1_3_reg_252; elsif ((ap_ST_st4_fsm_3 = ap_CS_fsm)) then next_buckets_1_reg_158 <= current_buckets_1_reg_582; end if; end if; end process; -- p_01_rec_reg_146 assign process. -- p_01_rec_reg_146_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st25_fsm_24 = ap_CS_fsm) and not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and not((ap_const_lv1_0 = any_phi_fu_324_p4)))) then p_01_rec_reg_146 <= p_rec_reg_616; elsif ((ap_ST_st4_fsm_3 = ap_CS_fsm)) then p_01_rec_reg_146 <= ap_const_lv32_0; end if; end if; end process; -- p_0_reg_332 assign process. -- p_0_reg_332_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st25_fsm_24 = ap_CS_fsm) and not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and (ap_const_lv1_0 = any_phi_fu_324_p4))) then p_0_reg_332 <= ap_const_lv1_0; elsif ((ap_ST_st44_fsm_43 = ap_CS_fsm)) then p_0_reg_332 <= tmp_2_reg_756; end if; end if; end process; -- tmp_buckets_0_3_reg_265 assign process. -- tmp_buckets_0_3_reg_265_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then tmp_buckets_0_3_reg_265 <= ap_const_lv32_0; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then tmp_buckets_0_3_reg_265 <= next_buckets_0_1_reg_721; end if; end if; end process; -- tmp_buckets_1_3_reg_252 assign process. -- tmp_buckets_1_3_reg_252_assign_proc : process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then tmp_buckets_1_3_reg_252 <= ap_const_lv32_0; elsif ((ap_ST_st38_fsm_37 = ap_CS_fsm)) then tmp_buckets_1_3_reg_252 <= next_buckets_1_1_fu_544_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st41_fsm_40 = ap_CS_fsm)) then current_buckets_0_1_reg_741 <= current_buckets_0_1_fu_558_p2; current_buckets_1_1_reg_746 <= current_buckets_1_1_fu_563_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st3_fsm_2 = ap_CS_fsm)) then current_buckets_0_reg_577 <= grp_nfa_get_initials_fu_356_ap_return_0; current_buckets_1_reg_582 <= grp_nfa_get_initials_fu_356_ap_return_1; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st8_fsm_7 = ap_CS_fsm)) then i_1_reg_601 <= grp_fu_402_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st23_fsm_22 = ap_CS_fsm)) then j_bit1_ph_reg_227 <= r_bit_reg_630; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st36_fsm_35 = ap_CS_fsm) and not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0)))) then j_bit_reg_701 <= grp_bitset_next_fu_344_ap_return_0; j_bucket_index_reg_706 <= grp_bitset_next_fu_344_ap_return_1; j_bucket_reg_711 <= grp_bitset_next_fu_344_ap_return_2; p_s_reg_716 <= grp_bitset_next_fu_344_ap_return_3; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0)) and (ap_ST_st37_fsm_36 = ap_CS_fsm))) then next_buckets_0_1_reg_721 <= next_buckets_0_1_fu_538_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st34_fsm_33 = ap_CS_fsm)) then offset_i_reg_685 <= grp_fu_482_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st19_fsm_18 = ap_CS_fsm) and not((sample_rsp_empty_n = ap_const_logic_0)))) then p_rec_reg_616 <= grp_fu_414_p2; sym_reg_621 <= sample_datain; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st22_fsm_21 = ap_CS_fsm)) then r_bit_reg_630 <= grp_p_bsf32_hw_fu_368_ap_return; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((((ap_ST_st36_fsm_35 = ap_CS_fsm) and not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0))) or (not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0)) and (ap_ST_st37_fsm_36 = ap_CS_fsm)))) then reg_374 <= nfa_forward_buckets_datain; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st12_fsm_11 = ap_CS_fsm)) then sample_addr_1_reg_606 <= grp_fu_392_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st26_fsm_25 = ap_CS_fsm)) then state_reg_665 <= grp_fu_463_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if (((ap_ST_st19_fsm_18 = ap_CS_fsm) and not((sample_rsp_empty_n = ap_const_logic_0)) and not((tmp_17_i_reg_612 = ap_const_lv1_0)))) then tmp_17_1_i_reg_626 <= tmp_17_1_i_fu_426_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st18_fsm_17 = ap_CS_fsm)) then tmp_17_i_reg_612 <= tmp_17_i_fu_420_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st42_fsm_41 = ap_CS_fsm)) then tmp_1_reg_751 <= tmp_1_fu_568_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st43_fsm_42 = ap_CS_fsm)) then tmp_2_reg_756 <= tmp_2_fu_572_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st30_fsm_29 = ap_CS_fsm)) then tmp_6_i_reg_680 <= grp_fu_476_p2; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st24_fsm_23 = ap_CS_fsm)) then tmp_7_i_cast_reg_650(0) <= tmp_7_i_cast_fu_444_p1(0); tmp_7_i_cast_reg_650(1) <= tmp_7_i_cast_fu_444_p1(1); tmp_7_i_cast_reg_650(2) <= tmp_7_i_cast_fu_444_p1(2); tmp_7_i_cast_reg_650(3) <= tmp_7_i_cast_fu_444_p1(3); tmp_7_i_cast_reg_650(4) <= tmp_7_i_cast_fu_444_p1(4); tmp_7_i_cast_reg_650(5) <= tmp_7_i_cast_fu_444_p1(5); tmp_7_i_cast_reg_650(6) <= tmp_7_i_cast_fu_444_p1(6); tmp_7_i_cast_reg_650(7) <= tmp_7_i_cast_fu_444_p1(7); end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st40_fsm_39 = ap_CS_fsm)) then tmp_buckets_0_reg_731 <= grp_nfa_get_finals_fu_362_ap_return_0; tmp_buckets_1_reg_736 <= grp_nfa_get_finals_fu_362_ap_return_1; end if; end if; end process; -- assign process. -- process (ap_clk) begin if (ap_clk'event and ap_clk = '1') then if ((ap_ST_st5_fsm_4 = ap_CS_fsm)) then tmp_s_reg_597 <= tmp_s_fu_397_p2; end if; end if; end process; tmp_7_i_cast_reg_650(13 downto 8) <= "000000"; -- the next state (ap_NS_fsm) of the state machine. -- ap_NS_fsm_assign_proc : process (ap_start , ap_CS_fsm , nfa_forward_buckets_rsp_empty_n , sample_rsp_empty_n , tmp_s_reg_597 , tmp_17_i_reg_612 , tmp_17_1_i_reg_626 , j_end_phi_fu_312_p4 , any_phi_fu_324_p4) begin case ap_CS_fsm is when ap_ST_st1_fsm_0 => if (not((ap_start = ap_const_logic_0))) then ap_NS_fsm <= ap_ST_st2_fsm_1; else ap_NS_fsm <= ap_ST_st1_fsm_0; end if; when ap_ST_st2_fsm_1 => ap_NS_fsm <= ap_ST_st3_fsm_2; when ap_ST_st3_fsm_2 => ap_NS_fsm <= ap_ST_st4_fsm_3; when ap_ST_st4_fsm_3 => ap_NS_fsm <= ap_ST_st5_fsm_4; when ap_ST_st5_fsm_4 => ap_NS_fsm <= ap_ST_st6_fsm_5; when ap_ST_st6_fsm_5 => ap_NS_fsm <= ap_ST_st7_fsm_6; when ap_ST_st7_fsm_6 => ap_NS_fsm <= ap_ST_st8_fsm_7; when ap_ST_st8_fsm_7 => ap_NS_fsm <= ap_ST_st9_fsm_8; when ap_ST_st9_fsm_8 => ap_NS_fsm <= ap_ST_st10_fsm_9; when ap_ST_st10_fsm_9 => ap_NS_fsm <= ap_ST_st11_fsm_10; when ap_ST_st11_fsm_10 => ap_NS_fsm <= ap_ST_st12_fsm_11; when ap_ST_st12_fsm_11 => if ((tmp_s_reg_597 = ap_const_lv1_0)) then ap_NS_fsm <= ap_ST_st39_fsm_38; else ap_NS_fsm <= ap_ST_st13_fsm_12; end if; when ap_ST_st13_fsm_12 => ap_NS_fsm <= ap_ST_st14_fsm_13; when ap_ST_st14_fsm_13 => ap_NS_fsm <= ap_ST_st15_fsm_14; when ap_ST_st15_fsm_14 => ap_NS_fsm <= ap_ST_st16_fsm_15; when ap_ST_st16_fsm_15 => ap_NS_fsm <= ap_ST_st17_fsm_16; when ap_ST_st17_fsm_16 => ap_NS_fsm <= ap_ST_st18_fsm_17; when ap_ST_st18_fsm_17 => ap_NS_fsm <= ap_ST_st19_fsm_18; when ap_ST_st19_fsm_18 => if ((not((sample_rsp_empty_n = ap_const_logic_0)) and (tmp_17_i_reg_612 = ap_const_lv1_0))) then ap_NS_fsm <= ap_ST_st21_fsm_20; elsif ((not((sample_rsp_empty_n = ap_const_logic_0)) and not((tmp_17_i_reg_612 = ap_const_lv1_0)))) then ap_NS_fsm <= ap_ST_st20_fsm_19; else ap_NS_fsm <= ap_ST_st19_fsm_18; end if; when ap_ST_st20_fsm_19 => if (not((tmp_17_1_i_reg_626 = ap_const_lv1_0))) then ap_NS_fsm <= ap_ST_st24_fsm_23; else ap_NS_fsm <= ap_ST_st21_fsm_20; end if; when ap_ST_st21_fsm_20 => ap_NS_fsm <= ap_ST_st22_fsm_21; when ap_ST_st22_fsm_21 => ap_NS_fsm <= ap_ST_st23_fsm_22; when ap_ST_st23_fsm_22 => ap_NS_fsm <= ap_ST_st24_fsm_23; when ap_ST_st24_fsm_23 => ap_NS_fsm <= ap_ST_st25_fsm_24; when ap_ST_st25_fsm_24 => if ((not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and not((ap_const_lv1_0 = any_phi_fu_324_p4)))) then ap_NS_fsm <= ap_ST_st5_fsm_4; elsif ((not((ap_const_lv1_0 = j_end_phi_fu_312_p4)) and (ap_const_lv1_0 = any_phi_fu_324_p4))) then ap_NS_fsm <= ap_ST_st45_fsm_44; else ap_NS_fsm <= ap_ST_st26_fsm_25; end if; when ap_ST_st26_fsm_25 => ap_NS_fsm <= ap_ST_st27_fsm_26; when ap_ST_st27_fsm_26 => ap_NS_fsm <= ap_ST_st28_fsm_27; when ap_ST_st28_fsm_27 => ap_NS_fsm <= ap_ST_st29_fsm_28; when ap_ST_st29_fsm_28 => ap_NS_fsm <= ap_ST_st30_fsm_29; when ap_ST_st30_fsm_29 => ap_NS_fsm <= ap_ST_st31_fsm_30; when ap_ST_st31_fsm_30 => ap_NS_fsm <= ap_ST_st32_fsm_31; when ap_ST_st32_fsm_31 => ap_NS_fsm <= ap_ST_st33_fsm_32; when ap_ST_st33_fsm_32 => ap_NS_fsm <= ap_ST_st34_fsm_33; when ap_ST_st34_fsm_33 => ap_NS_fsm <= ap_ST_st35_fsm_34; when ap_ST_st35_fsm_34 => ap_NS_fsm <= ap_ST_st36_fsm_35; when ap_ST_st36_fsm_35 => if (not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0))) then ap_NS_fsm <= ap_ST_st37_fsm_36; else ap_NS_fsm <= ap_ST_st36_fsm_35; end if; when ap_ST_st37_fsm_36 => if (not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0))) then ap_NS_fsm <= ap_ST_st38_fsm_37; else ap_NS_fsm <= ap_ST_st37_fsm_36; end if; when ap_ST_st38_fsm_37 => ap_NS_fsm <= ap_ST_st25_fsm_24; when ap_ST_st39_fsm_38 => ap_NS_fsm <= ap_ST_st40_fsm_39; when ap_ST_st40_fsm_39 => ap_NS_fsm <= ap_ST_st41_fsm_40; when ap_ST_st41_fsm_40 => ap_NS_fsm <= ap_ST_st42_fsm_41; when ap_ST_st42_fsm_41 => ap_NS_fsm <= ap_ST_st43_fsm_42; when ap_ST_st43_fsm_42 => ap_NS_fsm <= ap_ST_st44_fsm_43; when ap_ST_st44_fsm_43 => ap_NS_fsm <= ap_ST_st45_fsm_44; when ap_ST_st45_fsm_44 => ap_NS_fsm <= ap_ST_st1_fsm_0; when others => ap_NS_fsm <= "XXXXXX"; end case; end process; agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_432_p1 <= std_logic_vector(resize(unsigned(agg_result_bucket_index_0_lcssa4_i_reg_190),2)); any_phi_fu_324_p4 <= any_reg_319; -- ap_done assign process. -- ap_done_assign_proc : process(ap_start, ap_CS_fsm) begin if (((not((ap_const_logic_1 = ap_start)) and (ap_ST_st1_fsm_0 = ap_CS_fsm)) or (ap_ST_st45_fsm_44 = ap_CS_fsm))) then ap_done <= ap_const_logic_1; else ap_done <= ap_const_logic_0; end if; end process; -- ap_idle assign process. -- ap_idle_assign_proc : process(ap_start, ap_CS_fsm) begin if ((not((ap_const_logic_1 = ap_start)) and (ap_ST_st1_fsm_0 = ap_CS_fsm))) then ap_idle <= ap_const_logic_1; else ap_idle <= ap_const_logic_0; end if; end process; -- ap_ready assign process. -- ap_ready_assign_proc : process(ap_CS_fsm) begin if ((ap_ST_st45_fsm_44 = ap_CS_fsm)) then ap_ready <= ap_const_logic_1; else ap_ready <= ap_const_logic_0; end if; end process; -- ap_return assign process. -- ap_return_assign_proc : process(ap_CS_fsm, p_0_reg_332, ap_return_preg) begin if ((ap_ST_st45_fsm_44 = ap_CS_fsm)) then ap_return <= p_0_reg_332; else ap_return <= ap_return_preg; end if; end process; current_buckets_0_1_fu_558_p2 <= (next_buckets_0_reg_168 and tmp_buckets_0_reg_731); current_buckets_1_1_fu_563_p2 <= (next_buckets_1_reg_158 and tmp_buckets_1_reg_736); -- grp_bitset_next_fu_344_ap_ce assign process. -- grp_bitset_next_fu_344_ap_ce_assign_proc : process(ap_CS_fsm, nfa_forward_buckets_rsp_empty_n, j_end_phi_fu_312_p4) begin if ((((ap_ST_st36_fsm_35 = ap_CS_fsm) and not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0))) or ((ap_ST_st25_fsm_24 = ap_CS_fsm) and (ap_const_lv1_0 = j_end_phi_fu_312_p4)) or (ap_ST_st26_fsm_25 = ap_CS_fsm) or (ap_ST_st27_fsm_26 = ap_CS_fsm) or (ap_ST_st30_fsm_29 = ap_CS_fsm) or (ap_ST_st34_fsm_33 = ap_CS_fsm) or (ap_ST_st35_fsm_34 = ap_CS_fsm) or (ap_ST_st28_fsm_27 = ap_CS_fsm) or (ap_ST_st29_fsm_28 = ap_CS_fsm) or (ap_ST_st31_fsm_30 = ap_CS_fsm) or (ap_ST_st32_fsm_31 = ap_CS_fsm) or (ap_ST_st33_fsm_32 = ap_CS_fsm))) then grp_bitset_next_fu_344_ap_ce <= ap_const_logic_1; else grp_bitset_next_fu_344_ap_ce <= ap_const_logic_0; end if; end process; grp_bitset_next_fu_344_p_read <= next_buckets_1_reg_158; grp_bitset_next_fu_344_r_bit <= j_bit1_reg_299; grp_bitset_next_fu_344_r_bucket <= j_bucket1_reg_278; grp_bitset_next_fu_344_r_bucket_index <= j_bucket_index1_reg_289; grp_fu_392_ce <= ap_const_logic_1; grp_fu_392_p0 <= p_01_rec_reg_146; grp_fu_392_p1 <= empty; grp_fu_402_ce <= ap_const_logic_1; grp_fu_402_p0 <= i_reg_134; grp_fu_402_p1 <= ap_const_lv16_1; -- grp_fu_414_ce assign process. -- grp_fu_414_ce_assign_proc : process(ap_CS_fsm, sample_rsp_empty_n, tmp_s_reg_597) begin if (((ap_ST_st18_fsm_17 = ap_CS_fsm) or ((ap_ST_st19_fsm_18 = ap_CS_fsm) and not((sample_rsp_empty_n = ap_const_logic_0))) or ((ap_ST_st12_fsm_11 = ap_CS_fsm) and not((tmp_s_reg_597 = ap_const_lv1_0))) or (ap_ST_st13_fsm_12 = ap_CS_fsm) or (ap_ST_st14_fsm_13 = ap_CS_fsm) or (ap_ST_st15_fsm_14 = ap_CS_fsm) or (ap_ST_st16_fsm_15 = ap_CS_fsm) or (ap_ST_st17_fsm_16 = ap_CS_fsm))) then grp_fu_414_ce <= ap_const_logic_1; else grp_fu_414_ce <= ap_const_logic_0; end if; end process; grp_fu_414_p0 <= p_01_rec_reg_146; grp_fu_414_p1 <= ap_const_lv32_1; grp_fu_463_ce <= ap_const_logic_1; grp_fu_463_p0 <= (tmp_5_fu_447_p1 & ap_const_lv5_0); grp_fu_463_p1 <= j_bit1_reg_299(6 - 1 downto 0); grp_fu_476_ce <= ap_const_logic_1; grp_fu_476_p0 <= grp_fu_476_p00(8 - 1 downto 0); grp_fu_476_p00 <= std_logic_vector(resize(unsigned(nfa_symbols),14)); grp_fu_476_p1 <= grp_fu_476_p10(6 - 1 downto 0); grp_fu_476_p10 <= std_logic_vector(resize(unsigned(state_reg_665),14)); grp_fu_482_ce <= ap_const_logic_1; grp_fu_482_p0 <= tmp_6_i_reg_680; grp_fu_482_p1 <= tmp_7_i_cast_reg_650; grp_nfa_get_finals_fu_362_ap_ce <= ap_const_logic_1; grp_nfa_get_finals_fu_362_ap_start <= grp_nfa_get_finals_fu_362_ap_start_ap_start_reg; grp_nfa_get_finals_fu_362_nfa_finals_buckets_datain <= nfa_finals_buckets_datain; grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_full_n <= nfa_finals_buckets_req_full_n; grp_nfa_get_finals_fu_362_nfa_finals_buckets_rsp_empty_n <= nfa_finals_buckets_rsp_empty_n; grp_nfa_get_initials_fu_356_ap_ce <= ap_const_logic_1; -- grp_nfa_get_initials_fu_356_ap_start assign process. -- grp_nfa_get_initials_fu_356_ap_start_assign_proc : process(ap_start, ap_CS_fsm) begin if (((ap_ST_st1_fsm_0 = ap_CS_fsm) and not((ap_start = ap_const_logic_0)))) then grp_nfa_get_initials_fu_356_ap_start <= ap_const_logic_1; else grp_nfa_get_initials_fu_356_ap_start <= ap_const_logic_0; end if; end process; grp_nfa_get_initials_fu_356_nfa_initials_buckets_datain <= nfa_initials_buckets_datain; grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_full_n <= nfa_initials_buckets_req_full_n; grp_nfa_get_initials_fu_356_nfa_initials_buckets_rsp_empty_n <= nfa_initials_buckets_rsp_empty_n; -- grp_p_bsf32_hw_fu_368_ap_ce assign process. -- grp_p_bsf32_hw_fu_368_ap_ce_assign_proc : process(ap_CS_fsm) begin if (((ap_ST_st22_fsm_21 = ap_CS_fsm) or (ap_ST_st21_fsm_20 = ap_CS_fsm))) then grp_p_bsf32_hw_fu_368_ap_ce <= ap_const_logic_1; else grp_p_bsf32_hw_fu_368_ap_ce <= ap_const_logic_0; end if; end process; grp_p_bsf32_hw_fu_368_bus_r <= bus_assign_reg_178; j_bit1_ph_cast_fu_440_p1 <= std_logic_vector(resize(unsigned(j_bit1_ph_reg_227),8)); j_bucket_index1_ph_cast_fu_436_p1 <= std_logic_vector(resize(unsigned(j_bucket_index1_ph_reg_216),8)); j_end_phi_fu_312_p4 <= j_end_reg_309; next_buckets_0_1_fu_538_p2 <= (tmp_buckets_0_3_reg_265 or reg_374); next_buckets_1_1_fu_544_p2 <= (tmp_buckets_1_3_reg_252 or reg_374); nfa_finals_buckets_address <= grp_nfa_get_finals_fu_362_nfa_finals_buckets_address; nfa_finals_buckets_dataout <= grp_nfa_get_finals_fu_362_nfa_finals_buckets_dataout; nfa_finals_buckets_req_din <= grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_din; nfa_finals_buckets_req_write <= grp_nfa_get_finals_fu_362_nfa_finals_buckets_req_write; nfa_finals_buckets_rsp_read <= grp_nfa_get_finals_fu_362_nfa_finals_buckets_rsp_read; nfa_finals_buckets_size <= grp_nfa_get_finals_fu_362_nfa_finals_buckets_size; -- nfa_forward_buckets_address assign process. -- nfa_forward_buckets_address_assign_proc : process(ap_CS_fsm, nfa_forward_buckets_rsp_empty_n, tmp_4_i_cast_fu_493_p1, tmp_8_i_cast_fu_511_p1) begin if (((ap_ST_st36_fsm_35 = ap_CS_fsm) and not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0)))) then nfa_forward_buckets_address <= tmp_8_i_cast_fu_511_p1; elsif ((ap_ST_st35_fsm_34 = ap_CS_fsm)) then nfa_forward_buckets_address <= tmp_4_i_cast_fu_493_p1; else nfa_forward_buckets_address <= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; end if; end process; nfa_forward_buckets_dataout <= ap_const_lv32_0; nfa_forward_buckets_req_din <= ap_const_logic_0; -- nfa_forward_buckets_req_write assign process. -- nfa_forward_buckets_req_write_assign_proc : process(ap_CS_fsm, nfa_forward_buckets_rsp_empty_n) begin if ((((ap_ST_st36_fsm_35 = ap_CS_fsm) and not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0))) or (ap_ST_st35_fsm_34 = ap_CS_fsm))) then nfa_forward_buckets_req_write <= ap_const_logic_1; else nfa_forward_buckets_req_write <= ap_const_logic_0; end if; end process; -- nfa_forward_buckets_rsp_read assign process. -- nfa_forward_buckets_rsp_read_assign_proc : process(ap_CS_fsm, nfa_forward_buckets_rsp_empty_n) begin if ((((ap_ST_st36_fsm_35 = ap_CS_fsm) and not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0))) or (not((nfa_forward_buckets_rsp_empty_n = ap_const_logic_0)) and (ap_ST_st37_fsm_36 = ap_CS_fsm)))) then nfa_forward_buckets_rsp_read <= ap_const_logic_1; else nfa_forward_buckets_rsp_read <= ap_const_logic_0; end if; end process; nfa_forward_buckets_size <= ap_const_lv32_1; nfa_initials_buckets_address <= grp_nfa_get_initials_fu_356_nfa_initials_buckets_address; nfa_initials_buckets_dataout <= grp_nfa_get_initials_fu_356_nfa_initials_buckets_dataout; nfa_initials_buckets_req_din <= grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_din; nfa_initials_buckets_req_write <= grp_nfa_get_initials_fu_356_nfa_initials_buckets_req_write; nfa_initials_buckets_rsp_read <= grp_nfa_get_initials_fu_356_nfa_initials_buckets_rsp_read; nfa_initials_buckets_size <= grp_nfa_get_initials_fu_356_nfa_initials_buckets_size; sample_address <= sample_addr_1_reg_606; sample_dataout <= ap_const_lv8_0; sample_req_din <= ap_const_logic_0; -- sample_req_write assign process. -- sample_req_write_assign_proc : process(ap_CS_fsm) begin if ((ap_ST_st18_fsm_17 = ap_CS_fsm)) then sample_req_write <= ap_const_logic_1; else sample_req_write <= ap_const_logic_0; end if; end process; -- sample_rsp_read assign process. -- sample_rsp_read_assign_proc : process(ap_CS_fsm, sample_rsp_empty_n) begin if (((ap_ST_st19_fsm_18 = ap_CS_fsm) and not((sample_rsp_empty_n = ap_const_logic_0)))) then sample_rsp_read <= ap_const_logic_1; else sample_rsp_read <= ap_const_logic_0; end if; end process; sample_size <= ap_const_lv32_1; tmp_17_1_i_fu_426_p2 <= "1" when (next_buckets_1_reg_158 = ap_const_lv32_0) else "0"; tmp_17_i_fu_420_p2 <= "1" when (next_buckets_0_reg_168 = ap_const_lv32_0) else "0"; tmp_1_fu_568_p2 <= (current_buckets_1_1_reg_746 or current_buckets_0_1_reg_741); tmp_2_fu_572_p2 <= "0" when (tmp_1_reg_751 = ap_const_lv32_0) else "1"; tmp_4_i_cast_fu_493_p1 <= std_logic_vector(resize(unsigned(tmp_4_i_fu_486_p3),32)); tmp_4_i_fu_486_p3 <= (offset_i_reg_685 & ap_const_lv1_0); tmp_5_fu_447_p1 <= j_bucket_index1_reg_289(1 - 1 downto 0); tmp_7_i_cast_fu_444_p1 <= std_logic_vector(resize(unsigned(sym_reg_621),14)); tmp_8_i_cast_fu_511_p1 <= std_logic_vector(resize(unsigned(tmp_8_i_fu_504_p3),32)); tmp_8_i_fu_504_p3 <= (offset_i_reg_685 & ap_const_lv1_1); tmp_s_fu_397_p2 <= "1" when (unsigned(i_reg_134) < unsigned(length_r)) else "0"; end behav;
-- ----------------------------------------------------------------------- -- -- Syntiac VHDL support files. -- -- ----------------------------------------------------------------------- -- Copyright 2005-2017 by Peter Wendrich ([email protected]) -- http://www.syntiac.com -- -- This source file is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This source file 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, see <http://www.gnu.org/licenses/>. -- -- ----------------------------------------------------------------------- -- -- IQ_Mixer for PAL and NTSC video encoding. -- Requires clk to be exactly 16 times the color-burst frequency. -- PAL needs some additional logic to rotate phase on each line. -- -- This design has a 3 clock cycle latency from inputs to video output. -- -- -- ----------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.numeric_std.all; -- ----------------------------------------------------------------------- entity iq_mixer is generic ( black_level : unsigned(7 downto 0); sync_level : unsigned(7 downto 0) := "00000000" ); port ( clk : in std_logic; phase_i : in unsigned(3 downto 0); phase_q : in unsigned(3 downto 0); in_y : in unsigned(7 downto 0); in_i : in signed(7 downto 0); in_q : in signed(7 downto 0); black : in std_logic; sync : in std_logic; video : out unsigned(7 downto 0) ); end entity; -- ----------------------------------------------------------------------- architecture rtl of iq_mixer is type sintable_t is array(integer range 0 to 15) of signed(7 downto 0); constant sintable : sintable_t := ( X"00", X"31", X"5A", X"75", X"7F", X"75", X"5A", X"31", X"00", X"CF", X"A6", X"8B", X"81", X"8B", X"A6", X"CF"); signal iq_i_sin : signed(15 downto 0) := (others => '0'); signal iq_q_sin : signed(15 downto 0) := (others => '0'); signal video_tmp : signed(9 downto 0) := (others => '0'); signal black_dly : std_logic := '0'; signal sync_dly : std_logic := '0'; begin process(clk) begin if rising_edge(clk) then iq_i_sin <= sintable(to_integer(phase_i)) * in_i; iq_q_sin <= sintable(to_integer(phase_q)) * in_q; black_dly <= black; sync_dly <= sync; end if; end process; process(clk) begin if rising_edge(clk) then video_tmp <= signed("00" & in_y) + iq_i_sin(15 downto 6) + iq_q_sin(15 downto 6); if black_dly = '1' then video_tmp <= signed("00" & black_level); end if; if sync_dly = '1' then video_tmp <= signed("00" & sync_level); end if; end if; end process; process(clk) begin if rising_edge(clk) then if video_tmp < 0 then -- Underflow color signal video <= "00000000"; elsif video_tmp > "0011111111" then -- Overflow color signal video <= "11111111"; else video <= unsigned(video_tmp(7 downto 0)); end if; end if; end process; end architecture;
entity record10 is end entity; architecture test of record10 is type rec1 is record x, y : integer; end record; type rec2 is record x : integer; y : bit_vector(1 to 3); end record; begin process is variable r1 : rec1; variable r2 : rec2; variable a, b : integer; variable c : bit_vector(1 to 3); begin a := 1; b := 2; r1 := rec1'(x => a, y => b); assert r1.x = 1; assert r1.y = 2; r2 := rec2'(x => a, y => c); assert r2.x = 1; assert r2.y = "000"; wait; end process; end architecture;
entity record10 is end entity; architecture test of record10 is type rec1 is record x, y : integer; end record; type rec2 is record x : integer; y : bit_vector(1 to 3); end record; begin process is variable r1 : rec1; variable r2 : rec2; variable a, b : integer; variable c : bit_vector(1 to 3); begin a := 1; b := 2; r1 := rec1'(x => a, y => b); assert r1.x = 1; assert r1.y = 2; r2 := rec2'(x => a, y => c); assert r2.x = 1; assert r2.y = "000"; wait; end process; end architecture;
entity record10 is end entity; architecture test of record10 is type rec1 is record x, y : integer; end record; type rec2 is record x : integer; y : bit_vector(1 to 3); end record; begin process is variable r1 : rec1; variable r2 : rec2; variable a, b : integer; variable c : bit_vector(1 to 3); begin a := 1; b := 2; r1 := rec1'(x => a, y => b); assert r1.x = 1; assert r1.y = 2; r2 := rec2'(x => a, y => c); assert r2.x = 1; assert r2.y = "000"; wait; end process; end architecture;
entity record10 is end entity; architecture test of record10 is type rec1 is record x, y : integer; end record; type rec2 is record x : integer; y : bit_vector(1 to 3); end record; begin process is variable r1 : rec1; variable r2 : rec2; variable a, b : integer; variable c : bit_vector(1 to 3); begin a := 1; b := 2; r1 := rec1'(x => a, y => b); assert r1.x = 1; assert r1.y = 2; r2 := rec2'(x => a, y => c); assert r2.x = 1; assert r2.y = "000"; wait; end process; end architecture;
entity record10 is end entity; architecture test of record10 is type rec1 is record x, y : integer; end record; type rec2 is record x : integer; y : bit_vector(1 to 3); end record; begin process is variable r1 : rec1; variable r2 : rec2; variable a, b : integer; variable c : bit_vector(1 to 3); begin a := 1; b := 2; r1 := rec1'(x => a, y => b); assert r1.x = 1; assert r1.y = 2; r2 := rec2'(x => a, y => c); assert r2.x = 1; assert r2.y = "000"; wait; end process; end architecture;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_17_fg_17_16.vhd,v 1.2 2001-10-26 16:29:37 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package body «element_type_simple_name»_ordered_collection_adt is function new_ordered_collection return ordered_collection is variable result : ordered_collection := new ordered_collection_object; begin result.next_element := result; result.prev_element := result; return result; end function new_ordered_collection; procedure insert ( c : inout ordered_collection; e : in element_type ) is variable current_element : ordered_collection := c.next_element; variable new_element : ordered_collection; begin while current_element /= c and key_of(current_element.element) < key_of(e) loop current_element := current_element.next_element; end loop; -- insert new element before current_element new_element := new ordered_collection_object'( element => e, next_element => current_element, prev_element => current_element.prev_element ); new_element.next_element.prev_element := new_element; new_element.prev_element.next_element := new_element; end procedure insert; procedure get_element ( variable p : in position; e : out element_type ) is begin e := p.current_element.element; end procedure get_element; procedure test_null_position ( variable p : in position; is_null : out boolean ) is begin is_null := p.current_element = p.the_collection; end procedure test_null_position; procedure search ( variable c : in ordered_collection; k : in key_type; p : out position ) is variable current_element : ordered_collection := c.next_element; begin while current_element /= c and key_of(current_element.element) < k loop current_element := current_element.next_element; end loop; if current_element = c or k < key_of(current_element.element) then p := new position_object'(c, c); -- null position else p := new position_object'(c, current_element); end if; end procedure search; procedure find_first ( variable c : in ordered_collection; p : out position ) is begin p := new position_object'(c, c.next_element); end procedure find_first; procedure advance ( p : inout position ) is variable is_null : boolean; begin test_null_position(p, is_null); if not is_null then p.current_element := p.current_element.next_element; end if; end procedure advance; procedure delete ( p : inout position ) is variable is_null : boolean; begin test_null_position(p, is_null); if not is_null then p.current_element.next_element.prev_element := p.current_element.prev_element; p.current_element.prev_element.next_element := p.current_element.next_element; p.current_element := p.current_element.next_element; end if; end procedure delete; end package body «element_type_simple_name»_ordered_collection_adt;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_17_fg_17_16.vhd,v 1.2 2001-10-26 16:29:37 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package body «element_type_simple_name»_ordered_collection_adt is function new_ordered_collection return ordered_collection is variable result : ordered_collection := new ordered_collection_object; begin result.next_element := result; result.prev_element := result; return result; end function new_ordered_collection; procedure insert ( c : inout ordered_collection; e : in element_type ) is variable current_element : ordered_collection := c.next_element; variable new_element : ordered_collection; begin while current_element /= c and key_of(current_element.element) < key_of(e) loop current_element := current_element.next_element; end loop; -- insert new element before current_element new_element := new ordered_collection_object'( element => e, next_element => current_element, prev_element => current_element.prev_element ); new_element.next_element.prev_element := new_element; new_element.prev_element.next_element := new_element; end procedure insert; procedure get_element ( variable p : in position; e : out element_type ) is begin e := p.current_element.element; end procedure get_element; procedure test_null_position ( variable p : in position; is_null : out boolean ) is begin is_null := p.current_element = p.the_collection; end procedure test_null_position; procedure search ( variable c : in ordered_collection; k : in key_type; p : out position ) is variable current_element : ordered_collection := c.next_element; begin while current_element /= c and key_of(current_element.element) < k loop current_element := current_element.next_element; end loop; if current_element = c or k < key_of(current_element.element) then p := new position_object'(c, c); -- null position else p := new position_object'(c, current_element); end if; end procedure search; procedure find_first ( variable c : in ordered_collection; p : out position ) is begin p := new position_object'(c, c.next_element); end procedure find_first; procedure advance ( p : inout position ) is variable is_null : boolean; begin test_null_position(p, is_null); if not is_null then p.current_element := p.current_element.next_element; end if; end procedure advance; procedure delete ( p : inout position ) is variable is_null : boolean; begin test_null_position(p, is_null); if not is_null then p.current_element.next_element.prev_element := p.current_element.prev_element; p.current_element.prev_element.next_element := p.current_element.next_element; p.current_element := p.current_element.next_element; end if; end procedure delete; end package body «element_type_simple_name»_ordered_collection_adt;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_17_fg_17_16.vhd,v 1.2 2001-10-26 16:29:37 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package body «element_type_simple_name»_ordered_collection_adt is function new_ordered_collection return ordered_collection is variable result : ordered_collection := new ordered_collection_object; begin result.next_element := result; result.prev_element := result; return result; end function new_ordered_collection; procedure insert ( c : inout ordered_collection; e : in element_type ) is variable current_element : ordered_collection := c.next_element; variable new_element : ordered_collection; begin while current_element /= c and key_of(current_element.element) < key_of(e) loop current_element := current_element.next_element; end loop; -- insert new element before current_element new_element := new ordered_collection_object'( element => e, next_element => current_element, prev_element => current_element.prev_element ); new_element.next_element.prev_element := new_element; new_element.prev_element.next_element := new_element; end procedure insert; procedure get_element ( variable p : in position; e : out element_type ) is begin e := p.current_element.element; end procedure get_element; procedure test_null_position ( variable p : in position; is_null : out boolean ) is begin is_null := p.current_element = p.the_collection; end procedure test_null_position; procedure search ( variable c : in ordered_collection; k : in key_type; p : out position ) is variable current_element : ordered_collection := c.next_element; begin while current_element /= c and key_of(current_element.element) < k loop current_element := current_element.next_element; end loop; if current_element = c or k < key_of(current_element.element) then p := new position_object'(c, c); -- null position else p := new position_object'(c, current_element); end if; end procedure search; procedure find_first ( variable c : in ordered_collection; p : out position ) is begin p := new position_object'(c, c.next_element); end procedure find_first; procedure advance ( p : inout position ) is variable is_null : boolean; begin test_null_position(p, is_null); if not is_null then p.current_element := p.current_element.next_element; end if; end procedure advance; procedure delete ( p : inout position ) is variable is_null : boolean; begin test_null_position(p, is_null); if not is_null then p.current_element.next_element.prev_element := p.current_element.prev_element; p.current_element.prev_element.next_element := p.current_element.next_element; p.current_element := p.current_element.next_element; end if; end procedure delete; end package body «element_type_simple_name»_ordered_collection_adt;
-- Copyright 1986-2016 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2016.4 (win64) Build 1733598 Wed Dec 14 22:35:39 MST 2016 -- Date : Tue May 30 22:27:54 2017 -- Host : GILAMONSTER running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode synth_stub -- c:/ZyboIP/examples/zed_dual_fusion/zed_dual_fusion.srcs/sources_1/bd/system/ip/system_rgb565_to_rgb888_1_0/system_rgb565_to_rgb888_1_0_stub.vhdl -- Design : system_rgb565_to_rgb888_1_0 -- Purpose : Stub declaration of top-level module interface -- Device : xc7z020clg484-1 -- -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity system_rgb565_to_rgb888_1_0 is Port ( clk : in STD_LOGIC; rgb_565 : in STD_LOGIC_VECTOR ( 15 downto 0 ); rgb_888 : out STD_LOGIC_VECTOR ( 23 downto 0 ) ); end system_rgb565_to_rgb888_1_0; architecture stub of system_rgb565_to_rgb888_1_0 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,rgb_565[15:0],rgb_888[23:0]"; attribute x_core_info : string; attribute x_core_info of stub : architecture is "rgb565_to_rgb888,Vivado 2016.4"; begin end;
------------------------------------------------------------------------------ -- Testbench for reg_en.vhd -- -- Project : -- File : tb_reg_en.vhd -- Author : Rolf Enzler <[email protected]> -- Company : Swiss Federal Institute of Technology (ETH) Zurich -- Created : 2002/06/26 -- Last changed: $LastChangedDate: 2004-10-05 17:10:36 +0200 (Tue, 05 Oct 2004) $ ------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.componentsPkg.all; use work.auxPkg.all; entity tb_Reg_en is end tb_Reg_en; architecture arch of tb_Reg_en is constant WIDTH : integer := 8; -- simulation stuff constant CLK_PERIOD : time := 100 ns; signal ccount : integer := 1; type tbstatusType is (rst, idle, en, dis); signal tbStatus : tbstatusType := idle; -- general control signals signal ClkxC : std_logic := '1'; signal RstxRB : std_logic; -- data signals signal DinxD, DoutxD : std_logic_vector(WIDTH-1 downto 0); -- control/status signals signal EnxE : std_logic; begin -- arch ---------------------------------------------------------------------------- -- device under test ---------------------------------------------------------------------------- dut : Reg_en generic map ( WIDTH => WIDTH) port map ( ClkxC => ClkxC, RstxRB => RstxRB, EnxEI => EnxE, DinxDI => DinxD, DoutxDO => DoutxD); ---------------------------------------------------------------------------- -- stimuli ---------------------------------------------------------------------------- stimuliTb : process begin -- process stimuliTb tbStatus <= rst; EnxE <= '0'; DinxD <= std_logic_vector(to_unsigned(0, WIDTH)); wait until (ClkxC'event and ClkxC = '1' and RstxRB = '0'); wait until (ClkxC'event and ClkxC = '1' and RstxRB = '1'); tbStatus <= idle; wait for CLK_PERIOD*0.25; tbStatus <= en; EnxE <= '1'; DinxD <= std_logic_vector(to_unsigned(1, WIDTH)); wait for CLK_PERIOD; tbStatus <= dis; EnxE <= '0'; DinxD <= std_logic_vector(to_unsigned(2, WIDTH)); wait for CLK_PERIOD; tbStatus <= en; EnxE <= '1'; DinxD <= std_logic_vector(to_unsigned(3, WIDTH)); wait for CLK_PERIOD; tbStatus <= dis; EnxE <= '0'; DinxD <= std_logic_vector(to_unsigned(4, WIDTH)); wait for CLK_PERIOD; tbStatus <= en; EnxE <= '1'; DinxD <= std_logic_vector(to_unsigned(5, WIDTH)); wait for CLK_PERIOD; tbStatus <= dis; EnxE <= '0'; DinxD <= std_logic_vector(to_unsigned(6, WIDTH)); wait for CLK_PERIOD; -- stop simulation wait until (ClkxC'event and ClkxC = '1'); assert false report "stimuli processed; sim. terminated after " & int2str(ccount) & " cycles" severity failure; end process stimuliTb; ---------------------------------------------------------------------------- -- clock and reset generation ---------------------------------------------------------------------------- ClkxC <= not ClkxC after CLK_PERIOD/2; RstxRB <= '0', '1' after CLK_PERIOD*1.25; ---------------------------------------------------------------------------- -- cycle counter ---------------------------------------------------------------------------- cyclecounter : process (ClkxC) begin if (ClkxC'event and ClkxC = '1') then ccount <= ccount + 1; end if; end process cyclecounter; end arch;
-- describe what this circuit does -- -- entity name: g23_Seconds_to_Days -- -- Copyright (C) 2014 cadesalaberry, grahamludwinski -- -- Version 1.0 -- -- Author: -- Charles-Antoine de Salaberry; [email protected], -- Graham Ludwinski; [email protected] -- -- Date: 21/01/2014 library ieee; -- allows use of the std_logic_vector type use ieee.std_logic_1164.all; use IEEE.numeric_std.all; entity g23_Seconds_to_Days is port ( seconds : in unsigned(16 downto 0); day_fraction : out unsigned(39 downto 0) ); end g23_Seconds_to_Days; architecture cascading of g23_Seconds_to_Days is signal adder1: unsigned(18 downto 0); signal adder2: unsigned(22 downto 0); signal adder3: unsigned(25 downto 0); signal adder4: unsigned(26 downto 0); signal adder5: unsigned(27 downto 0); signal adder6: unsigned(29 downto 0); signal adder7: unsigned(33 downto 0); signal adder8: unsigned(38 downto 0); signal adder9: unsigned(39 downto 0); begin adder1 <= seconds + (seconds & "00"); adder2 <= adder1 + (seconds & "000000"); adder3 <= adder2 + (seconds & "000000000"); adder4 <= adder3 + (seconds & "0000000000"); adder5 <= adder4 + (seconds & "00000000000"); adder6 <= adder5 + (seconds & "0000000000000"); adder7 <= adder6 + (seconds & "00000000000000000"); adder8 <= adder7 + (seconds & "0000000000000000000000"); adder9 <= adder8 + (seconds & "00000000000000000000000"); day_fraction <= adder9; end cascading;
-- describe what this circuit does -- -- entity name: g23_Seconds_to_Days -- -- Copyright (C) 2014 cadesalaberry, grahamludwinski -- -- Version 1.0 -- -- Author: -- Charles-Antoine de Salaberry; [email protected], -- Graham Ludwinski; [email protected] -- -- Date: 21/01/2014 library ieee; -- allows use of the std_logic_vector type use ieee.std_logic_1164.all; use IEEE.numeric_std.all; entity g23_Seconds_to_Days is port ( seconds : in unsigned(16 downto 0); day_fraction : out unsigned(39 downto 0) ); end g23_Seconds_to_Days; architecture cascading of g23_Seconds_to_Days is signal adder1: unsigned(18 downto 0); signal adder2: unsigned(22 downto 0); signal adder3: unsigned(25 downto 0); signal adder4: unsigned(26 downto 0); signal adder5: unsigned(27 downto 0); signal adder6: unsigned(29 downto 0); signal adder7: unsigned(33 downto 0); signal adder8: unsigned(38 downto 0); signal adder9: unsigned(39 downto 0); begin adder1 <= seconds + (seconds & "00"); adder2 <= adder1 + (seconds & "000000"); adder3 <= adder2 + (seconds & "000000000"); adder4 <= adder3 + (seconds & "0000000000"); adder5 <= adder4 + (seconds & "00000000000"); adder6 <= adder5 + (seconds & "0000000000000"); adder7 <= adder6 + (seconds & "00000000000000000"); adder8 <= adder7 + (seconds & "0000000000000000000000"); adder9 <= adder8 + (seconds & "00000000000000000000000"); day_fraction <= adder9; end cascading;
-- describe what this circuit does -- -- entity name: g23_Seconds_to_Days -- -- Copyright (C) 2014 cadesalaberry, grahamludwinski -- -- Version 1.0 -- -- Author: -- Charles-Antoine de Salaberry; [email protected], -- Graham Ludwinski; [email protected] -- -- Date: 21/01/2014 library ieee; -- allows use of the std_logic_vector type use ieee.std_logic_1164.all; use IEEE.numeric_std.all; entity g23_Seconds_to_Days is port ( seconds : in unsigned(16 downto 0); day_fraction : out unsigned(39 downto 0) ); end g23_Seconds_to_Days; architecture cascading of g23_Seconds_to_Days is signal adder1: unsigned(18 downto 0); signal adder2: unsigned(22 downto 0); signal adder3: unsigned(25 downto 0); signal adder4: unsigned(26 downto 0); signal adder5: unsigned(27 downto 0); signal adder6: unsigned(29 downto 0); signal adder7: unsigned(33 downto 0); signal adder8: unsigned(38 downto 0); signal adder9: unsigned(39 downto 0); begin adder1 <= seconds + (seconds & "00"); adder2 <= adder1 + (seconds & "000000"); adder3 <= adder2 + (seconds & "000000000"); adder4 <= adder3 + (seconds & "0000000000"); adder5 <= adder4 + (seconds & "00000000000"); adder6 <= adder5 + (seconds & "0000000000000"); adder7 <= adder6 + (seconds & "00000000000000000"); adder8 <= adder7 + (seconds & "0000000000000000000000"); adder9 <= adder8 + (seconds & "00000000000000000000000"); day_fraction <= adder9; end cascading;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity font_generator is port( clock: in std_logic; vramaddr : OUT STD_LOGIC_VECTOR(15 DOWNTO 0); vramdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0); video_on: in std_logic; pixel_x, pixel_y: in std_logic_vector(9 downto 0); rgb_text: out std_logic_vector(2 downto 0) ); end font_generator; architecture Behavioral of font_generator is -- component blk_mem_gen_v7_3 -- port ( -- clka: in std_logic; -- wea: in std_logic_vector(0 downto 0); -- addra: in std_logic_vector(11 downto 0); -- dina: in std_logic_vector(6 downto 0); -- clkb: in std_logic; -- addrb: in std_logic_vector(11 downto 0); -- doutb: out std_logic_vector(6 downto 0) -- ); -- end component; signal char_addr: std_logic_vector(6 downto 0); signal rom_addr: std_logic_vector(10 downto 0); signal row_addr: std_logic_vector(3 downto 0); signal bit_addr: std_logic_vector(2 downto 0); signal font_word: std_logic_vector(7 downto 0); signal font_bit: std_logic; signal addr_read: std_logic_vector(11 downto 0); signal dout: std_logic_vector(6 downto 0) := "1000010"; begin -- instantiate font ROM font_unit: entity work.font_rom port map( clock => clock, addr => rom_addr, data => font_word ); -- instantiate frame buffer -- frame_buffer_unit: blk_mem_gen_v7_3 -- port map ( -- clka => clock, -- wea => (others => '1'), -- addra => addr_write, -- dina => din, -- clkb => clock, -- addrb => addr_read, -- doutb => dout -- ); vramaddr <= x"0" & addr_read; dout <= vramdata(6 downto 0); -- dout <= "1000010"; -- tile RAM read addr_read <= pixel_y(8 downto 4) & pixel_x(9 downto 3); char_addr <= dout; -- font ROM interface row_addr <= pixel_y(3 downto 0); rom_addr <= char_addr & row_addr; bit_addr <= std_logic_vector(unsigned(pixel_x(2 downto 0)) - 1); font_bit <= font_word(to_integer(unsigned(not bit_addr))); -- rgb multiplexing process(video_on, font_bit) begin if video_on = '0' then rgb_text <= "000"; elsif font_bit = '1' then rgb_text <= "111"; else rgb_text <= "000"; end if; end process; end Behavioral;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_misc.all; use ieee.math_real.all; entity inverse_transform is generic( in_sample_width : integer := 16; out_sample_width : integer := 8 ); port( transform_block : in std_logic_vector((16*in_sample_width)-1 downto 0); inv_transform_block : out std_logic_vector((16*out_sample_width)-1 downto 0); sign_mask : out std_logic_vector(15 downto 0) ); end entity inverse_transform; architecture initial of inverse_transform is --- TYPES ----------------------------------------------------------------- type block_type is array(15 downto 0) of integer; --- SIGNALS --------------------------------------------------------------- signal input_block : block_type; signal intermediate_block : block_type; signal output_block : block_type; signal inv_block : block_type; --- CONSTANTS ------------------------------------------------------------- begin -- parse the input into integers parse: for i in 15 downto 0 generate constant lower_index : integer := i * in_sample_width; constant upper_index : integer := lower_index + in_sample_width - 1; begin input_block(i) <= to_integer(signed( transform_block(upper_index downto lower_index) )); end generate; --the inverse transform g0: for i in 3 downto 0 generate constant col_0_index : integer := i * 4; constant col_1_index : integer := col_0_index + 1; constant col_2_index : integer := col_0_index + 2; constant col_3_index : integer := col_0_index + 3; constant idx : integer := col_0_index; constant row_0_index : integer := i; constant row_1_index : integer := i + 4; constant row_2_index : integer := i + 8; constant row_3_index : integer := i + 12; begin intermediate_block(col_0_index) <= input_block(idx) + input_block(idx + 1) + input_block(idx + 2) + input_block(idx + 3)/2; intermediate_block(col_1_index) <= input_block(idx) + input_block(idx + 1)/2 - input_block(idx + 2) - input_block(idx + 3); intermediate_block(col_2_index) <= input_block(idx) - input_block(idx + 1)/2 - input_block(idx + 2) + input_block(idx + 3); intermediate_block(col_3_index) <= input_block(idx) - input_block(idx + 1) + input_block(idx + 2) - input_block(idx + 3)/2; inv_block(row_0_index) <= (intermediate_block(i) + intermediate_block(i+8) + intermediate_block(i+4) + intermediate_block(i+12)/2 + 32)/64; inv_block(row_1_index) <= (intermediate_block(i) - intermediate_block(i+8) + intermediate_block(i+4)/2 - intermediate_block(i+12) + 32)/64; inv_block(row_2_index) <= (intermediate_block(i) - intermediate_block(i+8) - intermediate_block(i+4)/2 + intermediate_block(i+12) + 32)/64; inv_block(row_3_index) <= (intermediate_block(i) + intermediate_block(i+8) - intermediate_block(i+4) - intermediate_block(i+12)/2 + 32)/64; end generate; --format the output output: for i in 15 downto 0 generate constant lower_index : integer := i * out_sample_width; constant upper_index : integer := lower_index + out_sample_width - 1; begin --output_block(i) <= inv_block(i) when inv_block(i)<(2**(out_sample_width-1)) and inv_block(i)>(-1*(2**(out_sample_width-1))) else -- (2**(out_sample_width-1)-1) when inv_block(i)>(-1*(2**(out_sample_width-1))) else -- (-1*(2**(out_sample_width-1))); output_block(i) <= abs(inv_block(i)); sign_mask(i) <= '1' when inv_block(i) < 0 else '0'; inv_transform_block(upper_index downto lower_index) <= std_logic_vector(to_unsigned(output_block(i), out_sample_width)); end generate; end architecture initial;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_misc.all; use ieee.math_real.all; entity inverse_transform is generic( in_sample_width : integer := 16; out_sample_width : integer := 8 ); port( transform_block : in std_logic_vector((16*in_sample_width)-1 downto 0); inv_transform_block : out std_logic_vector((16*out_sample_width)-1 downto 0); sign_mask : out std_logic_vector(15 downto 0) ); end entity inverse_transform; architecture initial of inverse_transform is --- TYPES ----------------------------------------------------------------- type block_type is array(15 downto 0) of integer; --- SIGNALS --------------------------------------------------------------- signal input_block : block_type; signal intermediate_block : block_type; signal output_block : block_type; signal inv_block : block_type; --- CONSTANTS ------------------------------------------------------------- begin -- parse the input into integers parse: for i in 15 downto 0 generate constant lower_index : integer := i * in_sample_width; constant upper_index : integer := lower_index + in_sample_width - 1; begin input_block(i) <= to_integer(signed( transform_block(upper_index downto lower_index) )); end generate; --the inverse transform g0: for i in 3 downto 0 generate constant col_0_index : integer := i * 4; constant col_1_index : integer := col_0_index + 1; constant col_2_index : integer := col_0_index + 2; constant col_3_index : integer := col_0_index + 3; constant idx : integer := col_0_index; constant row_0_index : integer := i; constant row_1_index : integer := i + 4; constant row_2_index : integer := i + 8; constant row_3_index : integer := i + 12; begin intermediate_block(col_0_index) <= input_block(idx) + input_block(idx + 1) + input_block(idx + 2) + input_block(idx + 3)/2; intermediate_block(col_1_index) <= input_block(idx) + input_block(idx + 1)/2 - input_block(idx + 2) - input_block(idx + 3); intermediate_block(col_2_index) <= input_block(idx) - input_block(idx + 1)/2 - input_block(idx + 2) + input_block(idx + 3); intermediate_block(col_3_index) <= input_block(idx) - input_block(idx + 1) + input_block(idx + 2) - input_block(idx + 3)/2; inv_block(row_0_index) <= (intermediate_block(i) + intermediate_block(i+8) + intermediate_block(i+4) + intermediate_block(i+12)/2 + 32)/64; inv_block(row_1_index) <= (intermediate_block(i) - intermediate_block(i+8) + intermediate_block(i+4)/2 - intermediate_block(i+12) + 32)/64; inv_block(row_2_index) <= (intermediate_block(i) - intermediate_block(i+8) - intermediate_block(i+4)/2 + intermediate_block(i+12) + 32)/64; inv_block(row_3_index) <= (intermediate_block(i) + intermediate_block(i+8) - intermediate_block(i+4) - intermediate_block(i+12)/2 + 32)/64; end generate; --format the output output: for i in 15 downto 0 generate constant lower_index : integer := i * out_sample_width; constant upper_index : integer := lower_index + out_sample_width - 1; begin --output_block(i) <= inv_block(i) when inv_block(i)<(2**(out_sample_width-1)) and inv_block(i)>(-1*(2**(out_sample_width-1))) else -- (2**(out_sample_width-1)-1) when inv_block(i)>(-1*(2**(out_sample_width-1))) else -- (-1*(2**(out_sample_width-1))); output_block(i) <= abs(inv_block(i)); sign_mask(i) <= '1' when inv_block(i) < 0 else '0'; inv_transform_block(upper_index downto lower_index) <= std_logic_vector(to_unsigned(output_block(i), out_sample_width)); end generate; end architecture initial;
library IEEE; use IEEE.std_logic_1164.all; entity unidade_controle is port( clock : in std_logic; reset : in std_logic; e_s_amostrada : in std_logic; finaliza_recepcao : in std_logic; finaliza_paridade : in std_logic; recebendo : out std_logic; verificando_paridade : out std_logic; apresentando : out std_logic; saida_estado : out std_logic_vector(1 downto 0) ); end unidade_controle; architecture estados of unidade_controle is type tipo_estado is (INICIAL, RECEBE, VERIFICA_PARIDADE, APRESENTA); signal estado : tipo_estado; begin process (clock, entrada_serial, finaliza_recepcao, finaliza_paridade) begin if reset = '1' then estado <= INICIAL; elsif clock'event and clock = '1' then case estado is when INICIAL => if e_s_amostrada = '0' then estado <= RECEBE; else estado <= INICIAL; end if; when RECEBE => if finaliza_recepcao = '1' then estado <= VERIFICA_PARIDADE; else estado <= RECEBE; end if; when VERIFICA_PARIDADE => if finaliza_paridade = '1' then estado <= APRESENTA; else estado <= VERIFICA_PARIDADE; end if; when APRESENTA => if reset = '1' then estado <= INICIAL; else estado <= APRESENTA; end if; end case; end if; end process; process (estado) begin case estado is when INICIAL => saida_estado <= "00"; recebendo <= '0'; verificando_paridade <= '0'; apresentando <= '0'; when RECEBE => saida_estado <= "01"; recebendo <= '1'; verificando_paridade <= '0'; apresentando <= '0'; when VERIFICA_PARIDADE => saida_estado <= "10"; recebendo <= '0'; verificando_paridade <= '1'; apresentando <= '0'; when APRESENTA => saida_estado <= "11"; recebendo <= '0'; verificando_paridade <= '0'; apresentando <= '1'; end case; end process; end estados;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
-- Copyright 2013 Ray Salemi -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity tinyalu is port( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done : out std_logic; result : out unsigned ( 15 downto 0 ) ); -- Declarations end tinyalu; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; library work; architecture rtl of tinyalu is -- Architecture declarations -- Internal signal declarations signal done_aax : std_logic; signal done_mult : std_logic; signal result_aax : unsigned(15 downto 0); signal result_mult : unsigned(15 downto 0); signal start_single : std_logic; -- Start signal for single cycle ops signal start_mult : std_logic; -- start signal for multiply -- Implicit buffer signal declarations signal done_internal : std_logic; -- Component Declarations component single_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; op : in std_logic_vector ( 2 downto 0 ); reset_n : in std_logic; start : in std_logic; done_aax : out std_logic; result_aax : out unsigned (15 downto 0) ); end component; component three_cycle port ( A : in unsigned ( 7 downto 0 ); B : in unsigned ( 7 downto 0 ); clk : in std_logic; reset_n : in std_logic; start : in std_logic; done_mult : out std_logic; result_mult : out unsigned (15 downto 0) ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : single_cycle use entity work.single_cycle; for all : three_cycle use entity work.three_cycle; -- pragma synthesis_on begin -- purpose: This block shunts the start signal to the correct block. -- The multiply only sees the start signal when op(2) is '1' -- type : combinational -- inputs : op(2),start -- outputs: start_mult, start_single start_demux: process (op(2),start) begin -- process start_demux case op(2) is when '0' => start_single <= start; start_mult <= '0'; when '1' => start_single <= '0'; start_mult <= start; when others => null; end case; end process start_demux; result_mux : process(result_aax, result_mult, op) begin case op(2) is when '0' => result <= result_aax; when '1' => result <= result_mult; when others => result <= (others => 'X'); end case; end process result_mux; done_mux : process(done_aax, done_mult, op) begin case op(2) is when '0' => done_internal <= done_aax; when '1' => done_internal <= done_mult; when others => done_internal <= 'X'; end case; end process done_mux; -- Instance port mappings. add_and_xor : single_cycle port map ( A => A, B => B, clk => clk, op => op, reset_n => reset_n, start => start_single, done_aax => done_aax, result_aax => result_aax ); mult : three_cycle port map ( A => A, B => B, clk => clk, reset_n => reset_n, start => start_mult, done_mult => done_mult, result_mult => result_mult ); -- Implicit buffered output assignments done <= done_internal; end rtl;
architecture RTL of FIFO is begin PROC_LABEL : process is begin end process; -- Violations below PROC_LABEL : process is begin end process; end architecture RTL;
-- (c) Copyright 1995-2016 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. -- -- DO NOT MODIFY THIS FILE. -- IP VLNV: xilinx.com:ip:dist_mem_gen:8.0 -- IP Revision: 9 LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; LIBRARY dist_mem_gen_v8_0_9; USE dist_mem_gen_v8_0_9.dist_mem_gen_v8_0_9; ENTITY FontROM IS PORT ( a : IN STD_LOGIC_VECTOR(13 DOWNTO 0); spo : OUT STD_LOGIC_VECTOR(0 DOWNTO 0) ); END FontROM; ARCHITECTURE FontROM_arch OF FontROM IS ATTRIBUTE DowngradeIPIdentifiedWarnings : string; ATTRIBUTE DowngradeIPIdentifiedWarnings OF FontROM_arch: ARCHITECTURE IS "yes"; COMPONENT dist_mem_gen_v8_0_9 IS GENERIC ( C_FAMILY : STRING; C_ADDR_WIDTH : INTEGER; C_DEFAULT_DATA : STRING; C_DEPTH : INTEGER; C_HAS_CLK : INTEGER; C_HAS_D : INTEGER; C_HAS_DPO : INTEGER; C_HAS_DPRA : INTEGER; C_HAS_I_CE : INTEGER; C_HAS_QDPO : INTEGER; C_HAS_QDPO_CE : INTEGER; C_HAS_QDPO_CLK : INTEGER; C_HAS_QDPO_RST : INTEGER; C_HAS_QDPO_SRST : INTEGER; C_HAS_QSPO : INTEGER; C_HAS_QSPO_CE : INTEGER; C_HAS_QSPO_RST : INTEGER; C_HAS_QSPO_SRST : INTEGER; C_HAS_SPO : INTEGER; C_HAS_WE : INTEGER; C_MEM_INIT_FILE : STRING; C_ELABORATION_DIR : STRING; C_MEM_TYPE : INTEGER; C_PIPELINE_STAGES : INTEGER; C_QCE_JOINED : INTEGER; C_QUALIFY_WE : INTEGER; C_READ_MIF : INTEGER; C_REG_A_D_INPUTS : INTEGER; C_REG_DPRA_INPUT : INTEGER; C_SYNC_ENABLE : INTEGER; C_WIDTH : INTEGER; C_PARSER_TYPE : INTEGER ); PORT ( a : IN STD_LOGIC_VECTOR(13 DOWNTO 0); d : IN STD_LOGIC_VECTOR(0 DOWNTO 0); dpra : IN STD_LOGIC_VECTOR(13 DOWNTO 0); clk : IN STD_LOGIC; we : IN STD_LOGIC; i_ce : IN STD_LOGIC; qspo_ce : IN STD_LOGIC; qdpo_ce : IN STD_LOGIC; qdpo_clk : IN STD_LOGIC; qspo_rst : IN STD_LOGIC; qdpo_rst : IN STD_LOGIC; qspo_srst : IN STD_LOGIC; qdpo_srst : IN STD_LOGIC; spo : OUT STD_LOGIC_VECTOR(0 DOWNTO 0); dpo : OUT STD_LOGIC_VECTOR(0 DOWNTO 0); qspo : OUT STD_LOGIC_VECTOR(0 DOWNTO 0); qdpo : OUT STD_LOGIC_VECTOR(0 DOWNTO 0) ); END COMPONENT dist_mem_gen_v8_0_9; ATTRIBUTE X_CORE_INFO : STRING; ATTRIBUTE X_CORE_INFO OF FontROM_arch: ARCHITECTURE IS "dist_mem_gen_v8_0_9,Vivado 2015.4"; ATTRIBUTE CHECK_LICENSE_TYPE : STRING; ATTRIBUTE CHECK_LICENSE_TYPE OF FontROM_arch : ARCHITECTURE IS "FontROM,dist_mem_gen_v8_0_9,{}"; ATTRIBUTE CORE_GENERATION_INFO : STRING; ATTRIBUTE CORE_GENERATION_INFO OF FontROM_arch: ARCHITECTURE IS "FontROM,dist_mem_gen_v8_0_9,{x_ipProduct=Vivado 2015.4,x_ipVendor=xilinx.com,x_ipLibrary=ip,x_ipName=dist_mem_gen,x_ipVersion=8.0,x_ipCoreRevision=9,x_ipLanguage=VHDL,x_ipSimLanguage=MIXED,C_FAMILY=artix7,C_ADDR_WIDTH=14,C_DEFAULT_DATA=0,C_DEPTH=16384,C_HAS_CLK=0,C_HAS_D=0,C_HAS_DPO=0,C_HAS_DPRA=0,C_HAS_I_CE=0,C_HAS_QDPO=0,C_HAS_QDPO_CE=0,C_HAS_QDPO_CLK=0,C_HAS_QDPO_RST=0,C_HAS_QDPO_SRST=0,C_HAS_QSPO=0,C_HAS_QSPO_CE=0,C_HAS_QSPO_RST=0,C_HAS_QSPO_SRST=0,C_HAS_SPO=1,C_HAS_WE=0,C_MEM_INIT_FILE=FontROM.mif,C_ELABORATION_DIR=./,C_MEM_TYPE=0,C_PIPELINE_STAGES=0,C_QCE_JOINED=0,C_QUALIFY_WE=0,C_READ_MIF=1,C_REG_A_D_INPUTS=0,C_REG_DPRA_INPUT=0,C_SYNC_ENABLE=1,C_WIDTH=1,C_PARSER_TYPE=1}"; BEGIN U0 : dist_mem_gen_v8_0_9 GENERIC MAP ( C_FAMILY => "artix7", C_ADDR_WIDTH => 14, C_DEFAULT_DATA => "0", C_DEPTH => 16384, C_HAS_CLK => 0, C_HAS_D => 0, C_HAS_DPO => 0, C_HAS_DPRA => 0, C_HAS_I_CE => 0, C_HAS_QDPO => 0, C_HAS_QDPO_CE => 0, C_HAS_QDPO_CLK => 0, C_HAS_QDPO_RST => 0, C_HAS_QDPO_SRST => 0, C_HAS_QSPO => 0, C_HAS_QSPO_CE => 0, C_HAS_QSPO_RST => 0, C_HAS_QSPO_SRST => 0, C_HAS_SPO => 1, C_HAS_WE => 0, C_MEM_INIT_FILE => "FontROM.mif", C_ELABORATION_DIR => "./", C_MEM_TYPE => 0, C_PIPELINE_STAGES => 0, C_QCE_JOINED => 0, C_QUALIFY_WE => 0, C_READ_MIF => 1, C_REG_A_D_INPUTS => 0, C_REG_DPRA_INPUT => 0, C_SYNC_ENABLE => 1, C_WIDTH => 1, C_PARSER_TYPE => 1 ) PORT MAP ( a => a, d => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)), dpra => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 14)), clk => '0', we => '0', i_ce => '1', qspo_ce => '1', qdpo_ce => '1', qdpo_clk => '0', qspo_rst => '0', qdpo_rst => '0', qspo_srst => '0', qdpo_srst => '0', spo => spo ); END FontROM_arch;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; --This component normalizes the vector components according to the steps used in cordic algorithm entity normalizer is generic(TOTAL_BITS: integer := 32; FRACTIONAL_BITS: integer := 16); port( x_in: in std_logic_vector(TOTAL_BITS - 1 downto 0) := (others => '0'); y_in: in std_logic_vector(TOTAL_BITS - 1 downto 0) := (others => '0'); steps_applied : in integer := 0; x_out: out std_logic_vector(TOTAL_BITS - 1 downto 0) := (others => '0'); y_out: out std_logic_vector(TOTAL_BITS - 1 downto 0) := (others => '0') ); end normalizer; architecture normalizer_arq of normalizer is signal lut_index : integer := 0; signal scaling_values_lut_value : std_logic_vector(TOTAL_BITS - 1 downto 0) := (others => '0'); component scaling_values_lut is generic(TOTAL_BITS: integer := 32); port( steps: in integer := 0; scaling_value: out std_logic_vector(TOTAL_BITS - 1 downto 0) := (others => '0') ); end component; begin scaling_values_lut_0 : scaling_values_lut generic map(TOTAL_BITS => 32) port map( steps => lut_index, scaling_value => scaling_values_lut_value ); process (x_in, y_in, steps_applied, lut_index, scaling_values_lut_value) is variable x_signed : signed(TOTAL_BITS - 1 downto 0) := (others => '0'); variable y_signed : signed(TOTAL_BITS - 1 downto 0) := (others => '0'); variable scaling_value_signed : signed(TOTAL_BITS - 1 downto 0) := (others => '0'); variable scaled_x : signed(TOTAL_BITS * 2 - 1 downto 0) := (others => '0'); variable scaled_y : signed(TOTAL_BITS * 2 - 1 downto 0) := (others => '0'); variable shifted_x : signed(TOTAL_BITS * 2 - 1 downto 0) := (others => '0'); variable shifted_y : signed(TOTAL_BITS * 2 - 1 downto 0) := (others => '0'); begin lut_index <= steps_applied; x_signed := signed(x_in); y_signed := signed(y_in); scaling_value_signed := signed(scaling_values_lut_value); --report "X: " & integer'image(x_integer); --report "Y: " & integer'image(y_integer); --report "SV: " & integer'image(scaling_value_integer); scaled_x := x_signed * scaling_value_signed; scaled_y := y_signed * scaling_value_signed; shifted_x := shift_right(scaled_x,FRACTIONAL_BITS); shifted_y := shift_right(scaled_y,FRACTIONAL_BITS); x_out <= std_logic_vector(shifted_x(TOTAL_BITS - 1 downto 0)); y_out <= std_logic_vector(shifted_y(TOTAL_BITS - 1 downto 0)); end process; end architecture;
-------------------------------------------------------------------------------- -- -- 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: EX_MEM_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 : spartan3e -- C_XDEVICEFAMILY : spartan3e -- 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 : 1 -- 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 : WRITE_FIRST -- C_WRITE_WIDTH_A : 16 -- C_READ_WIDTH_A : 16 -- C_WRITE_DEPTH_A : 16384 -- C_READ_DEPTH_A : 16384 -- C_ADDRA_WIDTH : 14 -- 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 : 16 -- C_READ_WIDTH_B : 16 -- C_WRITE_DEPTH_B : 16384 -- C_READ_DEPTH_B : 16384 -- C_ADDRB_WIDTH : 14 -- 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 EX_MEM_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(13 DOWNTO 0); DINA : IN STD_LOGIC_VECTOR(15 DOWNTO 0); DOUTA : OUT STD_LOGIC_VECTOR(15 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(13 DOWNTO 0); DINB : IN STD_LOGIC_VECTOR(15 DOWNTO 0); DOUTB : OUT STD_LOGIC_VECTOR(15 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(13 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(15 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(15 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(13 DOWNTO 0); S_ARESETN : IN STD_LOGIC ); END EX_MEM_prod; ARCHITECTURE xilinx OF EX_MEM_prod IS COMPONENT EX_MEM_exdes IS PORT ( --Port A WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0); ADDRA : IN STD_LOGIC_VECTOR(13 DOWNTO 0); DINA : IN STD_LOGIC_VECTOR(15 DOWNTO 0); DOUTA : OUT STD_LOGIC_VECTOR(15 DOWNTO 0); CLKA : IN STD_LOGIC ); END COMPONENT; BEGIN bmg0 : EX_MEM_exdes PORT MAP ( --Port A WEA => WEA, ADDRA => ADDRA, DINA => DINA, DOUTA => DOUTA, CLKA => CLKA ); END xilinx;
-- Author: Varun Nagpal -- Net Id: vxn180010 -- Microprocessor Systems Project -- December, 6th 2018 -- -- Design: Testbench for the Generic Nth order (L = N+1 taps) Transposed Direct-form FIR-filter library IEEE; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.math_real.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_signed.all; use work.fir_filter_shared_package.all; entity fir_filter_testbench is end fir_filter_testbench; architecture fir_filter_test of fir_filter_testbench is -- clock and asynchronous reset signal clk : std_logic := '0'; signal rst : std_logic := '1'; -- Handshaking interface as source signal valid_x_out : std_logic := '0'; signal ready_x_in : std_logic; signal valid_h_out : std_logic := '0'; signal ready_h_in : std_logic; -- Handshaking interface as sink signal valid_in : std_logic; signal ready_out : std_logic := '0'; -- Signals for Input samples & coefficients to filter and reading Output samples of filter signal x_data_out : signed(X_BIT_SIZE-1 downto 0) := (others => '0'); signal h_data_out : signed(H_BIT_SIZE-1 downto 0) := (others => '0'); signal y_data_in : signed(Y_BIT_SIZE-1 downto 0); begin -- Create an instance of the FIR filter DUT: entity work.fir_generic_transposed_filter(fir_rtl_arch) port map ( clk => clk, rst => rst, valid_x_in => valid_x_out, ready_x_out => ready_x_in, valid_h_in => valid_h_out, ready_h_out => ready_h_in, valid_y_out => valid_in, ready_y_in => ready_out, x_data_in => x_data_out, h_data_in => h_data_out, y_data_out => y_data_in ); -- Clock generation clk_gen: process begin clk <= '0'; wait for CLK_LOW_TIME; clk <= '1'; wait for CLK_HIGH_TIME; end process clk_gen; -- Reset generation rst <= '1', '0' after CLK_CYCLE_TIME; valid_h_out <= '0', '1' after 1 * CLK_CYCLE_TIME, '0' after 5 * CLK_CYCLE_TIME; h_data_out <= ( others => '0' ), ( 0 => '1', others => '0' ) after 1 * CLK_CYCLE_TIME, ( others => '0' ) after 5 * CLK_CYCLE_TIME; valid_x_out <= '0', '1' after 5 * CLK_CYCLE_TIME; x_data_out <= ( others => '0' ), ( 0 => '1', others => '0' ) after 5 * CLK_CYCLE_TIME, ( others => '1' ) after 15 * CLK_CYCLE_TIME; -- print_messages: process begin -- report "ready_h = " & to_string( ready_h_in ) & -- " | valid_h = " & to_string( valid_h_out ) & -- " | h_data = " & to_string( to_integer( signed( h_data_out ) ) ) & -- " | ready_x = " & to_string( ready_x_in ) & -- " | valid_x = " & to_string( valid_x_out ) & -- " | x_data = " & to_string( to_integer( signed( x_data_out ) ) ) & -- " | ready_y = " & to_string( ready_out ) & -- " | valid_y = " & to_string( valid_in ) & -- " | y_data = " & to_string( to_integer( signed( y_data_in ) ) ); -- wait for CLK_CYCLE_TIME; -- end process print_messages; -- stop_sim: process begin -- wait for 24*CLK_CYCLE_TIME; -- std.env.stop; -- end process stop_sim; end architecture fir_filter_test;
-- NEED RESULT: ARCH00449 Assert allowed in a FOR generate statement Passed -- NEED RESULT: ARCH00449: Block statement allowed in a FOR generate statement passed -- NEED RESULT: ARCH00449: Generate statement allowed in a FOR generate statement passed -- NEED RESULT: ARCH00449 Assert allowed in a IF generate statement Passed -- NEED RESULT: ARCH00449: Block statement allowed in a IF generate statement passed -- NEED RESULT: ARCH00449: Generate statement allowed in a FOR generate statement passed -- NEED RESULT: ARCH00449: Process and concurrent sig asg statements allowed in a IF generate statement passed -- NEED RESULT: ARCH00449: Process and concurrent sig asg statements allowed in a FOR generate statement passed ------------------------------------------------------------------------------- -- -- Copyright (c) 1989 by Intermetrics, Inc. -- All rights reserved. -- ------------------------------------------------------------------------------- -- -- TEST NAME: -- -- CT00449 -- -- AUTHOR: -- -- G. Tominovich -- -- TEST OBJECTIVES: -- -- 9.7 (1) -- 9.7 (3) -- 9.7 (4) -- 9.7 (8) -- 9.7 (9) -- -- DESIGN UNIT ORDERING: -- -- ENT00449_1(ARCH00449_1) -- E00000(ARCH00449) -- ENT00449_Test_Bench(ARCH00449_Test_Bench) -- -- REVISION HISTORY: -- -- 5-AUG-1987 - initial revision -- -- NOTES: -- -- self-checking -- -- entity ENT00449_1 is end ENT00449_1 ; use WORK.STANDARD_TYPES.all ; architecture ARCH00449_1 of ENT00449_1 is begin process begin test_report ( "ARCH00449" , "Component instantiation is allowed in a generate "& "statement" , True ) ; wait ; end process ; end ARCH00449_1 ; use WORK.STANDARD_TYPES.all ; architecture ARCH00449 of E00000 is component Comp1 end component ; for all : Comp1 use entity WORK.ENT00449_1 ( ARCH00449_1 ); signal s1, s2 : boolean := false ; constant C : boolean := true ; begin For_Gen : for i in 1 to 1 generate B1 : block begin process begin test_report ( "ARCH00449" , "Block statement allowed in a FOR generate "& "statement" , i = 1 ) ; wait ; end process ; end block B1 ; assert i /= 1 report "ARCH00449 Assert allowed in a FOR generate statement Passed" severity Note ; s1 <= transport True after 10 ns ; process ( s1 ) variable First_Time : boolean := true; begin if First_Time then First_Time := false; else test_report ( "ARCH00449" , "Process and concurrent sig asg statements "& "allowed in a FOR generate statement" , s1 ) ; end if ; end process ; CIS1 : Comp1; g1: if i = 1 generate process begin test_report ( "ARCH00449" , "Generate statement allowed in a FOR generate "& "statement" , i = 1 ) ; wait ; end process ; end generate ; end generate For_Gen ; If_Gen : if C generate B2 : block begin process begin test_report ( "ARCH00449" , "Block statement allowed in a IF generate statement" , C ) ; wait ; end process ; end block B2 ; assert Not C report "ARCH00449 Assert allowed in a IF generate statement Passed" severity Note ; s2 <= transport True after 10 ns ; process ( s2 ) variable First_Time : boolean := true; begin if First_Time then First_Time := false; else test_report ( "ARCH00449" , "Process and concurrent sig asg statements "& "allowed in a IF generate statement" , s2 ) ; end if ; end process ; CIS2 : Comp1; g2: for j in 1 to 1 generate process begin test_report ( "ARCH00449" , "Generate statement allowed in a FOR generate "& "statement" , j = 1 ) ; wait ; end process ; end generate ; end generate If_Gen ; end ARCH00449 ; entity ENT00449_Test_Bench is end ENT00449_Test_Bench ; architecture ARCH00449_Test_Bench of ENT00449_Test_Bench is begin L1: block component UUT end component ; for CIS1 : UUT use entity WORK.E00000 ( ARCH00449 ) ; begin CIS1 : UUT ; end block L1 ; end ARCH00449_Test_Bench ;
-------------------------------------------------------------------------------- -- -- FIFO Generator Core - core top file for implementation -- -------------------------------------------------------------------------------- -- -- (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: bytefifoFPGA_exdes.vhd -- -- Description: -- This is the FIFO core wrapper with BUFG instances for clock connections. -- -------------------------------------------------------------------------------- -- 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 bytefifoFPGA_exdes is PORT ( WR_CLK : IN std_logic; RD_CLK : IN std_logic; ALMOST_FULL : OUT std_logic; ALMOST_EMPTY : OUT std_logic; RST : IN std_logic; PROG_FULL : OUT std_logic; OVERFLOW : OUT std_logic; UNDERFLOW : OUT std_logic; WR_EN : IN std_logic; RD_EN : IN std_logic; DIN : IN std_logic_vector(8-1 DOWNTO 0); DOUT : OUT std_logic_vector(8-1 DOWNTO 0); FULL : OUT std_logic; EMPTY : OUT std_logic); end bytefifoFPGA_exdes; architecture xilinx of bytefifoFPGA_exdes is signal wr_clk_i : std_logic; signal rd_clk_i : std_logic; component bytefifoFPGA is PORT ( WR_CLK : IN std_logic; RD_CLK : IN std_logic; ALMOST_FULL : OUT std_logic; ALMOST_EMPTY : OUT std_logic; RST : IN std_logic; PROG_FULL : OUT std_logic; OVERFLOW : OUT std_logic; UNDERFLOW : OUT std_logic; WR_EN : IN std_logic; RD_EN : IN std_logic; DIN : IN std_logic_vector(8-1 DOWNTO 0); DOUT : OUT std_logic_vector(8-1 DOWNTO 0); FULL : OUT std_logic; EMPTY : OUT std_logic); end component; begin wr_clk_buf: bufg PORT map( i => WR_CLK, o => wr_clk_i ); rd_clk_buf: bufg PORT map( i => RD_CLK, o => rd_clk_i ); exdes_inst : bytefifoFPGA PORT MAP ( WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, ALMOST_FULL => almost_full, ALMOST_EMPTY => almost_empty, RST => rst, PROG_FULL => prog_full, OVERFLOW => overflow, UNDERFLOW => underflow, WR_EN => wr_en, RD_EN => rd_en, DIN => din, DOUT => dout, FULL => full, EMPTY => empty); end xilinx;
-------------------------------------------------------------------------------- -- -- FIFO Generator Core - core top file for implementation -- -------------------------------------------------------------------------------- -- -- (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: bytefifoFPGA_exdes.vhd -- -- Description: -- This is the FIFO core wrapper with BUFG instances for clock connections. -- -------------------------------------------------------------------------------- -- 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 bytefifoFPGA_exdes is PORT ( WR_CLK : IN std_logic; RD_CLK : IN std_logic; ALMOST_FULL : OUT std_logic; ALMOST_EMPTY : OUT std_logic; RST : IN std_logic; PROG_FULL : OUT std_logic; OVERFLOW : OUT std_logic; UNDERFLOW : OUT std_logic; WR_EN : IN std_logic; RD_EN : IN std_logic; DIN : IN std_logic_vector(8-1 DOWNTO 0); DOUT : OUT std_logic_vector(8-1 DOWNTO 0); FULL : OUT std_logic; EMPTY : OUT std_logic); end bytefifoFPGA_exdes; architecture xilinx of bytefifoFPGA_exdes is signal wr_clk_i : std_logic; signal rd_clk_i : std_logic; component bytefifoFPGA is PORT ( WR_CLK : IN std_logic; RD_CLK : IN std_logic; ALMOST_FULL : OUT std_logic; ALMOST_EMPTY : OUT std_logic; RST : IN std_logic; PROG_FULL : OUT std_logic; OVERFLOW : OUT std_logic; UNDERFLOW : OUT std_logic; WR_EN : IN std_logic; RD_EN : IN std_logic; DIN : IN std_logic_vector(8-1 DOWNTO 0); DOUT : OUT std_logic_vector(8-1 DOWNTO 0); FULL : OUT std_logic; EMPTY : OUT std_logic); end component; begin wr_clk_buf: bufg PORT map( i => WR_CLK, o => wr_clk_i ); rd_clk_buf: bufg PORT map( i => RD_CLK, o => rd_clk_i ); exdes_inst : bytefifoFPGA PORT MAP ( WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, ALMOST_FULL => almost_full, ALMOST_EMPTY => almost_empty, RST => rst, PROG_FULL => prog_full, OVERFLOW => overflow, UNDERFLOW => underflow, WR_EN => wr_en, RD_EN => rd_en, DIN => din, DOUT => dout, FULL => full, EMPTY => empty); end xilinx;
-------------------------------------------------------------------------------- -- -- FIFO Generator Core - core top file for implementation -- -------------------------------------------------------------------------------- -- -- (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: bytefifoFPGA_exdes.vhd -- -- Description: -- This is the FIFO core wrapper with BUFG instances for clock connections. -- -------------------------------------------------------------------------------- -- 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 bytefifoFPGA_exdes is PORT ( WR_CLK : IN std_logic; RD_CLK : IN std_logic; ALMOST_FULL : OUT std_logic; ALMOST_EMPTY : OUT std_logic; RST : IN std_logic; PROG_FULL : OUT std_logic; OVERFLOW : OUT std_logic; UNDERFLOW : OUT std_logic; WR_EN : IN std_logic; RD_EN : IN std_logic; DIN : IN std_logic_vector(8-1 DOWNTO 0); DOUT : OUT std_logic_vector(8-1 DOWNTO 0); FULL : OUT std_logic; EMPTY : OUT std_logic); end bytefifoFPGA_exdes; architecture xilinx of bytefifoFPGA_exdes is signal wr_clk_i : std_logic; signal rd_clk_i : std_logic; component bytefifoFPGA is PORT ( WR_CLK : IN std_logic; RD_CLK : IN std_logic; ALMOST_FULL : OUT std_logic; ALMOST_EMPTY : OUT std_logic; RST : IN std_logic; PROG_FULL : OUT std_logic; OVERFLOW : OUT std_logic; UNDERFLOW : OUT std_logic; WR_EN : IN std_logic; RD_EN : IN std_logic; DIN : IN std_logic_vector(8-1 DOWNTO 0); DOUT : OUT std_logic_vector(8-1 DOWNTO 0); FULL : OUT std_logic; EMPTY : OUT std_logic); end component; begin wr_clk_buf: bufg PORT map( i => WR_CLK, o => wr_clk_i ); rd_clk_buf: bufg PORT map( i => RD_CLK, o => rd_clk_i ); exdes_inst : bytefifoFPGA PORT MAP ( WR_CLK => wr_clk_i, RD_CLK => rd_clk_i, ALMOST_FULL => almost_full, ALMOST_EMPTY => almost_empty, RST => rst, PROG_FULL => prog_full, OVERFLOW => overflow, UNDERFLOW => underflow, WR_EN => wr_en, RD_EN => rd_en, DIN => din, DOUT => dout, FULL => full, EMPTY => empty); end xilinx;
------------------------------------------------------------------------------- -- system_stub.vhd ------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity system_stub is port ( SWs_8Bits_TRI_IO : inout std_logic_vector(7 downto 0); LEDs_8Bits_TRI_IO : out std_logic_vector(7 downto 0); BTNs_5Bits_TRI_IO : inout std_logic_vector(4 downto 0); v_axi4s_vid_out_0_video_vsync_pin : out std_logic; v_axi4s_vid_out_0_video_hsync_pin : out std_logic; v_axi4s_vid_out_0_video_data_pin : out std_logic_vector(31 downto 0); processing_system7_0_MIO : inout std_logic_vector(53 downto 0); processing_system7_0_PS_SRSTB_pin : in std_logic; processing_system7_0_PS_CLK_pin : in std_logic; processing_system7_0_PS_PORB_pin : in std_logic; processing_system7_0_DDR_Clk : inout std_logic; processing_system7_0_DDR_Clk_n : inout std_logic; processing_system7_0_DDR_CKE : inout std_logic; processing_system7_0_DDR_CS_n : inout std_logic; processing_system7_0_DDR_RAS_n : inout std_logic; processing_system7_0_DDR_CAS_n : inout std_logic; processing_system7_0_DDR_WEB_pin : out std_logic; processing_system7_0_DDR_BankAddr : inout std_logic_vector(2 downto 0); processing_system7_0_DDR_Addr : inout std_logic_vector(14 downto 0); processing_system7_0_DDR_ODT : inout std_logic; processing_system7_0_DDR_DRSTB : inout std_logic; processing_system7_0_DDR_DQ : inout std_logic_vector(31 downto 0); processing_system7_0_DDR_DM : inout std_logic_vector(3 downto 0); processing_system7_0_DDR_DQS : inout std_logic_vector(3 downto 0); processing_system7_0_DDR_DQS_n : inout std_logic_vector(3 downto 0); processing_system7_0_DDR_VRN : inout std_logic; processing_system7_0_DDR_VRP : inout std_logic ); end system_stub; architecture STRUCTURE of system_stub is component system is port ( SWs_8Bits_TRI_IO : inout std_logic_vector(7 downto 0); LEDs_8Bits_TRI_IO : out std_logic_vector(7 downto 0); BTNs_5Bits_TRI_IO : inout std_logic_vector(4 downto 0); v_axi4s_vid_out_0_video_vsync_pin : out std_logic; v_axi4s_vid_out_0_video_hsync_pin : out std_logic; v_axi4s_vid_out_0_video_data_pin : out std_logic_vector(31 downto 0); processing_system7_0_MIO : inout std_logic_vector(53 downto 0); processing_system7_0_PS_SRSTB_pin : in std_logic; processing_system7_0_PS_CLK_pin : in std_logic; processing_system7_0_PS_PORB_pin : in std_logic; processing_system7_0_DDR_Clk : inout std_logic; processing_system7_0_DDR_Clk_n : inout std_logic; processing_system7_0_DDR_CKE : inout std_logic; processing_system7_0_DDR_CS_n : inout std_logic; processing_system7_0_DDR_RAS_n : inout std_logic; processing_system7_0_DDR_CAS_n : inout std_logic; processing_system7_0_DDR_WEB_pin : out std_logic; processing_system7_0_DDR_BankAddr : inout std_logic_vector(2 downto 0); processing_system7_0_DDR_Addr : inout std_logic_vector(14 downto 0); processing_system7_0_DDR_ODT : inout std_logic; processing_system7_0_DDR_DRSTB : inout std_logic; processing_system7_0_DDR_DQ : inout std_logic_vector(31 downto 0); processing_system7_0_DDR_DM : inout std_logic_vector(3 downto 0); processing_system7_0_DDR_DQS : inout std_logic_vector(3 downto 0); processing_system7_0_DDR_DQS_n : inout std_logic_vector(3 downto 0); processing_system7_0_DDR_VRN : inout std_logic; processing_system7_0_DDR_VRP : inout std_logic ); end component; attribute BOX_TYPE : STRING; attribute BOX_TYPE of system : component is "user_black_box"; begin system_i : system port map ( SWs_8Bits_TRI_IO => SWs_8Bits_TRI_IO, LEDs_8Bits_TRI_IO => LEDs_8Bits_TRI_IO, BTNs_5Bits_TRI_IO => BTNs_5Bits_TRI_IO, v_axi4s_vid_out_0_video_vsync_pin => v_axi4s_vid_out_0_video_vsync_pin, v_axi4s_vid_out_0_video_hsync_pin => v_axi4s_vid_out_0_video_hsync_pin, v_axi4s_vid_out_0_video_data_pin => v_axi4s_vid_out_0_video_data_pin, processing_system7_0_MIO => processing_system7_0_MIO, processing_system7_0_PS_SRSTB_pin => processing_system7_0_PS_SRSTB_pin, processing_system7_0_PS_CLK_pin => processing_system7_0_PS_CLK_pin, processing_system7_0_PS_PORB_pin => processing_system7_0_PS_PORB_pin, processing_system7_0_DDR_Clk => processing_system7_0_DDR_Clk, processing_system7_0_DDR_Clk_n => processing_system7_0_DDR_Clk_n, processing_system7_0_DDR_CKE => processing_system7_0_DDR_CKE, processing_system7_0_DDR_CS_n => processing_system7_0_DDR_CS_n, processing_system7_0_DDR_RAS_n => processing_system7_0_DDR_RAS_n, processing_system7_0_DDR_CAS_n => processing_system7_0_DDR_CAS_n, processing_system7_0_DDR_WEB_pin => processing_system7_0_DDR_WEB_pin, processing_system7_0_DDR_BankAddr => processing_system7_0_DDR_BankAddr, processing_system7_0_DDR_Addr => processing_system7_0_DDR_Addr, processing_system7_0_DDR_ODT => processing_system7_0_DDR_ODT, processing_system7_0_DDR_DRSTB => processing_system7_0_DDR_DRSTB, processing_system7_0_DDR_DQ => processing_system7_0_DDR_DQ, processing_system7_0_DDR_DM => processing_system7_0_DDR_DM, processing_system7_0_DDR_DQS => processing_system7_0_DDR_DQS, processing_system7_0_DDR_DQS_n => processing_system7_0_DDR_DQS_n, processing_system7_0_DDR_VRN => processing_system7_0_DDR_VRN, processing_system7_0_DDR_VRP => processing_system7_0_DDR_VRP ); end architecture STRUCTURE;
-- -- Dual port RAM. Part of libstorage -- -- Copyright (C) 2015 Olof Kindgren <[email protected]> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- library ieee; use ieee.math_real.all; use ieee.numeric_std.all; use ieee.std_logic_1164.all; library libstorage_1; use libstorage_1.libstorage_pkg.all; entity dpram_generic is generic ( DEPTH : positive); port ( clk : in std_ulogic; rd_en_i : in std_ulogic; rd_addr_i : in unsigned(clog2(DEPTH)-1 downto 0); rd_data_o : out std_ulogic_vector; wr_en_i : in std_ulogic; wr_addr_i : in unsigned(clog2(DEPTH)-1 downto 0); wr_data_i : in std_ulogic_vector); end entity dpram_generic; architecture rtl of dpram_generic is signal mem : t_mem(0 to DEPTH-1)(wr_data_i'range); signal wr_data_i_r : std_logic_vector(wr_data_i'range); begin assert is_pow2(DEPTH) report "DEPTH must be 2^n" severity failure; p_main : process(clk) begin if rising_edge(clk) then if wr_en_i then mem(to_integer(wr_addr_i)) <= wr_data_i; end if; if rd_en_i then wr_data_i_r <= wr_data_i; rd_data_o <= mem(to_integer(rd_addr_i)); end if; if (rd_addr_i = wr_addr_i) and (rd_en_i and wr_en_i) = '1' then rd_data_o <= wr_data_i_r; end if; end if; end process; end architecture rtl;
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 lz3B4KHX5z7HJK6kHiZGMmcEnUqLtTRT/n7HdY7szClNEEBtVq2UQW/wdwwMN27AnOLZPVfuS67c Y2O4fk1xOw== `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 OUoXLY9rVEqAKiJgtR19Q8FIQUm9wPmLFXF2sem6w9gJVRflCYIHWjOAqv6eppRvqeqcjaja3KKN iRxsDXzkmdVb18CNyYXYPgZU4MySqAPoAE8BZ3alC446EKqG5bo3Faah4iFiaQ2fsSYQDhznQFWV FIedseAJGSJjdgeT43M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bHuGx6phwwi065A2gw0E1Tqc2OLDUoohEHY7mOoJcUQwvr9OEJ4yz01Uls3wx2UOc24N+ANXe8aM YdyfwspjYSBviz8nI/XUT5fPMjNbtL8HFChLorcX+K00Sc+A9m1I9+5W+Wd6GLSKBCVYKnWRn9Os rc68y/GTowadTW08aEEccqOavDD8XG+R6gQqGpi5C8xq75oqBRmE5yNpxpBXxQRz9mmAsJcZ773H BpObF8UUngkYlRzDjfxz3vzf6lVAPrLm55l1zEsel1LRtdqlRT8kBTrz1kke43v4c6xNv0u+i1Y0 dvxmNCEmLNrwBuVbcA8l6Jjp0k0WZScEgrEOCA== `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 4sCk5d4E+rPjLUhUiUrzCNkXo2ztvWgfU4Ic3n3YDGHZzWC7cjzTKSJroiCXwtIaQEIL5FpdrGOo eHf9JlqikZvG/pLSpSZr6BTZioOpsjgI4CJq9n0wGhpyClKm24hGzYEPH8AkBs4wVmgt4sOHvyYc mYqTUQDFFlehrx6Wh0E= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block cjjanW9F+fseEMt2SDd6R3KYZVrfLHKeq8ULFHbP0E7BiwY4Vkec6zVJkc5FOAAhZdR5Ywc2FOnS jk9bJ37QuAeSdAcrSzysHiIJYxA3kbMVuIa63kiSn3dKlLmPc1gZ2/UtM3HTBff0RPQzxl944kH8 SUid8bQM/bx+7wxLnTLuo6uTok/+c8ipzvZZ5iJ9DgzZyHiiuOtKu8JWNRVw1P5d1QqQT3EZ7Q8j fnqcUNAmoR2w1hlmAhXTJgZbpiKUcMF+Y9/twpUzFl3rdEE6PKGzb5YQ/Re4uf+MJU96/KSTzmBR Xfe8WjI4zLk+NlEm8eNku5cgYGTA1pkwApl+6w== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 5040) `protect data_block PKlpisMKFINH4hoELw81Ae+vpIr0xr/BIQZISQh02QmAYRngfWchi+A+2gXJ0ErM+PWm3fbvLHaf UADT/opvnHMCrmwuOuQX48J/a1y0sztlHgsA7XTu3se9+qgRV127VFOR1P4Sb7lTAfDCfX/Sqf7j ixFauPfNYpb4bfMOYa8Qn1gGaituMtXq/UjwgopsgFu+aNi8UxVeKyS0d2EgfMaWf7Sz9SFYlvwU yKD6KAfZQdSCmNzFXo3zgduz2R7Bq1fBiKXO4kWyAUReczwjZUbbOEIUqCv4mE0oDaUa2nDbnl91 tYEyKY+A++l5jEyI0oKfOC0YmirtpcMOagtHpfTDWubRgX1SeojS2PFfFxstqhUKsoHVakfNlF/d NKUu/DgeUNo6P9TtqSXBGRnTk6QKsK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hKdQ4XVY82g g9khBM1HMmaoAVLjLooxNvtSLSv8GYbl0NlzzQb3md3YbjZeYsWYhEBISTt7VchEMTMF2A2s8fyJ I7lcp59bQSMUTFkH8E1NREEHu/mAZ/t14VXtEEy5H7sCKJaoc7YQeqFzmAHMR2GrXmHBQvRUNIx5 HQkqnrj5jUWVvrmkOuPfpXWAX+KOsZWc2bsx1LjPA4vHKjkxecqvwOSsO/FsrUEhQLeyw5hvHE0K aLTXogzlUYCFhEOQVzKnT2p2JXHdHqqDg6NCjsJempzCVyrs7/1SgXYw569bSErlVvtQ9BsfTukp LcMavpu39XICiBQtbIGvVy/IYU9J9lQ2iqrA46cLuGJas+zHgR8e3Jgjtn6BnZNGnU7mVWnT/YtX czr0pVI24aY99yzXDtXbm2jn+2vGmY2+j4XuCHABWTFR2XACB4cCtdkzPyWy61kfavSPyAliI7fM 3i6aMazGDEyA/S4EwNdqNcre5yOp8j9a/fWz9YK8EetGSYeo6Io4LXPOYGWGKtAj858Kv4Qu7OTk gNO68aGdZYyjfV49PGxV9VnpIOFf9cwJFQNM1UTlTJOjR8UQI6N+g2rHAyDBKg1eMBXK5Sd+ie7k Hpqg+K+AAm28RjHWURuPLl8hnzb+hD7Z7b2m1dzFpH7/Q5FhtWiRcQVyTc7Wi7hNSl/RxwYB539q e/jTdlqWvzxHPKBfTfQLxGm9kmD5ElmkuelPin+Yuf4VAP63Bvh6wt2OZeCakGs3JWsFnhCccfKJ MlwAm9xOu/gkJXCBA+Yhl7ilI+Y6u0SRyxU4YU+ZsOkFuiQdAvvsiZn3X3cRhNoXHaVz/m0mE8Ff 7OLpKo6SlF42OtAyMKkFYadCyibpRI+8UdhtMXMBE0C7ZVG6DUW1LN6b7K4G1cp7Rp8DzLQ9u8bl 4mnahZE+bC4BTszHBW6QkfL/tAxj17WL `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 lz3B4KHX5z7HJK6kHiZGMmcEnUqLtTRT/n7HdY7szClNEEBtVq2UQW/wdwwMN27AnOLZPVfuS67c Y2O4fk1xOw== `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 OUoXLY9rVEqAKiJgtR19Q8FIQUm9wPmLFXF2sem6w9gJVRflCYIHWjOAqv6eppRvqeqcjaja3KKN iRxsDXzkmdVb18CNyYXYPgZU4MySqAPoAE8BZ3alC446EKqG5bo3Faah4iFiaQ2fsSYQDhznQFWV FIedseAJGSJjdgeT43M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bHuGx6phwwi065A2gw0E1Tqc2OLDUoohEHY7mOoJcUQwvr9OEJ4yz01Uls3wx2UOc24N+ANXe8aM YdyfwspjYSBviz8nI/XUT5fPMjNbtL8HFChLorcX+K00Sc+A9m1I9+5W+Wd6GLSKBCVYKnWRn9Os rc68y/GTowadTW08aEEccqOavDD8XG+R6gQqGpi5C8xq75oqBRmE5yNpxpBXxQRz9mmAsJcZ773H BpObF8UUngkYlRzDjfxz3vzf6lVAPrLm55l1zEsel1LRtdqlRT8kBTrz1kke43v4c6xNv0u+i1Y0 dvxmNCEmLNrwBuVbcA8l6Jjp0k0WZScEgrEOCA== `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 4sCk5d4E+rPjLUhUiUrzCNkXo2ztvWgfU4Ic3n3YDGHZzWC7cjzTKSJroiCXwtIaQEIL5FpdrGOo eHf9JlqikZvG/pLSpSZr6BTZioOpsjgI4CJq9n0wGhpyClKm24hGzYEPH8AkBs4wVmgt4sOHvyYc mYqTUQDFFlehrx6Wh0E= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block cjjanW9F+fseEMt2SDd6R3KYZVrfLHKeq8ULFHbP0E7BiwY4Vkec6zVJkc5FOAAhZdR5Ywc2FOnS jk9bJ37QuAeSdAcrSzysHiIJYxA3kbMVuIa63kiSn3dKlLmPc1gZ2/UtM3HTBff0RPQzxl944kH8 SUid8bQM/bx+7wxLnTLuo6uTok/+c8ipzvZZ5iJ9DgzZyHiiuOtKu8JWNRVw1P5d1QqQT3EZ7Q8j fnqcUNAmoR2w1hlmAhXTJgZbpiKUcMF+Y9/twpUzFl3rdEE6PKGzb5YQ/Re4uf+MJU96/KSTzmBR Xfe8WjI4zLk+NlEm8eNku5cgYGTA1pkwApl+6w== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 5040) `protect data_block PKlpisMKFINH4hoELw81Ae+vpIr0xr/BIQZISQh02QmAYRngfWchi+A+2gXJ0ErM+PWm3fbvLHaf UADT/opvnHMCrmwuOuQX48J/a1y0sztlHgsA7XTu3se9+qgRV127VFOR1P4Sb7lTAfDCfX/Sqf7j ixFauPfNYpb4bfMOYa8Qn1gGaituMtXq/UjwgopsgFu+aNi8UxVeKyS0d2EgfMaWf7Sz9SFYlvwU yKD6KAfZQdSCmNzFXo3zgduz2R7Bq1fBiKXO4kWyAUReczwjZUbbOEIUqCv4mE0oDaUa2nDbnl91 tYEyKY+A++l5jEyI0oKfOC0YmirtpcMOagtHpfTDWubRgX1SeojS2PFfFxstqhUKsoHVakfNlF/d NKUu/DgeUNo6P9TtqSXBGRnTk6QKsKBeP2CxOswKzUnbG21sQHlmenEG2V8FnBXn+yYZE80wZdmQ zViav8XOTVjvcZ3R45NidjhswVl4sp02FCqDDKvj0lbXo2QzTTuQgWWSfjlZIDLVR0Cqa1PIJmJG YWg97OT1F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sCKJaoc7YQeqFzmAHMR2GrXmHBQvRUNIx5 HQkqnrj5jUWVvrmkOuPfpXWAX+KOsZWc2bsx1LjPA4vHKjkxecqvwOSsO/FsrUEhQLeyw5hvHE0K aLTXogzlUYCFhEOQVzKnT2p2JXHdHqqDg6NCjsJempzCVyrs7/1SgXYw569bSErlVvtQ9BsfTukp LcMavpu39XICiBQtbIGvVy/IYU9J9lQ2iqrA46cLuGJas+zHgR8e3Jgjtn6BnZNGnU7mVWnT/YtX czr0pVI24aY99yzXDtXbm2jn+2vGmY2+j4XuCHABWTFR2XACB4cCtdkzPyWy61kfavSPyAliI7fM 3i6aMazGDEyA/S4EwNdqNcre5yOp8j9a/fWz9YK8EetGSYeo6Io4LXPOYGWGKtAj858Kv4Qu7OTk gNO68aGdZYyjfV49PGxV9VnpIOFf9cwJFQNM1UTlTJOjR8UQI6N+g2rHAyDBKg1eMBXK5Sd+ie7k Hpqg+K+AAm28RjHWURuPLl8hnzb+hD7Z7b2m1dzFpH7/Q5FhtWiRcQVyTc7Wi7hNSl/RxwYB539q e/jTdlqWvzxHPKBfTfQLxGm9kmD5ElmkuelPin+Yuf4VAP63Bvh6wt2OZeCakGs3JWsFnhCccfKJ MlwAm9xOu/gkJXCBA+Yhl7ilI+Y6u0SRyxU4YU+ZsOkFuiQdAvvsiZn3X3cRhNoXHaVz/m0mE8Ff 7OLpKo6SlF42OtAyMKkFYadCyibpRI+8UdhtMXMBE0C7ZVG6DUW1LN6b7K4G1cp7Rp8DzLQ9u8bl 4mnahZE+bC4BTszHBW6QkfL/tAxj17WL `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 lz3B4KHX5z7HJK6kHiZGMmcEnUqLtTRT/n7HdY7szClNEEBtVq2UQW/wdwwMN27AnOLZPVfuS67c Y2O4fk1xOw== `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 OUoXLY9rVEqAKiJgtR19Q8FIQUm9wPmLFXF2sem6w9gJVRflCYIHWjOAqv6eppRvqeqcjaja3KKN iRxsDXzkmdVb18CNyYXYPgZU4MySqAPoAE8BZ3alC446EKqG5bo3Faah4iFiaQ2fsSYQDhznQFWV FIedseAJGSJjdgeT43M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bHuGx6phwwi065A2gw0E1Tqc2OLDUoohEHY7mOoJcUQwvr9OEJ4yz01Uls3wx2UOc24N+ANXe8aM YdyfwspjYSBviz8nI/XUT5fPMjNbtL8HFChLorcX+K00Sc+A9m1I9+5W+Wd6GLSKBCVYKnWRn9Os rc68y/GTowadTW08aEEccqOavDD8XG+R6gQqGpi5C8xq75oqBRmE5yNpxpBXxQRz9mmAsJcZ773H BpObF8UUngkYlRzDjfxz3vzf6lVAPrLm55l1zEsel1LRtdqlRT8kBTrz1kke43v4c6xNv0u+i1Y0 dvxmNCEmLNrwBuVbcA8l6Jjp0k0WZScEgrEOCA== `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 4sCk5d4E+rPjLUhUiUrzCNkXo2ztvWgfU4Ic3n3YDGHZzWC7cjzTKSJroiCXwtIaQEIL5FpdrGOo eHf9JlqikZvG/pLSpSZr6BTZioOpsjgI4CJq9n0wGhpyClKm24hGzYEPH8AkBs4wVmgt4sOHvyYc mYqTUQDFFlehrx6Wh0E= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block cjjanW9F+fseEMt2SDd6R3KYZVrfLHKeq8ULFHbP0E7BiwY4Vkec6zVJkc5FOAAhZdR5Ywc2FOnS jk9bJ37QuAeSdAcrSzysHiIJYxA3kbMVuIa63kiSn3dKlLmPc1gZ2/UtM3HTBff0RPQzxl944kH8 SUid8bQM/bx+7wxLnTLuo6uTok/+c8ipzvZZ5iJ9DgzZyHiiuOtKu8JWNRVw1P5d1QqQT3EZ7Q8j fnqcUNAmoR2w1hlmAhXTJgZbpiKUcMF+Y9/twpUzFl3rdEE6PKGzb5YQ/Re4uf+MJU96/KSTzmBR Xfe8WjI4zLk+NlEm8eNku5cgYGTA1pkwApl+6w== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 5040) `protect data_block PKlpisMKFINH4hoELw81Ae+vpIr0xr/BIQZISQh02QmAYRngfWchi+A+2gXJ0ErM+PWm3fbvLHaf UADT/opvnHMCrmwuOuQX48J/a1y0sztlHgsA7XTu3se9+qgRV127VFOR1P4Sb7lTAfDCfX/Sqf7j ixFauPfNYpb4bfMOYa8Qn1gGaituMtXq/UjwgopsgFu+aNi8UxVeKyS0d2EgfMaWf7Sz9SFYlvwU yKD6KAfZQdSCmNzFXo3zgduz2R7Bq1fBiKXO4kWyAUReczwjZUbbOEIUqCv4mE0oDaUa2nDbnl91 tYEyKY+A++l5jEyI0oKfOC0YmirtpcMOagtHpfTDWubRgX1SeojS2PFfFxstqhUKsoHVakfNlF/d NKUu/DgeUNo6P9TtqSXBGRnTk6QKsKBeP2CxOswKzUnbG21sQHlmenEG2V8FnBXn+yYZE80wZdmQ zViav8XOTVjvcZ3R45NidjhswVl4sp02FCqDDKvj0lbXo2QzTTuQgWWSfjlZIDLVR0Cqa1PIJmJG YWg97OT1FFrsTmnlQxv+D0TD4nt8or5TROQwlzI5Jy1pV1h9onHNyLTWYG09twfgZf2QJmu9f4K7 px6pzNPDA9bO0F5jqYZ0EPN+wi9IqWCd/u5HIpcP1Juu58GDxRyTN3ptjFzw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OQVzKnT2p2JXHdHqqDg6NCjsJempzCVyrs7/1SgXYw569bSErlVvtQ9BsfTukp LcMavpu39XICiBQtbIGvVy/IYU9J9lQ2iqrA46cLuGJas+zHgR8e3Jgjtn6BnZNGnU7mVWnT/YtX czr0pVI24aY99yzXDtXbm2jn+2vGmY2+j4XuCHABWTFR2XACB4cCtdkzPyWy61kfavSPyAliI7fM 3i6aMazGDEyA/S4EwNdqNcre5yOp8j9a/fWz9YK8EetGSYeo6Io4LXPOYGWGKtAj858Kv4Qu7OTk gNO68aGdZYyjfV49PGxV9VnpIOFf9cwJFQNM1UTlTJOjR8UQI6N+g2rHAyDBKg1eMBXK5Sd+ie7k Hpqg+K+AAm28RjHWURuPLl8hnzb+hD7Z7b2m1dzFpH7/Q5FhtWiRcQVyTc7Wi7hNSl/RxwYB539q e/jTdlqWvzxHPKBfTfQLxGm9kmD5ElmkuelPin+Yuf4VAP63Bvh6wt2OZeCakGs3JWsFnhCccfKJ MlwAm9xOu/gkJXCBA+Yhl7ilI+Y6u0SRyxU4YU+ZsOkFuiQdAvvsiZn3X3cRhNoXHaVz/m0mE8Ff 7OLpKo6SlF42OtAyMKkFYadCyibpRI+8UdhtMXMBE0C7ZVG6DUW1LN6b7K4G1cp7Rp8DzLQ9u8bl 4mnahZE+bC4BTszHBW6QkfL/tAxj17WL `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 lz3B4KHX5z7HJK6kHiZGMmcEnUqLtTRT/n7HdY7szClNEEBtVq2UQW/wdwwMN27AnOLZPVfuS67c Y2O4fk1xOw== `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 OUoXLY9rVEqAKiJgtR19Q8FIQUm9wPmLFXF2sem6w9gJVRflCYIHWjOAqv6eppRvqeqcjaja3KKN iRxsDXzkmdVb18CNyYXYPgZU4MySqAPoAE8BZ3alC446EKqG5bo3Faah4iFiaQ2fsSYQDhznQFWV FIedseAJGSJjdgeT43M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bHuGx6phwwi065A2gw0E1Tqc2OLDUoohEHY7mOoJcUQwvr9OEJ4yz01Uls3wx2UOc24N+ANXe8aM YdyfwspjYSBviz8nI/XUT5fPMjNbtL8HFChLorcX+K00Sc+A9m1I9+5W+Wd6GLSKBCVYKnWRn9Os rc68y/GTowadTW08aEEccqOavDD8XG+R6gQqGpi5C8xq75oqBRmE5yNpxpBXxQRz9mmAsJcZ773H BpObF8UUngkYlRzDjfxz3vzf6lVAPrLm55l1zEsel1LRtdqlRT8kBTrz1kke43v4c6xNv0u+i1Y0 dvxmNCEmLNrwBuVbcA8l6Jjp0k0WZScEgrEOCA== `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 4sCk5d4E+rPjLUhUiUrzCNkXo2ztvWgfU4Ic3n3YDGHZzWC7cjzTKSJroiCXwtIaQEIL5FpdrGOo eHf9JlqikZvG/pLSpSZr6BTZioOpsjgI4CJq9n0wGhpyClKm24hGzYEPH8AkBs4wVmgt4sOHvyYc mYqTUQDFFlehrx6Wh0E= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block cjjanW9F+fseEMt2SDd6R3KYZVrfLHKeq8ULFHbP0E7BiwY4Vkec6zVJkc5FOAAhZdR5Ywc2FOnS jk9bJ37QuAeSdAcrSzysHiIJYxA3kbMVuIa63kiSn3dKlLmPc1gZ2/UtM3HTBff0RPQzxl944kH8 SUid8bQM/bx+7wxLnTLuo6uTok/+c8ipzvZZ5iJ9DgzZyHiiuOtKu8JWNRVw1P5d1QqQT3EZ7Q8j fnqcUNAmoR2w1hlmAhXTJgZbpiKUcMF+Y9/twpUzFl3rdEE6PKGzb5YQ/Re4uf+MJU96/KSTzmBR Xfe8WjI4zLk+NlEm8eNku5cgYGTA1pkwApl+6w== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 5040) `protect data_block PKlpisMKFINH4hoELw81Ae+vpIr0xr/BIQZISQh02QmAYRngfWchi+A+2gXJ0ErM+PWm3fbvLHaf UADT/opvnHMCrmwuOuQX48J/a1y0sztlHgsA7XTu3se9+qgRV127VFOR1P4Sb7lTAfDCfX/Sqf7j ixFauPfNYpb4bfMOYa8Qn1gGaituMtXq/UjwgopsgFu+aNi8UxVeKyS0d2EgfMaWf7Sz9SFYlvwU yKD6KAfZQdSCmNzFXo3zgduz2R7Bq1fBiKXO4kWyAUReczwjZUbbOEIUqCv4mE0oDaUa2nDbnl91 tYEyKY+A++l5jEyI0oKfOC0YmirtpcMOagtHpfTDWubRgX1SeojS2PFfFxstqhUKsoHVakfNlF/d NKUu/DgeUNo6P9TtqSXBGRnTk6QKsKBeP2CxOswKzUnbG21sQHlmenEG2V8FnBXn+yYZE80wZdmQ zViav8XOTVjvcZ3R45NidjhswVl4sp02FCqDDKvj0lbXo2QzTTuQgWWSfjlZIDLVR0Cqa1PIJmJG YWg97OT1FFrsTmnlQxv+D0TD4nt8or5TROQwlzI5Jy1pV1h9onHNyLTWYG09twfgZf2QJmu9f4K7 px6pzNPDA9bO0F5jqYZ0EPN+wi9IqWCd/u5HIpcP1Juu58GDxRyTN3ptjFzwhiEw4F6KNDIhyH+c R7c76nbIhyGwx7mjSEEbvU8n9A4iBNM6PSRTlfJACkGiuISqPjEsyS6Ktwvhawe3ebiotdcrcil/ 7X6uCnXu5fRJPLxIWl7Cx03VGD/OhJmP6C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WnT/YtX czr0pVI24aY99yzXDtXbm2jn+2vGmY2+j4XuCHABWTFR2XACB4cCtdkzPyWy61kfavSPyAliI7fM 3i6aMazGDEyA/S4EwNdqNcre5yOp8j9a/fWz9YK8EetGSYeo6Io4LXPOYGWGKtAj858Kv4Qu7OTk gNO68aGdZYyjfV49PGxV9VnpIOFf9cwJFQNM1UTlTJOjR8UQI6N+g2rHAyDBKg1eMBXK5Sd+ie7k Hpqg+K+AAm28RjHWURuPLl8hnzb+hD7Z7b2m1dzFpH7/Q5FhtWiRcQVyTc7Wi7hNSl/RxwYB539q e/jTdlqWvzxHPKBfTfQLxGm9kmD5ElmkuelPin+Yuf4VAP63Bvh6wt2OZeCakGs3JWsFnhCccfKJ MlwAm9xOu/gkJXCBA+Yhl7ilI+Y6u0SRyxU4YU+ZsOkFuiQdAvvsiZn3X3cRhNoXHaVz/m0mE8Ff 7OLpKo6SlF42OtAyMKkFYadCyibpRI+8UdhtMXMBE0C7ZVG6DUW1LN6b7K4G1cp7Rp8DzLQ9u8bl 4mnahZE+bC4BTszHBW6QkfL/tAxj17WL `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 lz3B4KHX5z7HJK6kHiZGMmcEnUqLtTRT/n7HdY7szClNEEBtVq2UQW/wdwwMN27AnOLZPVfuS67c Y2O4fk1xOw== `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 OUoXLY9rVEqAKiJgtR19Q8FIQUm9wPmLFXF2sem6w9gJVRflCYIHWjOAqv6eppRvqeqcjaja3KKN iRxsDXzkmdVb18CNyYXYPgZU4MySqAPoAE8BZ3alC446EKqG5bo3Faah4iFiaQ2fsSYQDhznQFWV FIedseAJGSJjdgeT43M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bHuGx6phwwi065A2gw0E1Tqc2OLDUoohEHY7mOoJcUQwvr9OEJ4yz01Uls3wx2UOc24N+ANXe8aM YdyfwspjYSBviz8nI/XUT5fPMjNbtL8HFChLorcX+K00Sc+A9m1I9+5W+Wd6GLSKBCVYKnWRn9Os rc68y/GTowadTW08aEEccqOavDD8XG+R6gQqGpi5C8xq75oqBRmE5yNpxpBXxQRz9mmAsJcZ773H BpObF8UUngkYlRzDjfxz3vzf6lVAPrLm55l1zEsel1LRtdqlRT8kBTrz1kke43v4c6xNv0u+i1Y0 dvxmNCEmLNrwBuVbcA8l6Jjp0k0WZScEgrEOCA== `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 4sCk5d4E+rPjLUhUiUrzCNkXo2ztvWgfU4Ic3n3YDGHZzWC7cjzTKSJroiCXwtIaQEIL5FpdrGOo eHf9JlqikZvG/pLSpSZr6BTZioOpsjgI4CJq9n0wGhpyClKm24hGzYEPH8AkBs4wVmgt4sOHvyYc mYqTUQDFFlehrx6Wh0E= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block cjjanW9F+fseEMt2SDd6R3KYZVrfLHKeq8ULFHbP0E7BiwY4Vkec6zVJkc5FOAAhZdR5Ywc2FOnS jk9bJ37QuAeSdAcrSzysHiIJYxA3kbMVuIa63kiSn3dKlLmPc1gZ2/UtM3HTBff0RPQzxl944kH8 SUid8bQM/bx+7wxLnTLuo6uTok/+c8ipzvZZ5iJ9DgzZyHiiuOtKu8JWNRVw1P5d1QqQT3EZ7Q8j fnqcUNAmoR2w1hlmAhXTJgZbpiKUcMF+Y9/twpUzFl3rdEE6PKGzb5YQ/Re4uf+MJU96/KSTzmBR Xfe8WjI4zLk+NlEm8eNku5cgYGTA1pkwApl+6w== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 5040) `protect data_block PKlpisMKFINH4hoELw81Ae+vpIr0xr/BIQZISQh02QmAYRngfWchi+A+2gXJ0ErM+PWm3fbvLHaf UADT/opvnHMCrmwuOuQX48J/a1y0sztlHgsA7XTu3se9+qgRV127VFOR1P4Sb7lTAfDCfX/Sqf7j ixFauPfNYpb4bfMOYa8Qn1gGaituMtXq/UjwgopsgFu+aNi8UxVeKyS0d2EgfMaWf7Sz9SFYlvwU yKD6KAfZQdSCmNzFXo3zgduz2R7Bq1fBiKXO4kWyAUReczwjZUbbOEIUqCv4mE0oDaUa2nDbnl91 tYEyKY+A++l5jEyI0oKfOC0YmirtpcMOagtHpfTDWubRgX1SeojS2PFfFxstqhUKsoHVakfNlF/d NKUu/DgeUNo6P9TtqSXBGRnTk6QKsKBeP2CxOswKzUnbG21sQHlmenEG2V8FnBXn+yYZE80wZdmQ zViav8XOTVjvcZ3R45NidjhswVl4sp02FCqDDKvj0lbXo2QzTTuQgWWSfjlZIDLVR0Cqa1PIJmJG YWg97OT1FFrsTmnlQxv+D0TD4nt8or5TROQwlzI5Jy1pV1h9onHNyLTWYG09twfgZf2QJmu9f4K7 px6pzNPDA9bO0F5jqYZ0EPN+wi9IqWCd/u5HIpcP1Juu58GDxRyTN3ptjFzwhiEw4F6KNDIhyH+c R7c76nbIhyGwx7mjSEEbvU8n9A4iBNM6PSRTlfJACkGiuISqPjEsyS6Ktwvhawe3ebiotdcrcil/ 7X6uCnXu5fRJPLxIWl7Cx03VGD/OhJmP6CvKIECDLp9Kcoo4dqi/wrb32JRt8sBGH1v4qAOW6mi0 MMmIrZoHoedNMO4puZZXl06m186o4hZwnNtU/AggP65Kpe0xnFy2X24msxvwiT1NBeYjDenJHeOD DUTWVzLIq4Ll8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io4LXPOYGWGKtAj858Kv4Qu7OTk gNO68aGdZYyjfV49PGxV9VnpIOFf9cwJFQNM1UTlTJOjR8UQI6N+g2rHAyDBKg1eMBXK5Sd+ie7k Hpqg+K+AAm28RjHWURuPLl8hnzb+hD7Z7b2m1dzFpH7/Q5FhtWiRcQVyTc7Wi7hNSl/RxwYB539q e/jTdlqWvzxHPKBfTfQLxGm9kmD5ElmkuelPin+Yuf4VAP63Bvh6wt2OZeCakGs3JWsFnhCccfKJ MlwAm9xOu/gkJXCBA+Yhl7ilI+Y6u0SRyxU4YU+ZsOkFuiQdAvvsiZn3X3cRhNoXHaVz/m0mE8Ff 7OLpKo6SlF42OtAyMKkFYadCyibpRI+8UdhtMXMBE0C7ZVG6DUW1LN6b7K4G1cp7Rp8DzLQ9u8bl 4mnahZE+bC4BTszHBW6QkfL/tAxj17WL `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 lz3B4KHX5z7HJK6kHiZGMmcEnUqLtTRT/n7HdY7szClNEEBtVq2UQW/wdwwMN27AnOLZPVfuS67c Y2O4fk1xOw== `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 OUoXLY9rVEqAKiJgtR19Q8FIQUm9wPmLFXF2sem6w9gJVRflCYIHWjOAqv6eppRvqeqcjaja3KKN iRxsDXzkmdVb18CNyYXYPgZU4MySqAPoAE8BZ3alC446EKqG5bo3Faah4iFiaQ2fsSYQDhznQFWV FIedseAJGSJjdgeT43M= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block bHuGx6phwwi065A2gw0E1Tqc2OLDUoohEHY7mOoJcUQwvr9OEJ4yz01Uls3wx2UOc24N+ANXe8aM YdyfwspjYSBviz8nI/XUT5fPMjNbtL8HFChLorcX+K00Sc+A9m1I9+5W+Wd6GLSKBCVYKnWRn9Os rc68y/GTowadTW08aEEccqOavDD8XG+R6gQqGpi5C8xq75oqBRmE5yNpxpBXxQRz9mmAsJcZ773H BpObF8UUngkYlRzDjfxz3vzf6lVAPrLm55l1zEsel1LRtdqlRT8kBTrz1kke43v4c6xNv0u+i1Y0 dvxmNCEmLNrwBuVbcA8l6Jjp0k0WZScEgrEOCA== `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 4sCk5d4E+rPjLUhUiUrzCNkXo2ztvWgfU4Ic3n3YDGHZzWC7cjzTKSJroiCXwtIaQEIL5FpdrGOo eHf9JlqikZvG/pLSpSZr6BTZioOpsjgI4CJq9n0wGhpyClKm24hGzYEPH8AkBs4wVmgt4sOHvyYc mYqTUQDFFlehrx6Wh0E= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block cjjanW9F+fseEMt2SDd6R3KYZVrfLHKeq8ULFHbP0E7BiwY4Vkec6zVJkc5FOAAhZdR5Ywc2FOnS jk9bJ37QuAeSdAcrSzysHiIJYxA3kbMVuIa63kiSn3dKlLmPc1gZ2/UtM3HTBff0RPQzxl944kH8 SUid8bQM/bx+7wxLnTLuo6uTok/+c8ipzvZZ5iJ9DgzZyHiiuOtKu8JWNRVw1P5d1QqQT3EZ7Q8j fnqcUNAmoR2w1hlmAhXTJgZbpiKUcMF+Y9/twpUzFl3rdEE6PKGzb5YQ/Re4uf+MJU96/KSTzmBR Xfe8WjI4zLk+NlEm8eNku5cgYGTA1pkwApl+6w== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64",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hnzb+hD7Z7b2m1dzFpH7/Q5FhtWiRcQVyTc7Wi7hNSl/RxwYB539q e/jTdlqWvzxHPKBfTfQLxGm9kmD5ElmkuelPin+Yuf4VAP63Bvh6wt2OZeCakGs3JWsFnhCccfKJ MlwAm9xOu/gkJXCBA+Yhl7ilI+Y6u0SRyxU4YU+ZsOkFuiQdAvvsiZn3X3cRhNoXHaVz/m0mE8Ff 7OLpKo6SlF42OtAyMKkFYadCyibpRI+8UdhtMXMBE0C7ZVG6DUW1LN6b7K4G1cp7Rp8DzLQ9u8bl 4mnahZE+bC4BTszHBW6QkfL/tAxj17WL `protect end_protected
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003 - 2008, Gaisler Research -- Copyright (C) 2008 - 2014, Aeroflex Gaisler -- -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------- -- Entity: ahb2mig_ztex -- File: ahb2mig_ztex.vhd -- Author: Jiri Gaisler - Aeroflex Gaisler AB -- -- This is a AHB-2.0 interface for the Xilinx Spartan-6 MIG. -- One bidir 32-bit port is used for the main AHB bus. ------------------------------------------------------------------------------- -- Patched for ZTEX: Oleg Belousov <[email protected]> ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; library grlib; use grlib.amba.all; use grlib.stdlib.all; use grlib.devices.all; entity ahb2mig_ztex is generic( hindex : integer := 0; haddr : integer := 0; hmask : integer := 16#f00#; pindex : integer := 0; paddr : integer := 0; pmask : integer := 16#fff# ); port( mcb3_dram_dq : inout std_logic_vector(15 downto 0); mcb3_rzq : inout std_logic; mcb3_dram_udqs : inout std_logic; mcb3_dram_dqs : inout std_logic; mcb3_dram_a : out std_logic_vector(12 downto 0); mcb3_dram_ba : out std_logic_vector(1 downto 0); mcb3_dram_cke : out std_logic; mcb3_dram_ras_n : out std_logic; mcb3_dram_cas_n : out std_logic; mcb3_dram_we_n : out std_logic; mcb3_dram_dm : out std_logic; mcb3_dram_udm : out std_logic; mcb3_dram_ck : out std_logic; mcb3_dram_ck_n : out std_logic; ahbso : out ahb_slv_out_type; ahbsi : in ahb_slv_in_type; apbi : in apb_slv_in_type; apbo : out apb_slv_out_type; calib_done : out std_logic; test_error : out std_logic; rst_n_syn : in std_logic; rst_n_async : in std_logic; clk_amba : in std_logic; clk_mem : in std_logic ); end ; architecture rtl of ahb2mig_ztex is component mig_37 generic( C3_P0_MASK_SIZE : integer := 4; C3_P0_DATA_PORT_SIZE : integer := 32; C3_P1_MASK_SIZE : integer := 4; C3_P1_DATA_PORT_SIZE : integer := 32; C3_MEMCLK_PERIOD : integer := 5000; C3_RST_ACT_LOW : integer := 0; C3_INPUT_CLK_TYPE : string := "SINGLE_ENDED"; C3_CALIB_SOFT_IP : string := "TRUE"; C3_SIMULATION : string := "FALSE"; DEBUG_EN : integer := 0; C3_MEM_ADDR_ORDER : string := "ROW_BANK_COLUMN"; C3_NUM_DQ_PINS : integer := 16; C3_MEM_ADDR_WIDTH : integer := 13; C3_MEM_BANKADDR_WIDTH : integer := 2 ); port ( mcb3_dram_dq : inout std_logic_vector(C3_NUM_DQ_PINS-1 downto 0); mcb3_dram_a : out std_logic_vector(C3_MEM_ADDR_WIDTH-1 downto 0); mcb3_dram_ba : out std_logic_vector(C3_MEM_BANKADDR_WIDTH-1 downto 0); mcb3_dram_cke : out std_logic; mcb3_dram_ras_n : out std_logic; mcb3_dram_cas_n : out std_logic; mcb3_dram_we_n : out std_logic; mcb3_dram_dm : out std_logic; mcb3_dram_udqs : inout std_logic; mcb3_rzq : inout std_logic; mcb3_dram_udm : out std_logic; c3_sys_clk : in std_logic; c3_sys_rst_n : in std_logic; c3_calib_done : out std_logic; c3_clk0 : out std_logic; c3_rst0 : out std_logic; mcb3_dram_dqs : inout std_logic; mcb3_dram_ck : out std_logic; mcb3_dram_ck_n : out std_logic; c3_p0_cmd_clk : in std_logic; c3_p0_cmd_en : in std_logic; c3_p0_cmd_instr : in std_logic_vector(2 downto 0); c3_p0_cmd_bl : in std_logic_vector(5 downto 0); c3_p0_cmd_byte_addr : in std_logic_vector(29 downto 0); c3_p0_cmd_empty : out std_logic; c3_p0_cmd_full : out std_logic; c3_p0_wr_clk : in std_logic; c3_p0_wr_en : in std_logic; c3_p0_wr_mask : in std_logic_vector(C3_P0_MASK_SIZE - 1 downto 0); c3_p0_wr_data : in std_logic_vector(C3_P0_DATA_PORT_SIZE - 1 downto 0); c3_p0_wr_full : out std_logic; c3_p0_wr_empty : out std_logic; c3_p0_wr_count : out std_logic_vector(6 downto 0); c3_p0_wr_underrun : out std_logic; c3_p0_wr_error : out std_logic; c3_p0_rd_clk : in std_logic; c3_p0_rd_en : in std_logic; c3_p0_rd_data : out std_logic_vector(C3_P0_DATA_PORT_SIZE - 1 downto 0); c3_p0_rd_full : out std_logic; c3_p0_rd_empty : out std_logic; c3_p0_rd_count : out std_logic_vector(6 downto 0); c3_p0_rd_overflow : out std_logic; c3_p0_rd_error : out std_logic ); end component; type bstate_type is (idle, start, read1); constant hconfig : ahb_config_type := ( 0 => ahb_device_reg ( VENDOR_GAISLER, GAISLER_MIGDDR2, 0, 0, 0), 4 => ahb_membar(haddr, '1', '1', hmask), -- 5 => ahb_iobar(ioaddr, iomask), others => zero32); constant pconfig : apb_config_type := ( 0 => ahb_device_reg ( VENDOR_GAISLER, GAISLER_MIGDDR2, 0, 0, 0), 1 => apb_iobar(paddr, pmask)); type reg_type is record bstate : bstate_type; cmd_bl : std_logic_vector(5 downto 0); wr_count : std_logic_vector(6 downto 0); rd_cnt : std_logic_vector(5 downto 0); hready : std_logic; hsel : std_logic; hwrite : std_logic; htrans : std_logic_vector(1 downto 0); hburst : std_logic_vector(2 downto 0); hsize : std_logic_vector(2 downto 0); hrdata : std_logic_vector(31 downto 0); haddr : std_logic_vector(31 downto 0); hmaster : std_logic_vector(3 downto 0); end record; type mcb_type is record cmd_en : std_logic; cmd_instr : std_logic_vector(2 downto 0); cmd_empty : std_logic; cmd_full : std_logic; cmd_bl : std_logic_vector(5 downto 0); cmd_byte_addr : std_logic_vector(29 downto 0); wr_full : std_logic; wr_empty : std_logic; wr_underrun : std_logic; wr_error : std_logic; wr_mask : std_logic_vector(3 downto 0); wr_en : std_logic; wr_data : std_logic_vector(31 downto 0); wr_count : std_logic_vector(6 downto 0); rd_data : std_logic_vector(31 downto 0); rd_full : std_logic; rd_empty : std_logic; rd_count : std_logic_vector(6 downto 0); rd_overflow : std_logic; rd_error : std_logic; rd_en : std_logic; end record; signal r, rin : reg_type; signal i : mcb_type; begin comb: process( rst_n_syn, r, ahbsi, i ) variable v : reg_type; variable wmask : std_logic_vector(3 downto 0); variable wr_en : std_logic; variable cmd_en : std_logic; variable cmd_instr : std_logic_vector(2 downto 0); variable rd_en : std_logic; variable cmd_bl : std_logic_vector(5 downto 0); variable hwdata : std_logic_vector(31 downto 0); variable readdata : std_logic_vector(31 downto 0); begin v := r; wr_en := '0'; cmd_en := '0'; cmd_instr := "000"; rd_en := '0'; if (ahbsi.hready = '1') then if (ahbsi.hsel(hindex) and ahbsi.htrans(1)) = '1' then v.hsel := '1'; v.hburst := ahbsi.hburst; v.hwrite := ahbsi.hwrite; v.hsize := ahbsi.hsize; v.hmaster := ahbsi.hmaster; v.hready := '0'; if ahbsi.htrans(0) = '0' then v.haddr := ahbsi.haddr; end if; else v.hsel := '0'; v.hready := '1'; end if; v.htrans := ahbsi.htrans; end if; hwdata := ahbsi.hwdata(15 downto 0) & ahbsi.hwdata(31 downto 16); case r.hsize(1 downto 0) is when "00" => wmask := not decode(r.haddr(1 downto 0)); case r.haddr(1 downto 0) is when "00" => wmask := "1101"; when "01" => wmask := "1110"; when "10" => wmask := "0111"; when others => wmask := "1011"; end case; when "01" => wmask := not decode(r.haddr(1 downto 0)); wmask(3) := wmask(2); wmask(1) := wmask(0); when others => wmask := "0000"; end case; i.wr_mask <= wmask; cmd_bl := r.cmd_bl; case r.bstate is when idle => if v.hsel = '1' then v.bstate := start; v.hready := ahbsi.hwrite and not i.cmd_full and not i.wr_full; v.haddr := ahbsi.haddr; end if; v.cmd_bl := (others => '0'); when start => if r.hwrite = '1' then v.haddr := r.haddr; if r.hready = '1' then v.cmd_bl := r.cmd_bl + 1; v.hready := '1'; wr_en := '1'; if (ahbsi.htrans /= "11") then if v.hsel = '1' then if (ahbsi.hwrite = '0') or (i.wr_count >= "0000100") then v.hready := '0'; else v.hready := '1'; end if; else v.bstate := idle; end if; v.cmd_bl := (others => '0'); v.haddr := ahbsi.haddr; cmd_en := '1'; elsif (i.cmd_full = '1') then v.hready := '0'; elsif (i.wr_count >= "0101111") then v.hready := '0'; cmd_en := '1'; v.cmd_bl := (others => '0'); v.haddr := ahbsi.haddr; end if; else if (i.cmd_full = '0') and (i.wr_count <= "0001111") then v.hready := '1'; end if; end if; else if i.cmd_full = '0' then cmd_en := '1'; cmd_instr(0) := '1'; v.cmd_bl := "000" & not r.haddr(4 downto 2); cmd_bl := v.cmd_bl; v.bstate := read1; end if; end if; when read1 => v.hready := '0'; if (r.rd_cnt = "000000") then -- flush data from previous line if (i.rd_empty = '0') or ((r.hready = '1') and (ahbsi.htrans /= "11")) then v.hrdata(31 downto 0) := i.rd_data(15 downto 0) & i.rd_data(31 downto 16); v.hready := '1'; if (i.rd_empty = '0') then v.cmd_bl := r.cmd_bl - 1; rd_en := '1'; end if; if (r.cmd_bl = "000000") or (ahbsi.htrans /= "11") then if (ahbsi.hsel(hindex) = '1') and (ahbsi.htrans = "10") and (r.hready = '1') then v.bstate := start; v.hready := ahbsi.hwrite and not i.cmd_full and not i.wr_full; v.cmd_bl := (others => '0'); else v.bstate := idle; end if; if (i.rd_empty = '1') then v.rd_cnt := r.cmd_bl + 1; else v.rd_cnt := r.cmd_bl; end if; end if; end if; end if; when others => end case; readdata := (others => '0'); -- case apbi.paddr(5 downto 2) is -- when "0000" => readdata(nbits-1 downto 0) := r.din2; -- when "0001" => readdata(nbits-1 downto 0) := r.dout; -- when others => -- end case; readdata(20 downto 0) := i.rd_error & i.rd_overflow & i.wr_error & i.wr_underrun & i.cmd_full & i.rd_full & i.rd_empty & i.wr_full & i.wr_empty & r.rd_cnt & r.cmd_bl; if (r.rd_cnt /= "000000") and (i.rd_empty = '0') then rd_en := '1'; v.rd_cnt := r.rd_cnt - 1; end if; if rst_n_syn = '0' then v.rd_cnt := "000000"; v.bstate := idle; v.hready := '1'; end if; rin <= v; apbo.prdata <= readdata; i.rd_en <= rd_en; i.wr_en <= wr_en; i.cmd_bl <= cmd_bl; i.cmd_en <= cmd_en; i.cmd_instr <= cmd_instr; i.wr_data <= hwdata; end process; i.cmd_byte_addr <= r.haddr(29 downto 2) & "00"; ahbso.hready <= r.hready; ahbso.hresp <= "00"; --r.hresp; ahbso.hrdata <= r.hrdata; ahbso.hconfig <= hconfig; ahbso.hirq <= (others => '0'); ahbso.hindex <= hindex; ahbso.hsplit <= (others => '0'); apbo.pirq <= (others => '0'); apbo.pindex <= pindex; apbo.pconfig <= pconfig; regs : process(clk_amba) begin if rising_edge(clk_amba) then r <= rin; end if; end process; MCB_inst : entity work.mig_37 generic map( C3_RST_ACT_LOW => 1, -- pragma translate_off C3_SIMULATION => "TRUE", -- pragma translate_on C3_MEM_ADDR_ORDER => "BANK_ROW_COLUMN" ) port map ( mcb3_dram_dq => mcb3_dram_dq, mcb3_rzq => mcb3_rzq, mcb3_dram_udqs => mcb3_dram_udqs, mcb3_dram_dqs => mcb3_dram_dqs, mcb3_dram_a => mcb3_dram_a, mcb3_dram_ba => mcb3_dram_ba, mcb3_dram_cke => mcb3_dram_cke, mcb3_dram_ras_n => mcb3_dram_ras_n, mcb3_dram_cas_n => mcb3_dram_cas_n, mcb3_dram_we_n => mcb3_dram_we_n, mcb3_dram_dm => mcb3_dram_dm, mcb3_dram_udm => mcb3_dram_udm, mcb3_dram_ck => mcb3_dram_ck, mcb3_dram_ck_n => mcb3_dram_ck_n, c3_sys_clk => clk_mem, c3_sys_rst_n => rst_n_async, c3_calib_done => calib_done, c3_clk0 => open, c3_rst0 => open, c3_p0_cmd_clk => clk_amba, c3_p0_cmd_en => i.cmd_en, c3_p0_cmd_instr => i.cmd_instr, c3_p0_cmd_bl => i.cmd_bl, c3_p0_cmd_byte_addr => i.cmd_byte_addr, c3_p0_cmd_empty => i.cmd_empty, c3_p0_cmd_full => i.cmd_full, c3_p0_wr_clk => clk_amba, c3_p0_wr_en => i.wr_en, c3_p0_wr_mask => i.wr_mask, c3_p0_wr_data => i.wr_data, c3_p0_wr_full => i.wr_full, c3_p0_wr_empty => i.wr_empty, c3_p0_wr_count => i.wr_count, c3_p0_wr_underrun => i.wr_underrun, c3_p0_wr_error => i.wr_error, c3_p0_rd_clk => clk_amba, c3_p0_rd_en => i.rd_en, c3_p0_rd_data => i.rd_data, c3_p0_rd_full => i.rd_full, c3_p0_rd_empty => i.rd_empty, c3_p0_rd_count => i.rd_count, c3_p0_rd_overflow => i.rd_overflow, c3_p0_rd_error => i.rd_error ); end;
---------------------------------------------------------------------------------- -- Company: NTU ATHENS - BNL -- Engineer: Christos Bakalis ([email protected]) -- -- Copyright Notice/Copying Permission: -- Copyright 2017 Christos Bakalis -- -- This file is part of NTUA-BNL_VMM_firmware. -- -- NTUA-BNL_VMM_firmware 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 3 of the License, or -- (at your option) any later version. -- -- NTUA-BNL_VMM_firmware 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 NTUA-BNL_VMM_firmware. If not, see <http://www.gnu.org/licenses/>. -- -- Create Date: 19.12.2016 13:35:28 -- Design Name: Clock Domain Crossing Circuit -- Module Name: CDCC - RTL -- Project Name: CDCC -- Target Devices: All Xilinx devices -- Tool Versions: Vivado 2016.2 -- Description: This design instantiates a number of cascaded DFFs, which are used -- to synchronize data that are crossing clock domains. The user must provide the -- source clock and the destination clock, as well as the number of bits that are -- to be synchronized. -- -- Changelog: -- 13.01.2017 Added ASYNC_REG attribute to the XDC constraints file, and also -- added an extra layer of registers for the input signals. (Christos Bakalis) -- 02.03.2017 Removed FDREs and added simple clocked processes. (Christos Bakalis) -- ---------------------------------------------------------------------------------- library IEEE; library UNISIM; use IEEE.STD_LOGIC_1164.ALL; use UNISIM.VComponents.all; entity CDCC is generic( NUMBER_OF_BITS : integer := 8); -- number of signals to be synced port( clk_src : in std_logic; -- input clk (source clock) clk_dst : in std_logic; -- input clk (dest clock) data_in : in std_logic_vector(NUMBER_OF_BITS - 1 downto 0); -- data to be synced data_out_s : out std_logic_vector(NUMBER_OF_BITS - 1 downto 0) -- synced data to clk_dst ); end CDCC; architecture RTL of CDCC is signal data_in_reg : std_logic_vector(NUMBER_OF_BITS - 1 downto 0) := (others => '0'); signal data_sync_stage_0 : std_logic_vector(NUMBER_OF_BITS - 1 downto 0) := (others => '0'); signal data_out_s_int : std_logic_vector(NUMBER_OF_BITS - 1 downto 0) := (others => '0'); attribute ASYNC_REG : string; attribute ASYNC_REG of data_sync_stage_0 : signal is "TRUE"; attribute ASYNC_REG of data_out_s_int : signal is "TRUE"; begin ------------------------------------------------------- -- Register the input signals ------------------------------------------------------- register_input_proc: process(clk_src) begin if(rising_edge(clk_src))then data_in_reg <= data_in; end if; end process; ------------------------------------------------------- -- Double synchronization ------------------------------------------------------- meta_proc: process(clk_dst) begin if(rising_edge(clk_dst))then data_sync_stage_0 <= data_in_reg; data_out_s_int <= data_sync_stage_0; end if; end process; data_out_s <= data_out_s_int; end RTL;
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*- -- vim: tabstop=2:shiftwidth=2:noexpandtab -- kate: tab-width 2; replace-tabs off; indent-width 2; -- -- ============================================================================ -- Package: Common functions and types -- -- Authors: Thomas B. Preusser -- Martin Zabel -- Patrick Lehmann -- -- Description: -- ------------------------------------ -- For detailed documentation see below. -- -- License: -- ============================================================================ -- Copyright 2007-2014 Technische Universitaet Dresden - Germany -- Chair for VLSI-Design, Diagnostics and Architecture -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- ============================================================================ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library PoC; use PoC.utils.all; use PoC.strings.all; package vectors is -- ========================================================================== -- Type declarations -- ========================================================================== -- STD_LOGIC_VECTORs subtype T_SLV_2 is STD_LOGIC_VECTOR(1 downto 0); subtype T_SLV_3 is STD_LOGIC_VECTOR(2 downto 0); subtype T_SLV_4 is STD_LOGIC_VECTOR(3 downto 0); subtype T_SLV_8 is STD_LOGIC_VECTOR(7 downto 0); subtype T_SLV_12 is STD_LOGIC_VECTOR(11 downto 0); subtype T_SLV_16 is STD_LOGIC_VECTOR(15 downto 0); subtype T_SLV_24 is STD_LOGIC_VECTOR(23 downto 0); subtype T_SLV_32 is STD_LOGIC_VECTOR(31 downto 0); subtype T_SLV_48 is STD_LOGIC_VECTOR(47 downto 0); subtype T_SLV_64 is STD_LOGIC_VECTOR(63 downto 0); subtype T_SLV_96 is STD_LOGIC_VECTOR(95 downto 0); subtype T_SLV_128 is STD_LOGIC_VECTOR(127 downto 0); subtype T_SLV_256 is STD_LOGIC_VECTOR(255 downto 0); subtype T_SLV_512 is STD_LOGIC_VECTOR(511 downto 0); -- STD_LOGIC_VECTOR_VECTORs -- type T_SLVV is array(NATURAL range <>) of STD_LOGIC_VECTOR; -- VHDL 2008 syntax - not yet supported by Xilinx type T_SLVV_2 is array(NATURAL range <>) of T_SLV_2; type T_SLVV_3 is array(NATURAL range <>) of T_SLV_3; type T_SLVV_4 is array(NATURAL range <>) of T_SLV_4; type T_SLVV_8 is array(NATURAL range <>) of T_SLV_8; type T_SLVV_12 is array(NATURAL range <>) of T_SLV_12; type T_SLVV_16 is array(NATURAL range <>) of T_SLV_16; type T_SLVV_24 is array(NATURAL range <>) of T_SLV_24; type T_SLVV_32 is array(NATURAL range <>) of T_SLV_32; type T_SLVV_48 is array(NATURAL range <>) of T_SLV_48; type T_SLVV_64 is array(NATURAL range <>) of T_SLV_64; type T_SLVV_128 is array(NATURAL range <>) of T_SLV_128; type T_SLVV_256 is array(NATURAL range <>) of T_SLV_256; type T_SLVV_512 is array(NATURAL range <>) of T_SLV_512; -- STD_LOGIC_MATRIXs type T_SLM is array(NATURAL range <>, NATURAL range <>) of STD_LOGIC; -- ATTENTION: -- 1. you MUST initialize your matrix signal with 'Z' to get correct simulation results (iSIM, vSIM, ghdl/gtkwave) -- Example: signal myMatrix : T_SLM(3 downto 0, 7 downto 0) := (others => (others => 'Z')); -- 2. Xilinx iSIM work-around: DON'T use myMatrix'range(n) for n >= 2 -- because: myMatrix'range(2) returns always myMatrix'range(1); tested with ISE/iSIM 14.2 -- USAGE NOTES: -- dimmension 1 => rows - e.g. Words -- dimmension 2 => columns - e.g. Bits/Bytes in a word -- ========================================================================== -- Function declarations -- ========================================================================== -- slicing boundary calulations function low (lenvec : T_POSVEC; index : NATURAL) return NATURAL; function high(lenvec : T_POSVEC; index : NATURAL) return NATURAL; -- Assign procedures: assign_* procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL); -- assign vector to complete row procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; Position : NATURAL); -- assign short vector to row starting at position procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; High : NATURAL; Low : NATURAL); -- assign short vector to row in range high:low procedure assign_col(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant ColIndex : NATURAL); -- assign vector to complete column -- ATTENTION: see T_SLM definition for further details and work-arounds -- Matrix to matrix conversion: slm_slice* function slm_slice(slm : T_SLM; RowIndex : NATURAL; ColIndex : NATURAL; Height : NATURAL; Width : NATURAL) return T_SLM; -- get submatrix in boundingbox RowIndex,ColIndex,Height,Width function slm_slice_rows(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM; -- get submatrix / all rows in RowIndex range high:low function slm_slice_cols(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM; -- get submatrix / all columns in ColIndex range high:low -- Matrix concatenation: slm_merge_* function slm_merge_rows(slm1 : T_SLM; slm2 : T_SLM) return T_SLM; function slm_merge_cols(slm1 : T_SLM; slm2 : T_SLM) return T_SLM; -- Matrix to vector conversion: get_* function get_col(slm : T_SLM; ColIndex : NATURAL) return STD_LOGIC_VECTOR; -- get a matrix column function get_row(slm : T_SLM; RowIndex : NATURAL) return STD_LOGIC_VECTOR; -- get a matrix row function get_row(slm : T_SLM; RowIndex : NATURAL; Length : POSITIVE) return STD_LOGIC_VECTOR; -- get a matrix row of defined length [length - 1 downto 0] function get_row(slm : T_SLM; RowIndex : NATURAL; High : NATURAL; Low : NATURAL) return STD_LOGIC_VECTOR; -- get a sub vector of a matrix row at high:low -- Convert to vector: to_slv function to_slv(slvv : T_SLVV_2) return STD_LOGIC_VECTOR; -- convert vector-vector to flatten vector function to_slv(slvv : T_SLVV_4) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_8) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_12) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_16) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_24) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_32) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_64) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_128) return STD_LOGIC_VECTOR; -- ... function to_slv(slm : T_SLM) return STD_LOGIC_VECTOR; -- convert matrix to flatten vector -- Convert flat vector to avector-vector: to_slvv_* function to_slvv_4(slv : STD_LOGIC_VECTOR) return T_SLVV_4; -- function to_slvv_8(slv : STD_LOGIC_VECTOR) return T_SLVV_8; -- function to_slvv_12(slv : STD_LOGIC_VECTOR) return T_SLVV_12; -- function to_slvv_16(slv : STD_LOGIC_VECTOR) return T_SLVV_16; -- function to_slvv_32(slv : STD_LOGIC_VECTOR) return T_SLVV_32; -- function to_slvv_64(slv : STD_LOGIC_VECTOR) return T_SLVV_64; -- function to_slvv_128(slv : STD_LOGIC_VECTOR) return T_SLVV_128; -- function to_slvv_256(slv : STD_LOGIC_VECTOR) return T_SLVV_256; -- function to_slvv_512(slv : STD_LOGIC_VECTOR) return T_SLVV_512; -- -- Convert matrix to avector-vector: to_slvv_* function to_slvv_4(slm : T_SLM) return T_SLVV_4; -- function to_slvv_8(slm : T_SLM) return T_SLVV_8; -- function to_slvv_12(slm : T_SLM) return T_SLVV_12; -- function to_slvv_16(slm : T_SLM) return T_SLVV_16; -- function to_slvv_32(slm : T_SLM) return T_SLVV_32; -- function to_slvv_64(slm : T_SLM) return T_SLVV_64; -- function to_slvv_128(slm : T_SLM) return T_SLVV_128; -- function to_slvv_256(slm : T_SLM) return T_SLVV_256; -- function to_slvv_512(slm : T_SLM) return T_SLVV_512; -- -- Convert vector-vector to matrix: to_slm function to_slm(slv : STD_LOGIC_VECTOR; ROWS : POSITIVE; COLS : POSITIVE) return T_SLM; -- create matrix from vector function to_slm(slvv : T_SLVV_4) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_8) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_12) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_16) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_32) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_48) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_64) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_128) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_256) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_512) return T_SLM; -- create matrix from vector-vector -- Change vector direction function dir(slvv : T_SLVV_8) return T_SLVV_8; -- Reverse vector elements function rev(slvv : T_SLVV_4) return T_SLVV_4; function rev(slvv : T_SLVV_8) return T_SLVV_8; function rev(slvv : T_SLVV_12) return T_SLVV_12; function rev(slvv : T_SLVV_16) return T_SLVV_16; function rev(slvv : T_SLVV_32) return T_SLVV_32; function rev(slvv : T_SLVV_64) return T_SLVV_64; function rev(slvv : T_SLVV_128) return T_SLVV_128; function rev(slvv : T_SLVV_256) return T_SLVV_256; function rev(slvv : T_SLVV_512) return T_SLVV_512; -- TODO: function resize(slm : T_SLM; size : POSITIVE) return T_SLM; -- to_string function to_string(slvv : T_SLVV_8; sep : CHARACTER := ':') return STRING; function to_string(slm : T_SLM; groups : POSITIVE := 4; format : CHARACTER := 'b') return STRING; end package vectors; package body vectors is -- slicing boundary calulations -- ========================================================================== function low(lenvec : T_POSVEC; index : NATURAL) return NATURAL is variable pos : NATURAL := 0; begin for i in lenvec'low to index - 1 loop pos := pos + lenvec(i); end loop; return pos; end function; function high(lenvec : T_POSVEC; index : NATURAL) return NATURAL is variable pos : NATURAL := 0; begin for i in lenvec'low to index loop pos := pos + lenvec(i); end loop; return pos - 1; end function; -- Assign procedures: assign_* -- ========================================================================== procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL) is variable temp : STD_LOGIC_VECTOR(slm'high(2) downto slm'low(2)); -- Xilinx iSIM work-around, because 'range(2) evaluates to 'range(1); tested with ISE/iSIM 14.2 begin temp := slv; for i in temp'range loop slm(RowIndex, i) <= temp(i); end loop; end procedure; procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; Position : NATURAL) is variable temp : STD_LOGIC_VECTOR(Position + slv'length - 1 downto Position); begin temp := slv; for i in temp'range loop slm(RowIndex, i) <= temp(i); end loop; end procedure; procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; High : NATURAL; Low : NATURAL) is variable temp : STD_LOGIC_VECTOR(High downto Low); begin temp := slv; for i in temp'range loop slm(RowIndex, i) <= temp(i); end loop; end procedure; procedure assign_col(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant ColIndex : NATURAL) is variable temp : STD_LOGIC_VECTOR(slm'range(1)); begin temp := slv; for i in temp'range loop slm(i, ColIndex) <= temp(i); end loop; end procedure; -- Matrix to matrix conversion: slm_slice* -- ========================================================================== function slm_slice(slm : T_SLM; RowIndex : NATURAL; ColIndex : NATURAL; Height : NATURAL; Width : NATURAL) return T_SLM is variable Result : T_SLM(Height - 1 downto 0, Width - 1 downto 0) := (others => (others => '0')); begin for i in 0 to Height - 1 loop for j in 0 to Width - 1 loop Result(i, j) := slm(RowIndex + i, ColIndex + j); end loop; end loop; return Result; end function; function slm_slice_rows(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM is variable Result : T_SLM(High - Low downto 0, slm'length(2) - 1 downto 0) := (others => (others => '0')); begin for i in 0 to High - Low loop for j in 0 to slm'length(2) - 1 loop Result(i, j) := slm(Low + i, slm'low(2) + j); end loop; end loop; return Result; end function; function slm_slice_cols(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM is variable Result : T_SLM(slm'length(1) - 1 downto 0, High - Low downto 0) := (others => (others => '0')); begin for i in 0 to slm'length(1) - 1 loop for j in 0 to High - Low loop Result(i, j) := slm(slm'low(1) + i, Low + j); end loop; end loop; return Result; end function; -- Matrix concatenation: slm_merge_* function slm_merge_rows(slm1 : T_SLM; slm2 : T_SLM) return T_SLM is constant ROWS : POSITIVE := slm1'length(1) + slm2'length(1); constant COLUMNS : POSITIVE := slm1'length(2); variable slm : T_SLM(ROWS - 1 downto 0, COLUMNS - 1 downto 0); begin for i in slm1'range(1) loop for j in slm1'low(2) to slm1'high(2) loop slm(i, j) := slm1(i, j); end loop; end loop; for i in slm2'range(1) loop for j in slm2'low(2) to slm2'high(2) loop slm(slm1'length(1) + i, j) := slm2(i, j); end loop; end loop; return slm; end function; function slm_merge_cols(slm1 : T_SLM; slm2 : T_SLM) return T_SLM is constant ROWS : POSITIVE := slm1'length(1); constant COLUMNS : POSITIVE := slm1'length(2) + slm2'length(2); variable slm : T_SLM(ROWS - 1 downto 0, COLUMNS - 1 downto 0); begin for i in slm1'range(1) loop for j in slm1'low(2) to slm1'high(2) loop slm(i, j) := slm1(i, j); end loop; for j in slm2'low(2) to slm2'high(2) loop slm(i, slm1'length(2) + j) := slm2(i, j); end loop; end loop; return slm; end function; -- Matrix to vector conversion: get_* -- ========================================================================== -- get a matrix column function get_col(slm : T_SLM; ColIndex : NATURAL) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR(slm'range(1)); begin for i in slm'range(1) loop slv(i) := slm(i, ColIndex); end loop; return slv; end function; -- get a matrix row function get_row(slm : T_SLM; RowIndex : NATURAL) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR(slm'high(2) downto slm'low(2)); -- Xilinx iSIM work-around, because 'range(2) = 'range(1); tested with ISE/iSIM 14.2 begin for i in slv'range loop slv(i) := slm(RowIndex, i); end loop; return slv; end function; -- get a matrix row of defined length [length - 1 downto 0] function get_row(slm : T_SLM; RowIndex : NATURAL; Length : POSITIVE) return STD_LOGIC_VECTOR is begin return get_row(slm, RowIndex, (Length - 1), 0); end function; -- get a sub vector of a matrix row at high:low function get_row(slm : T_SLM; RowIndex : NATURAL; High : NATURAL; Low : NATURAL) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR(High downto Low); -- Xilinx iSIM work-around, because 'range(2) = 'range(1); tested with ISE/iSIM 14.2 begin for i in slv'range loop slv(i) := slm(RowIndex, i); end loop; return slv; end function; -- Convert to vector: to_slv -- ========================================================================== -- convert vector-vector to flatten vector function to_slv(slvv : T_SLVV_2) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 2) - 1 downto 0); begin for i in slvv'range loop slv((i * 2) + 1 downto (i * 2)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_4) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 4) - 1 downto 0); begin for i in slvv'range loop slv((i * 4) + 3 downto (i * 4)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_8) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 8) - 1 downto 0); begin for i in slvv'range loop slv((i * 8) + 7 downto (i * 8)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_12) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 12) - 1 downto 0); begin for i in slvv'range loop slv((i * 12) + 11 downto (i * 12)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_16) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 16) - 1 downto 0); begin for i in slvv'range loop slv((i * 16) + 15 downto (i * 16)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_24) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 24) - 1 downto 0); begin for i in slvv'range loop slv((i * 24) + 23 downto (i * 24)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_32) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 32) - 1 downto 0); begin for i in slvv'range loop slv((i * 32) + 31 downto (i * 32)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_64) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 64) - 1 downto 0); begin for i in slvv'range loop slv((i * 64) + 63 downto (i * 64)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_128) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 128) - 1 downto 0); begin for i in slvv'range loop slv((i * 128) + 127 downto (i * 128)) := slvv(i); end loop; return slv; end function; -- convert matrix to flatten vector function to_slv(slm : T_SLM) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slm'length(1) * slm'length(2)) - 1 downto 0); begin for i in slm'range(1) loop for j in slm'high(2) downto slm'low(2) loop -- Xilinx iSIM work-around, because 'range(2) evaluates to 'range(1); tested with ISE/iSIM 14.2 slv((i * slm'length(2)) + j) := slm(i, j); end loop; end loop; return slv; end function; -- Convert flat vector to a vector-vector: to_slvv_* -- ========================================================================== -- create vector-vector from vector (4 bit) function to_slvv_4(slv : STD_LOGIC_VECTOR) return T_SLVV_4 is variable Result : T_SLVV_4((slv'length / 4) - 1 downto 0); begin if ((slv'length mod 4) /= 0) then report "to_slvv_4: width mismatch - slv'length is no multiple of 4 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 4) + 3 downto (i * 4)); end loop; return Result; end function; -- create vector-vector from vector (8 bit) function to_slvv_8(slv : STD_LOGIC_VECTOR) return T_SLVV_8 is variable Result : T_SLVV_8((slv'length / 8) - 1 downto 0); begin if ((slv'length mod 8) /= 0) then report "to_slvv_8: width mismatch - slv'length is no multiple of 8 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 8) + 7 downto (i * 8)); end loop; return Result; end function; -- create vector-vector from vector (12 bit) function to_slvv_12(slv : STD_LOGIC_VECTOR) return T_SLVV_12 is variable Result : T_SLVV_12((slv'length / 12) - 1 downto 0); begin if ((slv'length mod 12) /= 0) then report "to_slvv_12: width mismatch - slv'length is no multiple of 12 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 12) + 11 downto (i * 12)); end loop; return Result; end function; -- create vector-vector from vector (16 bit) function to_slvv_16(slv : STD_LOGIC_VECTOR) return T_SLVV_16 is variable Result : T_SLVV_16((slv'length / 16) - 1 downto 0); begin if ((slv'length mod 16) /= 0) then report "to_slvv_16: width mismatch - slv'length is no multiple of 16 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 16) + 15 downto (i * 16)); end loop; return Result; end function; -- create vector-vector from vector (32 bit) function to_slvv_32(slv : STD_LOGIC_VECTOR) return T_SLVV_32 is variable Result : T_SLVV_32((slv'length / 32) - 1 downto 0); begin if ((slv'length mod 32) /= 0) then report "to_slvv_32: width mismatch - slv'length is no multiple of 32 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 32) + 31 downto (i * 32)); end loop; return Result; end function; -- create vector-vector from vector (64 bit) function to_slvv_64(slv : STD_LOGIC_VECTOR) return T_SLVV_64 is variable Result : T_SLVV_64((slv'length / 64) - 1 downto 0); begin if ((slv'length mod 64) /= 0) then report "to_slvv_64: width mismatch - slv'length is no multiple of 64 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 64) + 63 downto (i * 64)); end loop; return Result; end function; -- create vector-vector from vector (128 bit) function to_slvv_128(slv : STD_LOGIC_VECTOR) return T_SLVV_128 is variable Result : T_SLVV_128((slv'length / 128) - 1 downto 0); begin if ((slv'length mod 128) /= 0) then report "to_slvv_128: width mismatch - slv'length is no multiple of 128 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 128) + 127 downto (i * 128)); end loop; return Result; end function; -- create vector-vector from vector (256 bit) function to_slvv_256(slv : STD_LOGIC_VECTOR) return T_SLVV_256 is variable Result : T_SLVV_256((slv'length / 256) - 1 downto 0); begin if ((slv'length mod 256) /= 0) then report "to_slvv_256: width mismatch - slv'length is no multiple of 256 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 256) + 255 downto (i * 256)); end loop; return Result; end function; -- create vector-vector from vector (512 bit) function to_slvv_512(slv : STD_LOGIC_VECTOR) return T_SLVV_512 is variable Result : T_SLVV_512((slv'length / 512) - 1 downto 0); begin if ((slv'length mod 512) /= 0) then report "to_slvv_512: width mismatch - slv'length is no multiple of 512 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 512) + 511 downto (i * 512)); end loop; return Result; end function; -- Convert matrix to avector-vector: to_slvv_* -- ========================================================================== -- create vector-vector from matrix (4 bit) function to_slvv_4(slm : T_SLM) return T_SLVV_4 is variable Result : T_SLVV_4(slm'range(1)); begin if (slm'length(2) /= 4) then report "to_slvv_4: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (8 bit) function to_slvv_8(slm : T_SLM) return T_SLVV_8 is variable Result : T_SLVV_8(slm'range(1)); begin if (slm'length(2) /= 8) then report "to_slvv_8: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (12 bit) function to_slvv_12(slm : T_SLM) return T_SLVV_12 is variable Result : T_SLVV_12(slm'range(1)); begin if (slm'length(2) /= 12) then report "to_slvv_12: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (16 bit) function to_slvv_16(slm : T_SLM) return T_SLVV_16 is variable Result : T_SLVV_16(slm'range(1)); begin if (slm'length(2) /= 16) then report "to_slvv_16: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (32 bit) function to_slvv_32(slm : T_SLM) return T_SLVV_32 is variable Result : T_SLVV_32(slm'range(1)); begin if (slm'length(2) /= 32) then report "to_slvv_32: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (64 bit) function to_slvv_64(slm : T_SLM) return T_SLVV_64 is variable Result : T_SLVV_64(slm'range(1)); begin if (slm'length(2) /= 64) then report "to_slvv_64: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (128 bit) function to_slvv_128(slm : T_SLM) return T_SLVV_128 is variable Result : T_SLVV_128(slm'range(1)); begin if (slm'length(2) /= 128) then report "to_slvv_128: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (256 bit) function to_slvv_256(slm : T_SLM) return T_SLVV_256 is variable Result : T_SLVV_256(slm'range); begin if (slm'length(2) /= 256) then report "to_slvv_256: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (512 bit) function to_slvv_512(slm : T_SLM) return T_SLVV_512 is variable Result : T_SLVV_512(slm'range(1)); begin if (slm'length(2) /= 512) then report "to_slvv_512: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- Convert vector-vector to matrix: to_slm -- ========================================================================== -- create matrix from vector function to_slm(slv : STD_LOGIC_VECTOR; ROWS : POSITIVE; COLS : POSITIVE) return T_SLM is variable slm : T_SLM(ROWS - 1 downto 0, COLS - 1 downto 0); begin for i in 0 to ROWS - 1 loop for j in 0 to COLS - 1 loop slm(i, j) := slv((i * COLS) + j); end loop; end loop; return slm; end function; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_4) return T_SLM is variable slm : T_SLM(slvv'range, 3 downto 0); begin for i in slvv'range loop for j in T_SLV_4'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_8) return T_SLM is -- variable test : STD_LOGIC_VECTOR(T_SLV_8'range); -- variable slm : T_SLM(slvv'range, test'range); -- BUG: iSIM 14.5 cascaded 'range accesses let iSIM break down -- variable slm : T_SLM(slvv'range, T_SLV_8'range); -- BUG: iSIM 14.5 allocates 9 bits in dimmension 2 variable slm : T_SLM(slvv'range, 7 downto 0); begin -- report "slvv: slvv.length=" & INTEGER'image(slvv'length) & " slm.dim0.length=" & INTEGER'image(slm'length(1)) & " slm.dim1.length=" & INTEGER'image(slm'length(2)) severity NOTE; -- report "T_SLV_8: .length=" & INTEGER'image(T_SLV_8'length) & " .high=" & INTEGER'image(T_SLV_8'high) & " .low=" & INTEGER'image(T_SLV_8'low) severity NOTE; -- report "test: test.length=" & INTEGER'image(test'length) & " .high=" & INTEGER'image(test'high) & " .low=" & INTEGER'image(test'low) severity NOTE; for i in slvv'range loop for j in T_SLV_8'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_12) return T_SLM is variable slm : T_SLM(slvv'range, 11 downto 0); begin for i in slvv'range loop for j in T_SLV_12'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_16) return T_SLM is variable slm : T_SLM(slvv'range, 15 downto 0); begin for i in slvv'range loop for j in T_SLV_16'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_32) return T_SLM is variable slm : T_SLM(slvv'range, 31 downto 0); begin for i in slvv'range loop for j in T_SLV_32'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_48) return T_SLM is variable slm : T_SLM(slvv'range, 47 downto 0); begin for i in slvv'range loop for j in T_SLV_48'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_64) return T_SLM is variable slm : T_SLM(slvv'range, 63 downto 0); begin for i in slvv'range loop for j in T_SLV_64'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_128) return T_SLM is variable slm : T_SLM(slvv'range, 127 downto 0); begin for i in slvv'range loop for j in T_SLV_128'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_256) return T_SLM is variable slm : T_SLM(slvv'range, 255 downto 0); begin for i in slvv'range loop for j in T_SLV_256'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_512) return T_SLM is variable slm : T_SLM(slvv'range, 511 downto 0); begin for i in slvv'range loop for j in T_SLV_512'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; -- Change vector direction -- ========================================================================== function dir(slvv : T_SLVV_8) return T_SLVV_8 is variable Result : T_SLVV_8(slvv'reverse_range); begin Result := slvv; return Result; end function; -- Reverse vector elements function rev(slvv : T_SLVV_4) return T_SLVV_4 is variable Result : T_SLVV_4(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_8) return T_SLVV_8 is variable Result : T_SLVV_8(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_12) return T_SLVV_12 is variable Result : T_SLVV_12(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_16) return T_SLVV_16 is variable Result : T_SLVV_16(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_32) return T_SLVV_32 is variable Result : T_SLVV_32(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_64) return T_SLVV_64 is variable Result : T_SLVV_64(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_128) return T_SLVV_128 is variable Result : T_SLVV_128(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_256) return T_SLVV_256 is variable Result : T_SLVV_256(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_512) return T_SLVV_512 is variable Result : T_SLVV_512(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; -- Resize functions -- ========================================================================== -- Resizes the vector to the specified length. Input vectors larger than the specified size are truncated from the left side. Smaller input -- vectors are extended on the left by the provided fill value (default: '0'). Use the resize functions of the numeric_std package for -- value-preserving resizes of the signed and unsigned data types. function resize(slm : T_SLM; size : POSITIVE) return T_SLM is variable Result : T_SLM(size - 1 downto 0, slm'high(2) downto slm'low(2)) := (others => (others => '0')); begin for i in slm'range(1) loop for j in slm'high(2) downto slm'low(2) loop Result(i, j) := slm(i, j); end loop; end loop; return Result; end function; function to_string(slvv : T_SLVV_8; sep : CHARACTER := ':') return STRING is constant hex_len : POSITIVE := ite((sep = C_POC_NUL), (slvv'length * 2), (slvv'length * 3) - 1); variable Result : STRING(1 to hex_len) := (others => sep); variable pos : POSITIVE := 1; begin for i in slvv'range loop Result(pos to pos + 1) := to_string(slvv(i), 'h'); pos := pos + ite((sep = C_POC_NUL), 2, 3); end loop; return Result; end function; function to_string_bin(slm : T_SLM; groups : POSITIVE := 4; format : CHARACTER := 'h') return STRING is variable PerLineOverheader : POSITIVE := div_ceil(slm'length(2), groups); variable Result : STRING(1 to (slm'length(1) * (slm'length(2) + PerLineOverheader)) + 10); variable Writer : POSITIVE; variable GroupCounter : NATURAL; begin Result := (others => C_POC_NUL); Result(1) := LF; Writer := 2; GroupCounter := 0; for i in slm'low(1) to slm'high(1) loop for j in slm'high(2) downto slm'low(2) loop Result(Writer) := to_char(slm(i, j)); Writer := Writer + 1; GroupCounter := GroupCounter + 1; if (GroupCounter = groups) then Result(Writer) := ' '; Writer := Writer + 1; GroupCounter := 0; end if; end loop; Result(Writer - 1) := LF; GroupCounter := 0; end loop; return str_trim(Result); end function; function to_string(slm : T_SLM; groups : POSITIVE := 4; format : CHARACTER := 'b') return STRING is begin if (format = 'b') then return to_string_bin(slm, groups); else return "Format not supported."; end if; end function; end package body;
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*- -- vim: tabstop=2:shiftwidth=2:noexpandtab -- kate: tab-width 2; replace-tabs off; indent-width 2; -- -- ============================================================================ -- Package: Common functions and types -- -- Authors: Thomas B. Preusser -- Martin Zabel -- Patrick Lehmann -- -- Description: -- ------------------------------------ -- For detailed documentation see below. -- -- License: -- ============================================================================ -- Copyright 2007-2014 Technische Universitaet Dresden - Germany -- Chair for VLSI-Design, Diagnostics and Architecture -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- ============================================================================ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library PoC; use PoC.utils.all; use PoC.strings.all; package vectors is -- ========================================================================== -- Type declarations -- ========================================================================== -- STD_LOGIC_VECTORs subtype T_SLV_2 is STD_LOGIC_VECTOR(1 downto 0); subtype T_SLV_3 is STD_LOGIC_VECTOR(2 downto 0); subtype T_SLV_4 is STD_LOGIC_VECTOR(3 downto 0); subtype T_SLV_8 is STD_LOGIC_VECTOR(7 downto 0); subtype T_SLV_12 is STD_LOGIC_VECTOR(11 downto 0); subtype T_SLV_16 is STD_LOGIC_VECTOR(15 downto 0); subtype T_SLV_24 is STD_LOGIC_VECTOR(23 downto 0); subtype T_SLV_32 is STD_LOGIC_VECTOR(31 downto 0); subtype T_SLV_48 is STD_LOGIC_VECTOR(47 downto 0); subtype T_SLV_64 is STD_LOGIC_VECTOR(63 downto 0); subtype T_SLV_96 is STD_LOGIC_VECTOR(95 downto 0); subtype T_SLV_128 is STD_LOGIC_VECTOR(127 downto 0); subtype T_SLV_256 is STD_LOGIC_VECTOR(255 downto 0); subtype T_SLV_512 is STD_LOGIC_VECTOR(511 downto 0); -- STD_LOGIC_VECTOR_VECTORs -- type T_SLVV is array(NATURAL range <>) of STD_LOGIC_VECTOR; -- VHDL 2008 syntax - not yet supported by Xilinx type T_SLVV_2 is array(NATURAL range <>) of T_SLV_2; type T_SLVV_3 is array(NATURAL range <>) of T_SLV_3; type T_SLVV_4 is array(NATURAL range <>) of T_SLV_4; type T_SLVV_8 is array(NATURAL range <>) of T_SLV_8; type T_SLVV_12 is array(NATURAL range <>) of T_SLV_12; type T_SLVV_16 is array(NATURAL range <>) of T_SLV_16; type T_SLVV_24 is array(NATURAL range <>) of T_SLV_24; type T_SLVV_32 is array(NATURAL range <>) of T_SLV_32; type T_SLVV_48 is array(NATURAL range <>) of T_SLV_48; type T_SLVV_64 is array(NATURAL range <>) of T_SLV_64; type T_SLVV_128 is array(NATURAL range <>) of T_SLV_128; type T_SLVV_256 is array(NATURAL range <>) of T_SLV_256; type T_SLVV_512 is array(NATURAL range <>) of T_SLV_512; -- STD_LOGIC_MATRIXs type T_SLM is array(NATURAL range <>, NATURAL range <>) of STD_LOGIC; -- ATTENTION: -- 1. you MUST initialize your matrix signal with 'Z' to get correct simulation results (iSIM, vSIM, ghdl/gtkwave) -- Example: signal myMatrix : T_SLM(3 downto 0, 7 downto 0) := (others => (others => 'Z')); -- 2. Xilinx iSIM work-around: DON'T use myMatrix'range(n) for n >= 2 -- because: myMatrix'range(2) returns always myMatrix'range(1); tested with ISE/iSIM 14.2 -- USAGE NOTES: -- dimmension 1 => rows - e.g. Words -- dimmension 2 => columns - e.g. Bits/Bytes in a word -- ========================================================================== -- Function declarations -- ========================================================================== -- slicing boundary calulations function low (lenvec : T_POSVEC; index : NATURAL) return NATURAL; function high(lenvec : T_POSVEC; index : NATURAL) return NATURAL; -- Assign procedures: assign_* procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL); -- assign vector to complete row procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; Position : NATURAL); -- assign short vector to row starting at position procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; High : NATURAL; Low : NATURAL); -- assign short vector to row in range high:low procedure assign_col(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant ColIndex : NATURAL); -- assign vector to complete column -- ATTENTION: see T_SLM definition for further details and work-arounds -- Matrix to matrix conversion: slm_slice* function slm_slice(slm : T_SLM; RowIndex : NATURAL; ColIndex : NATURAL; Height : NATURAL; Width : NATURAL) return T_SLM; -- get submatrix in boundingbox RowIndex,ColIndex,Height,Width function slm_slice_rows(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM; -- get submatrix / all rows in RowIndex range high:low function slm_slice_cols(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM; -- get submatrix / all columns in ColIndex range high:low -- Matrix concatenation: slm_merge_* function slm_merge_rows(slm1 : T_SLM; slm2 : T_SLM) return T_SLM; function slm_merge_cols(slm1 : T_SLM; slm2 : T_SLM) return T_SLM; -- Matrix to vector conversion: get_* function get_col(slm : T_SLM; ColIndex : NATURAL) return STD_LOGIC_VECTOR; -- get a matrix column function get_row(slm : T_SLM; RowIndex : NATURAL) return STD_LOGIC_VECTOR; -- get a matrix row function get_row(slm : T_SLM; RowIndex : NATURAL; Length : POSITIVE) return STD_LOGIC_VECTOR; -- get a matrix row of defined length [length - 1 downto 0] function get_row(slm : T_SLM; RowIndex : NATURAL; High : NATURAL; Low : NATURAL) return STD_LOGIC_VECTOR; -- get a sub vector of a matrix row at high:low -- Convert to vector: to_slv function to_slv(slvv : T_SLVV_2) return STD_LOGIC_VECTOR; -- convert vector-vector to flatten vector function to_slv(slvv : T_SLVV_4) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_8) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_12) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_16) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_24) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_32) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_64) return STD_LOGIC_VECTOR; -- ... function to_slv(slvv : T_SLVV_128) return STD_LOGIC_VECTOR; -- ... function to_slv(slm : T_SLM) return STD_LOGIC_VECTOR; -- convert matrix to flatten vector -- Convert flat vector to avector-vector: to_slvv_* function to_slvv_4(slv : STD_LOGIC_VECTOR) return T_SLVV_4; -- function to_slvv_8(slv : STD_LOGIC_VECTOR) return T_SLVV_8; -- function to_slvv_12(slv : STD_LOGIC_VECTOR) return T_SLVV_12; -- function to_slvv_16(slv : STD_LOGIC_VECTOR) return T_SLVV_16; -- function to_slvv_32(slv : STD_LOGIC_VECTOR) return T_SLVV_32; -- function to_slvv_64(slv : STD_LOGIC_VECTOR) return T_SLVV_64; -- function to_slvv_128(slv : STD_LOGIC_VECTOR) return T_SLVV_128; -- function to_slvv_256(slv : STD_LOGIC_VECTOR) return T_SLVV_256; -- function to_slvv_512(slv : STD_LOGIC_VECTOR) return T_SLVV_512; -- -- Convert matrix to avector-vector: to_slvv_* function to_slvv_4(slm : T_SLM) return T_SLVV_4; -- function to_slvv_8(slm : T_SLM) return T_SLVV_8; -- function to_slvv_12(slm : T_SLM) return T_SLVV_12; -- function to_slvv_16(slm : T_SLM) return T_SLVV_16; -- function to_slvv_32(slm : T_SLM) return T_SLVV_32; -- function to_slvv_64(slm : T_SLM) return T_SLVV_64; -- function to_slvv_128(slm : T_SLM) return T_SLVV_128; -- function to_slvv_256(slm : T_SLM) return T_SLVV_256; -- function to_slvv_512(slm : T_SLM) return T_SLVV_512; -- -- Convert vector-vector to matrix: to_slm function to_slm(slv : STD_LOGIC_VECTOR; ROWS : POSITIVE; COLS : POSITIVE) return T_SLM; -- create matrix from vector function to_slm(slvv : T_SLVV_4) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_8) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_12) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_16) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_32) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_48) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_64) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_128) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_256) return T_SLM; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_512) return T_SLM; -- create matrix from vector-vector -- Change vector direction function dir(slvv : T_SLVV_8) return T_SLVV_8; -- Reverse vector elements function rev(slvv : T_SLVV_4) return T_SLVV_4; function rev(slvv : T_SLVV_8) return T_SLVV_8; function rev(slvv : T_SLVV_12) return T_SLVV_12; function rev(slvv : T_SLVV_16) return T_SLVV_16; function rev(slvv : T_SLVV_32) return T_SLVV_32; function rev(slvv : T_SLVV_64) return T_SLVV_64; function rev(slvv : T_SLVV_128) return T_SLVV_128; function rev(slvv : T_SLVV_256) return T_SLVV_256; function rev(slvv : T_SLVV_512) return T_SLVV_512; -- TODO: function resize(slm : T_SLM; size : POSITIVE) return T_SLM; -- to_string function to_string(slvv : T_SLVV_8; sep : CHARACTER := ':') return STRING; function to_string(slm : T_SLM; groups : POSITIVE := 4; format : CHARACTER := 'b') return STRING; end package vectors; package body vectors is -- slicing boundary calulations -- ========================================================================== function low(lenvec : T_POSVEC; index : NATURAL) return NATURAL is variable pos : NATURAL := 0; begin for i in lenvec'low to index - 1 loop pos := pos + lenvec(i); end loop; return pos; end function; function high(lenvec : T_POSVEC; index : NATURAL) return NATURAL is variable pos : NATURAL := 0; begin for i in lenvec'low to index loop pos := pos + lenvec(i); end loop; return pos - 1; end function; -- Assign procedures: assign_* -- ========================================================================== procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL) is variable temp : STD_LOGIC_VECTOR(slm'high(2) downto slm'low(2)); -- Xilinx iSIM work-around, because 'range(2) evaluates to 'range(1); tested with ISE/iSIM 14.2 begin temp := slv; for i in temp'range loop slm(RowIndex, i) <= temp(i); end loop; end procedure; procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; Position : NATURAL) is variable temp : STD_LOGIC_VECTOR(Position + slv'length - 1 downto Position); begin temp := slv; for i in temp'range loop slm(RowIndex, i) <= temp(i); end loop; end procedure; procedure assign_row(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant RowIndex : NATURAL; High : NATURAL; Low : NATURAL) is variable temp : STD_LOGIC_VECTOR(High downto Low); begin temp := slv; for i in temp'range loop slm(RowIndex, i) <= temp(i); end loop; end procedure; procedure assign_col(signal slm : out T_SLM; slv : STD_LOGIC_VECTOR; constant ColIndex : NATURAL) is variable temp : STD_LOGIC_VECTOR(slm'range(1)); begin temp := slv; for i in temp'range loop slm(i, ColIndex) <= temp(i); end loop; end procedure; -- Matrix to matrix conversion: slm_slice* -- ========================================================================== function slm_slice(slm : T_SLM; RowIndex : NATURAL; ColIndex : NATURAL; Height : NATURAL; Width : NATURAL) return T_SLM is variable Result : T_SLM(Height - 1 downto 0, Width - 1 downto 0) := (others => (others => '0')); begin for i in 0 to Height - 1 loop for j in 0 to Width - 1 loop Result(i, j) := slm(RowIndex + i, ColIndex + j); end loop; end loop; return Result; end function; function slm_slice_rows(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM is variable Result : T_SLM(High - Low downto 0, slm'length(2) - 1 downto 0) := (others => (others => '0')); begin for i in 0 to High - Low loop for j in 0 to slm'length(2) - 1 loop Result(i, j) := slm(Low + i, slm'low(2) + j); end loop; end loop; return Result; end function; function slm_slice_cols(slm : T_SLM; High : NATURAL; Low : NATURAL) return T_SLM is variable Result : T_SLM(slm'length(1) - 1 downto 0, High - Low downto 0) := (others => (others => '0')); begin for i in 0 to slm'length(1) - 1 loop for j in 0 to High - Low loop Result(i, j) := slm(slm'low(1) + i, Low + j); end loop; end loop; return Result; end function; -- Matrix concatenation: slm_merge_* function slm_merge_rows(slm1 : T_SLM; slm2 : T_SLM) return T_SLM is constant ROWS : POSITIVE := slm1'length(1) + slm2'length(1); constant COLUMNS : POSITIVE := slm1'length(2); variable slm : T_SLM(ROWS - 1 downto 0, COLUMNS - 1 downto 0); begin for i in slm1'range(1) loop for j in slm1'low(2) to slm1'high(2) loop slm(i, j) := slm1(i, j); end loop; end loop; for i in slm2'range(1) loop for j in slm2'low(2) to slm2'high(2) loop slm(slm1'length(1) + i, j) := slm2(i, j); end loop; end loop; return slm; end function; function slm_merge_cols(slm1 : T_SLM; slm2 : T_SLM) return T_SLM is constant ROWS : POSITIVE := slm1'length(1); constant COLUMNS : POSITIVE := slm1'length(2) + slm2'length(2); variable slm : T_SLM(ROWS - 1 downto 0, COLUMNS - 1 downto 0); begin for i in slm1'range(1) loop for j in slm1'low(2) to slm1'high(2) loop slm(i, j) := slm1(i, j); end loop; for j in slm2'low(2) to slm2'high(2) loop slm(i, slm1'length(2) + j) := slm2(i, j); end loop; end loop; return slm; end function; -- Matrix to vector conversion: get_* -- ========================================================================== -- get a matrix column function get_col(slm : T_SLM; ColIndex : NATURAL) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR(slm'range(1)); begin for i in slm'range(1) loop slv(i) := slm(i, ColIndex); end loop; return slv; end function; -- get a matrix row function get_row(slm : T_SLM; RowIndex : NATURAL) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR(slm'high(2) downto slm'low(2)); -- Xilinx iSIM work-around, because 'range(2) = 'range(1); tested with ISE/iSIM 14.2 begin for i in slv'range loop slv(i) := slm(RowIndex, i); end loop; return slv; end function; -- get a matrix row of defined length [length - 1 downto 0] function get_row(slm : T_SLM; RowIndex : NATURAL; Length : POSITIVE) return STD_LOGIC_VECTOR is begin return get_row(slm, RowIndex, (Length - 1), 0); end function; -- get a sub vector of a matrix row at high:low function get_row(slm : T_SLM; RowIndex : NATURAL; High : NATURAL; Low : NATURAL) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR(High downto Low); -- Xilinx iSIM work-around, because 'range(2) = 'range(1); tested with ISE/iSIM 14.2 begin for i in slv'range loop slv(i) := slm(RowIndex, i); end loop; return slv; end function; -- Convert to vector: to_slv -- ========================================================================== -- convert vector-vector to flatten vector function to_slv(slvv : T_SLVV_2) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 2) - 1 downto 0); begin for i in slvv'range loop slv((i * 2) + 1 downto (i * 2)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_4) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 4) - 1 downto 0); begin for i in slvv'range loop slv((i * 4) + 3 downto (i * 4)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_8) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 8) - 1 downto 0); begin for i in slvv'range loop slv((i * 8) + 7 downto (i * 8)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_12) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 12) - 1 downto 0); begin for i in slvv'range loop slv((i * 12) + 11 downto (i * 12)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_16) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 16) - 1 downto 0); begin for i in slvv'range loop slv((i * 16) + 15 downto (i * 16)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_24) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 24) - 1 downto 0); begin for i in slvv'range loop slv((i * 24) + 23 downto (i * 24)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_32) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 32) - 1 downto 0); begin for i in slvv'range loop slv((i * 32) + 31 downto (i * 32)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_64) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 64) - 1 downto 0); begin for i in slvv'range loop slv((i * 64) + 63 downto (i * 64)) := slvv(i); end loop; return slv; end function; function to_slv(slvv : T_SLVV_128) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slvv'length * 128) - 1 downto 0); begin for i in slvv'range loop slv((i * 128) + 127 downto (i * 128)) := slvv(i); end loop; return slv; end function; -- convert matrix to flatten vector function to_slv(slm : T_SLM) return STD_LOGIC_VECTOR is variable slv : STD_LOGIC_VECTOR((slm'length(1) * slm'length(2)) - 1 downto 0); begin for i in slm'range(1) loop for j in slm'high(2) downto slm'low(2) loop -- Xilinx iSIM work-around, because 'range(2) evaluates to 'range(1); tested with ISE/iSIM 14.2 slv((i * slm'length(2)) + j) := slm(i, j); end loop; end loop; return slv; end function; -- Convert flat vector to a vector-vector: to_slvv_* -- ========================================================================== -- create vector-vector from vector (4 bit) function to_slvv_4(slv : STD_LOGIC_VECTOR) return T_SLVV_4 is variable Result : T_SLVV_4((slv'length / 4) - 1 downto 0); begin if ((slv'length mod 4) /= 0) then report "to_slvv_4: width mismatch - slv'length is no multiple of 4 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 4) + 3 downto (i * 4)); end loop; return Result; end function; -- create vector-vector from vector (8 bit) function to_slvv_8(slv : STD_LOGIC_VECTOR) return T_SLVV_8 is variable Result : T_SLVV_8((slv'length / 8) - 1 downto 0); begin if ((slv'length mod 8) /= 0) then report "to_slvv_8: width mismatch - slv'length is no multiple of 8 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 8) + 7 downto (i * 8)); end loop; return Result; end function; -- create vector-vector from vector (12 bit) function to_slvv_12(slv : STD_LOGIC_VECTOR) return T_SLVV_12 is variable Result : T_SLVV_12((slv'length / 12) - 1 downto 0); begin if ((slv'length mod 12) /= 0) then report "to_slvv_12: width mismatch - slv'length is no multiple of 12 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 12) + 11 downto (i * 12)); end loop; return Result; end function; -- create vector-vector from vector (16 bit) function to_slvv_16(slv : STD_LOGIC_VECTOR) return T_SLVV_16 is variable Result : T_SLVV_16((slv'length / 16) - 1 downto 0); begin if ((slv'length mod 16) /= 0) then report "to_slvv_16: width mismatch - slv'length is no multiple of 16 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 16) + 15 downto (i * 16)); end loop; return Result; end function; -- create vector-vector from vector (32 bit) function to_slvv_32(slv : STD_LOGIC_VECTOR) return T_SLVV_32 is variable Result : T_SLVV_32((slv'length / 32) - 1 downto 0); begin if ((slv'length mod 32) /= 0) then report "to_slvv_32: width mismatch - slv'length is no multiple of 32 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 32) + 31 downto (i * 32)); end loop; return Result; end function; -- create vector-vector from vector (64 bit) function to_slvv_64(slv : STD_LOGIC_VECTOR) return T_SLVV_64 is variable Result : T_SLVV_64((slv'length / 64) - 1 downto 0); begin if ((slv'length mod 64) /= 0) then report "to_slvv_64: width mismatch - slv'length is no multiple of 64 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 64) + 63 downto (i * 64)); end loop; return Result; end function; -- create vector-vector from vector (128 bit) function to_slvv_128(slv : STD_LOGIC_VECTOR) return T_SLVV_128 is variable Result : T_SLVV_128((slv'length / 128) - 1 downto 0); begin if ((slv'length mod 128) /= 0) then report "to_slvv_128: width mismatch - slv'length is no multiple of 128 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 128) + 127 downto (i * 128)); end loop; return Result; end function; -- create vector-vector from vector (256 bit) function to_slvv_256(slv : STD_LOGIC_VECTOR) return T_SLVV_256 is variable Result : T_SLVV_256((slv'length / 256) - 1 downto 0); begin if ((slv'length mod 256) /= 0) then report "to_slvv_256: width mismatch - slv'length is no multiple of 256 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 256) + 255 downto (i * 256)); end loop; return Result; end function; -- create vector-vector from vector (512 bit) function to_slvv_512(slv : STD_LOGIC_VECTOR) return T_SLVV_512 is variable Result : T_SLVV_512((slv'length / 512) - 1 downto 0); begin if ((slv'length mod 512) /= 0) then report "to_slvv_512: width mismatch - slv'length is no multiple of 512 (slv'length=" & INTEGER'image(slv'length) & ")" severity FAILURE; end if; for i in Result'range loop Result(i) := slv((i * 512) + 511 downto (i * 512)); end loop; return Result; end function; -- Convert matrix to avector-vector: to_slvv_* -- ========================================================================== -- create vector-vector from matrix (4 bit) function to_slvv_4(slm : T_SLM) return T_SLVV_4 is variable Result : T_SLVV_4(slm'range(1)); begin if (slm'length(2) /= 4) then report "to_slvv_4: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (8 bit) function to_slvv_8(slm : T_SLM) return T_SLVV_8 is variable Result : T_SLVV_8(slm'range(1)); begin if (slm'length(2) /= 8) then report "to_slvv_8: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (12 bit) function to_slvv_12(slm : T_SLM) return T_SLVV_12 is variable Result : T_SLVV_12(slm'range(1)); begin if (slm'length(2) /= 12) then report "to_slvv_12: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (16 bit) function to_slvv_16(slm : T_SLM) return T_SLVV_16 is variable Result : T_SLVV_16(slm'range(1)); begin if (slm'length(2) /= 16) then report "to_slvv_16: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (32 bit) function to_slvv_32(slm : T_SLM) return T_SLVV_32 is variable Result : T_SLVV_32(slm'range(1)); begin if (slm'length(2) /= 32) then report "to_slvv_32: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (64 bit) function to_slvv_64(slm : T_SLM) return T_SLVV_64 is variable Result : T_SLVV_64(slm'range(1)); begin if (slm'length(2) /= 64) then report "to_slvv_64: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (128 bit) function to_slvv_128(slm : T_SLM) return T_SLVV_128 is variable Result : T_SLVV_128(slm'range(1)); begin if (slm'length(2) /= 128) then report "to_slvv_128: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (256 bit) function to_slvv_256(slm : T_SLM) return T_SLVV_256 is variable Result : T_SLVV_256(slm'range); begin if (slm'length(2) /= 256) then report "to_slvv_256: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- create vector-vector from matrix (512 bit) function to_slvv_512(slm : T_SLM) return T_SLVV_512 is variable Result : T_SLVV_512(slm'range(1)); begin if (slm'length(2) /= 512) then report "to_slvv_512: type mismatch - slm'length(2)=" & INTEGER'image(slm'length(2)) severity FAILURE; end if; for i in slm'range(1) loop Result(i) := get_row(slm, i); end loop; return Result; end function; -- Convert vector-vector to matrix: to_slm -- ========================================================================== -- create matrix from vector function to_slm(slv : STD_LOGIC_VECTOR; ROWS : POSITIVE; COLS : POSITIVE) return T_SLM is variable slm : T_SLM(ROWS - 1 downto 0, COLS - 1 downto 0); begin for i in 0 to ROWS - 1 loop for j in 0 to COLS - 1 loop slm(i, j) := slv((i * COLS) + j); end loop; end loop; return slm; end function; -- create matrix from vector-vector function to_slm(slvv : T_SLVV_4) return T_SLM is variable slm : T_SLM(slvv'range, 3 downto 0); begin for i in slvv'range loop for j in T_SLV_4'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_8) return T_SLM is -- variable test : STD_LOGIC_VECTOR(T_SLV_8'range); -- variable slm : T_SLM(slvv'range, test'range); -- BUG: iSIM 14.5 cascaded 'range accesses let iSIM break down -- variable slm : T_SLM(slvv'range, T_SLV_8'range); -- BUG: iSIM 14.5 allocates 9 bits in dimmension 2 variable slm : T_SLM(slvv'range, 7 downto 0); begin -- report "slvv: slvv.length=" & INTEGER'image(slvv'length) & " slm.dim0.length=" & INTEGER'image(slm'length(1)) & " slm.dim1.length=" & INTEGER'image(slm'length(2)) severity NOTE; -- report "T_SLV_8: .length=" & INTEGER'image(T_SLV_8'length) & " .high=" & INTEGER'image(T_SLV_8'high) & " .low=" & INTEGER'image(T_SLV_8'low) severity NOTE; -- report "test: test.length=" & INTEGER'image(test'length) & " .high=" & INTEGER'image(test'high) & " .low=" & INTEGER'image(test'low) severity NOTE; for i in slvv'range loop for j in T_SLV_8'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_12) return T_SLM is variable slm : T_SLM(slvv'range, 11 downto 0); begin for i in slvv'range loop for j in T_SLV_12'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_16) return T_SLM is variable slm : T_SLM(slvv'range, 15 downto 0); begin for i in slvv'range loop for j in T_SLV_16'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_32) return T_SLM is variable slm : T_SLM(slvv'range, 31 downto 0); begin for i in slvv'range loop for j in T_SLV_32'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_48) return T_SLM is variable slm : T_SLM(slvv'range, 47 downto 0); begin for i in slvv'range loop for j in T_SLV_48'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_64) return T_SLM is variable slm : T_SLM(slvv'range, 63 downto 0); begin for i in slvv'range loop for j in T_SLV_64'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_128) return T_SLM is variable slm : T_SLM(slvv'range, 127 downto 0); begin for i in slvv'range loop for j in T_SLV_128'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_256) return T_SLM is variable slm : T_SLM(slvv'range, 255 downto 0); begin for i in slvv'range loop for j in T_SLV_256'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; function to_slm(slvv : T_SLVV_512) return T_SLM is variable slm : T_SLM(slvv'range, 511 downto 0); begin for i in slvv'range loop for j in T_SLV_512'range loop slm(i, j) := slvv(i)(j); end loop; end loop; return slm; end function; -- Change vector direction -- ========================================================================== function dir(slvv : T_SLVV_8) return T_SLVV_8 is variable Result : T_SLVV_8(slvv'reverse_range); begin Result := slvv; return Result; end function; -- Reverse vector elements function rev(slvv : T_SLVV_4) return T_SLVV_4 is variable Result : T_SLVV_4(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_8) return T_SLVV_8 is variable Result : T_SLVV_8(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_12) return T_SLVV_12 is variable Result : T_SLVV_12(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_16) return T_SLVV_16 is variable Result : T_SLVV_16(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_32) return T_SLVV_32 is variable Result : T_SLVV_32(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_64) return T_SLVV_64 is variable Result : T_SLVV_64(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_128) return T_SLVV_128 is variable Result : T_SLVV_128(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_256) return T_SLVV_256 is variable Result : T_SLVV_256(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; function rev(slvv : T_SLVV_512) return T_SLVV_512 is variable Result : T_SLVV_512(slvv'range); begin for i in slvv'low to slvv'high loop Result(slvv'high - i) := slvv(i); end loop; return Result; end function; -- Resize functions -- ========================================================================== -- Resizes the vector to the specified length. Input vectors larger than the specified size are truncated from the left side. Smaller input -- vectors are extended on the left by the provided fill value (default: '0'). Use the resize functions of the numeric_std package for -- value-preserving resizes of the signed and unsigned data types. function resize(slm : T_SLM; size : POSITIVE) return T_SLM is variable Result : T_SLM(size - 1 downto 0, slm'high(2) downto slm'low(2)) := (others => (others => '0')); begin for i in slm'range(1) loop for j in slm'high(2) downto slm'low(2) loop Result(i, j) := slm(i, j); end loop; end loop; return Result; end function; function to_string(slvv : T_SLVV_8; sep : CHARACTER := ':') return STRING is constant hex_len : POSITIVE := ite((sep = C_POC_NUL), (slvv'length * 2), (slvv'length * 3) - 1); variable Result : STRING(1 to hex_len) := (others => sep); variable pos : POSITIVE := 1; begin for i in slvv'range loop Result(pos to pos + 1) := to_string(slvv(i), 'h'); pos := pos + ite((sep = C_POC_NUL), 2, 3); end loop; return Result; end function; function to_string_bin(slm : T_SLM; groups : POSITIVE := 4; format : CHARACTER := 'h') return STRING is variable PerLineOverheader : POSITIVE := div_ceil(slm'length(2), groups); variable Result : STRING(1 to (slm'length(1) * (slm'length(2) + PerLineOverheader)) + 10); variable Writer : POSITIVE; variable GroupCounter : NATURAL; begin Result := (others => C_POC_NUL); Result(1) := LF; Writer := 2; GroupCounter := 0; for i in slm'low(1) to slm'high(1) loop for j in slm'high(2) downto slm'low(2) loop Result(Writer) := to_char(slm(i, j)); Writer := Writer + 1; GroupCounter := GroupCounter + 1; if (GroupCounter = groups) then Result(Writer) := ' '; Writer := Writer + 1; GroupCounter := 0; end if; end loop; Result(Writer - 1) := LF; GroupCounter := 0; end loop; return str_trim(Result); end function; function to_string(slm : T_SLM; groups : POSITIVE := 4; format : CHARACTER := 'b') return STRING is begin if (format = 'b') then return to_string_bin(slm, groups); else return "Format not supported."; end if; end function; end package body;
-------------------------------------------------------------------------------- -- -- LAB #5 - Processor Elements -- -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY SmallBusMux2to1 IS PORT(selector : IN STD_LOGIC; In0, In1 : IN STD_LOGIC_VECTOR(4 DOWNTO 0); Result : OUT STD_LOGIC_VECTOR(4 DOWNTO 0) ); END ENTITY SmallBusMux2to1; ARCHITECTURE switching OF SmallBusMux2to1 IS BEGIN WITH selector SELECT Result <= In0 WHEN '0', In1 WHEN OTHERS; END ARCHITECTURE switching; -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY BusMux2to1 IS PORT(selector : IN STD_LOGIC; In0, In1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0); Result : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END ENTITY BusMux2to1; ARCHITECTURE selection OF BusMux2to1 IS BEGIN WITH selector SELECT Result <= In0 WHEN '0', In1 WHEN OTHERS; END ARCHITECTURE selection; -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY Control IS PORT ( opcode : IN STD_LOGIC_VECTOR (5 DOWNTO 0); clk : IN STD_LOGIC; RegDst : OUT STD_LOGIC; Branch : OUT STD_LOGIC; MemRead : OUT STD_LOGIC; MemtoReg : OUT STD_LOGIC; ALUOp : OUT STD_LOGIC_VECTOR(1 DOWNTO 0); MemWrite : OUT STD_LOGIC; ALUSrc : OUT STD_LOGIC; RegWrite : OUT STD_LOGIC); END Control; ARCHITECTURE Boss OF Control IS BEGIN -- selects register to be written to -- instruction(15-11) when = '1' -- instruction(20-16) when = '0' RegDst <= '1' WHEN opcode(5 DOWNTO 0) = "000000" ELSE '0'; -- defines source of 1st input to MUX(M2) -- registers for '0' (R-type) -- sign extender for '1' (I-type) ALUSrc <= '0' WHEN opcode(5 DOWNTO 0) = "000000" ELSE '1'; -- flag bit for LW op -- input to 32-bit MZ mux MemtoReg <= '1' WHEN opcode(5 DOWNTO 0) = "100011" ELSE '0'; -- flag bit for register write -- '0' for SW op -- else writes on clock = '0' (between cycles) RegWrite <= '0' WHEN opcode(5 DOWNTO 0) = "101011" ELSE not(clk); -- flag bit for lw op -- toggles DataMemRead bit in processor MemRead <= '1' WHEN opcode(5 DOWNTO 0) = "100011" ELSE '0'; -- flag bit for SW op -- toggles DataMemWrite bit in processor MemWrite <= '1' WHEN opcode(5 DOWNTO 0) = "101011" ELSE '0'; -- In to ALU control -- Defines which type of op to be performed ALUOp <= "01" WHEN opcode(5 DOWNTO 0) = "000000" ELSE -- R-Type "10" WHEN opcode(5 DOWNTO 0) = "001101" ELSE -- or, ori "00"; -- LW, SW END Boss; -------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY ALUControl IS PORT(op : IN STD_LOGIC_VECTOR(1 DOWNTO 0); funct : IN STD_LOGIC_VECTOR(5 DOWNTO 0); aluctrl : OUT STD_LOGIC_VECTOR(4 DOWNTO 0); ShiftReg : OUT STD_LOGIC); END ENTITY ALUControl; ARCHITECTURE bossy OF ALUControl IS SIGNAL tempctrl: STD_LOGIC_VECTOR(4 DOWNTO 0); BEGIN tempctrl <= "00000" WHEN op = "00" ELSE "00011" WHEN op = "10" ELSE "00000" WHEN op = "01" and funct = "100000" ELSE -- add op "00001" WHEN op = "01" and funct = "100010" ELSE -- sub op "00010" WHEN op = "01" and funct = "100100" ELSE -- or op "00011" WHEN op = "01" and funct = "100101" ELSE -- ori op "00100" WHEN op = "01" and funct = "000000" ELSE -- srl op "00101" WHEN op = "01" and funct = "000010" ELSE -- sll op "11111"; ShiftReg <= '1' WHEN tempctrl = "00100" or tempctrl = "00101" ELSE '0'; aluctrl <= tempctrl; END ARCHITECTURE bossy; ---------------------------------------------------------------------------------------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY Registers IS PORT(ReadReg1 : IN STD_LOGIC_VECTOR(4 DOWNTO 0); ReadReg2 : IN STD_LOGIC_VECTOR(4 DOWNTO 0); WriteReg : IN STD_LOGIC_VECTOR(4 DOWNTO 0); WriteData : IN STD_LOGIC_VECTOR(31 DOWNTO 0); WriteCmd : IN STD_LOGIC; ReadData1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0); ReadData2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0)); END ENTITY Registers; ARCHITECTURE remember OF Registers IS COMPONENT register32 port(datain : IN STD_LOGIC_VECTOR(31 DOWNTO 0); enout32, enout16, enout8 : IN STD_LOGIC; writein32, writein16, writein8 : IN STD_LOGIC; dataout : OUT STD_LOGIC_VECTOR(31 DOWNTO 0)); END COMPONENT; SIGNAL rzero, at, v0, v1, a0, a1, a2, a3, t0, t1, t2, t3, t4, t5, t6, t7, s0, s1, s2, s3, s4, s5, s6, s7, t8, t9, k0, k1, gp, sp, fp, ra: STD_LOGIC_VECTOR(31 DOWNTO 0); SIGNAL writeit : STD_LOGIC_VECTOR(31 DOWNTO 0); BEGIN zero: register32 PORT MAP(WriteData,'0','0','0',writeit(0),'0','0',rzero); rAT: register32 PORT MAP(WriteData,'0','0','0',writeit(1),'0','0',at); rV0: register32 PORT MAP(WriteData,'0','0','0',writeit(2),'0','0',v0); rV1: register32 PORT MAP(WriteData,'0','0','0',writeit(3),'0','0',v1); rA0: register32 PORT MAP(WriteData,'0','0','0',writeit(4),'0','0',a0); rA1: register32 PORT MAP(WriteData,'0','0','0',writeit(5),'0','0',a1); rA2: register32 PORT MAP(WriteData,'0','0','0',writeit(6),'0','0',a2); rA3: register32 PORT MAP(WriteData,'0','0','0',writeit(7),'0','0',a3); rT0: register32 PORT MAP(WriteData,'0','0','0',writeit(8),'0','0',t0); rT1: register32 PORT MAP(WriteData,'0','0','0',writeit(9),'0','0',t1); rT2: register32 PORT MAP(WriteData,'0','0','0',writeit(10),'0','0',t2); rT3: register32 PORT MAP(WriteData,'0','0','0',writeit(11),'0','0',t3); rT4: register32 PORT MAP(WriteData,'0','0','0',writeit(12),'0','0',t4); rT5: register32 PORT MAP(WriteData,'0','0','0',writeit(13),'0','0',t5); rT6: register32 PORT MAP(WriteData,'0','0','0',writeit(14),'0','0',t6); rT7: register32 PORT MAP(WriteData,'0','0','0',writeit(15),'0','0',t7); rS0: register32 PORT MAP(WriteData,'0','0','0',writeit(16),'0','0',s0); rS1: register32 PORT MAP(WriteData,'0','0','0',writeit(17),'0','0',s1); rS2: register32 PORT MAP(WriteData,'0','0','0',writeit(18),'0','0',s2); rS3: register32 PORT MAP(WriteData,'0','0','0',writeit(19),'0','0',s3); rS4: register32 PORT MAP(WriteData,'0','0','0',writeit(20),'0','0',s4); rS5: register32 PORT MAP(WriteData,'0','0','0',writeit(21),'0','0',s5); rS6: register32 PORT MAP(WriteData,'0','0','0',writeit(22),'0','0',s6); rS7: register32 PORT MAP(WriteData,'0','0','0',writeit(23),'0','0',s7); rT8: register32 PORT MAP(WriteData,'0','0','0',writeit(24),'0','0',t8); rT9: register32 PORT MAP(WriteData,'0','0','0',writeit(25),'0','0',t9); rK0: register32 PORT MAP(WriteData,'0','0','0',writeit(26),'0','0',k0); rK1: register32 PORT MAP(WriteData,'0','0','0',writeit(27),'0','0',k1); rGp: register32 PORT MAP(WriteData,'0','0','0',writeit(28),'0','0',gp); rSp: register32 PORT MAP(WriteData,'0','0','0',writeit(29),'0','0',sp); rFp: register32 PORT MAP(WriteData,'0','0','0',writeit(30),'0','0',fp); rRa: register32 PORT MAP(WriteData,'0','0','0',writeit(31),'0','0',ra); writeit <= x"00000001" WHEN WriteReg = "00001" and WriteCmd = '1' ELSE --01 x"00000002" WHEN WriteReg = "00010" and WriteCmd = '1' ELSE --02 x"00000003" WHEN WriteReg = "00011" and WriteCmd = '1' ELSE --03 x"00000004" WHEN WriteReg = "00100" and WriteCmd = '1' ELSE --04 x"00000005" WHEN WriteReg = "00101" and WriteCmd = '1' ELSE --05 x"00000006" WHEN WriteReg = "00110" and WriteCmd = '1' ELSE --06 x"00000007" WHEN WriteReg = "00111" and WriteCmd = '1' ELSE --07 x"00000008" WHEN WriteReg = "01000" and WriteCmd = '1' ELSE --08 x"00000009" WHEN WriteReg = "01001" and WriteCmd = '1' ELSE --09 x"0000000A" WHEN WriteReg = "01010" and WriteCmd = '1' ELSE --10 x"0000000B" WHEN WriteReg = "01011" and WriteCmd = '1' ELSE --11 x"0000000C" WHEN WriteReg = "01100" and WriteCmd = '1' ELSE --12 x"0000000D" WHEN WriteReg = "01101" and WriteCmd = '1' ELSE --13 x"0000000E" WHEN WriteReg = "01110" and WriteCmd = '1' ELSE --14 x"0000000F" WHEN WriteReg = "01111" and WriteCmd = '1' ELSE --15 x"00000010" WHEN WriteReg = "10000" and WriteCmd = '1' ELSE --16 x"00000011" WHEN WriteReg = "10001" and WriteCmd = '1' ELSE --17 x"00000012" WHEN WriteReg = "10010" and WriteCmd = '1' ELSE --18 x"00000013" WHEN WriteReg = "10011" and WriteCmd = '1' ELSE --19 x"00000014" WHEN WriteReg = "10100" and WriteCmd = '1' ELSE --20 x"00000015" WHEN WriteReg = "10101" and WriteCmd = '1' ELSE --21 x"00000016" WHEN WriteReg = "10110" and WriteCmd = '1' ELSE --22 x"00000017" WHEN WriteReg = "10111" and WriteCmd = '1' ELSE --23 x"00000018" WHEN WriteReg = "11000" and WriteCmd = '1' ELSE --24 x"00000019" WHEN WriteReg = "11001" and WriteCmd = '1' ELSE --25 x"0000001A" WHEN WriteReg = "11010" and WriteCmd = '1' ELSE --26 x"0000001B" WHEN WriteReg = "11011" and WriteCmd = '1' ELSE --27 x"0000001C" WHEN WriteReg = "11100" and WriteCmd = '1' ELSE --28 x"0000001D" WHEN WriteReg = "11101" and WriteCmd = '1' ELSE --29 x"0000001E" WHEN WriteReg = "11110" and WriteCmd = '1' ELSE --30 x"0000001F" WHEN WriteReg = "11111" and WriteCmd = '1' ELSE --31 x"00000000"; --0 ReadData1 <= at WHEN ReadReg1 = "00001" ELSE --1 v0 WHEN ReadReg1 = "00010" ELSE --2 v1 WHEN ReadReg1 = "00011" ELSE --3 a0 WHEN ReadReg1 = "00100" ELSE --4 a1 WHEN ReadReg1 = "00101" ELSE --5 a2 WHEN ReadReg1 = "00110" ELSE --6 a3 WHEN ReadReg1 = "00111" ELSE --7 t0 WHEN ReadReg1 = "01000" ELSE --8 t1 WHEN ReadReg1 = "01001" ELSE --9 t2 WHEN ReadReg1 = "01010" ELSE --10 t3 WHEN ReadReg1 = "01011" ELSE --11 t4 WHEN ReadReg1 = "01100" ELSE --12 t5 WHEN ReadReg1 = "01101" ELSE --13 t6 WHEN ReadReg1 = "01110" ELSE --14 t7 WHEN ReadReg1 = "01111" ELSE --15 s0 WHEN ReadReg1 = "10000" ELSE --16 s1 WHEN ReadReg1 = "10001" ELSE --17 s2 WHEN ReadReg1 = "10010" ELSE --18 s3 WHEN ReadReg1 = "10011" ELSE --19 s4 WHEN ReadReg1 = "10100" ELSE --20 s5 WHEN ReadReg1 = "10101" ELSE --21 s6 WHEN ReadReg1 = "10110" ELSE --22 s7 WHEN ReadReg1 = "10111" ELSE --23 t8 WHEN ReadReg1 = "11000" ELSE --24 t9 WHEN ReadReg1 = "11001" ELSE --25 k0 WHEN ReadReg1 = "11010" ELSE --26 k1 WHEN ReadReg1 = "11011" ELSE --27 gp WHEN ReadReg1 = "11100" ELSE --28 sp WHEN ReadReg1 = "11101" ELSE --29 fp WHEN ReadReg1 = "11110" ELSE --30 ra WHEN ReadReg1 = "11111" ELSE --31 rzero; --0 ReadData2 <= at WHEN ReadReg2 = "00001" ELSE --1 v0 WHEN ReadReg2 = "00010" ELSE --2 v1 WHEN ReadReg2 = "00011" ELSE --3 a0 WHEN ReadReg2 = "00100" ELSE --4 a1 WHEN ReadReg2 = "00101" ELSE --5 a2 WHEN ReadReg2 = "00110" ELSE --6 a3 WHEN ReadReg2 = "00111" ELSE --7 t0 WHEN ReadReg2 = "01000" ELSE --8 t1 WHEN ReadReg2 = "01001" ELSE --9 t2 WHEN ReadReg2 = "01010" ELSE --10 t3 WHEN ReadReg2 = "01011" ELSE --11 t4 WHEN ReadReg2 = "01100" ELSE --12 t5 WHEN ReadReg2 = "01101" ELSE --13 t6 WHEN ReadReg2 = "01110" ELSE --14 t7 WHEN ReadReg2 = "01111" ELSE --15 s0 WHEN ReadReg2 = "10000" ELSE --16 s1 WHEN ReadReg2 = "10001" ELSE --17 s2 WHEN ReadReg2 = "10010" ELSE --18 s3 WHEN ReadReg2 = "10011" ELSE --19 s4 WHEN ReadReg2 = "10100" ELSE --20 s5 WHEN ReadReg2 = "10101" ELSE --21 s6 WHEN ReadReg2 = "10110" ELSE --22 s7 WHEN ReadReg2 = "10111" ELSE --23 t8 WHEN ReadReg2 = "11000" ELSE --24 t9 WHEN ReadReg2 = "11001" ELSE --25 k0 WHEN ReadReg2 = "11010" ELSE --26 k1 WHEN ReadReg2 = "11011" ELSE --27 gp WHEN ReadReg2 = "11100" ELSE --28 sp WHEN ReadReg2 = "11101" ELSE --29 fp WHEN ReadReg2 = "11110" ELSE --30 ra WHEN ReadReg2 = "11111" ELSE --31 rzero; --0 END remember; ----------------------------------------------------------------------------------------------------------------------------------------------------------------
component soc_design is port ( dram_addr : out std_logic_vector(12 downto 0); -- addr dram_ba : out std_logic_vector(1 downto 0); -- ba dram_cas_n : out std_logic; -- cas_n dram_cke : out std_logic; -- cke dram_cs_n : out std_logic; -- cs_n dram_dq : inout std_logic_vector(15 downto 0) := (others => 'X'); -- dq dram_dqm : out std_logic_vector(1 downto 0); -- dqm dram_ras_n : out std_logic; -- ras_n dram_we_n : out std_logic; -- we_n dram_clk_clk : out std_logic; -- clk fpga_reset_n : in std_logic := 'X'; -- reset_n ledr0_ledr : out std_logic; -- ledr ref_clk : in std_logic := 'X' -- clk ); end component soc_design; u0 : component soc_design port map ( dram_addr => CONNECTED_TO_dram_addr, -- dram.addr dram_ba => CONNECTED_TO_dram_ba, -- .ba dram_cas_n => CONNECTED_TO_dram_cas_n, -- .cas_n dram_cke => CONNECTED_TO_dram_cke, -- .cke dram_cs_n => CONNECTED_TO_dram_cs_n, -- .cs_n dram_dq => CONNECTED_TO_dram_dq, -- .dq dram_dqm => CONNECTED_TO_dram_dqm, -- .dqm dram_ras_n => CONNECTED_TO_dram_ras_n, -- .ras_n dram_we_n => CONNECTED_TO_dram_we_n, -- .we_n dram_clk_clk => CONNECTED_TO_dram_clk_clk, -- dram_clk.clk fpga_reset_n => CONNECTED_TO_fpga_reset_n, -- fpga.reset_n ledr0_ledr => CONNECTED_TO_ledr0_ledr, -- ledr0.ledr ref_clk => CONNECTED_TO_ref_clk -- ref.clk );
component soc_design is port ( dram_addr : out std_logic_vector(12 downto 0); -- addr dram_ba : out std_logic_vector(1 downto 0); -- ba dram_cas_n : out std_logic; -- cas_n dram_cke : out std_logic; -- cke dram_cs_n : out std_logic; -- cs_n dram_dq : inout std_logic_vector(15 downto 0) := (others => 'X'); -- dq dram_dqm : out std_logic_vector(1 downto 0); -- dqm dram_ras_n : out std_logic; -- ras_n dram_we_n : out std_logic; -- we_n dram_clk_clk : out std_logic; -- clk fpga_reset_n : in std_logic := 'X'; -- reset_n ledr0_ledr : out std_logic; -- ledr ref_clk : in std_logic := 'X' -- clk ); end component soc_design; u0 : component soc_design port map ( dram_addr => CONNECTED_TO_dram_addr, -- dram.addr dram_ba => CONNECTED_TO_dram_ba, -- .ba dram_cas_n => CONNECTED_TO_dram_cas_n, -- .cas_n dram_cke => CONNECTED_TO_dram_cke, -- .cke dram_cs_n => CONNECTED_TO_dram_cs_n, -- .cs_n dram_dq => CONNECTED_TO_dram_dq, -- .dq dram_dqm => CONNECTED_TO_dram_dqm, -- .dqm dram_ras_n => CONNECTED_TO_dram_ras_n, -- .ras_n dram_we_n => CONNECTED_TO_dram_we_n, -- .we_n dram_clk_clk => CONNECTED_TO_dram_clk_clk, -- dram_clk.clk fpga_reset_n => CONNECTED_TO_fpga_reset_n, -- fpga.reset_n ledr0_ledr => CONNECTED_TO_ledr0_ledr, -- ledr0.ledr ref_clk => CONNECTED_TO_ref_clk -- ref.clk );
component soc_design is port ( dram_addr : out std_logic_vector(12 downto 0); -- addr dram_ba : out std_logic_vector(1 downto 0); -- ba dram_cas_n : out std_logic; -- cas_n dram_cke : out std_logic; -- cke dram_cs_n : out std_logic; -- cs_n dram_dq : inout std_logic_vector(15 downto 0) := (others => 'X'); -- dq dram_dqm : out std_logic_vector(1 downto 0); -- dqm dram_ras_n : out std_logic; -- ras_n dram_we_n : out std_logic; -- we_n dram_clk_clk : out std_logic; -- clk fpga_reset_n : in std_logic := 'X'; -- reset_n ledr0_ledr : out std_logic; -- ledr ref_clk : in std_logic := 'X' -- clk ); end component soc_design; u0 : component soc_design port map ( dram_addr => CONNECTED_TO_dram_addr, -- dram.addr dram_ba => CONNECTED_TO_dram_ba, -- .ba dram_cas_n => CONNECTED_TO_dram_cas_n, -- .cas_n dram_cke => CONNECTED_TO_dram_cke, -- .cke dram_cs_n => CONNECTED_TO_dram_cs_n, -- .cs_n dram_dq => CONNECTED_TO_dram_dq, -- .dq dram_dqm => CONNECTED_TO_dram_dqm, -- .dqm dram_ras_n => CONNECTED_TO_dram_ras_n, -- .ras_n dram_we_n => CONNECTED_TO_dram_we_n, -- .we_n dram_clk_clk => CONNECTED_TO_dram_clk_clk, -- dram_clk.clk fpga_reset_n => CONNECTED_TO_fpga_reset_n, -- fpga.reset_n ledr0_ledr => CONNECTED_TO_ledr0_ledr, -- ledr0.ledr ref_clk => CONNECTED_TO_ref_clk -- ref.clk );
------------------------------------------------------------------------------- -- Clock domain crossing circuit for slowly changing signals -- -- Author: Peter Würtz, TU Kaiserslautern (2016) -- Distributed under the terms of the GNU General Public License Version 3. -- The full license is in the file COPYING.txt, distributed with this software. ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity slow_cdc_bit is port ( clk: in std_logic; din: in std_logic; dout: out std_logic ); end slow_cdc_bit; library ieee; use ieee.std_logic_1164.all; entity slow_cdc_bits is port ( clk: in std_logic; din: in std_logic_vector; dout: out std_logic_vector ); end slow_cdc_bits; --- architecture slow_cdc_bit_arch of slow_cdc_bit is signal d_async: std_logic := '0'; signal d_meta: std_logic := '0'; signal d_sync: std_logic := '0'; attribute ASYNC_REG : string; attribute ASYNC_REG of d_async : signal is "TRUE"; attribute ASYNC_REG of d_meta : signal is "TRUE"; attribute ASYNC_REG of d_sync : signal is "TRUE"; begin d_async <= din; process(clk) begin if rising_edge(clk) then d_meta <= d_async; d_sync <= d_meta; end if; end process; dout <= d_sync; end slow_cdc_bit_arch; architecture slow_cdc_bits_arch of slow_cdc_bits is begin gen: for I in din'low to din'high generate sync_bit : entity work.slow_cdc_bit port map ( clk => clk, din => din(I), dout => dout(I) ); end generate; end slow_cdc_bits_arch;
------------------------------------------------------------------------------- -- axi_interface.vhd - Entity and architecture ------------------------------------------------------------------------------- -- -- (c) Copyright 2003-2015 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: axi_interface.vhd -- -- Description: -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- -- Structure: -- axi_interface.vhd -- ------------------------------------------------------------------------------- -- Author: rolandp ------------------------------------------------------------------------------- -- 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; library lmb_bram_if_cntlr_v4_0; use lmb_bram_if_cntlr_v4_0.all; use lmb_bram_if_cntlr_v4_0.lmb_bram_if_funcs.all; entity axi_interface is generic ( C_TARGET : TARGET_FAMILY_TYPE; -- AXI4-Lite slave generics C_S_AXI_BASEADDR : std_logic_vector := X"FFFF_FFFF"; C_S_AXI_HIGHADDR : std_logic_vector := X"0000_0000"; C_S_AXI_ADDR_WIDTH : integer := 32; C_S_AXI_DATA_WIDTH : integer := 32; C_REGADDR_WIDTH : integer := 5; -- Address bits including register offset. C_DWIDTH : integer := 32); -- Width of data bus. port ( LMB_Clk : in std_logic; LMB_Rst : in std_logic; -- AXI4-Lite SLAVE SINGLE INTERFACE S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_AWVALID : in std_logic; S_AXI_AWREADY : out std_logic; S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); S_AXI_WVALID : in std_logic; S_AXI_WREADY : out std_logic; S_AXI_BRESP : out std_logic_vector(1 downto 0); S_AXI_BVALID : out std_logic; S_AXI_BREADY : in std_logic; S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_ARVALID : in std_logic; S_AXI_ARREADY : out std_logic; S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_RRESP : out std_logic_vector(1 downto 0); S_AXI_RVALID : out std_logic; S_AXI_RREADY : in std_logic; -- lmb_bram_if_cntlr signals RegWr : out std_logic; RegWrData : out std_logic_vector(0 to C_DWIDTH - 1); RegAddr : out std_logic_vector(0 to C_REGADDR_WIDTH-1); RegRdData : in std_logic_vector(0 to C_DWIDTH - 1)); end entity axi_interface; architecture IMP of axi_interface is component MB_FDRE is generic ( C_TARGET : TARGET_FAMILY_TYPE; INIT : bit := '0' ); port( Q : out std_logic; C : in std_logic; CE : in std_logic; D : in std_logic; R : in std_logic ); end component MB_FDRE; ----------------------------------------------------------------------------- -- Signal declaration ----------------------------------------------------------------------------- signal new_write_access : std_logic; signal new_read_access : std_logic; signal ongoing_write : std_logic; signal ongoing_read : std_logic; signal S_AXI_RVALID_i : std_logic; signal RegRdData_i : std_logic_vector(C_DWIDTH - 1 downto 0); begin -- architecture IMP ----------------------------------------------------------------------------- -- Handling the AXI4-Lite bus interface (AR/AW/W) ----------------------------------------------------------------------------- -- Detect new transaction. -- Only allow one access at a time new_write_access <= not (ongoing_read or ongoing_write) and S_AXI_AWVALID and S_AXI_WVALID; new_read_access <= not (ongoing_read or ongoing_write) and S_AXI_ARVALID and not new_write_access; -- Acknowledge new transaction. S_AXI_AWREADY <= new_write_access; S_AXI_WREADY <= new_write_access; S_AXI_ARREADY <= new_read_access; -- Store register address and write data Reg: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then RegAddr <= (others => '0'); RegWrData <= (others => '0'); elsif new_write_access = '1' then RegAddr <= S_AXI_AWADDR(C_REGADDR_WIDTH-1+2 downto 2); RegWrData <= S_AXI_WDATA(C_DWIDTH-1 downto 0); elsif new_read_access = '1' then RegAddr <= S_AXI_ARADDR(C_REGADDR_WIDTH-1+2 downto 2); end if; end if; end process Reg; -- Handle write access. WriteAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_write <= '0'; elsif new_write_access = '1' then ongoing_write <= '1'; elsif ongoing_write = '1' and S_AXI_BREADY = '1' then ongoing_write <= '0'; end if; RegWr <= new_write_access; end if; end process WriteAccess; S_AXI_BVALID <= ongoing_write; S_AXI_BRESP <= (others => '0'); -- Handle read access ReadAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; elsif new_read_access = '1' then ongoing_read <= '1'; S_AXI_RVALID_i <= '0'; elsif ongoing_read = '1' then if S_AXI_RREADY = '1' and S_AXI_RVALID_i = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; else S_AXI_RVALID_i <= '1'; -- Asserted one cycle after ongoing_read to match S_AXI_RDDATA end if; end if; end if; end process ReadAccess; S_AXI_RVALID <= S_AXI_RVALID_i; S_AXI_RRESP <= (others => '0'); Not_All_Bits_Are_Used: if (C_DWIDTH < C_S_AXI_DATA_WIDTH) generate begin S_AXI_RDATA(C_S_AXI_DATA_WIDTH-1 downto C_S_AXI_DATA_WIDTH - C_DWIDTH) <= (others=>'0'); end generate Not_All_Bits_Are_Used; RegRdData_i <= RegRdData; -- Swap to - downto S_AXI_RDATA_DFF : for I in C_DWIDTH - 1 downto 0 generate begin S_AXI_RDATA_FDRE : MB_FDRE generic map ( C_TARGET => C_TARGET) port map ( Q => S_AXI_RDATA(I), C => LMB_Clk, CE => ongoing_read, D => RegRdData_i(I), R => LMB_Rst); end generate S_AXI_RDATA_DFF; end architecture IMP;
------------------------------------------------------------------------------- -- axi_interface.vhd - Entity and architecture ------------------------------------------------------------------------------- -- -- (c) Copyright 2003-2015 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: axi_interface.vhd -- -- Description: -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- -- Structure: -- axi_interface.vhd -- ------------------------------------------------------------------------------- -- Author: rolandp ------------------------------------------------------------------------------- -- 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; library lmb_bram_if_cntlr_v4_0; use lmb_bram_if_cntlr_v4_0.all; use lmb_bram_if_cntlr_v4_0.lmb_bram_if_funcs.all; entity axi_interface is generic ( C_TARGET : TARGET_FAMILY_TYPE; -- AXI4-Lite slave generics C_S_AXI_BASEADDR : std_logic_vector := X"FFFF_FFFF"; C_S_AXI_HIGHADDR : std_logic_vector := X"0000_0000"; C_S_AXI_ADDR_WIDTH : integer := 32; C_S_AXI_DATA_WIDTH : integer := 32; C_REGADDR_WIDTH : integer := 5; -- Address bits including register offset. C_DWIDTH : integer := 32); -- Width of data bus. port ( LMB_Clk : in std_logic; LMB_Rst : in std_logic; -- AXI4-Lite SLAVE SINGLE INTERFACE S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_AWVALID : in std_logic; S_AXI_AWREADY : out std_logic; S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); S_AXI_WVALID : in std_logic; S_AXI_WREADY : out std_logic; S_AXI_BRESP : out std_logic_vector(1 downto 0); S_AXI_BVALID : out std_logic; S_AXI_BREADY : in std_logic; S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_ARVALID : in std_logic; S_AXI_ARREADY : out std_logic; S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_RRESP : out std_logic_vector(1 downto 0); S_AXI_RVALID : out std_logic; S_AXI_RREADY : in std_logic; -- lmb_bram_if_cntlr signals RegWr : out std_logic; RegWrData : out std_logic_vector(0 to C_DWIDTH - 1); RegAddr : out std_logic_vector(0 to C_REGADDR_WIDTH-1); RegRdData : in std_logic_vector(0 to C_DWIDTH - 1)); end entity axi_interface; architecture IMP of axi_interface is component MB_FDRE is generic ( C_TARGET : TARGET_FAMILY_TYPE; INIT : bit := '0' ); port( Q : out std_logic; C : in std_logic; CE : in std_logic; D : in std_logic; R : in std_logic ); end component MB_FDRE; ----------------------------------------------------------------------------- -- Signal declaration ----------------------------------------------------------------------------- signal new_write_access : std_logic; signal new_read_access : std_logic; signal ongoing_write : std_logic; signal ongoing_read : std_logic; signal S_AXI_RVALID_i : std_logic; signal RegRdData_i : std_logic_vector(C_DWIDTH - 1 downto 0); begin -- architecture IMP ----------------------------------------------------------------------------- -- Handling the AXI4-Lite bus interface (AR/AW/W) ----------------------------------------------------------------------------- -- Detect new transaction. -- Only allow one access at a time new_write_access <= not (ongoing_read or ongoing_write) and S_AXI_AWVALID and S_AXI_WVALID; new_read_access <= not (ongoing_read or ongoing_write) and S_AXI_ARVALID and not new_write_access; -- Acknowledge new transaction. S_AXI_AWREADY <= new_write_access; S_AXI_WREADY <= new_write_access; S_AXI_ARREADY <= new_read_access; -- Store register address and write data Reg: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then RegAddr <= (others => '0'); RegWrData <= (others => '0'); elsif new_write_access = '1' then RegAddr <= S_AXI_AWADDR(C_REGADDR_WIDTH-1+2 downto 2); RegWrData <= S_AXI_WDATA(C_DWIDTH-1 downto 0); elsif new_read_access = '1' then RegAddr <= S_AXI_ARADDR(C_REGADDR_WIDTH-1+2 downto 2); end if; end if; end process Reg; -- Handle write access. WriteAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_write <= '0'; elsif new_write_access = '1' then ongoing_write <= '1'; elsif ongoing_write = '1' and S_AXI_BREADY = '1' then ongoing_write <= '0'; end if; RegWr <= new_write_access; end if; end process WriteAccess; S_AXI_BVALID <= ongoing_write; S_AXI_BRESP <= (others => '0'); -- Handle read access ReadAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; elsif new_read_access = '1' then ongoing_read <= '1'; S_AXI_RVALID_i <= '0'; elsif ongoing_read = '1' then if S_AXI_RREADY = '1' and S_AXI_RVALID_i = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; else S_AXI_RVALID_i <= '1'; -- Asserted one cycle after ongoing_read to match S_AXI_RDDATA end if; end if; end if; end process ReadAccess; S_AXI_RVALID <= S_AXI_RVALID_i; S_AXI_RRESP <= (others => '0'); Not_All_Bits_Are_Used: if (C_DWIDTH < C_S_AXI_DATA_WIDTH) generate begin S_AXI_RDATA(C_S_AXI_DATA_WIDTH-1 downto C_S_AXI_DATA_WIDTH - C_DWIDTH) <= (others=>'0'); end generate Not_All_Bits_Are_Used; RegRdData_i <= RegRdData; -- Swap to - downto S_AXI_RDATA_DFF : for I in C_DWIDTH - 1 downto 0 generate begin S_AXI_RDATA_FDRE : MB_FDRE generic map ( C_TARGET => C_TARGET) port map ( Q => S_AXI_RDATA(I), C => LMB_Clk, CE => ongoing_read, D => RegRdData_i(I), R => LMB_Rst); end generate S_AXI_RDATA_DFF; end architecture IMP;
------------------------------------------------------------------------------- -- axi_interface.vhd - Entity and architecture ------------------------------------------------------------------------------- -- -- (c) Copyright 2003-2015 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: axi_interface.vhd -- -- Description: -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- -- Structure: -- axi_interface.vhd -- ------------------------------------------------------------------------------- -- Author: rolandp ------------------------------------------------------------------------------- -- 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; library lmb_bram_if_cntlr_v4_0; use lmb_bram_if_cntlr_v4_0.all; use lmb_bram_if_cntlr_v4_0.lmb_bram_if_funcs.all; entity axi_interface is generic ( C_TARGET : TARGET_FAMILY_TYPE; -- AXI4-Lite slave generics C_S_AXI_BASEADDR : std_logic_vector := X"FFFF_FFFF"; C_S_AXI_HIGHADDR : std_logic_vector := X"0000_0000"; C_S_AXI_ADDR_WIDTH : integer := 32; C_S_AXI_DATA_WIDTH : integer := 32; C_REGADDR_WIDTH : integer := 5; -- Address bits including register offset. C_DWIDTH : integer := 32); -- Width of data bus. port ( LMB_Clk : in std_logic; LMB_Rst : in std_logic; -- AXI4-Lite SLAVE SINGLE INTERFACE S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_AWVALID : in std_logic; S_AXI_AWREADY : out std_logic; S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); S_AXI_WVALID : in std_logic; S_AXI_WREADY : out std_logic; S_AXI_BRESP : out std_logic_vector(1 downto 0); S_AXI_BVALID : out std_logic; S_AXI_BREADY : in std_logic; S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_ARVALID : in std_logic; S_AXI_ARREADY : out std_logic; S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_RRESP : out std_logic_vector(1 downto 0); S_AXI_RVALID : out std_logic; S_AXI_RREADY : in std_logic; -- lmb_bram_if_cntlr signals RegWr : out std_logic; RegWrData : out std_logic_vector(0 to C_DWIDTH - 1); RegAddr : out std_logic_vector(0 to C_REGADDR_WIDTH-1); RegRdData : in std_logic_vector(0 to C_DWIDTH - 1)); end entity axi_interface; architecture IMP of axi_interface is component MB_FDRE is generic ( C_TARGET : TARGET_FAMILY_TYPE; INIT : bit := '0' ); port( Q : out std_logic; C : in std_logic; CE : in std_logic; D : in std_logic; R : in std_logic ); end component MB_FDRE; ----------------------------------------------------------------------------- -- Signal declaration ----------------------------------------------------------------------------- signal new_write_access : std_logic; signal new_read_access : std_logic; signal ongoing_write : std_logic; signal ongoing_read : std_logic; signal S_AXI_RVALID_i : std_logic; signal RegRdData_i : std_logic_vector(C_DWIDTH - 1 downto 0); begin -- architecture IMP ----------------------------------------------------------------------------- -- Handling the AXI4-Lite bus interface (AR/AW/W) ----------------------------------------------------------------------------- -- Detect new transaction. -- Only allow one access at a time new_write_access <= not (ongoing_read or ongoing_write) and S_AXI_AWVALID and S_AXI_WVALID; new_read_access <= not (ongoing_read or ongoing_write) and S_AXI_ARVALID and not new_write_access; -- Acknowledge new transaction. S_AXI_AWREADY <= new_write_access; S_AXI_WREADY <= new_write_access; S_AXI_ARREADY <= new_read_access; -- Store register address and write data Reg: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then RegAddr <= (others => '0'); RegWrData <= (others => '0'); elsif new_write_access = '1' then RegAddr <= S_AXI_AWADDR(C_REGADDR_WIDTH-1+2 downto 2); RegWrData <= S_AXI_WDATA(C_DWIDTH-1 downto 0); elsif new_read_access = '1' then RegAddr <= S_AXI_ARADDR(C_REGADDR_WIDTH-1+2 downto 2); end if; end if; end process Reg; -- Handle write access. WriteAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_write <= '0'; elsif new_write_access = '1' then ongoing_write <= '1'; elsif ongoing_write = '1' and S_AXI_BREADY = '1' then ongoing_write <= '0'; end if; RegWr <= new_write_access; end if; end process WriteAccess; S_AXI_BVALID <= ongoing_write; S_AXI_BRESP <= (others => '0'); -- Handle read access ReadAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; elsif new_read_access = '1' then ongoing_read <= '1'; S_AXI_RVALID_i <= '0'; elsif ongoing_read = '1' then if S_AXI_RREADY = '1' and S_AXI_RVALID_i = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; else S_AXI_RVALID_i <= '1'; -- Asserted one cycle after ongoing_read to match S_AXI_RDDATA end if; end if; end if; end process ReadAccess; S_AXI_RVALID <= S_AXI_RVALID_i; S_AXI_RRESP <= (others => '0'); Not_All_Bits_Are_Used: if (C_DWIDTH < C_S_AXI_DATA_WIDTH) generate begin S_AXI_RDATA(C_S_AXI_DATA_WIDTH-1 downto C_S_AXI_DATA_WIDTH - C_DWIDTH) <= (others=>'0'); end generate Not_All_Bits_Are_Used; RegRdData_i <= RegRdData; -- Swap to - downto S_AXI_RDATA_DFF : for I in C_DWIDTH - 1 downto 0 generate begin S_AXI_RDATA_FDRE : MB_FDRE generic map ( C_TARGET => C_TARGET) port map ( Q => S_AXI_RDATA(I), C => LMB_Clk, CE => ongoing_read, D => RegRdData_i(I), R => LMB_Rst); end generate S_AXI_RDATA_DFF; end architecture IMP;
------------------------------------------------------------------------------- -- axi_interface.vhd - Entity and architecture ------------------------------------------------------------------------------- -- -- (c) Copyright 2003-2015 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: axi_interface.vhd -- -- Description: -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- -- Structure: -- axi_interface.vhd -- ------------------------------------------------------------------------------- -- Author: rolandp ------------------------------------------------------------------------------- -- 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; library lmb_bram_if_cntlr_v4_0; use lmb_bram_if_cntlr_v4_0.all; use lmb_bram_if_cntlr_v4_0.lmb_bram_if_funcs.all; entity axi_interface is generic ( C_TARGET : TARGET_FAMILY_TYPE; -- AXI4-Lite slave generics C_S_AXI_BASEADDR : std_logic_vector := X"FFFF_FFFF"; C_S_AXI_HIGHADDR : std_logic_vector := X"0000_0000"; C_S_AXI_ADDR_WIDTH : integer := 32; C_S_AXI_DATA_WIDTH : integer := 32; C_REGADDR_WIDTH : integer := 5; -- Address bits including register offset. C_DWIDTH : integer := 32); -- Width of data bus. port ( LMB_Clk : in std_logic; LMB_Rst : in std_logic; -- AXI4-Lite SLAVE SINGLE INTERFACE S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_AWVALID : in std_logic; S_AXI_AWREADY : out std_logic; S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); S_AXI_WVALID : in std_logic; S_AXI_WREADY : out std_logic; S_AXI_BRESP : out std_logic_vector(1 downto 0); S_AXI_BVALID : out std_logic; S_AXI_BREADY : in std_logic; S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_ARVALID : in std_logic; S_AXI_ARREADY : out std_logic; S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_RRESP : out std_logic_vector(1 downto 0); S_AXI_RVALID : out std_logic; S_AXI_RREADY : in std_logic; -- lmb_bram_if_cntlr signals RegWr : out std_logic; RegWrData : out std_logic_vector(0 to C_DWIDTH - 1); RegAddr : out std_logic_vector(0 to C_REGADDR_WIDTH-1); RegRdData : in std_logic_vector(0 to C_DWIDTH - 1)); end entity axi_interface; architecture IMP of axi_interface is component MB_FDRE is generic ( C_TARGET : TARGET_FAMILY_TYPE; INIT : bit := '0' ); port( Q : out std_logic; C : in std_logic; CE : in std_logic; D : in std_logic; R : in std_logic ); end component MB_FDRE; ----------------------------------------------------------------------------- -- Signal declaration ----------------------------------------------------------------------------- signal new_write_access : std_logic; signal new_read_access : std_logic; signal ongoing_write : std_logic; signal ongoing_read : std_logic; signal S_AXI_RVALID_i : std_logic; signal RegRdData_i : std_logic_vector(C_DWIDTH - 1 downto 0); begin -- architecture IMP ----------------------------------------------------------------------------- -- Handling the AXI4-Lite bus interface (AR/AW/W) ----------------------------------------------------------------------------- -- Detect new transaction. -- Only allow one access at a time new_write_access <= not (ongoing_read or ongoing_write) and S_AXI_AWVALID and S_AXI_WVALID; new_read_access <= not (ongoing_read or ongoing_write) and S_AXI_ARVALID and not new_write_access; -- Acknowledge new transaction. S_AXI_AWREADY <= new_write_access; S_AXI_WREADY <= new_write_access; S_AXI_ARREADY <= new_read_access; -- Store register address and write data Reg: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then RegAddr <= (others => '0'); RegWrData <= (others => '0'); elsif new_write_access = '1' then RegAddr <= S_AXI_AWADDR(C_REGADDR_WIDTH-1+2 downto 2); RegWrData <= S_AXI_WDATA(C_DWIDTH-1 downto 0); elsif new_read_access = '1' then RegAddr <= S_AXI_ARADDR(C_REGADDR_WIDTH-1+2 downto 2); end if; end if; end process Reg; -- Handle write access. WriteAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_write <= '0'; elsif new_write_access = '1' then ongoing_write <= '1'; elsif ongoing_write = '1' and S_AXI_BREADY = '1' then ongoing_write <= '0'; end if; RegWr <= new_write_access; end if; end process WriteAccess; S_AXI_BVALID <= ongoing_write; S_AXI_BRESP <= (others => '0'); -- Handle read access ReadAccess: process (LMB_Clk) is begin if LMB_Clk'event and LMB_Clk = '1' then if LMB_Rst = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; elsif new_read_access = '1' then ongoing_read <= '1'; S_AXI_RVALID_i <= '0'; elsif ongoing_read = '1' then if S_AXI_RREADY = '1' and S_AXI_RVALID_i = '1' then ongoing_read <= '0'; S_AXI_RVALID_i <= '0'; else S_AXI_RVALID_i <= '1'; -- Asserted one cycle after ongoing_read to match S_AXI_RDDATA end if; end if; end if; end process ReadAccess; S_AXI_RVALID <= S_AXI_RVALID_i; S_AXI_RRESP <= (others => '0'); Not_All_Bits_Are_Used: if (C_DWIDTH < C_S_AXI_DATA_WIDTH) generate begin S_AXI_RDATA(C_S_AXI_DATA_WIDTH-1 downto C_S_AXI_DATA_WIDTH - C_DWIDTH) <= (others=>'0'); end generate Not_All_Bits_Are_Used; RegRdData_i <= RegRdData; -- Swap to - downto S_AXI_RDATA_DFF : for I in C_DWIDTH - 1 downto 0 generate begin S_AXI_RDATA_FDRE : MB_FDRE generic map ( C_TARGET => C_TARGET) port map ( Q => S_AXI_RDATA(I), C => LMB_Clk, CE => ongoing_read, D => RegRdData_i(I), R => LMB_Rst); end generate S_AXI_RDATA_DFF; end architecture IMP;
library ieee; use ieee.std_logic_1164.all; entity fadd is port ( a : in std_logic; b : in std_logic; cin : in std_logic; s : out std_logic; cout: out std_logic); end entity fadd; architecture Behavioral of fadd is begin s <= a xor b xor cin; cout <= (a and b) or (a and cin) or (b and cin); end Behavioral;
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 14:42:09 02/09/2013 -- Design Name: -- Module Name: Top - 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; use IEEE.STD_LOGIC_UNSIGNED.all; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity Top is port ( -- Standard 6847 signals -- -- expept DA which is now input only -- except nRP which re-purposed as a nWR CLK : in std_logic; DD : inout std_logic_vector (7 downto 0); DA : in std_logic_vector (12 downto 0); CHB : out std_logic; OA : out std_logic; OB : out std_logic; nMS : in std_logic; CSS : in std_logic; nHS : out std_logic; nFS : out std_logic; nWR : in std_logic; -- Was nRP AG : in std_logic; AS : in std_logic; INV : in std_logic; INTEXT : in std_logic; GM : in std_logic_vector (2 downto 0); Y : out std_logic; -- 5 bit VGA Output R : out std_logic_vector (0 downto 0); G : out std_logic_vector (1 downto 0); B : out std_logic_vector (0 downto 0); HSYNC : out std_logic; VSYNC : out std_logic; -- 1 bit AUDIO Output AUDIO : out std_logic; -- Other GODIL specific pins clock49 : in std_logic; nRST : in std_logic; nBXXX : in std_logic; -- Jumpers -- Enables VGA Signals on PL4 nPL4 : in std_logic; -- Moves SID from 9FE0 to BDC0 nSIDD : in std_logic; -- Active low version of the SID Select Signal for disabling the external bus buffers -- nSIDSEL : out std_logic; -- PS/2 Mouse PS2_CLK : inout std_logic; PS2_DATA : inout std_logic; -- UART uart_TxD : out std_logic; uart_RxD : in std_logic; --LEDs led8 : out std_logic ); end Top; architecture BEHAVIORAL of Top is -- clock32 is the main clock signal clock32 : std_logic; -- clock25 is a full speed VGA clock signal clock25 : std_logic; -- clock15 is just used between two DCMs signal clock15 : std_logic; -- clock59 is just used between two DCMs signal clock59 : std_logic; -- Reset signal (active high) signal reset : std_logic; -- Reset signal to 6847 (active high), not currently used signal reset_vid : std_logic; -- pipelined versions of the address/data/write signals signal nWR1 : std_logic; signal nWR2 : std_logic; signal nMS1 : std_logic; signal nMS2 : std_logic; signal nWRMS1 : std_logic; signal nWRMS2 : std_logic; signal nBXXX1 : std_logic; signal nBXXX2 : std_logic; signal DA1 : std_logic_vector (12 downto 0); signal DA2 : std_logic_vector (12 downto 0); signal DD1 : std_logic_vector (7 downto 0); signal DD2 : std_logic_vector (7 downto 0); signal DD3 : std_logic_vector (7 downto 0); signal ram_we : std_logic; signal addr : std_logic_vector (12 downto 0); signal din : std_logic_vector (7 downto 0); -- Dout back to the Atom, that is either VRAM or SID signal dout : std_logic_vector (7 downto 0); -- SID sigmals signal sid_cs : std_logic; signal sid_we : std_logic; signal sid_audio : std_logic; -- UART sigmals signal uart_cs : std_logic; signal uart_we : std_logic; -- Atom extension register signals signal reg_cs : std_logic; signal reg_we : std_logic; signal final_red : std_logic; signal final_green1 : std_logic; signal final_green0 : std_logic; signal final_blue : std_logic; signal final_vsync : std_logic; signal final_hsync : std_logic; signal final_char_a : std_logic_vector (10 downto 0); signal locked1 : std_logic; signal locked2 : std_logic; signal locked3 : std_logic; signal locked4 : std_logic; begin reset <= not nRST; reset_vid <= '0'; -- Currently set at 49.152 * (31/26) * (3/7) = 25.1161318637MHz Inst_DCM1 : entity work.DCM1 port map ( CLKIN_IN => clock49, RST => '0', CLK0_OUT => clock59, CLK0_OUT1 => open, CLK2X_OUT => open, LOCKED => locked1 ); Inst_DCM2 : entity work.DCM2 port map ( CLKIN_IN => clock59, RST => not locked1, CLK0_OUT => clock25, CLK0_OUT1 => open, CLK2X_OUT => open, LOCKED => locked2 ); Inst_DCM3 : entity work.DCMSID0 port map ( CLKIN_IN => clock49, RST => '0', CLK0_OUT => clock15, CLK0_OUT1 => open, CLK2X_OUT => open, LOCKED => locked3 ); Inst_DCM4 : entity work.DCMSID1 port map ( CLKIN_IN => clock15, RST => not locked3, CLK0_OUT => clock32, CLK0_OUT1 => open, CLK2X_OUT => open, LOCKED => locked4 ); led8 <= not (locked1 and locked2 and locked3 and locked4); Inst_AtomGodilVideo : entity work.AtomGodilVideo generic map ( CImplGraphicsExt => true, CImplSoftChar => true, CImplSID => true, CImplVGA80x40 => true, CImplHWScrolling => true, CImplMouse => true, CImplUart => true, CImplDoubleVideo => true, MainClockSpeed => 32000000, DefaultBaud => 115200 ) port map ( clock_vga => clock25, clock_main => clock32, clock_sid_32Mhz => clock32, clock_sid_dac => clock49, reset => reset, reset_vid => reset_vid, din => din, dout => dout, addr => addr, CSS => CSS, AG => AG, GM => GM, nFS => nFS, ram_we => ram_we, reg_cs => reg_cs, reg_we => reg_we, sid_cs => sid_cs, sid_we => sid_we, sid_audio => sid_audio, sid_audio_d => open, PS2_CLK => PS2_CLK, PS2_DATA => PS2_DATA, uart_cs => uart_cs, uart_we => uart_we, uart_RxD => uart_RxD, uart_TxD => uart_TxD, uart_escape => open, uart_break => open, final_red => final_red, final_green1 => final_green1, final_green0 => final_green0, final_blue => final_blue, final_vsync => final_vsync, final_hsync => final_hsync, charSet => '0' ); -- Pipelined version of address/data/write signals process (clock32) begin if rising_edge(clock32) then nBXXX2 <= nBXXX1; nBXXX1 <= nBXXX; nMS2 <= nMS1; nMS1 <= nMS; nWRMS2 <= nWRMS1; nWRMS1 <= nWR or nMS; nWR2 <= nWR1; nWR1 <= nWR; DD3 <= DD2; DD2 <= DD1; DD1 <= DD; DA2 <= DA1; DA1 <= DA; end if; end process; -- Signals driving the VRAM -- Write just before the rising edge of nWR ram_we <= '1' when (nWRMS1 = '1' and nWRMS2 = '0' and nBXXX2 = '1') else '0'; din <= DD3; addr <= DA2; -- Signals driving the internal registers -- When nSIDD=0 the registers are mapped to BDE0-BDFF -- When nSIDD=1 the registers are mapped to 9FE0-9FFF reg_cs <= '1' when (nSIDD = '1' and nMS2 = '0' and DA2(12 downto 5) = "11111111") or (nSIDD = '0' and nBXXX2 = '0' and DA2(11 downto 5) = "1101111") else '0'; reg_we <= '1' when (nSIDD = '1' and nWRMS1 = '1' and nWRMS2 = '0') or (nSIDD = '0' and nWR1 = '1' and nWR2 = '0') else '0'; -- Signals driving the SID -- When nSIDD=0 the SID is mapped to BDC0-BDDF -- When nSIDD=1 the SID is mapped to 9FC0-9FDF sid_cs <= '1' when (nSIDD = '1' and nMS2 = '0' and DA2(12 downto 5) = "11111110") or (nSIDD = '0' and nBXXX2 = '0' and DA2(11 downto 5) = "1101110") else '0'; sid_we <= '1' when (nSIDD = '1' and nWRMS1 = '1' and nWRMS2 = '0') or (nSIDD = '0' and nWR1 = '1' and nWR2 = '0') else '0'; -- Signals driving the UART -- When nSIDD=0 the UART is mapped to BDB0-BDBF -- When nSIDD=1 the UART is mapped to 9FB0-9FBF uart_cs <= '1' when (nSIDD = '1' and nMS2 = '0' and DA2(12 downto 4) = "111111011") or (nSIDD = '0' and nBXXX2 = '0' and DA2(11 downto 4) = "11011011") else '0'; uart_we <= '1' when (nSIDD = '1' and nWRMS1 = '1' and nWRMS2 = '0') or (nSIDD = '0' and nWR1 = '1' and nWR2 = '0') else '0'; AUDIO <= sid_audio; -- Output the SID Select Signal so it can be used to disable the bus buffers -- TODO: this looks incorrect -- nSIDSEL <= not sid_cs; -- Tri-state data back to the Atom DD <= dout when (nMS = '0' and nWR = '1') else (others => 'Z'); -- 1/1/1 Bit RGB Video to PL4 Connectors OA <= final_red when nPL4 = '0' else '0'; CHB <= final_green1 when nPL4 = '0' else '0'; OB <= final_blue when nPL4 = '0' else '0'; nHS <= final_hsync when nPL4 = '0' else '0'; Y <= final_vsync when nPL4 = '0' else '0'; -- 1/2/1 Bit RGB Video to GODIL Test Connector R(0) <= final_red; G(1) <= final_green1; G(0) <= final_green0; B(0) <= final_blue; VSYNC <= final_vsync; HSYNC <= final_hsync; end BEHAVIORAL;
------------------------------------------------------------------------------- -- $Id: mux_onehot_f.vhd,v 1.1.4.1 2010/09/14 22:35:46 dougt Exp $ ------------------------------------------------------------------------------- -- mux_onehot_f - arch and entity ------------------------------------------------------------------------------- -- -- ************************************************************************* -- ** ** -- ** DISCLAIMER OF LIABILITY ** -- ** ** -- ** This text/file contains proprietary, confidential ** -- ** information of Xilinx, Inc., is distributed under ** -- ** license from Xilinx, Inc., and may be used, copied ** -- ** and/or disclosed only pursuant to the terms of a valid ** -- ** license agreement with Xilinx, Inc. Xilinx hereby ** -- ** grants you a license to use this text/file solely for ** -- ** design, simulation, implementation and creation of ** -- ** design files limited to Xilinx devices or technologies. ** -- ** Use with non-Xilinx devices or technologies is expressly ** -- ** prohibited and immediately terminates your license unless ** -- ** covered by a separate agreement. ** -- ** ** -- ** Xilinx is providing this design, code, or information ** -- ** "as-is" solely for use in developing programs and ** -- ** solutions for Xilinx devices, with no obligation on the ** -- ** part of Xilinx to provide support. By providing this design, ** -- ** code, or information as one possible implementation of ** -- ** this feature, application or standard, Xilinx is making no ** -- ** representation that this implementation is free from any ** -- ** claims of infringement. You are responsible for obtaining ** -- ** any rights you may require for your implementation. ** -- ** Xilinx expressly disclaims any warranty whatsoever with ** -- ** respect to the adequacy of the implementation, including ** -- ** but not limited to any warranties or representations that this ** -- ** implementation is free from claims of infringement, implied ** -- ** warranties of merchantability or fitness for a particular ** -- ** purpose. ** -- ** ** -- ** Xilinx products are not intended for use in life support ** -- ** appliances, devices, or systems. Use in such applications is ** -- ** expressly prohibited. ** -- ** ** -- ** Any modifications that are made to the Source Code are ** -- ** done at the user’s sole risk and will be unsupported. ** -- ** The Xilinx Support Hotline does not have access to source ** -- ** code and therefore cannot answer specific questions related ** -- ** to source HDL. The Xilinx Hotline support of original source ** -- ** code IP shall only address issues and questions related ** -- ** to the standard Netlist version of the core (and thus ** -- ** indirectly, the original core source). ** -- ** ** -- ** Copyright (c) 2005-2010 Xilinx, Inc. All rights reserved. ** -- ** ** -- ** This copyright and support notice must be retained as part ** -- ** of this text at all times. ** -- ** ** -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: mux_onehot_f.vhd -- -- Description: Parameterizable multiplexer with one hot select lines. -- -- Please refer to the entity interface while reading the -- remainder of this description. -- -- If n is the index of the single select line of S(0 to C_NB-1) -- that is asserted, then -- -- Y(0 to C_DW-1) <= D(n*C_DW to n*C_DW + C_DW -1) -- -- That is, Y selects the nth group of C_DW consecutive -- bits of D. -- -- Note that C_NB = 1 is handled as a special case in which -- Y <= D, without regard to the select line, S. -- -- The Implementation depends on the C_FAMILY parameter. -- If the target family supports the needed primitives, -- a carry-chain structure will be implemented. Otherwise, -- an implementation dependent on synthesis inferral will -- be generated. -- ------------------------------------------------------------------------------- -- Structure: -- mux_onehot_f -- family_support -------------------------------------------------------------------------------- -- Author: FLO -- History: -- FLO 11/30/05 -- First version derived from mux_onehot.vhd -- -- by BLT and ALS. -- -- ~~~~~~ -- -- DET 1/17/2008 v3_00_a -- ~~~~~~ -- - Changed proc_common library version to v3_00_a -- - Incorporated new disclaimer header -- ^^^^^^ -- --------------------------------------------------------------------------------- -- 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; ------------------------------------------------------------------------------- -- Generic and Port Declaration ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Definition of Generics and Ports -- -- C_DW: Data width of buses entering the mux. Valid range is 1 to 256. -- C_NB: Number of data buses entering the mux. Valid range is 1 to 64. -- -- input D -- input data bus -- input S -- input select bus -- output Y -- output bus -- -- The input data is represented by a one-dimensional bus that is made up -- of all of the data buses concatenated together. For example, a 4 to 1 -- mux with 2 bit data buses (C_DW=2,C_NB=4) is represented by: -- -- D = (Bus0Data0, Bus0Data1, Bus1Data0, Bus1Data1, Bus2Data0, Bus2Data1, -- Bus3Data0, Bus3Data1) -- -- Y = (Bus0Data0, Bus0Data1) if S(0)=1 else -- (Bus1Data0, Bus1Data1) if S(1)=1 else -- (Bus2Data0, Bus2Data1) if S(2)=1 else -- (Bus3Data0, Bus3Data1) if S(3)=1 -- -- Only one bit of S should be asserted at a time. -- ------------------------------------------------------------------------------- library proc_common_v3_00_a; use proc_common_v3_00_a.family_support.all; -- 'supported' function, etc. -- entity mux_onehot_f is generic( C_DW: integer := 32; C_NB: integer := 5; C_FAMILY : string := "virtexe"); port( D: in std_logic_vector(0 to C_DW*C_NB-1); S: in std_logic_vector(0 to C_NB-1); Y: out std_logic_vector(0 to C_DW-1)); end mux_onehot_f; library unisim; use unisim.all; -- Make unisim entities available for default binding. architecture imp of mux_onehot_f is constant NLS : natural := native_lut_size(fam_as_string => C_FAMILY, no_lut_return_val => 2*C_NB); function lut_val(D, S : std_logic_vector) return std_logic is variable rn : std_logic := '0'; begin for i in D'range loop rn := rn or (S(i) and D(i)); end loop; return not rn; end; function min(i, j : integer) return integer is begin if i < j then return i; else return j; end if; end; ----------------------------------------------------------------------------- -- Signal and Type Declarations ------------------------------------------------------------------------------- signal Dreord: std_logic_vector(0 to C_DW*C_NB-1); signal sel: std_logic_vector(0 to C_DW*C_NB-1); ------------------------------------------------------------------------------- -- Component Declarations ------------------------------------------------------------------------------- component MUXCY port ( O : out std_ulogic; CI : in std_ulogic; DI : in std_ulogic; S : in std_ulogic ); end component; begin -- Reorder data buses WA_GEN : if C_DW > 0 generate -- XST WA REORD: process( D ) variable m,n: integer; begin for m in 0 to C_DW-1 loop for n in 0 to C_NB-1 loop Dreord( m*C_NB+n) <= D( n*C_DW+m ); end loop; end loop; end process REORD; end generate; ------------------------------------------------------------------------------- -- REPSELS_PROCESS ------------------------------------------------------------------------------- -- The one-hot select bus contains 1-bit for each bus. To more easily -- parameterize the carry chains and reduce loading on the select bus, these -- signals are replicated into a bus that replicates the select bits for the -- data width of the busses ------------------------------------------------------------------------------- REPSELS_PROCESS : process ( S ) variable i, j : integer; begin -- loop through all data bits and busses for i in 0 to C_DW-1 loop for j in 0 to C_NB-1 loop sel(i*C_NB+j) <= S(j); end loop; end loop; end process REPSELS_PROCESS; GEN: if C_NB > 1 generate constant BPL : positive := NLS / 2; -- Buses per LUT is the native lut -- size divided by two.signals per bus. constant NUMLUTS : positive := (C_NB+(BPL-1))/BPL; begin DATA_WIDTH_GEN: for i in 0 to C_DW-1 generate signal cyout : std_logic_vector(0 to NUMLUTS); signal lutout : std_logic_vector(0 to NUMLUTS-1); begin cyout(0) <= '0'; NUM_BUSES_GEN: for j in 0 to NUMLUTS - 1 generate constant BTL : positive := min(BPL, C_NB - j*BPL); -- Number of Buses This Lut (for last LUT this may be less than BPL) begin lutout(j) <= lut_val(D => Dreord(i*C_NB+j*BPL to i*C_NB+j*BPL+BTL-1), S => sel(i*C_NB+j*BPL to i*C_NB+j*BPL+BTL-1) ); MUXCY_GEN : if NUMLUTS > 1 generate MUXCY_I : component MUXCY port map (CI=>cyout(j), DI=> '1', S=>lutout(j), O=>cyout(j+1)); end generate; end generate; Y(i) <= cyout(NUMLUTS) when NUMLUTS > 1 else not lutout(0); -- If just one -- LUT, then take value from -- lutout rather than cyout. end generate; end generate; ONE_GEN: if C_NB = 1 generate Y <= D; end generate; end imp;
------------------------------------------------------------------------------- -- CPU86 - VHDL CPU8088 IP core -- -- Copyright (C) 2002-2008 HT-LAB -- -- -- -- Contact/bugs : http://www.ht-lab.com/misc/feedback.html -- -- Web : http://www.ht-lab.com -- -- -- -- CPU86 is released as open-source under the GNU GPL license. This means -- -- that designs based on CPU86 must be distributed in full source code -- -- under the same license. Contact HT-Lab for commercial applications where -- -- source-code distribution is not desirable. -- -- -- ------------------------------------------------------------------------------- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU Lesser General Public -- -- License as published by the Free Software Foundation; either -- -- version 2.1 of the License, or (at your option) any later version. -- -- -- -- This library 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 -- -- Lesser General Public License for more details. -- -- -- -- Full details of the license can be found in the file "copying.txt". -- -- -- -- You should have received a copy of the GNU Lesser General Public -- -- License along with this library; if not, write to the Free Software -- -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- ------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; PACKAGE cpu86pack IS constant RESET_CS_C : std_logic_vector(15 downto 0) := (others => '1'); -- FFFF:0000 constant RESET_IP_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_ES_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_SS_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_DS_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_VECTOR_C : std_logic_vector(19 downto 0) := (RESET_CS_C & X"0") + (X"0" & RESET_IP_C); constant MUL_MCD_C : std_logic_vector(4 downto 0) := "00010"; -- mul MCP -- Serial Divider delay -- changed later to done signal -- You can gain 1 clk cycle, done can be asserted 1 cycle earlier constant DIV_MCD_C : std_logic_vector(4 downto 0) := "10011"; -- div waitstates 19! constant ONE : std_logic := '1'; constant ZERO : std_logic := '0'; constant ZEROVECTOR_C : std_logic_vector(31 downto 0) := X"00000000"; -- Minimum value for MAX_WS="000", this result in a 2 cycle rd/wr strobe -- Total Read cycle is 1 cycle for address setup + 2 cycles for rd/wr strobe, thus -- minimum bus cycle is 3 clk cycles. constant WS_WIDTH : integer := 3; -- 2^WS_WIDTH=MAX Waitstates constant MAX_WS : std_logic_vector(WS_WIDTH-1 downto 0) := "000"; -- 3 clk bus cycles constant DONTCARE : std_logic_vector(31 downto 0):=X"FFFFFFFF"; -- Status record containing some data and flag register type instruction_type is record ireg : std_logic_vector(7 downto 0); -- Instruction register xmod : std_logic_vector(1 downto 0); -- mod is a reserved word reg : std_logic_vector(2 downto 0); -- between mode and rm rm : std_logic_vector(2 downto 0); data : std_logic_vector(15 downto 0); disp : std_logic_vector(15 downto 0); nb : std_logic_vector(2 downto 0); -- Number of bytes end record; -- Status record containing some data and flag register type status_out_type is record ax : std_logic_vector(15 downto 0); cx_one : std_logic; -- '1' if CX=0001 cx_zero : std_logic; -- '1' if CX=0000 cl : std_logic_vector(7 downto 0); -- 5 bits shift/rotate counter flag : std_logic_vector(15 downto 0); div_err : std_logic; -- Divider overflow end record; -------------------------------------------------------------------------------------- -- Data Path Records -------------------------------------------------------------------------------------- type path_in_type is record datareg_input : std_logic_vector(6 downto 0); -- dimux(3) & w & seldreg(3) alu_operation : std_logic_vector(14 downto 0);-- selalua(4) & selalub(4) & aluopr(7) dbus_output : std_logic_vector(1 downto 0); -- (Odd/Even) domux setting segreg_input : std_logic_vector(3 downto 0); -- simux & selsreg ea_output : std_logic_vector(9 downto 0); -- dispmux(3) & eamux(4) & [flag]&segop(2) end record; -- Write Strobe Record for Data Path type write_in_type is record wrd : std_logic; -- Write datareg wralu : std_logic; -- Write ALU result wrcc : std_logic; -- Write Flag register wrs : std_logic; -- Write Segment register wrip : std_logic; -- Write Instruction Pointer wrop : std_logic; -- Write Segment Prefix register, Set Prefix Flag wrtemp: std_logic; -- Write to ALU_TEMP register end record; constant SET_OPFLAG : std_logic:='1'; -- Override Prefix Flag -- DIMUX constant DATAIN_IN : std_logic_vector(2 downto 0) := "000"; constant EABUS_IN : std_logic_vector(2 downto 0) := "001"; constant ALUBUS_IN : std_logic_vector(2 downto 0) := "010"; constant MDBUS_IN : std_logic_vector(2 downto 0) := "011"; constant ES_IN : std_logic_vector(2 downto 0) := "100"; constant CS_IN : std_logic_vector(2 downto 0) := "101"; constant SS_IN : std_logic_vector(2 downto 0) := "110"; constant DS_IN : std_logic_vector(2 downto 0) := "111"; -- SIMUX Segment Register input Mux constant SDATAIN_IN : std_logic_vector(1 downto 0) := "00"; constant SEABUS_IN : std_logic_vector(1 downto 0) := "01"; -- Effective Address constant SALUBUS_IN : std_logic_vector(1 downto 0) := "10"; constant SMDBUS_IN : std_logic_vector(1 downto 0) := "11"; -- DOMUX (Note bit 2=odd/even) constant ALUBUS_OUT : std_logic_vector(1 downto 0) := "00"; constant CCBUS_OUT : std_logic_vector(1 downto 0) := "01"; constant DIBUS_OUT : std_logic_vector(1 downto 0) := "10"; constant IPBUS_OUT : std_logic_vector(1 downto 0) := "11"; -- dispmux(3) & eamux(4) & poflag & segop[1:0] -- note some bits may be dontcare! constant NB_ES_IP : std_logic_vector(9 downto 0) := "0000000000"; -- IPREG+NB ADDR=ES:IP constant NB_CS_IP : std_logic_vector(9 downto 0) := "0000000001"; constant NB_SS_IP : std_logic_vector(9 downto 0) := "0000000010"; constant NB_DS_IP : std_logic_vector(9 downto 0) := "0000000011"; constant NB_ES_EA : std_logic_vector(9 downto 0) := "0000001000"; -- IPREG+NB ADDR=EA constant NB_CS_EA : std_logic_vector(9 downto 0) := "0000001001"; constant NB_SS_EA : std_logic_vector(9 downto 0) := "0000001010"; constant NB_DS_EA : std_logic_vector(9 downto 0) := "0000001011"; constant DISP_ES_EA : std_logic_vector(9 downto 0) := "0010001000"; -- IPREG+DISP ADDR=EA constant DISP_CS_EA : std_logic_vector(9 downto 0) := "0010001001"; constant DISP_SS_EA : std_logic_vector(9 downto 0) := "0010001010"; constant DISP_DS_EA : std_logic_vector(9 downto 0) := "0010001011"; constant DISP_CS_IP : std_logic_vector(9 downto 0) := "0010000001"; -- Used for Jx instructions constant PORT_00_DX : std_logic_vector(6 downto 0) := "0000010"; -- EAMUX IN/OUT instruction constant PORT_00_EA : std_logic_vector(6 downto 0) := "0000001"; -- EAMUX Segm=00 00:IP or 00:DISP constant NB_SS_SP : std_logic_vector(6 downto 0) := "0000100"; -- IP=IP+NBREQ, EAMUX=SS:SP , 100, 101, 110 unused constant LD_SS_SP : std_logic_vector(6 downto 0) := "0100100"; -- Load new IP from MDBUS & out=SS:SP constant LD_MD_IP : std_logic_vector(9 downto 0) := "0100000001"; -- Load new IP from MDBUS (e.g. RET instruction) constant LD_CS_IP : std_logic_vector(9 downto 0) := "0110000001"; -- Load new IP (e.g. RET instruction) constant EA_CS_IP : std_logic_vector(9 downto 0) := "1000001001"; -- Load new IP (e.g. RET instruction) constant IPB_CS_IP : std_logic_vector(9 downto 0) := "1110000001"; -- Select IPBUS=IPREG constant MD_EA2_DS : std_logic_vector(9 downto 0) := "0100011011"; -- IP<-MD, addr=DS:EA2 -- SELALUA/B or SELDREG(2 downto 0) constant REG_AX : std_logic_vector(3 downto 0) := "0000"; -- W=1 Into ALUBUS A or B constant REG_CX : std_logic_vector(3 downto 0) := "0001"; constant REG_DX : std_logic_vector(3 downto 0) := "0010"; constant REG_BX : std_logic_vector(3 downto 0) := "0011"; constant REG_SP : std_logic_vector(3 downto 0) := "0100"; constant REG_BP : std_logic_vector(3 downto 0) := "0101"; constant REG_SI : std_logic_vector(3 downto 0) := "0110"; constant REG_DI : std_logic_vector(3 downto 0) := "0111"; constant REG_DATAIN : std_logic_vector(3 downto 0) := "1000"; -- Pass data_in to ALU constant REG_MDBUS : std_logic_vector(3 downto 0) := "1111"; -- Pass memory bus (mdbus) to ALU -- Only for SELALUB constant REG_CONST1 : std_logic_vector(3 downto 0) := "1001"; -- Used for INC/DEC function, W=0/1 constant REG_CONST2 : std_logic_vector(3 downto 0) := "1010"; -- Used for POP/PUSH function W=1 -- W+SELDREG constant REG_AH : std_logic_vector(3 downto 0) := "0100"; -- W=1 SELDREG=AH --------------------------------------------------------------- -- ALU Operations -- Use ireg(5 downto 3) / modrm(5 downto 3) / ireg(3 downto 0) -- Constants for --------------------------------------------------------------- constant ALU_ADD : std_logic_vector(6 downto 0) := "0000000"; constant ALU_OR : std_logic_vector(6 downto 0) := "0000001"; constant ALU_ADC : std_logic_vector(6 downto 0) := "0000010"; constant ALU_SBB : std_logic_vector(6 downto 0) := "0000011"; constant ALU_AND : std_logic_vector(6 downto 0) := "0000100"; constant ALU_SUB : std_logic_vector(6 downto 0) := "0000101"; constant ALU_XOR : std_logic_vector(6 downto 0) := "0000110"; constant ALU_CMP : std_logic_vector(6 downto 0) := "0000111"; -- See also ALU_CMPS constant ALU_TEST0 : std_logic_vector(6 downto 0) := "0001000"; constant ALU_TEST1 : std_logic_vector(6 downto 0) := "0001101"; -- Random assignment, these can be changed. constant ALU_PUSH : std_logic_vector(6 downto 0) := "0001001"; -- Used for PUSH (SUB) constant ALU_POP : std_logic_vector(6 downto 0) := "0001010"; -- Used for POP (ADD) constant ALU_REGL : std_logic_vector(6 downto 0) := "0001011"; -- alureg(15..0) (latched alu_busb) constant ALU_REGH : std_logic_vector(6 downto 0) := "0111011"; -- alureg(31..16) (latched alu_busa) constant ALU_PASSA : std_logic_vector(6 downto 0) := "0001100"; -- abus_s only constant ALU_TEMP : std_logic_vector(6 downto 0) := "1111001"; -- Used to select temp/scratchpad register (80186 only) -- CONST & instr.irg(3 downto 0) constant ALU_SAHF : std_logic_vector(6 downto 0) := "0001110"; -- AH -> Flags -- CONST & instr.irg(3 downto 0) constant ALU_LAHF : std_logic_vector(6 downto 0) := "0001111"; -- Flags->ALUBUS (->AH) -- CONSTANT & instr.ireg(1) & modrm.reg(5 downto 3) -- CONSTANT=001 constant ALU_ROL1 : std_logic_vector(6 downto 0) := "0010000"; -- count=1 constant ALU_ROR1 : std_logic_vector(6 downto 0) := "0010001"; constant ALU_RCL1 : std_logic_vector(6 downto 0) := "0010010"; constant ALU_RCR1 : std_logic_vector(6 downto 0) := "0010011"; constant ALU_SHL1 : std_logic_vector(6 downto 0) := "0010100"; constant ALU_SHR1 : std_logic_vector(6 downto 0) := "0010101"; constant ALU_SAR1 : std_logic_vector(6 downto 0) := "0010111"; constant ALU_ROL : std_logic_vector(6 downto 0) := "0011000"; -- Count in CL constant ALU_ROR : std_logic_vector(6 downto 0) := "0011001"; constant ALU_RCL : std_logic_vector(6 downto 0) := "0011010"; constant ALU_RCR : std_logic_vector(6 downto 0) := "0011011"; constant ALU_SHL : std_logic_vector(6 downto 0) := "0011100"; constant ALU_SHR : std_logic_vector(6 downto 0) := "0011101"; constant ALU_SAR : std_logic_vector(6 downto 0) := "0011111"; -- CONST & modrm.reg(5 downto 3)/instr.ireg(5 downto 3) constant ALU_INC : std_logic_vector(6 downto 0) := "0100000"; -- Increment constant ALU_DEC : std_logic_vector(6 downto 0) := "0100001"; -- Decrement also used for LOOP/JCXZ constant ALU_CLRTIF : std_logic_vector(6 downto 0) := "0100010"; -- Clear TF/IF flag, used for INT constant ALU_CMPS : std_logic_vector(6 downto 0) := "0100111"; -- Compare String ALUREG-MDBUS constant ALU_SCAS : std_logic_vector(6 downto 0) := "0101111"; -- AX/AL-MDBUS, no SEXT -- CONST & instr.irg(3 downto 0) constant ALU_CMC : std_logic_vector(6 downto 0) := "0100101"; -- Complement Carry constant ALU_CLC : std_logic_vector(6 downto 0) := "0101000"; -- Clear Carry constant ALU_STC : std_logic_vector(6 downto 0) := "0101001"; -- Set Carry constant ALU_CLI : std_logic_vector(6 downto 0) := "0101010"; -- Clear interrupt constant ALU_STI : std_logic_vector(6 downto 0) := "0101011"; -- Set Interrupt constant ALU_CLD : std_logic_vector(6 downto 0) := "0101100"; -- Clear Direction constant ALU_STD : std_logic_vector(6 downto 0) := "0101101"; -- Set Direction -- CONST & modrm.reg(5 downto 3) constant ALU_TEST2 : std_logic_vector(6 downto 0) := "0110000"; -- F6/F7 constant ALU_NOT : std_logic_vector(6 downto 0) := "0110010"; -- F6/F7 constant ALU_NEG : std_logic_vector(6 downto 0) := "0110011"; -- F6/F7 constant ALU_MUL : std_logic_vector(6 downto 0) := "0110100"; -- F6/F7 constant ALU_IMUL : std_logic_vector(6 downto 0) := "0110101"; -- F6/F7 constant ALU_DIV : std_logic_vector(6 downto 0) := "0110110"; -- F6/F7 constant ALU_IDIV : std_logic_vector(6 downto 0) := "0110111"; -- F6/F7 -- Second cycle write DX constant ALU_MUL2 : std_logic_vector(6 downto 0) := "0111100"; -- F6/F7 constant ALU_IMUL2 : std_logic_vector(6 downto 0) := "0111101"; -- F6/F7 constant ALU_DIV2 : std_logic_vector(6 downto 0) := "0111110"; -- F6/F7 constant ALU_IDIV2 : std_logic_vector(6 downto 0) := "0111111"; -- F6/F7 -- CONST & instr.ireg(3 downto 0) constant ALU_SEXT : std_logic_vector(6 downto 0) := "0111000"; -- Used for CBW constant ALU_SEXTW : std_logic_vector(6 downto 0) := "0111001"; -- Used for CWD -- CONSTANT & & instr.ireg(1) & instr.ireg(5 downto 3) constant ALU_AAM : std_logic_vector(6 downto 0) := "1000010"; constant ALU_AAD : std_logic_vector(6 downto 0) := "1001010"; constant ALU_DAA : std_logic_vector(6 downto 0) := "1001100"; constant ALU_DAS : std_logic_vector(6 downto 0) := "1001101"; constant ALU_AAA : std_logic_vector(6 downto 0) := "1001110"; constant ALU_AAS : std_logic_vector(6 downto 0) := "1001111"; constant ALU_ADD_SE : std_logic_vector(6 downto 0) := "1100000"; constant ALU_OR_SE : std_logic_vector(6 downto 0) := "1100001"; constant ALU_ADC_SE : std_logic_vector(6 downto 0) := "1100010"; constant ALU_SBB_SE : std_logic_vector(6 downto 0) := "1100011"; constant ALU_AND_SE : std_logic_vector(6 downto 0) := "1100100"; constant ALU_SUB_SE : std_logic_vector(6 downto 0) := "1100101"; constant ALU_XOR_SE : std_logic_vector(6 downto 0) := "1100110"; constant ALU_CMP_SE : std_logic_vector(6 downto 0) := "1100111"; END cpu86pack;
------------------------------------------------------------------------------- -- CPU86 - VHDL CPU8088 IP core -- -- Copyright (C) 2002-2008 HT-LAB -- -- -- -- Contact/bugs : http://www.ht-lab.com/misc/feedback.html -- -- Web : http://www.ht-lab.com -- -- -- -- CPU86 is released as open-source under the GNU GPL license. This means -- -- that designs based on CPU86 must be distributed in full source code -- -- under the same license. Contact HT-Lab for commercial applications where -- -- source-code distribution is not desirable. -- -- -- ------------------------------------------------------------------------------- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU Lesser General Public -- -- License as published by the Free Software Foundation; either -- -- version 2.1 of the License, or (at your option) any later version. -- -- -- -- This library 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 -- -- Lesser General Public License for more details. -- -- -- -- Full details of the license can be found in the file "copying.txt". -- -- -- -- You should have received a copy of the GNU Lesser General Public -- -- License along with this library; if not, write to the Free Software -- -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- ------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; PACKAGE cpu86pack IS constant RESET_CS_C : std_logic_vector(15 downto 0) := (others => '1'); -- FFFF:0000 constant RESET_IP_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_ES_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_SS_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_DS_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_VECTOR_C : std_logic_vector(19 downto 0) := (RESET_CS_C & X"0") + (X"0" & RESET_IP_C); constant MUL_MCD_C : std_logic_vector(4 downto 0) := "00010"; -- mul MCP -- Serial Divider delay -- changed later to done signal -- You can gain 1 clk cycle, done can be asserted 1 cycle earlier constant DIV_MCD_C : std_logic_vector(4 downto 0) := "10011"; -- div waitstates 19! constant ONE : std_logic := '1'; constant ZERO : std_logic := '0'; constant ZEROVECTOR_C : std_logic_vector(31 downto 0) := X"00000000"; -- Minimum value for MAX_WS="000", this result in a 2 cycle rd/wr strobe -- Total Read cycle is 1 cycle for address setup + 2 cycles for rd/wr strobe, thus -- minimum bus cycle is 3 clk cycles. constant WS_WIDTH : integer := 3; -- 2^WS_WIDTH=MAX Waitstates constant MAX_WS : std_logic_vector(WS_WIDTH-1 downto 0) := "000"; -- 3 clk bus cycles constant DONTCARE : std_logic_vector(31 downto 0):=X"FFFFFFFF"; -- Status record containing some data and flag register type instruction_type is record ireg : std_logic_vector(7 downto 0); -- Instruction register xmod : std_logic_vector(1 downto 0); -- mod is a reserved word reg : std_logic_vector(2 downto 0); -- between mode and rm rm : std_logic_vector(2 downto 0); data : std_logic_vector(15 downto 0); disp : std_logic_vector(15 downto 0); nb : std_logic_vector(2 downto 0); -- Number of bytes end record; -- Status record containing some data and flag register type status_out_type is record ax : std_logic_vector(15 downto 0); cx_one : std_logic; -- '1' if CX=0001 cx_zero : std_logic; -- '1' if CX=0000 cl : std_logic_vector(7 downto 0); -- 5 bits shift/rotate counter flag : std_logic_vector(15 downto 0); div_err : std_logic; -- Divider overflow end record; -------------------------------------------------------------------------------------- -- Data Path Records -------------------------------------------------------------------------------------- type path_in_type is record datareg_input : std_logic_vector(6 downto 0); -- dimux(3) & w & seldreg(3) alu_operation : std_logic_vector(14 downto 0);-- selalua(4) & selalub(4) & aluopr(7) dbus_output : std_logic_vector(1 downto 0); -- (Odd/Even) domux setting segreg_input : std_logic_vector(3 downto 0); -- simux & selsreg ea_output : std_logic_vector(9 downto 0); -- dispmux(3) & eamux(4) & [flag]&segop(2) end record; -- Write Strobe Record for Data Path type write_in_type is record wrd : std_logic; -- Write datareg wralu : std_logic; -- Write ALU result wrcc : std_logic; -- Write Flag register wrs : std_logic; -- Write Segment register wrip : std_logic; -- Write Instruction Pointer wrop : std_logic; -- Write Segment Prefix register, Set Prefix Flag wrtemp: std_logic; -- Write to ALU_TEMP register end record; constant SET_OPFLAG : std_logic:='1'; -- Override Prefix Flag -- DIMUX constant DATAIN_IN : std_logic_vector(2 downto 0) := "000"; constant EABUS_IN : std_logic_vector(2 downto 0) := "001"; constant ALUBUS_IN : std_logic_vector(2 downto 0) := "010"; constant MDBUS_IN : std_logic_vector(2 downto 0) := "011"; constant ES_IN : std_logic_vector(2 downto 0) := "100"; constant CS_IN : std_logic_vector(2 downto 0) := "101"; constant SS_IN : std_logic_vector(2 downto 0) := "110"; constant DS_IN : std_logic_vector(2 downto 0) := "111"; -- SIMUX Segment Register input Mux constant SDATAIN_IN : std_logic_vector(1 downto 0) := "00"; constant SEABUS_IN : std_logic_vector(1 downto 0) := "01"; -- Effective Address constant SALUBUS_IN : std_logic_vector(1 downto 0) := "10"; constant SMDBUS_IN : std_logic_vector(1 downto 0) := "11"; -- DOMUX (Note bit 2=odd/even) constant ALUBUS_OUT : std_logic_vector(1 downto 0) := "00"; constant CCBUS_OUT : std_logic_vector(1 downto 0) := "01"; constant DIBUS_OUT : std_logic_vector(1 downto 0) := "10"; constant IPBUS_OUT : std_logic_vector(1 downto 0) := "11"; -- dispmux(3) & eamux(4) & poflag & segop[1:0] -- note some bits may be dontcare! constant NB_ES_IP : std_logic_vector(9 downto 0) := "0000000000"; -- IPREG+NB ADDR=ES:IP constant NB_CS_IP : std_logic_vector(9 downto 0) := "0000000001"; constant NB_SS_IP : std_logic_vector(9 downto 0) := "0000000010"; constant NB_DS_IP : std_logic_vector(9 downto 0) := "0000000011"; constant NB_ES_EA : std_logic_vector(9 downto 0) := "0000001000"; -- IPREG+NB ADDR=EA constant NB_CS_EA : std_logic_vector(9 downto 0) := "0000001001"; constant NB_SS_EA : std_logic_vector(9 downto 0) := "0000001010"; constant NB_DS_EA : std_logic_vector(9 downto 0) := "0000001011"; constant DISP_ES_EA : std_logic_vector(9 downto 0) := "0010001000"; -- IPREG+DISP ADDR=EA constant DISP_CS_EA : std_logic_vector(9 downto 0) := "0010001001"; constant DISP_SS_EA : std_logic_vector(9 downto 0) := "0010001010"; constant DISP_DS_EA : std_logic_vector(9 downto 0) := "0010001011"; constant DISP_CS_IP : std_logic_vector(9 downto 0) := "0010000001"; -- Used for Jx instructions constant PORT_00_DX : std_logic_vector(6 downto 0) := "0000010"; -- EAMUX IN/OUT instruction constant PORT_00_EA : std_logic_vector(6 downto 0) := "0000001"; -- EAMUX Segm=00 00:IP or 00:DISP constant NB_SS_SP : std_logic_vector(6 downto 0) := "0000100"; -- IP=IP+NBREQ, EAMUX=SS:SP , 100, 101, 110 unused constant LD_SS_SP : std_logic_vector(6 downto 0) := "0100100"; -- Load new IP from MDBUS & out=SS:SP constant LD_MD_IP : std_logic_vector(9 downto 0) := "0100000001"; -- Load new IP from MDBUS (e.g. RET instruction) constant LD_CS_IP : std_logic_vector(9 downto 0) := "0110000001"; -- Load new IP (e.g. RET instruction) constant EA_CS_IP : std_logic_vector(9 downto 0) := "1000001001"; -- Load new IP (e.g. RET instruction) constant IPB_CS_IP : std_logic_vector(9 downto 0) := "1110000001"; -- Select IPBUS=IPREG constant MD_EA2_DS : std_logic_vector(9 downto 0) := "0100011011"; -- IP<-MD, addr=DS:EA2 -- SELALUA/B or SELDREG(2 downto 0) constant REG_AX : std_logic_vector(3 downto 0) := "0000"; -- W=1 Into ALUBUS A or B constant REG_CX : std_logic_vector(3 downto 0) := "0001"; constant REG_DX : std_logic_vector(3 downto 0) := "0010"; constant REG_BX : std_logic_vector(3 downto 0) := "0011"; constant REG_SP : std_logic_vector(3 downto 0) := "0100"; constant REG_BP : std_logic_vector(3 downto 0) := "0101"; constant REG_SI : std_logic_vector(3 downto 0) := "0110"; constant REG_DI : std_logic_vector(3 downto 0) := "0111"; constant REG_DATAIN : std_logic_vector(3 downto 0) := "1000"; -- Pass data_in to ALU constant REG_MDBUS : std_logic_vector(3 downto 0) := "1111"; -- Pass memory bus (mdbus) to ALU -- Only for SELALUB constant REG_CONST1 : std_logic_vector(3 downto 0) := "1001"; -- Used for INC/DEC function, W=0/1 constant REG_CONST2 : std_logic_vector(3 downto 0) := "1010"; -- Used for POP/PUSH function W=1 -- W+SELDREG constant REG_AH : std_logic_vector(3 downto 0) := "0100"; -- W=1 SELDREG=AH --------------------------------------------------------------- -- ALU Operations -- Use ireg(5 downto 3) / modrm(5 downto 3) / ireg(3 downto 0) -- Constants for --------------------------------------------------------------- constant ALU_ADD : std_logic_vector(6 downto 0) := "0000000"; constant ALU_OR : std_logic_vector(6 downto 0) := "0000001"; constant ALU_ADC : std_logic_vector(6 downto 0) := "0000010"; constant ALU_SBB : std_logic_vector(6 downto 0) := "0000011"; constant ALU_AND : std_logic_vector(6 downto 0) := "0000100"; constant ALU_SUB : std_logic_vector(6 downto 0) := "0000101"; constant ALU_XOR : std_logic_vector(6 downto 0) := "0000110"; constant ALU_CMP : std_logic_vector(6 downto 0) := "0000111"; -- See also ALU_CMPS constant ALU_TEST0 : std_logic_vector(6 downto 0) := "0001000"; constant ALU_TEST1 : std_logic_vector(6 downto 0) := "0001101"; -- Random assignment, these can be changed. constant ALU_PUSH : std_logic_vector(6 downto 0) := "0001001"; -- Used for PUSH (SUB) constant ALU_POP : std_logic_vector(6 downto 0) := "0001010"; -- Used for POP (ADD) constant ALU_REGL : std_logic_vector(6 downto 0) := "0001011"; -- alureg(15..0) (latched alu_busb) constant ALU_REGH : std_logic_vector(6 downto 0) := "0111011"; -- alureg(31..16) (latched alu_busa) constant ALU_PASSA : std_logic_vector(6 downto 0) := "0001100"; -- abus_s only constant ALU_TEMP : std_logic_vector(6 downto 0) := "1111001"; -- Used to select temp/scratchpad register (80186 only) -- CONST & instr.irg(3 downto 0) constant ALU_SAHF : std_logic_vector(6 downto 0) := "0001110"; -- AH -> Flags -- CONST & instr.irg(3 downto 0) constant ALU_LAHF : std_logic_vector(6 downto 0) := "0001111"; -- Flags->ALUBUS (->AH) -- CONSTANT & instr.ireg(1) & modrm.reg(5 downto 3) -- CONSTANT=001 constant ALU_ROL1 : std_logic_vector(6 downto 0) := "0010000"; -- count=1 constant ALU_ROR1 : std_logic_vector(6 downto 0) := "0010001"; constant ALU_RCL1 : std_logic_vector(6 downto 0) := "0010010"; constant ALU_RCR1 : std_logic_vector(6 downto 0) := "0010011"; constant ALU_SHL1 : std_logic_vector(6 downto 0) := "0010100"; constant ALU_SHR1 : std_logic_vector(6 downto 0) := "0010101"; constant ALU_SAR1 : std_logic_vector(6 downto 0) := "0010111"; constant ALU_ROL : std_logic_vector(6 downto 0) := "0011000"; -- Count in CL constant ALU_ROR : std_logic_vector(6 downto 0) := "0011001"; constant ALU_RCL : std_logic_vector(6 downto 0) := "0011010"; constant ALU_RCR : std_logic_vector(6 downto 0) := "0011011"; constant ALU_SHL : std_logic_vector(6 downto 0) := "0011100"; constant ALU_SHR : std_logic_vector(6 downto 0) := "0011101"; constant ALU_SAR : std_logic_vector(6 downto 0) := "0011111"; -- CONST & modrm.reg(5 downto 3)/instr.ireg(5 downto 3) constant ALU_INC : std_logic_vector(6 downto 0) := "0100000"; -- Increment constant ALU_DEC : std_logic_vector(6 downto 0) := "0100001"; -- Decrement also used for LOOP/JCXZ constant ALU_CLRTIF : std_logic_vector(6 downto 0) := "0100010"; -- Clear TF/IF flag, used for INT constant ALU_CMPS : std_logic_vector(6 downto 0) := "0100111"; -- Compare String ALUREG-MDBUS constant ALU_SCAS : std_logic_vector(6 downto 0) := "0101111"; -- AX/AL-MDBUS, no SEXT -- CONST & instr.irg(3 downto 0) constant ALU_CMC : std_logic_vector(6 downto 0) := "0100101"; -- Complement Carry constant ALU_CLC : std_logic_vector(6 downto 0) := "0101000"; -- Clear Carry constant ALU_STC : std_logic_vector(6 downto 0) := "0101001"; -- Set Carry constant ALU_CLI : std_logic_vector(6 downto 0) := "0101010"; -- Clear interrupt constant ALU_STI : std_logic_vector(6 downto 0) := "0101011"; -- Set Interrupt constant ALU_CLD : std_logic_vector(6 downto 0) := "0101100"; -- Clear Direction constant ALU_STD : std_logic_vector(6 downto 0) := "0101101"; -- Set Direction -- CONST & modrm.reg(5 downto 3) constant ALU_TEST2 : std_logic_vector(6 downto 0) := "0110000"; -- F6/F7 constant ALU_NOT : std_logic_vector(6 downto 0) := "0110010"; -- F6/F7 constant ALU_NEG : std_logic_vector(6 downto 0) := "0110011"; -- F6/F7 constant ALU_MUL : std_logic_vector(6 downto 0) := "0110100"; -- F6/F7 constant ALU_IMUL : std_logic_vector(6 downto 0) := "0110101"; -- F6/F7 constant ALU_DIV : std_logic_vector(6 downto 0) := "0110110"; -- F6/F7 constant ALU_IDIV : std_logic_vector(6 downto 0) := "0110111"; -- F6/F7 -- Second cycle write DX constant ALU_MUL2 : std_logic_vector(6 downto 0) := "0111100"; -- F6/F7 constant ALU_IMUL2 : std_logic_vector(6 downto 0) := "0111101"; -- F6/F7 constant ALU_DIV2 : std_logic_vector(6 downto 0) := "0111110"; -- F6/F7 constant ALU_IDIV2 : std_logic_vector(6 downto 0) := "0111111"; -- F6/F7 -- CONST & instr.ireg(3 downto 0) constant ALU_SEXT : std_logic_vector(6 downto 0) := "0111000"; -- Used for CBW constant ALU_SEXTW : std_logic_vector(6 downto 0) := "0111001"; -- Used for CWD -- CONSTANT & & instr.ireg(1) & instr.ireg(5 downto 3) constant ALU_AAM : std_logic_vector(6 downto 0) := "1000010"; constant ALU_AAD : std_logic_vector(6 downto 0) := "1001010"; constant ALU_DAA : std_logic_vector(6 downto 0) := "1001100"; constant ALU_DAS : std_logic_vector(6 downto 0) := "1001101"; constant ALU_AAA : std_logic_vector(6 downto 0) := "1001110"; constant ALU_AAS : std_logic_vector(6 downto 0) := "1001111"; constant ALU_ADD_SE : std_logic_vector(6 downto 0) := "1100000"; constant ALU_OR_SE : std_logic_vector(6 downto 0) := "1100001"; constant ALU_ADC_SE : std_logic_vector(6 downto 0) := "1100010"; constant ALU_SBB_SE : std_logic_vector(6 downto 0) := "1100011"; constant ALU_AND_SE : std_logic_vector(6 downto 0) := "1100100"; constant ALU_SUB_SE : std_logic_vector(6 downto 0) := "1100101"; constant ALU_XOR_SE : std_logic_vector(6 downto 0) := "1100110"; constant ALU_CMP_SE : std_logic_vector(6 downto 0) := "1100111"; END cpu86pack;
------------------------------------------------------------------------------- -- CPU86 - VHDL CPU8088 IP core -- -- Copyright (C) 2002-2008 HT-LAB -- -- -- -- Contact/bugs : http://www.ht-lab.com/misc/feedback.html -- -- Web : http://www.ht-lab.com -- -- -- -- CPU86 is released as open-source under the GNU GPL license. This means -- -- that designs based on CPU86 must be distributed in full source code -- -- under the same license. Contact HT-Lab for commercial applications where -- -- source-code distribution is not desirable. -- -- -- ------------------------------------------------------------------------------- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU Lesser General Public -- -- License as published by the Free Software Foundation; either -- -- version 2.1 of the License, or (at your option) any later version. -- -- -- -- This library 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 -- -- Lesser General Public License for more details. -- -- -- -- Full details of the license can be found in the file "copying.txt". -- -- -- -- You should have received a copy of the GNU Lesser General Public -- -- License along with this library; if not, write to the Free Software -- -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- ------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; PACKAGE cpu86pack IS constant RESET_CS_C : std_logic_vector(15 downto 0) := (others => '1'); -- FFFF:0000 constant RESET_IP_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_ES_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_SS_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_DS_C : std_logic_vector(15 downto 0) := (others => '0'); constant RESET_VECTOR_C : std_logic_vector(19 downto 0) := (RESET_CS_C & X"0") + (X"0" & RESET_IP_C); constant MUL_MCD_C : std_logic_vector(4 downto 0) := "00010"; -- mul MCP -- Serial Divider delay -- changed later to done signal -- You can gain 1 clk cycle, done can be asserted 1 cycle earlier constant DIV_MCD_C : std_logic_vector(4 downto 0) := "10011"; -- div waitstates 19! constant ONE : std_logic := '1'; constant ZERO : std_logic := '0'; constant ZEROVECTOR_C : std_logic_vector(31 downto 0) := X"00000000"; -- Minimum value for MAX_WS="000", this result in a 2 cycle rd/wr strobe -- Total Read cycle is 1 cycle for address setup + 2 cycles for rd/wr strobe, thus -- minimum bus cycle is 3 clk cycles. constant WS_WIDTH : integer := 3; -- 2^WS_WIDTH=MAX Waitstates constant MAX_WS : std_logic_vector(WS_WIDTH-1 downto 0) := "000"; -- 3 clk bus cycles constant DONTCARE : std_logic_vector(31 downto 0):=X"FFFFFFFF"; -- Status record containing some data and flag register type instruction_type is record ireg : std_logic_vector(7 downto 0); -- Instruction register xmod : std_logic_vector(1 downto 0); -- mod is a reserved word reg : std_logic_vector(2 downto 0); -- between mode and rm rm : std_logic_vector(2 downto 0); data : std_logic_vector(15 downto 0); disp : std_logic_vector(15 downto 0); nb : std_logic_vector(2 downto 0); -- Number of bytes end record; -- Status record containing some data and flag register type status_out_type is record ax : std_logic_vector(15 downto 0); cx_one : std_logic; -- '1' if CX=0001 cx_zero : std_logic; -- '1' if CX=0000 cl : std_logic_vector(7 downto 0); -- 5 bits shift/rotate counter flag : std_logic_vector(15 downto 0); div_err : std_logic; -- Divider overflow end record; -------------------------------------------------------------------------------------- -- Data Path Records -------------------------------------------------------------------------------------- type path_in_type is record datareg_input : std_logic_vector(6 downto 0); -- dimux(3) & w & seldreg(3) alu_operation : std_logic_vector(14 downto 0);-- selalua(4) & selalub(4) & aluopr(7) dbus_output : std_logic_vector(1 downto 0); -- (Odd/Even) domux setting segreg_input : std_logic_vector(3 downto 0); -- simux & selsreg ea_output : std_logic_vector(9 downto 0); -- dispmux(3) & eamux(4) & [flag]&segop(2) end record; -- Write Strobe Record for Data Path type write_in_type is record wrd : std_logic; -- Write datareg wralu : std_logic; -- Write ALU result wrcc : std_logic; -- Write Flag register wrs : std_logic; -- Write Segment register wrip : std_logic; -- Write Instruction Pointer wrop : std_logic; -- Write Segment Prefix register, Set Prefix Flag wrtemp: std_logic; -- Write to ALU_TEMP register end record; constant SET_OPFLAG : std_logic:='1'; -- Override Prefix Flag -- DIMUX constant DATAIN_IN : std_logic_vector(2 downto 0) := "000"; constant EABUS_IN : std_logic_vector(2 downto 0) := "001"; constant ALUBUS_IN : std_logic_vector(2 downto 0) := "010"; constant MDBUS_IN : std_logic_vector(2 downto 0) := "011"; constant ES_IN : std_logic_vector(2 downto 0) := "100"; constant CS_IN : std_logic_vector(2 downto 0) := "101"; constant SS_IN : std_logic_vector(2 downto 0) := "110"; constant DS_IN : std_logic_vector(2 downto 0) := "111"; -- SIMUX Segment Register input Mux constant SDATAIN_IN : std_logic_vector(1 downto 0) := "00"; constant SEABUS_IN : std_logic_vector(1 downto 0) := "01"; -- Effective Address constant SALUBUS_IN : std_logic_vector(1 downto 0) := "10"; constant SMDBUS_IN : std_logic_vector(1 downto 0) := "11"; -- DOMUX (Note bit 2=odd/even) constant ALUBUS_OUT : std_logic_vector(1 downto 0) := "00"; constant CCBUS_OUT : std_logic_vector(1 downto 0) := "01"; constant DIBUS_OUT : std_logic_vector(1 downto 0) := "10"; constant IPBUS_OUT : std_logic_vector(1 downto 0) := "11"; -- dispmux(3) & eamux(4) & poflag & segop[1:0] -- note some bits may be dontcare! constant NB_ES_IP : std_logic_vector(9 downto 0) := "0000000000"; -- IPREG+NB ADDR=ES:IP constant NB_CS_IP : std_logic_vector(9 downto 0) := "0000000001"; constant NB_SS_IP : std_logic_vector(9 downto 0) := "0000000010"; constant NB_DS_IP : std_logic_vector(9 downto 0) := "0000000011"; constant NB_ES_EA : std_logic_vector(9 downto 0) := "0000001000"; -- IPREG+NB ADDR=EA constant NB_CS_EA : std_logic_vector(9 downto 0) := "0000001001"; constant NB_SS_EA : std_logic_vector(9 downto 0) := "0000001010"; constant NB_DS_EA : std_logic_vector(9 downto 0) := "0000001011"; constant DISP_ES_EA : std_logic_vector(9 downto 0) := "0010001000"; -- IPREG+DISP ADDR=EA constant DISP_CS_EA : std_logic_vector(9 downto 0) := "0010001001"; constant DISP_SS_EA : std_logic_vector(9 downto 0) := "0010001010"; constant DISP_DS_EA : std_logic_vector(9 downto 0) := "0010001011"; constant DISP_CS_IP : std_logic_vector(9 downto 0) := "0010000001"; -- Used for Jx instructions constant PORT_00_DX : std_logic_vector(6 downto 0) := "0000010"; -- EAMUX IN/OUT instruction constant PORT_00_EA : std_logic_vector(6 downto 0) := "0000001"; -- EAMUX Segm=00 00:IP or 00:DISP constant NB_SS_SP : std_logic_vector(6 downto 0) := "0000100"; -- IP=IP+NBREQ, EAMUX=SS:SP , 100, 101, 110 unused constant LD_SS_SP : std_logic_vector(6 downto 0) := "0100100"; -- Load new IP from MDBUS & out=SS:SP constant LD_MD_IP : std_logic_vector(9 downto 0) := "0100000001"; -- Load new IP from MDBUS (e.g. RET instruction) constant LD_CS_IP : std_logic_vector(9 downto 0) := "0110000001"; -- Load new IP (e.g. RET instruction) constant EA_CS_IP : std_logic_vector(9 downto 0) := "1000001001"; -- Load new IP (e.g. RET instruction) constant IPB_CS_IP : std_logic_vector(9 downto 0) := "1110000001"; -- Select IPBUS=IPREG constant MD_EA2_DS : std_logic_vector(9 downto 0) := "0100011011"; -- IP<-MD, addr=DS:EA2 -- SELALUA/B or SELDREG(2 downto 0) constant REG_AX : std_logic_vector(3 downto 0) := "0000"; -- W=1 Into ALUBUS A or B constant REG_CX : std_logic_vector(3 downto 0) := "0001"; constant REG_DX : std_logic_vector(3 downto 0) := "0010"; constant REG_BX : std_logic_vector(3 downto 0) := "0011"; constant REG_SP : std_logic_vector(3 downto 0) := "0100"; constant REG_BP : std_logic_vector(3 downto 0) := "0101"; constant REG_SI : std_logic_vector(3 downto 0) := "0110"; constant REG_DI : std_logic_vector(3 downto 0) := "0111"; constant REG_DATAIN : std_logic_vector(3 downto 0) := "1000"; -- Pass data_in to ALU constant REG_MDBUS : std_logic_vector(3 downto 0) := "1111"; -- Pass memory bus (mdbus) to ALU -- Only for SELALUB constant REG_CONST1 : std_logic_vector(3 downto 0) := "1001"; -- Used for INC/DEC function, W=0/1 constant REG_CONST2 : std_logic_vector(3 downto 0) := "1010"; -- Used for POP/PUSH function W=1 -- W+SELDREG constant REG_AH : std_logic_vector(3 downto 0) := "0100"; -- W=1 SELDREG=AH --------------------------------------------------------------- -- ALU Operations -- Use ireg(5 downto 3) / modrm(5 downto 3) / ireg(3 downto 0) -- Constants for --------------------------------------------------------------- constant ALU_ADD : std_logic_vector(6 downto 0) := "0000000"; constant ALU_OR : std_logic_vector(6 downto 0) := "0000001"; constant ALU_ADC : std_logic_vector(6 downto 0) := "0000010"; constant ALU_SBB : std_logic_vector(6 downto 0) := "0000011"; constant ALU_AND : std_logic_vector(6 downto 0) := "0000100"; constant ALU_SUB : std_logic_vector(6 downto 0) := "0000101"; constant ALU_XOR : std_logic_vector(6 downto 0) := "0000110"; constant ALU_CMP : std_logic_vector(6 downto 0) := "0000111"; -- See also ALU_CMPS constant ALU_TEST0 : std_logic_vector(6 downto 0) := "0001000"; constant ALU_TEST1 : std_logic_vector(6 downto 0) := "0001101"; -- Random assignment, these can be changed. constant ALU_PUSH : std_logic_vector(6 downto 0) := "0001001"; -- Used for PUSH (SUB) constant ALU_POP : std_logic_vector(6 downto 0) := "0001010"; -- Used for POP (ADD) constant ALU_REGL : std_logic_vector(6 downto 0) := "0001011"; -- alureg(15..0) (latched alu_busb) constant ALU_REGH : std_logic_vector(6 downto 0) := "0111011"; -- alureg(31..16) (latched alu_busa) constant ALU_PASSA : std_logic_vector(6 downto 0) := "0001100"; -- abus_s only constant ALU_TEMP : std_logic_vector(6 downto 0) := "1111001"; -- Used to select temp/scratchpad register (80186 only) -- CONST & instr.irg(3 downto 0) constant ALU_SAHF : std_logic_vector(6 downto 0) := "0001110"; -- AH -> Flags -- CONST & instr.irg(3 downto 0) constant ALU_LAHF : std_logic_vector(6 downto 0) := "0001111"; -- Flags->ALUBUS (->AH) -- CONSTANT & instr.ireg(1) & modrm.reg(5 downto 3) -- CONSTANT=001 constant ALU_ROL1 : std_logic_vector(6 downto 0) := "0010000"; -- count=1 constant ALU_ROR1 : std_logic_vector(6 downto 0) := "0010001"; constant ALU_RCL1 : std_logic_vector(6 downto 0) := "0010010"; constant ALU_RCR1 : std_logic_vector(6 downto 0) := "0010011"; constant ALU_SHL1 : std_logic_vector(6 downto 0) := "0010100"; constant ALU_SHR1 : std_logic_vector(6 downto 0) := "0010101"; constant ALU_SAR1 : std_logic_vector(6 downto 0) := "0010111"; constant ALU_ROL : std_logic_vector(6 downto 0) := "0011000"; -- Count in CL constant ALU_ROR : std_logic_vector(6 downto 0) := "0011001"; constant ALU_RCL : std_logic_vector(6 downto 0) := "0011010"; constant ALU_RCR : std_logic_vector(6 downto 0) := "0011011"; constant ALU_SHL : std_logic_vector(6 downto 0) := "0011100"; constant ALU_SHR : std_logic_vector(6 downto 0) := "0011101"; constant ALU_SAR : std_logic_vector(6 downto 0) := "0011111"; -- CONST & modrm.reg(5 downto 3)/instr.ireg(5 downto 3) constant ALU_INC : std_logic_vector(6 downto 0) := "0100000"; -- Increment constant ALU_DEC : std_logic_vector(6 downto 0) := "0100001"; -- Decrement also used for LOOP/JCXZ constant ALU_CLRTIF : std_logic_vector(6 downto 0) := "0100010"; -- Clear TF/IF flag, used for INT constant ALU_CMPS : std_logic_vector(6 downto 0) := "0100111"; -- Compare String ALUREG-MDBUS constant ALU_SCAS : std_logic_vector(6 downto 0) := "0101111"; -- AX/AL-MDBUS, no SEXT -- CONST & instr.irg(3 downto 0) constant ALU_CMC : std_logic_vector(6 downto 0) := "0100101"; -- Complement Carry constant ALU_CLC : std_logic_vector(6 downto 0) := "0101000"; -- Clear Carry constant ALU_STC : std_logic_vector(6 downto 0) := "0101001"; -- Set Carry constant ALU_CLI : std_logic_vector(6 downto 0) := "0101010"; -- Clear interrupt constant ALU_STI : std_logic_vector(6 downto 0) := "0101011"; -- Set Interrupt constant ALU_CLD : std_logic_vector(6 downto 0) := "0101100"; -- Clear Direction constant ALU_STD : std_logic_vector(6 downto 0) := "0101101"; -- Set Direction -- CONST & modrm.reg(5 downto 3) constant ALU_TEST2 : std_logic_vector(6 downto 0) := "0110000"; -- F6/F7 constant ALU_NOT : std_logic_vector(6 downto 0) := "0110010"; -- F6/F7 constant ALU_NEG : std_logic_vector(6 downto 0) := "0110011"; -- F6/F7 constant ALU_MUL : std_logic_vector(6 downto 0) := "0110100"; -- F6/F7 constant ALU_IMUL : std_logic_vector(6 downto 0) := "0110101"; -- F6/F7 constant ALU_DIV : std_logic_vector(6 downto 0) := "0110110"; -- F6/F7 constant ALU_IDIV : std_logic_vector(6 downto 0) := "0110111"; -- F6/F7 -- Second cycle write DX constant ALU_MUL2 : std_logic_vector(6 downto 0) := "0111100"; -- F6/F7 constant ALU_IMUL2 : std_logic_vector(6 downto 0) := "0111101"; -- F6/F7 constant ALU_DIV2 : std_logic_vector(6 downto 0) := "0111110"; -- F6/F7 constant ALU_IDIV2 : std_logic_vector(6 downto 0) := "0111111"; -- F6/F7 -- CONST & instr.ireg(3 downto 0) constant ALU_SEXT : std_logic_vector(6 downto 0) := "0111000"; -- Used for CBW constant ALU_SEXTW : std_logic_vector(6 downto 0) := "0111001"; -- Used for CWD -- CONSTANT & & instr.ireg(1) & instr.ireg(5 downto 3) constant ALU_AAM : std_logic_vector(6 downto 0) := "1000010"; constant ALU_AAD : std_logic_vector(6 downto 0) := "1001010"; constant ALU_DAA : std_logic_vector(6 downto 0) := "1001100"; constant ALU_DAS : std_logic_vector(6 downto 0) := "1001101"; constant ALU_AAA : std_logic_vector(6 downto 0) := "1001110"; constant ALU_AAS : std_logic_vector(6 downto 0) := "1001111"; constant ALU_ADD_SE : std_logic_vector(6 downto 0) := "1100000"; constant ALU_OR_SE : std_logic_vector(6 downto 0) := "1100001"; constant ALU_ADC_SE : std_logic_vector(6 downto 0) := "1100010"; constant ALU_SBB_SE : std_logic_vector(6 downto 0) := "1100011"; constant ALU_AND_SE : std_logic_vector(6 downto 0) := "1100100"; constant ALU_SUB_SE : std_logic_vector(6 downto 0) := "1100101"; constant ALU_XOR_SE : std_logic_vector(6 downto 0) := "1100110"; constant ALU_CMP_SE : std_logic_vector(6 downto 0) := "1100111"; END cpu86pack;
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 AdKIvBliwC4TwUFUD/YWgFMgY39dujK6KZrySQN7hZbRm5Jan6vcKtPwEz9if2uCQu5aeH5kbOGN 6HQ/48rh9A== `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 ezmuEWP2JQ9OZttQw7Ly2xJEE1Zn003GizFWWSSVZ0L/wWkUCwJ0l8dStbk9qNCCpfnIDwD7lBXi qobitTSEJreXS7queSMg7oNBBVfDVzbvhumzLi3zEgSyUx9W5Kdkh9KsecGw/m0yProxkqdkTIr5 JKOal4dAk3LpDs2Fv60= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block LEbYwSNXIQQVAzeE4zbNxtNrM33HLdWPWDbeawTzXNd2+Kk5zXLA8G5wDJzAQ7a2hN71mjuPi508 wffKaglhdRZK2F09Z9ymmjNEFxi6M18Pt3/PpMkXgTeyKirIHKT4o4R6xpDfW12ZUbEqRSHHzjGe ozeCoCziHC9F1D4MFncm8IHVrYD1ZT47Oyn2iFO9Ki9gKJ2pcsul5EV4udSla/eSrgW+tzGo1/iE Xuq6CTQE9yrJ5Xx3mkRQn5xHiKnwkh5ZG1yqub4kifzRWNdyk/2tUX+so2LL/vPBA+Na5L0nZ5nq ix7w6ZPvT6v9WqVTuX67gE2Q6ULKQzP0UECz/g== `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 vvWr3AhRBzY+HoGjZid4pukSHzDesX3HvLee2fEFlz60g2sx+Sc3Yrt2OWSGsg5YQG2RMG+SMWbm JbJIdYoNXwVJ9/NTWLxVkYu7GT/oRtziMqHYfzWNJGNeMeTTaCxXnBkbqYmYn7Sb4aJWBPd8BFLY 6iFF+bgTaNYIUTrA+jA= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block jgdWTjNeiynqD9qq6omKcrLt+wL4iKkOozBtBhVlSmuo93j8OnN6ZzCK0oevICBesjDlBitnIH4A gQDcwBzGaQdESfJk5nNKJhixwF2FX0ZmoOX5dEdeXVkypIDTUhZl7AX+UIY0RJWgCjel1pB153Hm ff0Wgk2VlTYBpR6zTe5WTKwKwZUbEH2WmDOK8BgRtBM8u8FJ83H5WoOJ8Jby66YGLiZIoidoWDgj vjYt8kDtTLzhP2b6PijpBL4SeixVUBuTSsUXvRB9huXTzhOE1P09OZj6WrdztCHX33rnsV5/LDl4 UJV9oFLN93B4G4jDwSc623e99RM7rzUzX+VqOg== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 4480) `protect data_block N1K4M3BDEU2/2mA0RqxwER9LiJvJmdgy5xiVmb1O4wOeGs/LSFt7hWEYmp1XXAAjI8mnYIGC0HvZ W2SZbIt7xEitL+kUzJhaYIipg7X8IWUJUlD7q1tEiPpwzgQn9xdne0eQlUCx++SfVdeUimLqNtyW lm46doWiEZDQ8BIK6cMrj8VIiKBJMwjzuKtgipWXNUt+LT6+0o3EtpSLvoAtcuR/hPv3FFYlnQaM KE4W4ifCJLlZbtVjfOKIyUUe7DuIJddyZic/FOddiDoMdkjba6ladwE45LK3l15UAjTYW4jMl75k tkv0LhaK7V7eukfe7t9QBPkUiXsNTSyxkN0td2KmI4qdykdlK02FocSU//aDHumS06/UYWAxummj kXuhY8z7mK9NYyT/u70GKo04Ie+lKJSAcb2QZnHoYtmVsIDHWV8yP24pM2y6JunmhDkBHFFrqnBv V2d5S5J/7RAIcm99D3QWYGiPp9aOyDWvLKX838mR6OM7nhPDeN3dZ9G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2WM9/ nc9Jm2NuTp+TCpVMDeCNjL/IHSDDRrhghwut4K6RLVbjWhGzuwnl9v4Aijjs9+2XQSwq1p27Wydx 1gcNriWwkDmS7oG4FTDDJSBmzuO3xxVArnoek2B/n/MOmw== `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 AdKIvBliwC4TwUFUD/YWgFMgY39dujK6KZrySQN7hZbRm5Jan6vcKtPwEz9if2uCQu5aeH5kbOGN 6HQ/48rh9A== `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 ezmuEWP2JQ9OZttQw7Ly2xJEE1Zn003GizFWWSSVZ0L/wWkUCwJ0l8dStbk9qNCCpfnIDwD7lBXi qobitTSEJreXS7queSMg7oNBBVfDVzbvhumzLi3zEgSyUx9W5Kdkh9KsecGw/m0yProxkqdkTIr5 JKOal4dAk3LpDs2Fv60= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block LEbYwSNXIQQVAzeE4zbNxtNrM33HLdWPWDbeawTzXNd2+Kk5zXLA8G5wDJzAQ7a2hN71mjuPi508 wffKaglhdRZK2F09Z9ymmjNEFxi6M18Pt3/PpMkXgTeyKirIHKT4o4R6xpDfW12ZUbEqRSHHzjGe ozeCoCziHC9F1D4MFncm8IHVrYD1ZT47Oyn2iFO9Ki9gKJ2pcsul5EV4udSla/eSrgW+tzGo1/iE Xuq6CTQE9yrJ5Xx3mkRQn5xHiKnwkh5ZG1yqub4kifzRWNdyk/2tUX+so2LL/vPBA+Na5L0nZ5nq ix7w6ZPvT6v9WqVTuX67gE2Q6ULKQzP0UECz/g== `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 vvWr3AhRBzY+HoGjZid4pukSHzDesX3HvLee2fEFlz60g2sx+Sc3Yrt2OWSGsg5YQG2RMG+SMWbm JbJIdYoNXwVJ9/NTWLxVkYu7GT/oRtziMqHYfzWNJGNeMeTTaCxXnBkbqYmYn7Sb4aJWBPd8BFLY 6iFF+bgTaNYIUTrA+jA= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block jgdWTjNeiynqD9qq6omKcrLt+wL4iKkOozBtBhVlSmuo93j8OnN6ZzCK0oevICBesjDlBitnIH4A gQDcwBzGaQdESfJk5nNKJhixwF2FX0ZmoOX5dEdeXVkypIDTUhZl7AX+UIY0RJWgCjel1pB153Hm ff0Wgk2VlTYBpR6zTe5WTKwKwZUbEH2WmDOK8BgRtBM8u8FJ83H5WoOJ8Jby66YGLiZIoidoWDgj vjYt8kDtTLzhP2b6PijpBL4SeixVUBuTSsUXvRB9huXTzhOE1P09OZj6WrdztCHX33rnsV5/LDl4 UJV9oFLN93B4G4jDwSc623e99RM7rzUzX+VqOg== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 4480) `protect data_block N1K4M3BDEU2/2mA0RqxwER9LiJvJmdgy5xiVmb1O4wOeGs/LSFt7hWEYmp1XXAAjI8mnYIGC0HvZ W2SZbIt7xEitL+kUzJhaYIipg7X8IWUJUlD7q1tEiPpwzgQn9xdne0eQlUCx++SfVdeUimLqNtyW lm46doWiEZDQ8BIK6cMrj8VIiKBJMwjzuKtgipWXNUt+LT6+0o3EtpSLvoAtcuR/hPv3FFYlnQaM KE4W4ifCJLlZbtVjfOKIyUUe7DuIJddyZic/FOddiDoMdkjba6ladwE45LK3l15UAjTYW4jMl75k t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zaBZWZxkJB03ZjfsaSivCQfQu78gTPB6NepcE0kGQV6Odg5HrXL cl7qBGY4dpol5l0fD7yY+3r9M4LrwuFLN4UE4ZDCEBef6P6xSno6e8H+qKGUrowmFxNwrFFTU5Uz kK7KFxZiOqzLHBcw3nd3xB6gbPAMalKdbNp1ZymeTIUo9S7NOynQM6ZSnr0iND6LsBJSvIu2WM9/ nc9Jm2NuTp+TCpVMDeCNjL/IHSDDRrhghwut4K6RLVbjWhGzuwnl9v4Aijjs9+2XQSwq1p27Wydx 1gcNriWwkDmS7oG4FTDDJSBmzuO3xxVArnoek2B/n/MOmw== `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `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 AdKIvBliwC4TwUFUD/YWgFMgY39dujK6KZrySQN7hZbRm5Jan6vcKtPwEz9if2uCQu5aeH5kbOGN 6HQ/48rh9A== `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 ezmuEWP2JQ9OZttQw7Ly2xJEE1Zn003GizFWWSSVZ0L/wWkUCwJ0l8dStbk9qNCCpfnIDwD7lBXi qobitTSEJreXS7queSMg7oNBBVfDVzbvhumzLi3zEgSyUx9W5Kdkh9KsecGw/m0yProxkqdkTIr5 JKOal4dAk3LpDs2Fv60= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block LEbYwSNXIQQVAzeE4zbNxtNrM33HLdWPWDbeawTzXNd2+Kk5zXLA8G5wDJzAQ7a2hN71mjuPi508 wffKaglhdRZK2F09Z9ymmjNEFxi6M18Pt3/PpMkXgTeyKirIHKT4o4R6xpDfW12ZUbEqRSHHzjGe ozeCoCziHC9F1D4MFncm8IHVrYD1ZT47Oyn2iFO9Ki9gKJ2pcsul5EV4udSla/eSrgW+tzGo1/iE Xuq6CTQE9yrJ5Xx3mkRQn5xHiKnwkh5ZG1yqub4kifzRWNdyk/2tUX+so2LL/vPBA+Na5L0nZ5nq ix7w6ZPvT6v9WqVTuX67gE2Q6ULKQzP0UECz/g== `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 vvWr3AhRBzY+HoGjZid4pukSHzDesX3HvLee2fEFlz60g2sx+Sc3Yrt2OWSGsg5YQG2RMG+SMWbm JbJIdYoNXwVJ9/NTWLxVkYu7GT/oRtziMqHYfzWNJGNeMeTTaCxXnBkbqYmYn7Sb4aJWBPd8BFLY 6iFF+bgTaNYIUTrA+jA= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block jgdWTjNeiynqD9qq6omKcrLt+wL4iKkOozBtBhVlSmuo93j8OnN6ZzCK0oevICBesjDlBitnIH4A gQDcwBzGaQdESfJk5nNKJhixwF2FX0ZmoOX5dEdeXVkypIDTUhZl7AX+UIY0RJWgCjel1pB153Hm ff0Wgk2VlTYBpR6zTe5WTKwKwZUbEH2WmDOK8BgRtBM8u8FJ83H5WoOJ8Jby66YGLiZIoidoWDgj vjYt8kDtTLzhP2b6PijpBL4SeixVUBuTSsUXvRB9huXTzhOE1P09OZj6WrdztCHX33rnsV5/LDl4 UJV9oFLN93B4G4jDwSc623e99RM7rzUzX+VqOg== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 4480) `protect data_block N1K4M3BDEU2/2mA0RqxwER9LiJvJmdgy5xiVmb1O4wOeGs/LSFt7hWEYmp1XXAAjI8mnYIGC0HvZ W2SZbIt7xEitL+kUzJhaYIipg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8swykqv+nbfc+fjPe jAH+Q2M/LIaWtUZOwfu8snpQha22mPhMYqR5VXu+RQsjDFvoj2qOMn8SnwN4TWLWnk+r7Cdp9GOG O1s7ujzLXYh4A1pFXiHlsyiJ+gEVySlxNj0rxd5fAZJnA6cUigHl7Je8z9oFLk9lJEfwHfa/zYb0 Dt0uenTl5S4zrL5IhiUYnrDuHzaBZWZxkJB03ZjfsaSivCQfQu78gTPB6NepcE0kGQV6Odg5HrXL cl7qBGY4dpol5l0fD7yY+3r9M4LrwuFLN4UE4ZDCEBef6P6xSno6e8H+qKGUrowmFxNwrFFTU5Uz kK7KFxZiOqzLHBcw3nd3xB6gbPAMalKdbNp1ZymeTIUo9S7NOynQM6ZSnr0iND6LsBJSvIu2WM9/ nc9Jm2NuTp+TCpVMDeCNjL/IHSDDRrhghwut4K6RLVbjWhGzuwnl9v4Aijjs9+2XQSwq1p27Wydx 1gcNriWwkDmS7oG4FTDDJSBmzuO3xxVArnoek2B/n/MOmw== `protect end_protected
-- video_system_onchip_memory_s1_translator.vhd -- Generated using ACDS version 12.1sp1 243 at 2015.02.09.14:34:21 library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity video_system_onchip_memory_s1_translator is generic ( AV_ADDRESS_W : integer := 12; AV_DATA_W : integer := 32; UAV_DATA_W : integer := 32; AV_BURSTCOUNT_W : integer := 1; AV_BYTEENABLE_W : integer := 4; UAV_BYTEENABLE_W : integer := 4; UAV_ADDRESS_W : integer := 32; UAV_BURSTCOUNT_W : integer := 3; AV_READLATENCY : integer := 1; USE_READDATAVALID : integer := 0; USE_WAITREQUEST : integer := 0; USE_UAV_CLKEN : integer := 0; AV_SYMBOLS_PER_WORD : integer := 4; AV_ADDRESS_SYMBOLS : integer := 0; AV_BURSTCOUNT_SYMBOLS : integer := 0; AV_CONSTANT_BURST_BEHAVIOR : integer := 0; UAV_CONSTANT_BURST_BEHAVIOR : integer := 0; AV_REQUIRE_UNALIGNED_ADDRESSES : integer := 0; CHIPSELECT_THROUGH_READLATENCY : integer := 0; AV_READ_WAIT_CYCLES : integer := 0; AV_WRITE_WAIT_CYCLES : integer := 0; AV_SETUP_WAIT_CYCLES : integer := 0; AV_DATA_HOLD_CYCLES : integer := 0 ); port ( clk : in std_logic := '0'; -- clk.clk reset : in std_logic := '0'; -- reset.reset uav_address : in std_logic_vector(31 downto 0) := (others => '0'); -- avalon_universal_slave_0.address uav_burstcount : in std_logic_vector(2 downto 0) := (others => '0'); -- .burstcount uav_read : in std_logic := '0'; -- .read uav_write : in std_logic := '0'; -- .write uav_waitrequest : out std_logic; -- .waitrequest uav_readdatavalid : out std_logic; -- .readdatavalid uav_byteenable : in std_logic_vector(3 downto 0) := (others => '0'); -- .byteenable uav_readdata : out std_logic_vector(31 downto 0); -- .readdata uav_writedata : in std_logic_vector(31 downto 0) := (others => '0'); -- .writedata uav_lock : in std_logic := '0'; -- .lock uav_debugaccess : in std_logic := '0'; -- .debugaccess av_address : out std_logic_vector(11 downto 0); -- avalon_anti_slave_0.address av_write : out std_logic; -- .write av_readdata : in std_logic_vector(31 downto 0) := (others => '0'); -- .readdata av_writedata : out std_logic_vector(31 downto 0); -- .writedata av_byteenable : out std_logic_vector(3 downto 0); -- .byteenable av_chipselect : out std_logic; -- .chipselect av_clken : out std_logic; -- .clken av_beginbursttransfer : out std_logic; av_begintransfer : out std_logic; av_burstcount : out std_logic_vector(0 downto 0); av_debugaccess : out std_logic; av_lock : out std_logic; av_outputenable : out std_logic; av_read : out std_logic; av_readdatavalid : in std_logic := '0'; av_waitrequest : in std_logic := '0'; av_writebyteenable : out std_logic_vector(3 downto 0); uav_clken : in std_logic := '0' ); end entity video_system_onchip_memory_s1_translator; architecture rtl of video_system_onchip_memory_s1_translator is component altera_merlin_slave_translator is generic ( AV_ADDRESS_W : integer := 30; AV_DATA_W : integer := 32; UAV_DATA_W : integer := 32; AV_BURSTCOUNT_W : integer := 4; AV_BYTEENABLE_W : integer := 4; UAV_BYTEENABLE_W : integer := 4; UAV_ADDRESS_W : integer := 32; UAV_BURSTCOUNT_W : integer := 4; AV_READLATENCY : integer := 0; USE_READDATAVALID : integer := 1; USE_WAITREQUEST : integer := 1; USE_UAV_CLKEN : integer := 0; AV_SYMBOLS_PER_WORD : integer := 4; AV_ADDRESS_SYMBOLS : integer := 0; AV_BURSTCOUNT_SYMBOLS : integer := 0; AV_CONSTANT_BURST_BEHAVIOR : integer := 0; UAV_CONSTANT_BURST_BEHAVIOR : integer := 0; AV_REQUIRE_UNALIGNED_ADDRESSES : integer := 0; CHIPSELECT_THROUGH_READLATENCY : integer := 0; AV_READ_WAIT_CYCLES : integer := 0; AV_WRITE_WAIT_CYCLES : integer := 0; AV_SETUP_WAIT_CYCLES : integer := 0; AV_DATA_HOLD_CYCLES : integer := 0 ); port ( clk : in std_logic := 'X'; -- clk reset : in std_logic := 'X'; -- reset uav_address : in std_logic_vector(31 downto 0) := (others => 'X'); -- address uav_burstcount : in std_logic_vector(2 downto 0) := (others => 'X'); -- burstcount uav_read : in std_logic := 'X'; -- read uav_write : in std_logic := 'X'; -- write uav_waitrequest : out std_logic; -- waitrequest uav_readdatavalid : out std_logic; -- readdatavalid uav_byteenable : in std_logic_vector(3 downto 0) := (others => 'X'); -- byteenable uav_readdata : out std_logic_vector(31 downto 0); -- readdata uav_writedata : in std_logic_vector(31 downto 0) := (others => 'X'); -- writedata uav_lock : in std_logic := 'X'; -- lock uav_debugaccess : in std_logic := 'X'; -- debugaccess av_address : out std_logic_vector(11 downto 0); -- address av_write : out std_logic; -- write av_readdata : in std_logic_vector(31 downto 0) := (others => 'X'); -- readdata av_writedata : out std_logic_vector(31 downto 0); -- writedata av_byteenable : out std_logic_vector(3 downto 0); -- byteenable av_chipselect : out std_logic; -- chipselect av_clken : out std_logic; -- clken av_read : out std_logic; -- read av_begintransfer : out std_logic; -- begintransfer av_beginbursttransfer : out std_logic; -- beginbursttransfer av_burstcount : out std_logic_vector(0 downto 0); -- burstcount av_readdatavalid : in std_logic := 'X'; -- readdatavalid av_waitrequest : in std_logic := 'X'; -- waitrequest av_writebyteenable : out std_logic_vector(3 downto 0); -- writebyteenable av_lock : out std_logic; -- lock uav_clken : in std_logic := 'X'; -- clken av_debugaccess : out std_logic; -- debugaccess av_outputenable : out std_logic -- outputenable ); end component altera_merlin_slave_translator; begin onchip_memory_s1_translator : component altera_merlin_slave_translator generic map ( AV_ADDRESS_W => AV_ADDRESS_W, AV_DATA_W => AV_DATA_W, UAV_DATA_W => UAV_DATA_W, AV_BURSTCOUNT_W => AV_BURSTCOUNT_W, AV_BYTEENABLE_W => AV_BYTEENABLE_W, UAV_BYTEENABLE_W => UAV_BYTEENABLE_W, UAV_ADDRESS_W => UAV_ADDRESS_W, UAV_BURSTCOUNT_W => UAV_BURSTCOUNT_W, AV_READLATENCY => AV_READLATENCY, USE_READDATAVALID => USE_READDATAVALID, USE_WAITREQUEST => USE_WAITREQUEST, USE_UAV_CLKEN => USE_UAV_CLKEN, AV_SYMBOLS_PER_WORD => AV_SYMBOLS_PER_WORD, AV_ADDRESS_SYMBOLS => AV_ADDRESS_SYMBOLS, AV_BURSTCOUNT_SYMBOLS => AV_BURSTCOUNT_SYMBOLS, AV_CONSTANT_BURST_BEHAVIOR => AV_CONSTANT_BURST_BEHAVIOR, UAV_CONSTANT_BURST_BEHAVIOR => UAV_CONSTANT_BURST_BEHAVIOR, AV_REQUIRE_UNALIGNED_ADDRESSES => AV_REQUIRE_UNALIGNED_ADDRESSES, CHIPSELECT_THROUGH_READLATENCY => CHIPSELECT_THROUGH_READLATENCY, AV_READ_WAIT_CYCLES => AV_READ_WAIT_CYCLES, AV_WRITE_WAIT_CYCLES => AV_WRITE_WAIT_CYCLES, AV_SETUP_WAIT_CYCLES => AV_SETUP_WAIT_CYCLES, AV_DATA_HOLD_CYCLES => AV_DATA_HOLD_CYCLES ) port map ( clk => clk, -- clk.clk reset => reset, -- reset.reset uav_address => uav_address, -- avalon_universal_slave_0.address uav_burstcount => uav_burstcount, -- .burstcount uav_read => uav_read, -- .read uav_write => uav_write, -- .write uav_waitrequest => uav_waitrequest, -- .waitrequest uav_readdatavalid => uav_readdatavalid, -- .readdatavalid uav_byteenable => uav_byteenable, -- .byteenable uav_readdata => uav_readdata, -- .readdata uav_writedata => uav_writedata, -- .writedata uav_lock => uav_lock, -- .lock uav_debugaccess => uav_debugaccess, -- .debugaccess av_address => av_address, -- avalon_anti_slave_0.address av_write => av_write, -- .write av_readdata => av_readdata, -- .readdata av_writedata => av_writedata, -- .writedata av_byteenable => av_byteenable, -- .byteenable av_chipselect => av_chipselect, -- .chipselect av_clken => av_clken, -- .clken av_read => open, -- (terminated) av_begintransfer => open, -- (terminated) av_beginbursttransfer => open, -- (terminated) av_burstcount => open, -- (terminated) av_readdatavalid => '0', -- (terminated) av_waitrequest => '0', -- (terminated) av_writebyteenable => open, -- (terminated) av_lock => open, -- (terminated) uav_clken => '0', -- (terminated) av_debugaccess => open, -- (terminated) av_outputenable => open -- (terminated) ); end architecture rtl; -- of video_system_onchip_memory_s1_translator
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*- -- vim: tabstop=2:shiftwidth=2:noexpandtab -- kate: tab-width 2; replace-tabs off; indent-width 2; -- -- ============================================================================ -- Authors: Martin Zabel -- Patrick Lehmann -- -- Module: Instantiates Chip-Specific DDR Input/Output Registers for Xilinx FPGAs. -- -- Description: -- ------------------------------------ -- See PoC.io.ddrio.inout for interface description. -- -- License: -- ============================================================================ -- Copyright 2007-2015 Technische Universitaet Dresden - Germany, -- Chair for VLSI-Design, Diagnostics and Architecture -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- ============================================================================ library IEEE; use IEEE.std_logic_1164.ALL; library Altera_mf; use Altera_mf.Altera_MF_Components.all; entity ddrio_inout_altera is generic ( BITS : POSITIVE ); port ( Clock : in STD_LOGIC; ClockEnable : in STD_LOGIC; OutputEnable : in STD_LOGIC; DataOut_high : in STD_LOGIC_VECTOR(BITS - 1 downto 0); DataOut_low : in STD_LOGIC_VECTOR(BITS - 1 downto 0); DataIn_high : out STD_LOGIC_VECTOR(BITS - 1 downto 0); DataIn_low : out STD_LOGIC_VECTOR(BITS - 1 downto 0); Pad : inout STD_LOGIC_VECTOR(BITS - 1 downto 0) ); end entity; architecture rtl of ddrio_inout_altera is begin ioff : altddio_in generic map ( WIDTH => BITS, INTENDED_DEVICE_FAMILY => "STRATIXII" -- TODO: built device string from PoC.config information ) port map ( outclock => Clock, outclocken => ClockEnable, oe => OutputEnable, datain_h => DataOut_high, datain_l => DataOut_low, inclock => Clock, inclocken => ClockEnable, dataout_h => DataIn_high, dataout_l => DataIn_low, padio => Pad ); end architecture;
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*- -- vim: tabstop=2:shiftwidth=2:noexpandtab -- kate: tab-width 2; replace-tabs off; indent-width 2; -- -- ============================================================================ -- Authors: Martin Zabel -- Patrick Lehmann -- -- Module: Instantiates Chip-Specific DDR Input/Output Registers for Xilinx FPGAs. -- -- Description: -- ------------------------------------ -- See PoC.io.ddrio.inout for interface description. -- -- License: -- ============================================================================ -- Copyright 2007-2015 Technische Universitaet Dresden - Germany, -- Chair for VLSI-Design, Diagnostics and Architecture -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- ============================================================================ library IEEE; use IEEE.std_logic_1164.ALL; library Altera_mf; use Altera_mf.Altera_MF_Components.all; entity ddrio_inout_altera is generic ( BITS : POSITIVE ); port ( Clock : in STD_LOGIC; ClockEnable : in STD_LOGIC; OutputEnable : in STD_LOGIC; DataOut_high : in STD_LOGIC_VECTOR(BITS - 1 downto 0); DataOut_low : in STD_LOGIC_VECTOR(BITS - 1 downto 0); DataIn_high : out STD_LOGIC_VECTOR(BITS - 1 downto 0); DataIn_low : out STD_LOGIC_VECTOR(BITS - 1 downto 0); Pad : inout STD_LOGIC_VECTOR(BITS - 1 downto 0) ); end entity; architecture rtl of ddrio_inout_altera is begin ioff : altddio_in generic map ( WIDTH => BITS, INTENDED_DEVICE_FAMILY => "STRATIXII" -- TODO: built device string from PoC.config information ) port map ( outclock => Clock, outclocken => ClockEnable, oe => OutputEnable, datain_h => DataOut_high, datain_l => DataOut_low, inclock => Clock, inclocken => ClockEnable, dataout_h => DataIn_high, dataout_l => DataIn_low, padio => Pad ); end architecture;
---------------------------------------------------------------------------------- -- Company: Team 5 -- Engineer: -- -- Create Date: 15:15:57 03/11/2016 -- Design Name: -- Module Name: programCounter - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity programCounter is generic(PCWIDTH:integer:=16); Port ( CLK : in STD_LOGIC; EN : in STD_LOGIC; RST : in STD_LOGIC; INSADR : out STD_LOGIC_VECTOR (PCWIDTH-1 downto 0)); end programCounter; architecture Behavioral of programCounter is signal COUNTER : std_logic_vector(15 downto 0) := (OTHERS => '0'); begin INSADR <= COUNTER; process(CLK, RST) begin if(RST = '1')then COUNTER <= (OTHERS => '0'); elsif(CLK'event and CLK = '1')then if(EN = '1')then COUNTER <= COUNTER + 1; end if; end if; end process; end Behavioral;
library ieee; use ieee.std_logic_1164.all; entity cmp_788 is port ( eq : out std_logic; in1 : in std_logic_vector(2 downto 0); in0 : in std_logic_vector(2 downto 0) ); end cmp_788; architecture augh of cmp_788 is signal tmp : std_logic; begin -- Compute the result tmp <= '0' when in1 /= in0 else '1'; -- Set the outputs eq <= tmp; end architecture;
library ieee; use ieee.std_logic_1164.all; entity cmp_788 is port ( eq : out std_logic; in1 : in std_logic_vector(2 downto 0); in0 : in std_logic_vector(2 downto 0) ); end cmp_788; architecture augh of cmp_788 is signal tmp : std_logic; begin -- Compute the result tmp <= '0' when in1 /= in0 else '1'; -- Set the outputs eq <= tmp; end architecture;
library verilog; use verilog.vl_types.all; entity id_reg is port( clk : in vl_logic; reset : in vl_logic; alu_op : in vl_logic_vector(3 downto 0); alu_in_0 : in vl_logic_vector(31 downto 0); alu_in_1 : in vl_logic_vector(31 downto 0); br_flag : in vl_logic; mem_op : in vl_logic_vector(1 downto 0); mem_wr_data : in vl_logic_vector(31 downto 0); ctrl_op : in vl_logic_vector(1 downto 0); dst_addr : in vl_logic_vector(4 downto 0); gpr_we_n : in vl_logic; exp_code : in vl_logic_vector(2 downto 0); stall : in vl_logic; flush : in vl_logic; if_pc : in vl_logic_vector(29 downto 0); if_en : in vl_logic; id_pc : out vl_logic_vector(29 downto 0); id_en : out vl_logic; id_alu_op : out vl_logic_vector(3 downto 0); id_alu_in_0 : out vl_logic_vector(31 downto 0); id_alu_in_1 : out vl_logic_vector(31 downto 0); id_br_flag : out vl_logic; id_mem_op : out vl_logic_vector(1 downto 0); id_mem_wr_data : out vl_logic_vector(31 downto 0); id_ctrl_op : out vl_logic_vector(1 downto 0); id_dst_addr : out vl_logic_vector(4 downto 0); id_gpr_we_n : out vl_logic; id_exp_code : out vl_logic_vector(2 downto 0) ); end id_reg;
-- -- Copyright (C) 2009-2012 Chris McClelland -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation, either version 3 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 Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_textio.all; use std.textio.all; entity seven_seg_tb is end entity; architecture behavioural of seven_seg_tb is constant COUNTER_WIDTH : integer := 4; signal sysClk : std_logic; signal dispClk : std_logic; -- display version of sysClk, which leads it by 4ns signal data : std_logic_vector(15 downto 0); signal dots : std_logic_vector(3 downto 0); signal segs : std_logic_vector(7 downto 0); signal anodes : std_logic_vector(3 downto 0); signal dot : std_logic; begin -- Instantiate seven_seg for testing uut: entity work.seven_seg generic map( COUNTER_WIDTH => COUNTER_WIDTH ) port map( clk_in => sysClk, data_in => data, dots_in => dots, segs_out => segs, anodes_out => anodes ); -- Drive the clocks. In simulation, sysClk lags 4ns behind dispClk, to give a visual hold time for -- signals in GTKWave. process begin sysClk <= '0'; dispClk <= '1'; wait for 10 ns; dispClk <= '0'; wait for 10 ns; loop dispClk <= '1'; wait for 4 ns; sysClk <= '1'; wait for 6 ns; dispClk <= '0'; wait for 4 ns; sysClk <= '0'; wait for 6 ns; end loop; end process; -- Drive the seven_seg process begin data <= x"ABCD"; dots <= "1010"; wait for 324 ns; data <= x"FEDC"; dots <= "0101"; wait; end process; dot <= segs(7); end architecture;
-- control signals for HF-RISCV -- -- alu_op: alu_src1: mem_write: jump: -- 0000 -> and 0 -> r[rs1] 00 -> no mem write 00 -> no jump -- 0001 -> or 1 -> pc_last2 01 -> sb 01 -> don't care -- 0010 -> xor 10 -> sh 10 -> jal -- 0011 -> don't care alu_src2: 11 -> sw 11 -> jalr -- 0100 -> add 000 -> imm_u -- 0101 -> sub 001 -> imm_i mem_read: branch: -- 0110 -> lui, jal, jalr 010 -> imm_s 00 -> no mem read 000 -> no branch -- 0111 -> slt 011 -> pc 01 -> lb 001 -> beq -- 1000 -> sltu 100 -> rs2 10 -> lh 010 -> bne -- 1001 -> sll 101 -> r[rs2] 11 -> lw 011 -> blt -- 1010 -> srl 110 -> don't care 100 -> bge -- 1011 -> don't care 111 -> don't care 101 -> bltu -- 1100 -> sra 110 -> bgeu -- 1101 -> don't care reg_write: sig_read: 111 -> system -- 1110 -> don't care 0 -> no write 0 -> unsigned -- 1111 -> don't care 1 -> write register 1 -> signed library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity control is port ( opcode: in std_logic_vector(6 downto 0); funct3: in std_logic_vector(2 downto 0); funct7: in std_logic_vector(6 downto 0); reg_write: out std_logic; alu_src1: out std_logic; alu_src2: out std_logic_vector(2 downto 0); alu_op: out std_logic_vector(3 downto 0); jump: out std_logic_vector(1 downto 0); branch: out std_logic_vector(2 downto 0); mem_write: out std_logic_vector(1 downto 0); mem_read: out std_logic_vector(1 downto 0); sig_read: out std_logic ); end control; architecture arch_control of control is begin process(opcode, funct3, funct7) begin case opcode is -- load immediate / jumps when "0110111" => -- LUI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0110"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0010111" => -- AUIPC reg_write <= '1'; alu_src1 <= '1'; alu_src2 <= "000"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "1101111" => -- JAL reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "011"; alu_op <= "0110"; jump <= "10"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "1100111" => -- JALR reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "011"; alu_op <= "0110"; jump <= "11"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "1100011" => -- branches case funct3 is when "000" => -- BEQ reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0101"; jump <= "00"; branch <= "001"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "001" => -- BNE reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0101"; jump <= "00"; branch <= "010"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "100" => -- BLT reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0111"; jump <= "00"; branch <= "011"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "101" => -- BGE reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0111"; jump <= "00"; branch <= "100"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "110" => -- BLTU reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1000"; jump <= "00"; branch <= "101"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "111" => -- BGEU reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1000"; jump <= "00"; branch <= "110"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0000011" => -- loads case funct3 is when "000" => -- LB reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "01"; sig_read <= '1'; when "001" => -- LH reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "10"; sig_read <= '1'; when "010" => -- LW reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "11"; sig_read <= '1'; when "100" => -- LBU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "01"; sig_read <= '0'; when "101" => -- LHU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "10"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0100011" => -- stores case funct3 is when "000" => -- SB reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "010"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "01"; mem_read <= "00"; sig_read <= '0'; when "001" => -- SH reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "010"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "10"; mem_read <= "00"; sig_read <= '0'; when "010" => -- SW reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "010"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "11"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0010011" => -- imm computation case funct3 is when "000" => -- ADDI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "010" => -- SLTI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0111"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "011" => -- SLTIU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "1000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "100" => -- XORI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "110" => -- ORI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "111" => -- ANDI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "001" => -- SLLI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "100"; alu_op <= "1001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "101" => case funct7 is when "0000000" => -- SRLI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "100"; alu_op <= "1010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0100000" => -- SRAI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "100"; alu_op <= "1100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0110011" => -- computation case funct3 is when "000" => case funct7 is when "0000000" => -- ADD reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0100000" => -- SUB reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0101"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "001" => -- SLL reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "010" => -- SLT reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0111"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "011" => -- SLTU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "100" => -- XOR reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "101" => case funct7 is when "0000000" => -- SRL reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0100000" => -- SRA reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "110" => -- OR reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "111" => -- AND reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "1110011" => -- SYSTEM reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "111"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; end process; end arch_control;
-- control signals for HF-RISCV -- -- alu_op: alu_src1: mem_write: jump: -- 0000 -> and 0 -> r[rs1] 00 -> no mem write 00 -> no jump -- 0001 -> or 1 -> pc_last2 01 -> sb 01 -> don't care -- 0010 -> xor 10 -> sh 10 -> jal -- 0011 -> don't care alu_src2: 11 -> sw 11 -> jalr -- 0100 -> add 000 -> imm_u -- 0101 -> sub 001 -> imm_i mem_read: branch: -- 0110 -> lui, jal, jalr 010 -> imm_s 00 -> no mem read 000 -> no branch -- 0111 -> slt 011 -> pc 01 -> lb 001 -> beq -- 1000 -> sltu 100 -> rs2 10 -> lh 010 -> bne -- 1001 -> sll 101 -> r[rs2] 11 -> lw 011 -> blt -- 1010 -> srl 110 -> don't care 100 -> bge -- 1011 -> don't care 111 -> don't care 101 -> bltu -- 1100 -> sra 110 -> bgeu -- 1101 -> don't care reg_write: sig_read: 111 -> system -- 1110 -> don't care 0 -> no write 0 -> unsigned -- 1111 -> don't care 1 -> write register 1 -> signed library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity control is port ( opcode: in std_logic_vector(6 downto 0); funct3: in std_logic_vector(2 downto 0); funct7: in std_logic_vector(6 downto 0); reg_write: out std_logic; alu_src1: out std_logic; alu_src2: out std_logic_vector(2 downto 0); alu_op: out std_logic_vector(3 downto 0); jump: out std_logic_vector(1 downto 0); branch: out std_logic_vector(2 downto 0); mem_write: out std_logic_vector(1 downto 0); mem_read: out std_logic_vector(1 downto 0); sig_read: out std_logic ); end control; architecture arch_control of control is begin process(opcode, funct3, funct7) begin case opcode is -- load immediate / jumps when "0110111" => -- LUI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0110"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0010111" => -- AUIPC reg_write <= '1'; alu_src1 <= '1'; alu_src2 <= "000"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "1101111" => -- JAL reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "011"; alu_op <= "0110"; jump <= "10"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "1100111" => -- JALR reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "011"; alu_op <= "0110"; jump <= "11"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "1100011" => -- branches case funct3 is when "000" => -- BEQ reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0101"; jump <= "00"; branch <= "001"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "001" => -- BNE reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0101"; jump <= "00"; branch <= "010"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "100" => -- BLT reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0111"; jump <= "00"; branch <= "011"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "101" => -- BGE reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0111"; jump <= "00"; branch <= "100"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "110" => -- BLTU reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1000"; jump <= "00"; branch <= "101"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "111" => -- BGEU reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1000"; jump <= "00"; branch <= "110"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0000011" => -- loads case funct3 is when "000" => -- LB reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "01"; sig_read <= '1'; when "001" => -- LH reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "10"; sig_read <= '1'; when "010" => -- LW reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "11"; sig_read <= '1'; when "100" => -- LBU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "01"; sig_read <= '0'; when "101" => -- LHU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "10"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0100011" => -- stores case funct3 is when "000" => -- SB reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "010"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "01"; mem_read <= "00"; sig_read <= '0'; when "001" => -- SH reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "010"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "10"; mem_read <= "00"; sig_read <= '0'; when "010" => -- SW reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "010"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "11"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0010011" => -- imm computation case funct3 is when "000" => -- ADDI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "010" => -- SLTI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0111"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "011" => -- SLTIU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "1000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "100" => -- XORI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "110" => -- ORI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "111" => -- ANDI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "001"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "001" => -- SLLI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "100"; alu_op <= "1001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "101" => case funct7 is when "0000000" => -- SRLI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "100"; alu_op <= "1010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0100000" => -- SRAI reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "100"; alu_op <= "1100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "0110011" => -- computation case funct3 is when "000" => case funct7 is when "0000000" => -- ADD reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0100000" => -- SUB reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0101"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "001" => -- SLL reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "010" => -- SLT reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0111"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "011" => -- SLTU reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "100" => -- XOR reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "101" => case funct7 is when "0000000" => -- SRL reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1010"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "0100000" => -- SRA reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "1100"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "110" => -- OR reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0001"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when "111" => -- AND reg_write <= '1'; alu_src1 <= '0'; alu_src2 <= "101"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; when "1110011" => -- SYSTEM reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "111"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; when others => reg_write <= '0'; alu_src1 <= '0'; alu_src2 <= "000"; alu_op <= "0000"; jump <= "00"; branch <= "000"; mem_write <= "00"; mem_read <= "00"; sig_read <= '0'; end case; end process; end arch_control;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2093.vhd,v 1.2 2001-10-26 16:29:45 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s02b04x00p20n01i02093ent IS END c07s02b04x00p20n01i02093ent; ARCHITECTURE c07s02b04x00p20n01i02093arch OF c07s02b04x00p20n01i02093ent IS TYPE boolean_v is array (integer range <>) of boolean; SUBTYPE boolean_4_dwn is boolean_v (4 downto 1); SUBTYPE boolean_4_null is boolean_v (4 downto 5); SUBTYPE boolean_8_dwn is boolean_v (8 downto 1); BEGIN TESTING: PROCESS variable l_operand : boolean_4_null ; variable r_operand : boolean_4_dwn := (false, false, true, true); variable result : boolean_4_dwn; BEGIN result := l_operand & r_operand; assert ( result (4) = false ) report "result (4) /= false" severity FAILURE; assert ( result (1) = true ) report "result (1) /= true" severity FAILURE; assert NOT((result(4)=false) and (result=(false,false,true,true))) report "***PASSED TEST: c07s02b04x00p20n01i02093" severity NOTE; assert ((result(4)=false) and (result=(false,false,true,true))) report "***FAILED TEST: c07s02b04x00p20n01i02093 - The left bound of the concatenated array is that of the second operand." severity ERROR; wait; END PROCESS TESTING; END c07s02b04x00p20n01i02093arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2093.vhd,v 1.2 2001-10-26 16:29:45 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s02b04x00p20n01i02093ent IS END c07s02b04x00p20n01i02093ent; ARCHITECTURE c07s02b04x00p20n01i02093arch OF c07s02b04x00p20n01i02093ent IS TYPE boolean_v is array (integer range <>) of boolean; SUBTYPE boolean_4_dwn is boolean_v (4 downto 1); SUBTYPE boolean_4_null is boolean_v (4 downto 5); SUBTYPE boolean_8_dwn is boolean_v (8 downto 1); BEGIN TESTING: PROCESS variable l_operand : boolean_4_null ; variable r_operand : boolean_4_dwn := (false, false, true, true); variable result : boolean_4_dwn; BEGIN result := l_operand & r_operand; assert ( result (4) = false ) report "result (4) /= false" severity FAILURE; assert ( result (1) = true ) report "result (1) /= true" severity FAILURE; assert NOT((result(4)=false) and (result=(false,false,true,true))) report "***PASSED TEST: c07s02b04x00p20n01i02093" severity NOTE; assert ((result(4)=false) and (result=(false,false,true,true))) report "***FAILED TEST: c07s02b04x00p20n01i02093 - The left bound of the concatenated array is that of the second operand." severity ERROR; wait; END PROCESS TESTING; END c07s02b04x00p20n01i02093arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2093.vhd,v 1.2 2001-10-26 16:29:45 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s02b04x00p20n01i02093ent IS END c07s02b04x00p20n01i02093ent; ARCHITECTURE c07s02b04x00p20n01i02093arch OF c07s02b04x00p20n01i02093ent IS TYPE boolean_v is array (integer range <>) of boolean; SUBTYPE boolean_4_dwn is boolean_v (4 downto 1); SUBTYPE boolean_4_null is boolean_v (4 downto 5); SUBTYPE boolean_8_dwn is boolean_v (8 downto 1); BEGIN TESTING: PROCESS variable l_operand : boolean_4_null ; variable r_operand : boolean_4_dwn := (false, false, true, true); variable result : boolean_4_dwn; BEGIN result := l_operand & r_operand; assert ( result (4) = false ) report "result (4) /= false" severity FAILURE; assert ( result (1) = true ) report "result (1) /= true" severity FAILURE; assert NOT((result(4)=false) and (result=(false,false,true,true))) report "***PASSED TEST: c07s02b04x00p20n01i02093" severity NOTE; assert ((result(4)=false) and (result=(false,false,true,true))) report "***FAILED TEST: c07s02b04x00p20n01i02093 - The left bound of the concatenated array is that of the second operand." severity ERROR; wait; END PROCESS TESTING; END c07s02b04x00p20n01i02093arch;
package fifo_pkg is signal wr_en : std_logic; -- Comment signal rd_en : std_logic; -- Comment constant c_constant : integer; -- Comment signal wr_en : std_logic; -- Comment signal rd_en : std_logic; -- Comment constant c_constant : integer; -- Comment end package;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc737.vhd,v 1.2 2001-10-26 16:30:04 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity c01s01b01x01p04n01i00737ent_a is generic ( constant gc1 : in integer; constant gc2 : in real; constant gc3 : in boolean ); port ( signal cent1 : in bit; signal cent2 : in bit ); end c01s01b01x01p04n01i00737ent_a; architecture c01s01b01x01p04n01i00737arch_a of c01s01b01x01p04n01i00737ent_a is begin p0: process begin wait for 1 ns; if (gc1 = 5) AND (gc2 = 0.1234) AND (gc3) then assert FALSE report "***PASSED TEST: c01s01b01x01p04n01i00737" severity NOTE; else assert FALSE report "***FAILED TEST: c01s01b01x01p04n01i00737 - Simple generic association in component instantiation (type conversion done on actual in generic map failed)." severity ERROR; end if; wait; end process; end c01s01b01x01p04n01i00737arch_a; ENTITY c01s01b01x01p04n01i00737ent IS generic ( constant gen_con : integer := 7 ); port ( signal ee1 : in bit; signal ee2 : in bit; signal eo1 : out bit ); END c01s01b01x01p04n01i00737ent; ARCHITECTURE c01s01b01x01p04n01i00737arch OF c01s01b01x01p04n01i00737ent IS constant c1 : integer := 33; constant c2 : real := 1.23557; constant c3 : boolean := FALSE; signal s1 : integer; signal s2 : integer; signal s3 : integer; component comp1 generic ( constant dgc1 : integer; constant dgc2 : real; constant dgc3 : boolean ); port ( signal dcent1 : in bit; signal dcent2 : in bit ); end component; for u1 : comp1 use entity work.c01s01b01x01p04n01i00737ent_a(c01s01b01x01p04n01i00737_arch_a) generic map (dgc1, dgc2, dgc3) port map ( dcent1, dcent2 ); function BoolToInt(bin : boolean) return integer is begin if bin then return 5; else return 99; end if; end; function IntegerToReal(iin : integer) return real is begin return 0.1234; end; function BitToBool(bin : bit) return boolean is begin if (bin = '1') then return TRUE; else return FALSE; end if; end; BEGIN u1 : comp1 generic map (BoolToInt(TRUE), IntegerToReal(1234), BitToBool('1')) port map (ee1,ee2); END c01s01b01x01p04n01i00737arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc737.vhd,v 1.2 2001-10-26 16:30:04 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity c01s01b01x01p04n01i00737ent_a is generic ( constant gc1 : in integer; constant gc2 : in real; constant gc3 : in boolean ); port ( signal cent1 : in bit; signal cent2 : in bit ); end c01s01b01x01p04n01i00737ent_a; architecture c01s01b01x01p04n01i00737arch_a of c01s01b01x01p04n01i00737ent_a is begin p0: process begin wait for 1 ns; if (gc1 = 5) AND (gc2 = 0.1234) AND (gc3) then assert FALSE report "***PASSED TEST: c01s01b01x01p04n01i00737" severity NOTE; else assert FALSE report "***FAILED TEST: c01s01b01x01p04n01i00737 - Simple generic association in component instantiation (type conversion done on actual in generic map failed)." severity ERROR; end if; wait; end process; end c01s01b01x01p04n01i00737arch_a; ENTITY c01s01b01x01p04n01i00737ent IS generic ( constant gen_con : integer := 7 ); port ( signal ee1 : in bit; signal ee2 : in bit; signal eo1 : out bit ); END c01s01b01x01p04n01i00737ent; ARCHITECTURE c01s01b01x01p04n01i00737arch OF c01s01b01x01p04n01i00737ent IS constant c1 : integer := 33; constant c2 : real := 1.23557; constant c3 : boolean := FALSE; signal s1 : integer; signal s2 : integer; signal s3 : integer; component comp1 generic ( constant dgc1 : integer; constant dgc2 : real; constant dgc3 : boolean ); port ( signal dcent1 : in bit; signal dcent2 : in bit ); end component; for u1 : comp1 use entity work.c01s01b01x01p04n01i00737ent_a(c01s01b01x01p04n01i00737_arch_a) generic map (dgc1, dgc2, dgc3) port map ( dcent1, dcent2 ); function BoolToInt(bin : boolean) return integer is begin if bin then return 5; else return 99; end if; end; function IntegerToReal(iin : integer) return real is begin return 0.1234; end; function BitToBool(bin : bit) return boolean is begin if (bin = '1') then return TRUE; else return FALSE; end if; end; BEGIN u1 : comp1 generic map (BoolToInt(TRUE), IntegerToReal(1234), BitToBool('1')) port map (ee1,ee2); END c01s01b01x01p04n01i00737arch;